WO2020258052A1 - 图像分量预测方法、装置及计算机存储介质 - Google Patents

图像分量预测方法、装置及计算机存储介质 Download PDF

Info

Publication number
WO2020258052A1
WO2020258052A1 PCT/CN2019/092858 CN2019092858W WO2020258052A1 WO 2020258052 A1 WO2020258052 A1 WO 2020258052A1 CN 2019092858 W CN2019092858 W CN 2019092858W WO 2020258052 A1 WO2020258052 A1 WO 2020258052A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference pixel
image component
adjacent
point
image
Prior art date
Application number
PCT/CN2019/092858
Other languages
English (en)
French (fr)
Inventor
霍俊彦
马彦卓
万帅
杨付正
李新伟
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2019/092858 priority Critical patent/WO2020258052A1/zh
Priority to CN201980084457.6A priority patent/CN113196762A/zh
Publication of WO2020258052A1 publication Critical patent/WO2020258052A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion

Definitions

  • the embodiments of the present application relate to the field of video coding and decoding technologies, and in particular to an image component prediction method, device, and computer storage medium.
  • H.265/High Efficiency Video Coding has been unable to meet the needs of the rapid development of video applications.
  • JVET Joint Video Exploration Team
  • VVC VVC Reference Software Test Platform
  • VTM an image component prediction method based on a prediction model has been integrated, through which the chrominance component can be predicted from the luminance component of the current coding block (CB).
  • CB current coding block
  • the embodiments of the present application provide an image component prediction method, device, and computer storage medium. By optimizing the fitting points used in the derivation of model parameters, the robustness of prediction can be improved, so that the constructed prediction model is more accurate and can Improve the codec prediction performance of video images.
  • an embodiment of the present application provides an image component prediction method, the method includes:
  • N adjacent reference pixels corresponding to the to-be-predicted image components of the encoding block in the video image; wherein, the N adjacent reference pixels are reference pixels adjacent to the encoding block, and N is a preset Integer value
  • the model parameters are determined, and the prediction model corresponding to the image component to be predicted is obtained according to the model parameters; wherein, the prediction model is used to realize the prediction processing of the image component to be predicted, To obtain the predicted value corresponding to the image component to be predicted.
  • an embodiment of the present application provides an image component prediction device, the image component prediction device includes: an acquisition unit, a calculation unit, a grouping unit, a determination unit, and a prediction unit, wherein:
  • the acquiring unit is configured to acquire N adjacent reference pixels corresponding to the image components to be predicted of the encoding block in the video image; wherein the N adjacent reference pixels are reference pixels adjacent to the encoding block Point, N is a preset integer value;
  • the calculation unit is configured to calculate the average value of the N adjacent reference pixel points to obtain a first average value point
  • the grouping unit is configured to group the second reference pixel set by the first average point to obtain a first reference pixel subset and a second reference pixel subset;
  • the determining unit is configured to determine two fitting points based on the first reference pixel subset and the second reference pixel subset;
  • 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 predicted image component to obtain the predicted value corresponding to the image component to be predicted.
  • an embodiment of the present application provides an image component prediction device, the image component prediction device including: a memory and a processor;
  • the memory is used to store a computer program that can run on the processor
  • the processor is configured to execute the method described in the first aspect when running the computer program.
  • an embodiment of the present application provides a computer storage medium, 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. method.
  • the embodiments of the present application provide an image component prediction method, device, and computer storage medium.
  • N adjacent reference pixels corresponding to the image components to be predicted of an encoding block in a video image are obtained, and the N adjacent reference pixels are
  • N is a preset integer value
  • compare the second reference pixel by the first average point The sets are grouped to obtain the first reference pixel subset and the second reference pixel subset, and based on the first reference pixel subset and the second reference pixel subset, two fitting points are determined; and then based on the two fitting points Model parameters, according to the model parameters to obtain the prediction model corresponding to the image component to be predicted, to obtain the predicted value corresponding to the image component to be predicted; in this way, because the first mean point is a preset number of adjacent reference pixels in the second reference pixel set Points are obtained by averaging, a preset number of adjacent reference pixels are divided into groups according to the first average
  • Figure 1 is a schematic diagram of the distribution of an effective adjacent area provided by a related technical solution
  • Figure 2 is a schematic diagram of the distribution of selected areas in one of three modes provided by related technical solutions
  • Figure 3 is a schematic flow chart of a traditional solution for deriving model parameters provided by related technical solutions
  • Figure 4 is a schematic diagram of a prediction model provided by a related technical solution under a traditional solution
  • Fig. 5 is a schematic diagram of a prediction model under another traditional scheme provided by a related technical scheme
  • FIG. 6 is a schematic diagram of the composition of a video encoding system provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of the composition of a video decoding system provided by an embodiment of the application.
  • FIG. 8 is a schematic flowchart of an image component prediction method provided by an embodiment of the application.
  • FIG. 9A is a schematic structural diagram of adjacent reference pixel selection in INTRA_LT_CCLM mode according to an embodiment of the application.
  • 9B is a schematic structural diagram of adjacent reference pixel selection in INTRA_L_CCLM mode according to an embodiment of the application.
  • 9C is a schematic structural diagram of adjacent reference pixel selection in the INTRA_T_CCLM mode provided by an embodiment of the application.
  • FIG. 10 is a schematic flowchart of a model parameter derivation solution provided by an embodiment of the application.
  • FIG. 11 is a schematic diagram of comparison between a prediction model provided by an embodiment of the present application and a traditional solution
  • FIG. 12 is a schematic diagram of comparison between another solution of the application provided by an embodiment of the application and a prediction model under the traditional solution;
  • FIG. 13 is a schematic diagram of comparison between another prediction model of the solution of this application and the traditional solution provided by an embodiment of the application;
  • FIG. 14 is a schematic diagram of the composition structure of an image component prediction apparatus provided by an embodiment of the application.
  • 15 is a schematic diagram of a specific hardware structure of an image component prediction apparatus provided by an embodiment of the application.
  • 16 is a schematic diagram of the composition structure of an encoder provided by an embodiment of the application.
  • FIG. 17 is a schematic diagram of the composition structure of a decoder provided by an embodiment of the application.
  • the first image component, the second image component, and the third image component are generally used to characterize the coding block; among them, the three image components are a luminance component, a blue chrominance component, and a red chrominance component.
  • the luminance component is usually represented by the symbol Y
  • the blue chrominance component is usually represented by the symbol Cb or U
  • the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV. Format representation.
  • the first image component may be a luminance component
  • the second image component may be a blue chrominance component
  • the third image component may be a red chrominance component
  • the cross-component prediction technology mainly includes the cross-component linear model prediction (CCLM) mode and the multi-directional linear model prediction (Multi-Directional Linear Model Prediction, MDLM) mode, whether it is based on the model parameters derived from the CCLM mode or the model parameters derived from the MDLM mode, its corresponding prediction model can realize the first image component to the second image component, and the second image component to the first image component , Prediction between image components such as 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.
  • CCLM cross-component linear model prediction
  • MDLM Multi-Directional Linear Model Prediction
  • the CCLM mode is used in the VTM.
  • the first image component and the second image component For the same coding block, that is, the predicted 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 equation (1),
  • i,j represent the position coordinates of the pixel in the coding block
  • i represents the horizontal direction
  • j represents the vertical direction
  • Pred C [i,j] represents the pixel corresponding to the location coordinate [i,j] in the coding block
  • Pred L [i,j] represents the reconstructed value of the first image component corresponding to the pixel with the position coordinate [i,j] in the same coding block (downsampled)
  • ⁇ and ⁇ represent the model parameter.
  • its adjacent areas may include a left adjacent area, an upper adjacent area, a lower left adjacent area, and an upper right adjacent area.
  • three cross-component linear model prediction modes can be included, which are: the intra-CCLM mode adjacent to the left and upper side (can be represented by the INTRA_LT_CCLM mode), and the intra-CCLM mode adjacent to the left and lower left side (It can be represented by INTRA_L_CCLM mode) and the intra-frame CCLM mode adjacent to the upper side and the upper right side (can be represented by INTRA_T_CCLM mode).
  • each mode can select a preset number (such as 4) of adjacent reference pixels for the derivation of model parameters ⁇ and ⁇ , and the biggest difference between these three modes is that they are used to derive the model
  • the selected regions corresponding to the adjacent reference pixels of the parameters ⁇ and ⁇ are different.
  • the upper selection area corresponding to the adjacent reference pixel is W'
  • the left selection area corresponding to the adjacent reference pixel is H'
  • FIG. 1 shows a schematic diagram of the distribution of effective adjacent areas provided by related technical solutions.
  • the left side adjacent area, the lower left side adjacent area, the upper side adjacent area, and the upper right side adjacent area are all valid.
  • the selection areas for the three modes are shown in Figure 2.
  • Figure 2 shows the selection area of INTRA_LT_CCLM mode, including the left adjacent area and upper side adjacent area;
  • (b) shows the selection area of INTRA_L_CCLM mode, including the left adjacent area And the adjacent area on the lower left side;
  • (c) shows the selection area of INTRA_T_CCLM mode, including the adjacent area on the upper side and the adjacent area on the upper right side.
  • reference points for deriving model parameters can be selected in the selection area.
  • the reference points selected in this way can be called adjacent reference pixels, and usually the number of adjacent reference pixels is at most 4; and for a W ⁇ H code block with a certain size, the positions of the adjacent reference pixels Generally certain.
  • the process may include:
  • S303 Calculate the mean point corresponding to the two points with the larger value of the brightness component and the mean point corresponding to the two points with the smaller value of the brightness component;
  • two points determine a straight line
  • the two points here can be called fitting points.
  • two adjacent reference pixels with a larger brightness component and two adjacent reference pixels with a smaller value are obtained after 4 comparisons; then According to two adjacent reference pixels with a larger brightness component, find a mean point (which can be represented by mean max ), and find another mean point according to two adjacent reference pixels with a smaller brightness component ( It can be expressed by mean min ) to get two mean points mean max and mean min ; then mean max and mean min are used as two fitting points to derive the model parameters (which can be expressed by ⁇ and ⁇ ), and finally according to the model parameters
  • a prediction model is constructed, and the chroma component prediction process is performed according to the prediction model.
  • the gray diagonal line indicates the prediction model constructed according to the two fitting points; the gray dotted line
  • LMS Least Mean Square
  • FIG. 5 A schematic diagram of the prediction model under a traditional scheme; as can be seen from Figure 5, the gray slanted line and the gray dotted line have a certain deviation, that is, the prediction model constructed by the traditional scheme cannot be compared with the distribution of these 4 adjacent reference pixels. Fits well.
  • the current traditional scheme lacks robustness in the process of model parameter derivation, and cannot fit well when the four adjacent reference pixels are in an uneven distribution.
  • an embodiment of the present application provides an image component prediction method, which obtains N adjacent reference pixels corresponding to the image component to be predicted of a coding block in a video image.
  • the N adjacent reference pixels are reference pixels adjacent to the encoding block, and N is a preset integer value; the average value of the N adjacent reference pixels is calculated to obtain the first average point; The average point groups the second reference pixel set to obtain the first reference pixel subset and the second reference pixel subset, and based on the first reference pixel subset and the second reference pixel subset, two fitting points are determined; The model parameters are determined based on the two fitting points, and the prediction model corresponding to the image component to be predicted is obtained according to the model parameters to obtain the predicted value corresponding to the image component to be predicted; in this way, since the first mean point is a prediction of the second reference pixel set Suppose the number of adjacent reference pixels are averaged, the preset number of adjacent reference pixels are grouped and divided according to the first average point, and then two fitting points for deriving the model parameters are determined, which can improve the prediction accuracy. Great; that is to say, by optimizing the fitting points used in the model parameter derivation, the constructed prediction model is more accurate, and the coding
  • the video encoding system 600 includes a transform and quantization unit 601, an intra-frame estimation unit 602, and an intra-frame
  • the encoding unit 609 can implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC).
  • a video coding block can be obtained by dividing the coding tree block (Coding Tree Unit, CTU), and then the residual pixel information obtained after intra or inter prediction is paired by the transform and quantization unit 601
  • the video coding block is transformed, including transforming the residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce the bit rate;
  • the intra-frame estimation unit 602 and the intra-frame prediction unit 603 are used for Perform intra prediction on the video coding block; specifically, the intra estimation unit 602 and the intra prediction unit 603 are used to determine the intra prediction mode to be used to encode the video coding block;
  • the motion compensation unit 604 and the motion estimation unit 605 is used to perform inter-frame predictive coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information;
  • the motion estimation performed by the motion estimation unit 605 is for generating motion vectors In the process, the motion vector can estimate the motion of the video coding block, and then the motion compensation
  • the context content can be based on adjacent coding blocks, can be used to encode information indicating the determined intra prediction mode, and output the code stream of the video signal; and the decoded image buffer unit 610 is used to store reconstructed video coding blocks for Forecast reference. As the encoding of the video image progresses, new reconstructed video encoding blocks will be continuously generated, and these reconstructed video encoding blocks will be stored in the decoded image buffer unit 610.
  • the video decoding system 700 includes a decoding unit 701, an inverse transform and inverse quantization unit 702, and an intra-frame The prediction unit 703, the motion compensation unit 704, the filtering unit 705, and the decoded image buffer unit 706, etc., wherein the decoding unit 701 can implement header information decoding and CABAC decoding, and the filtering unit 705 can implement deblocking filtering and SAO filtering.
  • the decoding unit 701 can implement header information decoding and CABAC decoding
  • the filtering unit 705 can implement deblocking filtering and SAO filtering.
  • the code stream of the video signal is output; the code stream is input into the video decoding system 700, and first passes through the decoding unit 701 to obtain the decoded transform coefficient;
  • the inverse transform and inverse quantization unit 702 performs processing to generate a residual block in the pixel domain;
  • the intra prediction unit 703 can be used to generate data based on the determined intra prediction mode and the data from the previous decoded block of the current frame or picture The prediction data of the current video decoding block;
  • the motion compensation unit 704 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information to generate the predictability of the video decoding block being decoded Block; by summing the residual block from the inverse transform and inverse quantization unit 702 and the corresponding predictive block generated by the intra prediction unit 703 or the motion compensation unit 704 to form a decoded video block; the decoded video signal Through the filtering unit 705 in order to remove the block effect artifacts, the video quality can be
  • the image component prediction method in the embodiment of the present application is mainly applied to the intra prediction unit 603 as shown in FIG. 6 and the intra prediction unit 703 as shown in FIG. 7, and is specifically applied to CCLM prediction in intra prediction section. That is to say, the image component prediction method in the embodiment of this application can be applied to a video encoding system, a video decoding system, or even a video encoding system and a video decoding system at the same time.
  • the embodiment of this application There is no specific limitation.
  • the "coding block in the video image” specifically refers to the current coding block in the intra prediction; when the method is applied to the intra prediction unit 703 part, “coding in the video image "Block” specifically refers to the current decoded block in intra prediction.
  • FIG. 8 shows a schematic flowchart of an image component prediction method provided by an embodiment of the present application. As shown in Figure 8, the method may include:
  • N adjacent reference pixels are reference pixels adjacent to the coding block, and N is a preset integer value, which may also be referred to as a preset number.
  • the video image can be divided into multiple coding blocks, and each coding block can include a first image component, a second image component, and a third image component.
  • the coding block in this embodiment of the application is a video image to be encoded. The current block.
  • the image component to be predicted is the first image component
  • the second image component needs to be predicted by the prediction model the image component to be predicted is the second image component
  • the third image component is predicted by the prediction model
  • the image component to be predicted is the third image component.
  • N may generally be 4, but the embodiment of the present application does not specifically limit it.
  • the obtaining N adjacent reference pixels corresponding to the image component to be predicted of the coding block in the video image may include:
  • S801-1 Obtain a first reference pixel set corresponding to the image component to be predicted of the coding block in the video image
  • the first reference pixel set is determined by the left side of the coding block.
  • the adjacent reference pixels in the side adjacent area and the upper adjacent area are composed of adjacent reference pixels, as shown in Figure 2 (a); for the INTRA_L_CCLM mode, the first reference pixel set is composed of the left adjacent area and It is composed of adjacent reference pixels in the adjacent area on the lower left side, as shown in Figure 2 (b); for the INTRA_T_CCLM mode, the first reference pixel set is composed of the adjacent area on the upper side of the coding block and the adjacent area on the upper right side. It is composed of adjacent reference pixels in Figure 2 (c).
  • the acquiring the first reference pixel set corresponding to the image component to be predicted of the coding block in the video image may include:
  • Acquiring reference pixels adjacent to at least one side of the coding block wherein the at least one side includes the left side of the coding block and/or the upper side of the coding block;
  • a first reference pixel set corresponding to the image component to be predicted is formed.
  • At least one side of the coding block can 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.
  • the embodiments are not specifically limited.
  • the first reference pixel set at this time can be the sum of the reference pixels adjacent to the left side of the encoding block and the encoding
  • the upper side of the block is composed of adjacent reference pixels.
  • the first reference pixel set can be composed of the adjacent pixels on the left side of the encoding block. It is composed of reference pixels adjacent to the side; when the adjacent area on the left is an invalid area and the adjacent area on the upper side is an effective area, then the first reference pixel set can be composed of the upper side of the coding block. It is composed of adjacent reference pixels.
  • the acquiring the first reference pixel set corresponding to the image component to be predicted of the coding block in the video image may include:
  • a first reference pixel set corresponding to the image component to be predicted is formed.
  • the reference row or reference column adjacent to the encoding block can refer to the reference row adjacent to the upper side of the encoding block, or the reference column adjacent to the left side of the encoding block, or even It refers to a reference row or a reference column adjacent to other sides of the coding block, which is not specifically limited in the embodiment of the present application.
  • the adjacent reference rows of the coding blocks will describe the reference behaviors with adjacent sides above, and the reference columns adjacent to the coding blocks will take the reference columns adjacent to the left as an example. description.
  • the reference pixels in the reference row adjacent to the coding block may include reference pixels adjacent to the upper side and the upper right side (also referred to as adjacent reference pixels corresponding to the upper side and the upper right side) Point), where the upper side represents the upper side of the coding block, and the upper right side represents the side length of the upper side of the coding block that is horizontally extended to the right and the same height as the current coding block; in the reference column adjacent to the coding block
  • the reference pixels of may also include reference pixels adjacent to the left side and the lower left side (also referred to as the adjacent reference pixels corresponding to the left side and the lower left side), where the left side represents the code
  • the left side of the block and the lower left side represent the side length that is the same width as the current decoded block, which is vertically extended downward from the left side of the encoding block; however, the embodiment of the present application does not specifically limit it.
  • the first reference pixel set at this time may be composed of reference pixels in the reference column adjacent to the coding block;
  • the first reference pixel set at this time may be composed of reference pixels in the reference row adjacent to the coding block.
  • S801-2 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 pixels;
  • 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 removed to obtain the second reference pixel set; wherein, the number of effective pixels contained in the second reference pixel set is usually 4 in practical applications.
  • the filtering process on the first reference pixel set to obtain the second reference pixel set may include:
  • 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 form a second reference pixel set ;
  • the second reference pixel set includes a preset number of adjacent reference pixels.
  • the image component intensity can be represented by image component values, such as brightness value, chroma value, etc.; here, the larger the image component value, the higher the image component intensity.
  • the screening of the first reference pixel set can be based on the position of the reference pixel to be selected, or based on the intensity of the image component (such as luminance value, chrominance value, etc.), so that The filtered reference pixels to be selected form a second reference pixel set. The following will describe the position of the reference pixel to be selected as an example.
  • the selection method of selecting at most 4 adjacent reference pixels is as follows:
  • 2 adjacent reference pixels to be selected can be filtered out in the upper selection area W', and their corresponding positions are S[ W'/4,-1] and S[3W'/4,-1]; 2 adjacent reference pixels to be selected can be screened out in the left selection area H', and their corresponding positions are respectively S[-1, H'/4] and S[-1,3H'/4]; these 4 adjacent reference pixels to be selected form a second reference pixel set, as shown in FIG. 9A.
  • the adjacent area on the left side and the adjacent area on the upper side of the coding block are both effective, and in order to maintain the same resolution of the luminance component and the chrominance component, the luminance component needs to be down-sampled, so that The down-sampled luminance component and chrominance component have the same resolution.
  • the adjacent area on the left side and the adjacent area on the lower left side of the encoding block are both effective, and in order to maintain the same resolution of the luminance component and the chrominance component, the luminance component still needs to be down-sampled, so that The down-sampled luminance component and chrominance component have the same resolution.
  • the upper adjacent area and the upper right adjacent area of the coding block are both effective, and in order to maintain the same resolution of the luminance component and the chrominance component, the luminance component still needs to be down-sampled, so that The down-sampled luminance component and chrominance component have the same resolution.
  • the second reference pixel set can be obtained, and the second reference pixel set generally includes 4 adjacent reference pixels; after the second reference pixel set is obtained, the The second reference pixel set is divided into groups, so that the two fitting points used in the model parameter derivation are more accurate, and the robustness of prediction is improved.
  • this step may include:
  • the average value of the first image component value corresponding to each adjacent reference pixel in the second reference pixel set is calculated to obtain the average value of the first image component corresponding to the multiple first image components, which can be called the first image
  • the first average value of the component (which can be represented by mean L ); the average value of the second image component value corresponding to each adjacent reference pixel in the second reference pixel set is calculated to obtain the second image corresponding to the multiple second image components
  • the component mean can be called the first mean of the second image component (it can be represented by mean C ), where the first mean point can be represented by (mean L , mean C ); that is, the first mean point of the first mean point
  • the image component is mean L
  • the second image component of the first mean point is mean C.
  • S803 Group the second reference pixel set by the first average point to obtain a first reference pixel subset and a second reference pixel subset;
  • the second reference pixel set can be grouped by the first mean point at this time, for example, it can be divided into the left type (represented by the Left type) and the right type ( Expressed by the Right class), and then use the respective mean points of the Left class and the Right class as the fitting points to derive the model parameters; among them, the Left class is the first reference pixel subset, and the Right class is the second reference pixel subset.
  • the grouping the second reference pixel set by the first average point to obtain the first reference pixel subset and the second reference pixel subset may include:
  • the first image component value corresponding to each adjacent reference pixel in the second reference pixel set can be compared with the mean L ;
  • the adjacent reference pixel can be put into the first reference pixel subset to obtain the first reference pixel subset;
  • the adjacent reference pixel may be put into the second reference pixel subset to obtain the second reference pixel subset.
  • S804 Determine two fitting points based on the first reference pixel subset and the second reference pixel subset
  • the two fitting points include the first fitting point and the second fitting point.
  • the first fitting point can be obtained; according to the second reference pixel subset, the Get the second fitting point.
  • the first fitting point can be obtained by averaging all adjacent reference pixels in the first reference pixel subset, or can be obtained by averaging some adjacent reference pixels in the first reference pixel subset, or It selects the adjacent reference pixel point in the middle from the first reference pixel subset as the first fitting point, or even arbitrarily selects an adjacent reference pixel point from the first reference pixel subset as the first fitting point ,
  • the second fitting point can be obtained by averaging all adjacent reference pixel points in the second reference pixel subset, or it can be selected from the second reference pixel subset.
  • the adjacent reference pixel point is used as the first fitting point, or an adjacent reference pixel point may be arbitrarily selected from the second reference pixel subset as the first fitting point, which is not specifically limited in the embodiment of the present application.
  • the first fitting point is obtained by averaging all adjacent reference pixel points in the first reference pixel subset
  • the second fitting point is obtained by averaging all adjacent reference pixel points in the second reference pixel subset. Neighboring reference pixels are averaged.
  • the determining two fitting points based on the first reference pixel subset and the second reference pixel subset may include:
  • S804a-1 Select a part of adjacent reference pixels from the first reference pixel subset, perform average calculation on the part of adjacent reference pixels, and use the calculated average point as the first fitting point;
  • S804a-2 Select a part of adjacent reference pixels from the second reference pixel subset, perform an average calculation on the part of adjacent reference pixels, and use the calculated average point as the second fitting point.
  • the determining two fitting points based on the first reference pixel subset and the second reference pixel subset includes:
  • S804b-1 Select one of the adjacent reference pixel points from the first reference pixel subset as the first fitting point;
  • S804b-2 Select one of the adjacent reference pixel points from the first reference pixel subset as the second fitting point.
  • the determining two fitting points based on the first reference pixel subset and the second reference pixel subset may include:
  • S804c-1 Based on the first image component value and the second image component value corresponding to each adjacent reference pixel in the first reference pixel subset, obtain the second mean value corresponding to the first image component and the second image component corresponding To obtain a second mean point, and use the second mean point as the first fitting point;
  • S804c-2 Based on the first image component value and the second image component value corresponding to each adjacent reference pixel in the second reference pixel subset, obtain the third mean value corresponding to the first image component and the second image component corresponding To obtain the third average point, and use the third average point as the second fitting point.
  • the average value of the first image component value corresponding to each adjacent reference pixel in the first reference pixel subset is calculated to obtain the average value of the first image component corresponding to the multiple first image components, which can be called the first image
  • the second mean value of the component (which can be represented by mean LeftL ); the mean value of the second image component value corresponding to each adjacent reference pixel in the first reference pixel subset is calculated to obtain the second image corresponding to the multiple second image components
  • the component mean can be called the second mean of the second image component (it can be represented by mean LeftC ).
  • the second mean point can be represented by (mean LeftL , mean LeftC ), that is, the first fitting point can be represented by (mean LeftL , Mean LeftC ) means; that is, the first image component of the first fitting point is mean LeftL , and the second image component of the first fitting point is mean LeftC .
  • the average value of the first image component corresponding to each adjacent reference pixel in the second reference pixel subset is calculated to obtain the average value of the first image component corresponding to the multiple first image components, which can be called the third image component of the first image component.
  • Mean value (which can be represented by mean RightL ); the mean value of the second image component corresponding to each adjacent reference pixel in the second reference pixel subset is calculated to obtain the mean value of the second image component corresponding to the multiple second image components.
  • the third mean of the second image component (which can be represented by mean RightC ), where the third mean point can be represented by (mean RightL , mean RightC ), that is, the second fitting point can be represented by (mean RightL , mean RightC ) Means ; that is, the first image component of the second fitting point is mean RightL , and the second image component of the second fitting point is mean RightC .
  • S805 Determine model parameters based on the two fitting points, and obtain the prediction model corresponding to the image component to be predicted according to the model parameters; wherein, the prediction model is used to implement the prediction processing of the image component to be predicted to Obtain the predicted value corresponding to the image component to be predicted;
  • 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 parameters (can Denoted by ⁇ ) and the second model parameter (denoted by ⁇ ). Assuming that the image component to be predicted is a chrominance component, according to the model parameters ⁇ and ⁇ , the prediction model corresponding to the chrominance component shown in formula (1) can be obtained.
  • 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:
  • the method may further include:
  • the first model parameters can be calculated according to the first preset factor calculation model ⁇ , as shown in formula (2),
  • the second model parameter ⁇ can be calculated according to the calculation model combining the first mean point (mean L , mean C ) and the second preset factor, as shown in formula (3),
  • the second model parameter ⁇ can be calculated according to the calculation model combining the first fitting point (mean LeftL , mean LeftC ) and the second preset factor, as shown in formula ( 4) As shown,
  • a preset model can be constructed. Assuming that the image component to be predicted is the chrominance component, the prediction model corresponding to the chrominance component can be obtained according to the model parameters ( ⁇ and ⁇ ), as shown in equation (1); then the prediction model is used to predict the chrominance component, To get the predicted value corresponding to the chrominance component.
  • the method may further include:
  • the first reference pixel subset and the second reference pixel subset can be obtained; then a fitting point is determined according to the first reference pixel subset , Determine another fitting point according to the second reference pixel subset; in this way, according to the principle of “two points determine a straight line”, the slope of the straight line (that is, the first model parameter) and the intercept of the straight line (that is, the first model parameter) can be determined Two model parameters), so that the prediction model corresponding to the image component to be predicted can be obtained according to the two model parameters, so as to obtain the predicted value corresponding to the image component to be predicted for each pixel in the coding block.
  • the prediction model corresponding to the chrominance component shown in equation (1) can be obtained; then, the equation (1)
  • the prediction model shown in) performs prediction processing on the chrominance component of each pixel in the coding block, so that the predicted value corresponding to the chrominance component of each pixel can be obtained.
  • This embodiment provides an image component prediction method by obtaining N adjacent reference pixels corresponding to the image components to be predicted of a coding block in a video image, where the N adjacent reference pixels are adjacent to the coding block , N is a preset integer value; calculate the average value of the N adjacent reference pixels to obtain a first average point; then group the second reference pixel set by the first average point to obtain A first reference pixel subset and a second reference pixel subset, where the first average point is obtained by averaging a preset number of adjacent reference pixel points in the second reference pixel set; based on the first reference pixel subset and The second reference pixel subset is used to determine two fitting points; based on these two fitting points, the model parameters are determined, and the prediction model corresponding to the image component to be predicted is obtained according to the model parameters.
  • the prediction model is used to implement the prediction of the image component to be predicted. Prediction processing to obtain the predicted value corresponding to the image component to be predicted; in this way, since the first average point is obtained by averaging the preset number of adjacent reference pixel points in the second reference pixel set, the first average point will A preset number of adjacent reference pixels are grouped and divided, and then two fitting points for deriving model parameters are determined, which can improve the robustness of prediction; that is, by optimizing the fitting points used for deriving model parameters , So that the constructed prediction model is more accurate, and the codec prediction performance of the video image is improved.
  • the number of adjacent reference pixels used for derivation of the model parameters is generally 4; that is, the preset number may be 4. A detailed description will be given below taking the preset number equal to 4 as an example.
  • two fitting points can be determined by four comparisons and average points, thus using the principle of "two points to determine a straight line".
  • the model parameters are derived; in this way, the prediction model corresponding to the image component to be predicted can be constructed based on the model parameters to obtain the predicted value corresponding to the image component to be predicted.
  • the image component to be predicted is a chrominance component, and the chrominance component is predicted by the luminance component.
  • the numbers of the 4 adjacent reference pixels selected through the screening are 0, 1, 2, and 3 respectively.
  • two adjacent reference pixels with larger brightness values can be further selected (including the pixel with the largest brightness value and the second brightness value).
  • the largest pixel) and two adjacent reference pixels with a smaller brightness value may include the pixel with the smallest brightness value and the pixel with the next smallest brightness value).
  • two arrays of minIdx[2] and maxIdx[2] can be set to store two sets of adjacent reference pixels respectively. Initially, the adjacent reference pixels numbered 0 and 2 are put into minIdx[2], and The adjacent reference pixels numbered 1 and 3 are put into maxIdx[2], as shown below,
  • the two adjacent reference pixels with smaller brightness values can be stored in minIdx[2]
  • the two adjacent reference pixels with larger brightness values are stored in maxIdx[2] Pixels, as shown below,
  • Step1 if(L[minIdx[0]]>L[minIdx[1]],swap(minIdx[0],minIdx[1])
  • Step2 if(L[maxIdx[0]]>L[maxIdx[1]],swap(maxIdx[0],maxIdx[1])
  • Step3 if(L[minIdx[0]]>L[maxIdx[1]],swap(minIdx,maxIdx)
  • Step4 if(L[minIdx[1]]>L[maxIdx[0]],swap(minIdx[1],maxIdx[0])
  • 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 respectively, and the corresponding chromaticity values are represented by chroma 0 min and chroma 1 min respectively ; at the same time Two adjacent reference pixels with larger brightness values can also be obtained, and the corresponding brightness values are represented by luma 0 max and luma 1 max respectively, and the corresponding chromaticity values are represented by chroma 0 max and chroma 1 max respectively .
  • the neighboring reference pixels can be obtained is represented by the mean point min Mean, Mean min the mean point corresponding to the luminance value LUMA min, min Chroma color value; for 2
  • the average value of two larger adjacent reference pixel points can be obtained, and the second average value point can be expressed by mean max .
  • the luminance value corresponding to the mean value point mean max is luma max and the chromaticity value is chroma max ; the details are as follows,
  • chroma min (chroma 0 min +chroma 1 min +1)>>1
  • chroma max (chroma 0 max +chroma 1 max +1)>>1
  • the model parameter ⁇ is the slope in the prediction model
  • the model parameter ⁇ is the intercept in the prediction model.
  • the prediction model lacks robustness, so when the distribution of 4 adjacent reference pixels is not uniform, the built prediction model will not be able to accurately fit these 4 adjacent reference pixels.
  • the distribution of reference pixels such as the comparison diagram of the prediction model shown in FIG. 5.
  • the 4 adjacent reference pixels can be divided into two types or two types through the brightness average point.
  • a subset of reference pixels for example, divide it into the left class (represented by the Left class) and the right class (represented by the Right class), and then use the respective mean points of the Left and Right classes as the fitting points to construct the prediction Model; Among them, the Left category is the first reference pixel subset, and the Right category is the second reference pixel subset.
  • FIG. 10 shows a schematic flowchart of a model parameter derivation solution provided by an embodiment of the present application. As shown in Figure 10, the process may include:
  • S1004 Calculate Left average points corresponding to the first reference pixel subset and Right average points corresponding to the second reference pixel subset;
  • S1007 Construct a prediction model according to the two model parameters, and perform prediction processing of chrominance components according to the prediction model.
  • the principle of "two points determine a straight line" is used to construct the prediction model; the two points here can be called fitting points.
  • the luminance mean meanL is used Group these 4 adjacent reference pixels, for example, divide them into the first reference pixel subset (can be called the Left category) and the second reference pixel subset (can be called the Right category); find the Left corresponding to the Left category Mean value point (which can be represented by meanLeft), the brightness mean value corresponding to this Left mean point is represented by meanLeftLuma, and the corresponding brightness mean value is represented by meanLeftChroma; find the Right mean point corresponding to the Right class (which can be represented by meanRight), and the Right mean point corresponds to The mean brightness value of is represented by meanRightLuma, and the corresponding mean brightness value is represented by meanR
  • the image component to be predicted is a chrominance component
  • the chrominance component is predicted by the luminance component.
  • the numbers of the 4 adjacent reference pixels selected through the screening are 0, 1, 2, and 3 respectively.
  • round represents a rounding function for rounding.
  • the shift method can be used in computer language to realize the division by 2 operation; when cntL or cntR is 3, in computer language, it can be done by look-up table (LUT) Realize the operation of dividing by 3; this can achieve the purpose of reducing computational complexity.
  • LUT look-up table
  • the two mean points meanLeft (meanLeftLuma, meanLeftChroma) and meanRight (meanRightLuma, meanRightChroma) are obtained, the two mean points can be used as fitting points to derive the first model parameter ⁇ , and then the mean point mean(meanL, meanC) derives the second model parameter ⁇ , as shown below,
  • the prediction model corresponding to the chrominance component can be obtained according to the model parameters, as shown in equation (1); then the prediction model is used to predict the chrominance component, To get the predicted value corresponding to the chrominance component.
  • the current traditional solution requires 4 comparisons and 4 averaging operations; and in the embodiment of the present application, this process requires 4 comparisons and 6 averaging operations.
  • the operation of averaging in the current traditional solutions is based on averaging two adjacent reference pixels, which can be implemented by simple addition and shifting methods; the operation of averaging in the embodiments of this application It involves 1 to 4 adjacent reference pixels for averaging. Among them, the averaging of 3 adjacent reference pixels cannot be realized by shifting. In the embodiment of the present application, it can be realized by looking up table.
  • the preset number is 4, that is, the second reference pixel set includes 4 adjacent reference pixels; in this way, the second reference pixel set is grouped according to the first average point, and Three methods are obtained.
  • the first reference pixel subset includes 1 adjacent reference pixel
  • the second reference pixel subset includes 3 adjacent reference pixels
  • the first reference pixel subset includes 2 adjacent reference pixels.
  • the second reference pixel subset includes 2 adjacent reference pixels
  • the first reference pixel subset includes 3 adjacent reference pixels
  • the second reference pixel subset includes 1 adjacent reference pixel, etc. Therefore, in some embodiments, before S803, the method may further include:
  • the grouping the second reference pixel set by the first average point to obtain the first reference pixel subset and the second reference pixel subset may include:
  • the first reference pixel subset includes 1 adjacent reference pixel
  • the second reference pixel subset includes 3 adjacent reference pixels
  • the first reference pixel subset includes two adjacent reference pixels ,
  • the second reference pixel subset includes 2 adjacent reference pixels;
  • the first reference pixel subset includes 3 adjacent reference pixels
  • the second reference pixel subset includes 1 adjacent reference pixel.
  • the luminance values of each group of 4 adjacent reference pixels can be compared with the first A mean value is compared to realize the grouping of these 4 adjacent reference pixels.
  • the 4 adjacent reference pixels can show a uniform distribution trend or a non-uniform distribution trend
  • the first reference pixel subset includes 2 adjacent Reference pixels
  • the second reference pixel subset includes 2 adjacent reference pixels
  • the first reference pixel subset includes 1 phase Adjacent reference pixels
  • the second reference pixel subset includes 3 adjacent reference pixels
  • the first reference pixel subset includes 3 adjacent reference pixels
  • the second reference pixel subset includes 1 adjacent reference pixel ;
  • the first reference pixel subset and the second reference pixel subset to determine two fitting points may include:
  • the second average value corresponding to the first image component and the second average value corresponding to the second image component are determined by shifting to obtain the second average point, and As the first fitting point;
  • the third average value corresponding to the first image component and the third average value corresponding to the second image component are determined by shifting to obtain the third average point, and As the second fitting point.
  • FIG. 11 shows a schematic diagram of comparison between a prediction model provided by an embodiment of the present application and a traditional solution under the present application.
  • the 4 black dots are the 4 adjacent reference pixels
  • the 2 gray dots are the average points corresponding to the two larger adjacent reference pixels among the 4 adjacent reference pixels.
  • Mean points corresponding to 2 smaller adjacent reference pixels that is, the two fitting points obtained by the traditional scheme
  • the gray diagonal line is the prediction model constructed according to the traditional scheme
  • the bold black dashed line is 4 The average brightness of adjacent reference pixels.
  • the left side of the bold black dashed line is the Left class
  • the right side of the bold black dashed line is the Right class
  • the two bold black circles are the mean points of the Left class and the Right class.
  • the bold black oblique line is the prediction model constructed according to the solution of the embodiment of the application
  • the gray dotted line is the prediction model fitted by the LMS algorithm for these 4 adjacent reference pixels; it can be seen from FIG. 11 that the gray The oblique line and the bold black oblique line overlap, and are relatively close to the gray dotted line, that is, the scheme of the embodiment of the application is the same as the prediction model constructed by the traditional scheme, and both can accurately fit these 4 adjacent reference pixels Distribution.
  • the first reference pixel subset and the second reference pixel subset to determine two fitting points may include:
  • the third mean value corresponding to the first image component and the third mean value corresponding to the second image component are determined by means of a look-up table to obtain the third mean point, and As the second fitting point.
  • FIG. 12 shows a schematic diagram of comparison between another prediction model provided by the present application and the traditional scheme provided by an embodiment of the present application.
  • the 4 black dots are the 4 adjacent reference pixels
  • the 2 gray dots are the average points corresponding to the two larger adjacent reference pixels among the 4 adjacent reference pixels.
  • the gray diagonal line is the prediction model constructed according to the traditional scheme
  • the bold black dashed line is 4 The average brightness of adjacent reference pixels.
  • the left side of the bold black dashed line is the Left class
  • the right side of the bold black dashed line is the Right class
  • the two bold black circles are the mean points of the Left class and the Right class.
  • the bold black diagonal line is the prediction model constructed according to the solution of the embodiment of the application
  • the gray dotted line is the prediction model fitted by the LMS algorithm for these 4 adjacent reference pixels; it can be seen from FIG. 12 that The thick black diagonal line is closer to the gray dotted line, that is, the solution of the embodiment of the present application is more in line with the distribution of the four adjacent reference pixels than the prediction model constructed by the traditional solution.
  • the first reference pixel subset and the second reference pixel subset to determine two fitting points may include:
  • the second average value corresponding to the first image component and the second average value corresponding to the second image component are determined through a look-up table to obtain the second average point, As the first fitting point;
  • One adjacent reference pixel point in the second reference pixel subset is used as a third average point, and used as a second fitting point.
  • FIG. 13 shows a schematic diagram of comparison between another prediction model provided by the present application and the traditional solution provided by the present application.
  • the 4 black dots are the 4 adjacent reference pixels
  • the 2 gray dots are the average points corresponding to the two larger adjacent reference pixels among the 4 adjacent reference pixels.
  • Mean points corresponding to 2 smaller adjacent reference pixels that is, the two fitting points obtained by the traditional scheme
  • the gray diagonal line is the prediction model constructed according to the traditional scheme
  • the bold black dashed line is 4 The average brightness of adjacent reference pixels.
  • the left side of the bold black dashed line is the Left class
  • the right side of the bold black dashed line is the Right class
  • the two bold black circles are the mean points of the Left class and the Right class.
  • the bold black oblique line is the prediction model constructed according to the solution of the embodiment of the application
  • the gray dotted line is the prediction model fitted by the LMS algorithm for these 4 adjacent reference pixels; it can be seen from FIG. 13 that The thick black diagonal line is closer to the gray dotted line, that is, the solution of the embodiment of the present application is more in line with the distribution of the four adjacent reference pixels than the prediction model constructed by the traditional solution.
  • the average change of BD-rate on the Y component, Cb component and Cr component is -0.04.
  • %, -0.25%, -0.20% it also shows that the solution of the embodiment of the present application brings a certain improvement in prediction performance under the premise of a small increase in complexity.
  • This embodiment provides a method for predicting image components.
  • a preset number of adjacent reference pixel points are grouped and divided by a first mean point, and then the mean point corresponding to each group is used as a pseudo Combining point, derive the model parameters according to the two fitting points obtained, according to the model parameters, the prediction model corresponding to the image component to be predicted can be obtained, and the prediction model is used to realize the prediction processing of the image component to be predicted to obtain the image component to be predicted Corresponding predicted value; in this way, the robustness of CCLM prediction can be improved, so that the constructed prediction model is more accurate, and the coding and decoding prediction performance of the video image is improved.
  • FIG. 14 shows a schematic diagram of the composition structure of an image component prediction apparatus 140 provided by an embodiment of the present application.
  • the image component prediction device 140 may include: an acquisition unit 1401, a calculation unit 1402, a grouping unit 1403, a determination unit 1404, and a prediction unit 1405, where
  • the acquiring unit 1401 is configured to acquire N adjacent reference pixels corresponding to the image components to be predicted of the encoding block in the video image; wherein, the N adjacent reference pixels are reference adjacent to the encoding block Pixels, N is a preset integer value;
  • the calculation unit 1402 is configured to calculate the average value of the N adjacent reference pixel points to obtain a first average value point
  • the grouping unit 1403 is configured to group the second reference pixel set by a first average point to obtain a first reference pixel subset and a second reference pixel subset;
  • the determining unit 1404 is configured to determine two fitting points based on the first reference pixel subset and the second reference pixel subset;
  • the prediction unit 1405 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 Prediction processing of the image component to be predicted to obtain the predicted value corresponding to the image component to be predicted.
  • the image component prediction device 140 may further include a screening unit 1406,
  • the obtaining unit 1401 is further configured to obtain a first reference pixel set corresponding to the image component to be predicted of the coding block in the video image;
  • the screening unit 1406 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 pixels.
  • the acquiring unit 1401 is specifically configured to acquire reference pixels adjacent to at least one side of the encoding block; wherein, the at least one side includes the left side of the encoding block and/or the The upper side of the coding block; and based on the reference pixels, a first reference pixel set corresponding to the image component to be predicted is formed.
  • the obtaining unit 1401 is specifically configured to obtain reference pixels in a reference row or reference column adjacent to the coding block; wherein the reference row is defined by the upper side of the coding block And the rows adjacent to the upper right side, the reference column is composed of the columns adjacent to the left side and the lower left side of the coding block; and based on the reference pixels, the waiting Predict the first reference pixel set corresponding to the image component.
  • the determining unit 1404 is further 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;
  • the screening unit 1406 is specifically configured to select neighboring reference pixels corresponding to the positions of the pixels to be selected from the first reference pixel set according to the determined positions of the pixels to be selected, and to select the neighboring pixels to be selected.
  • the reference pixels constitute a second reference pixel set; wherein, the second reference pixel set includes N adjacent reference pixels.
  • the obtaining unit 1401 is further configured to obtain the second reference pixel based on the first image component value and the second image component value corresponding to each adjacent reference pixel in the second reference pixel set.
  • the average value of the first image component corresponding to the plurality of first image components and the average value of the second image component corresponding to the plurality of second image components in the pixel set are obtained to obtain the first average point.
  • the image component prediction device 140 may further include a comparing unit 1407, configured to compare the first image component value corresponding to each adjacent reference pixel in the second reference pixel set with the first image component value. Compare the first average values corresponding to the image components; and based on the result of the comparison, if the first image component values corresponding to adjacent reference pixels are less than or equal to the first average values corresponding to the first image components, then the adjacent reference pixels Points into the first reference pixel subset to obtain the first reference pixel subset; if the first image component value corresponding to the adjacent reference pixel is greater than the first mean value corresponding to the first image component, then the phase The adjacent reference pixel points are put into the second reference pixel subset to obtain the second reference pixel subset.
  • a comparing unit 1407 configured to compare the first image component value corresponding to each adjacent reference pixel in the second reference pixel set with the first image component value. Compare the first average values corresponding to the image components; and based on the result of the comparison, if the first image component values corresponding
  • the acquiring unit 1401 is further configured to acquire the first image component values corresponding to each of the four adjacent reference pixels in the second reference pixel set, and obtain the first image component values corresponding to the four first image components through average calculation.
  • the comparison unit 1407 is specifically configured to compare the first image component value corresponding to each adjacent reference pixel in the second reference pixel set with the average value of the first image component; and if the second reference pixel If the first image component value corresponding to one adjacent reference pixel in the set is less than or equal to the mean value of the first image component, then the first reference pixel subset includes one adjacent reference pixel, and the second reference pixel subset Includes 3 adjacent reference pixels; if the first image component value corresponding to 2 adjacent reference pixels in the second reference pixel set is less than or equal to the mean value of the first image component, the first reference pixel subset includes 2 adjacent reference pixels, the second reference pixel subset includes 2 adjacent reference pixels; if there are 3 adjacent reference pixels in the second reference pixel set, the first image component values corresponding to 3 adjacent reference pixels are less than or equal to said The first image component average value, the first reference pixel subset includes 3 adjacent reference pixels, and the second reference pixel subset includes 1 adjacent reference pixel.
  • the obtaining unit 1401 is further configured to obtain the first reference pixel based on the first image component value and the second image component value corresponding to each adjacent reference pixel in the first reference pixel subset.
  • the average value of the first image component corresponding to the multiple first image components and the average value of the second image component corresponding to the multiple second image components in the pixel subset to obtain the second average point, and use the second average point as the first fitting point
  • obtaining the first image component corresponding to the multiple first image components in the second reference pixel subset A mean value of an image component and mean values of second image components corresponding to a plurality of second image components are obtained to obtain a third mean value point, and the third mean value point is used as a second fitting point.
  • the calculation unit 1402 is configured to obtain the first model parameter based on the first fitting point and the second fitting point, by calculating a model with a first preset factor; and based on the The first model parameter and the first mean value point are obtained by using a second preset factor calculation model to obtain the second model parameter.
  • the calculation unit 1402 is further configured to obtain the second model parameter based on the first model parameter and the first fitting point through a second preset factor calculation model.
  • the prediction unit 1405 is specifically configured to perform prediction processing on the image component to be predicted for each pixel in the coding block based on the prediction model to obtain the image component to be predicted for each pixel. Predictive value.
  • a "unit" may be a part of a circuit, a part of a processor, a part of a program, or software, etc., of course, may also be a module, or may be non-modular.
  • the various components in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • 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.
  • the technical solution of this embodiment is essentially or It is said that the part that contributes to the existing technology or all 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 and includes several instructions to enable a computer device (which can A personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • this embodiment provides a computer storage medium that stores an image component prediction program that implements the method described in any one of the foregoing embodiments when the image component prediction program is executed by at least one processor.
  • FIG. 15 shows the specific hardware structure of the image component prediction device 140 provided by the embodiment of the present application, which may include: a network interface 1501, a memory 1502, and a processor 1503:
  • the components are coupled together through the bus system 1504.
  • the bus system 1504 is used to implement connection and communication between these components.
  • the bus system 1504 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the bus system 1504 in FIG. 15.
  • the network interface 1501 is used to receive and send signals in the process of sending and receiving information with other external network elements;
  • the memory 1502 is used to store computer programs that can run on the processor 1503;
  • the processor 1503 is configured to execute: when the computer program is running:
  • N adjacent reference pixels corresponding to the to-be-predicted image components of the encoding block in the video image; wherein, the N adjacent reference pixels are reference pixels adjacent to the encoding block, and N is a preset Integer value
  • the model parameters are determined, and the prediction model corresponding to the image component to be predicted is obtained according to the model parameters; wherein, the prediction model is used to realize the prediction processing of the image component to be predicted, To obtain the predicted value corresponding to the image component to be predicted.
  • the memory 1502 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Synchronous Link Dynamic Random Access Memory
  • Synchlink DRAM Synchronous Link Dynamic Random Access Memory
  • DRRAM Direct Rambus RAM
  • the processor 1503 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the foregoing method can be completed by hardware integrated logic circuits in the processor 1503 or instructions in the form of software.
  • the aforementioned processor 1503 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory 1502, and the processor 1503 reads the information in the memory 1502, and completes the steps of the foregoing method in combination with its hardware.
  • the embodiments described herein can be implemented by hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Equipment (DSP Device, DSPD), programmable Logic device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, and others for performing the functions described in this application Electronic unit or its combination.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device Digital Signal Processing Equipment
  • PLD programmable Logic Device
  • PLD Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the technology described herein can be implemented through modules (such as procedures, functions, etc.) that perform the functions described herein.
  • the software codes can be stored in the memory and executed by the processor.
  • the memory can be implemented in the processor or external to the processor.
  • the processor 1503 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
  • FIG. 16 shows a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application.
  • the encoder 160 may at least include the image component prediction device 140 described in any of the foregoing embodiments.
  • FIG. 17 shows a schematic diagram of the composition structure of a decoder provided by an embodiment of the present application.
  • the decoder 170 may at least include the image component prediction device 140 described in any of the foregoing embodiments.
  • N adjacent reference pixels corresponding to the image components to be predicted of the encoding block in the video image the N adjacent reference pixels are reference pixels adjacent to the encoding block, and N Is a preset integer value; the average value of the N adjacent reference pixels is calculated to obtain the first average value point; then the second reference pixel set is grouped by the first average value point to obtain the first reference pixel subset and the first reference pixel subset Two reference pixel subsets, and based on the first reference pixel subset and the second reference pixel subset, two fitting points are determined; finally, the model parameters are determined based on the two fitting points, and the corresponding image components to be predicted are obtained according to the model parameters Prediction model to obtain the predicted value corresponding to the image component to be predicted; in this way, since the first average point is obtained by averaging a preset number of adjacent reference pixel points in the second reference pixel set, the first average point will A preset number of adjacent reference pixels are grouped and divided, and then two fitting points for

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种图像分量预测方法、装置及计算机存储介质,该方法包括:获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点(S801),N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;计算所述N个相邻参考像素点的均值,得到第一均值点(S802);通过第一均值点对第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集(S803);基于第一参考像素子集和第二参考像素子集,确定两个拟合点(S804);基于两个拟合点确定模型参数,根据所述模型参数得到待预测图像分量对应的预测模型;其中,所述预测模型用于实现对待预测图像分量的预测处理,以得到所述待预测图像分量对应的预测值(S805)。

Description

图像分量预测方法、装置及计算机存储介质 技术领域
本申请实施例涉及视频编解码技术领域,尤其涉及一种图像分量预测方法、装置及计算机存储介质。
背景技术
随着人们对视频显示质量要求的提高,高清和超高清视频等新视频应用形式应运而生。H.265/高效率视频编码(High Efficiency Video Coding,HEVC)已经无法满足视频应用迅速发展的需求,联合视频研究组(Joint Video Exploration Team,JVET)提出了下一代视频编码标准H.266/多功能视频编码(Versatile Video Coding,VVC),其相应的测试模型为VVC的参考软件测试平台(VVC Test Model,VTM)。
在VTM中,目前已经集成了一种基于预测模型的图像分量预测方法,通过该预测模型可以由当前编码块(Coding Block,CB)的亮度分量预测色度分量。然而,在构建预测模型时,由于用于模型参数推导的相邻参考像素点选取不合理,导致预测模型不准确,降低了视频图像的编解码预测性能。
发明内容
本申请实施例提供一种图像分量预测方法、装置及计算机存储介质,通过对模型参数推导所使用的拟合点进行优化,可以提高预测的鲁棒性,使得构建的预测模型更准确,还能够提升视频图像的编解码预测性能。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种图像分量预测方法,所述方法包括:
获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点;其中,所述N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;
计算所述N个相邻参考像素点的均值,得到第一均值点;
通过所述第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集;
基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点;
基于所述两个拟合点,确定模型参数,根据所述模型参数得到所述待预测图像分量对应的预测模型;其中,所述预测模型用于实现对所述待预测图像分量的预测处理,以得到所述待预测图像分量对应的预测值。
第二方面,本申请实施例提供了一种图像分量预测装置,所述图像分量预测装置包括:获取单元、计算单元、分组单元、确定单元和预测单元,其中,
所述获取单元,配置为获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点;其中,所述N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;
所述计算单元,配置为计算所述N个相邻参考像素点的均值,得到第一均值点;
所述分组单元,配置为通过所述第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集;
所述确定单元,配置为基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点;
所述预测单元,配置为基于所述两个拟合点,确定模型参数,根据所述模型参数得到所述待预测图像分量对应的预测模型;其中,所述预测模型用于实现对所述待预测图像分量的预测处理,以得到所述待预测图像分量对应的预测值。
第三方面,本申请实施例提供了一种图像分量预测装置,所述图像分量预测装置包括:存储器和处理器;
所述存储器,用于存储能够在所述处理器上运行的计算机程序;
所述处理器,用于在运行所述计算机程序时,执行如第一方面中所述的方法。
第四方面,本申请实施例提供了一种计算机存储介质,所述计算机存储介质存储有图像分量预测程序,所述图像分量预测程序被至少一个处理器执行时实现如第一方面中所述的方法。
本申请实施例提供了一种图像分量预测方法、装置及计算机存储介质,首先获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点,该N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;计算所述N个相邻参考像素点的均值,得到第一均值点;然后通过第一均值点对第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,并基于第一参考像素子集和第二参考像素子集,确定两个拟合点;再基于两个拟合点确定模型参数,根据模型参数得到待预测图像分量对应的预测模型,以得到待预测图像分量对应的预测值;这样,由于第一均值点是对第二参考像素集合中预设数量的相邻参考像素点进行求均值得到的,根据第一均值点将预设数量的相邻参考像素点进行分组划分,再确定推导模型参数的两个拟合点,可以提高预测的鲁棒性;也就是说,通过对模型参数推导所使用的拟合点进行优化,从而使得构建的预测模型更准确,而且提升了视频图像的编解码预测性能。
·附图说明
图1为相关技术方案提供的一种有效相邻区域的分布示意图;
图2为相关技术方案提供的一种三种模式下选择区域的分布示意图;
图3为相关技术方案提供的一种模型参数推导传统方案的流程示意图;
图4为相关技术方案提供的一种传统方案下预测模型的示意图;
图5为相关技术方案提供的另一种传统方案下预测模型的示意图;
图6为本申请实施例提供的一种视频编码系统的组成框图示意图;
图7为本申请实施例提供的一种视频解码系统的组成框图示意图;
图8为本申请实施例提供的一种图像分量预测方法的流程示意图;
图9A为本申请实施例提供的一种INTRA_LT_CCLM模式下相邻参考像素点选取的结构示意图;
图9B为本申请实施例提供的一种INTRA_L_CCLM模式下相邻参考像素点选取的结构示意图;
图9C为本申请实施例提供的一种INTRA_T_CCLM模式下相邻参考像素点选取的结构示意图;
图10为本申请实施例提供的一种模型参数推导方案的流程示意图;
图11为本申请实施例提供的一种本申请方案与传统方案下预测模型的对比示意图;
图12为本申请实施例提供的另一种本申请方案与传统方案下预测模型的对比示意图;
图13为本申请实施例提供的又一种本申请方案与传统方案下预测模型的对比示意 图;
图14为本申请实施例提供的一种图像分量预测装置的组成结构示意图;
图15为本申请实施例提供的一种图像分量预测装置的具体硬件结构示意图;
图16为本申请实施例提供的一种编码器的组成结构示意图;
图17为本申请实施例提供的一种解码器的组成结构示意图。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
在视频图像中,一般采用第一图像分量、第二图像分量和第三图像分量来表征编码块;其中,这三个图像分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。
在本申请实施例中,第一图像分量可以为亮度分量,第二图像分量可以为蓝色色度分量,第三图像分量可以为红色色度分量,但是本申请实施例不作具体限定。
在当前的视频图像或者视频编解码过程中,对于跨分量预测技术,主要包括跨分量线性模型预测(Cross-component Linear Model Prediction,CCLM)模式和多方向线性模型预测(Multi-Directional Linear Model Prediction,MDLM)模式,无论是根据CCLM模式推导的模型参数,还是根据MDLM模式推导的模型参数,其对应的预测模型均可以实现第一图像分量到第二图像分量、第二图像分量到第一图像分量、第一图像分量到第三图像分量、第三图像分量到第一图像分量、第二图像分量到第三图像分量、或者第三图像分量到第二图像分量等图像分量间的预测。
以第一图像分量到第二图像分量的预测为例,为了减少第一图像分量与第二图像分量之间的冗余,在VTM中使用CCLM模式,此时第一图像分量和第二图像分量为同一编码块的,即根据同一编码块的第一图像分量重建值来构造第二图像分量的预测值,如式(1)所示,
Pred C[i,j]=α·Rec L[i,j]+β  (1)
其中,i,j表示编码块中像素点的位置坐标,i表示水平方向,j表示竖直方向,Pred C[i,j]表示编码块中位置坐标为[i,j]的像素点对应的第二图像分量预测值,Pred L[i,j]表示同一编码块中(经过下采样的)位置坐标为[i,j]的像素点对应的第一图像分量重建值,α和β表示模型参数。
对于编码块而言,其相邻区域可以包括左侧相邻区域、上侧相邻区域、左下侧相邻区域和右上侧相邻区域。在VVC中,可以包括三种跨分量线性模型预测模式,分别为:左侧及上侧相邻的帧内CCLM模式(可以用INTRA_LT_CCLM模式表示)、左侧及左下侧相邻的帧内CCLM模式(可以用INTRA_L_CCLM模式表示)和上侧及右上侧相邻的帧内CCLM模式(可以用INTRA_T_CCLM模式表示)。在这三种模式中,每种模式都可以选取预设数量(比如4个)的相邻参考像素点用于模型参数α和β的推导,而这三种模式的最大区别在于用于推导模型参数α和β的相邻参考像素点对应的选择区域是不同的。
具体地,针对第二图像分量对应的编码块尺寸为W×H,假定相邻参考像素点对应的上侧选择区域为W',相邻参考像素点对应的左侧选择区域为H';这样,
对于INTRA_LT_CCLM模式,相邻参考像素点可以在上侧相邻区域和左侧相邻区 域进行选取,即W'=W,H'=H;
对于INTRA_L_CCLM模式,相邻参考像素点可以在左侧相邻区域和左下侧相邻区域进行选取,即H'=W+H,并设置W'=0;
对于INTRA_T_CCLM模式,相邻参考像素点可以在上侧相邻区域和右上侧相邻区域进行选取,即W'=W+H,并设置H'=0。
需要注意的是,在VVC最新参考软件VTM5.0中,对于右上侧相邻区域内最多只存储了W范围的像素点,对于左下侧相邻区域内最多只存储了H范围的像素点;因此,虽然INTRA_L_CCLM模式和INTRA_T_CCLM模式的选择区域的范围定义为W+H,但是在实际应用中,INTRA_L_CCLM模式的选择区域将限制在H+H之内,INTRA_T_CCLM模式的选择区域将限制在W+W之内;这样,
对于INTRA_L_CCLM模式,相邻参考像素点可以在左侧相邻区域和左下侧相邻区域进行选取,H'=min{W+H,H+H};
对于INTRA_T_CCLM模式,相邻参考像素点可以在上侧相邻区域和右上侧相邻区域进行选取,W'=min{W+H,W+W}。
参见图1,其示出了相关技术方案提供的一种有效相邻区域的分布示意图。在图1中,左侧相邻区域、左下侧相邻区域、上侧相邻区域和右上侧相邻区域都是有效的。在图1的基础上,针对三种模式的选择区域如图2所示。其中,在图2中,(a)表示了INTRA_LT_CCLM模式的选择区域,包括了左侧相邻区域和上侧相邻区域;(b)表示了INTRA_L_CCLM模式的选择区域,包括了左侧相邻区域和左下侧相邻区域;(c)表示了INTRA_T_CCLM模式的选择区域,包括了上侧相邻区域和右上侧相邻区域。这样,在确定出三种模式的选择区域之后,可以在选择区域内进行用于模型参数推导的参考点的选取。如此选取到的参考点可以称为相邻参考像素点,通常相邻参考像素点的个数最多为4个;而且对于一个尺寸确定的W×H的编码块,其相邻参考像素点的位置一般是确定的。
在获取到预设数量的相邻参考像素点之后,目前是按照图3所示的模型参数推导传统方案的流程示意图进行模型参数的计算。根据图3所示的流程,假定预设数量为4个,该流程可以包括:
S301:获取4个相邻参考像素点;
S302:经过4次比较获得亮度分量较大值的两个相邻参考像素点和较小值的两个相邻参考像素点;
S303:计算亮度分量较大值的两个点对应的均值点和亮度分量较小值的两个点对应的均值点;
S304:将两个均值点作为两个拟合点推导模型参数;
S305:根据构建的预测模型进行色度分量的预测处理。
需要说明的是,利用“两点确定一条直线”原则来构建预测模型;这里的两点可以称为拟合点。目前的传统方案中,首先在获取4个相邻参考像素点之后,经过4次比较获得亮度分量较大值的两个相邻参考像素点和较小值的两个相邻参考像素点;然后根据亮度分量较大值的两个相邻参考像素点,求取一均值点(可以用mean max表示),根据亮度分量较小值的两个相邻参考像素点,求取另一均值点(可以用mean min表示),得到两个均值点mean max和mean min;再将mean max和mean min作为两个拟合点,以推导出模型参数(可以用α和β表示),最后根据模型参数构建出预测模型,并根据该预测模型进行色度分量的预测处理。
在推导模型参数时,以有4个相邻参考像素点为例,目前会使用2个较大的相邻参 考像素点所得到的均值和2个较小的相邻参考像素点所得到的均值作为两个拟合点来推导模型参数。在这4个相邻参考像素点呈较均匀分布时,如图4所示的传统方案下预测模型的示意图;其中,坐标轴的横坐标表示亮度值(可以用Luma表示),坐标轴的纵坐标表示色度值(可以用Chroma表示),4个黑色圆点为4个相邻参考像素点,2个灰色圆点分别为这4个相邻参考像素点中2个较大的相邻参考像素点对应的均值点和2个较小的相邻参考像素点对应的均值点(即两个拟合点),灰色斜线表示根据这两个拟合点所构建的预测模型;灰色点线为这4个相邻参考像素点使用最小均方算法(Least Mean Square,LMS)拟合出的预测模型;从图4中可以看出,灰色斜线与灰色点线比较接近,即传统方案所构建的预测模型能够比较准确地拟合出这4个相邻参考像素点的分布情况。
然而在这4个相邻参考像素点呈非均匀分布时,传统方案所构建的预测模型并不能够准确地拟合出这4个相邻参考像素点的分布情况,如图5所示的另一种传统方案下预测模型的示意图;从图5中可以看出,灰色斜线与灰色点线具有一定偏差,即传统方案所构建的预测模型与这4个相邻参考像素点的分布情况无法很好地拟合。也就是说,目前的传统方案在模型参数推导过程中缺乏鲁棒性,对于4个相邻参考像素点处于不均匀分布的情况下无法很好地拟合。
为了提高CCLM预测的鲁棒性,同时提高编解码性能,本申请实施例提供了一种图像分量预测方法,获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点,该N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;计算所述N个相邻参考像素点的均值,得到第一均值点;通过第一均值点对第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,并基于第一参考像素子集和第二参考像素子集,确定两个拟合点;再基于两个拟合点确定模型参数,根据模型参数得到待预测图像分量对应的预测模型,以得到待预测图像分量对应的预测值;这样,由于第一均值点是对第二参考像素集合中预设数量的相邻参考像素点进行求均值得到的,根据第一均值点将预设数量的相邻参考像素点进行分组划分,再确定推导模型参数的两个拟合点,可以提高预测的鲁棒性;也就是说,通过对模型参数推导所使用的拟合点进行优化,从而使得构建的预测模型更准确,而且提升了视频图像的编解码预测性能。
下面将结合附图对本申请各实施例进行详细说明。
参见图6,其示出了本申请实施例提供的一种视频编码系统的组成框图示例;如图6所示,该视频编码系统600包括变换与量化单元601、帧内估计单元602、帧内预测单元603、运动补偿单元604、运动估计单元605、反变换与反量化单元606、滤波器控制分析单元607、滤波单元608、编码单元609和解码图像缓存单元610等,其中,滤波单元608可以实现去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波,编码单元609可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmatic Coding,CABAC)。针对输入的原始视频信号,通过编码树块(Coding Tree Unit,CTU)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元601对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元602和帧内预测单元603是用于对该视频编码块进行帧内预测;明确地说,帧内估计单元602和帧内预测单元603用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元604和运动估计单元605用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元605执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由运动补偿单元604基于由运动估计单元605所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元603还用于将所选择的帧内预测 数据提供到编码单元609,而且运动估计单元605将所计算确定的运动向量数据也发送到编码单元609;此外,反变换与反量化单元606是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元607和滤波单元608去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元610的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元609是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;而解码图像缓存单元610是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元610中。
参见图7,其示出了本申请实施例提供的一种视频解码系统的组成框图示例;如图7所示,该视频解码系统700包括解码单元701、反变换与反量化单元702、帧内预测单元703、运动补偿单元704、滤波单元705和解码图像缓存单元706等,其中,解码单元701可以实现头信息解码以及CABAC解码,滤波单元705可以实现去方块滤波以及SAO滤波。输入的视频信号经过图6的编码处理之后,输出该视频信号的码流;该码流输入视频解码系统700中,首先经过解码单元701,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元702进行处理,以便在像素域中产生残差块;帧内预测单元703可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元704是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元702的残差块与由帧内预测单元703或运动补偿单元704产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元705以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元706中,解码图像缓存单元706存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
本申请实施例中的图像分量预测方法,主要应用在如图6所示的帧内预测单元603部分和如图7所示的帧内预测单元703部分,具体应用于帧内预测中的CCLM预测部分。也就是说,本申请实施例中的图像分量预测方法,既可以应用于视频编码系统,也可以应用于视频解码系统,甚至还可以同时应用于视频编码系统和视频解码系统,但是本申请实施例不作具体限定。当该方法应用于帧内预测单元603部分时,“视频图像中编码块”具体是指帧内预测中的当前编码块;当该方法应用于帧内预测单元703部分时,“视频图像中编码块”具体是指帧内预测中的当前解码块。
基于上述图6或者图7的应用场景示例,参见图8,其示出了本申请实施例提供的一种图像分量预测方法的流程示意图。如图8所示,该方法可以包括:
S801:获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点;
需要说明的是,这里N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值,也可以称为预设数量。其中,视频图像可以划分为多个编码块,每个编码块可以包括第一图像分量、第二图像分量和第三图像分量,而本申请实施例中的编码块为视频图像中待进行编码处理的当前块。当需要通过预测模型对第一图像分量进行预测时,待预测图像分量为第一图像分量;当需要通过预测模型对第二图像分量进行预测时,待预测图像分量为第二图像分量;当需要通过预测模型对第三图像分量进行预测时,待预测图像分量为第三图像分量。
这样,可以从与该编码块相邻的参考像素点中获取预设数量的相邻参考像素点,以 确定用于模型参数推导的拟合点。另外,N的取值一般可以为4,但是本申请实施例不作具体限定。
在一些实施例中,对于S801来说,所述获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点,可以包括:
S801-1:获取视频图像中编码块的待预测图像分量对应的第一参考像素集合;
需要说明的是,当左侧相邻区域、左下侧相邻区域、上侧相邻区域和右上侧相邻区域都是有效区域时,对于INTRA_LT_CCLM模式,第一参考像素集合是由编码块的左侧相邻区域和上侧相邻区域中的相邻参考像素点组成的,如图2中(a)所示;对于INTRA_L_CCLM模式,第一参考像素集合是由编码块的左侧相邻区域和左下侧相邻区域中的相邻参考像素点组成的,如图2中(b)所示;对于INTRA_T_CCLM模式,第一参考像素集合是由编码块的上侧相邻区域和右上侧相邻区域中的相邻参考像素点组成的,如图2中(c)所示。
在一些实施例中,可选地,对于S801-1来说,所述获取视频图像中编码块的待预测图像分量对应的第一参考像素集合,可以包括:
获取与所述编码块至少一个边相邻的参考像素点;其中,所述至少一个边包括所述编码块的左侧边和/或所述编码块的上侧边;
基于所述参考像素点,组成所述待预测图像分量对应的第一参考像素集合。
需要说明的是,编码块的至少一个边可以是指编码块的上侧边,也可以是指编码块的左侧边,甚至还可以是指编码块的上侧边和左侧边,本申请实施例不作具体限定。
这样,对于INTRA_LT_CCLM模式,当左侧相邻区域和上侧相邻区域全部为有效区域时,这时候第一参考像素集合可以是由与编码块的左侧边相邻的参考像素点和与编码块的上侧边相邻的参考像素点组成的,当左侧相邻区域为有效区域、而上侧相邻区域为无效区域时,这时候第一参考像素集合可以是由与编码块的左侧边相邻的参考像素点组成的;当左侧相邻区域为无效区域、而上侧相邻区域为有效区域时,这时候第一参考像素集合可以是由与编码块的上侧边相邻的参考像素点组成的。
在一些实施例中,可选地,对于S801-1来说,所述获取视频图像中编码块的待预测图像分量对应的第一参考像素集合,可以包括:
获取与所述编码块相邻的参考行或者参考列中的参考像素点;其中,所述参考行是由所述编码块的上侧边以及右上侧边所相邻的行组成的,所述参考列是由所述编码块的左侧边以及左下侧边所相邻的列组成的;
基于所述参考像素点,组成所述待预测图像分量对应的第一参考像素集合。
需要说明的是,与编码块相邻的参考行或参考列可以是指与编码块上侧边相邻的参考行,也可以是指与编码块左侧边相邻的参考列,甚至还可以是指与编码块其他边相邻的参考行或参考列,本申请实施例不作具体限定。为了方便描述,在本申请实施例中,编码块相邻的参考行将以上侧边相邻的参考行为例进行描述,编码块相邻的参考列将以左侧边相邻的参考列为例进行描述。
其中,与编码块相邻的参考行中的参考像素点可以包括与上侧边以及右上侧边相邻的参考像素点(也称之为上侧边以及右上侧边所对应的相邻参考像素点),其中,上侧边表示编码块的上侧边,右上侧边表示编码块上侧边向右水平扩展出的与当前编码块高度相同的边长;与编码块相邻的参考列中的参考像素点还可以包括与左侧边以及左下侧边相邻的参考像素点(也称之为左侧边以及左下侧边所对应的相邻参考像素点),其中,左侧边表示编码块的左侧边,左下侧边表示编码块左侧边向下垂直扩展出的与当前解码块宽度相同的边长;但是本申请实施例也不作具体限定。
这样,对于INTRA_L_CCLM模式,当左侧相邻区域和左下侧相邻区域为有效区域 时,这时候第一参考像素集合可以是由与编码块相邻的参考列中的参考像素点组成的;对于INTRA_T_CCLM模式,当上侧相邻区域和右上侧相邻区域为有效区域时,这时候第一参考像素集合可以是由与编码块相邻的参考行中的参考像素点组成的。
S801-2:对所述第一参考像素集合进行筛选处理,得到第二参考像素集合;其中,所述第二参考像素集合包括有N个相邻参考像素点;
需要说明的是,在第一参数像素集合中,可能会存在部分不重要的参考像素点(比如这些参考像素点的相关性较差)或者部分异常的参考像素点,为了保证预测模型的准确性,需要将这些参考像素点剔除掉,从而得到了第二参考像素集合;其中,第二参考像素集合所包含的有效像素点个数,实际应用中,通常选取为4个。
在一些实施例中,对于S801-2来说,所述对所述第一参考像素集合进行筛选处理,得到第二参考像素集合,可以包括:
基于所述第一参考像素集合中每个相邻参考像素点对应的像素位置和/或图像分量强度,确定待选择像素点位置;
根据确定的待选择像素点位置,从所述第一参考像素集合中选取与所述待选择像素点位置对应的相邻参考像素点,将选取得到的相邻参考像素点组成第二参考像素集合;其中,所述第二参考像素集合包括有预设数量的相邻参考像素点。
需要说明的是,图像分量强度可以用图像分量值来表示,比如亮度值、色度值等;这里,图像分量值越大,表明了图像分量强度越高。这样,针对第一参考像素集合的筛选,可以是根据待选择参考像素点的位置来进行筛选的,也可以是根据图像分量强度(比如亮度值、色度值等)来进行筛选的,从而将筛选出的待选择参考像素点组成第二参考像素集合。下面将以待选择参考像素点位置为例进行描述。
示例性地,假定上侧选择区域W'内参考像素点的位置为S[0,-1]、…、S[W'-1,-1],左侧选择区域H'内参考像素点的位置为S[-1,0]、…、S[-1,H'-1];这样最多选取4个相邻参考像素点的筛选方式如下:
对于INTRA_LT_CCLM模式,当上侧相邻区域和左侧相邻区域都有效时,此时在上侧选择区域W'内可以筛选出2个待选择相邻参考像素点,其对应位置分别为S[W'/4,-1]和S[3W'/4,-1];在左侧选择区域H'内可以筛选出2个待选择相邻参考像素点,其对应位置分别S[-1,H'/4]和S[-1,3H'/4];将这4个待选择相邻参考像素点组成第二参考像素集合,如图9A所示。在图9A中,编码块的左侧相邻区域和上侧相邻区域均是有效的,而且为了保持亮度分量和色度分量具有相同的分辨率,还需要针对亮度分量进行下采样处理,使得经过下采样的亮度分量与色度分量具有相同的分辨率。
对于INTRA_L_CCLM模式,当只有左侧相邻区域和左下侧相邻区域有效时,此时在左侧选择区域H'内可以筛选出4个待选择相邻参考像素点,其对应位置分别为S[-1,H'/8]、S[-1,3H'/8]、S[-1,5H'/8]和S[-1,7H'/8];将这4个待选择相邻参考像素点组成第二参考像素集合,如图9B所示。在图9B中,编码块的左侧相邻区域和左下侧相邻区域均是有效的,而且为了保持亮度分量和色度分量具有相同的分辨率,仍需要针对亮度分量进行下采样处理,使得经过下采样的亮度分量与色度分量具有相同的分辨率。
对于INTRA_T_CCLM模式,当只有上侧相邻区域和右上侧相邻区域有效时,此时在上侧选择区域W'内可以筛选出4个待选择相邻参考像素点,其对应位置分别为S[W'/8,-1]、S[3W'/8,-1]、S[5W'/8,-1]和S[7W'/8,-1];将这4个待选择相邻参考像素点组成第二参考像素集合,如图9C所示。在图9C中,编码块的上侧相邻区域和右上侧相邻区域均是有效的,而且为了保持亮度分量和色度分量具有相同的分辨率,仍需要 针对亮度分量进行下采样处理,使得经过下采样的亮度分量与色度分量具有相同的分辨率。
这样,通过对第一参考像素集合进行筛选,可以得到第二参考像素集合,而且第二参考像素集合中一般包括有4个相邻参考像素点;在获取到第二参考像素集合之后,可以对第二参考像素集合进行分组划分,以使得模型参数推导中所使用的两个拟合点更准确,提高了预测的鲁棒性。
S802:计算所述N个相邻参考像素点的均值,得到第一均值点;
需要说明的是,对于第一均值点,可以是通过对第二参考像素集合中预设数量的相邻参考像素点进行求均值得到的。因此,在一些实施例中,对于S802来说,该步骤可以包括:
基于所述第二参考像素集合中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得第一图像分量对应的第一均值和第二图像分量对应的第二均值,得到所述第一均值点。
也就是说,对第二参考像素集合中每个相邻参考像素点对应的第一图像分量值进行均值计算,得到多个第一图像分量对应的第一图像分量均值,可以称为第一图像分量的第一均值(可以用mean L表示);对第二参考像素集合中每个相邻参考像素点对应的第二图像分量值进行均值计算,得到多个第二图像分量对应的第二图像分量均值,可以称为第二图像分量的第一均值(可以用mean C表示),这里,第一均值点可以用(mean L,mean C)表示;也就是说,第一均值点的第一图像分量为mean L,第一均值点的第二图像分量为mean C
S803:通过第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集;
需要说明的是,为了提高预测的鲁棒性,这时候可以通过第一均值点对第二参考像素集合进行分组处理,比如将其划分为左边一类(用Left类表示)和右边一类(用Right类表示),然后使用Left类和Right类各自的均值点作为拟合点来推导模型参数;其中,Left类即为第一参考像素子集,Right类即为第二参考像素子集。
进一步地,在一些实施例中,对于S803来说,所述通过第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,可以包括:
S803-1:将所述第二参考像素集合中每个相邻参考像素点对应的第一图像分量值与第一图像分量对应的第一均值进行比较;
S803-2:基于比较的结果,若相邻参考像素点对应的第一图像分量值小于或等于第一图像分量对应的第一均值,则将所述相邻参考像素点放入第一参考像素子集中,以得到所述第一参考像素子集;
S803-3:若相邻参考像素点对应的第一图像分量值大于第一图像分量对应的第一均值,则将所述相邻参考像素点放入第二参考像素子集中,以得到所述第二参考像素子集。
也就是说,在获取到第一图像分量对应的第一均值mean L之后,可以将第二参考像素集合中每个相邻参考像素点对应的第一图像分量值与mean L进行比较;当相邻参考像素点对应的第一图像分量值小于或等于mean L时,那么可以将该相邻参考像素点放入到第一参考像素子集中,以得到第一参考像素子集;当相邻参考像素点对应的第一图像分量值大于mean L时,那么可以将该相邻参考像素点放入到第二参考像素子集中,以得到第二参考像素子集。
S804:基于所述第一参考像素子集和第二参考像素子集,确定两个拟合点;
需要说明的是,两个拟合点包括第一拟合点和第二拟合点,这里,根据第一参考像 素子集,可以得到第一拟合点;根据第二参考像素子集,可以得到第二拟合点。其中,第一拟合点可以是对第一参考像素子集中所有相邻参考像素点进行求均值得到,也可以是对第一参考像素子集中部分相邻参考像素点进行求均值得到,还可以是从第一参考像素子集中选取中间的相邻参考像素点作为该第一拟合点,甚至还可以是从第一参考像素子集中任意选取一个相邻参考像素点作为该第一拟合点,本申请实施例不作具体限定;同理,第二拟合点可以是对第二参考像素子集中所有相邻参考像素点进行求均值得到,也可以是从第二参考像素子集中选取中间的相邻参考像素点作为该第一拟合点,还可以是从第二参考像素子集中任意选取一个相邻参考像素点作为该第一拟合点,本申请实施例也不作具体限定。如无特别说明,本申请实施例中,第一拟合点是对第一参考像素子集中所有相邻参考像素点进行求均值得到的,第二拟合点是对第二参考像素子集中所有相邻参考像素点进行求均值得到的。
在一些实施例中,可选地,对于S804来说,所述基于所述第一参考像素子集和第二参考像素子集,确定两个拟合点,可以包括:
S804a-1:从所述第一参考像素子集中选取部分相邻参考像素点,对所述部分相邻参考像素点进行均值计算,将计算得到的均值点作为所述第一拟合点;
S804a-2:从所述第二参考像素子集中选取部分相邻参考像素点,对所述部分相邻参考像素点进行均值计算,将计算得到的均值点作为所述第二拟合点。
在一些实施例中,可选地,对于S804来说,所述基于所述第一参考像素子集和第二参考像素子集,确定两个拟合点,包括:
S804b-1:从所述第一参考像素子集中选取其中一个相邻参考像素点作为所述第一拟合点;
S804b-2:从所述第一参考像素子集中选取其中一个相邻参考像素点作为所述第二拟合点。
在一些实施例中,可选地,对于S804来说,所述基于所述第一参考像素子集和第二参考像素子集,确定两个拟合点,可以包括:
S804c-1:基于所述第一参考像素子集中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得第一图像分量对应的第二均值和第二图像分量对应的第二均值,得到第二均值点,将所述第二均值点作为第一拟合点;
S804c-2:基于所述第二参考像素子集中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得第一图像分量对应的第三均值和第二图像分量对应的第三均值,得到第三均值点,将所述第三均值点作为第二拟合点。
也就是说,对第一参考像素子集中每个相邻参考像素点对应的第一图像分量值进行均值计算,得到多个第一图像分量对应的第一图像分量均值,可以称为第一图像分量的第二均值(可以用mean LeftL表示);对第一参考像素子集中每个相邻参考像素点对应的第二图像分量值进行均值计算,得到多个第二图像分量对应的第二图像分量均值,可以称为第二图像分量的第二均值(可以用mean LeftC表示),这里,第二均值点可以用(mean LeftL,mean LeftC)表示,即第一拟合点可以用(mean LeftL,mean LeftC)表示;也就是说,第一拟合点的第一图像分量为mean LeftL,第一拟合点的第二图像分量为mean LeftC
对第二参考像素子集中每个相邻参考像素点对应的第一图像分量值进行均值计算,得到多个第一图像分量对应的第一图像分量均值,可以称为第一图像分量的第三均值(可以用mean RightL表示);对第二参考像素子集中每个相邻参考像素点对应的第二图像分量值进行均值计算,得到多个第二图像分量对应的第二图像分量均值,可以称为第二图像分量的第三均值(可以用mean RightC表示),这里,第三均值点可以用(mean RightL, mean RightC)表示,即第二拟合点可以用(mean RightL,mean RightC)表示;也就是说,第二拟合点的第一图像分量为mean RightL,第二拟合点的第二图像分量为mean RightC
S805:基于所述两个拟合点,确定模型参数,根据所述模型参数得到所述待预测图像分量对应的预测模型;其中,所述预测模型用于实现对待预测图像分量的预测处理,以得到待预测图像分量对应的预测值;
需要说明的是,在获取到第一拟合点和第二拟合点之后,可以根据第一拟合点和第二拟合点确定出模型参数;这里,模型参数包括第一模型参数(可以用α表示)和第二模型参数(可以用β表示)。假定待预测图像分量为色度分量,根据模型参数α和β,可以得到如式(1)所示的色度分量对应的预测模型。
在一些实施例中,对于S805来说,所述模型参数包括第一模型参数和第二模型参数,所述基于所述两个拟合点,确定模型参数,可以包括:
S805-1:基于所述第一拟合点和所述第二拟合点,通过第一预设因子计算模型获得所述第一模型参数;
S805-2:基于所述第一模型参数以及所述第一均值点,通过第二预设因子计算模型获得所述第二模型参数;
进一步地,在一些实施例中,在S805-1之后,该方法还可以包括:
S805-3:基于所述第一模型参数以及所述第一拟合点,通过第二预设因子计算模型获得所述第二模型参数。
需要说明的是,在获取到第一拟合点(mean LeftL,mean LeftC)和第二拟合点(mean RightL,mean RightC)之后,可以根据第一预设因子计算模型来计算第一模型参数α,如式(2)所示,
Figure PCTCN2019092858-appb-000001
在获取到第一模型参数α之后,可以根据结合第一均值点(mean L,mean C)以及第二预设因子计算模型来计算第二模型参数β,如式(3)所示,
β=mean C-α×mean L  (3)
除此之外,在获取到第一模型参数α之后,还可以根据结合第一拟合点(mean LeftL,mean LeftC)以及第二预设因子计算模型来计算第二模型参数β,如式(4)所示,
β=mean LeftC-α×mean LeftL  (4)
这样,在得到第一模型参数α和第一模型参数β之后,可以构建预设模型。假定待预测图像分量为色度分量,这样可以根据模型参数(α和β)得到色度分量对应的预测模型,如式(1)所示;然后利用该预测模型对色度分量进行预测处理,以得到色度分量对应的预测值。
进一步地,在一些实施例中,在S805之后,该方法还可以包括:
基于所述预测模型对所述编码块中每个像素点的待预测图像分量进行预测处理,得到每个像素点的待预测图像分量对应的预测值。
需要说明的是,在通过第一均值点对第二参考像素集合进行分组之后,可以得到第一参考像素子集和第二参考像素子集;然后根据第一参考像素子集确定一个拟合点,根据第二参考像素子集确定另一个拟合点;这样,根据“两点确定一条直线”原则,可以确定出该直线的斜率(即第一模型参数)和该直线的截距(即第二模型参数),从而根据这两个模型参数就可以得到待预测图像分量对应的预测模型,以得到编码块中每个像素点的待预测图像分量对应的预测值。举例来说,假定待预测图像分量为色度分量,根 据第一模型参数α和第二模型参数β,可以得到如式(1)所示的色度分量对应的预测模型;然后利用式(1)所示的预测模型对编码块中每个像素点的色度分量进行预测处理,如此可以得到每个像素点的色度分量对应的预测值。
本实施例提供了一种图像分量预测方法,通过获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点,该N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;计算所述N个相邻参考像素点的均值,得到第一均值点;再通过第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,该第一均值点是对第二参考像素集合中预设数量的相邻参考像素点进行均值计算得到的;基于第一参考像素子集和第二参考像素子集,确定两个拟合点;基于这两个拟合点,确定模型参数,根据模型参数得到待预测图像分量对应的预测模型,该预测模型用于实现对待预测图像分量的预测处理,以得到待预测图像分量对应的预测值;这样,由于第一均值点是对第二参考像素集合中预设数量的相邻参考像素点进行求均值得到的,根据第一均值点将预设数量的相邻参考像素点进行分组划分,再确定推导模型参数的两个拟合点,可以提高预测的鲁棒性;也就是说,通过对模型参数推导所使用的拟合点进行优化,从而使得构建的预测模型更准确,而且提升了视频图像的编解码预测性能。
本申请的另一实施例中,实际应用中,由于模型参数推导所使用的相邻参考像素点一般为4个;也就是说,预设数量可以为4个。下面将以预设数量等于4为例进行详细描述。
如图3所示的流程,在获取到4个相邻参考像素点之后,可以通过4次比较和求均值点的方式来确定两个拟合点,从而利用“两点确定一条直线”原则来推导出模型参数;这样根据模型参数可以构建出待预测图像分量对应的预测模型,以得到待预测图像分量对应的预测值。
具体地,假定待预测图像分量为色度分量,而且是通过亮度分量来预测色度分量。假设通过筛选而选中的4个相邻参考像素点的编号分别为0、1、2、3。通过对这4个选中的相邻参考像素点进行比较,基于四次比较,就可以进一步选择出亮度值较大的2个相邻参考像素点(可以包括亮度值最大的像素点和亮度值次最大的像素点)以及亮度值较小的2个相邻参考像素点(可以包括亮度值最小的像素点和亮度值次最小的像素点)。进一步地,可以设置minIdx[2]和maxIdx[2]两个数组分别存放两组相邻参考像素点,初始时先将编号为0和2的相邻参考像素点放入minIdx[2],将编号为1和3的相邻参考像素点放入maxIdx[2],如下所示,
Init:minIdx[2]={0,2},maxIdx[2]={1,3}
在此之后,通过四次比较,可以使得minIdx[2]中存放的是亮度值较小的2个相邻参考像素点,maxIdx[2]中存放的是亮度值较大的2个相邻参考像素点,具体如下所示,
Step1:if(L[minIdx[0]]>L[minIdx[1]],swap(minIdx[0],minIdx[1])
Step2:if(L[maxIdx[0]]>L[maxIdx[1]],swap(maxIdx[0],maxIdx[1])
Step3:if(L[minIdx[0]]>L[maxIdx[1]],swap(minIdx,maxIdx)
Step4:if(L[minIdx[1]]>L[maxIdx[0]],swap(minIdx[1],maxIdx[0])
这样,可以得到亮度值较小的2个相邻参考像素点,其对应的亮度值分别用luma 0 min和luma 1 min表示,对应的色度值分别用chroma 0 min和chroma 1 min表示;同时还可以得到亮度值较大的两个相邻参考像素点,其对应的亮度值分别用luma 0 max和luma 1 max表示,对应的色度值分别用chroma 0 max和chroma 1 max表示。进一步地,针对2个较小的相邻参考像素点求均值,可以得到均值点用mean min表示,该均值点mean min所对应的为亮度值用luma min,色度值为chroma min;针对2个较大的相邻参考像素点求均值,可以得到第二均值点用mean max表示,该均值点mean max对应的亮度值为luma max,色度值为chroma max; 具体如下所示,
luma min=(luma 0 min+luma 1 min+1)>>1
luma max=(luma 0 max+luma 1 max+1)>>1
chroma min=(chroma 0 min+chroma 1 min+1)>>1
chroma max=(chroma 0 max+chroma 1 max+1)>>1
也就是说,在得到两个均值点mean min(luma min,chroma min)和mean max(luma max,chroma max)之后,此时可以将这两个均值点作为两个拟合点,模型参数可以由这两个拟合点通过“两点确定一条直线”的计算方式得到。具体的,模型参数α和β可以由式(5)计算得到,
Figure PCTCN2019092858-appb-000002
其中,模型参数α为预测模型中的斜率,模型参数β为预测模型中的截距。这样,在推导出模型参数之后,可以根据模型参数得到色度分量对应的预测模型,如式(1)所示;然后利用该预测模型对色度分量进行预测处理,以得到色度分量对应的预测值。
这样,由于目前的传统方案统一使用4个相邻参考像素点中较大的两个相邻参考像素点的均值点和较小的两个相邻参考像素点的均值点作为两个拟合点来构建预测模型,该预测模型缺乏鲁棒性,从而当4个相邻参考像素点分布不均匀的情况下,将会导致所构建的预测模型并不能够准确地拟合出这4个相邻参考像素点的分布情况,比如图5所示的预测模型的对比示意图。
本申请实施例中,对于4个相邻参考像素点,在获取到4个相邻参考像素点的亮度均值之后,可以通过该亮度均值点将这4个相邻参考像素点分成两类或者两个参考像素子集;例如,将其划分为左边一类(用Left类表示)和右边一类(用Right类表示),然后使用Left类和Right类各自的均值点作为拟合点来构建预测模型;其中,Left类即为第一参考像素子集,Right类即为第二参考像素子集。
参见图10,其示出了本申请实施例提供的一种模型参数推导方案的流程示意图。如图10所示,该流程可以包括:
S1001:获取4个相邻参考像素点;
S1002:计算4个相邻参考像素点对应的亮度均值meanL和色度均值meanC;
S1003:根据meanL将4个相邻参考像素点划分为第一参考像素子集和第二参考像素子集;
S1004:计算第一参考像素子集对应的Left均值点和第二参考像素子集对应的Right均值点;
S1005:将Left均值点和Right均值点作为两个拟合点推导第一模型参数;
S1006:根据meanL和meanC推导第二模型参数;
S1007:根据两个模型参数构建预测模型,并根据该预测模型进行色度分量的预测处理。
需要说明的是,利用“两点确定一条直线”原则来构建预测模型;这里的两点可以称为拟合点。首先在获取4个相邻参考像素点之后,通过对这4个相邻参考像素点求均值(可以用mean表示),得到该均值对应的亮度均值meanL和色度均值meanC;然后利用亮度均值meanL对这4个相邻参考像素点进行分组,比如划分为第一参考像素子集(可以称为Left类)和第二参考像素子集(可以称为Right类);求取Left类对应的Left均值点(可以用meanLeft表示),该Left均值点对应的亮度均值用meanLeftLuma表示,对应的亮度均值用meanLeftChroma表示;求取Right类对应的Right均值点(可以用 meanRight表示),该Right均值点对应的亮度均值用meanRightLuma表示,对应的亮度均值用meanRightChroma表示;将这两个均值点(Left均值点和Right均值点)作为两个拟合点,可以推导出模型参数(可以用α和β表示),最后根据模型参数构建出如式(1)所示的预测模型,并根据该预测模型进行色度分量的预测处理。
具体地,假定待预测图像分量为色度分量,而且是通过亮度分量来预测色度分量。假设通过筛选而选中的4个相邻参考像素点的编号分别为0、1、2、3。首先,计算这4个相邻参考像素点对应的均值点mean(meanL,meanC),其中,meanL表示4个相邻参考像素点的亮度均值,meanC表示4个相邻参考像素点的色度均值。假设这4个相邻参考像素点为selectPix[i](selectLumaPix[i],selectChromaPix[i])(0<=i<=3),第i个相邻参考像素点对应的亮度值为selectLumaPix[i],对应的色度值为selectChromaPix[i]。具体meanL和meanC如下所示,
Figure PCTCN2019092858-appb-000003
Figure PCTCN2019092858-appb-000004
在此之后,通过将这4个相邻参考像素点的亮度值selectLumaPix[i](0<=i<=3)分别与亮度均值meanL进行比较,将亮度值小于(或者,小于或等于)meanL的像素点放入Left[cntL](LeftLuma[cntL],LeftChroma[cntL])中,否则,即将像素点放入Right[cntR](RightLuma[cntR],RightChroma[cntR])中(0<=cntL<=3,0<=cntR<=3),具体如下所示,
int cntL=0,cntR=0;
for(int i=0;i<4;i++)
{
  if(selectLumaPix[i]<=meanL)
{
  LeftLuma[cntL]=selectLumaPix[i];
  LeftChroma[cntL]=selectChromaPix[i];
  cntL++;
}
else
{
  RightLuma[cntR]=selectLumaPix[i];
  RightChroma[cntR]=selectChromaPix[i];
   cntR++;
}
}
需要注意的是,对于判断条件selectLumaPix[i]<=meanL,也可以修改为selectLumaPix[i]<meanL。
进一步地,再分别计算Left类和Right类各自的均值点meanLeft(meanLeftLuma,meanLeftChroma)和meanRight(meanRightLuma,meanRightChroma),具体如下所示,
if(cntL!=0&&cntR!=0)
{
Figure PCTCN2019092858-appb-000005
Figure PCTCN2019092858-appb-000006
Figure PCTCN2019092858-appb-000007
Figure PCTCN2019092858-appb-000008
}
还需要注意的是,round表示四舍五入的取整函数。当cntL或cntR为2时,在计算机语言中可以用移位方式来实现除2的操作;当cntL或cntR为3时,在计算机语言中可以通过查找表(Look-Up Table,LUT)方式来实现除3的操作;这样可以达到降低计算复杂度的目的。
进一步地,在得到两个均值点meanLeft(meanLeftLuma,meanLeftChroma)和meanRight(meanRightLuma,meanRightChroma)之后,可以将这两个均值点作为拟合点推导第一模型参数α,然后利用均值点mean(meanL,meanC)推导第二模型参数β,具体如下所示,
if(cntL!=0&&cntR!=0)
{
Figure PCTCN2019092858-appb-000009
β=meanC-α×meanL
}
else
{
α=0
β=meanC
}
这样,在推导出两个模型参数(α和β)之后,可以根据模型参数得到色度分量对应的预测模型,如式(1)所示;然后利用该预测模型对色度分量进行预测处理,以得到色度分量对应的预测值。
在推导出两个拟合点之前,目前的传统方案需要有4次比较和4次求均值的操作;而本申请实施例中,该过程需要有4次比较和6次求均值的操作。需要说明的是,目前的传统方案中求均值的操作均是基于对两个相邻参考像素点进行求均值,可以通过简单的加法与移位方式来实现;本申请实施例中求均值的操作涉及1到4个相邻参考像素点进行求均值,其中,对于3个相邻参考像素点的求均值不能通过移位方式实现,本申请实施例中可以通过查找表方式来实现。
本申请的又一实施例中,预设数量为4个,即第二参考像素集合中包括有4个相邻参考像素点;这样,根据第一均值点对第二参考像素集合进行分组,可以得到3种方式,比如第一参考像素子集中包括1个相邻参考像素点、第二参考像素子集中包括3个相邻参考像素点,第一参考像素子集中包括2个相邻参考像素点、或者第二参考像素子集中包括2个相邻参考像素点,或者第一参考像素子集中包括3个相邻参考像素点、第二参考像素子集中包括1个相邻参考像素点等。因此,在一些实施例中,在S803之前,该方法还可以包括:
获取第二参考像素集合中4个相邻参考像素点各自对应的第一图像分量值,通过均 值计算获得第一图像分量对应的第一均值;
相应的,对于S803来说,所述通过第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,可以包括:
将第二参考像素集合中每个相邻参考像素点对应的第一图像分量值与第一图像分量对应的第一均值进行比较;
若第二参考像素集合中有1个相邻参考像素点对应的第一图像分量值小于或等于第一图像分量对应的第一均值,则第一参考像素子集中包括1个相邻参考像素点,第二参考像素子集中包括3个相邻参考像素点;
若第二参考像素集合中有2个相邻参考像素点对应的第一图像分量值小于或等于第一图像分量对应的第一均值,则第一参考像素子集中包括2个相邻参考像素点,第二参考像素子集中包括2个相邻参考像素点;
若第二参考像素集合中有3个相邻参考像素点对应的第一图像分量值小于或等于第一图像分量对应的第一均值,则第一参考像素子集中包括3个相邻参考像素点,第二参考像素子集中包括1个相邻参考像素点。
需要说明的是,假定第一图像分量为亮度分量,第二图像分量为色度分量,在获得亮度分量对应的第一均值之后,可以将4个相邻参考像素点各组的亮度值与第一均值进行比较,以实现对这4个相邻参考像素点的分组。
由于4个相邻参考像素点可以呈均匀分布趋势或者非均匀分布趋势,当4个相邻参考像素点呈均匀分布趋势时,在分组之后,此时第一参考像素子集中包括2个相邻参考像素点,第二参考像素子集中包括2个相邻参考像素点;当4个相邻参考像素点呈非均匀分布趋势时,在分组之后,此时第一参考像素子集中包括1个相邻参考像素点,第二参考像素子集中包括3个相邻参考像素点;或者第一参考像素子集中包括3个相邻参考像素点,第二参考像素子集中包括1个相邻参考像素点;然后从第一参考像素子集中确定出第一拟合点,从第二参考像素子集中确定出第二拟合点,从而充分利用了4个相邻参考像素点的特性,提高了预测的鲁棒性。下面将针对这三种情况进行具体描述。
可选地,在一些实施例中,当第一参考像素子集中包括2个相邻参考像素点,第二参考像素子集中包括2个相邻参考像素点时,对于S804来说,所述基于所述第一参考像素子集和第二参考像素子集,确定两个拟合点,可以包括:
针对所述第一参考像素子集中的2个相邻参考像素点,通过移位方式确定第一图像分量对应的第二均值和第二图像分量对应的第二均值,得到第二均值点,以作为第一拟合点;
针对所述第二参考像素子集中的2个相邻参考像素点,通过移位方式确定第一图像分量对应的第三均值和第二图像分量对应的第三均值,得到第三均值点,以作为第二拟合点。
需要说明的是,当4个相邻参考像素点呈均匀分布时,第一参考像素子集(比如Left类)和第二参考像素子集(比如Right类)中各有两个相邻参考像素点。参见图11,其示出了本申请实施例提供的一种本申请方案与传统方案下预测模型的对比示意图。如图11所示,4个黑色圆点为4个相邻参考像素点,2个灰色圆点分别为这4个相邻参考像素点中2个较大的相邻参考像素点对应的均值点和2个较小的相邻参考像素点对应的均值点(即传统方案所得到的两个拟合点),这样灰色斜线为根据传统方案所构建的预测模型;加粗黑色虚线为4个相邻参考像素点的亮度均值,该加粗黑色虚线的左侧为Left类,该加粗黑色虚线的右侧为Right类,两个加粗黑圈为Left类和Right类的均值点,这样加粗黑色斜线为根据本申请实施例的方案所构建的预测模型;灰色点线为这4个相邻参考像素点使用LMS算法拟合出的预测模型;从图11中可以看出,灰色斜线和 加粗黑色斜线重合,而且和灰色点线比较接近,即本申请实施例的方案与传统方案所构建的预测模型相同,均能够准确地拟合出这4个相邻参考像素点的分布情况。
可选地,在一些实施例中,当第一参考像素子集中包括1个相邻参考像素点,第二参考像素子集中包括3个相邻参考像素点时,对于S804来说,所述基于所述第一参考像素子集和第二参考像素子集,确定两个拟合点,可以包括:
将所述第一参考像素子集中的1个相邻参考像素点作为第二均值点,以作为第一拟合点;
针对所述第二参考像素子集中的3个相邻参考像素点,通过查找表方式确定第一图像分量对应的第三均值和第二图像分量对应的第三均值,得到第三均值点,以作为第二拟合点。
需要说明的是,当4个相邻参考像素点呈非均匀分布时,第一参考像素子集(比如Left类)中有1个相邻参考像素点,第二参考像素子集(比如Right类)中有3个相邻参考像素点。参见图12,其示出了本申请实施例提供的另一种本申请方案与传统方案下预测模型的对比示意图。如图12所示,4个黑色圆点为4个相邻参考像素点,2个灰色圆点分别为这4个相邻参考像素点中2个较大的相邻参考像素点对应的均值点和2个较小的相邻参考像素点对应的均值点(即传统方案所得到的两个拟合点),这样灰色斜线为根据传统方案所构建的预测模型;加粗黑色虚线为4个相邻参考像素点的亮度均值,该加粗黑色虚线的左侧为Left类,该加粗黑色虚线的右侧为Right类,两个加粗黑圈为Left类和Right类的均值点,这样加粗黑色斜线为根据本申请实施例的方案所构建的预测模型;灰色点线为这4个相邻参考像素点使用LMS算法拟合出的预测模型;从图12中可以看出,加粗黑色斜线和灰色点线更接近,即本申请实施例的方案比传统方案所构建的预测模型更符合这4个相邻参考像素点的分布情况。
可选地,在一些实施例中,当第一参考像素子集中包括3个相邻参考像素点,第二参考像素子集中包括1个相邻参考像素点时,对于S804来说,所述基于所述第一参考像素子集和第二参考像素子集,确定两个拟合点,可以包括:
针对所述第一参考像素子集中的3个相邻参考像素点,通过查找表方式确定第一图像分量对应的第二均值和第二图像分量对应的第二均值,得到第二均值点,以作为第一拟合点;
将所述第二参考像素子集中的1个相邻参考像素点作为第三均值点,以作为第二拟合点。
需要说明的是,当4个相邻参考像素点呈非均匀分布时,第一参考像素子集(比如Left类)中有3个相邻参考像素点,第二参考像素子集(比如Right类)中有1个相邻参考像素点。参见图13,其示出了本申请实施例提供的又一种本申请方案与传统方案下预测模型的对比示意图。如图13所示,4个黑色圆点为4个相邻参考像素点,2个灰色圆点分别为这4个相邻参考像素点中2个较大的相邻参考像素点对应的均值点和2个较小的相邻参考像素点对应的均值点(即传统方案所得到的两个拟合点),这样灰色斜线为根据传统方案所构建的预测模型;加粗黑色虚线为4个相邻参考像素点的亮度均值,该加粗黑色虚线的左侧为Left类,该加粗黑色虚线的右侧为Right类,两个加粗黑圈为Left类和Right类的均值点,这样加粗黑色斜线为根据本申请实施例的方案所构建的预测模型;灰色点线为这4个相邻参考像素点使用LMS算法拟合出的预测模型;从图13中可以看出,加粗黑色斜线和灰色点线更接近,即本申请实施例的方案比传统方案所构建的预测模型更符合这4个相邻参考像素点的分布情况。
从图12或者图13可以看出,当4个相邻参考像素点呈不均匀分布时,目前的传统方案所构造的线性模型缺乏鲁棒性,不能很好的拟合这4个相邻参考像素点,从而使预 测性能不准确。而在本申请实施例中,通过对模型参数推导所使用的拟合点进行优化,可以使得CCLM预测更具有鲁棒性;其中,在计算复杂度增加很小的前提下,将这4个相邻参考像素点基于亮度均值进行分类,用每一类的均值点作为拟合点来构造预测模型,从而提高了CCLM预测的鲁棒性。例如,基于VVC最新参考软件VTM5.0,在All intra条件下,对JVET所要求的测试序列使用24为时域间隔,在Y分量、Cb分量和Cr分量上BD-rate平均变化分别为-0.04%、-0.25%、-0.20%,也就说明了本申请实施例的方案对复杂度增加很小的前提下,带来了一定的预测性能提升。
本实施例提供了一种图像分量预测方法,通过本实施例的技术方案,由第一均值点对预设数量的相邻参考像素点进行分组划分,然后将每个组对应的均值点作为拟合点,根据得到的两个拟合点推导模型参数,根据该模型参数可以得到待预测图像分量对应的预测模型,该预测模型用于实现对待预测图像分量的预测处理,以得到待预测图像分量对应的预测值;这样,可以提高CCLM预测的鲁棒性,从而使得构建的预测模型更准确,而且提升了视频图像的编解码预测性能。
基于前述实施例相同的发明构思,参见图14,其示出了本申请实施例提供的一种图像分量预测装置140的组成结构示意图。该图像分量预测装置140可以包括:获取单元1401、计算单元1402、分组单元1403、确定单元1404和预测单元1405,其中,
所述获取单元1401,配置为获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点;其中,所述N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;
所述计算单元1402,配置为计算所述N个相邻参考像素点的均值,得到第一均值点;
所述分组单元1403,配置为通过第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集;
所述确定单元1404,配置为基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点;
所述预测单元1405,配置为基于所述两个拟合点,确定模型参数,根据所述模型参数得到所述待预测图像分量对应的预测模型;其中,所述预测模型用于实现对所述待预测图像分量的预测处理,以得到所述待预测图像分量对应的预测值。
在上述方案中,参见图14,该图像分量预测装置140还可以包括筛选单元1406,
所述获取单元1401,还配置为获取视频图像中编码块的待预测图像分量对应的第一参考像素集合;
所述筛选单元1406,配置为对所述第一参考像素集合进行筛选处理,得到第二参考像素集合;其中,所述第二参考像素集合包括有N个相邻参考像素点。
在上述方案中,所述获取单元1401,具体配置为获取与所述编码块至少一个边相邻的参考像素点;其中,所述至少一个边包括所述编码块的左侧边和/或所述编码块的上侧边;以及基于所述参考像素点,组成所述待预测图像分量对应的第一参考像素集合。
在上述方案中,所述获取单元1401,具体配置为获取与所述编码块相邻的参考行或者参考列中的参考像素点;其中,所述参考行是由所述编码块的上侧边以及右上侧边所相邻的行组成的,所述参考列是由所述编码块的左侧边以及左下侧边所相邻的列组成的;以及基于所述参考像素点,组成所述待预测图像分量对应的第一参考像素集合。
在上述方案中,所述确定单元1404,还配置为基于所述第一参考像素集合中每个相邻参考像素点对应的像素位置和/或图像分量强度,确定待选择像素点位置;
所述筛选单元1406,具体配置为根据确定的待选择像素点位置,从所述第一参考像素集合中选取与所述待选择像素点位置对应的相邻参考像素点,将选取得到的相邻参考 像素点组成第二参考像素集合;其中,所述第二参考像素集合包括有N个相邻参考像素点。
在上述方案中,所述获取单元1401,还配置为基于所述第二参考像素集合中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得所述第二参考像素集合中多个第一图像分量对应的第一图像分量均值和多个第二图像分量对应的第二图像分量均值,得到所述第一均值点。
在上述方案中,参见图14,该图像分量预测装置140还可以包括比较单元1407,配置为将所述第二参考像素集合中每个相邻参考像素点对应的第一图像分量值与第一图像分量对应的第一均值进行比较;以及基于比较的结果,若相邻参考像素点对应的第一图像分量值小于或等于第一图像分量对应的第一均值,则将所述相邻参考像素点放入第一参考像素子集中,以得到所述第一参考像素子集;若相邻参考像素点对应的第一图像分量值大于第一图像分量对应的第一均值,则将所述相邻参考像素点放入第二参考像素子集中,以得到所述第二参考像素子集。
在上述方案中,N的取值为4。
在上述方案中,所述获取单元1401,还配置为获取第二参考像素集合中4个相邻参考像素点各自对应的第一图像分量值,通过均值计算获得4个第一图像分量对应的第一图像分量均值;
相应的,所述比较单元1407,具体配置为将第二参考像素集合中每个相邻参考像素点对应的第一图像分量值与所述第一图像分量均值进行比较;以及若第二参考像素集合中有1个相邻参考像素点对应的第一图像分量值小于或等于所述第一图像分量均值,则第一参考像素子集中包括1个相邻参考像素点,第二参考像素子集中包括3个相邻参考像素点;若第二参考像素集合中有2个相邻参考像素点对应的第一图像分量值小于或等于所述第一图像分量均值,则第一参考像素子集中包括2个相邻参考像素点,第二参考像素子集中包括2个相邻参考像素点;若第二参考像素集合中有3个相邻参考像素点对应的第一图像分量值小于或等于所述第一图像分量均值,则第一参考像素子集中包括3个相邻参考像素点,第二参考像素子集中包括1个相邻参考像素点。
在上述方案中,所述获取单元1401,还配置为基于所述第一参考像素子集中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得所述第一参考像素子集中多个第一图像分量对应的第一图像分量均值和多个第二图像分量对应的第二图像分量均值,得到第二均值点,将所述第二均值点作为第一拟合点;以及基于所述第二参考像素子集中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得所述第二参考像素子集中多个第一图像分量对应的第一图像分量均值和多个第二图像分量对应的第二图像分量均值,得到第三均值点,将所述第三均值点作为第二拟合点。
在上述方案中,所述计算单元1402,配置为基于所述第一拟合点和所述第二拟合点,通过第一预设因子计算模型获得所述第一模型参数;以及基于所述第一模型参数以及所述第一均值点,通过第二预设因子计算模型获得所述第二模型参数。
在上述方案中,所述计算单元1402,还配置为基于所述第一模型参数以及所述第一拟合点,通过第二预设因子计算模型获得所述第二模型参数。
在上述方案中,所述预测单元1405,具体配置为基于所述预测模型对所述编码块中每个像素点的待预测图像分量进行预测处理,得到每个像素点的待预测图像分量对应的预测值。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上 单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本实施例提供了一种计算机存储介质,该计算机存储介质存储有图像分量预测程序,所述图像分量预测程序被至少一个处理器执行时实现前述实施例中任一项所述的方法。
基于上述图像分量预测装置140的组成以及计算机存储介质,参见图15,其示出了本申请实施例提供的图像分量预测装置140的具体硬件结构,可以包括:网络接口1501、存储器1502和处理器1503;各个组件通过总线系统1504耦合在一起。可理解,总线系统1504用于实现这些组件之间的连接通信。总线系统1504除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图15中将各种总线都标为总线系统1504。其中,网络接口1501,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
存储器1502,用于存储能够在处理器1503上运行的计算机程序;
处理器1503,用于在运行所述计算机程序时,执行:
获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点;其中,所述N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;
计算所述N个相邻参考像素点的均值,得到第一均值点;
通过所述第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集;
基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点;
基于所述两个拟合点,确定模型参数,根据所述模型参数得到所述待预测图像分量对应的预测模型;其中,所述预测模型用于实现对所述待预测图像分量的预测处理,以得到所述待预测图像分量对应的预测值。
可以理解,本申请实施例中的存储器1502可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本文描述的系统和方法的存储器1502旨在包括但不限于这些和任意其它适合类型的存储器。
而处理器1503可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1503中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1503可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1502,处理器1503读取存储器1502中的信息,结合其硬件完成上述方法的步骤。
可以理解,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。
对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,处理器1503还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
参见图16,其示出了本申请实施例提供的一种编码器的组成结构示意图。如图16所示,编码器160至少可以包括前述实施例中任一项所述的图像分量预测装置140。
参见图17,其示出了本申请实施例提供的一种解码器的组成结构示意图。如图17所示,解码器170至少可以包括前述实施例中任一项所述的图像分量预测装置140。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例中,首先获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点,该N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;计算所述N个相邻参考像素点的均值,得到第一均值点;然后通过第一均值点对第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,并基于第一参考像素子集和第二参考像素子集,确定两个拟合点;最后基于两个拟合点确定模型参数,根据模型参数得到待预测图像分量对应的预测模型,以得到待预测图像分量对应的预测值;这样,由于第一均值点是对第二参考像素集合中预设数量的相邻参考像素点进行求均值得到的,根据第一均值点将预设数量的相邻参考像素点进行分组划分,再确定推导模型参数的两个拟合点,可以提高预测的鲁棒性;也就是说,通过对模型参数推导所使用的拟合点进行优化,从而使得构建的预测模型更准确,而且提升了视频图像的编解码预测性能。

Claims (18)

  1. 一种图像分量预测方法,所述方法包括:
    获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点;其中,所述N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;
    计算所述N个相邻参考像素点的均值,得到第一均值点;
    通过所述第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集;
    基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点;
    基于所述两个拟合点,确定模型参数,根据所述模型参数得到所述待预测图像分量对应的预测模型;其中,所述预测模型用于实现对所述待预测图像分量的预测处理,以得到所述待预测图像分量对应的预测值。
  2. 根据权利要求1所述的方法,其中,所述获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点,包括:
    获取视频图像中编码块的待预测图像分量对应的第一参考像素集合;
    对所述第一参考像素集合进行筛选处理,得到第二参考像素集合;其中,所述第二参考像素集合包括有N个相邻参考像素点。
  3. 根据权利要求2所述的方法,其中,所述获取视频图像中编码块的待预测图像分量对应的第一参考像素集合,包括:
    获取与所述编码块至少一个边相邻的参考像素点;其中,所述至少一个边包括所述编码块的左侧边和/或所述编码块的上侧边;
    基于所述参考像素点,组成所述待预测图像分量对应的第一参考像素集合。
  4. 根据权利要求2所述的方法,其中,所述获取视频图像中编码块的待预测图像分量对应的第一参考像素集合,包括:
    获取与所述编码块相邻的参考行或者参考列中的参考像素点;其中,所述参考行是由所述编码块的上侧边以及右上侧边所相邻的行组成的,所述参考列是由所述编码块的左侧边以及左下侧边所相邻的列组成的;
    基于所述参考像素点,组成所述待预测图像分量对应的第一参考像素集合。
  5. 根据权利要求2至4任一项所述的方法,其中,所述对所述第一参考像素集合进行筛选处理,得到第二参考像素集合,包括:
    基于所述第一参考像素集合中每个相邻参考像素点对应的像素位置和/或图像分量强度,确定待选择像素点位置;
    根据确定的待选择像素点位置,从所述第一参考像素集合中选取与所述待选择像素点位置对应的相邻参考像素点,将选取得到的相邻参考像素点组成第二参考像素集合;其中,所述第二参考像素集合包括有N个相邻参考像素点。
  6. 根据权利要求1所述的方法,其中,在所述通过所述第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集之前,所述方法还包括:
    基于所述第二参考像素集合中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得所述第二参考像素集合中多个第一图像分量对应的第一图像分量均值和多个第二图像分量对应的第二图像分量均值,得到所述第一均值点。
  7. 根据权利要求6所述的方法,其中,所述通过第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,包括:
    将所述第二参考像素集合中每个相邻参考像素点对应的第一图像分量值与第一图像分量对应的第一均值进行比较;
    基于比较的结果,若相邻参考像素点对应的第一图像分量值小于或等于第一图像分量对应的第一均值,则将所述相邻参考像素点放入第一参考像素子集中,以得到所述第一参考像素子集;
    若相邻参考像素点对应的第一图像分量值大于第一图像分量对应的第一均值,则将所述相邻参考像素点放入第二参考像素子集中,以得到所述第二参考像素子集。
  8. 根据权利要求1所述的方法,其中,N的取值为4。
  9. 根据权利要求8所述的方法,其中,在所述通过第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集之前,所述方法还包括:
    获取第二参考像素集合中4个相邻参考像素点各自对应的第一图像分量值,通过均值计算获得4个第一图像分量对应的第一图像分量均值;
    相应的,所述通过所述第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集,包括:
    将第二参考像素集合中每个相邻参考像素点对应的第一图像分量值与所述第一图像分量均值进行比较;
    若第二参考像素集合中有1个相邻参考像素点对应的第一图像分量值小于或等于所述第一图像分量均值,则第一参考像素子集中包括1个相邻参考像素点,第二参考像素子集中包括3个相邻参考像素点;
    若第二参考像素集合中有2个相邻参考像素点对应的第一图像分量值小于或等于所述第一图像分量均值,则第一参考像素子集中包括2个相邻参考像素点,第二参考像素子集中包括2个相邻参考像素点;
    若第二参考像素集合中有3个相邻参考像素点对应的第一图像分量值小于或等于所述第一图像分量均值,则第一参考像素子集中包括3个相邻参考像素点,第二参考像素子集中包括1个相邻参考像素点。
  10. 根据权利要求1所述的方法,其中,所述基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点,包括:
    基于所述第一参考像素子集中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得所述第一参考像素子集中多个第一图像分量对应的第一图像分量均值和多个第二图像分量对应的第二图像分量均值,得到第二均值点,将所述第二均值点作为第一拟合点;
    基于所述第二参考像素子集中每个相邻参考像素点对应的第一图像分量值和第二图像分量值,获得所述第二参考像素子集中多个第一图像分量对应的第一图像分量均值和多个第二图像分量对应的第二图像分量均值,得到第三均值点,将所述第三均值点作为第二拟合点。
  11. 根据权利要求1所述的方法,其中,所述基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点,包括:
    从所述第一参考像素子集中选取部分相邻参考像素点,对所述部分相邻参考像素点进行均值计算,将计算得到的均值点作为所述第一拟合点;
    从所述第二参考像素子集中选取部分相邻参考像素点,对所述部分相邻参考像素点进行均值计算,将计算得到的均值点作为所述第二拟合点。
  12. 根据权利要求1所述的方法,其中,所述基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点,包括:
    从所述第一参考像素子集中选取其中一个相邻参考像素点作为所述第一拟合点;
    从所述第一参考像素子集中选取其中一个相邻参考像素点作为所述第二拟合点。
  13. 根据权利要求10至12任一项所述的方法,其中,所述模型参数包括第一模型参数和第二模型参数,所述基于所述两个拟合点,确定模型参数,包括:
    基于所述第一拟合点和所述第二拟合点,通过第一预设因子计算模型获得所述第一模型参数;
    基于所述第一模型参数以及所述第一均值点,通过第二预设因子计算模型获得所述第二模型参数。
  14. 根据权利要求13所述的方法,其中,在所述通过第一预设因子计算模型获得所述第一模型参数之后,所述方法还包括:
    基于所述第一模型参数以及所述第一拟合点,通过第二预设因子计算模型获得所述第二模型参数。
  15. 根据权利要求1至14任一项所述的方法,其中,在所述根据所述模型参数得到所述待预测图像分量对应的预测模型之后,所述方法还包括:
    基于所述预测模型对所述编码块中每个像素点的待预测图像分量进行预测处理,得到每个像素点的待预测图像分量对应的预测值。
  16. 一种图像分量预测装置,所述图像分量预测装置包括:获取单元、计算单元、分组单元、确定单元和预测单元,其中,
    所述获取单元,配置为获取视频图像中编码块的待预测图像分量对应的N个相邻参考像素点;其中,所述N个相邻参考像素点为与所述编码块相邻的参考像素点,N为预设的整数值;
    所述计算单元,配置为计算所述N个相邻参考像素点的均值,得到第一均值点;
    所述分组单元,配置为通过所述第一均值点对所述第二参考像素集合进行分组,得到第一参考像素子集和第二参考像素子集;
    所述确定单元,配置为基于所述第一参考像素子集和所述第二参考像素子集,确定两个拟合点;
    所述预测单元,配置为基于所述两个拟合点,确定模型参数,根据所述模型参数得到所述待预测图像分量对应的预测模型;其中,所述预测模型用于实现对所述待预测图像分量的预测处理,以得到所述待预测图像分量对应的预测值。
  17. 一种图像分量预测装置,其中,所述图像分量预测装置包括:存储器和处理器;
    所述存储器,用于存储能够在所述处理器上运行的计算机程序;
    所述处理器,用于在运行所述计算机程序时,执行如权利要求1至15任一项所述的方法。
  18. 一种计算机存储介质,其中,所述计算机存储介质存储有图像分量预测程序,所述图像分量预测程序被至少一个处理器执行时实现如权利要求1至15任一项所述的方法。
PCT/CN2019/092858 2019-06-25 2019-06-25 图像分量预测方法、装置及计算机存储介质 WO2020258052A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/092858 WO2020258052A1 (zh) 2019-06-25 2019-06-25 图像分量预测方法、装置及计算机存储介质
CN201980084457.6A CN113196762A (zh) 2019-06-25 2019-06-25 图像分量预测方法、装置及计算机存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/092858 WO2020258052A1 (zh) 2019-06-25 2019-06-25 图像分量预测方法、装置及计算机存储介质

Publications (1)

Publication Number Publication Date
WO2020258052A1 true WO2020258052A1 (zh) 2020-12-30

Family

ID=74061198

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092858 WO2020258052A1 (zh) 2019-06-25 2019-06-25 图像分量预测方法、装置及计算机存储介质

Country Status (2)

Country Link
CN (1) CN113196762A (zh)
WO (1) WO2020258052A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501029B (zh) * 2022-01-12 2023-06-06 深圳市洲明科技股份有限公司 图像编码、图像解码方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130188689A1 (en) * 2005-10-13 2013-07-25 Maxim Integrated Products, Inc. Video encoding control using non-exclusive content categories
CN103379321A (zh) * 2012-04-16 2013-10-30 华为技术有限公司 视频图像分量的预测方法和装置
CN103596004A (zh) * 2013-11-19 2014-02-19 北京邮电大学 Hevc中基于数学统计和分类训练的帧内预测方法及装置
CN105306944A (zh) * 2015-11-30 2016-02-03 哈尔滨工业大学 混合视频编码标准中色度分量预测方法
CN107580222A (zh) * 2017-08-01 2018-01-12 北京交通大学 一种基于线性模型预测的图像或视频编码方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10419757B2 (en) * 2016-08-31 2019-09-17 Qualcomm Incorporated Cross-component filter
CN111713110A (zh) * 2017-12-08 2020-09-25 松下电器(美国)知识产权公司 图像编码设备、图像解码设备、图像编码方法以及图像解码方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130188689A1 (en) * 2005-10-13 2013-07-25 Maxim Integrated Products, Inc. Video encoding control using non-exclusive content categories
CN103379321A (zh) * 2012-04-16 2013-10-30 华为技术有限公司 视频图像分量的预测方法和装置
CN103596004A (zh) * 2013-11-19 2014-02-19 北京邮电大学 Hevc中基于数学统计和分类训练的帧内预测方法及装置
CN105306944A (zh) * 2015-11-30 2016-02-03 哈尔滨工业大学 混合视频编码标准中色度分量预测方法
CN107580222A (zh) * 2017-08-01 2018-01-12 北京交通大学 一种基于线性模型预测的图像或视频编码方法

Also Published As

Publication number Publication date
CN113196762A (zh) 2021-07-30

Similar Documents

Publication Publication Date Title
WO2020253829A1 (zh) 一种编解码方法、装置及存储介质
US20190222842A1 (en) Coding unit depth determining method and apparatus
WO2015180428A1 (zh) 帧内预测编码的视频编码方法及视频编码装置
WO2022104498A1 (zh) 帧内预测方法、编码器、解码器以及计算机存储介质
WO2021203394A1 (zh) 环路滤波的方法与装置
CN111327904B (zh) 图像重建方法和装置
US20230388491A1 (en) Colour component prediction method, encoder, decoder and storage medium
WO2020258052A1 (zh) 图像分量预测方法、装置及计算机存储介质
CN110868590B (zh) 图像划分方法及装置
WO2022077490A1 (zh) 一种帧内预测方法、编码器、解码器及存储介质
WO2022174469A1 (zh) 一种光照补偿方法、编码器、解码器及存储介质
WO2022116119A1 (zh) 一种帧间预测方法、编码器、解码器及存储介质
CN113395520B (zh) 解码预测方法、装置及计算机存储介质
WO2020258053A1 (zh) 图像分量预测方法、装置及计算机存储介质
JP7448568B2 (ja) 画像成分の予測方法、装置およびコンピュータ記憶媒体
WO2023197193A1 (zh) 编解码方法、装置、编码设备、解码设备以及存储介质
WO2023197189A1 (zh) 编解码方法、装置、编码设备、解码设备以及存储介质
WO2023123736A1 (zh) 预测方法、装置、设备、系统、及存储介质
WO2023125771A1 (en) Cross-component linear model prediction
WO2024007116A1 (zh) 解码方法、编码方法、解码器以及编码器
WO2023231008A1 (zh) 编解码方法、编码器、解码器以及存储介质
TW202404358A (zh) 編解碼方法、裝置、編碼設備、解碼設備以及儲存媒介
KR20180121340A (ko) 압축 영역에서 야간 영상의 장면 전환 검출 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19935239

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19935239

Country of ref document: EP

Kind code of ref document: A1