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

By filtering the reference pixel set of video image prediction model, reducing insignificant or abnormal pixel points, the problems of high computational complexity and inaccurate prediction in the prior art are solved, and the accuracy of the prediction model and the prediction efficiency of the video image are improved.

CN120455667APending Publication Date: 2025-08-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510882414.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-03-25
Filing Date
2019-10-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing video image prediction model has high computational complexity and memory bandwidth during the construction process, and the existence of abnormal sample points leads to inaccurate prediction.

Method used

By reducing the number of pixels in the reference pixel set, unimportant or abnormal reference pixel points are selected, and the model parameters of the prediction model are calculated for cross-component prediction processing.

Benefits of technology

The computational complexity and memory bandwidth are reduced, and the accuracy of the prediction model and the prediction efficiency of the video image are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455667A_ABST
    Figure CN120455667A_ABST
Patent Text Reader

Abstract

An image component prediction method, an encoder, a decoder and a storage medium. The method comprises: determining a first reference pixel set of an image component to be predicted of a current block (S101); determining a reference pixel subset from the first reference pixel set; wherein the subset of reference pixels comprises one or more candidate pixels selected from the first set of reference pixels (S102); calculating model parameters of a prediction model by using the reference pixel subset; wherein the prediction model is used for performing cross-component prediction processing on a to-be-predicted image component of the current block (S103).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of PCT international patent application PCT / CN2019 / 113765 with an application date of October 28, 2019, which entered the Chinese national phase with Chinese patent application number 201980093368.8 and the invention name being “Image component prediction method, encoder, decoder and storage medium”. Technical Field

[0002] The embodiments of the present application relate to the field of image processing technology, and in particular to an image component prediction method, an encoder, a decoder, and a storage medium. Background Art

[0003] The color information of video images is often affected by factors such as light sources and color deviations of acquisition devices, which can cause overall color shifts. This is also the phenomenon we often see as colder images and yellower photos. To offset this color deviation in the entire video image, illumination compensation (IC) or local illumination compensation (LIC) technology has been proposed to correct the color of video images.

[0004] Both IC and LIC technologies require the construction of a prediction model, which is then used to derive the predicted value of the video image in the video codec. However, during the prediction model construction process, the number of sample points currently used to derive model parameters is large, resulting in high computational complexity and memory bandwidth. Furthermore, these sample points may contain abnormalities, leading to inaccurate prediction model construction. Summary of the Invention

[0005] The embodiments of the present application provide an image component prediction method, an encoder, a decoder, and a storage medium. By reducing the number of pixels in a reference pixel set, not only the computational complexity and memory bandwidth are reduced, but also the accuracy of the prediction model is improved, thereby improving the prediction accuracy of the image component to be predicted and improving the prediction efficiency of the video image.

[0006] The technical solution of the embodiment of the present application can be implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides an image component prediction method, the method comprising:

[0008] Determining a first reference pixel set of a to-be-predicted image component of a current block;

[0009] Determining a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0010] The model parameters of the prediction model are calculated using the reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block.

[0011] In a second aspect, an embodiment of the present application provides an encoder, comprising a first determining unit and a first calculating unit, wherein:

[0012] A first determining unit configured to determine a first reference pixel set of a to-be-predicted image component of a current block;

[0013] The first determining unit is further configured to determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0014] The first calculation unit is configured to calculate model parameters of a prediction model using a reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block.

[0015] In a third aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor, wherein:

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

[0017] The first processor is configured to execute the method according to the first aspect when running the computer program.

[0018] In a fourth aspect, an embodiment of the present application provides a decoder, comprising a second determining unit and a second calculating unit, wherein:

[0019] A second determining unit is configured to determine a first reference pixel set of a to-be-predicted image component of a current block;

[0020] The second determining unit is further configured to determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0021] The second calculation unit is configured to calculate model parameters of a prediction model using a reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block.

[0022] In a fifth aspect, an embodiment of the present application provides a decoder, comprising a second memory and a second processor, wherein:

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

[0024] The second processor is configured to execute the method according to the first aspect when running the computer program.

[0025] In a sixth aspect, an embodiment of the present application provides a computer storage medium storing an image component prediction program. When the image component prediction program is executed by the first processor or the second processor, the method described in the first aspect is implemented.

[0026] An embodiment of the present application provides an image component prediction method, an encoder, a decoder and a storage medium, which determine a first reference pixel set of the image component to be predicted of the current block; determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set; use the reference pixel subset to calculate the model parameters of the prediction model; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block; in this way, due to the screening processing of the first reference pixel set, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the first reference pixel set, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; since the prediction model is used to realize the prediction processing of the image component to be predicted through the model parameters, the prediction accuracy of the image component to be predicted is improved, and the prediction efficiency of the video image is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of a flow chart of an image component prediction method provided in an embodiment of the present application;

[0028] Figure 2A A schematic diagram of a reference pixel position structure provided in an embodiment of the present application;

[0029] Figure 2B A schematic diagram of another reference pixel position structure provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of a structure for selecting a subset of adjacent reference pixels on the side of a current block provided by an embodiment of the present application;

[0031] Figure 4 A schematic diagram of another structure for selecting a subset of adjacent reference pixels on the side of a current block provided by an embodiment of the present application;

[0032] Figure 5 A schematic diagram of a comparative structure of a prediction model provided in an embodiment of the present application;

[0033] Figure 6A schematic flow chart of another image component prediction method provided in an embodiment of the present application;

[0034] Figure 7 A schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0035] Figure 8 A schematic diagram of the specific hardware structure of an encoder provided in an embodiment of the present application;

[0036] Figure 9 A schematic diagram of the structure of a decoder provided in an embodiment of the present application;

[0037] Figure 10 A schematic diagram of the specific hardware structure of a decoder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0039] In a video image, a first image component, a second image component, and a third image component are generally used to represent a coding block (CB); wherein the three image components are a luminance component, a blue chrominance component, and a red chrominance component, respectively. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; thus, the video image can be represented in either the YCbCr format or the YUV format.

[0040] In the embodiment of the present application, the first image component may be a luminance component, the second image component may be a blue chrominance component, and the third image component may be a red chrominance component, but the embodiment of the present application does not make any specific limitation.

[0041] In the current video image or video encoding and decoding process, not only cross-component prediction technology requires the construction of prediction models, but also prediction technology within image components. Among them, cross-component prediction technology mainly includes cross-component linear model prediction (CCLM) mode and multi-directional linear model prediction (MDLM) mode. The prediction models constructed by the CCLM mode and MDLM mode can achieve prediction between image components, such as the first image component to the second image component, the second image component to the first image component, the first image component to the third image component, the third image component to the first image component, the second image component to the third image component, or the third image component to the second image component. For prediction technology within image components, it mainly includes chroma component compensation technology and luminance component compensation technology, such as IC technology and LIC technology. The prediction model constructed by the prediction technology within image components can achieve prediction technology within image components, such as prediction of the first image component to the first image component, prediction of the second image component to the second image component, or prediction of the third image component to the third image component. In the embodiment of the present application, the following description will be mainly based on the prediction model constructed by the prediction technology within the image component as an example.

[0042] In order to ensure the accuracy of the model parameters used in the prediction model, the reference pixel set constructed for deriving the model parameters needs to be more accurate. Based on this, an embodiment of the present application provides an image component prediction method, by determining a first reference pixel set of the image component to be predicted of the current block; determining a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set; using the reference pixel subset, calculating the model parameters of the prediction model; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block; in this way, due to the screening processing of the first reference pixel set, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the first reference pixel set, which can not only reduce the computational complexity and memory bandwidth, but also improve the accuracy of the prediction model, thereby improving the prediction accuracy of the image component to be predicted and improving the prediction efficiency of the video image.

[0043] It should be noted that the image component prediction method of the embodiments of the present application can be applied to both video encoding systems and video decoding systems, and can even be applied to both video encoding systems and video decoding systems simultaneously, without any specific limitation in the embodiments of the present application. It should also be noted that when the method is applied to a video encoding system, the "current block" specifically refers to the current encoding block in intra-frame prediction; when the method is applied to a video decoding system, the "current block" specifically refers to the current decoding block in intra-frame prediction.

[0044] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0045] See also Figure 1 , which shows a flow chart of an image component prediction method provided by an embodiment of the present application. The method may include:

[0046] S101: Determine a first reference pixel set of a to-be-predicted image component of a current block;

[0047] S102: Determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0048] S103: Calculating model parameters of a prediction model using the reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the to-be-predicted image component of the current block.

[0049] It should be noted that a video image can be divided into multiple image blocks, and each image block currently to be encoded can be referred to as a current block. Each current block may include a first image component, a second image component, and a third image component; and the current block is the current block in the video image for which prediction of the first image component, the second image component, or the third image component is currently being performed. When the first image component needs to be predicted using a prediction model, the image component to be predicted is the first image component; when the second image component needs to be predicted using a prediction model, the image component to be predicted is the second image component; and when the third image component needs to be predicted using a prediction model, the image component to be predicted is the third image component.

[0050] It should also be noted that the first reference pixel set is the reference pixel set corresponding to the prediction model constructed in the current related art solution. In this first reference 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, thereby obtaining a reference pixel subset; based on the reference pixel subset, the accuracy of the prediction model can be guaranteed, and the prediction efficiency of the image component to be predicted is high.

[0051] In an embodiment of the present application, a first reference pixel set of the image component to be predicted of the current block is first determined; then a reference pixel subset is determined from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set; and then the model parameters of the prediction model are calculated using the reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block; in this way, due to the screening processing of the first reference pixel set, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the first reference pixel set, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model, thereby improving the prediction accuracy of the image component to be predicted and improving the prediction efficiency of the video image.

[0052] Furthermore, the determination of the first reference pixel set can be obtained based on adjacent reference pixels around the current block, or based on adjacent reference pixels inside the reconstructed block. This embodiment of the present application does not specifically limit this, and each will be described below.

[0053] Optionally, in some embodiments, for S101, determining a first reference pixel set of a to-be-predicted image component of the current block may include:

[0054] Acquire reference pixels adjacent to at least one side of the current block outside the current block; wherein the at least one side of the current block includes at least one of the following: an upper side, a left side, an upper right side, and a lower left side;

[0055] The first reference pixel set is obtained according to the acquired reference pixels.

[0056] For example, see Figure 2A , which shows a schematic diagram of the structure of a reference pixel point position provided by an embodiment of the present application. Figure 2A In the embodiment, the reference pixel points are located around the current block, that is, reference pixel points adjacent to at least one side of the current block, and the at least one side of the current block may refer to the left side of the current block, or may refer to the upper side of the current block, or even to the left side and upper side of the current block; this embodiment of the present application does not make specific limitations.

[0057] It can be understood that if at least one side of the current block is a left side and / or a top side, then for S101, determining the first reference pixel set of the image component to be predicted of the current block may include:

[0058] Obtaining reference pixel points adjacent to at least one side of the current block; wherein the at least one side includes a left side of the current block and / or an upper side of the current block;

[0059] The first reference pixel set is obtained according to the acquired reference pixels.

[0060] It should be noted that at least one edge of the current block may include the left edge of the current block and / or the upper edge of the current block; that is, at least one edge of the current block may refer to the upper edge of the current block, or the left edge of the current block, or even the upper and left edges of the current block, which is not specifically limited in the embodiments of the present application.

[0061] In this way, when the left adjacent area and the upper adjacent area are all valid areas, the first reference pixel set can be composed of reference pixel points adjacent to the left side of the current block and reference pixel points adjacent to the upper side of the current block. When the left adjacent area is a valid area and the upper adjacent area is an invalid area, the first reference pixel set can be composed of reference pixel points adjacent to the left side of the current block; when the left adjacent area is an invalid area and the upper adjacent area is a valid area, the first reference pixel set can be composed of reference pixel points adjacent to the upper side of the current block.

[0062] It can be understood that if at least one side of the current block is a left side and a lower left side consisting of adjacent columns, and / or a top side and an upper right side consisting of adjacent rows, then for S101, determining the first reference pixel set of the image component to be predicted of the current block may include:

[0063] Obtaining reference pixels in a reference row or reference column adjacent to the current block; wherein the reference row is composed of rows adjacent to the upper side and upper right side of the current block, and the reference column is composed of columns adjacent to the left side and lower left side of the current block;

[0064] The first reference pixel set is obtained according to the acquired reference pixels.

[0065] It should be noted that the reference rows adjacent to the current block may be composed of rows adjacent to the upper side and upper right side of the current block, and the reference columns adjacent to the current block may be composed of columns adjacent to the left side and lower left side of the current block; the reference rows or reference columns adjacent to the current block may refer to reference rows adjacent to the upper side of the current block, or may refer to reference columns adjacent to the left side of the current block, or even to reference rows or reference columns adjacent to other sides of the current block, and this is not specifically limited in the embodiments of the present application. For the convenience of description, in the embodiments of the present application, the reference rows adjacent to the current block will be described as reference rows adjacent to the upper side, and the reference columns adjacent to the current block will be described as reference columns adjacent to the left side.

[0066] Among them, the reference pixel points in the reference row adjacent to the current block may include reference pixel points adjacent to the upper side and the upper right side (also referred to as adjacent reference pixel points corresponding to the upper side and the upper right side), wherein the upper side represents the upper side of the current block, and the upper right side represents the side length that is horizontally extended to the right by the upper side of the current block and is the same as the height of the current block; the reference pixel points in the reference column adjacent to the current block may also include reference pixel points adjacent to the left side and the lower left side (also referred to as adjacent reference pixel points corresponding to the left side and the lower left side), wherein the left side represents the left side of the current block, and the lower left side represents the side length that is vertically extended downward by the left side of the current block and is the same as the width of the current decoding block; however, the embodiments of the present application do not make specific limitations.

[0067] In this way, when the left adjacent area and the lower left adjacent area are valid areas, the first reference pixel set can be composed of reference pixel points in the reference column adjacent to the current block; when the upper adjacent area and the upper right adjacent area are valid areas, the first reference pixel set can be composed of reference pixel points in the reference row adjacent to the current block.

[0068] Optionally, in some embodiments, for S101, determining a first reference pixel set of a to-be-predicted image component of the current block may include:

[0069] Obtaining, within a reconstructed block, reference pixels adjacent to at least one side of the reconstructed block; wherein the reconstructed block is an image block adjacent to the current block and has been reconstructed through encoding, and the at least one side of the reconstructed block includes: a lower side, a right side, or both a lower side and a right side;

[0070] The first reference pixel set is obtained according to the acquired reference pixels.

[0071] For example, see Figure 2B , which shows a schematic diagram of the structure of a reference pixel point position provided by an embodiment of the present application. Figure 2B In the embodiment, the reference pixel point is located inside the reconstructed block, that is, the reference pixel point adjacent to at least one side of the reconstructed block, and the at least one side of the reconstructed block may refer to the right side of the reconstructed block, or may refer to the bottom side of the reconstructed block, or even to the right side and bottom side of the reconstructed block, which is not specifically limited in the embodiments of the present application.

[0072] It should be noted that, from the perspective of building a prediction model, reference pixels can be called "pixels used to build a prediction model". The current block is already in the encoding and reconstruction stage. At this time, a prediction model is built, which can be convenient for use by other coding blocks in subsequent images. In addition, for the reconstructed block, on the one hand, the adjacent reference pixels in the reconstructed block can be used to obtain a first reference pixel set, which is convenient for the subsequent construction of the prediction model of the current block; on the other hand, the prediction model corresponding to the reconstructed block can be directly borrowed and used as the prediction model of the current block; that is, for the current block being encoded, the relevant information of the reconstructed blocks in the adjacent areas can be used by directly using their corresponding prediction models, without the need to build a prediction model through the adjacent reference pixels of the reconstructed block.

[0073] Furthermore, after obtaining the first reference pixel set, there may be some unimportant reference pixel points (for example, these reference pixel points have poor correlation) or some abnormal reference pixel points in the first reference pixel set. In order to ensure the accuracy of the model parameter derivation, these reference pixel points need to be eliminated, thereby obtaining a reference pixel subset; in this way, based on the reference pixel subset, the accuracy of the prediction model can be guaranteed, so that the prediction efficiency of the image component to be processed is high.

[0074] In some embodiments, for S102, determining the reference pixel subset according to the first reference pixel set may include:

[0075] determining a candidate position of a candidate pixel based on at least one edge of the current block or the reconstructed block;

[0076] The reference pixels corresponding to the candidate positions are selected from the first reference pixel set, and the selected parameter pixels are used to form the reference pixel subset.

[0077] Furthermore, determining the candidate position of the candidate pixel based on at least one edge of the current block or the reconstructed block may include:

[0078] The candidate position is determined based on a pixel position corresponding to the at least one side-adjacent reference pixel.

[0079] Furthermore, determining the candidate position of the candidate pixel based on at least one edge of the current block or the reconstructed block may include:

[0080] The candidate position is determined based on the image component intensity value corresponding to the at least one side-adjacent reference pixel.

[0081] Furthermore, determining the candidate position of the candidate pixel based on at least one edge of the current block or the reconstructed block may include:

[0082] The candidate position is determined based on a pixel position and an image component intensity value corresponding to the at least one side-adjacent reference pixel.

[0083] It should be noted that image component intensity can be represented by image component values, such as brightness values, chrominance values, etc. Here, a larger image component value indicates a higher image component intensity. The reference pixels selected in the embodiments of the present application can be selected based on the candidate positions of the candidate pixels; wherein the candidate positions can be determined based on the pixel positions or based on the image component intensity values (such as brightness values, chrominance values, etc.), which are not specifically limited in the embodiments of the present application.

[0084] It should also be noted that the reference pixel subset is formed by screening the first reference pixel set and then selecting some reference pixel points; and the model parameters are calculated based on the reference pixel subset; in this way, since the number of samples in the reference pixel subset is reduced, the number of samples required to calculate the model parameters is also reduced, thereby achieving the purpose of reducing computational complexity and memory bandwidth (or memory bandwidth).

[0085] It is understood that the selected reference pixels in the embodiment of the present application can be selected by the pixel position corresponding to the reference pixel, or can be selected based on the intensity value of the image component corresponding to the reference pixel (such as brightness value, chrominance value, etc.), and the embodiment of the present application does not specifically limit this. Among them, whether it is based on the pixel position corresponding to the reference pixel or the intensity value of the image component corresponding to the reference pixel, the first reference pixel set is screened to select suitable reference pixels to form a reference pixel subset; in this way, the model parameters derived from the reference pixel subset are more accurate, so that the prediction model constructed based on the model parameters can also be more accurate.

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

[0087] Determining a preset number of candidate pixels; wherein the preset number of candidate pixels represents the number of pixels sampled from the reference pixels adjacent to the at least one side;

[0088] The candidate position is determined according to the preset number of candidate pixels and the length of the at least one side; wherein the length of the at least one side is equal to the number of pixels included in the at least one side.

[0089] It should be noted that the relevant information of the reconstructed block can be used by directly utilizing its corresponding prediction model, without the need to construct a prediction model through the reference pixels adjacent to the reconstructed block; therefore, the embodiments of the present application will mainly use at least one edge of the current block as an example to describe how to determine the candidate position of the candidate pixel.

[0090] It should also be noted that the preset number of candidate pixels represents the pre-set number of pixels to be sampled, that is, the number of pixels included in the reference pixel subset. Taking the pixel position as an example, after determining the preset number of candidate pixels, the candidate position of the candidate pixel can be calculated based on the length of at least one side and the preset number of candidate pixels; then, based on the candidate position, appropriate reference pixels are selected from the first reference pixel set to form the reference pixel subset. In this way, the model parameters calculated based on the reference pixel subset are more accurate, and the constructed prediction model can also be more precise, thereby improving the prediction accuracy of the image component to be predicted and improving the prediction efficiency of the video image.

[0091] Furthermore, to determine the candidate position, a first sampling interval may be calculated first, and then sampling may be performed on the at least one edge according to the first sampling interval to determine the candidate position of the candidate pixel corresponding to the at least one edge. Therefore, in some embodiments, determining the candidate position of the candidate pixel based on at least one edge of the current block or the reconstructed block may include:

[0092] Calculating a first sampling interval according to the preset number of candidate pixels and the length of the at least one side;

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

[0094] It should be noted that the reference point can be the midpoint of at least one edge, or the first reference pixel position to the left of the midpoint of at least one edge, or the first reference pixel position to the right of the midpoint of at least one edge, or even other reference pixel positions of at least one edge, and the embodiments of the present application do not make specific limitations.

[0095] Specifically, the midpoint of the at least one side can be determined based on the length of the at least one side, and then the midpoint of the at least one side can be used as the reference point. The reference point can be the midpoint of the at least one side, or the first reference pixel position to the left of the midpoint of the at least one side, or the first reference pixel position to the right of the midpoint of the at least one side, or even other reference pixel positions of the at least one side, and this embodiment of the application does not specifically limit this.

[0096] It should be noted that, considering that the importance of the reference pixels adjacent to at least one side of the current block is related to their corresponding positions, in order to make the reference pixels in the reference pixel subset represent the characteristics of the entire adjacent side, it is necessary to select the reference pixels at the center of the side as much as possible to eliminate the less important points (such as the reference pixels on both sides of the side). In the embodiment of the present application, if the upper side of the current block is used as an example, the first reference pixel position to the right or left of the middle position can be used as the reference point of the side; if the left side of the current block is used as an example, the first reference pixel position below or above the middle position can be used as the reference point of the side.

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

[0098] In practical applications, since the length of the left side or the top side of the current block is an integer multiple of 2, the middle position of the left side or the top side of the current block is between the two points. Figure 3 In the example, the first pixel point to the left of the middle position is used as the midpoint of the edge; however, in the embodiment of the present application, the first pixel point to the right of the middle position can also be used as the midpoint of the edge, such as Figure 4 As shown. Figure 3 In order to shift the first pixel to the left of the middle position (such as Figure 3 3) as the midpoint of the edge, since the preset number of samples is 2, the position of the reference pixel to be selected can be determined (such as Figure 3 The middle gray point example) is 1 and 5. Based on the positions of these reference pixels, corresponding reference pixels can also be selected to form a reference pixel subset. Therefore, in the embodiment of the present application, for the upper side of the current block, either the first pixel to the right of the middle position can be used as the midpoint of the side, or the first pixel to the left of the middle position can be used as the midpoint of the side, and the embodiment of the present application does not make specific restrictions. In addition, for the left side of the current block, either the first pixel below the middle position can be used as the midpoint of the side, or the first pixel above the middle position can be used as the midpoint of the side, and the embodiment of the present application does not make specific restrictions.

[0099] Unless otherwise specified, the following description will be made using the upper side of the current block as an example, but the image component prediction method of the embodiment of the present application is also applicable to the left side of the current block, or even the right side of the reconstructed block or the lower side of the reconstructed block, and the embodiment of the present application does not make any specific limitations.

[0100] It can be understood that if the existence of the reference pixel points adjacent to the left side or the upper side of the current block is not considered, the second reference pixel set can also be constructed according to equations (1) and (2):

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

[0102] shift=Δ / 2 (2)

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

[0104] For example, Figure 3 Taking the upper side shown as an example, length is equal to 8, N2 is equal to 4, assuming that the left side and the upper side are each half, that is, the preset number of samples of the upper side is 2, then according to formula (1) and formula (2), Δ=length / (N2 / 2)=4, shift=Δ / 2=2 are calculated respectively, that is, with 1 as the starting point position and 4 as the sampling interval, the position of the reference pixel to be selected can be determined first, such as 1 and 5, and then the corresponding reference pixel points can be selected to form a reference pixel subset. Here, it should be noted that the preset number of samples corresponding to the left side and the preset number of samples corresponding to the upper side can be the same or different, and the embodiments of the present application do not make specific limitations.

[0105] It should also be noted that, based on the preset number of candidate pixels and the length of one side of the current block, the first sampling interval corresponding to the side can be calculated. In addition, since the length of the left side or the upper side of the current block is an integer multiple of 2, the middle position of the left side or the upper side of the current block is between two points. In this case, the calculated midpoint value is a non-integer, and the calculated reference pixel position is also a non-integer; however, if the length of the left side or the upper side of the current block is not an integer multiple of 2, the middle position of the left side or the upper side of the current block will not be between the two points. In this case, the calculated midpoint value is an integer, and the calculated reference pixel position is also an integer; that is, the calculated midpoint value can be an integer or a non-integer; correspondingly, the calculated reference pixel position can also be an integer or a non-integer; this is not specifically limited in the embodiments of the present application.

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

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

[0108] Adjusting the first sampling interval to obtain a second sampling interval;

[0109] The candidate position is determined based on the reference point according to the second sampling interval.

[0110] It should be noted that after calculating the first sampling interval, the first sampling interval can be fine-tuned, such as by adding 1 or subtracting 1 from the first sampling interval to obtain the second sampling interval. For example, if the first sampling interval is 4, the adjusted second sampling interval can be 3 or 5. In the embodiment of the present application, the adjustment of the first sampling interval can be a small adjustment (for example, adding 1 or subtracting 1), but the embodiment of the present application does not specifically limit the specific setting of the adjustment amplitude.

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

[0112] Based on the reference point, a candidate position corresponding to one side of the reference point is determined according to the first sampling interval, and a candidate position corresponding to the other side of the reference point is determined according to the second sampling interval.

[0113] That is to say, after determining the reference point of at least one edge of the current block, uniform sampling can be performed according to the first sampling interval or the second sampling interval; or non-uniform sampling can be performed according to the first sampling interval and the second sampling interval, and the candidate positions determined after sampling can be symmetrically distributed on both sides of the reference point, or asymmetrically distributed on both sides of the reference point; the embodiments of the present application do not make specific limitations.

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

[0115] Table 1

[0116] The length of at least one side of the current block Candidate location Preset number of candidate pixels 2 0,1 2 4 1,2 2 8 2,3,4 (or 3,4,5) 3 16 6,7,8,9 4 32 13,14,15,16,17,18,19,20 8

[0117] Furthermore, for the screening process of the first parameter pixel set, a skipping process may be performed on the reference pixels of at least one edge, i.e., unimportant reference pixels or abnormal reference pixels are skipped (which may also be considered as a deletion process), thereby obtaining a reference pixel subset; on this basis, i.e., after skipping some reference pixels of at least one edge, a second reference pixel set may be obtained, and the second reference pixel set may be screened again to obtain a reference pixel subset. Therefore, in some embodiments, determining the candidate position of the candidate pixel based on at least one edge of the current block or the reconstructed block may include:

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

[0119] Starting from the starting position and / or the end position of the at least one edge, determining positions corresponding to K pixels to be skipped;

[0120] Based on positions corresponding to the K to-be-skipped pixels, continuously skipping K to-be-skipped pixels from a starting position and / or an end position of the at least one edge to obtain at least one new edge;

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

[0122] It should be noted that the preset number of skipped pixels represents a preset number of pixels to be deleted or skipped. In addition, the starting position of at least one edge represents the leftmost edge position of the upper edge of the current block or the uppermost edge position of the left edge of the current block, and the ending position of at least one edge represents the rightmost edge position of the upper edge of the current block or the lowermost edge position of the left edge of the current block.

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

[0124] In this way, assuming that starting from the starting position of at least one edge, if at least one edge is the upper side of the current block (also known as the reference row of the current block), then starting from the leftmost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; if at least one edge is the left side of the current block (also known as the reference column of the current block), then starting from the uppermost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; assuming that starting from the end position of at least one edge, if at least one edge is the upper side of the current block, then starting from the rightmost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; if at least one edge is the left side of the current block, then starting from the lowermost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; in actual applications, the settings are made according to actual conditions, and the embodiments of the present application do not make specific limitations.

[0125] After determining the positions corresponding to the K pixels to be skipped, assuming that starting from the starting position of at least one edge, if at least one edge is the upper edge of the current block, then starting from the leftmost edge position of the upper edge, the positions corresponding to K consecutive pixels to be skipped can be determined to the right, and then these K pixels to be skipped are skipped continuously to obtain a new upper edge; at this time, the candidate position corresponding to the new upper edge can be determined based on the side length of the new upper edge and the preset number of candidate pixels, so that the selected candidate pixels are formed into a reference pixel subset; if at least one edge is the left edge of the current block, then starting from the top edge position of the left edge, the positions corresponding to K consecutive pixels to be skipped can be determined downward, and then these K pixels to be skipped are skipped continuously to obtain a new left edge; at this time, the candidate position corresponding to the new left edge can be determined based on the side length of the new left edge and the preset number of candidate pixels, so that the selected candidate pixels are formed into a reference pixel subset. Alternatively, assuming that starting from the end position of at least one edge, if at least one edge is the upper side of the current block, then starting from the rightmost edge position of the upper side, the positions corresponding to K consecutive pixels to be skipped can be determined to the left, and then these K pixels to be skipped can be skipped continuously to obtain a new upper side; at this time, the candidate position corresponding to the new upper side can be determined based on the length of the new upper side and the preset number of candidate pixels, so that the selected candidate pixels are composed of a reference pixel subset; if at least one edge is the left side of the current block, then starting from the bottommost edge position of the left side, the positions corresponding to K consecutive pixels to be skipped can be determined upward, and then these K pixels to be skipped can be skipped continuously to obtain a new left side; at this time, the candidate position corresponding to the new left side can be determined based on the length of the new left side and the preset number of candidate pixels, so that the selected candidate pixels are composed of a reference pixel subset.

[0126] In this way, the embodiment of the present application uses some pixels (i.e., a reference pixel subset) in the first reference pixel set obtained from the reference pixels adjacent to the current block to derive model parameters corresponding to a complex model (such as a nonlinear model or a multi-model). Since the obtained subset (i.e., the reference pixel subset) has eliminated unimportant reference pixels or abnormal reference pixels, it has a smaller number of reference pixels. This not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the complex model, thereby achieving the purpose of improving the prediction accuracy of the image component to be processed and the prediction efficiency of the video image.

[0127] Furthermore, after determining the reference pixel subset, the model parameters of the prediction model can be calculated based on the reference pixel subset to facilitate the construction of the prediction model. Therefore, in some embodiments, for S103, the calculation of the model parameters of the prediction model using the reference pixel subset may include:

[0128] Based on the reference pixel subset, obtaining adjacent pixel reconstructed values of the to-be-predicted image component corresponding to the current block and adjacent pixel reconstructed values of the to-be-predicted image component corresponding to the reference block; wherein the current block is located in the Nth frame of the video image, and the reference block is located in the N-1th frame of the video image;

[0129] The model parameters are calculated based on the reconstructed values of the adjacent pixels of the image component to be predicted corresponding to the current block and the reconstructed values of the adjacent pixels of the image component to be predicted corresponding to the reference block.

[0130] It should be noted that the reference block and the current block are not located in the same frame, but rather in an inter-frame relationship. The reference block and the current block are located in different frames of video images, and the frame in which the reference block is located is the frame before the frame in which the current block is located. That is, the current block is in the Nth frame of the video image, while the reference block is in the N-1th frame of the video image. Furthermore, there is a motion vector (MV) offset between the position of the current block in the Nth frame of the video image and the position of the reference block in the N-1th frame of the video image.

[0131] In addition, the model parameters include a first model parameter α and a second model parameter β. There are many ways to calculate α and β, including a preset factor calculation model constructed using the least squares method, a preset factor calculation model constructed using maximum and minimum values, or even a preset factor calculation model constructed in other ways, which are not specifically limited in the present embodiment.

[0132] Taking the preset factor calculation model constructed by the least squares method as an example, it is assumed that the prediction model is mainly used for the prediction processing of the luminance component, such as the IC technology or the LIC technology; in this case, α and β can be derived by minimizing the regression error between the adjacent pixel reconstruction values of the luminance component corresponding to the current block and the adjacent pixel reconstruction values of the luminance component corresponding to the reference block. Specifically, the preset factor calculation model is shown in formula (3):

[0133]

[0134] Where L(n) represents the reconstructed value of the adjacent pixels of the luminance component corresponding to the reference block, C(n) represents the reconstructed value of the adjacent pixels of the luminance component corresponding to the current block, and N is the number of adjacent pixels of the luminance component corresponding to the current block, n = 1, 2, ..., 2N. Thus, the first model parameter α and the second model parameter β can be obtained by calculating Equation (3).

[0135] Taking the preset factor calculation model constructed by maximum and minimum values as an example, it provides a simplified method for deriving model parameters. Specifically, α and β can be derived by searching for the maximum and minimum values in the reconstructed values of adjacent pixels of the luminance component corresponding to the reference block, according to the principle of "two points determine a line", as shown in the preset factor calculation model shown in formula (4):

[0136]

[0137] Among them, L max and L min represents the maximum and minimum values found in the reconstruction values of adjacent pixels of the luminance component corresponding to the reference block, C max and C min Indicates L max and L min The corresponding adjacent pixel reconstruction value of the brightness component of the reference pixel point at the corresponding position in the brightness component adjacent pixel reconstruction value of the current block. max and L min and C max and C min , through the calculation of formula (4), the first model parameter α and the second model parameter β can also be obtained.

[0138] After obtaining the first model parameter α and the second model parameter β, a prediction model can be constructed. Specifically, based on α and β, assuming that the luminance component prediction value corresponding to the current block is predicted based on the luminance component prediction value corresponding to the reference block, the constructed prediction model is shown in formula (5):

[0139] Pred 1 [i,j]=α·Pred[i,j]+β (5)

[0140] Among them, i, j represent the position coordinates of the pixel in the current block, i represents the horizontal direction, j represents the vertical direction, Pred 1 [i,j] represents the predicted value of the brightness component corresponding to the pixel point with position coordinates [i,j] in the current block, and Pred[i,j] represents the predicted value of the brightness component corresponding to the pixel point with position coordinates [i,j] in the reference block.

[0141] It should also be noted that the prediction model in the embodiments of the present application can be a linear model or a nonlinear model. The nonlinear model can be a nonlinear form such as a quadratic curve, or a nonlinear form composed of multiple linear models; among them, the cross-component prediction technology of Multiple Model CCLM (MMLM) is a nonlinear form composed of multiple linear models. Figure 5 , which shows a comparative structural diagram of a prediction model provided by an embodiment of the present application. Figure 5 In the figure, (a) indicates that the prediction model is a linear model, which is derived from all reference pixels in the second reference pixel set; (b) indicates that the prediction model is still a linear model, which is derived from the maximum and minimum values in the second reference pixel set; (c) indicates that the prediction model is a nonlinear model, which is an example of a nonlinear model composed of two linear models. It should be noted that the embodiment of the present application will be described using the linear model as an example, but the image component prediction method of the embodiment of the present application can also be applied to nonlinear models.

[0142] It should also be noted that the prediction model in the embodiments of the present application can be used not only for the prediction processing of the luminance component, but also for the prediction processing of the chrominance component. Moreover, through this prediction model, the predicted value of the image component to be predicted (such as the luminance component or the chrominance component) can be updated, thereby making the prediction of the image component more accurate, thereby achieving the purpose of improving the prediction accuracy of the image component to be predicted and the prediction efficiency of the video image.

[0143] Furthermore, in some embodiments, after calculating the model parameters of the prediction model using the reference pixel subset, the method may further include:

[0144] Constructing the prediction model according to the model parameters;

[0145] The prediction model is used to perform prediction processing on the image component to be predicted of the current block to obtain a prediction value corresponding to the image component to be predicted.

[0146] It should be noted that after the prediction model is constructed, the image component to be predicted can be predicted according to the prediction model. On the one hand, the first image component of the reference block can be used to predict the first image component of the current block, such as using the luminance component of the reference block to predict the luminance component of the current block, thereby updating the predicted value of the luminance component; on the other hand, the second image component of the reference block can be used to predict the second image component of the current block, such as using the blue chrominance component of the reference block to predict the blue chrominance component of the current block, thereby updating the predicted value of the blue chrominance component; on the other hand, the third image component of the reference block can be used to predict the third image component of the current block, such as using the red chrominance component of the reference block to predict the red chrominance component of the current block, thereby updating the predicted value of the red chrominance component; this is not specifically limited in the embodiments of the present application.

[0147] The present embodiment provides an image component prediction method, which determines a first reference pixel set of the image component to be predicted of the current block; determines a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set; uses the reference pixel subset to calculate model parameters of a prediction model; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block; in this way, due to the screening processing of the first reference pixel set, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the first reference pixel set, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; since the prediction model is used to realize the prediction processing of the image component to be predicted through the model parameters, the prediction accuracy of the image component to be predicted is improved, and the prediction efficiency of the video image is improved.

[0148] See also Figure 6 , which shows a flow chart of another image component prediction method provided by an embodiment of the present application. Figure 6 As shown, the method may include:

[0149] S601: Selecting some reference pixels from the first reference pixel set to form a reference pixel subset;

[0150] S602: Calculate model parameters of a prediction model according to the reference pixel subset.

[0151] It should be noted that the reference pixel subset is obtained by selecting some reference pixel points from the first reference pixel set; and the model parameters are calculated based on the reference pixel subset; in this way, since the number of samples in the reference pixel subset is reduced, the number of samples required to calculate the model parameters is also reduced, thereby achieving the purpose of reducing computational complexity and memory bandwidth (or called memory bandwidth).

[0152] In some embodiments, determining the first reference pixel set of the image component to be predicted of the current block may include:

[0153] One or more first adjacent pixels of the current block are used as the first reference pixel set; wherein the first adjacent pixels are pixels located adjacent to the vertical edge of the current block, the horizontal edge of the current block, or the vertical and horizontal edges of the current block.

[0154] Furthermore, in some embodiments, the method may further include:

[0155] If the first adjacent pixel is located outside the current block, it is determined that the vertical edge of the current block is the left adjacent column outside the current block, and the horizontal edge of the current block is the top adjacent row outside the current block.

[0156] Furthermore, in some embodiments, the method may further include:

[0157] If the first adjacent pixel is located in the current block, it is determined that the vertical edge of the current block is the right side column in the current block, and the horizontal edge of the current block is the bottom side row in the current block.

[0158] It should be noted that when the first adjacent pixel is located outside the current block, the vertical edge of the current block can be regarded as the left edge of the current block, and the horizontal edge of the current block can be regarded as the upper edge of the current block; when the first adjacent pixel is located inside the current block, the vertical edge of the current block can be regarded as the right edge of the current block, and the horizontal edge of the current block can be regarded as the lower edge of the current block.

[0159] In this way, after obtaining one or more first adjacent pixels of the current block, a first reference pixel set can be formed. Since the first reference pixel set may contain some unimportant reference pixels (for example, these reference pixels have poor correlation) or some abnormal reference pixels, in order to ensure the accuracy of model parameter derivation, these reference pixels need to be removed to obtain a reference pixel subset.

[0160] Therefore, in some embodiments, determining the reference pixel subset may include:

[0161] Determining a candidate position of the candidate pixel on an edge of the current block, wherein the edge of the current block is a vertical edge or a horizontal edge of the current block;

[0162] Pixels located at the candidate position are selected from the first reference pixel set, and the selected pixels are combined into the reference pixel subset.

[0163] Furthermore, determining the candidate position of the candidate pixel may include:

[0164] The candidate position of the candidate pixel is determined according to the position of the pixel in the first reference pixel set.

[0165] Furthermore, determining the candidate position of the candidate pixel may include:

[0166] Determine a candidate position of the candidate pixel according to image component intensities of pixels in the first reference pixel set.

[0167] Furthermore, determining the candidate position of the candidate pixel may include:

[0168] A candidate position of the candidate pixel is determined according to the position and image component intensity of the pixel in the first reference pixel set.

[0169] It should be noted that image component intensity can be represented by image component values, such as brightness values, chrominance values, etc. Here, a larger image component value indicates a higher image component intensity. The reference pixels selected in the embodiments of the present application can be selected based on the candidate positions of the candidate pixels; wherein the candidate positions can be determined based on the pixel positions or based on the image component intensity values (such as brightness values, chrominance values, etc.), which are not specifically limited in the embodiments of the present application.

[0170] It should also be noted that the reference pixel subset is formed by screening the first reference pixel set and then selecting some reference pixel points; and the model parameters are calculated based on the reference pixel subset; in this way, since the number of samples in the reference pixel subset is reduced, the number of samples required to calculate the model parameters is also reduced, thereby achieving the purpose of reducing computational complexity and memory bandwidth (or memory bandwidth).

[0171] It is understood that the selected reference pixels in the embodiment of the present application can be selected by the pixel position corresponding to the reference pixel, or can be selected based on the intensity value of the image component corresponding to the reference pixel (such as brightness value, chrominance value, etc.), and the embodiment of the present application does not specifically limit this. Among them, whether it is based on the pixel position corresponding to the reference pixel or the intensity value of the image component corresponding to the reference pixel, the first reference pixel set is screened to select suitable reference pixels to form a reference pixel subset; in this way, the model parameters derived from the reference pixel subset are more accurate, so that the prediction model constructed based on the model parameters can also be more accurate.

[0172] In some embodiments, determining the candidate position of the candidate pixel may include:

[0173] Determining a preset number of candidate pixels, wherein the preset number of candidate pixels indicates the number of pixels selected from the edge of the current block;

[0174] Determine the candidate position of the candidate pixel based on the first preset number of pixels and the length of the side of the current block; wherein the length of the side of the current block is equal to the number of reference pixels in the first reference pixel set located on the side of the current block.

[0175] It should be noted that the preset number of candidate pixels represents the pre-set number of pixels to be sampled, that is, the number of pixels included in the reference pixel subset. Taking the pixel position as an example, after determining the preset number of candidate pixels, the candidate position of the candidate pixel can be calculated based on the length of at least one side and the preset number of candidate pixels. Then, based on the candidate position, appropriate reference pixels are selected from the first reference pixel set to form the reference pixel subset. In this way, the model parameters calculated based on the reference pixel subset are more accurate, and the constructed prediction model can also be more precise, thereby improving the prediction accuracy of the image component to be predicted and improving the prediction efficiency of the video image.

[0176] Furthermore, to determine the candidate position, a first sampling interval may be calculated first, and then sampling may be performed on the at least one edge according to the first sampling interval to determine the candidate position of the candidate pixel corresponding to the at least one edge. Therefore, in some embodiments, determining the candidate position of the candidate pixel may include:

[0177] A first sampling interval is calculated according to the length of the side of the current block and the preset number of candidate pixels.

[0178] Furthermore, determining the candidate position of the candidate pixel may include:

[0179] The first sampling interval is adjusted to obtain a second sampling interval.

[0180] It should be noted that after calculating the first sampling interval, the first sampling interval can be fine-tuned, such as by adding 1 or subtracting 1 from the first sampling interval to obtain the second sampling interval. For example, if the first sampling interval is 4, the adjusted second sampling interval can be 3 or 5. In the embodiment of the present application, the adjustment of the first sampling interval can be a small adjustment (for example, adding 1 or subtracting 1), but the embodiment of the present application does not specifically limit the specific setting of the adjustment amplitude.

[0181] In some embodiments, optionally, after calculating the first sampling interval, the method may further include:

[0182] A reference point is determined on the edge of the current block, and starting from the reference point, candidate positions on the edge of the current block are determined at the first sampling interval.

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

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

[0185] In some embodiments, optionally, after obtaining the second sampling interval, the method may further include:

[0186] A reference point is determined on the edge of the current block, and starting from the reference point, candidate positions on the edge of the current block are determined at the second sampling interval.

[0187] Furthermore, after obtaining the second sampling interval, the method may further include:

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

[0189] It should be noted that the reference point can be the midpoint of at least one edge, or the first reference pixel position to the left of the midpoint of at least one edge, or the first reference pixel position to the right of the midpoint of at least one edge, or even other reference pixel positions of at least one edge, and the embodiments of the present application do not make specific limitations.

[0190] Specifically, the midpoint of the at least one side can be determined based on the length of the at least one side, and then the midpoint of the at least one side can be used as the reference point. The reference point can be the midpoint of the at least one side, or the first reference pixel position to the left of the midpoint of the at least one side, or the first reference pixel position to the right of the midpoint of the at least one side, or even other reference pixel positions of the at least one side, and this embodiment of the application does not specifically limit this.

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

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

[0193] That is to say, after determining the reference point of at least one edge of the current block, uniform sampling can be performed according to the first sampling interval or the second sampling interval; or non-uniform sampling can be performed according to the first sampling interval and the second sampling interval, and the candidate positions determined after sampling can be symmetrically distributed on both sides of the reference point, or asymmetrically distributed on both sides of the reference point; the embodiments of the present application do not make specific limitations.

[0194] Furthermore, for the selection process of the first parameter pixel set, reference pixel points of at least one side may be skipped (which may also be considered as a deletion process) to skip unimportant reference pixel points or abnormal reference pixel points, thereby obtaining a reference pixel subset; on this basis, after skipping some reference pixel points of at least one side, a second reference pixel set may be obtained, and the second reference pixel set may be screened to obtain a reference pixel subset. Therefore, the method may further include:

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

[0196] Starting from the end position of the edge of the current block, setting the K-th pixel position as the reference point;

[0197] The end position of the side of the current block is the starting pixel position or the ending pixel position of the side of the current block.

[0198] It should be noted that the preset number of skipped pixels represents a preset number of pixels to be deleted or skipped. In addition, the starting position of at least one edge represents the leftmost edge position of the upper edge of the current block or the uppermost edge position of the left edge of the current block, and the ending position of at least one edge represents the rightmost edge position of the upper edge of the current block or the lowermost edge position of the left edge of the current block.

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

[0200] After determining the reference pixel subset, the model parameters of the prediction model can be calculated based on the reference pixel subset to facilitate the construction of the prediction model. Therefore, in some embodiments, the calculation of the model parameters of the prediction model using the reference pixel subset may include:

[0201] Calculating model parameters of a prediction model using reference pixels in the reference pixel subset and pixels of the reference block of the current block that are located at the same position as the reference pixels in the reference pixel subset;

[0202] Among them, the pixel at the same position as the reference pixel in the reference pixel subset is a pixel located in the image where the reference block is located, and its relative position with the reference block is the same as the relative position between the reference pixel in the second reference pixel set and the current block.

[0203] Furthermore, after calculating the model parameters of the prediction model, the method may further include:

[0204] A prediction value of a to-be-predicted image component of the current block is calculated according to the prediction model and a reference block of the current block.

[0205] It should be noted that the reference block can be an image block indicated by the inter-frame prediction parameters of the current block. Thus, after calculating the model parameters (e.g., the first model parameter α and the second model parameter β), a prediction model can be constructed, as shown in the aforementioned equation (5). Based on this prediction model and the reference block of the current block, the predicted value of the image component to be predicted of the current block can be further calculated.

[0206] In addition, in an embodiment of the present application, when the image component prediction method is applied to the encoder side, a part of the pixels can be selected from the first reference pixel set of the current block to construct a reference pixel subset, and then the model parameters of the prediction model are calculated based on the reference pixel subset, and the calculated model parameters are written into the bitstream; the bitstream is transmitted from the encoder side to the decoder side; correspondingly, when the image component prediction method is applied to the decoder side, the model parameters of the prediction model can be directly obtained by parsing the bitstream; or on the decoder side, a part of the pixels can be selected from the first reference pixel set of the current block to construct a reference pixel subset, and then the model parameters of the prediction model are calculated based on the reference pixel subset, thereby constructing a prediction model, and using the prediction model to perform cross-component prediction processing on at least one image component of the current block.

[0207] This embodiment provides an image component prediction method, and elaborates on the specific implementation of the aforementioned embodiment. It can be seen from the technical solution of the aforementioned embodiment that due to the screening processing of the first reference pixel set, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the first reference pixel set, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; since the prediction model is used to realize the prediction processing of the image component to be predicted through the model parameters, the prediction accuracy of the image component to be predicted is improved, and the prediction efficiency of the video image is improved.

[0208] Based on the same inventive concept as the above embodiments, see Figure 7 , which shows a schematic diagram of the structure of an encoder 70 provided in an embodiment of the present application. Figure 7As shown, the encoder 70 may include: a first determining unit 701 and a first calculating unit 702, wherein:

[0209] The first determining unit 701 is configured to determine a first reference pixel set of a to-be-predicted image component of a current block;

[0210] The first determining unit 701 is further configured to determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0211] The first calculation unit 702 is configured to calculate model parameters of a prediction model using the reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block.

[0212] In the above scheme, see Figure 7 The encoder 70 may further include a first acquisition unit 703, configured to acquire reference pixels adjacent to at least one side of the current block outside the current block; wherein the at least one side of the current block includes at least one of the following: an upper side, a left side, an upper right side, and a lower left side; and obtain the first reference pixel set based on the acquired reference pixels.

[0213] In the above scheme, the first acquisition unit 703 is further configured to acquire, within the reconstructed block, reference pixels adjacent to at least one side of the reconstructed block; wherein the reconstructed block is an image block adjacent to the current block and has completed encoding and reconstruction, and at least one side of the reconstructed block includes: a lower side edge, a right side edge, or a lower side edge and a right side edge; and the first reference pixel set is obtained based on the acquired reference pixels.

[0214] In the above scheme, see Figure 7 , the encoder 70 may further include a first selection unit 704, wherein,

[0215] The first determining unit 701 is further configured to determine a candidate position of a candidate pixel based on at least one edge of the current block or the reconstructed block;

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

[0217] In the above solution, the first determining unit 701 is further configured to determine the candidate position based on the pixel position corresponding to the at least one side-adjacent reference pixel.

[0218] In the above solution, the first determining unit 701 is further configured to determine the candidate position based on the image component intensity value corresponding to the at least one side-adjacent reference pixel.

[0219] In the above solution, the first determining unit 701 is further configured to determine the candidate position based on the pixel position and image component intensity value corresponding to the at least one side-adjacent reference pixel.

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

[0221] In the above solution, the first calculation unit 702 is further configured to calculate a first sampling interval according to the preset number of candidate pixels and the length of the at least one side;

[0222] The first determining unit 701 is further configured to determine a reference point from the at least one edge, and determine the candidate position according to the first sampling interval.

[0223] In the above scheme, see Figure 7 , the encoder 70 may further include a first adjusting unit 705, configured as the first determining unit 701, and further configured to adjust the first sampling interval to obtain a second sampling interval;

[0224] The first determining unit 701 is further configured to determine the candidate position based on the reference point and according to the second sampling interval.

[0225] In the above solution, the first determining unit 701 is further configured to determine, based on the reference point, the candidate position corresponding to one side of the reference point according to the first sampling interval, and determine the candidate position corresponding to the other side of the reference point according to the second sampling interval.

[0226] In the above scheme, the first determination unit 701 is further configured to determine a preset number of skipped pixels K corresponding to the at least one edge, where K is a positive integer greater than or equal to 1; and starting from the starting position and / or end position of the at least one edge, determine the positions corresponding to the K pixels to be skipped; and based on the positions corresponding to the K pixels to be skipped, continuously skip K pixels to be skipped starting from the starting position and / or end position of the at least one edge to obtain at least one new edge; and determine the candidate position based on the at least one new edge and the preset number of candidate pixels.

[0227] In the above solution, the first selection unit 704 is further configured to obtain, based on the reference pixel subset, adjacent pixel reconstructed values of the to-be-predicted image component corresponding to the current block and adjacent pixel reconstructed values of the to-be-predicted image component corresponding to the reference block; wherein the current block is located in the Nth frame of the video image, and the reference block is located in the N-1th frame of the video image;

[0228] The first calculation unit 702 is further configured to calculate the model parameters according to the adjacent pixel reconstructed values of the image component to be predicted corresponding to the current block and the adjacent pixel reconstructed values of the image component to be predicted corresponding to the reference block.

[0229] In the above scheme, see Figure 7 , the encoder 70 may further include a first construction unit 706 and a first prediction unit 707, wherein,

[0230] The first construction unit 706 is configured to construct the prediction model according to the model parameters;

[0231] The first prediction unit 707 is configured to perform prediction processing on the to-be-predicted image component of the current block through the prediction model to obtain a prediction value corresponding to the to-be-predicted image component.

[0232] In the above scheme, the first determination unit 701 is further configured to use one or more first adjacent pixels of the current block as the first reference pixel set; wherein the first adjacent pixels are pixels located adjacent to the vertical edge of the current block, the horizontal edge of the current block, or the vertical and horizontal edges of the current block.

[0233] In the above solution, the first determining unit 701 is further configured to determine that if the first adjacent pixel is located outside the current block, the vertical edge of the current block is the left adjacent column outside the current block, and the horizontal edge of the current block is the top adjacent row outside the current block.

[0234] In the above scheme, the first determination unit 701 is further configured to determine that if the first adjacent pixel is located in the current block, the vertical edge of the current block is the right side column in the current block, and the horizontal edge of the current block is the bottom side row in the current block.

[0235] In the above scheme, the first determination unit 701 is further configured to determine the candidate position of the candidate pixel on the edge of the current block, wherein the edge of the current block is the vertical edge or the horizontal edge of the current block; and select pixels located at the candidate position from the first reference pixel set, and form the selected pixels into the reference pixel subset.

[0236] In the above solution, the first determining unit 701 is further configured to determine the candidate position of the candidate pixel according to the position of the pixel in the first reference pixel set.

[0237] In the above solution, the first determining unit 701 is further configured to determine the candidate position of the candidate pixel according to the image component intensity of the pixel in the first reference pixel set.

[0238] In the above solution, the first determining unit 701 is further configured to determine the candidate position of the candidate pixel according to the position and image component intensity of the pixel in the first reference pixel set.

[0239] In the above solution, the first determining unit 701 is further configured to determine a preset number of candidate pixels, wherein the preset number of candidate pixels indicates the number of pixels selected from the edge of the current block;

[0240] Determine the candidate position of the candidate pixel based on the first preset number of pixels and the length of the side of the current block; wherein the length of the side of the current block is equal to the number of reference pixels in the first reference pixel set located on the side of the current block.

[0241] In the above solution, the first calculation unit 702 is further configured to calculate a first sampling interval according to the length of the side of the current block and the preset number of candidate pixels.

[0242] In the above solution, the first adjusting unit 705 is configured to adjust the first sampling interval to obtain a second sampling interval.

[0243] In the above solution, the first determining unit 701 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on the edge of the current block starting from the reference point at the first sampling interval.

[0244] In the above solution, the first determining unit 701 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on both sides of the reference point at the first sampling interval.

[0245] In the above solution, the first determining unit 701 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on the edge of the current block starting from the reference point at the second sampling interval.

[0246] In the above solution, the first determining unit 701 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on both sides of the reference point at the second sampling interval.

[0247] In the above scheme, the first determination unit 701 is further configured to determine a reference point on the edge of the current block, determine the candidate position corresponding to one side of the reference point using the first sampling interval, and determine the candidate position corresponding to the other side of the reference point using the second sampling interval.

[0248] In the above scheme, the first determination unit 701 is further configured to determine a preset skip pixel number K of the edge of the current block, where K is a non-negative integer; and set the Kth pixel position from the end position of the edge of the current block as the reference point; where the end position of the edge of the current block is the starting pixel position or the end pixel position of the edge of the current block.

[0249] In the above scheme, the first calculation unit 702 is further configured to calculate the model parameters of the prediction model using the reference pixels in the reference pixel subset and the pixels of the reference block of the current block that are located at the same position as the reference pixels in the reference pixel subset; wherein, the pixels at the same position as the reference pixels in the reference pixel subset are pixels located in the image where the reference block is located, and whose relative position with the reference block is the same as the relative position between the reference pixels in the second reference pixel set and the current block.

[0250] In the above solution, the first calculation unit 702 is further configured to calculate a prediction value of the to-be-predicted image component of the current block according to the prediction model and the reference block of the current block.

[0251] In the above solution, the reference block is an image block indicated by the inter-frame prediction parameter of the current block.

[0252] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

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

[0254] Therefore, an embodiment of the present application provides a computer storage medium, which stores an image component prediction program. When the image component prediction program is executed by at least one processor, the steps of the method described in the above embodiment are implemented.

[0255] Based on the composition of the encoder 70 and the computer storage medium, see Figure 8 , which shows a specific hardware structure example of the encoder 70 provided in an embodiment of the present application, which may include: a first communication interface 801, a first memory 802 and a first processor 803; each component is coupled together via a first bus system 804. It is understood that the first bus system 804 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 804 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 8 In FIG, various buses are labeled as a first bus system 804.

[0256] The first communication interface 801 is used to receive and send signals during the process of sending and receiving information between other external network elements;

[0257] A first memory 802 is used to store computer programs that can be run on the first processor 803;

[0258] The first processor 803 is configured to, when running the computer program, execute:

[0259] Determining a first reference pixel set of a to-be-predicted image component of a current block;

[0260] Determining a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0261] The reference pixel subset is used to calculate model parameters of a prediction model, wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block.

[0262] It is understood that the first memory 802 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 802 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0263] The first processor 803 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 803. The above-mentioned first processor 803 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 802 , and the first processor 803 reads the information in the first memory 802 and completes the steps of the above method in combination with its hardware.

[0264] It is understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (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, other electronic units for performing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in a processor or outside a processor.

[0265] Optionally, as another embodiment, the first processor 803 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.

[0266] This embodiment provides an encoder, which may include a first determination unit and a first calculation unit, wherein the first determination unit is configured to determine a first reference pixel set of an image component to be predicted of a current block; and is further configured to determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set; the first calculation unit is configured to calculate model parameters of a prediction model using the reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block; in this way, due to the screening processing of the first reference pixel set, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of pixels in the first reference pixel set, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; since the prediction model is used to realize the prediction processing of the image component to be predicted through the model parameters, the prediction accuracy of the image component to be predicted is improved, and the prediction efficiency of the video image is improved.

[0267] Based on the same inventive concept as the above embodiments, see Figure 9 , which shows a schematic diagram of the structure of a decoder 90 provided in an embodiment of the present application. Figure 9 As shown, the decoder 90 may include: a second determining unit 901 and a second calculating unit 902, wherein:

[0268] The second determining unit 901 is configured to determine a first reference pixel set of a to-be-predicted image component of a current block;

[0269] The second determining unit 901 is further configured to determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0270] The second calculation unit 902 is configured to calculate model parameters of a prediction model using the reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the to-be-predicted image component of the current block.

[0271] In the above scheme, see Figure 9The decoder 90 may further include a second acquisition unit 903, configured to acquire reference pixels adjacent to at least one side of the current block outside the current block; wherein the at least one side of the current block includes at least one of the following: an upper side, a left side, an upper right side, and a lower left side; and obtain the first reference pixel set based on the acquired reference pixels.

[0272] In the above scheme, the second acquisition unit 903 is further configured to acquire, within the reconstructed block, reference pixels adjacent to at least one side of the reconstructed block; wherein the reconstructed block is an image block adjacent to the current block and has completed encoding and reconstruction, and at least one side of the reconstructed block includes: a lower side edge, a right side edge, or a lower side edge and a right side edge; and the first reference pixel set is obtained based on the acquired reference pixels.

[0273] In the above scheme, see Figure 9 , the decoder 90 may further include a second selection unit 904, wherein,

[0274] The second determining unit 901 is further configured to determine a candidate position of the candidate pixel based on at least one edge of the current block or the reconstructed block;

[0275] The second selection unit 904 is configured to select reference pixels corresponding to the candidate position from the first reference pixel set, and form the selected parameter pixels into the reference pixel subset.

[0276] In the above solution, the second determining unit 901 is further configured to determine the candidate position based on the pixel position corresponding to the at least one side-adjacent reference pixel.

[0277] In the above solution, the second determining unit 901 is further configured to determine the candidate position based on the image component intensity value corresponding to the at least one side-adjacent reference pixel.

[0278] In the above solution, the second determining unit 901 is further configured to determine the candidate position based on the pixel position and image component intensity value corresponding to the at least one side-adjacent reference pixel.

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

[0280] In the above solution, the second calculation unit 902 is further configured to calculate a first sampling interval according to the preset number of candidate pixels and the length of the at least one side;

[0281] The second determining unit 901 is further configured to determine a reference point from the at least one edge, and determine the candidate position according to the first sampling interval.

[0282] In the above scheme, see Figure 9 , the decoder 90 may further include a second adjusting unit 905, configured as the second determining unit 901, and further configured to adjust the first sampling interval to obtain a second sampling interval;

[0283] The second determining unit 901 is further configured to determine the candidate position based on the reference point and according to the second sampling interval.

[0284] In the above solution, the second determining unit 901 is further configured to determine, based on the reference point, the candidate position corresponding to one side of the reference point according to the first sampling interval, and determine the candidate position corresponding to the other side of the reference point according to the second sampling interval.

[0285] In the above scheme, the second determination unit 901 is further configured to determine the preset number of skipped pixels K corresponding to the at least one edge, where K is a positive integer greater than or equal to 1; and starting from the starting position and / or the end position of the at least one edge, determine the positions corresponding to the K pixels to be skipped; and based on the positions corresponding to the K pixels to be skipped, continuously skip K pixels to be skipped starting from the starting position and / or the end position of the at least one edge to obtain at least one new edge; and determine the candidate position based on the at least one new edge and the preset number of candidate pixels.

[0286] In the above solution, the second selection unit 904 is further configured to obtain, based on the reference pixel subset, adjacent pixel reconstructed values of the to-be-predicted image component corresponding to the current block and adjacent pixel reconstructed values of the to-be-predicted image component corresponding to the reference block; wherein the current block is located in the Nth frame of the video image, and the reference block is located in the N-1th frame of the video image;

[0287] The second calculation unit 902 is further configured to calculate the model parameters according to the adjacent pixel reconstructed values of the image component to be predicted corresponding to the current block and the adjacent pixel reconstructed values of the image component to be predicted corresponding to the reference block.

[0288] In the above scheme, see Figure 9 , the decoder 90 may further include a second construction unit 906 and a second prediction unit 907, wherein,

[0289] The second construction unit 906 is configured to construct the prediction model according to the model parameters;

[0290] The second prediction unit 907 is configured to perform prediction processing on the to-be-predicted image component of the current block by using the prediction model to obtain a prediction value corresponding to the to-be-predicted image component.

[0291] In the above scheme, the second determination unit 901 is further configured to use one or more first adjacent pixels of the current block as the first reference pixel set; wherein the first adjacent pixels are pixels located adjacent to the vertical edge of the current block, the horizontal edge of the current block, or the vertical and horizontal edges of the current block.

[0292] In the above solution, the second determination unit 901 is further configured to determine that if the first adjacent pixel is located outside the current block, the vertical edge of the current block is the left adjacent column outside the current block, and the horizontal edge of the current block is the top adjacent row outside the current block.

[0293] In the above scheme, the second determination unit 901 is further configured to determine that if the first adjacent pixel is located in the current block, the vertical edge of the current block is the right side column in the current block, and the horizontal edge of the current block is the bottom side row in the current block.

[0294] In the above scheme, the second determination unit 901 is further configured to determine the candidate position of the candidate pixel on the edge of the current block, wherein the edge of the current block is the vertical edge or the horizontal edge of the current block; and select pixels located at the candidate position from the first reference pixel set, and form the selected pixels into the reference pixel subset.

[0295] In the above solution, the second determining unit 901 is further configured to determine the candidate position of the candidate pixel according to the position of the pixel in the first reference pixel set.

[0296] In the above solution, the second determining unit 901 is further configured to determine the candidate position of the candidate pixel according to the image component intensity of the pixel in the first reference pixel set.

[0297] In the above solution, the second determining unit 901 is further configured to determine the candidate position of the candidate pixel according to the position and image component intensity of the pixel in the first reference pixel set.

[0298] In the above solution, the second determining unit 901 is further configured to determine a preset number of candidate pixels, wherein the preset number of candidate pixels indicates the number of pixels selected from the edge of the current block;

[0299] Determine the candidate position of the candidate pixel based on the first preset number of pixels and the length of the side of the current block; wherein the length of the side of the current block is equal to the number of reference pixels in the first reference pixel set located on the side of the current block.

[0300] In the above solution, the second calculation unit 902 is further configured to calculate the first sampling interval according to the length of the side of the current block and the preset number of candidate pixels.

[0301] In the above solution, the second adjusting unit 905 is configured to adjust the first sampling interval to obtain a second sampling interval.

[0302] In the above solution, the second determining unit 901 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on the edge of the current block starting from the reference point at the first sampling interval.

[0303] In the above solution, the second determining unit 901 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on both sides of the reference point at the first sampling interval.

[0304] In the above solution, the second determining unit 901 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on the edge of the current block starting from the reference point at the second sampling interval.

[0305] In the above solution, the second determining unit 901 is further configured to determine a reference point on the edge of the current block, and determine candidate positions on both sides of the reference point at the second sampling interval.

[0306] In the above scheme, the second determination unit 901 is further configured to determine a reference point on the edge of the current block, determine the candidate position corresponding to one side of the reference point using the first sampling interval, and determine the candidate position corresponding to the other side of the reference point using the second sampling interval.

[0307] In the above scheme, the second determination unit 901 is further configured to determine a preset skip pixel number K of the edge of the current block, where K is a non-negative integer; and set the Kth pixel position from the end position of the edge of the current block as the reference point; where the end position of the edge of the current block is the starting pixel position or the end pixel position of the edge of the current block.

[0308] In the above scheme, the second calculation unit 902 is further configured to calculate the model parameters of the prediction model using the reference pixels in the reference pixel subset and the pixels of the reference block of the current block that are located at the same position as the reference pixels in the reference pixel subset; wherein, the pixels at the same position as the reference pixels in the reference pixel subset are pixels located in the image where the reference block is located, and whose relative position with the reference block is the same as the relative position between the reference pixels in the second reference pixel set and the current block.

[0309] In the above solution, the second calculation unit 902 is further configured to calculate the predicted value of the to-be-predicted image component of the current block according to the prediction model and the reference block of the current block.

[0310] In the above solution, the reference block is an image block indicated by the inter-frame prediction parameter of the current block.

[0311] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.

[0312] If the integrated unit is implemented as a software functional module and not sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer storage medium that stores an image component prediction program. When executed by a second processor, the image component prediction program implements any of the methods described in the aforementioned embodiments.

[0313] Based on the above-mentioned components of the decoder 90 and the computer storage medium, see Figure 10 , which shows the specific hardware structure of the decoder 90 provided in the embodiment of the present application, which may include: a second communication interface 1001, a second memory 1002 and a second processor 1003; each component is coupled together via a second bus system 1004. It is understood that the second bus system 1004 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 1004 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 10 In FIG, various buses are labeled as a second bus system 1004.

[0314] The second communication interface 1001 is used to receive and send signals during the process of sending and receiving information with other external network elements;

[0315] The second memory 1002 is used to store computer programs that can be run on the second processor 1003;

[0316] The second processor 1003 is configured to, when running the computer program, execute:

[0317] Determining a first reference pixel set of a to-be-predicted image component of a current block;

[0318] Determining a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set;

[0319] The reference pixel subset is used to calculate model parameters of a prediction model, wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block.

[0320] Optionally, as another embodiment, the second processor 1003 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

[0321] It can be understood that the hardware functions of the second memory 1002 and the first memory 802 are similar, and the hardware functions of the second processor 1003 and the first processor 803 are similar; they will not be described in detail here.

[0322] This embodiment provides a decoder, which may include a second determination unit and a second calculation unit, wherein the second determination unit is configured to determine a first reference pixel set of the image component to be predicted of the current block; and is also configured to determine a reference pixel subset from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set; the second calculation unit is configured to use the reference pixel subset to calculate model parameters of a prediction model; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block; in this way, due to the screening processing of the first reference pixel set, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the first reference pixel set, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; since the prediction model is used to realize the prediction processing of the image component to be predicted through the model parameters, the prediction accuracy of the image component to be predicted is improved, and the prediction efficiency of the video image is improved.

[0323] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0324] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

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

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

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

[0328] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0329] Industrial Applicability

[0330] In an embodiment of the present application, a first reference pixel set of the image component to be predicted of the current block is first determined; then a reference pixel subset is determined from the first reference pixel set; wherein the reference pixel subset includes one or more candidate pixels selected from the first reference pixel set; and then the model parameters of the prediction model are calculated using the reference pixel subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted of the current block; in this way, since the first reference pixel set is screened, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the first reference pixel set, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; since the prediction model is used to realize the prediction processing of the image component to be predicted through the model parameters, the prediction accuracy of the image component to be predicted is improved, and the prediction efficiency of the video image is improved.

Claims

1. A method for predicting image components, applied to a decoder, comprising: Determining a first reference sample set of a to-be-predicted image component of a current block; Determining a reference sample subset from the first reference sample set; wherein the reference sample subset includes one or more candidate samples selected from the first reference sample set; Calculating model parameters of a prediction model according to positions of reference samples in the reference sample subset; wherein the prediction model is used to perform prediction processing on the to-be-predicted image component of the current block.

2. The method according to claim 1, wherein The method further comprises: A prediction value of a to-be-predicted image component of the current block is calculated according to model parameters of the prediction model and a reference block of the current block.

3. The method according to claim 2, wherein: The reference block is an image block indicated by the inter-frame prediction parameter of the current block.

4. The method according to claim 1, wherein The determining of a first reference sample set of a to-be-predicted image component of a current block comprises: Acquire reference samples adjacent to at least one side of the current block, and obtain the first reference sample set based on the acquired reference samples; or One or more first neighboring samples of the current block are determined as the first reference sample set.

5. The method according to claim 1, wherein The determining of a first reference sample set of a to-be-predicted image component of a current block comprises: Acquire, within a reconstructed block, a reference sample adjacent to at least one side of the reconstructed block; wherein the reconstructed block is an image block adjacent to the current block, and the at least one side of the reconstructed block includes: a lower side edge, a right side edge, or a lower side edge and a right side edge; The first reference sample set is obtained according to the acquired reference samples.

6. The method according to claim 1, wherein The determining of a reference sample subset from the first reference sample set includes: determining candidate positions of the one or more candidate samples based on at least one edge of the current block or the reconstructed block; A reference sample corresponding to the candidate position is selected from the first reference sample set, and the selected parameter samples are used to form the reference sample subset.

7. The method according to claim 6, wherein: The determining, based on at least one edge of the current block or the reconstructed block, candidate positions of the one or more candidate samples includes: Determining candidate positions of the one or more candidate samples based on the sample positions corresponding to the at least one edge-adjacent reference sample; or, determining candidate positions of the one or more candidate samples based on image component intensity values corresponding to the at least one edge-adjacent reference sample; or Determine candidate positions of the one or more candidate samples based on the sample positions and image component intensity values corresponding to the at least one edge-adjacent reference sample.

8. The method according to claim 1, wherein The model parameters of the calculation prediction model include: Based on the reference sample subset, obtaining adjacent sample reconstructed values of the to-be-predicted image component corresponding to the current block and adjacent sample reconstructed values of the to-be-predicted image component corresponding to the reference block; wherein the current block is located in the Nth frame of the video image, and the reference block is located in the N-1th frame of the video image; The model parameters are calculated based on the reconstructed values of adjacent samples of the to-be-predicted image component corresponding to the current block and the reconstructed values of adjacent samples of the to-be-predicted image component corresponding to the reference block.

9. A method for predicting image components, applied to an encoder, the method comprising: Determining a first reference sample set of a to-be-predicted image component of a current block; Determining a reference sample subset from the first reference sample set; wherein the reference sample subset includes one or more candidate samples selected from the first reference sample set; Calculating model parameters of a prediction model according to positions of reference samples in the reference sample subset; wherein the prediction model is used to perform prediction processing on the to-be-predicted image component of the current block.

10. A code stream transmission method, wherein: The code stream is generated by the following steps: Determining a first reference sample set of a to-be-predicted image component of a current block; Determining a reference sample subset from the first reference sample set; wherein the reference sample subset includes one or more candidate samples selected from the first reference sample set; Calculating model parameters of a prediction model according to positions of reference samples in the reference sample subset; wherein the prediction model is used to perform prediction processing on the to-be-predicted image component of the current block; The model parameters are written into the code stream.

Citation Information

Patent Citations

  • Method and device for predicting block on basis of illumination compensation in image coding system

    CN107810635A

  • Modeling-based image decoding method and device in image coding system

    CN108293113A

  • Adaptive cross component residual prediction

    US20160219283A1