Image component prediction method and apparatus, and computer storage medium
By unifying the parameter derivation process of the image component prediction model in H.266/VVC, the predicted value or the set is determined based on the number of effective pixels in the reference pixel set, which solves the computational complexity problem caused by the difference in the number of adjacent reference pixels and achieves more efficient video coding processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2019-06-25
- Publication Date
- 2026-05-01
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, the predicted value is determined or a second reference pixel set is obtained based on the number of valid pixels in the set. Model parameter derivation is performed only when the number of valid pixels meets the preset number; otherwise, the preset component value is used as the predicted value. This unifies the model parameter derivation process and reduces computational complexity.
Without affecting encoding and decoding performance, the computational complexity was reduced, the processing flow was simplified, additional processing modules were reduced, and processing efficiency was improved.
Smart Images

Figure CN116708771B_ABST
Abstract
Description
Image component prediction method, apparatus and computer storage medium
[0001] Case Analysis
[0002] This application is a divisional application of Chinese patent application No. 201980091266.2, entitled "Image Component Prediction Method, Apparatus and Computer Storage Medium", which entered the Chinese national phase of PCT international patent application PCT / CN2019 / 092711 filed on June 25, 2019. Technical Field
[0003] This application relates to the field of video encoding and decoding technology, and in particular to an image component prediction method, apparatus, and computer storage medium. Background Technology
[0004] As people's demands for video display quality increase, new video application forms such as high-definition and ultra-high-definition video have emerged. H.265 / High Efficiency Video Coding (HEVC) can no longer meet the needs of the rapidly developing video applications. The Joint Video Exploration Team (JVET) proposed the next-generation video coding standard H.266 / Versatile Video Coding (VVC), and its corresponding test model is the VVC Reference Software Test Model (VTM).
[0005] In VTM, a prediction model-based image component prediction method has been integrated, which can predict the chrominance component from the luminance component of the current coding block (CB). However, when constructing the prediction model, the difference in the number of adjacent reference pixels used for model parameter derivation not only adds extra processing but also increases computational complexity. Summary of the Invention
[0006] This application provides an image component prediction method, apparatus, and computer storage medium. Without changing the encoding and decoding prediction performance, it unifies the derivation process of model parameters. At the same time, for cases where the number of effective pixels in the adjacent reference pixel set is less than a preset number, no additional processing module is added, thus eliminating the need for additional processing and reducing computational complexity.
[0007] The technical solution of this application embodiment can be implemented as follows:
[0008] In a first aspect, embodiments of this application provide an image component prediction method, the method comprising:
[0009] Obtain the first reference pixel set corresponding to the image component to be predicted in the coded block of the video image;
[0010] When the number of valid pixels in the first reference pixel set is less than a preset number, the preset component value is used as the predicted value corresponding to the image component to be predicted.
[0011] When the number of valid pixels in the first reference pixel set is greater than or equal to a preset number, the first reference pixel set is filtered 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, the preset component value is used as the predicted value corresponding to the image component to be predicted.
[0013] When the number of valid pixels in the second reference pixel set is equal to the preset number, the model parameters are determined by the second 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 perform prediction processing on the image component to be predicted in order to obtain the prediction value corresponding to the image component to be predicted.
[0014] Secondly, embodiments of this application provide an image component prediction device, which includes: an acquisition unit, a prediction unit, and a filtering unit, wherein...
[0015] The acquisition unit is configured to acquire a first set of reference pixels corresponding to the image component to be predicted in the coded block of the video image;
[0016] The prediction unit is configured to use a preset component value as the prediction value corresponding to the image component to be predicted when the number of valid pixels in the first reference pixel set is less than a preset number.
[0017] The filtering unit is configured to filter the first reference pixel set to obtain a second reference pixel set when the number of valid pixels in the first reference pixel set is greater than or equal to a preset number; 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 pixels in the second reference pixel set is less than a preset number, use a preset component value as the predicted value corresponding to the image component to be predicted; and when the number of valid pixels in the second reference pixel set is equal to the preset number, determine model parameters through the second reference pixel set, and obtain a prediction model corresponding to the image component to be predicted based on the model parameters; wherein the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0019] Thirdly, embodiments of this application provide an image component prediction device, the image component prediction device comprising: a memory and a processor;
[0020] The memory is used to store computer programs that can run on the processor;
[0021] The processor is configured to execute the method described in the first aspect when running the computer program.
[0022] Fourthly, embodiments of this application provide a computer storage medium storing an image component prediction program, which, when executed by at least one processor, implements the method described in the first aspect.
[0023] This application provides an image component prediction method, apparatus, and computer storage medium. The method involves: acquiring a first reference pixel set corresponding to the image component to be predicted in a coded block of a video image; when the number of valid pixels in the first reference pixel set is less than a preset number, using a preset component value as the predicted value for the image component to be predicted; when the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, filtering the first reference pixel set to obtain a second reference pixel set, where the 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 less than the preset number, using a preset component value as the predicted value for the image component to be predicted; and when the number of valid pixels in the second reference pixel set is equal to the preset number, determining model parameters using the second reference pixel set, and obtaining a prediction model corresponding to the image component to be predicted based on the model parameters. This model is used to perform prediction processing on the image components to be predicted, so as to obtain the predicted values corresponding to the image components. 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, the preset default value is directly used as the predicted value corresponding to the image component to be predicted. Only when the number of valid pixels in the second reference pixel set meets the preset number will the model parameters be determined based on the first reference pixel set to establish the prediction model for the image component to be predicted, thus unifying the derivation process of the model parameters. Furthermore, for cases where the number of valid pixels in the first or second reference pixel set is less than the preset number, especially when there are 0 or 2 valid pixels, since no additional processing module is added, the preset default value is directly used as the predicted value corresponding to the image component to be predicted, thus eliminating the need for additional processing and reducing computational complexity. Attached Figure Description
[0024] Figure 1 is a schematic diagram of the distribution of an effective adjacent region provided in an embodiment of this application;
[0025] Figure 2 is a schematic diagram of the distribution of the selected area under three modes provided in an embodiment of this application;
[0026] Figure 3 is a schematic block diagram of a video encoding system provided in an embodiment of this application;
[0027] Figure 4 is a schematic block diagram of a video decoding system provided in an embodiment of this application;
[0028] Figure 5 is a flowchart illustrating an image component prediction method provided in an embodiment of this application;
[0029] Figure 6A is a schematic diagram of the structure for selecting adjacent reference pixels in INTRA_LT_CCLM mode according to an embodiment of this application;
[0030] Figure 6B is a schematic diagram of the structure for selecting adjacent reference pixels in INTRA_L_CCLM mode according to an embodiment of this application;
[0031] Figure 6C is a schematic diagram of the structure for selecting adjacent reference pixels in INTRA_T_CCLM mode according to an embodiment of this application;
[0032] Figure 7 is a flowchart illustrating another image component prediction method provided in an embodiment of this application;
[0033] Figure 8A is a schematic diagram of a structure that generates 0 valid pixels in INTRA_LT_CCLM mode according to an embodiment of this application;
[0034] Figure 8B is a schematic diagram of a structure that generates 0 valid pixels in INTRA_L_CCLM mode according to an embodiment of this application;
[0035] Figure 8C is a schematic diagram of a structure that generates 0 valid pixels in INTRA_T_CCLM mode according to an embodiment of this application;
[0036] Figure 9A is a schematic diagram of a structure for generating two effective pixels in INTRA_LT_CCLM mode according to an embodiment of this application;
[0037] Figure 9B is a schematic diagram of a structure for generating two effective pixels in INTRA_L_CCLM mode according to an embodiment of this application;
[0038] Figure 9C is a schematic diagram of a structure for generating two effective pixels in INTRA_T_CCLM mode according to an embodiment of this application;
[0039] Figure 10 is a schematic diagram of a model parameter derivation process provided in an embodiment of this application;
[0040] Figure 11 is a simplified flowchart illustrating the derivation of model parameters according to an embodiment of this application;
[0041] Figure 12 is a simplified flowchart illustrating another model parameter derivation provided in an embodiment of this application;
[0042] Figure 13 is a schematic diagram of the composition structure of an image component prediction device provided in an embodiment of this application;
[0043] Figure 14 is a schematic diagram of the specific hardware structure of an image component prediction device provided in an embodiment of this application;
[0044] Figure 15 is a schematic diagram of the composition structure of an encoder provided in an embodiment of this application;
[0045] Figure 16 is a schematic diagram of the composition structure of a decoder provided in an embodiment of this application. Detailed Implementation
[0046] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0047] In video images, a first image component, a second image component, and a third image component are generally used to represent a coded block. These three image components are a luminance component, a blue chrominance component, and a red chrominance component, respectively. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V. Thus, video images can be represented in YCbCr format or YUV format.
[0048] In the embodiments of this application, the first image component can be a luminance component, the second image component can be a blue chroma component, and the third image component can be a red chroma component, but the embodiments of this application do not impose specific limitations.
[0049] In current video image or video encoding and decoding processes, cross-component prediction techniques mainly include Cross-component Linear Model Prediction (CCLM) mode and Multi-Directional Linear Model Prediction (MDLM) mode. Regardless of whether the model parameters are derived from CCLM mode or MDLM mode, the corresponding prediction models can achieve prediction between image components such as first image component to second image component, second image component to first image component, first image component to third image component, third image component to first image component, second image component to third image component, or third image component to second image component.
[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, the CCLM mode is used in VVC. At this time, the first image component and the second image component are in the same coding block. That is, the predicted value of the second image component is constructed based on the reconstructed value of the first image component in the same coding block, as shown in Equation (1).
[0051] Pred C [i,j]=α·Rec L [i,j]+β (1)
[0052] Where i,j represent the position coordinates of a pixel in the coded block, i represents the horizontal direction, j represents the vertical direction, and Pred C [i,j] represents the predicted value of the second image component corresponding to the pixel with position coordinates [i,j] in the coding block. L [i,j] represents the reconstructed value of the first image component corresponding to the pixel with position coordinates [i,j] in the same coding block (after downsampling), and α and β represent the model parameters.
[0053] For a coded block, its adjacent regions can include the left adjacent region, the top adjacent region, the bottom left adjacent region, and the top right adjacent region. In VVC, three cross-component linear model prediction modes can be included: the intra-CCLM mode with left and top adjacent regions (represented by INTRA_LT_CCLM mode), the intra-CCLM mode with left and bottom left adjacent regions (represented by INTRA_L_CCLM mode), and the intra-CCLM mode with top and top right adjacent regions (represented by INTRA_T_CCLM mode). In each of these three modes, a preset number (e.g., 4) of adjacent reference pixels can be selected for the derivation of model parameters α and β. The biggest difference between these three modes lies in the different selection regions corresponding to the adjacent reference pixels used to derive model parameters α and β.
[0054] Specifically, for the coding block size corresponding to the second image component being W×H, it is assumed that the upper selection region corresponding to the adjacent reference pixel is W', and the left selection region corresponding to the adjacent reference pixel is H'; thus...
[0055] For INTRA_LT_CCLM mode, adjacent reference pixels can be selected from the upper adjacent region and the left adjacent region, i.e., W' = W, H' = H;
[0056] For INTRA_L_CCLM mode, adjacent reference pixels can be selected from the left adjacent region and the lower left adjacent region, i.e., H' = W + H, and W' = 0;
[0057] For INTRA_T_CCLM mode, adjacent reference pixels can be selected from the upper adjacent region and the upper right adjacent region, i.e., W' = W + H, and H' = 0.
[0058] It's important to note that in the latest VVC reference software, VTM 5.0, only pixels within the range of W are stored in the upper right adjacent region, and pixels within the range of H are stored in the lower left adjacent region. Therefore, although the selection area for INTRA_L_CCLM and INTRA_T_CCLM modes is defined as W+H, in practice, the selection area for INTRA_L_CCLM mode will be limited to H+H, and the selection area for INTRA_T_CCLM mode will be limited to W+W.
[0059] For INTRA_L_CCLM mode, adjacent reference pixels can be selected from the left adjacent region and the lower left adjacent region, H' = min{W+H,H+H};
[0060] For INTRA_T_CCLM mode, adjacent reference pixels can be selected from the upper adjacent region and the upper right adjacent region, W' = min{W+H,W+W}.
[0061] Referring to Figure 1, which shows a schematic diagram of the distribution of effective adjacent regions provided in an embodiment of this application. In Figure 1, the left adjacent region, the lower left adjacent region, the upper adjacent region, and the upper right adjacent region are all effective. Based on Figure 1, the selection regions for the three modes are shown in Figure 2. In Figure 2, (a) represents the selection region for the INTRA_LT_CCLM mode, including the left adjacent region and the upper adjacent region; (b) represents the selection region for the INTRA_L_CCLM mode, including the left adjacent region and the lower left adjacent region; and (c) represents the selection region for the INTRA_T_CCLM mode, including the upper adjacent region and the upper right adjacent region. Thus, after determining the selection regions for the three modes, reference points for model parameter derivation can be selected within the selection regions. The reference points selected in this way can be called adjacent reference pixels. Usually, the number of adjacent reference pixels is at most 4; and for a W×H coding block of a fixed size, the positions of its adjacent reference pixels are generally fixed.
[0062] However, in some special cases, such as boundary conditions of coding blocks, unpredictable situations, and situations where the coding order makes it impossible to obtain adjacent reference pixels, or even situations where coding blocks are divided according to tile or slice partitions, adjacent regions may still be invalid. This can result in fewer than 4 adjacent reference pixels being selected from adjacent regions, meaning that only 0 or 2 adjacent reference pixels may be selected. This leads to inconsistencies in the number of adjacent reference pixels used for model parameter derivation, thus increasing the need for additional "copying" operations and raising computational complexity.
[0063] To unify the derivation process of model parameters and reduce computational complexity without changing the encoding / decoding prediction performance, this application provides an image component prediction method. This method involves obtaining a first reference pixel set corresponding to the image component to be predicted in a coded block of a video image; when the number of valid pixels in the first reference pixel set is less than a preset number, a preset component value is used as the predicted value corresponding to the image component to be predicted; 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, where the 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 less than the preset number, a preset component value is used as the predicted value corresponding to the image component to be predicted .... When the number of effective pixels equals 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 based on the model parameters. The prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted. In this way, for cases where 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 CCLM mode is disabled, and the preset default value is directly used as the predicted value corresponding to the image component to be predicted. Since no additional processing module is added, the computational complexity is reduced. In addition, the derivation of model parameters is only executed when the number of effective pixels in the second reference pixel set is the preset number, that is, the CCLM mode is executed, thus unifying the derivation process of model parameters.
[0064] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0065] Referring to Figure 3, which shows an example of a block diagram of a video coding system provided in this application embodiment; as shown in Figure 3, the video coding system 300 includes a transform and quantization unit 301, an intra-frame estimation unit 302, an intra-frame prediction unit 303, a motion compensation unit 304, a motion estimation unit 305, an inverse transform and inverse quantization unit 306, a filter control and analysis unit 307, a filtering unit 308, an encoding unit 309, and a decoding image buffer unit 310, etc., wherein the filtering 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 arithmetic coding (CABAC).For the input raw video signal, a video coding block can be obtained by partitioning it into Coding Tree Units (CTUs). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 301, including transforming the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. Intra-frame estimation unit 302 and intra-frame prediction unit 303 are used to perform intra-frame prediction on the video coding block. Specifically, intra-frame estimation unit 302 and intra-frame prediction unit 303 are used to determine the intra-frame prediction mode to be used to encode the video coding block. Motion compensation unit 304 and motion estimation unit 305 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by motion estimation unit 305 is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, motion compensation unit 304 uses the motion vectors determined by motion estimation unit 305 to generate motion vectors. Motion vectors perform motion compensation; after determining the intra-prediction mode, the intra-prediction unit 303 is also used to provide the selected intra-prediction data to the coding unit 309, and the motion estimation unit 305 also sends the calculated motion vector data to the coding unit 309; in addition, the inverse transform and inverse quantization unit 306 is used to reconstruct the video coding block, reconstructing the residual block in the pixel domain. The reconstructed residual block is processed by the filter control analysis unit 307 and the filtering unit 308 to remove block artifacts, and then the reconstructed residual block is added to a predictive block in the frame of the decoding image buffer unit 310 to generate the reconstructed video coding block; the coding unit 309 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-prediction mode, outputting the bitstream of the video signal; and the decoding image buffer unit 310 is used to store the reconstructed video coding block for prediction reference. As video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoding image buffer unit 310.
[0066] Referring to Figure 4, which shows an example of a block diagram of a video decoding system provided in an embodiment of this application; as shown in Figure 4, 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, etc., wherein the decoding unit 401 can perform header information decoding and CABAC decoding, and the filtering unit 405 can perform deblocking filtering and SAO filtering. After the input video signal undergoes the encoding process shown in Figure 2, the output video signal bitstream is generated. 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... The prediction information is used to generate a predictive block for 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-frame 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-frame 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 embodiment is mainly applied to the intra-prediction unit 303 shown in Figure 3 and the intra-prediction unit 403 shown in Figure 4, specifically to the CCLM prediction part of intra-prediction. That is, the image component prediction method in this embodiment can be applied to both video coding and video decoding systems, and even simultaneously, but this embodiment does not impose specific limitations. When the method is applied to the intra-prediction unit 303, "coded block in video image" specifically refers to the current coded block in intra-prediction; when the method is applied to the intra-prediction unit 403, "coded block in video image" specifically refers to the current decoded block in intra-prediction.
[0068] Based on the application scenario examples in Figures 3 or 4 above, and referring to Figure 5, a flowchart illustrating an image component prediction method provided by an embodiment of this application is shown. As shown in Figure 5, the method may include:
[0069] S501: Obtain the first reference pixel set corresponding to the image component to be predicted in the coded block of the video image;
[0070] It should be noted that a video image can be divided into multiple coded blocks, each of which may include a first image component, a second image component, and a third image component. In this embodiment, the coded block is the current block in the video image to be encoded. When the first image component needs to be predicted using a prediction model, the image component to be predicted is the first image component; when the second image component needs to be predicted using a prediction model, the image component to be predicted is the second image component; and when the third image component needs to be predicted using a prediction model, the image component to be predicted is the third image component.
[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 pixels in the left and upper adjacent regions of the coding block, as shown in Figure 2(a); for the INTRA_L_CCLM mode, the first reference pixel set is composed of adjacent reference pixels in the left and lower left adjacent regions of the coding block, as shown in Figure 2(b); for the INTRA_T_CCLM mode, the first reference pixel set is composed of adjacent reference pixels in the upper and upper right adjacent regions of the coding block, as shown in Figure 2(c).
[0072] In some embodiments, optionally, for S501, obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image may include:
[0073] S501a-1: Obtain a reference pixel adjacent to at least one side of the coding block; wherein, the at least one side includes the left side of the coding block and / or the top side of the coding block;
[0074] S501a-2: Based on the reference pixels, form a first set of reference pixels corresponding to the image component to be predicted.
[0075] It should be noted that at least one edge of the coded block may include the left edge and / or the top edge of the coded block; that is, at least one edge of the coded block may refer to the top edge of the coded block, or the left edge of the coded block, or even the top edge and the left edge of the coded block. This application embodiment does not make specific limitations.
[0076] Thus, for the INTRA_LT_CCLM mode, when both the left and top adjacent regions are valid regions, the first reference pixel set can be composed of reference pixels adjacent to the left edge of the coding block and reference pixels adjacent to the top edge of the coding block. When the left adjacent region is a valid region and the top adjacent region is an invalid region, the first reference pixel set can be composed of reference pixels adjacent to the left edge of the coding block. When the left adjacent region is an invalid region and the top adjacent region is a valid region, the first reference pixel set can be composed of reference pixels adjacent to the top edge of the coding block.
[0077] In some embodiments, optionally, for S501, obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image may include:
[0078] S501b-1: Obtain reference pixels in reference rows or reference columns adjacent to the coded block; wherein, the reference row is composed of the rows adjacent to the upper and upper right sides of the coded block, and the reference column is composed of the columns adjacent to the left and lower left sides of the coded block;
[0079] S501b-2: Based on the reference pixels, form a first set of reference pixels corresponding to the image component to be predicted.
[0080] It should be noted that a reference row adjacent to the coded block can be composed of rows adjacent to the top and top right sides of the coded block, and a reference column adjacent to the coded block can be composed of columns adjacent to the left and bottom left sides of the coded block. A reference row or column adjacent to the coded block can refer to a reference row adjacent to the top side of the coded block, a reference column adjacent to the left side of the coded block, or even a reference row or column adjacent to other sides of the coded block; this application embodiment does not impose specific limitations. For ease of description, in this application embodiment, the reference rows adjacent to the coded block will be described using the reference rows adjacent to the top side as an example, and the reference columns adjacent to the coded block will be described using the reference columns adjacent to the left side as an example.
[0081] The reference pixels in the reference row adjacent to the coding block may include reference pixels adjacent to the top edge and the top right edge (also referred to as the adjacent reference pixels corresponding to the top edge and the top right edge), where the top edge represents the top edge of the coding block, and the top right edge represents the side length that extends horizontally to the right from the top edge of the coding block, which is the same as the height of the current coding block; the reference pixels in the reference column adjacent to the coding block may also include reference pixels adjacent to the left edge and the bottom left edge (also referred to as the adjacent reference pixels corresponding to the left edge and the bottom left edge), where the left edge represents the left edge of the coding block, and the bottom left edge represents the side length that extends vertically downward from the left edge of the coding block, which is the same as the width of the current decoding block; however, this embodiment of the application does not impose specific limitations.
[0082] Thus, in INTRA_L_CCLM mode, when the left adjacent region and the lower left adjacent region are valid regions, the first reference pixel set can be composed of reference pixels in the reference column adjacent to the coding block; in INTRA_T_CCLM mode, when the upper adjacent region and the upper right adjacent region are valid regions, the first reference pixel set can be composed of reference pixels in the reference row adjacent to the coding block.
[0083] S502: When the number of valid pixels in the first reference pixel set is less than a preset number, the preset component value is used as the prediction value corresponding to the image component to be predicted.
[0084] It should be noted that the number of valid pixels can be determined based on the validity of adjacent regions or the number of valid pixels within the selected region. In some special cases, such as boundary conditions of the coded block, unpredictable situations, or situations where the encoding order prevents the acquisition of adjacent reference pixels, or even when coded blocks are divided according to tiles or slices, the left, lower left, upper, and upper right adjacent regions may not all be valid regions; invalid regions may exist. This can lead to the number of valid pixels within the selected region being less than the preset number, ensuring that the number of valid pixels in the first reference pixel set is less than the preset number.
[0085] It should also be noted that the preset number is a pre-set determination value for the number of valid pixels, used to measure whether the steps of model parameter derivation and prediction model construction are performed for the image component to be predicted; wherein, the preset number can be 4, but this application embodiment does not specifically limit it. Thus, assuming 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 image component to be predicted, so as to reduce the computational complexity.
[0086] Additionally, the preset component value is used to represent a fixed value (also known as a default value) corresponding to the image component to be predicted, which is set in advance. 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 a preset number, using the preset component value as the predicted value corresponding to the image component to be predicted may include:
[0087] S502a: Based on the bit information of the video image, determine the preset component range corresponding to the image component to be predicted;
[0088] S502b: Based on the preset component range, determine the median value of the preset component range, and use the median value as the prediction value corresponding to the image component to be predicted; wherein, the median value represents the preset component value.
[0089] It should be noted that, in the embodiments of this application, the median value of the preset component range corresponding to the image component to be predicted can be used as the preset component value, and then used as the predicted value corresponding to the image component to be predicted. Assuming the bit depth of the image component to be predicted is represented by BitDepthC, the median value of the image component to be predicted can be calculated as 1 << (BitDepthC-1). This calculation method can be specifically set according to the actual situation, and the embodiments of this application do not impose specific limitations.
[0090] For example, taking the chroma component as an example, if the current video image is an 8-bit video, then the range of the chroma component is 0 to 255, with a midpoint of 128. Therefore, the preset component value can be 128, which is the default value. If the current video image is a 10-bit video, then the range of the chroma component is 0 to 1023, with a midpoint of 512. Therefore, the preset component value can be 512, which is the default value. In this embodiment, the bit information of the video image will be 10 bits, meaning the preset component value is 512.
[0091] Furthermore, in some embodiments, for S502, after using the preset component value as the predicted value corresponding to the image component to be predicted, the method may further include:
[0092] S502c: For each pixel in the coding block, the image component to be predicted for each pixel is filled with the predicted value using the preset component value.
[0093] It should be noted that if the number of valid pixels in the first reference pixel set is less than the preset number, no additional processing module is needed. Instead, the fixed default values are used to fill the predicted image components in the coding block with the predicted values.
[0094] For example, assuming the preset component value is 512 and the image component to be predicted is the chrominance component, then for the chrominance prediction value corresponding to each pixel in the coding block, 512 can be directly used to fill the chrominance prediction value.
[0095] S503: When the number of valid pixels in the first reference pixel set is greater than or equal to a preset number, the first reference pixel set is filtered to obtain a second reference pixel set;
[0096] It should be noted that the first parameter pixel set may contain some unimportant reference pixels (e.g., those with poor correlation) or some abnormal reference pixels. To ensure the accuracy of the prediction model, these reference pixels need to be removed, resulting in the second reference pixel set. The number of valid pixels in the second reference pixel set is less than or equal to a preset number. In practical applications, the preset number of valid pixels in the second reference pixel set is usually four, but this embodiment does not impose a specific limitation.
[0097] It should also be noted that 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 can be further filtered to obtain the second reference pixel set. After obtaining the second reference pixel set, it is still necessary to make a judgment based on the number of valid pixels in the second reference pixel set and the preset number. Specifically, if the number of valid pixels in the second reference pixel set is less than the preset number, the preset component value can be used as the predicted value corresponding to the image component to be predicted. If the number of valid pixels in the second reference pixel set is equal to the preset number, the model parameters can be derived based on the second reference pixel set.
[0098] Furthermore, in some embodiments, for S503, filtering the first reference pixel set to obtain the second reference pixel set may include:
[0099] The position of the pixel to be selected is determined based on the pixel position and / or image component intensity of each adjacent reference pixel in the first reference pixel set.
[0100] Based on the determined position of the pixel to be selected, select the effective pixel corresponding to the position of the pixel to be selected from the first reference pixel set, and form a second reference pixel set by the selected effective pixels; wherein the number of effective pixels in the second reference pixel set is less than or equal to a preset number.
[0101] Specifically, the selection of the first reference pixel set can be based on the position of the candidate reference pixels or on the intensity of image components (such as luminance and chrominance values), thereby forming the selected candidate reference pixels into a second reference pixel set. The following description will use the position of the candidate reference pixels as an example.
[0102] Assuming the number of valid pixel samples in the upper and upper right regions adjacent to the current coding block is numSampT, and the number of valid pixel samples in the left and lower left regions adjacent to the current coding block is numSampL, the filtering process is as follows (where availT represents the validity of the adjacent row in the current coding block, availL represents the validity of the adjacent column to the left 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+
[0108] Min(numTopRight,nTbH)):0
[0109] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+
[0110] Min(numLeftBelow, nTbW)): 0
[0111] Here, numTopRight represents the number of valid pixels within the upper right nTbW range, and numLeftBelow represents the number of valid pixels within the lower left nTbH range. The number of pixels selected on each edge is represented by cntN, the starting point position is represented by startPosN, the selection interval is represented by pickStepN, and the position of the pixel to be selected is represented by pickPosN[pos]. The derivation process is as follows.
[0112] The variable numIs4N indicates whether to filter 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, representing the cases of filtering pixels on the top and left sides, respectively. That is, the N-side represents either the T-side or the L-side. If the validity of the N-side (availN) is TRUE and the selected intra-frame mode (predModeIntra) is INTRA_LT_CCLM or INTRA_N_CCLM, then the number of pixels (cntN) filtered on the N-side and the position (pickPosN[pos]) of the selected pixels are as follows (note that the total number of pixels filtered 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, meaning the number of pixels selected is 0.
[0122] Assuming the predicted samples for the current coded block are predSamples[x][y]with x=0...nTbW-1, y=0...nTbH-1, the derivation is as follows:
[0123] If both numSampL and numSampT are invalid, they are set to the default values, as shown below.
[0124] predSamples[x][y]=1<<(BitDepth C -1),
[0125] otherwise,
[0126] The first step is to obtain the brightness reconstruction samples pY[x][y] of the same brightness block with x=0...nTbW*2-1, y=0...nTbH*2-1;
[0127] The second step is to obtain adjacent brightness reconstruction samples pY[x][y]:
[0128] The third step is to obtain the downsampled brightness reconstruction sample pDsY[x][y] with x=0...nTbW-1, y=0…nTbH–1
[0129] Fourth step: When numSampL is greater than 0, the chromaticity value pSelC[idx] of the selected point on the left is set to p[-1][pickPosL[idx]]with idx=0...cntL-1, and the downsampled reconstructed luminance value pSelDsY[idx]with idx=0...cntL–1 of the selected point on the left is obtained.
[0130] Step 5: When numSampT is greater than 0, the chromaticity value pSelC[idx] of the selected point on the upper side is set to p[pickPosT[idx-cntL]][-1]with idx=cntL...cntL+cntT-1, and the downsampled reconstructed luminance value pSelDsY[idx]with idx=0…cntL+cntT-1 is obtained.
[0131] Step 6: When cntT + cntL is not equal to 0, the derivation of variables minY, maxY, minC, and maxC is as follows.
[0132] When cntT+cntL equals 2, pSelComp[3] is set to pSelComp[0], pSelComp[2] is set to pSelComp[1], pSelComp[0] is set to pSelComp[1], and pSelComp[1] is set to pSelComp[3]. Here, Comp is replaced by DsY and C respectively to represent the reconstructed brightness and chromaticity of the selected adjacent samples.
[0133] The derivation of arrays minGrpIdx and maxGrpIdx is as follows.
[0134] minGrpIdx[0]=0
[0135] minGrpIdx[1]=2
[0136] maxGrpIdx[0]=1
[0137] maxGrpIdx[1]=3
[0138] When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped.
[0139] (minGrpIdx[0],minGrpIdx[1])=Swap(minGrpIdx[0],minGrpIdx[1])
[0140] When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped.
[0141] (maxGrpIdx[0],maxGrpIdx[1])=Swap(maxGrpIdx[0],maxGrpIdx[1])
[0142] When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped.
[0143] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx)
[0144] When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped.
[0145] (minGrpIdx[1],maxGrpIdx[0])=Swap(minGrpIdx[1],maxGrpIdx[0])
[0146] The variables maxY, maxC, minY, and minC are calculated as follows (representing the means of the two groups, respectively).
[0147] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1
[0148] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1
[0149] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1
[0150] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1
[0151] Step 7: The derivation of the linear model parameters a, b, and k is as follows (here, a is the slope (the difference in chroma compared to the difference in luminance), b is the intercept, and k is a shift of a, storing a as an integer).
[0152] When numSampL equals 0 and numSampT equals 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+xy)<1)? 1:3+xy
[0166] a=((3+xy)<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 equals 0),
[0170] k = 0
[0171] a = 0
[0172] b = minC
[0173] Step 8: The chromaticity prediction samples predSamples[x][y] with x=0...nTbW-1, y=0...nTbH–1 are calculated as follows (where Clip1C restricts the predicted values to between 0 and 1023).
[0174] predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b)
[0175] For example, let's illustrate the selection of four adjacent reference pixels. Assume the positions of the reference pixels within the upper selection region W' are S[0,-1], ..., S[W'-1,-1], and the positions of the reference pixels within the left selection region H' are S[-1,0], ..., S[-1,H'-1]. The selection method that allows choosing a maximum of four adjacent reference pixels is as follows:
[0176] For the INTRA_LT_CCLM mode, when both the upper and left adjacent regions are valid, two candidate adjacent reference pixels can be selected within the upper selection region W', with corresponding positions S[W' / 4,-1] and S[3W' / 4,-1], respectively; and two candidate adjacent reference pixels can be selected within the left selection region H', with corresponding positions S[-1,H' / 4] and S[-1,3H' / 4], respectively. These four candidate adjacent reference pixels form the second reference pixel set, as shown in Figure 6A. In Figure 6A, both the left and upper adjacent regions of the coded block are valid. Furthermore, to maintain the same resolution for the luminance and chrominance components, downsampling processing is required for the luminance component, ensuring that the downsampled luminance and chrominance components have the same resolution.
[0177] For the INTRA_L_CCLM mode, when only the left and lower left adjacent regions are valid, four candidate adjacent reference pixels can be selected within the left selection region H', with corresponding positions S[-1,H' / 8], S[-1,3H' / 8], S[-1,5H' / 8], and S[-1,7H' / 8], respectively. These four candidate adjacent reference pixels are combined into a second reference pixel set, as shown in Figure 6B. In Figure 6B, both the left and lower left adjacent regions of the coded block are valid. Furthermore, to maintain the same resolution for the luminance and chrominance components, downsampling processing is still required for the luminance component, ensuring that the downsampled luminance and chrominance components have the same resolution.
[0178] For the INTRA_T_CCLM mode, when only the upper and upper right adjacent regions are valid, four candidate adjacent reference pixels can be selected within the upper selection region W', with corresponding positions S[W' / 8,-1], S[3W' / 8,-1], S[5W' / 8,-1], and S[7W' / 8,-1]. These four candidate adjacent reference pixels form the second reference pixel set, as shown in Figure 6C. In Figure 6C, both the upper and upper right adjacent regions of the coded block are valid. Furthermore, to maintain the same resolution for the luminance and chrominance components, downsampling processing is still required for the luminance component, ensuring that the downsampled luminance and chrominance components have the same resolution.
[0179] Thus, when 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 4 valid pixels.
[0180] S504: When the number of valid pixels in the second reference pixel set is less than a preset number, the preset component value is used as the prediction value corresponding to the image component to be predicted;
[0181] S505: When the number of valid pixels in the second reference pixel set is equal to the preset number, the model parameters are determined through the second reference pixel set, and the prediction model corresponding to the image component to be predicted is obtained according to the model parameters;
[0182] It should be noted that after filtering the first reference pixel set, a second reference pixel set is obtained. The number of valid pixels in the second reference pixel set can be less than a preset number, or greater than or equal to a preset number. If the number of valid pixels in the second reference pixel set is less than the preset number, then the preset component value is directly used as the predicted value corresponding to the image component to be predicted; if the number of valid pixels in the second reference pixel set is greater than or equal to the preset number, then the model parameters are determined through the second reference pixel set, and the prediction model corresponding to the image component to be predicted is obtained based on the model parameters. It should be noted that since the reference pixels used in the model parameter derivation are generally 4, the second reference pixel set obtained after filtering is either less than the preset number (the second reference pixel set has less than 4 valid pixels) or equal to the preset number (the second reference pixel set includes 4 valid pixels).
[0183] It should also be noted that the prediction model can be a linear model or a nonlinear model; among which, the nonlinear model can be a nonlinear form such as a quadratic curve, or a nonlinear form composed of multiple linear models, such as the multi-model CCLM (MMLM) cross-component prediction technique, which is a nonlinear form composed of multiple linear models; the embodiments of this application do not specifically limit it. The prediction model can be used to perform prediction processing on the image components to be predicted, so as to obtain the predicted values corresponding to the image components to be predicted.
[0184] After obtaining the second reference pixel set, if the number of valid pixels in the second reference pixel set is equal to the preset number, the model parameters can be determined based on the second reference pixel set. After deriving the model parameters, the prediction model corresponding to the chromaticity component can also be obtained based on the model parameters, as shown in Equation (1); then the prediction model is used to perform prediction processing on the chromaticity component to obtain the predicted value corresponding to the chromaticity component.
[0185] Furthermore, in some embodiments, for S505, after obtaining the prediction model corresponding to the image component to be predicted based on the model parameters, the method may further include:
[0186] Based on the prediction model, the image component to be predicted for each pixel in the coding block is predicted to obtain the predicted value corresponding to the image component to be predicted for each pixel.
[0187] It should be noted that when the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, it is necessary to determine the model parameters (such as α and β) through the first reference pixel set, and then obtain the prediction model corresponding to the image component to be predicted based on the model parameters, so as to obtain the predicted value corresponding to the image component to be predicted for each pixel in the coding block. For example, assuming that the image component to be predicted is a chrominance component, the prediction model corresponding to the chrominance component as shown in Equation (1) can be obtained based on the model parameters α and β; then, the prediction model shown in Equation (1) is used to perform prediction processing on the chrominance component of each pixel in the coding block, so as to obtain the predicted value corresponding to the chrominance component of each pixel.
[0188] In this embodiment, for the left adjacent region, the lower left adjacent region, the upper adjacent region, and the upper right adjacent region, there may be valid regions and there may be invalid regions, which may result in the number of valid pixels selected from the adjacent regions being less than the preset number. Therefore, in some embodiments, referring to Figure 7, a flowchart of another image component prediction method provided by this embodiment is shown. As shown in Figure 7, after S501, the method may 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] Furthermore, following S503, the method may further include:
[0191] S702: Determine whether the number of valid pixels in the second reference pixel set is less than the preset number.
[0192] It should be noted that the number of valid pixels can be determined based on the validity of adjacent regions. Thus, after determining the number of valid pixels, it is compared with a preset number. If the number of valid pixels in the first reference pixel set is less than the preset number, step S502 is executed; if the number of valid pixels in the second reference pixel set is less than the preset number, step S504 is executed; and if 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 also be noted that the preset number can be 4. The following will be a detailed description using the preset number of 4 as an example.
[0194] In one possible implementation, when the number of valid pixels in the first reference pixel set is greater than or equal to a preset number, since the reference pixels used for model parameter derivation are generally 4, the first reference pixel set can be filtered first so that the number of valid pixels in the first reference pixel set is 4; then the model parameters are derived based on these 4 valid pixels, and the prediction model corresponding to the image component to be predicted is obtained based on the model parameters, so as to obtain the prediction value corresponding to the image component to be predicted.
[0195] Specifically, it is assumed that the image component to be predicted is the chromaticity component, and the chromaticity component is predicted through the luminance component. Assume that the four valid pixels selected through filtering are numbered 0, 1, 2, and 3. By comparing these four selected valid pixels, based on four comparisons, the two pixels with larger luminance values (which may include the pixel with the largest luminance value and the pixel with the second largest luminance value) and the two pixels with smaller luminance values (which may include the pixel with the smallest luminance value and the pixel with the second smallest luminance value) can be further selected. Furthermore, two arrays, minIdx[2] and maxIdx[2], can be set to store two sets of pixels respectively. Initially, the valid pixels numbered 0 and 2 are placed in minIdx[2], and the valid pixels numbered 1 and 3 are placed in maxIdx[2], as shown below.
[0196] Init:minIdx[2]={0,2},maxIdx[2]={1,3}
[0197] After this, through four comparisons, it can be determined that minIdx[2] stores the two pixels with smaller brightness values, and maxIdx[2] stores the two pixels with larger brightness values, as shown below.
[0198] Step1:if(L[minIdx[0]]>L[minIdx[1]],swap(minIdx[0],minIdx[1])
[0199] Step2:if(L[maxIdx[0]]>L[maxIdx[1]],swap(maxIdx[0],maxIdx[1])
[0200] Step3:if(L[minIdx[0]]>L[maxIdx[1]],swap(minIdx,maxIdx)
[0201] Step4:if(L[minIdx[1]]>L[maxIdx[0]],swap(minIdx[1],maxIdx[0])
[0202] In this way, we can obtain the two pixels with smaller brightness values, and their corresponding brightness values can be represented by luma. 0 min and Luma 1 min This indicates that the corresponding chroma values are represented by chroma. 0 min and chroma 1 min This indicates that the two pixels with larger brightness values can also be obtained, and their corresponding brightness values are represented by luma. 0 max and Luma 1 max This indicates that the corresponding chroma values are represented by chroma. 0 max and chroma 1 max This is represented by the expression. Further, by averaging the brightness values corresponding to the two smaller pixels, the brightness value corresponding to the first average point can be obtained using the expression "luma". min This means that by averaging the brightness values corresponding to two larger pixels, the brightness value corresponding to the second average point can be obtained using luma. max Similarly, the chromaticity values corresponding to the two mean points can be obtained using chroma... min and chroma max The details are as follows:
[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] In other words, after obtaining two mean points (luma) min chroma min ) and (luma) max chroma max After that, the model parameters can be obtained from these two points using the "two points determine a straight line" calculation method. Specifically, the model parameters α and β can be calculated using equation (2).
[0208]
[0209] Wherein, the model parameter α is the slope in the prediction model, and the model parameter β is the intercept in the prediction model. Thus, after deriving the model parameters, the prediction model corresponding to the chromaticity component can be obtained based on the model parameters, as shown in Equation (1); then, the chromaticity component is predicted using this prediction model to obtain the predicted value corresponding to the chromaticity component.
[0210] In another possible implementation, for some special cases, such as the boundary of the coding block, unpredictable situations, and situations where the coding order makes it impossible to obtain adjacent reference pixels, or even situations where the coding block is divided according to tiles or slices, the left adjacent area, the lower left adjacent area, the upper adjacent area, and the upper right adjacent area are not all valid areas. There may be invalid areas, which will result in the number of valid pixels in the first reference pixel set being less than the preset number.
[0211] Thus, since 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, using the preset component value as the predicted value corresponding to the image component to be predicted may 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 a preset number, using the preset component value as the predicted value corresponding to the image component to be predicted may 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] In other words, 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.
[0216] Specifically, when the total number of adjacent reference pixels within the selected area used by the coded block is 0, 0 valid pixels will be selected. The following three special cases will result in 0 valid pixels:
[0217] In the first case, for INTRA_LT_CCLM mode, when both the upper and left adjacent regions are invalid, the selected region W' = H' = 0, as shown in Figure 8A; in Figure 8A, the gray diagonal line-filled region represents the invalid region;
[0218] In the second scenario, for the INTRA_L_CCLM mode, when both the left-side adjacent region and the lower-left adjacent region are invalid, the selected region H' = 0, as shown in Figure 8B. In Figure 8B, the gray diagonal line-filled region represents the invalid region;
[0219] In the third case, for INTRA_T_CCLM mode, when both the upper and upper right adjacent regions are invalid, the selected region W' = 0, as shown in Figure 8C. In Figure 8C, the gray diagonal-filled area represents the 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 a 2×N or N×2 coded block (N≥8), when the adjacent region on the side with a side length of 2 is valid, while the adjacent region on the side with a side length of N is invalid, the selected region is W'=2, H'=0, or W'=0, H'=2, as shown in Figure 9A; in Figure 9A, the gray diagonal-filled area represents the invalid area, and the gray solid-color filled area represents the valid area;
[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, as shown in Figure 9B; in Figure 9B, the gray diagonal line filled region represents the invalid region, and the gray solid color filled region represents the valid region;
[0225] In the third case, for the INTRA_T_CCLM mode, for a 2×N coding 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, as shown in Figure 9C; in Figure 9C, the gray diagonal filled region represents the invalid region, and the gray solid color filled region represents the valid region.
[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] In existing solutions, when there are two effective pixels, an additional "copying" operation is required to obtain four pixels in order to use the same processing module. This allows for the derivation of model parameters using the same process as when there are four effective pixels, adding an extra "copying" operation. Furthermore, the four obtained pixels still require four comparisons and four averaging calculations, resulting in higher computational complexity. However, in this embodiment, the processing when there are two effective pixels is aligned with the processing when there are zero effective pixels. In this case, no additional operation is required to directly use the same processing module, thereby reducing computational complexity.
[0230] Referring to Figure 10, it shows a schematic flowchart of a model parameter derivation provided in an embodiment of this application. In Figure 10, assuming the image component to be predicted is the chroma component, firstly, adjacent reference pixels are obtained from the selected area to form a first adjacent reference pixel set; then, the number of valid pixels in the first adjacent reference pixel set is determined; when the number of valid 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 valid pixels in the second adjacent reference pixel set is determined; when the number of valid pixels in the first or second reference pixel set is 0, the model parameter α is set to 0, and the model parameter β is set to the default value, at which point the predicted value corresponding to the chroma component is filled with the default value; when the number of valid pixels in the first or second reference pixel set is 2, the processing steps are the same as when the number of valid pixels is 0; and when the number of valid pixels in the second reference pixel set is 4, firstly, after 4 comparisons, the two pixels with the larger value and the two pixels with the smaller value of the chroma component are obtained, and 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 coding blocks with 4 valid pixels in the second reference pixel set can perform the derivation of model parameters in CCLM mode; while for coding blocks with less than 4 valid pixels, the default value filling method is directly used, which can reduce the computational complexity when the number of reference pixels in the selected area is less than 4, and can also maintain the encoding and decoding performance basically unchanged.
[0231] In this embodiment, a unified model parameter derivation process is implemented. Specifically, regarding the number of valid pixels in the first reference pixel set used for model parameter derivation, when the number of valid pixels in the first reference pixel set is greater than or equal to a 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 the second reference pixel set meets the preset number, the current coding block needs to perform the derivation of model parameters under CCLM and the construction of a prediction model. When the number of valid pixels in either the first or second reference pixel set is less than the preset number, the current coding block can use default values to fill in the predicted values corresponding to the image components to be predicted in the coding block. Therefore, this embodiment can also provide a simplified process for model parameter derivation, as shown in Figure 11.
[0232] Compared to Figure 10, the derivation process of the model parameters shown in Figure 11 is more concise. In Figure 11, assuming the image component to be predicted is the chroma component, with a preset component value of 512, firstly, adjacent reference pixels are obtained from the selected area to form a first adjacent reference pixel set; then, the number of valid pixels in the first adjacent 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, and 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 model parameter α is set to 0, and the model parameter β is set to 512, at which point 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, firstly, after 4 comparisons, the two pixels with the larger chroma component value and the two pixels with the smaller chroma component value are obtained, and 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. It should be noted that only coded blocks with a preset number of valid pixels in the second reference pixel set can perform model parameter derivation in CCLM mode; for coded blocks with fewer than the preset number of valid pixels, default values are directly used for filling, which reduces the computational complexity when the number of reference pixels in the selected area is less than the preset number, and also maintains the encoding and decoding performance basically unchanged. Typically, the preset number in this embodiment 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 area. Therefore, this embodiment can also provide another simplified process for deriving model parameters, as shown in Figure 12.
[0234] In Figure 12, assuming the image component to be predicted is the chroma component, with a preset component value of 512, the selection area is first determined to obtain the 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 the second reference pixel set, and then the number of valid pixels in the second adjacent reference pixel set is determined; when the number of valid pixels in 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, and 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] This embodiment provides an image component prediction method. It involves obtaining a first reference pixel set corresponding to the image component to be predicted in a coded block of a video image; when the number of valid pixels in the first reference pixel set is less than a preset number, a preset component value is used as the predicted value corresponding to the image component to be predicted; 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, where the 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 less than the preset number, the preset component value is used as the predicted value corresponding to the image component to be predicted. The measurement is performed as follows: When the number of valid pixels in the second reference pixel set is equal to the preset number, the model parameters are determined through the second reference pixel set, and the prediction model corresponding to the image component to be predicted is obtained according to the model parameters. This prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the prediction value corresponding to the image component to be predicted. In this way, the derivation process of the model parameters is unified without changing the encoding and decoding prediction performance. At the same time, for the case where the number of valid pixels in the adjacent reference pixel set is less than the preset number, especially the case where there are 0 or 2 valid pixels, no additional processing module is added, so no additional processing is required, and the computational complexity is reduced.
[0251] In another embodiment of this application, if the number of valid pixels in the first reference pixel set is less than a preset number, the CCLM mode can be directly disabled, and the preset component value can be used as the predicted value corresponding to the image component to be predicted. Therefore, in some embodiments, after filtering the first reference pixel set to obtain the second reference pixel set, the method may further include:
[0252] 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, the preset component value is used as the predicted value corresponding to the image component to be predicted.
[0253] When the number of valid pixels in the second reference pixel set is greater than or equal to a preset number, the CCLM mode is adopted to realize the prediction processing of the image component to be predicted.
[0254] It should be noted that when the number of valid pixels in the first or second reference pixel set is less than the preset number, the CCLM mode can be disabled. For example, the CCLM mode usage flag can be set to "Disable CCLM mode". In this case, the predicted value corresponding to the image component to be predicted is directly filled with the default value. The CCLM mode will only be used when the number of valid pixels in the second reference pixel set is greater than or equal to the preset number. For example, the CCLM mode usage flag can be set to "Enable CCLM mode". In this case, the prediction processing of the image component to be predicted can be achieved through the CCLM mode.
[0255] It should also be noted that, assuming the image component to be predicted is a chroma component, and the preset number is 4, then for all cases where 2 valid pixels may be generated (wherein, the method for determining 2 valid pixels is not specifically limited in this application embodiment), the model parameter α can be set to 0, and the model parameter β can be set to the intermediate value (also called the default value) corresponding to the chroma component, so that the predicted values corresponding to the chroma components of all pixels in the coding block are filled with the default value; in addition, for all cases where 2 valid pixels may be generated, numSampL and numSampT can both be set to 0, so that the predicted values corresponding to the chroma components of all pixels in the coding block are filled with the default value.
[0256] In addition, for all cases where two valid pixels may be generated, the predicted value corresponding to the chroma component can be directly filled with the default value; or for all cases where two valid pixels may be generated, CCLM mode can be disabled; or for all cases where two or zero valid pixels may be generated, CCLM mode can be disabled; or for all cases where two or zero valid pixels may be generated, the predicted value corresponding to the chroma component can be directly filled with the default value.
[0257] In this way, the model parameter derivation process is unified when the number of effective pixels used for model parameter derivation varies. Specifically, when there are 2 effective pixels, no additional processing is needed; the existing processing module is directly called (i.e., the processing when there are 2 effective pixels is aligned with the processing when there are 0 effective pixels), thereby reducing computational complexity.
[0258] The image component prediction method in this application embodiment is based on the latest VVC reference software VTM5.0. Under Allintra conditions, the average changes in BD-rate for the Y component, Cb component, and Cr component of the test sequence required by JVET under the general test conditions are 0.00%, 0.02%, and 0.02%, respectively. This indicates that this application has virtually no impact on encoding and decoding performance.
[0259] Without affecting encoding and decoding performance, this application can have the following beneficial effects:
[0260] First, this application unifies the derivation process of model parameters in CCLM mode. In existing solutions, for the case with 2 effective pixels, an additional "copying" operation is required to generate 4 usable pixels, thus allowing the same operation to be performed as when there are 4 effective pixels, thereby completing the derivation of model parameters. However, this application can save the additional "copying" operation and align the processing when there are 2 effective pixels with the processing when there are 0 effective pixels. In this case, no additional operation is needed to directly use the same processing module, thereby unifying the derivation process of linear model parameters.
[0261] Secondly, this application can also reduce the computational complexity when there are only two effective pixels for model parameter derivation in CCLM mode. In existing solutions, for the case of two effective pixels, not only is an additional "copying" operation required to generate four usable pixels, but the same operations as when there are four effective pixels are also required: four comparisons, four mean calculations, model parameter calculations, and building a prediction model for prediction. However, this application can save these operations by directly using the predicted values Pred corresponding to the chroma components of all pixels in the current coding block. C The [i,j] area is filled with preset component values, which are the default values for the chroma components, without affecting encoding and decoding performance.
[0262] This embodiment provides an image component prediction method. The method compares the number of valid pixels in a first reference pixel set with a preset number. When the number of valid pixels in either the first or second reference pixel set is less than the preset number, a preset default value is directly used as the predicted value for the image component to be predicted. Only when the number of valid pixels in the second reference pixel set is greater than or equal to the preset number will the model parameters be determined based on the first reference pixel set to construct a prediction model for the image component to be predicted, thus unifying the derivation process of the model parameters. Furthermore, for the case where the number of valid pixels in the first reference pixel set is less than the preset number, no additional processing module is added, and the computational complexity is reduced.
[0263] Based on the same inventive concept as the foregoing embodiments, referring to FIG13, a schematic diagram of the composition structure of an image component prediction device 130 provided in an embodiment of this application is shown. The image component prediction device 130 may include: an acquisition unit 1301, a prediction unit 1302, and a filtering unit 1303, wherein...
[0264] The acquisition unit 1301 is configured to acquire the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image;
[0265] The prediction unit 1302 is configured to use a preset component value as the prediction value corresponding to the image component to be predicted when the number of valid pixels in the first reference pixel set is less than a preset number.
[0266] The filtering unit 1303 is configured to filter the first reference pixel set to obtain a second reference pixel set when the number of valid pixels in the first reference pixel set is greater than or equal to a preset number; wherein the number of valid pixels 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 the number of valid pixels in the second reference pixel set is less than a preset number, use a preset component value as the predicted value corresponding to the image component to be predicted; and when the number of valid pixels in the second reference pixel set is equal to the preset number, determine model parameters through the second reference pixel set, and obtain a prediction model corresponding to the image component to be predicted based on the model parameters; wherein the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0268] In the above scheme, the acquisition unit 1301 is specifically configured to acquire reference pixels adjacent to at least one side of the coding block; wherein, the at least one side includes the left side of the coding block and / or the top side of the coding block; and based on the reference pixels, to form a first reference pixel set corresponding to the image component to be predicted.
[0269] In the above scheme, the acquisition unit 1301 is specifically configured to acquire reference pixels in reference rows or reference columns adjacent to the coding block; wherein, the reference row is composed of the rows adjacent to the upper side and the upper right side of the coding block, and the reference column is composed of the columns adjacent to the left side and the lower left side of the coding block; and based on the reference pixels, to form a first reference pixel set corresponding to the image component to be predicted.
[0270] In the above scheme, the filtering unit 1303 is specifically configured to determine the position of the pixel to be selected based on the pixel position and / or image component intensity corresponding to each adjacent reference pixel in the first reference pixel set; and select effective pixels corresponding to the position of the pixel to be selected from the first reference pixel set according to the determined position of the pixel to be selected, and form a second reference pixel set by the selected effective pixels; wherein the number of effective pixels 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 may further include a determination unit 1304, configured to determine a preset component range corresponding to the image component to be predicted based on the bit information of the video image; and to determine an intermediate value of the preset component range according to the preset component range, and use the intermediate value as the prediction value corresponding to the image component to be predicted; wherein the intermediate value represents a preset component value.
[0272] In the above scheme, referring to Figure 13, the image component prediction device 130 may further include a filling unit 1305, configured to fill the image component to be predicted of each pixel in the coding block with the preset component value.
[0273] In the above scheme, the prediction unit 1302 is further configured to perform prediction processing on the image component to be predicted for each pixel in the coding block based on the prediction model, so as to obtain the prediction value corresponding to the image component to be predicted for each pixel.
[0274] In the above scheme, the preset number is 4; the prediction unit 1302 is also configured to use the preset component value as the prediction value corresponding to the image component to be predicted when the number of valid pixels in the first reference pixel set is 0 or 2.
[0275] Accordingly, the prediction unit 1302 is further configured to use a preset component value as the prediction value corresponding to the image component to be predicted when the number of valid pixels in the second reference pixel set is 0 or 2.
[0276] In the above scheme, referring to Figure 13, the image component prediction device 130 may further include a judgment unit 1306, configured to use a preset component value as the prediction value corresponding to the image component to be predicted 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; and to adopt the CCLM mode when the number of valid pixels in the second reference pixel set is greater than or equal to the preset number, so as to realize the prediction processing of the image component to be predicted.
[0277] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.
[0278] If the integrated unit is implemented as a software functional module and not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0279] Therefore, this embodiment provides a computer storage medium storing an image component prediction program, which, when executed by at least one processor, implements the steps of the method described in any of the foregoing embodiments.
[0280] Based on the composition of the image component prediction device 130 described above and the computer storage medium, referring to Figure 14, which illustrates the specific hardware structure of the image component prediction device 130 provided in this embodiment, it may include: a network interface 1401, a memory 1402, and a processor 1403; the various components are coupled together through a bus system 1404. It is understood that the bus system 1404 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 1404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 1404 in Figure 14. The network interface 1401 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
[0281] Memory 1402 is used to store computer programs that can run on processor 1403;
[0282] Processor 1403, when running the computer program, performs the following:
[0283] Obtain the first reference pixel set corresponding to the image component to be predicted in the coded block of the video image;
[0284] When the number of valid pixels in the first reference pixel set is less than a preset number, the preset component value is used as the predicted value corresponding to the image component to be predicted.
[0285] When the number of valid pixels in the first reference pixel set is greater than or equal to a preset number, the first reference pixel set is filtered 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;
[0286] 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 predicted value corresponding to the image component to be predicted.
[0287] When the number of valid pixels in the second reference pixel set is equal to the preset number, the model parameters are determined by the second 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 perform prediction processing on the image component to be predicted in order to obtain the prediction value corresponding to the image component to be predicted.
[0288] It is understood that the memory 1402 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1402 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0289] The processor 1403 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 1403 or by instructions in software form. The processor 1403 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1402. Processor 1403 reads the information in memory 1402 and completes the steps of the above method in conjunction with its hardware.
[0290] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0291] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.
[0292] Alternatively, as another embodiment, the processor 1403 is further configured to perform the steps of the method described in any of the foregoing embodiments when running the computer program.
[0293] Referring to Figure 15, it shows a schematic diagram of the composition structure of an encoder provided in an embodiment of this application. As shown in Figure 15, the encoder 150 may include at least the image component prediction device 130 described in any of the foregoing embodiments.
[0294] Referring to Figure 16, it shows a schematic diagram of the composition structure of a decoder provided in an embodiment of this application. As shown in Figure 16, the decoder 160 may include at least the image component prediction device 130 described in any of the foregoing embodiments.
[0295] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0296] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0297] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0298] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0299] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0300] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0301] Industrial applicability
[0302] In this embodiment, a first reference pixel set corresponding to the image component to be predicted of the coded block in the video image is obtained; when the number of valid pixels in the first reference pixel set is less than a preset number, a preset component value is used as the predicted value corresponding to the image component to be predicted; 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, the number of valid pixels in the second reference pixel set being less than or equal to the preset number; when the number of valid pixels in the second reference pixel set is less than the preset number, a preset component value is used as the predicted value corresponding to the image component to be predicted; when the number of valid pixels 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 image component to be predicted is obtained based on the model parameters. This prediction model is used to implement the prediction of the image component to be predicted. The prediction process is performed to obtain the predicted value corresponding to the image component to be predicted. Thus, 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, the preset default value is directly used as the predicted value corresponding to the image component to be predicted. Only when the number of valid pixels in the second reference pixel set meets the preset number will the model parameters be determined based on the first reference pixel set to establish the prediction model for the image component to be predicted, thereby unifying the derivation process of the model parameters. Furthermore, for cases where the number of valid pixels in the first or second reference pixel set is less than the preset number, especially when there are 0 or 2 valid pixels, since no additional processing module is added, the preset default value is directly used as the predicted value corresponding to the image component to be predicted, thus eliminating the need for additional processing and reducing computational complexity.
Claims
1. An image component prediction method, applied to a decoder, the method comprising: Obtain the first reference pixel set corresponding to the image component to be predicted in the coded block of the video image; When the number of valid pixels in the first reference pixel set is 0, a preset component value is used as the predicted value corresponding to the image component to be predicted. 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. The 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, model parameters are determined using the second reference pixel set, and a prediction model corresponding to the image component to be predicted is obtained based on the model parameters. The prediction model is used to perform prediction processing on the image component to be predicted to obtain the predicted value corresponding to the image component to be predicted. The filtering process of the first reference pixel set to obtain the second reference pixel set includes: determining the position of a pixel to be selected based on the pixel positions corresponding to adjacent reference pixels in the first reference pixel set; selecting valid pixels corresponding to the position of the pixel to be selected from the first reference pixel set according to the determined position of the pixel to be selected; and determining the second reference pixel set based on the selected valid pixels.
2. The method according to claim 1, wherein, The step of obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image includes: obtaining reference pixels adjacent to at least one edge of the coded block; wherein the at least one edge includes the left edge of the coded block and / or the top edge of the coded block; and determining the first reference pixel set corresponding to the image component to be predicted based on the reference pixels.
3. The method according to claim 1, wherein, The step of obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image includes: obtaining reference pixels in the reference rows and / or reference columns adjacent to the coded block; wherein the reference rows are composed of the rows adjacent to the upper side and the upper right side of the coded block, and the reference columns are composed of the columns adjacent to the left side and the lower left side of the coded block; and determining the first reference pixel set corresponding to the image component to be predicted based on the reference pixels.
4. The method according to claim 1, wherein, The step of using a preset component value as the predicted value corresponding to the image component to be predicted includes: determining the preset component value based on the bit depth of the video image.
5. The method according to claim 4, wherein, The preset component value is set to 1 << (BitDepth-1), where BitDepth is the bit depth of the image component to be predicted.
6. The method according to claim 1, wherein, The method further includes: for pixels in the coding block, using the preset component values to fill the image components to be predicted of the pixels with predicted values.
7. The method according to claim 1, wherein, After obtaining the prediction model corresponding to the image component to be predicted based on the model parameters, the method further includes: performing prediction processing on the image component to be predicted of the pixel in the coding block based on the prediction model to obtain the prediction value corresponding to the image component to be predicted of the pixel.
8. An image component prediction method applied to an encoder, the method comprising: Obtain the first reference pixel set corresponding to the image component to be predicted in the coded block of the video image; When the number of valid pixels in the first reference pixel set is 0, a preset component value is used as the predicted value corresponding to the image component to be predicted. 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. The 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, model parameters are determined using the second reference pixel set, and a prediction model corresponding to the image component to be predicted is obtained based on the model parameters. The prediction model is used to perform prediction processing on the image component to be predicted to obtain the predicted value corresponding to the image component to be predicted. The filtering process of the first reference pixel set to obtain the second reference pixel set includes: determining the position of a pixel to be selected based on the pixel positions corresponding to adjacent reference pixels in the first reference pixel set; selecting valid pixels corresponding to the position of the pixel to be selected from the first reference pixel set according to the determined position of the pixel to be selected; and determining the second reference pixel set based on the selected valid pixels.
9. The method according to claim 8, wherein, The step of obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image includes: obtaining reference pixels adjacent to at least one edge of the coded block; wherein the at least one edge includes the left edge of the coded block and / or the top edge of the coded block; and determining the first reference pixel set corresponding to the image component to be predicted based on the reference pixels.
10. The method according to claim 8, wherein, The step of obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image includes: obtaining reference pixels in the reference rows and / or reference columns adjacent to the coded block; wherein the reference rows are composed of the rows adjacent to the upper side and the upper right side of the coded block, and the reference columns are composed of the columns adjacent to the left side and the lower left side of the coded block; and determining the first reference pixel set corresponding to the image component to be predicted based on the reference pixels.
11. The method according to claim 8, wherein, The step of using a preset component value as the predicted value corresponding to the image component to be predicted includes: determining the preset component value based on the bit depth of the video image.
12. The method according to claim 11, wherein, The preset component value is set to 1 << (BitDepth-1), where BitDepth is the bit depth of the image component to be predicted.
13. The method according to claim 8, wherein, The method further includes: for pixels in the coding block, using the preset component values to fill the image components to be predicted of the pixels with predicted values.
14. The method according to claim 8, wherein, After obtaining the prediction model corresponding to the image component to be predicted based on the model parameters, the method further includes: performing prediction processing on the image component to be predicted of the pixel in the coding block based on the prediction model to obtain the prediction value corresponding to the image component to be predicted of the pixel.
15. A decoder, the decoder comprising: A processor and a memory for storing a computer program capable of running on the processor, the processor being configured to: acquire a first set of reference pixels corresponding to a coded block to be predicted image component in a video image; When the number of valid pixels in the first reference pixel set is 0, a preset component value is used as the predicted value corresponding to the image component to be predicted; when the number of valid pixels in the first reference pixel set is greater than or equal to a preset number, the first reference pixel set is filtered 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; when the number of valid pixels 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 image component to be predicted is obtained according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted to obtain the predicted value corresponding to the image component to be predicted; the processor is further configured to: determine the position of a pixel to be selected based on the pixel position corresponding to an adjacent reference pixel in the first reference pixel set; select a valid pixel corresponding to the position of the pixel to be selected from the first reference pixel set according to the determined position of the pixel to be selected, and determine the second reference pixel set according to the selected valid pixel.
16. An encoder, the encoder comprising: A processor and a memory for storing a computer program capable of running on the processor, the processor being configured to: acquire a first set of reference pixels corresponding to a coded block to be predicted image component in a video image; When the number of valid pixels in the first reference pixel set is 0, a preset component value is used as the predicted value corresponding to the image component to be predicted; when the number of valid pixels in the first reference pixel set is greater than or equal to a preset number, the first reference pixel set is filtered 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; when the number of valid pixels 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 image component to be predicted is obtained according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted to obtain the predicted value corresponding to the image component to be predicted; the processor is further configured to: determine the position of a pixel to be selected based on the pixel position corresponding to an adjacent reference pixel in the first reference pixel set; select a valid pixel corresponding to the position of the pixel to be selected from the first reference pixel set according to the determined position of the pixel to be selected, and determine the second reference pixel set according to the selected valid pixel.
17. A codec system comprising a decoder and an encoder, the decoder being configured to perform the method as claimed in any one of claims 1 to 7, and the encoder being configured to perform the method as claimed in 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 as described in 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 as described in any one of claims 8 to 14.
20. A method for transmitting a code stream, characterized in that, The method of any one of claims 8 to 14 is used to generate the bitstream; and the bitstream is transmitted.
21. A computer storage medium storing a computer program and a bitstream thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 8 to 14 to generate the bitstream.
Citation Information
Patent Citations
Image component prediction method, apparatus and computer storage medium
CN113840142B