Image component prediction method and apparatus, and computer storage medium
By filtering and unifying the model parameter derivation process, the computational complexity problem of image component prediction in H.266/VVC was solved, achieving more efficient video coding processing.
Patent Information
- Application Number
- CN202310838522.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-25
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2039-06-25
AI Technical Summary
In image component prediction in the H.266/VVC video coding standard, the increased computational complexity and additional processing due to the difference in the number of adjacent reference pixels cannot be effectively solved by existing technologies.
By obtaining the reference pixel set corresponding to the image component to be predicted in the coded block of the video image, filtering and model parameter derivation are performed based on the number of valid pixels in the set. The model parameter derivation is only performed when the preset number is met, and the preset component value is used as the prediction value in other cases, thus unifying the model parameter derivation process and reducing computational complexity.
Without changing the encoding/decoding prediction performance, the computational complexity is reduced and the processing flow is simplified. In particular, when the number of effective pixels is insufficient, the preset value is used directly for prediction, avoiding additional processing.
Smart Images

Figure CN116962677B_ABST
Abstract
Description
[0001] Divisional Explanation
[0002] This application is a divisional application of PCT International Patent Application No. PCT / CN2019 / 092711, filed on June 25, 2019, entitled "Image Component Prediction Method, Device and Computer Storage Medium", which entered the Chinese national phase as Chinese Patent Application No. 201980091266.2. TECHNICAL FIELD
[0003] Embodiments of the present application relate to the technical field of video coding, and in particular to an image component prediction method, device and computer storage medium. BACKGROUND
[0004] With the increasing demand for video display quality, new video application forms such as high-definition and ultra-high-definition videos have emerged. H.265 / High Efficiency Video Coding (HEVC) has been unable to meet the needs of the rapid development of video applications, and the Joint Video Research Group (JVET) has proposed the next generation video coding standard H.266 / Versatile Video Coding (VVC). The corresponding test model is the reference software test platform (VTM) of VVC.
[0005] In VTM, an image component prediction method based on a prediction model has been integrated, through which the chroma component can be predicted from the luminance component of the current coding block (CB). However, when constructing the prediction model, the number of adjacent reference pixels used for model parameter derivation is different, which not only increases the additional processing, but also increases the computational complexity. SUMMARY
[0006] Embodiments of the present application provide an image component prediction method, device and computer storage medium, which unify the derivation process of model parameters without changing the coding prediction performance. In addition, for the case where the number of effective pixels in the adjacent reference pixel set is less than the preset number, no additional processing module is added, so that no additional processing is required, and the computational complexity is also reduced.
[0007] The technical solutions of the embodiments of the present application can be implemented as follows:
[0008] In a first aspect, the embodiments of the present application provide an image component prediction method, which comprises:
[0009] acquire a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image;
[0010] when the number of valid pixels in the first reference pixel set is less than the preset number, set a preset component value as a prediction value corresponding to the to-be-predicted image component;
[0011] when the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, screen the first reference pixel set to obtain a second reference pixel set; wherein the number of valid pixels in the second reference pixel set is less than or equal to the preset number;
[0012] when the number of valid pixels in the second reference pixel set is less than the preset number, set a preset component value as a prediction value corresponding to the to-be-predicted image component;
[0013] when the number of valid pixels in the second reference pixel set is equal to the preset number, determine a model parameter through the second reference pixel set, and obtain a prediction model corresponding to the to-be-predicted image component according to the model parameter; wherein the prediction model is used to implement prediction processing on the to-be-predicted image component to obtain a prediction value corresponding to the to-be-predicted image component.
[0014] In a second aspect, an image component prediction device is provided, and the image component prediction device comprises an acquisition unit, a prediction unit and a screening unit, wherein,
[0015] the acquisition unit is configured to acquire a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image;
[0016] the prediction unit is configured to, when the number of valid pixels in the first reference pixel set is less than a preset number, set a preset component value as a prediction value corresponding to the to-be-predicted image component;
[0017] the screening unit is configured to, when the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, screen the first reference pixel set to obtain a second reference pixel set; wherein the number of valid pixels in the second reference pixel set is less than or equal to the preset number;
[0018] The prediction unit is further configured to, when the number of valid pixel points in the second reference pixel set is less than a preset number, take a preset component value as the prediction value corresponding to the image component to be predicted; and when the number of valid pixel points in the second reference pixel set is equal to the preset number, determine a model parameter through the second reference pixel set, and obtain a prediction model corresponding to the image component to be predicted according to the model parameter; wherein the prediction model is used to realize the prediction processing on the image component to be predicted, so as to obtain the prediction value corresponding to the image component to be predicted.
[0019] In a third aspect, an embodiment of the present application provides an image component prediction device, the image component prediction device comprising a memory and a processor.
[0020] The memory is configured to store a computer program capable of running on the processor.
[0021] The processor is configured to, when running the computer program, execute the method in the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a computer storage medium, the computer storage medium storing an image component prediction program, the image component prediction program being executed by at least one processor to implement the method in the first aspect.
[0023] The embodiment of the present application provides a kind of image component prediction method, device and computer storage medium, by obtaining the first reference pixel set corresponding to the image component to be predicted of the coding block in video image;When the number of effective pixel points in first reference pixel set is less than preset number, preset component value is used as the prediction value corresponding to the image component to be predicted;When the number of effective pixel points in first reference pixel set is greater than or equal to preset number, first reference pixel set is screened, and the second reference pixel set is obtained, and the number of effective pixel points in the second reference pixel set is less than or equal to preset number;When the number of effective pixel points in second reference pixel set is less than preset number, preset component value is used as the prediction value corresponding to the image component to be predicted;When the number of effective pixel points in second reference pixel set is equal to preset number, model parameters are determined by second reference pixel set, and the prediction model of the image component to be predicted is obtained according to model parameters, and the prediction model is used to realize the prediction processing of the image component to be predicted, to obtain the prediction value corresponding to the image component to be predicted;In this way, when the number of effective pixel points in first reference pixel set is less than preset number or the number of effective pixel points in second reference pixel set is less than preset number, preset default value is directly used as the prediction value corresponding to the image component to be predicted;Only when the number of effective pixel points in second reference pixel set meets preset number, model parameters are determined according to first reference pixel set to establish the prediction model of the image component to be predicted, so that the derivation process of model parameters is unified;In addition, for the case that the number of effective pixel points in first reference pixel set or second reference pixel set is less than preset number, especially when the number of effective pixel points is 0 or 2, since no additional processing module is added, preset default value is directly used as the prediction value corresponding to the image component to be predicted, so that additional processing is not needed, and the calculation complexity is also reduced. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 A distribution diagram of effective adjacent regions is provided for the embodiment of the present application;
[0025] Figure 2 A distribution diagram of selection regions in three modes is provided for the embodiment of the present application;
[0026] Figure 3 A composition block diagram of a video encoding system is provided for the embodiment of the present application;
[0027] Figure 4 A composition block diagram of a video decoding system is provided for the embodiment of the present application;
[0028] Figure 5 A flow diagram of an image component prediction method is provided for the embodiment of the present application;
[0029] Figure 6A A structure diagram of selecting adjacent reference pixel points in an INTRA_LT_CCLM mode according to an embodiment of the present application is provided;
[0030] Figure 6B A structure diagram of selecting adjacent reference pixel points in an INTRA_L_CCLM mode according to an embodiment of the present application is provided;
[0031] Figure 6C A structure diagram of selecting adjacent reference pixel points in an INTRA_T_CCLM mode according to an embodiment of the present application is provided;
[0032] Figure 7 A flow diagram of another image component prediction method according to an embodiment of the present application is provided;
[0033] Figure 8A A structure diagram of generating 0 effective pixel points in an INTRA_LT_CCLM mode according to an embodiment of the present application is provided;
[0034] Figure 8B A structure diagram of generating 0 effective pixel points in an INTRA_L_CCLM mode according to an embodiment of the present application is provided;
[0035] Figure 8C A structure diagram of generating 0 effective pixel points in an INTRA_T_CCLM mode according to an embodiment of the present application is provided;
[0036] Figure 9A A structure diagram of generating 2 effective pixel points in an INTRA_LT_CCLM mode according to an embodiment of the present application is provided;
[0037] Figure 9B A structure diagram of generating 2 effective pixel points in an INTRA_L_CCLM mode according to an embodiment of the present application is provided;
[0038] Figure 9C A structure diagram of generating 2 effective pixel points in an INTRA_T_CCLM mode according to an embodiment of the present application is provided;
[0039] Figure 10 A flow diagram of model parameter derivation according to an embodiment of the present application is provided;
[0040] Figure 11 A simplified flow diagram of model parameter derivation according to an embodiment of the present application is provided;
[0041] Figure 12 A simplified flow diagram of another model parameter derivation according to an embodiment of the present application is provided;
[0042] Figure 13 A schematic diagram of a component structure of an image component prediction device provided in an embodiment of the present application is shown in FIG. 1.
[0043] Figure 14 A schematic diagram of a specific hardware structure of an image component prediction device provided in an embodiment of the present application is shown in FIG. 2.
[0044] Figure 15 A schematic diagram of a component structure of an encoder provided in an embodiment of the present application is shown in FIG. 3.
[0045] Figure 16 A schematic diagram of a component structure of a decoder provided in an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION
[0046] In order to enable a person skilled in the art to more fully understand the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings, which are only used for reference and do not limit the embodiments of the present application.
[0047] In a video image, a first image component, a second image component and a third image component are generally used to represent a coding block; wherein the three image components are respectively a luminance component, a blue chroma component and a red chroma component, specifically, the luminance component is usually represented by the symbol Y, the blue chroma component is usually represented by the symbol Cb or U, and the red chroma component is usually represented by the symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.
[0048] In the embodiments of the present application, the first image component can be a luminance component, the second image component can be a blue chroma component, and the third image component can be a red chroma component, but the embodiments of the present application are not limited in this regard.
[0049] In the current video image or video coding process, for the cross-component prediction technology, mainly including Cross-component Linear Model Prediction (CCLM) mode and Multi-Directional Linear Model Prediction (MDLM) mode, whether the model parameters derived according to the CCLM mode or the model parameters derived according to the MDLM mode, the corresponding prediction model can realize the prediction between the first image component and the second image component, the second image component and the first image component, the first image component and the third image component, the third image component and the first image component, the second image component and the third image component, or the third image component and the second image component.
[0050] Taking the prediction from the first image component to the second image component as an example, in order to reduce the redundancy between the first image component and the second image component, a CCLM mode is used in VVC, at this time the first image component and the second image component are the same coding block, that is, the prediction value of the second image component is constructed according to the first image component reconstructed value of the same coding block, as shown in formula (1),
[0051] Pred C [i,j]=α·Rec L [i,j]+β (1)
[0052] Wherein, i,j represents the position coordinates of the pixel points in the coding block, i represents the horizontal direction, and j represents the vertical direction, Pred C [i,j] represents the second image component prediction value corresponding to the pixel point with position coordinates [i,j] in the coding block, Pred L [i,j] represents the first image component reconstructed value corresponding to the pixel point with (down-sampled) position coordinates [i,j] in the same coding block, and α and β represent model parameters.
[0053] For a coding block, its neighboring regions can include a left neighboring region, an upper neighboring region, a lower-left neighboring region and an upper-right neighboring region. In VVC, three kinds of cross-component linear model prediction modes can be included, which are respectively: an intra CCLM mode of left and upper neighboring (which can be represented by INTRA_LT_CCLM mode), an intra CCLM mode of left and lower-left neighboring (which can be represented by INTRA_L_CCLM mode) and an intra CCLM mode of upper and upper-right neighboring (which can be represented by INTRA_T_CCLM mode). In these three modes, a preset number (such as 4) of neighboring reference pixel points can be selected for derivation of model parameters α and β, and the biggest difference among the three modes is that the selection regions corresponding to the neighboring reference pixel points used for derivation of model parameters α and β are different.
[0054] Specifically, for the coding block corresponding to the second image component with a size of WxH, it is assumed that the upper selection region corresponding to the neighboring reference pixel points is W', and the left selection region corresponding to the neighboring reference pixel points is H'; in this way,
[0055] For the INTRA_LT_CCLM mode, the neighboring reference pixel points can be selected in the upper neighboring region and the left neighboring region, that is, W' = W and H' = H;
[0056] For the INTRA_L_CCLM mode, the neighboring reference pixel points can be selected in the left neighboring region and the lower-left neighboring region, that is, H' = W + H, and W' = 0 is set;
[0057] For INTRA_T_CCLM mode, the neighboring reference pixels can be selected from the top neighboring region and the top-right neighboring region, i.e., W' = W + H, and H' = 0.
[0058] It should be noted that in the latest VVC reference software VTM5.0, only the pixels in the range of W are stored in the top-right neighboring region at most, and only the pixels in the range of H are stored in the bottom-left neighboring region at most; therefore, although the selection region of the INTRA_L_CCLM mode and the INTRA_T_CCLM mode is defined as W + H, in actual application, the selection region of the INTRA_L_CCLM mode will be limited within H + H, and the selection region of the INTRA_T_CCLM mode will be limited within W + W; in this way,
[0059] For INTRA_L_CCLM mode, the neighboring reference pixels can be selected from the left neighboring region and the bottom-left neighboring region, H' = min{W + H, H + H}.
[0060] For INTRA_T_CCLM mode, the neighboring reference pixels can be selected from the top neighboring region and the top-right neighboring region, W' = min{W + H, W + W}.
[0061] Referring to Figure 1 , a distribution diagram of an effective neighboring region provided by an embodiment of the present application is shown. In Figure 1 , the left neighboring region, the bottom-left neighboring region, the top neighboring region and the top-right neighboring region are all effective. On the basis of Figure 1 , the selection regions of the three modes are as shown in Figure 2 . Among them, in Figure 2 , (a) represents the selection region of the INTRA_LT_CCLM mode, including the left neighboring region and the top neighboring region; (b) represents the selection region of the INTRA_L_CCLM mode, including the left neighboring region and the bottom-left neighboring region; (c) represents the selection region of the INTRA_T_CCLM mode, including the top neighboring region and the top-right neighboring region. In this way, after the selection regions of the three modes are determined, the selection of the reference points for model parameter derivation can be performed in the selection regions. The reference points thus selected can be referred to as neighboring reference pixels, and the number of the neighboring reference pixels is generally at most 4; and for a coding block with a size determined as W x H, the positions of the neighboring reference pixels are generally determined.
[0062] However, for some special cases, such as the boundary condition of the coding block, the unpredictable condition, and the condition that the coding order causes the adjacent reference pixels to be unable to be obtained, or even the condition that the coding block is divided according to the tile or slice, the adjacent area may also have the invalid possibility, so that the number of the adjacent reference pixels selected from the adjacent area is less than 4, that is, 0 or 2 adjacent reference pixels may be selected; the number of the adjacent reference pixels used for the model parameter derivation is not uniform, thereby increasing the additional "copy" operation and improving the calculation complexity.
[0063] Without changing the coding prediction performance, in order to unify the derivation process of the model parameters and reduce the calculation complexity, an image component prediction method is provided in the embodiments of the present application, the first reference pixel set corresponding to the image component to be predicted of the coding block in the video image is obtained; when the number of the valid pixels in the first reference pixel set is less than a preset number, the preset component value is taken as the prediction value corresponding to the image component to be predicted; when the number of the valid pixels in the first reference pixel set is greater than or equal to the preset number, the first reference pixel set is screened to obtain the second reference pixel set, and the number of the valid pixels in the second reference pixel set is less than or equal to the preset number; when the number of the valid pixels in the second reference pixel set is less than the preset number, the preset component value is taken as the prediction value corresponding to the image component to be predicted; when the number of the valid pixels in the second reference pixel set is equal to the preset number, the model parameters are determined through the first reference pixel set, and the prediction model corresponding to the image component to be predicted is obtained according to the model parameters; wherein the prediction model is used to realize the prediction processing of the image component to be predicted, so as to obtain the prediction value corresponding to the image component to be predicted; in this way, for the case that the number of the valid pixels in the first reference pixel set is less than the preset number or the case that the number of the valid pixels in the second reference pixel set is less than the preset number, the CCLM mode is disabled, and the preset default value is directly taken as the prediction value corresponding to the image component to be predicted, and since no additional processing module is added, the calculation complexity is reduced; in addition, only when the number of the valid pixels in the second reference pixel set is the preset number, the derivation of the model parameters is performed, that is, the CCLM mode is executed, so that the derivation process of the model parameters is also unified.
[0064] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0065] Referring to Figure 3 which shows an example of the component block diagram of a video coding system provided by the embodiments of the present application; as Figure 3As shown, the video coding system 300 includes a transform and quantization unit 301, an intra estimation unit 302, an intra prediction unit 303, a motion compensation unit 304, a motion estimation unit 305, an inverse transform and inverse quantization unit 306, a filter control analysis unit 307, a filter unit 308, an encoding unit 309, and a decoded picture buffer unit 310, etc. The filter unit 308 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 309 can implement header information encoding and context-based adaptive binary arithmatic coding (CABAC). For an input raw video signal, a video coding block can be obtained by division of a coding tree unit (CTU), and then the residual pixel information obtained after intra or inter prediction is transformed by the transform and quantization unit 301, including transforming the residual information from pixel domain to transform domain, and quantizing the obtained transform coefficients to further reduce bit rate. The intra estimation unit 302 and the intra prediction unit 303 are used for intra prediction of the video coding block. Specifically, the intra estimation unit 302 and the intra prediction unit 303 are used to determine an intra prediction mode to be used to encode the video coding block. The motion compensation unit 304 and the motion estimation unit 305 are used to perform inter prediction encoding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. Motion estimation performed by the motion estimation unit 305 is a process of generating a motion vector that can estimate the motion of the video coding block, and then motion compensation is performed by the motion compensation unit 304 based on the motion vector determined by the motion estimation unit 305. After the intra prediction mode is determined, the intra prediction unit 303 is also used to provide the selected intra prediction data to the encoding unit 309, and the motion estimation unit 305 also sends the calculated determined motion vector data to the encoding unit 309. In addition, the inverse transform and inverse quantization unit 306 is used for reconstruction of the video coding block, reconstructing a residual block in the pixel domain, removing blockiness artifacts by the filter control analysis unit 307 and the filter unit 308, and then adding the reconstructed residual block to a predictive block in one of the frames of the decoded picture buffer unit 310 to generate a reconstructed video coding block. The encoding unit 309 is used to encode various encoding parameters and quantized transform coefficients, and in the CABAC-based encoding algorithm, the context content can be based on neighboring coding blocks, which can be used to encode information indicating the determined intra prediction mode, and output a bitstream of the video signal. The decoded picture buffer unit 310 is used to store reconstructed video coding blocks for predictive reference.As video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoding image buffer unit 310.
[0066] See Figure 4 It illustrates an example block diagram of a video decoding system provided in an embodiment of this application; as shown Figure 4 As shown, the video decoding system 400 includes a decoding unit 401, an inverse transform and inverse quantization unit 402, an intra-frame prediction unit 403, a motion compensation unit 404, a filtering unit 405, and a decoding image buffer unit 406. The decoding unit 401 can perform header information decoding and CABAC decoding, while the filtering unit 405 can perform deblocking filtering and SAO filtering. The input video signal is processed... Figure 2 After encoding, the video signal bitstream is output. This bitstream is input into the video decoding system 400, first passing through the decoding unit 401 to obtain the decoded transform coefficients. These transform coefficients are then processed by the inverse transform and inverse quantization unit 402 to generate residual blocks in the pixel domain. The intra-frame prediction unit 403 can generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in the current frame or image. The motion compensation unit 404 determines the prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses this prediction information... The information is used to generate a predictive block of the video block being decoded; the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 402 with the corresponding predictive block generated by the intra-prediction unit 403 or the motion compensation unit 404; the decoded video signal is passed through the filtering unit 405 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 406, which stores reference images for subsequent intra-prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.
[0067] The image component prediction method in this application embodiment is mainly applied in, for example, Figure 3 The intra-prediction unit 303 shown and as follows Figure 4The shown intra prediction unit 403 part is specifically applied to the CCLM prediction part in intra prediction. That is, the image component prediction method in the embodiment of the present application can be applied to a video encoding system, a video decoding system, or both, but the embodiment of the present application does not make specific limitations. When the method is applied to the intra prediction unit 303 part, the "coding block in a video image" specifically refers to a current coding block in intra prediction; when the method is applied to the intra prediction unit 403 part, the "coding block in a video image" specifically refers to a current decoding block in intra prediction.
[0068] Based on the above Figure 3 or Figure 4 application scenario examples, see Figure 5 , which shows a flowchart of an image component prediction method provided by an embodiment of the present application. As Figure 5 indicated, the method can include:
[0069] S501: Obtain a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image;
[0070] It should be noted that the video image can be divided into multiple coding blocks, each coding block can include a first image component, a second image component, and a third image component, and the coding block in the embodiment of the present application is a current block to be encoded in the video image. When the first image component needs to be predicted by a prediction model, the to-be-predicted image component is the first image component; when the second image component needs to be predicted by a prediction model, the to-be-predicted image component is the second image component; when the third image component needs to be predicted by a prediction model, the to-be-predicted image component is the third image component.
[0071] It should also be noted that when the left adjacent region, the lower left adjacent region, the upper adjacent region, and the upper right adjacent region are all valid regions, for the INTRA_LT_CCLM mode, the first reference pixel set is composed of adjacent reference pixel points in the left adjacent region and the upper adjacent region of the coding block, as shown in (a) of Figure 2 ; for the INTRA_L_CCLM mode, the first reference pixel set is composed of adjacent reference pixel points in the left adjacent region and the lower left adjacent region of the coding block, as shown in (b) of Figure 2 ; for the INTRA_T_CCLM mode, the first reference pixel set is composed of adjacent reference pixel points in the upper adjacent region and the upper right adjacent region of the coding block, as shown in (c) of Figure 2 .
[0072] In some embodiments, alternatively, for S501, the acquiring the first reference pixel set corresponding to the to-be-predicted image component of the coding block in the video image can comprise:
[0073] S501a-1: acquiring reference pixel points adjacent to at least one side of the coding block; wherein the at least one side comprises a left side of the coding block and / or an upper side of the coding block;
[0074] S501a-2: composing the first reference pixel set corresponding to the to-be-predicted image component based on the reference pixel points.
[0075] It should be noted that the at least one side of the coding block can comprise the left side of the coding block and / or the upper side of the coding block; that is, the at least one side of the coding block can refer to the upper side of the coding block, or can refer to the left side of the coding block, or can even refer to the upper side and the left side of the coding block, and the embodiments of the present application do not make specific limitation.
[0076] In this way, for the INTRA_LT_CCLM mode, when the left adjacent region and the upper adjacent region are all valid regions, the first reference pixel set can be composed of the reference pixel points adjacent to the left side of the coding block and the reference pixel points adjacent to the upper side of the coding block; when the left adjacent region is a valid region and the upper adjacent region is an invalid region, the first reference pixel set can be composed of the reference pixel points adjacent to the left side of the coding block; when the left adjacent region is an invalid region and the upper adjacent region is a valid region, the first reference pixel set can be composed of the reference pixel points adjacent to the upper side of the coding block.
[0077] In some embodiments, alternatively, for S501, the acquiring the first reference pixel set corresponding to the to-be-predicted image component of the coding block in the video image can comprise:
[0078] S501b-1: acquiring reference pixel points in a reference row or a reference column adjacent to the coding block; wherein the reference row is composed of a row adjacent to the upper side and the right upper side of the coding block, and the reference column is composed of a column adjacent to the left side and the left lower side of the coding block;
[0079] S501b-2: composing the first reference pixel set corresponding to the to-be-predicted image component based on the reference pixel points.
[0080] It should be noted that the reference row adjacent to the coding block can be composed of the rows adjacent to the upper side and the upper right side of the coding block, the reference column adjacent to the coding block can be composed of the columns adjacent to the left side and the lower left side of the coding block; the reference row or the reference column adjacent to the coding block can refer to the reference row adjacent to the upper side of the coding block, can refer to the reference column adjacent to the left side of the coding block, or can even refer to the reference row or the reference column adjacent to other sides of the coding block, and the embodiments of the present application are not limited specifically. For the convenience of description, in the embodiments of the present application, the reference row adjacent to the coding block is described by taking the reference row adjacent to the upper side as an example, and the reference column adjacent to the coding block is described by taking the reference column adjacent to the left side as an example.
[0081] The reference pixel points in the reference row adjacent to the coding block can include the reference pixel points adjacent to the upper side and the upper right side (also referred to as the adjacent reference pixel points corresponding to the upper side and the upper right side), wherein the upper side represents the upper side of the coding block, and the upper right side represents the upper side of the coding block horizontally extended to the right by a length of the same height as the current coding block; the reference pixel points in the reference column adjacent to the coding block can also include the reference pixel points adjacent to the left side and the lower left side (also referred to as the adjacent reference pixel points corresponding to the left side and the lower left side), wherein the left side represents the left side of the coding block, and the lower left side represents the left side of the coding block vertically extended downward by a length of the same width as the current coding block; but the embodiments of the present application are not limited specifically.
[0082] In this way, for the INTRA_L_CCLM mode, when the left adjacent region and the lower left adjacent region are valid regions, the first reference pixel set can be composed of the reference pixel points in the reference column adjacent to the coding block; for the INTRA_T_CCLM mode, when the upper adjacent region and the upper right adjacent region are valid regions, the first reference pixel set can be composed of the reference pixel points in the reference row adjacent to the coding block.
[0083] S502: When the number of valid pixel points in the first reference pixel set is less than a preset number, a preset component value is taken as the prediction value corresponding to the to-be-predicted image component;
[0084] It should be noted that the number of valid pixels can be determined according to the validity of the adjacent region, or can be determined according to the number of valid pixels in the selected region. For some special cases, such as the boundary condition of the coding block, the unpredictable condition, and the condition that the coding order causes the adjacent reference pixels to be unable to be obtained, and even the condition that the coding block is divided according to the tile and slice, at this time, the left adjacent region, the lower left adjacent region, the upper adjacent region, and the upper right adjacent region are not all valid regions, and there may be invalid regions, so that the number of valid pixels in the selected region is less than the preset number, so that the number of valid pixels in the first reference pixel set is less than the preset number.
[0085] It should be further noted that the preset number is a preset determination value of the number of valid pixels, which is used to measure whether the model parameter derivation and the step of constructing the prediction model are performed on the to-be-predicted image component; wherein the preset number can be 4, but the embodiments of the present application are not limited thereto. In this way, assuming that the preset number is 4, that is, when the number of valid pixels in the first reference pixel set is 0 or 2, the preset component value can be directly used as the prediction value corresponding to the to-be-predicted image component, so as to reduce the calculation complexity.
[0086] In addition, the preset component value is used to represent a preset fixed value (which can also be called a default value) corresponding to the to-be-predicted image component. Wherein, the preset component value is mainly related to the bit information of the current video image. Therefore, in some embodiments, for S502, when the number of valid pixels in the first reference pixel set is less than the preset number, the preset component value is used as the prediction value corresponding to the to-be-predicted image component, which can include:
[0087] S502a: determining a preset component range corresponding to the to-be-predicted image component based on the bit information of the video image;
[0088] S502b: determining a middle value of the preset component range as the prediction value corresponding to the to-be-predicted image component according to the preset component range; wherein the middle value is represented as the preset component value.
[0089] It should be noted that in the embodiments of the present application, the middle value of the preset component range corresponding to the to-be-predicted image component can be used as the preset component value, and then used as the prediction value corresponding to the to-be-predicted image component. Wherein, assuming that the bit depth of the to-be-predicted image component is represented as BitDepthC, the calculation method of the middle value of the to-be-predicted image component can be obtained as 1<<(BitDepthC-1); the calculation method can be specifically set according to the actual situation, and the embodiments of the present application are not limited thereto.
[0090] Exemplarily, taking the chroma component as an example, assuming that the current video image is an 8-bit video, the component range corresponding to the chroma component is 0-255, and the intermediate value is 128. At this time, the preset component value can be 128, i.e., the default value is 128. Assuming that the current video image is a 10-bit video, the component range corresponding to the chroma component is 0-1023, and the intermediate value is 512. At this time, the preset component value can be 512, i.e., the default value is 512. In the embodiment of the present application, the bit information of the video image is taken as an example of 10 bits, i.e., the preset component value is 512.
[0091] Further, in some embodiments, after the preset component value is taken as the prediction value corresponding to the to-be-predicted image component, the method can further include, for S502:
[0092] S502c: for each pixel point in the coding block, the to-be-predicted image component of each pixel point is filled with the preset component value.
[0093] It should be noted that for the case where the number of valid pixel points in the first reference pixel set is less than the preset number, no additional processing module is needed, and the fixed default value is directly used to fill the prediction value of the to-be-predicted image component in the coding block.
[0094] Exemplarily, assuming that the preset component value is 512 and the to-be-predicted image component is the chroma component, the chroma prediction value corresponding to each pixel point in the coding block can be directly filled with 512.
[0095] S503: when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, the first reference pixel set is screened to obtain a second reference pixel set;
[0096] It should be noted that in the first parameter pixel set, there can be some unimportant reference pixel points (such as reference pixel points with poor correlation) or some abnormal reference pixel points. In order to ensure the accuracy of the prediction model, these reference pixel points need to be removed, thereby obtaining the second reference pixel set. The number of valid pixel points in the second reference pixel set is less than or equal to the preset number. In actual application, the preset number is usually 4, but the present embodiment is not limited in this regard.
[0097] It should be further explained that when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, the first reference pixel set can also be screened to obtain a second reference pixel set at this time; after obtaining the second reference pixel set, it is still necessary to judge according to the number of valid pixel points in the second reference pixel set and the preset number; wherein if the number of valid pixel points in the second reference pixel set is less than the preset number, the preset component value can be used as the prediction value corresponding to the to-be-predicted image component at this time; if the number of valid pixel points in the second reference pixel set is equal to the preset number, the model parameters can be derived according to the second reference pixel set at this time.
[0098] Further, in some embodiments, for S503, the screening of the first reference pixel set to obtain a second reference pixel set can include:
[0099] Based on the pixel position and / or image component intensity corresponding to each adjacent reference pixel point in the first reference pixel set, determine the to-be-selected pixel point position;
[0100] According to the determined to-be-selected pixel point position, select the valid pixel points corresponding to the to-be-selected pixel point position from the first reference pixel set, and compose the selected valid pixel points into a second reference pixel set; wherein the number of valid pixel points in the second reference pixel set is less than or equal to a preset number.
[0101] Specifically, the screening of the first reference pixel set can be screening according to the position of the to-be-selected reference pixel point, or screening according to the image component intensity (such as brightness value, chroma value, etc.), so as to compose the screened to-be-selected reference pixel points into a second reference pixel set. The following will be described taking the position of the to-be-selected reference pixel point as an example.
[0102] Suppose that the number of valid pixel point samples of the upper region and the upper-right region adjacent to the current coding block is numSampT, and the number of valid pixel point samples of the left region and the lower-left region adjacent to the current coding block is numSampL, and the screening process is as follows (wherein, availT represents the availability of the adjacent row of the current coding block, availL represents the availability of the left adjacent column of the current coding block, nTbW represents the width of the current coding block, and nTbH represents the height of the current coding block):
[0103] If the intra prediction mode of the current block is INTRA_LT_CCLM mode,
[0104] numSampT = availT? nTbW: 0
[0105] numSampL = availL? nTbH: 0
[0106] Otherwise,
[0107] numSampT = (availT && predModeIntra == INTRA_T_CCLM)? (nTbW + nTbH) : 0
[0108] numSampL = (availL && predModeIntra == INTRA_L_CCLM)? (nTbH + nTbW) : 0
[0109] numSampT = (availT && predModeIntra == INTRA_T_CCLM)? (nTbW + nTbH) : 0
[0110] numSampL = (availL && predModeIntra == INTRA_L_CCLM)? (nTbH + nTbW) : 0
[0111] Here, numTopRight represents the number of valid pixels in the right upper nTbW range, and numLeftBelow represents the number of valid pixels in the left lower nTbH range. The number of selected pixels on each side is denoted by cntN, the starting point position is denoted by startPosN, the selection interval is denoted by pickStepN, and the position of the pixel to be selected is denoted by pickPosN[pos], and the derivation process is as follows,
[0112] The variable numIs4N represents whether to select pixels only on one side:
[0113] numIs4N = ((availT && availL && predModeIntra == INTRA_LT_CCLM)? 0 : 1)
[0114] The variable startPosN represents the starting point position:
[0115] startPosN = numSampN > > (2 + numIs4N)
[0116] The variable pickStepN represents the selection interval:
[0117] pickStepN = Max(1, numSampN > > (1 + numIs4N))
[0118] Here, N is replaced by T and L respectively, which can represent the case of selecting pixels on the top side and the left side respectively, that is, N side represents T side or L side. If the availability availN of the N side is TRUE and the selected intra mode predModeIntra is INTRA_LT_CCLM mode or INTRA_N_CCLM mode, the number of selected pixels cntN and the position of the pixel to be selected pickPosN[pos] on the N side are as follows (it should be noted that the total number of selected pixels should be cntT+cntL):
[0119] cntN = Min(numSampN, (1 + numIs4N) << 1)
[0120] pickPosN[pos] = (startPosN + pos * pickStepN), with pos = 0...cntN-1
[0121] Otherwise, cntN is set to 0, that is, the number of selected pixels is 0.
[0122] Assume that the prediction samples of the current coding block are predSamples[x][y] with x = 0...nTbW-1, y = 0...nTbH-1, which are derived as follows,
[0123] If numSampL and numSampT are both invalid, they are set to a preset value, as follows,
[0124] predSamples[x][y] = 1 << (BitDepth C -1),
[0125] Otherwise,
[0126] First, obtain the luminance reconstructed samples pY[x][y] of the same position luminance block with x = 0...nTbW*2-1, y = 0...nTbH*2-1;
[0127] Second, obtain the adjacent luminance reconstructed samples pY[x][y]:
[0128] Third, obtain the down-sampled luminance reconstructed samples pDsY[x][y] with x = 0...nTbW-1, y = 0...nTbH-1
[0129] Fourth step, when numSampL is greater than 0, the chroma values of the selected left points pSelC[idx] are set to p[-1][pickPosL[idx]] with idx = 0...cntL-1, and the down-sampled reconstructed luma values of the selected left points pSelDsY[idx] are obtained with idx = 0...cntL-1.
[0130] Fifth step, when numSampT is greater than 0, the chroma values of the selected top points pSelC[idx] are set to p[pickPosT[idx-cntL]][-1] with idx = cntL...cntL+cntT-1, and the down-sampled reconstructed luma values of the selected top points pSelDsY[idx] are obtained with idx = 0...cntL+cntT-1.
[0131] Sixth step, when cntT+cntL is not equal to 0, the variables minY, maxY, minC and maxC are derived as follows,
[0132] When cntT+cntL is equal to 2, pSelComp[3] is set to pSelComp[0], pSelComp[2] is set to pSelComp[l], pSelComp[0] is set to pSelComp[l], and pSelComp[l] is set to pSelComp[3], where Comp is replaced by DsY and C respectively to denote the reconstructed luma and chroma of the selected neighboring samples.
[0133] The arrays minGrpIdx and maxGrpIdx are derived as follows,
[0134] minGrpIdx[0] = 0
[0135] minGrpIdx[l] = 2
[0136] maxGrpIdx[0] = 1
[0137] maxGrpIdx[l] = 3
[0138] When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[l]], minGrpIdx[0] and minGrpIdx[l] are swapped,
[0139] (minGrpIdx[0], minGrpIdx[l]) = Swap(minGrpIdx[0], minGrpIdx[l])
[0140] When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[l]], maxGrpIdx[0] and maxGrpIdx[l] are swapped,
[0141] (maxGrpIdx[0], maxGrpIdx[l]) = Swap(maxGrpIdx[0], maxGrpIdx[l])
[0142] When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[l]], the arrays minGrpIdx and maxGrpIdx are swapped,
[0143] (minGrpIdx, maxGrpIdx) = Swap(minGrpIdx, maxGrpIdx)
[0144] When pSelDsY[minGrpIdx[l]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[l] and maxGrpIdx[0] are swapped:
[0145] (minGrpIdx[l], maxGrpIdx[0]) = Swap(minGrpIdx[l], maxGrpIdx[0])
[0146] The variables maxY, maxC, minY and minC are calculated as follows (representing the mean of the two groups, respectively),
[0147] maxY = (pSelDsY[maxGrpIdx[0]] + pSelDsY[maxGrpIdx[l]] + 1) » 1
[0148] maxC = (pSelC[maxGrpIdx[0]] + pSelC[maxGrpIdx[l]] + 1) » 1
[0149] minY = (pSelDsY[minGrpIdx[0]] + pSelDsY[minGrpIdx[l]] + 1) » 1
[0150] minC = (pSelC[minGrpIdx[0]] + pSelC[minGrpIdx[l]] + 1) » 1
[0151] In the seventh step, the derivation process of the linear model parameters a, b and k is as follows (here, a is the slope (difference in chroma divided by difference in luminance), b is the intercept, and k is the shift to a to save a in integer type),
[0152] When numSampL is equal to 0 and numSampT is equal to 0,
[0153] k = 0
[0154] a = 0
[0155] b = 1 « (BitDepth C - 1)
[0156] Otherwise,
[0157] diff = maxY - minY
[0158] If diff is not equal to 0, then,
[0159] diffC = maxC - minC
[0160] x = Floor(Log2(diff))
[0161] normDiff = ((diff « 4) » x) & 15
[0162] x += (normDiff!= 0)? 1 : 0
[0163] y = Floor(Log2(Abs(diffC))) + 1
[0164] a = (diffC * (divSigTable[normDiff] » 8) + 2 y-1 ) » y
[0165] k = ((3 + x - y) < 1)? 1 : 3 + x - y
[0166] a = ((3 + x - y) < 1)? Sign(a) * 15 : a
[0167] b = minC - ((a * minY) » k)
[0168] where divSigTable[] is, divSigTable[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0}
[0169] Otherwise (when diff is equal to 0),
[0170] k = 0
[0171] a = 0
[0172] b = minC
[0173] In the eighth step, the chroma prediction samples predSamples[x][y] with x = 0...nTbW-1, y = 0...nTbH-1 are calculated as follows (where Clip1C is clipping the prediction value to the range 0-1023),
[0174] predSamples[x][y] = Clip1C(((pDsY[x][y] * a) » k) + b)
[0175] For example, the selection of 4 neighboring reference pixels is described. Assuming that the positions of the reference pixels in the upper selection region W' are S[0,-1],...,S[W'-1,-1], and the positions of the reference pixels in the left selection region H' are S[-1,0],...,S[-1,H'-1], the selection of 4 neighboring reference pixels is as follows:
[0176] For the INTRA_LT_CCLM mode, when both the upper neighboring region and the left neighboring region are valid, 2 reference pixels to be selected can be selected in the upper selection region W', and the positions of the 2 reference pixels to be selected are S[W' / 4,-1] and S[3W' / 4,-1], respectively. 2 reference pixels to be selected can be selected in the left selection region H', and the positions of the 2 reference pixels to be selected are S[-1,H' / 4] and S[-1,3H' / 4], respectively. The 4 reference pixels to be selected form a second reference pixel set, as shown in Figure 6A In the Figure 6A , the left neighboring region and the upper neighboring region of the coding block are both valid, and in order to keep the luminance component and the chroma component having the same resolution, down-sampling processing needs to be performed on the luminance component, so that the down-sampled luminance component and the chroma component have the same resolution.
[0177] For the INTRA_L_CCLM mode, when only the left neighboring region and the lower-left neighboring region are valid, 4 reference pixels to be selected can be selected in the left selection region H', and the positions of the 4 reference pixels to be selected are S[-1,H' / 8], S[-1,3H' / 8], S[-1,5H' / 8] and S[-1,7H' / 8], respectively. The 4 reference pixels to be selected form a second reference pixel set, as shown in Figure 6B In the Figure 6B , the left neighboring region and the lower-left neighboring region of the coding block are both valid, and in order to keep the luminance component and the chroma component having the same resolution, down-sampling processing needs to be performed on the luminance component, so that the down-sampled luminance component and the chroma component have the same resolution.
[0178] For the INTRA_T_CCLM mode, when only the top neighboring region and the top-right neighboring region are valid, four to-be-selected neighboring reference pixels can be filtered out in the top selection region W', and their corresponding positions are S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1] and S[7W' / 8, -1] respectively. The four to-be-selected neighboring reference pixels form a second reference pixel set as shown in FIG. 6. Figure 6C In the case shown in FIG. 6, the top neighboring region and the top-right neighboring region of the coding block are both valid, and in order to keep the luminance component and the chroma component having the same resolution, downsampling processing is still needed for the luminance component, so that the luminance component after downsampling has the same resolution as the chroma component. Figure 6C Thus, for the case that the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, the second reference pixel set can be obtained by filtering the first reference pixel set, and the second reference pixel set includes four valid pixels.
[0179] S504: When the number of valid pixels in the second reference pixel set is less than the preset number, a preset component value is taken as the prediction value corresponding to the to-be-predicted image component.
[0180] S505: When the number of valid pixels in the second reference pixel set is equal to the preset number, a model parameter is determined through the second reference pixel set, and a prediction model corresponding to the to-be-predicted image component is obtained according to the model parameter.
[0181] It should be noted that the second reference pixel set is obtained after the first reference pixel set is filtered. The number of valid pixels in the second reference pixel set can be less than the preset number, or greater than or equal to the preset number. If the number of valid pixels in the second reference pixel set is less than the preset number, a preset component value is directly taken as the prediction value corresponding to the to-be-predicted image component; if the number of valid pixels in the second reference pixel set is greater than or equal to the preset number, a model parameter is determined through the second reference pixel set, and a prediction model corresponding to the to-be-predicted image component is obtained according to the model parameter. It should be noted that the reference pixels used for deriving the model parameter are generally four, so after filtering, the second reference pixel set is either less than the preset number (the second reference pixel set has less than four valid pixels) or equal to the preset number (the second reference pixel set includes four valid pixels).
[0182]
[0183] It should be noted that the prediction model 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, such as a cross-component prediction technique of a multiple model CCLM (Multiple Model CCLM, MMLM), which is a nonlinear form composed of multiple linear models; the embodiments of the present application are not limited specifically. The prediction model can be used to implement prediction processing on the to-be-predicted image component to obtain a prediction value corresponding to the to-be-predicted image component.
[0184] After obtaining the second reference pixel set, if the number of valid pixel points in the second reference pixel set is equal to the preset number, the model parameters can be determined according to the second reference pixel set at this time. After deriving the model parameters, the prediction model corresponding to the chroma component can also be obtained according to the model parameters, as shown in equation (1); and then the prediction model is used to perform prediction processing on the chroma component to obtain a prediction value corresponding to the chroma component.
[0185] Further, in some embodiments, for S505, after obtaining the prediction model corresponding to the to-be-predicted image component according to the model parameters, the method can further include:
[0186] performing prediction processing on the to-be-predicted image component of each pixel point in the coding block based on the prediction model to obtain a prediction value corresponding to the to-be-predicted image component of each pixel point.
[0187] It should be noted that for the case where the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, the model parameters (such as α and β) need to be determined through the first reference pixel set at this time, and then the prediction model corresponding to the to-be-predicted image component is obtained according to the model parameters to obtain a prediction value corresponding to the to-be-predicted image component of each pixel point in the coding block. For example, assuming that the to-be-predicted image component is a chroma component, the prediction model corresponding to the chroma component can be obtained as shown in equation (1) according to the model parameters α and β; and then the prediction model shown in equation (1) is used to perform prediction processing on the chroma component of each pixel point in the coding block, so that a prediction value corresponding to the chroma component of each pixel point can be obtained.
[0188] In the embodiments of the present application, for the left adjacent region, the lower-left adjacent region, the upper adjacent region, and the upper-right adjacent region, there can be valid regions or invalid regions, which can result in that the number of valid pixel points selected from the adjacent regions can be less than the preset number. Therefore, in some embodiments, referring to Figure 7 , a flowchart of another image component prediction method provided by the embodiments of the present application is shown. As shown in Figure 7 , after S501, the method can further include:
[0189] S701: determine the number of valid pixels in the first reference pixel set, and determine whether the number of valid pixels is less than a preset number;
[0190] Further, after S503, the method can further include:
[0191] S702: determine whether the number of valid pixels in the second reference pixel set is less than a preset number.
[0192] It should be noted that the determination of the number of valid pixels can be obtained according to the effectiveness of the adjacent region. In this way, after the number of valid pixels is determined, by comparing the number of valid pixels with the preset number, when the number of valid pixels in the first reference pixel set is less than the preset number, step S502 is executed; when the number of valid pixels in the second reference pixel set is less than the preset number, step S504 is executed; when the number of valid pixels in the second reference pixel set is greater than or equal to the preset number, step S505 is executed.
[0193] It should be further noted that the preset number can be 4. The following will be described in detail with the preset number equal to 4 as an example.
[0194] In a possible implementation, when the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, since the reference pixels used for deriving the model parameter are generally 4, at this time, the first reference pixel set can be first screened to make the number of valid pixels in the first reference pixel set be 4; then the model parameter is derived according to the 4 valid pixels, and the prediction model corresponding to the to-be-predicted image component is obtained according to the model parameter, to obtain the prediction value corresponding to the to-be-predicted image component.
[0195] Specifically, it is assumed that the to-be-predicted image component is a chroma component, and the chroma component is predicted by a luminance component. It is assumed that the numbers of the 4 valid pixels selected by screening are 0, 1, 2, and 3. By comparing the 4 selected valid pixels, based on four comparisons, 2 pixel points with larger luminance values (which can include the pixel point with the largest luminance value and the pixel point with the second largest luminance value) and 2 pixel points with smaller luminance values (which can include the pixel point with the smallest luminance value and the pixel point with the second smallest luminance value) can be further selected. Further, two arrays minIdx[2] and maxIdx[2] can be set to store the two groups of pixel points, and initially, the valid pixel points with numbers 0 and 2 are put into minIdx[2], and the valid pixel points with numbers 1 and 3 are put into maxIdx[2], as follows,
[0196] Init: minIdx[2] = {0, 2}, maxIdx[2] = {1, 3}
[0197] After that, through four comparisons, it can make minIdx[2] store the two pixel points with smaller luminance values, and maxIdx[2] store the two pixel points with larger luminance values, which are as follows,
[0198] Step 1: if (L[minIdx[0]] > L[minIdx[1]], swap (minIdx[0], minIdx[1])
[0199] Step 2: if (L[maxIdx[0]] > L[maxIdx[1]], swap (maxIdx[0], maxIdx[1])
[0200] Step 3: if (L[minIdx[0]] > L[maxIdx[1]], swap (minIdx, maxIdx)
[0201] Step 4: if (L[minIdx[1]] > L[maxIdx[0]], swap (minIdx[1], maxIdx[0])
[0202] In this way, the two pixel points with smaller luminance values can be obtained, and the corresponding luminance values are represented by luma 0 min and luma 1 min respectively, and the corresponding chroma values are represented by chroma 0 min and chroma 1 min respectively; meanwhile, the two pixel points with larger luminance values can also be obtained, and the corresponding luminance values are represented by luma 0 max and luma 1 max respectively, and the corresponding chroma values are represented by chroma 0 max and chroma 1 max respectively. Further, the mean value of the luminance values corresponding to the two smaller pixel points is calculated, and the luminance value corresponding to the first mean point is represented by luma min ; the mean value of the luminance values corresponding to the two larger pixel points is calculated, and the luminance value corresponding to the second mean point is represented by luma max ; similarly, the chroma values corresponding to the two mean points are represented by chroma and chroma respectively.min and chroma max denotes, in particular, as shown below,
[0203] luma min = (luma 0 min + luma 1 min + 1) » 1
[0204] luma max = (luma 0 max + luma 1 max + 1) » 1
[0205] chroma min = (chroma 0 min + chroma 1 min + 1) » 1
[0206] chroma max = (chroma 0 max + chroma 1 max + 1) » 1
[0207] That is, after obtaining two mean points (luma min , chroma min ) and (luma max , chroma max ), the model parameters can be obtained from the two points by the calculation method of "two points determine a straight line". Specifically, the model parameters a and b can be calculated by formula (2),
[0208]
[0209] wherein the model parameter a is the slope in the prediction model, and the model parameter b is the intercept in the prediction model. In this way, after deriving the model parameters, the prediction model corresponding to the chroma component can be obtained according to the model parameters, as shown in formula (1); and then the prediction model is used for prediction processing on the chroma component to obtain the prediction value corresponding to the chroma component.
[0210] In another possible implementation, for some special cases, such as boundary conditions of the coding block, unpredictable conditions, and conditions in which the coding order causes neighboring reference pixels to be unavailable, or even conditions in which the coding block is divided according to tiles and slices, the left neighboring region, the left-bottom neighboring region, the top neighboring region, and the top-right neighboring region are not all valid regions, and there can be invalid regions, thereby causing the number of valid pixels in the first reference pixel set to be less than the preset number.
[0211] Thus, because the preset number is 4, in some embodiments, for S502, when the number of valid pixels in the first reference pixel set is less than the preset number, the preset component value is used as the prediction value corresponding to the image component to be predicted can include:
[0212] When the number of valid pixels in the first reference pixel set is 0 or 2, the preset component value is used as the prediction value corresponding to the image component to be predicted.
[0213] In some embodiments, for S504, when the number of valid pixels in the second reference pixel set is less than the preset number, the preset component value is used as the prediction value corresponding to the image component to be predicted can include:
[0214] When the number of valid pixels in the second reference pixel set is 0 or 2, the preset component value is used as the prediction value corresponding to the image component to be predicted.
[0215] That is, when the preset number is 4, whether the number of valid pixels in the first reference pixel set is less than the preset number or the number of valid pixels in the second reference pixel set is less than the preset number, the number of valid pixels is 0 or 2 at this time.
[0216] Specifically, when the total number of neighboring reference pixels in the selected region used by the coding block is 0, 0 valid pixels are selected at this time. The following three special cases will obtain 0 valid pixels:
[0217] The first case, for the INTRA_LT_CCLM mode, when the top neighboring region and the left neighboring region are both invalid, the selected region W' = H' = 0 at this time, as shown in Figure 8A In Figure 8A , the gray diagonal filled region represents an invalid region;
[0218] The second case, for the INTRA_L_CCLM mode, when the left neighboring region and the left-bottom neighboring region are both invalid, the selected region H' = 0 at this time, as shown in Figure 8B In Figure 8BIn the middle, the gray diagonal-filled area indicates an invalid area;
[0219] In the third scenario, for INTRA_T_CCLM mode, when both the upper adjacent region and the upper right adjacent region are invalid, the selected region W' = 0, as shown below. Figure 8C As shown. In Figure 8C In the text, the gray diagonal-filled area indicates an invalid region.
[0220] It's also important to note that the determination of zero valid pixels is based on the validity of adjacent regions; that is, the number of valid pixels in the first reference pixel set can be determined by the validity of adjacent regions. When the number of valid pixels is zero, the model parameter α can be set to 0, and the model parameter β can be set to the preset component value corresponding to the image component to be predicted.
[0221] Assuming the image component to be predicted is the chrominance component, then the predicted values Pred corresponding to the chrominance components of all pixels in the current coding block can be calculated. C The values [i,j] are all filled with preset component values, i.e., the default values of the chroma components. In this embodiment, the default value is the median value of the chroma components. For example, assuming the current video image is an 8-bit video, the component range corresponding to the chroma components is 0 to 255, and the median value is 128. Therefore, the preset component value can be 128. Assuming the current video image is a 10-bit video, the component range corresponding to the chroma components is 0 to 1023, and the median value is 512. Therefore, the preset component value can be 512.
[0222] Specifically, when the total number of adjacent reference pixels within the selection area used by the coding block is 2, 2 valid pixels will be selected. Still assuming the coding block size is W×H, this only occurs with 2×N or N×2 coding blocks. Since the latest VVC reference software, VTM5.0, restricts the division of 2×2, 2×4, and larger coding blocks, these three sizes will not appear in the coding block division of video images; therefore, the value of N usually satisfies N≥8. The following three special cases will result in 2 valid pixels:
[0223] In the first case, for the INTRA_LT_CCLM mode, for 2×N or N×2 coded blocks (N≥8), when the adjacent region on the side with side length 2 is valid, while the adjacent region on the side with side length N is invalid, the selected region is W'=2, H'=0, or W'=0, H'=2, such as... Figure 9A As shown; in Figure 9A In the diagram, gray diagonal lines indicate invalid areas, while solid gray areas indicate valid areas.
[0224] In the second case, for the INTRA_L_CCLM mode, for an N×2 coded block (N≥8), when the left adjacent region with a side length of 2 is valid and the lower left adjacent region is invalid, the selected region is H'=2, such as... Figure 9B As shown; in Figure 9B In the diagram, gray diagonal lines indicate invalid areas, while solid gray areas indicate valid areas.
[0225] In the third case, for the INTRA_T_CCLM mode, for a 2×N coded block (N≥8), when the upper adjacent region with a side length of 2 is valid and the upper right adjacent region is invalid, the selected region is W'=2, such as... Figure 9C As shown; in Figure 9C In the diagram, gray diagonal lines indicate invalid areas, while solid gray areas indicate valid areas.
[0226] It should also be noted that the determination of two valid pixels can be based on the validity of adjacent regions, the number of valid pixels within the selected region, or other criteria. This embodiment does not impose any specific limitations. Thus, the number of valid pixels in the first reference pixel set can be determined based on the validity of adjacent regions.
[0227] In existing solutions, when there are two effective pixels, it is necessary to copy these two effective pixels to obtain four pixels. For example, assuming the four pixels are numbered 0, 1, 2, and 3, then number 0 is the second selected effective pixel; number 1 is the first selected effective pixel; number 2 is the second selected effective pixel; and number 3 is the first selected effective pixel. Then, based on the four pixels numbered 0, 1, 2, and 3, the model parameters α and β can be determined, thereby establishing the prediction model as shown in equation (1). Through this prediction model, the predicted values corresponding to the image components to be predicted can be obtained.
[0228] In this embodiment, for the case where there are two effective pixels, no additional "copying" operation is needed; the predicted values corresponding to the image components to be predicted are directly filled using fixed default values. That is, when there are two effective pixels, the model parameter α can be set to 0, and the model parameter β can be set to the preset component value corresponding to the image component to be predicted. Assuming the image component to be predicted is a chroma component, then the predicted values Pred corresponding to the chroma components of all pixels in the current coding block can be used. C The area [i,j] is filled with preset component values, which are the default values for the chromaticity components.
[0229] Thus, in the prior art solution, when the number of effective pixels is 2, in order to use the same processing module, an additional "copy" operation is needed to obtain 4 pixels, so that the derivation of the model parameters can be performed according to the same operation process when the number of effective pixels is 4, which increases the additional "copy" operation; moreover, the 4 pixels obtained still need to be compared four times and calculated four times to obtain the average, so as to further increase the calculation complexity; however, in the embodiment of the present application, the processing when the number of effective pixels is 2 is aligned with the processing when the number of effective pixels is 0, so that the same processing module can be directly used without increasing additional operations, thereby reducing the calculation complexity.
[0230] Referring to Figure 10 , a flowchart of model parameter derivation provided by an embodiment of the present application is shown. In Figure 10 , assuming that the image component to be predicted is a chroma component, first, adjacent reference pixels in the selected region are obtained to form a first adjacent reference pixel set; then the number of effective pixels in the first adjacent reference pixel set is determined; when the number of effective pixels is greater than or equal to 4, the first reference pixel set is filtered to obtain a second reference pixel set, and then the number of effective pixels in the second adjacent reference pixel set is determined; when the number of effective pixels in the first reference pixel set or the second reference pixel set is 0, the model parameter a is set to 0 and the model parameter β is set to a default value, and the prediction value corresponding to the chroma component is filled with the default value; when the number of effective pixels in the first reference pixel set or the second reference pixel set is 2, the processing steps are the same as those when the number of effective pixels is 0; and for the second reference pixel set, when the number of effective pixels is 4, first, two pixels with larger values and two pixels with smaller values of the chroma component are obtained through four comparisons, and then two average points are obtained; the model parameters a and β are derived based on the two average points, and the chroma component is predicted according to the constructed prediction model. In this way, only the coding block with the number of effective pixels in the second reference pixel set satisfying 4 can perform the derivation of the model parameters in the CCLM mode; and for the coding block with the number of effective pixels less than 4, the default value filling method is directly used, so as to reduce the calculation complexity when the number of reference pixels in the selected region is less than 4, and the coding and decoding performance can be maintained basically unchanged.
[0231] In the embodiments of the present application, the derivation process of the model parameters is unified, that is, for the number of effective pixel points in the first reference pixel set used for derivation of the model parameters, when the number of effective pixel points in the first reference pixel set is greater than or equal to the preset number, the effective pixel points in the first reference pixel set are screened to obtain a second reference pixel set, and then the number of effective pixel points in the second adjacent reference pixel set is determined; when the number of effective pixel points in the second reference pixel set meets the preset number, the current coding block needs to perform the derivation of the model parameters under the CCLM mode and the step of constructing the prediction model; when the number of effective pixel points in the first reference pixel set or the second reference pixel set is less than the preset number, the current coding block can use a default value to fill the prediction value corresponding to the to-be-predicted image component of the coding block. Therefore, the embodiments of the present application can also provide a simplified process of derivation of the model parameters, as shown in Figure 11 .
[0232] Compared with Figure 10 , the derivation process of the model parameters shown in Figure 11 is more simplified. In Figure 11 , it is assumed that the to-be-predicted image component is a chroma component, and the preset component value is 512. First, adjacent reference pixel points are obtained from the selection region to form a first adjacent reference pixel set; then the number of effective pixel points in the first adjacent reference pixel set is determined; when the number of effective pixel points in the first reference pixel set is greater than or equal to the preset number, the first reference pixel set is screened to obtain a second reference pixel set, and then the number of effective pixel points in the second adjacent reference pixel set is determined; when the number of effective pixel points in the first reference pixel set or the second reference pixel set is less than the preset number, the model parameter a is set to 0, and the model parameter b is set to 512, at this time, the prediction value corresponding to the chroma component is filled as 512; when the number of effective pixel points in the second reference pixel set meets the preset number, first, two pixel points with larger values and two pixel points with smaller values of the chroma component are obtained through four comparisons, and then two average points are calculated; the model parameters a and b are derived based on the two average points, and the prediction processing of the chroma component is performed according to the constructed prediction model. It should be noted that only the coding block whose number of effective pixel points in the second reference pixel set meets the preset number can perform the derivation of the model parameters under the CCLM mode; and for the coding block whose number of effective pixel points is less than the preset number, the default value filling mode is directly used, so as to reduce the calculation complexity when the number of reference pixel points in the selection region is less than the preset number, and the coding and decoding performance can be basically maintained. Generally, the preset number in the embodiments of the present application can be 4.
[0233] Furthermore, in this embodiment, the number of valid pixels in the first reference pixel set can be determined based on the number of valid pixels within the selected region. Therefore, this embodiment can also provide another simplified process for model parameter derivation, such as... Figure 12 As shown.
[0234] exist Figure 12 In this model, assuming the image component to be predicted is a chroma component with a preset component value of 512, the selection area is first determined to obtain a first reference pixel set. Then, the number of valid pixels in the first reference pixel set is determined. When the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, the first reference pixel set is filtered to obtain a second reference pixel set. Then, the number of valid pixels in the second adjacent reference pixel set is determined. When the number of valid pixels in either the first or second reference pixel set is less than the preset number, the predicted value corresponding to the chroma component is filled with 512. When the number of valid pixels in the second reference pixel set meets the preset number, the two pixels with the larger chroma component value and the two pixels with the smaller chroma component value are obtained through four comparisons. Then, two mean points are calculated. Based on the two mean points, the model parameters α and β are derived, and the chroma component is predicted according to the constructed prediction model. In this way, only coded blocks with a preset number of valid pixels in the second reference pixel set can perform the derivation of model parameters in CCLM mode; while for coded blocks with fewer than the preset number of valid pixels, default values are directly used for filling, thereby reducing the computational complexity when the number of reference pixels in the selected area is less than the preset number, and maintaining the encoding and decoding performance basically unchanged. Typically, the preset number in this embodiment can be 4.
[0235] Furthermore, in some embodiments, VVC defines two variables: numSampL and numSampT. Here, numSampL represents the total number of pixels in the selected region H'; and numSampT represents the total number of pixels in the selected region W'.
[0236] For INTRA_LT_CCLM mode, numSampT = W, numSampL = H;
[0237] For INTRA_L_CCLM mode, numSampT = 0, numSampL = min{W+H,H+H};
[0238] For INTRA_T_CCLM mode, numSampT = min{W+H,W+W}, numSampL = 0;
[0239] In addition, the validity of the selected region (or adjacent region) also needs to be considered. That is, the variables numSampL and numSampT only represent the number of valid pixels within the above range.
[0240] Additionally, VVC defines a condition where, when both numSampL and numSampT are 0 (resulting in 0 valid pixels for model parameter derivation), the predicted value for the chroma component is directly set to the default value; otherwise, model parameter derivation needs to be performed, as detailed below.
[0241] if(numSampL==0&&numSampT==0)
[0242] Set the predicted values corresponding to the chromaticity components to the default values;
[0243] else
[0244] The model parameters are derived, and the constructed prediction model is used to predict the chromaticity components to obtain the predicted values corresponding to the chromaticity components.
[0245] However, since the sum of numSampL and numSampT can represent the total number of pixels in the selected area, when numSampL + numSampT = 0, 0 valid pixels will be generated; when numSampL + numSampT = 2, 2 valid pixels will be generated; and when numSampL + numSampT ≥ 4, 4 valid pixels will be generated. Therefore, the embodiments of this application can be further represented as follows (where the preset number can be 4).
[0246] if (numSampL + numSampT < preset number)
[0247] Set the predicted values corresponding to the chromaticity components to the default values;
[0248] else
[0249] The model parameters are derived, and the constructed prediction model is used to predict the chromaticity components to obtain the predicted values corresponding to the chromaticity components.
[0250] The embodiment provides a method for predicting an image component, comprising the following steps: acquiring a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image; when the number of effective pixels in the first reference pixel set is less than a preset number, taking a preset component value as a prediction value corresponding to the to-be-predicted image component; when the number of effective pixels in the first reference pixel set is greater than or equal to the preset number, screening the first reference pixel set to obtain a second reference pixel set, the number of effective pixels in the second reference pixel set being less than or equal to the preset number; when the number of effective pixels in the second reference pixel set is less than the preset number, taking the preset component value as the prediction value corresponding to the to-be-predicted image component; when the number of effective pixels in the second reference pixel set is equal to the preset number, determining a model parameter through the second reference pixel set, and obtaining a prediction model corresponding to the to-be-predicted image component according to the model parameter, the prediction model being used for realizing the prediction processing of the to-be-predicted image component to obtain the prediction value corresponding to the to-be-predicted image component. In this way, the derivation process of the model parameter is unified without changing the coding and decoding prediction performance, and the calculation complexity is reduced without additional processing due to no additional processing module for the case that the number of effective pixels in the adjacent reference pixel set is less than the preset number, especially for the case that the number of effective pixels is 0 or 2.
[0251] In another embodiment of the present application, the CCLM mode can be directly disabled for the case that the number of effective pixels in the first reference pixel set is less than the preset number, and the preset component value is taken as the prediction value corresponding to the to-be-predicted image component. Therefore, in some embodiments, after the first reference pixel set is screened to obtain the second reference pixel set, the method can further comprise:
[0252] When the number of effective pixels in the first reference pixel set is less than the preset number or the number of effective pixels in the second reference pixel set is less than the preset number, the preset component value is taken as the prediction value corresponding to the to-be-predicted image component;
[0253] When the number of effective pixels in the second reference pixel set is greater than or equal to the preset number, the CCLM mode is adopted to realize the prediction processing of the to-be-predicted image component.
[0254] It should be noted that for the case that the number of valid pixels in the first reference pixel set or the second reference pixel set is less than the preset number, the CCLM mode can be disabled at this time, for example, the identifier of whether to use the CCLM mode is set to "disable the CCLM mode", at this time the prediction value corresponding to the to-be-predicted image component is directly filled as a default value; only when the number of valid pixels in the second reference pixel set is greater than or equal to the preset number, the CCLM mode is used, for example, the identifier of whether to use the CCLM mode is set to "enable the CCLM mode", at this time the prediction processing of the to-be-predicted image component can be realized through the CCLM mode.
[0255] It should be further noted that assuming that the to-be-predicted image component is a chroma component and the preset number is 4, for all possible cases of generating 2 valid pixels (wherein the judgment manner for generating 2 valid pixels is not limited in the embodiments of the present application), at this time the model parameter α can also be set to 0 and the model parameter β can be set to the intermediate value (also referred to as the default value) corresponding to the chroma component, so that the prediction value corresponding to the chroma component of all pixels in the coding block is filled as the default value; in addition, for all possible cases of generating 2 valid pixels, at this time numSampL and numSampT can also be set to 0, so that the prediction value corresponding to the chroma component of all pixels in the coding block is filled as the default value.
[0256] In addition, for all possible cases of generating 2 valid pixels, the prediction value corresponding to the chroma component can be directly filled as the default value; or for all possible cases of generating 2 valid pixels, the CCLM mode can be disabled; or for all possible cases of generating 2 or 0 valid pixels, the CCLM mode can be disabled; or for all possible cases of generating 2 or 0 valid pixels, the prediction value corresponding to the chroma component can be directly filled as the default value.
[0257] In this way, the model parameter derivation process is unified under the condition that the number of valid pixels for model parameter derivation is different. Specifically, when the number of valid pixels is 2, no additional processing is required, and the existing processing module is directly called (i.e., the processing when the number of valid pixels is 2 is aligned with the processing when the number of valid pixels is 0), thereby further reducing the computational complexity.
[0258] The image component prediction method in the embodiments of the present application is based on the latest VVC reference software VTM5.0, and under the Allintra condition, the test sequence required by JVET is tested according to the general test condition, and the average change of BD-rate on the Y component, the Cb component and the Cr component is 0.00%, 0.02% and 0.02% respectively, which means that the present application basically has no effect on the coding performance.
[0259] The present application can have the following beneficial effects without affecting the coding performance:
[0260] Firstly, the present application can unify the derivation process of the model parameters in the CCLM mode. In the prior art solution, for the case of two effective pixel points, an additional "copy" operation is needed to generate four available pixel points, so that the same operation as in the case of four effective pixel points can be performed, and then the derivation of the model parameters is completed. However, the present application can save the additional "copy" operation, and at the same time align the processing of the case of two effective pixel points with the processing of the case of zero effective pixel points, at which time the same processing module can be directly used without increasing additional operations, thereby realizing the unification of the linear model parameter derivation process.
[0261] Secondly, the present application can also reduce the computational complexity of the case of two effective pixel points for model parameter derivation in the CCLM mode. In the prior art solution, for the case of two effective pixel points, not only an additional "copy" operation is needed to generate four available pixel points, but also the same operation as in the case of four effective pixel points needs to be performed, that is, a series of operations such as four comparisons, four mean value calculations, model parameter calculations, and prediction model construction for prediction. However, the present application can save these operations, and directly fill the prediction values Pred C [i,j] of all pixel points in the current coding block with the preset component value, that is, the default value of the chroma component, without affecting the coding performance.
[0262] The embodiment provides an image component prediction method. Through the technical scheme of the embodiment, the number of effective pixel points in the first reference pixel set is compared with the preset number, when the number of effective pixel points in the first reference pixel set or the second reference pixel set is less than the preset number, the preset default value is directly used as the prediction value corresponding to the image component to be predicted; when the number of effective pixel points in the second reference pixel set is greater than or equal to the preset number, the model parameters are determined according to the first reference pixel set to construct the prediction model of the image component to be predicted, thereby unifying the derivation process of the model parameters; in addition, for the case that the number of effective pixel points in the first reference pixel set is less than the preset number, no additional processing module is added, and the computational complexity is also reduced.
[0263] Based on the same inventive concept as the foregoing embodiments, see Figure 13 which shows a component structure schematic diagram of an image component prediction device 130 provided by an embodiment of the present application. The image component prediction device 130 can include an acquisition unit 1301, a prediction unit 1302, and a screening unit 1303, wherein,
[0264] The acquisition unit 1301 is configured to acquire a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image.
[0265] The prediction unit 1302 is configured to, when a number of valid pixel points in the first reference pixel set is less than a preset number, take a preset component value as a prediction value corresponding to the to-be-predicted image component.
[0266] The screening unit 1303 is configured to, when a number of valid pixel points in the first reference pixel set is greater than or equal to a preset number, screen the first reference pixel set to obtain a second reference pixel set; wherein a number of valid pixel points in the second reference pixel set is less than or equal to the preset number.
[0267] The prediction unit 1302 is further configured to, when a number of valid pixel points in the second reference pixel set is less than the preset number, take the preset component value as the prediction value corresponding to the to-be-predicted image component; and when the number of valid pixel points in the second reference pixel set is equal to the preset number, determine a model parameter through the second reference pixel set, and obtain a prediction model corresponding to the to-be-predicted image component according to the model parameter; wherein the prediction model is used to implement prediction processing on the to-be-predicted image component to obtain a prediction value corresponding to the to-be-predicted image component.
[0268] In the foregoing solution, the acquisition unit 1301 is specifically configured to acquire reference pixel points adjacent to at least one side of the coding block; wherein the at least one side includes a left side of the coding block and / or an upper side of the coding block; and based on the reference pixel points, a first reference pixel set corresponding to the to-be-predicted image component is formed.
[0269] In the foregoing solution, the acquisition unit 1301 is specifically configured to acquire reference pixel points in a reference row or a reference column adjacent to the coding block; wherein the reference row is composed of a row adjacent to the upper side and the upper right side of the coding block, and the reference column is composed of a column adjacent to the left side and the lower left side of the coding block; and based on the reference pixel points, a first reference pixel set corresponding to the to-be-predicted image component is formed.
[0270] In the above scheme, the screening unit 1303 is specifically configured to determine a to-be-selected pixel position based on a pixel position and / or an image component intensity corresponding to each adjacent reference pixel point in the first reference pixel set; and select, from the first reference pixel set, an effective pixel point corresponding to the to-be-selected pixel position according to the determined to-be-selected pixel position, to form a second reference pixel set by using the selected effective pixel point; and the number of effective pixel points in the second reference pixel set is less than or equal to a preset number.
[0271] In the above scheme, referring to Figure 13 The image component prediction device 130 can further include a determination unit 1304 configured to determine a preset component range corresponding to the to-be-predicted image component based on bit information of the video image; and determine a middle value of the preset component range as a prediction value corresponding to the to-be-predicted image component according to the preset component range; and the middle value is represented as a preset component value.
[0272] In the above scheme, referring to Figure 13 The image component prediction device 130 can further include a padding unit 1305 configured to perform prediction value padding on the to-be-predicted image component of each pixel point in the coding block by using the preset component value.
[0273] In the above scheme, the prediction unit 1302 is further configured to perform prediction processing on the to-be-predicted image component of each pixel point in the coding block based on the prediction model, to obtain a prediction value corresponding to the to-be-predicted image component of each pixel point.
[0274] In the above scheme, the preset number is 4; and the prediction unit 1302 is further configured to use the preset component value as the prediction value corresponding to the to-be-predicted image component when the number of effective pixel points in the first reference pixel set is 0 or 2.
[0275] Correspondingly, the prediction unit 1302 is further configured to use the preset component value as the prediction value corresponding to the to-be-predicted image component when the number of effective pixel points in the second reference pixel set is 0 or 2.
[0276] In the above scheme, referring to Figure 13The image component prediction apparatus 130 can further include a judging unit 1306 configured to: when the number of valid pixels in the first reference pixel set is less than a preset number or the number of valid pixels in the second reference pixel set is less than a preset number, take a preset component value as the prediction value corresponding to the image component to be predicted; and when the number of valid pixels in the second reference pixel set is greater than or equal to the preset number, adopt a CCLM mode to implement the prediction processing on the image component to be predicted.
[0277] It can be understood that, in the embodiment, the "unit" can be a part of circuit, a part of processor, a part of program or software, etc., and of course can be a module, and can also be non-modular. Moreover, the components in the embodiment can be integrated in one processing unit, or can be physically present individually, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0278] When the integrated unit is realized in the form of a software function module and is not sold or used as an independent product, the integrated unit can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiment can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in the embodiment. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0279] Therefore, the embodiment provides a computer storage medium storing an image component prediction program, and the image component prediction program is executed by at least one processor to implement the steps of the method in any one of the foregoing embodiments.
[0280] Based on the components of the image component prediction apparatus 130 and the computer storage medium, it can be understood that Figure 14Fig. 13 shows a specific hardware structure of the image component prediction device 130 provided by the embodiments of the present application, which can include a network interface 1401, a memory 1402 and a processor 1403; each component is coupled together through a bus system 1404. It can be understood that the bus system 1404 is used to realize the connection communication between the components. The bus system 1404 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the bus system 1404 in Figure 14 Fig. 13. Among them, the network interface 1401 is used for receiving and sending signals in the process of transmitting information with other external network elements;
[0281] The memory 1402 is used for storing computer programs capable of running on the processor 1403;
[0282] The processor 1403 is used for executing the following steps when running the computer programs:
[0283] obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image;
[0284] when the number of valid pixel points in the first reference pixel set is less than a preset number, taking a preset component value as a prediction value corresponding to the to-be-predicted image component;
[0285] when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, screening the first reference pixel set to obtain a second reference pixel set; wherein the number of valid pixel points in the second reference pixel set is less than or equal to the preset number;
[0286] when the number of valid pixel points in the second reference pixel set is less than the preset number, taking the preset component value as the prediction value corresponding to the to-be-predicted image component;
[0287] when the number of valid pixel points in the second reference pixel set is equal to the preset number, determining a model parameter through the second reference pixel set, and obtaining a prediction model corresponding to the to-be-predicted image component according to the model parameter; wherein the prediction model is used to realize the prediction processing of the to-be-predicted image component to obtain the prediction value corresponding to the to-be-predicted image component.
[0288] It is to be appreciated that the memory 1402 in embodiments of the application can be volatile, nonvolatile, or a combination of both. By way of example, the nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which acts as external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double-Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), SynchBurst DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory 1402 of the subject systems and methods is intended to include, without being limited to, these and any other suitable types of memory.
[0289] The processor 1403 can be an integrated circuit chip logic circuit having a processing capability. In implementation, each step of the above method can be completed by integrated logic circuit of hardware in the processor 1403 or instruction in the form of software. The processor 1403 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the storage 1402, and the processor 1403 reads the information in the storage 1402 and combines the hardware to complete the steps of the above method.
[0290] It can be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing units can be implemented within one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSP Devices), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
[0291] For software implementation, the techniques described herein can be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes can be stored in the memory and executed by the processor. The memory can be implemented within the processor or external to the processor.
[0292] Optionally, as another embodiment, the processor 1403 is further configured to execute the steps of the method of any one of the preceding embodiments when running the computer program.
[0293] Referring to Figure 15 , a constituent structure schematic diagram of an encoder provided by an embodiment of the present application is shown. As shown in Figure 15 , the encoder 150 can at least include the image component prediction apparatus 130 of any one of the preceding embodiments.
[0294] Referring to Figure 16 , a constituent structure schematic diagram of a decoder provided by an embodiment of the present application is shown. As shown in Figure 16 , the decoder 160 can at least include the image component prediction apparatus 130 of any one of the preceding embodiments.
[0295] It should be noted that in the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0296] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0297] The methods disclosed in several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0298] The features disclosed in several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0299] The features disclosed in several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.
[0300] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0301] Industrial applicability
[0302] In the embodiments of the present application, a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image is acquired; when the number of valid pixel points in the first reference pixel set is less than a preset number, a preset component value is taken as a prediction value corresponding to the to-be-predicted image component; when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, the first reference pixel set is screened to obtain a second reference pixel set, the number of valid pixel points in the second reference pixel set being less than or equal to the preset number; when the number of valid pixel points in the second reference pixel set is less than the preset number, the preset component value is taken as the prediction value corresponding to the to-be-predicted image component; when the number of valid pixel points in the second reference pixel set is equal to the preset number, model parameters are determined through the second reference pixel set, and a prediction model corresponding to the to-be-predicted image component is obtained according to the model parameters, the prediction model being used to realize prediction processing on the to-be-predicted image component to obtain a prediction value corresponding to the to-be-predicted image component; in this way, when the number of valid pixel points in the first reference pixel set is less than the preset number or the number of valid pixel points in the second reference pixel set is less than the preset number, the preset default value is directly taken as the prediction value corresponding to the to-be-predicted image component; only when the number of valid pixel points in the second reference pixel set satisfies the preset number, the model parameters are determined according to the first reference pixel set to establish the prediction model of the to-be-predicted image component, thereby unifying the derivation process of the model parameters; in addition, for the case that the number of valid pixel points in the first reference pixel set or the second reference pixel set is less than the preset number, especially for the case that the number of valid pixel points is 0 or 2, since no additional processing module is added, the preset default value is directly taken as the prediction value corresponding to the to-be-predicted image component, thereby no additional processing is needed, and the calculation complexity is reduced.
Claims
1. An image component prediction method applied to a decoder, the method comprising: obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image; when a number of valid pixels in the first reference pixel set is less than a preset number, taking a preset component value as a prediction value corresponding to the to-be-predicted image component; when the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, performing screening processing on the first reference pixel set to obtain a second reference pixel set; wherein a number of valid pixels in the second reference pixel set is less than or equal to the preset number; when the number of valid pixels in the second reference pixel set is equal to the preset number, determining a model parameter through the second reference pixel set, and obtaining a cross-component prediction model corresponding to the to-be-predicted image component according to the model parameter; wherein the cross-component prediction model is used to implement prediction processing on the to-be-predicted image component to obtain a prediction value corresponding to the to-be-predicted image component; wherein the taking the preset component value as the prediction value corresponding to the to-be-predicted image component comprises: determining the preset component value based on a bit depth of the video image; the method further comprises: for a pixel point in the coding block, performing prediction value filling on a to-be-predicted image component of the pixel point by using the preset component value.
2. The method of claim 1, wherein, the obtaining the first reference pixel set corresponding to the to-be-predicted image component of the coding block in the video image comprises: obtaining reference pixel points adjacent to at least one side of the coding block; wherein the at least one side comprises a left side of the coding block and / or an upper side of the coding block; determining the first reference pixel set corresponding to the to-be-predicted image component based on the reference pixel points.
3. The method of claim 1, wherein, the obtaining the first reference pixel set corresponding to the to-be-predicted image component of the coding block in the video image comprises: obtaining reference pixel points in a reference row or a reference column adjacent to the coding block; wherein the reference row is composed of a row adjacent to the upper side and the upper right side of the coding block, and the reference column is composed of a column adjacent to the left side and the lower left side of the coding block; determining the first reference pixel set corresponding to the to-be-predicted image component based on the reference pixel points.
4. The method of claim 1, wherein, the performing screening processing on the first reference pixel set to obtain the second reference pixel set comprises: determining to-be-selected pixel point positions based on pixel positions corresponding to adjacent reference pixel points in the first reference pixel set; selecting valid pixel points corresponding to the to-be-selected pixel point positions from the first reference pixel set according to the determined to-be-selected pixel point positions, and determining the second reference pixel set according to the selected valid pixel points; wherein a number of valid pixel points in the second reference pixel set is less than or equal to the preset number.
5. The method of claim 1, wherein, the preset component value is set to 1<< (BitDepth-1), and BitDepth is a bit depth of the to-be-predicted image component.
6. The method of claim 1, wherein, after the obtaining the cross-component prediction model corresponding to the to-be-predicted image component according to the model parameter, the method further comprises: Predicting a to-be-predicted image component of a pixel point in the coding block based on the cross-component prediction model, to obtain a prediction value corresponding to the to-be-predicted image component of the pixel point.
7. The method of any one of claims 1 to 6, wherein, The preset number is 4.
8. An image component prediction method applied to an encoder, the method comprising: obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image; when the number of valid pixel points in the first reference pixel set is less than a preset number, taking a preset component value as a prediction value corresponding to the to-be-predicted image component; when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, performing screening processing on the first reference pixel set to obtain a second reference pixel set; wherein the number of valid pixel points in the second reference pixel set is less than or equal to the preset number; when the number of valid pixel points in the second reference pixel set is equal to the preset number, determining a model parameter through the second reference pixel set, and obtaining a cross-component prediction model corresponding to the to-be-predicted image component according to the model parameter; wherein the cross-component prediction model is used to implement prediction processing on the to-be-predicted image component, to obtain a prediction value corresponding to the to-be-predicted image component; wherein the taking the preset component value as the prediction value corresponding to the to-be-predicted image component comprises: determining the preset component value based on a bit depth of the video image; the method further comprises: for a pixel point in the coding block, filling a prediction value into a to-be-predicted image component of the pixel point by using the preset component value.
9. The method of claim 8, wherein, The obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image comprises: obtaining reference pixel points adjacent to at least one side of the coding block; wherein the at least one side comprises a left side of the coding block and / or an upper side of the coding block; determining the first reference pixel set corresponding to the to-be-predicted image component based on the reference pixel points.
10. The method of claim 8, wherein, The obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image comprises: obtaining reference pixel points in a reference row or a reference column adjacent to the coding block; wherein the reference row is composed of a row adjacent to an upper side and a top right side of the coding block, and the reference column is composed of a column adjacent to a left side and a bottom left side of the coding block; determining the first reference pixel set corresponding to the to-be-predicted image component based on the reference pixel points.
11. The method of claim 10, wherein, The screening processing on the first reference pixel set to obtain the second reference pixel set comprises: determining to-be-selected pixel point positions based on pixel positions corresponding to adjacent reference pixel points in the first reference pixel set; selecting valid pixel points corresponding to the to-be-selected pixel point positions from the first reference pixel set according to the determined to-be-selected pixel point positions, and determining the second reference pixel set according to the selected valid pixel points; wherein the number of valid pixel points in the second reference pixel set is less than or equal to the preset number.
12. The method of claim 8, wherein, The preset component value is set as 1 << (BitDepth-1), and BitDepth is a bit depth of the image component to be predicted.
13. The method of claim 8, wherein, After the cross-component prediction model corresponding to the image component to be predicted is obtained according to the model parameter, the method further comprises: The image component to be predicted of the pixel point in the coding block is predicted based on the cross-component prediction model, to obtain a prediction value corresponding to the image component to be predicted of the pixel point.
14. The method of any one of claims 8-13, wherein, The preset number is 4.
15. A decoder comprising: A processor and a memory for storing a computer program capable of running on the processor, The processor is configured to: obtain a first reference pixel set corresponding to the image component to be predicted of the coding block in the video image; when the number of valid pixel points in the first reference pixel set is less than the preset number, set a preset component value as a prediction value corresponding to the image component to be predicted; when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, perform screening processing on the first reference pixel set to obtain a second reference pixel set; wherein the number of valid pixel points in the second reference pixel set is less than or equal to the preset number; when the number of valid pixel points in the second reference pixel set is equal to the preset number, determine a model parameter through the second reference pixel set, and obtain a cross-component prediction model corresponding to the image component to be predicted according to the model parameter; wherein the cross-component prediction model is used to realize prediction processing on the image component to be predicted, to obtain a prediction value corresponding to the image component to be predicted. The processor is further configured to: determine the preset component value based on a bit depth of the video image; fill the prediction value of the image component to be predicted of the pixel point in the coding block with the preset component value.
16. An encoder comprising: A processor and a memory for storing a computer program capable of running on the processor, The processor is configured to: obtain a first reference pixel set corresponding to the image component to be predicted of the coding block in the video image; when the number of valid pixel points in the first reference pixel set is less than the preset number, set a preset component value as a prediction value corresponding to the image component to be predicted; when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, perform screening processing on the first reference pixel set to obtain a second reference pixel set; wherein the number of valid pixel points in the second reference pixel set is less than or equal to the preset number; when the number of valid pixel points in the second reference pixel set is equal to the preset number, determine a model parameter through the second reference pixel set, and obtain a cross-component prediction model corresponding to the image component to be predicted according to the model parameter; wherein the cross-component prediction model is used to realize prediction processing on the image component to be predicted, to obtain a prediction value corresponding to the image component to be predicted. The processor is further configured to: determine the preset component value based on a bit depth of the video image; fill the prediction value of the image component to be predicted of the pixel point in the coding block with the preset component value.
17. A coding system comprising a decoder configured to perform the method of any one of claims 1 to 7 and an encoder configured to perform the method of any one of claims 8 to 14.
18. A computer storage medium, wherein, The computer storage medium stores an image component prediction program which, when executed by at least one processor, implements the method of any one of claims 1 to 7.
19. A computer storage medium, wherein, The computer storage medium stores an image component prediction program which, when executed by at least one processor, implements the method of any one of claims 8 to 14.
20. A method of transmitting a bitstream, the method comprising: The method of any one of claims 8 to 14 is performed to generate the bitstream; and the bitstream is transmitted.
21. A computer storage medium having stored thereon a computer program and a code stream, characterized in that, The computer program, when executed by a processor, implements the method of any one of claims 8 to 14 to generate the bitstream.