Image component prediction method and device and computer storage medium

By filtering and unifying the derivation process of model parameters in the H.266/VVC video coding standard, the computational complexity problem caused by the difference in the number of adjacent reference pixels is solved, and more efficient image component prediction is achieved.

CN121547579APending Publication Date: 2026-02-17GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511734167.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2019-06-25
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In the video coding standard H.266/VVC, existing image component prediction methods suffer from increased computational complexity due to differences in the number of adjacent reference pixels, and the derivation of model parameters is inconsistent.

Method used

By obtaining the reference pixel set of the coded block in the video image, filtering and uniformly deriving model parameters are performed based on the number of valid pixels in the set. Model parameters are determined only when the preset number is met; otherwise, preset component values ​​are used as prediction values ​​to avoid additional processing.

Benefits of technology

It reduces computational complexity, standardizes the derivation process of model parameters, reduces additional processing modules, and improves computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547579A_ABST
    Figure CN121547579A_ABST
Patent Text Reader

Abstract

The invention discloses an image component prediction method and device and a computer storage medium. The method comprises the following steps: acquiring a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image; when the number of effective pixel points in the first reference pixel set is smaller than a preset number, taking a preset component value as a predicted value corresponding to the to-be-predicted image component; when the number of effective pixel points in the first reference pixel set is not less than a preset number, screening the first reference pixel set to obtain a second reference pixel set; when the number of effective pixel points in the second reference pixel set is smaller than the preset number, the preset component value serves as a predicted value corresponding to the to-be-predicted image component; when the number of effective pixel points in the second reference pixel set is equal to a preset number, determining model parameters through the second reference pixel set, and obtaining a prediction model corresponding to the to-be-predicted image component according to the model parameters; the prediction model is used for performing prediction processing on the to-be-predicted image component to obtain a prediction value corresponding to the to-be-predicted image component.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Divisional Explanation This application is a divisional application of PCT International Patent Application No. PCT / CN2019 / 092711, filed on June 25, 2019, entitled "Image Component Prediction Method, Device and Computer Storage Medium", which entered the Chinese national phase as Chinese Patent Application No. 201980091266.2. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the technical field of video coding, and in particular to an image component prediction method, device and computer storage medium. BACKGROUND

[0003] With the increasing demand for video display quality, new video application forms such as high-definition and ultra-high-definition videos have emerged. H.265 / High Efficiency Video Coding (HEVC) has been unable to meet the needs of the rapid development of video applications, and the Joint Video Exploration Team (JVET) has proposed the next generation video coding standard H.266 / Versatile Video Coding (VVC). The corresponding test model is the reference software test platform (VTM) of VVC.

[0004] In VTM, an image component prediction method based on a prediction model has been integrated, through which the chroma component can be predicted from the luminance component of the current coding block (CB). However, when constructing the prediction model, the number of adjacent reference pixels used for model parameter derivation differs, which not only increases additional processing, but also increases computational complexity. SUMMARY

[0005] Embodiments of the present application provide an image component prediction method, device and computer storage medium, which unify the derivation process of model parameters without changing the coding prediction performance. In addition, for the case where the number of effective pixels in the adjacent reference pixel set is less than a preset number, no additional processing module is added, so that no additional processing is required, and the computational complexity is reduced.

[0006] The technical solutions of the embodiments of the present application can be implemented as follows: In a first aspect, the embodiments of the present application provide an image component prediction method, which comprises: obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image; when the number of valid pixel points in the first reference pixel set is less than the preset number, a preset component value is taken as the prediction value corresponding to the image component to be predicted; when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, the first reference pixel set is screened to obtain a second reference pixel set; wherein the number of valid pixel points in the second reference pixel set is less than or equal to the preset number; when the number of valid pixel points in the second reference pixel set is less than the preset number, a preset component value is taken as the prediction value corresponding to the image component to be predicted; when the number of valid pixel points in the second reference pixel set is equal to the preset number, a model parameter is determined through the second reference pixel set, and a prediction model corresponding to the image component to be predicted is obtained according to the model parameter; wherein the prediction model is used to realize the prediction processing of the image component to be predicted, so as to obtain the prediction value corresponding to the image component to be predicted.

[0007] In a second aspect, an embodiment of the present application provides an image component prediction device, and the image component prediction device comprises an acquisition unit, a prediction unit and a screening unit, wherein, the acquisition unit is configured to acquire a first reference pixel set corresponding to an image component to be predicted of a coding block in a video image; the prediction unit is configured to, when the number of valid pixel points in the first reference pixel set is less than the preset number, take a preset component value as the prediction value corresponding to the image component to be predicted; the screening unit is configured to, when the number of valid pixel points in the first reference pixel set is greater than or equal to the preset number, screen the first reference pixel set to obtain a second reference pixel set; wherein the number of valid pixel points in the second reference pixel set is less than or equal to the preset number; the prediction unit is further configured to, when the number of valid pixel points in the second reference pixel set is less than the preset number, take a preset component value as the prediction value corresponding to the image component to be predicted; and when the number of valid pixel points in the second reference pixel set is equal to the preset number, determine a model parameter through the second reference pixel set, and obtain a prediction model corresponding to the image component to be predicted according to the model parameter; wherein the prediction model is used to realize the prediction processing of the image component to be predicted, so as to obtain the prediction value corresponding to the image component to be predicted.

[0008] In a third aspect, an embodiment of the present application provides an image component prediction device, and the image component prediction device comprises a memory and a processor; the memory is used to store a computer program capable of running on the processor; The processor is configured to execute the computer program to perform the method of the first aspect.

[0009] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing an image component prediction program, which, when executed by at least one processor, implements the method of the first aspect.

[0010] The embodiments of the present application provide an image component prediction method and device and a computer storage medium. The first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image is obtained. When the number of effective pixel points in the first reference pixel set is less than a preset number, a preset component value is taken as a prediction value corresponding to the to-be-predicted image component. When the number of effective pixel points 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 effective pixel points in the second reference pixel set being less than or equal to the preset number. When the number of effective pixel points in the second reference pixel set is less than the preset number, the preset component value is taken as the prediction value corresponding to the to-be-predicted image component. When the number of effective pixel points in the second reference pixel set is equal to the preset number, model parameters are determined through the second reference pixel set, and a prediction model corresponding to the to-be-predicted image component is obtained according to the model parameters, the prediction model being used to implement prediction processing on the to-be-predicted image component to obtain a prediction value corresponding to the to-be-predicted image component. In this way, when the number of effective pixel points in the first reference pixel set is less than the preset number or the number of effective pixel points in the second reference pixel set is less than the preset number, the preset default value is directly taken as the prediction value corresponding to the to-be-predicted image component. Only when the number of effective pixel points in the second reference pixel set meets the preset number, the model parameters are determined according to the first reference pixel set to establish the prediction model of the to-be-predicted image component, thereby unifying the derivation process of the model parameters. In addition, for the case that the number of effective pixel points in the first reference pixel set or the second reference pixel set is less than the preset number, especially for the case that the number of effective pixel points is 0 or 2, the preset default value is directly taken as the prediction value corresponding to the to-be-predicted image component without adding an extra processing module, thereby avoiding extra processing and reducing the computational complexity. BRIEF DESCRIPTION OF DRAWINGS

[0011] Figure 1 A distribution diagram of an effective adjacent region provided by an embodiment of the present application is shown in the following figure; Figure 2 A distribution diagram of a selection region in three modes provided by an embodiment of the present application is shown in the following figure; Figure 3 A composition block diagram of a video coding system provided by an embodiment of the present application is shown in the following figure; Figure 4A component block diagram of a video decoding system provided by an embodiment of the present application; Figure 5 A flowchart of an image component prediction method provided by an embodiment of the present application; Figure 6A A structure diagram of selecting adjacent reference pixel points in an INTRA_LT_CCLM mode provided by an embodiment of the present application; Figure 6B A structure diagram of selecting adjacent reference pixel points in an INTRA_L_CCLM mode provided by an embodiment of the present application; Figure 6C A structure diagram of selecting adjacent reference pixel points in an INTRA_T_CCLM mode provided by an embodiment of the present application; Figure 7 A flowchart of another image component prediction method provided by an embodiment of the present application; Figure 8A A structure diagram of generating 0 effective pixel points in an INTRA_LT_CCLM mode provided by an embodiment of the present application; Figure 8B A structure diagram of generating 0 effective pixel points in an INTRA_L_CCLM mode provided by an embodiment of the present application; Figure 8C A structure diagram of generating 0 effective pixel points in an INTRA_T_CCLM mode provided by an embodiment of the present application; Figure 9A A structure diagram of generating 2 effective pixel points in an INTRA_LT_CCLM mode provided by an embodiment of the present application; Figure 9B A structure diagram of generating 2 effective pixel points in an INTRA_L_CCLM mode provided by an embodiment of the present application; Figure 9C A structure diagram of generating 2 effective pixel points in an INTRA_T_CCLM mode provided by an embodiment of the present application; Figure 10 A flowchart of deriving model parameters provided by an embodiment of the present application; Figure 11 A simplified flowchart of deriving model parameters provided by an embodiment of the present application; Figure 12 A simplified flowchart of deriving model parameters provided by another embodiment of the present application; Figure 13 A component structure diagram of an image component prediction device provided by an embodiment of the present application; Figure 14A specific hardware structure schematic diagram of an image component prediction device provided by an embodiment of the present application is shown in the following figure. Figure 15 A component structure schematic diagram of an encoder provided by an embodiment of the present application is shown in the following figure. Figure 16 A component structure schematic diagram of a decoder provided by an embodiment of the present application is shown in the following figure. DETAILED DESCRIPTION

[0012] In order to enable a person skilled in the art to more fully understand the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings, which are only used for reference and do not limit the embodiments of the present application.

[0013] In a video image, a first image component, a second image component and a third image component are generally used to represent a coding block; wherein the three image components are respectively a luminance component, a blue chroma component and a red chroma component, specifically, the luminance component is usually represented by a symbol Y, the blue chroma component is usually represented by a symbol Cb or U, and the red chroma component is usually represented by a symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.

[0014] In the embodiments of the present application, the first image component can be a luminance component, the second image component can be a blue chroma component, and the third image component can be a red chroma component, but the embodiments of the present application are not limited in this regard.

[0015] In the current video image or video coding process, for the cross-component prediction technology, mainly including Cross-component Linear Model Prediction (CCLM) mode and Multi-Directional Linear Model Prediction (MDLM) mode, whether the model parameters derived according to the CCLM mode or the model parameters derived according to the MDLM mode, the corresponding prediction model can realize the prediction between the first image component and the second image component, the second image component and the first image component, the first image component and the third image component, the third image component and the first image component, the second image component and the third image component, or the third image component and the second image component.

[0016] Taking the prediction from the first image component to the second image component as an example, in order to reduce the redundancy between the first image component and the second image component, a CCLM mode is used in VVC, at this time the first image component and the second image component are the same coding block, that is, the prediction value of the second image component is constructed according to the first image component reconstructed value of the same coding block, as shown in formula (1), (1) wherein, represents the position coordinates of the pixel point in the coding block, represents the horizontal direction, represents the vertical direction, represents the second image component prediction value corresponding to the pixel point with the position coordinates in the coding block, represents the first image component reconstructed value corresponding to the pixel point with the (down-sampled) position coordinates in the same coding block, and represent the model parameters.

[0017] For a coding block, its neighboring regions can include a left neighboring region, an upper neighboring region, a lower-left neighboring region and an upper-right neighboring region. In VVC, three kinds of cross-component linear model prediction modes can be included, which are respectively: an intra CCLM mode of left and upper neighboring (which can be represented by an INTRA_LT_CCLM mode), an intra CCLM mode of left and lower-left neighboring (which can be represented by an INTRA_L_CCLM mode) and an intra CCLM mode of upper and upper-right neighboring (which can be represented by an INTRA_T_CCLM mode). In these three modes, a preset number (such as 4) of neighboring reference pixel points can be selected for derivation of the model parameters and , and the biggest difference among the three modes is that the selection regions corresponding to the neighboring reference pixel points used for derivation of the model parameters and are different.

[0018] Specifically, for the coding block of the second image component with a size of , it is assumed that the upper selection region corresponding to the neighboring reference pixel points is , and the left selection region corresponding to the neighboring reference pixel points is ; in this way, for the INTRA_LT_CCLM mode, the neighboring reference pixel points can be selected in the upper neighboring region and the left neighboring region, that is, , ; For INTRA_L_CCLM mode, the neighboring reference pixels can be selected from the left neighboring region and the left-bottom neighboring region, i.e. , and set ; For INTRA_T_CCLM mode, the neighboring reference pixels can be selected from the top neighboring region and the right-top neighboring region, i.e. , and set .

[0019] It should be noted that in the latest VVC reference software VTM5.0, for the right-top neighboring region, only the pixels in the range of are stored at most, and for the left-bottom neighboring region, only the pixels in the range of H are stored at most; therefore, although the selection region of INTRA_L_CCLM mode and INTRA_T_CCLM mode is defined as , in actual application, the selection region of INTRA_L_CCLM mode will be limited within , and the selection region of INTRA_T_CCLM mode will be limited within ; thus, For INTRA_L_CCLM mode, the neighboring reference pixels can be selected from the left neighboring region and the left-bottom neighboring region, ; For INTRA_T_CCLM mode, the neighboring reference pixels can be selected from the top neighboring region and the right-top neighboring region, .

[0020] Referring to Figure 1 , a distribution diagram of effective neighboring regions is shown. In Figure 1 , the left neighboring region, the left-bottom neighboring region, the top neighboring region and the right-top neighboring region are all effective. On the basis of Figure 1 , the selection regions of the three modes are shown as Figure 2 . Among them, in Figure 2 , (a) shows the selection region of INTRA_LT_CCLM mode, including the left neighboring region and the top neighboring region; (b) shows the selection region of INTRA_L_CCLM mode, including the left neighboring region and the left-bottom neighboring region; (c) shows the selection region of INTRA_T_CCLM mode, including the top neighboring region and the right-top neighboring region. Thus, after the selection regions of the three modes are determined, the reference points for model parameter derivation can be selected in the selection regions. The reference points thus selected can be called neighboring reference pixels, and the number of neighboring reference pixels is usually at most 4; and for a size-determined The positions of the neighboring reference pixels of the coding block are generally determined.

[0021] However, for some special cases, such as the boundary condition of the coding block, the unpredictable condition, and the condition that the coding order causes the neighboring reference pixels to be unavailable, or even the condition that the coding block is divided according to the tile or slice, the neighboring area may also be invalid, thereby causing the number of the neighboring reference pixels selected from the neighboring area to be less than 4, that is, 0 or 2 neighboring reference pixels may be selected; the number of the neighboring reference pixels used for deriving the model parameters is not uniform, thereby increasing the additional "copy" operation and improving the calculation complexity.

[0022] Without changing the performance of the coding and decoding prediction, in order to unify the derivation process of the model parameters and reduce the calculation complexity, an image component prediction method is provided in the embodiments of the present application, the method comprises the following steps: acquiring a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image; when the number of valid pixels in the first reference pixel set is less than a preset number, taking a preset component value as a prediction value corresponding to the to-be-predicted image component; when the number of valid pixels in the first reference pixel set is greater than or equal to the preset number, screening the first reference pixel set 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, taking the preset component value as the prediction value corresponding to the to-be-predicted image component; when the number of valid pixels in the second reference pixel set is equal to the preset number, determining a model parameter through the first reference pixel set, and obtaining a prediction model corresponding to the to-be-predicted image component according to the model parameter; wherein the prediction model is used to implement the prediction processing of the to-be-predicted image component to obtain the prediction value corresponding to the to-be-predicted image component; in this way, for the case that the number of valid pixels in the first reference pixel set is less than the preset number or the case that the number of valid pixels in the second reference pixel set is less than the preset number, the CCLM mode is disabled, and the preset default value is directly taken as the prediction value corresponding to the to-be-predicted image component, and since no additional processing module is added, the calculation complexity is reduced; in addition, the derivation of the model parameter is only performed in the case that the number of valid pixels in the second reference pixel set is equal to the preset number, that is, the CCLM mode is executed, thereby unifying the derivation process of the model parameter.

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

[0024] Referring to Figure 3 which shows an example of a component block diagram of a video coding system provided by the embodiments of the present application; as shown in Figure 3As shown, 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 decoded image buffer unit 310. The filtering unit 308 can implement deblocking filtering and Sample Adaptive Offset (SAO) filtering, while the encoding unit 309 can implement header information encoding and Context-based Adaptive Binary Arithmetic Coding (CABAC). For the input raw video signal, the system uses coding tree blocks (Coding Tree Blocks) to perform the encoding of the raw video signal. A video coding block is obtained by partitioning the TreeUnit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 301. This transformation includes transforming the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. The intra-frame estimation unit 302 and the intra-frame prediction unit 303 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 302 and the intra-frame prediction unit 303 are used to determine the intra-frame prediction mode to be used to encode the video coding block. The motion compensation unit 304 and the motion estimation unit 305 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by the motion estimation unit 305 is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, the motion compensation unit 304 uses the motion vectors determined by the motion estimation unit 305 to perform inter-frame prediction coding on the received video coding block. 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.

[0025] See Figure 4 It illustrates an example block diagram of a video decoding system provided in an embodiment of this application; as shown Figure 4 As shown, the video decoding system 400 includes a decoding unit 401, an inverse transform and inverse quantization unit 402, an intra-frame prediction unit 403, a motion compensation unit 404, a filtering unit 405, and a decoding image buffer unit 406. The decoding unit 401 can perform header information decoding and CABAC decoding, while the filtering unit 405 can perform deblocking filtering and SAO filtering. The input video signal is processed... Figure 2 After encoding, the video signal bitstream is output. This bitstream is input into the video decoding system 400, first passing through the decoding unit 401 to obtain the decoded transform coefficients. These transform coefficients are then processed by the inverse transform and inverse quantization unit 402 to generate residual blocks in the pixel domain. The intra-frame prediction unit 403 can generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in the current frame or image. The motion compensation unit 404 determines the prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses this prediction information... The information is used to generate a predictive block of the video block being decoded; the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 402 with the corresponding predictive block generated by the intra-prediction unit 403 or the motion compensation unit 404; the decoded video signal is passed through the filtering unit 405 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 406, which stores reference images for subsequent intra-prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.

[0026] The image component prediction method in this application embodiment is mainly applied in, for example, Figure 3 The intra-prediction unit 303 shown and as follows Figure 4The intra-prediction unit 403 shown is specifically applied 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.

[0027] Based on the above Figure 3 or Figure 4 For application scenario examples, see Figure 5 This illustrates a flowchart of an image component prediction method provided in an embodiment of this application. Figure 5 As shown, the method may include: S501: Obtain the first reference pixel set corresponding to the image component to be predicted in the coded block of the video image; 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.

[0028] 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, such as... Figure 2 As shown in (a); for INTRA_L_CCLM mode, the first set of reference pixels consists of adjacent reference pixels in the left and lower left adjacent regions of the coding block, as shown in (a). Figure 2 As shown in (b); for INTRA_T_CCLM mode, the first set of reference pixels consists of adjacent reference pixels in the upper and upper right adjacent regions of the coding block, as shown in (b). Figure 2 As shown in (c).

[0029] 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: 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; S501a-2: Based on the reference pixels, form a first set of reference pixels corresponding to the image component to be predicted.

[0030] 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.

[0031] 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.

[0032] 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: 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; S501b-2: Based on the reference pixels, form a first set of reference pixels corresponding to the image component to be predicted.

[0033] 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.

[0034] 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.

[0035] 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.

[0036] 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. 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.

[0037] 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.

[0038] 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: S502a: Based on the bit information of the video image, determine the preset component range corresponding to the image component to be predicted; 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.

[0039] 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. Here, assuming the bit depth of the image component to be predicted is represented by BitDepthC, the calculation method for the median value of the image component to be predicted is 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.

[0040] 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~255, with a midpoint of 128. Therefore, the preset component value can be 128, i.e., the default value is 128. If the current video image is a 10-bit video, then the range of the chroma component is 0~1023, with a midpoint of 512. Therefore, the preset component value can be 512, i.e., the default value is 512. In this embodiment, the bit information of the video image will be taken as 10 bits, meaning the preset component value is 512.

[0041] 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: 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.

[0042] 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.

[0043] 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.

[0044] 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; 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.

[0045] 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.

[0046] Furthermore, in some embodiments, for S503, filtering the first reference pixel set to obtain the second reference pixel set may include: 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. 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.

[0047] 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.

[0048] 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): If the intra-prediction mode of the current block is INTRA_LT_CCLM mode, numSampT = availT?nTbW:0 numSampL = availL?nTbH:0 otherwise, numSampT = (availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+ Min(numTopRight, nTbH)):0 numSampL = (availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+ Min(numLeftBelow, nTbW)):0.

[0049] 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. The variable numIs4N indicates whether to filter pixels only on one side: numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1) The variable startPosN represents the starting point position: startPosN = numSampN>>(2+numIs4N) The variable pickStepN represents the selection interval: pickStepN = Max(1, numSampN>>(1+numIs4N)).

[0050] 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): cntN = Min(numSampN, (1+numIs4N)<<1) pickPosN[pos] = (startPosN+pos pickStepN), with pos=0...cntN 1 Otherwise, cntN is set to 0, meaning the number of selected pixels is 0.

[0051] Assume the predicted samples for the current coded block are predSamples[x][y] with x=0...nTbW 1, y=0...nTbH 1. Its derivation is as follows: If both numSampL and numSampT are invalid, they are set to the default values, as shown below: predSamples[x][y]=1<<(BitDepth C 1), otherwise, The first step is to obtain the brightness reconstruction samples pY[x][y] of the corresponding brightness blocks with x=0...nTbW 2 1, y=0...nTbH 2 1; The second step is to obtain adjacent brightness reconstruction samples pY[x][y]: The third step is to obtain the downsampled brightness reconstruction sample pDsY[x][y] with x=0...nTbW 1,y=0…nTbH–1 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. Obtain the downsampled reconstructed brightness value pSelDsY[idx] of the selected point on the left with idx=0...cntL–1; Fifth step: 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. Obtain the downsampled reconstructed brightness value pSelDsY[idx] of the selected point on the upper side with idx=0…cntL+cntT 1; Step 6: When cntT + cntL is not equal to 0, the derivation of variables minY, maxY, minC, and maxC is as follows. 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. The derivation of arrays minGrpIdx and maxGrpIdx is as follows: minGrpIdx[0]=0 minGrpIdx[1]=2 maxGrpIdx[0]=1 maxGrpIdx[1]=3 When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped: (minGrpIdx[0],minGrpIdx[1])=Swap(minGrpIdx[0],minGrpIdx[1]) When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped: (maxGrpIdx[0],maxGrpIdx[1])=Swap(maxGrpIdx[0],maxGrpIdx[1]) When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped: (minGrpIdx,maxGrpIdx)=Swap(minGrpIdx,maxGrpIdx) When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped. (minGrpIdx[1],maxGrpIdx[0])=Swap(minGrpIdx[1],maxGrpIdx[0]) The variables maxY, maxC, minY, and minC are calculated as follows (representing the means of the two groups respectively): maxY=(pSelDsY[maxGrpIdx[0]] + pSelDsY[maxGrpIdx[1]]+ 1)>>1 maxC=(pSelC[maxGrpIdx[0]] + pSelC[maxGrpIdx[1]]+ 1)>>1 minY=(pSelDsY[minGrpIdx[0]] + pSelDsY[minGrpIdx[1]]+ 1)>>1 minC= (pSelC[minGrpIdx[0]] + pSelC[minGrpIdx[1]]+ 1)>>1 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): When numSampL equals 0 and numSampT equals 0, k=0 a=0 b=1<<(BitDepth C 1) otherwise, diff=maxY minY If diff is not equal to 0, then, diffC=maxC minC x=Floor(Log2(diff)) normDiff=((diff<<4)>>x)&15 x += (normDiff != 0) ? 1 : 0 y = Floor(Log2(Abs(diffC))) + 1 a=(diffC (divSigTable[normDiff]|8)+2 y 1 )>>y k=(3+x y)<1)?1:3+x y a=(3+x y)<1) ? Sign(a) 15: a b=minC ((a minY)>>k) Where divSigTable[] is, divSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} Otherwise (when diff equals 0), k=0 a=0 b=minC Step 8: Chromaticity prediction samples predSamples[x][y] with x=0...nTbW 1,y=0... nTbH–1 is calculated as follows (where Clip1C limits the predicted value to between 0 and 1023). predSamples[x][y]=Clip1C(((pDsY[x][y] a)>>k)+b).

[0052] For example, let's illustrate this by selecting four adjacent reference pixels. Assume the selection area on the top... The position of the inner reference pixel is … Select area on the left The position of the inner reference pixel is … The filtering method, which selects a maximum of 4 adjacent reference pixels, is as follows: In INTRA_LT_CCLM mode, when both the upper and left adjacent regions are valid, the upper region is selected. The filter can select two adjacent reference pixels to be chosen, and their corresponding positions are respectively and Select area on the left The filter can select two adjacent reference pixels to be chosen, and their corresponding positions are respectively and These four adjacent reference pixels to be selected are combined into a second reference pixel set, such as... Figure 6A As shown. In Figure 6A In the coding block, the left and top adjacent regions are both valid. In order to maintain the same resolution for the luminance and chrominance components, the luminance component needs to be downsampled so that the downsampled luminance and chrominance components have the same resolution.

[0053] In INTRA_L_CCLM mode, when only the left adjacent region and the lower left adjacent region are valid, the region is selected on the left. The filter can select four adjacent reference pixels, whose corresponding positions are as follows: , , and These four adjacent reference pixels to be selected are combined into a second reference pixel set, such as... Figure 6B As shown. In Figure 6B In the coding block, the left and lower left adjacent regions are both valid. In order to maintain the same resolution for the luminance and chrominance components, it is still necessary to downsample the luminance component so that the downsampled luminance and chrominance components have the same resolution.

[0054] In INTRA_T_CCLM mode, when only the upper adjacent region and the upper right adjacent region are valid, the upper region is selected. The filter can select four adjacent reference pixels, whose corresponding positions are as follows: , , and These four adjacent reference pixels to be selected are combined into a second reference pixel set, such as... Figure 6C As shown. In Figure 6C In the coding block, the upper and upper right adjacent regions are both valid. In order to maintain the same resolution for the luminance and chrominance components, it is still necessary to downsample the luminance component so that the downsampled luminance and chrominance components have the same resolution.

[0055] 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. 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; 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; 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).

[0056] 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.

[0057] 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.

[0058] 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: 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.

[0059] 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, the model parameters need to be determined using the first reference pixel set (e.g., ...). and Then, based on the model parameters, the prediction model corresponding to the image component to be predicted is obtained, so as to obtain the predicted value of the image component to be predicted for each pixel in the coding block. For example, assuming the image component to be predicted is the chroma component, based on the model parameters... and The prediction model corresponding to the chromaticity component can be obtained as shown in Equation (1). Then, the prediction model shown in Equation (1) is used to predict the chromaticity component of each pixel in the coding block, so that the prediction value corresponding to the chromaticity component of each pixel can be obtained.

[0060] 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, see... Figure 7 This illustrates a flowchart of another image component prediction method provided in an embodiment of this application. Figure 7 As shown, after S501, the method may further include: 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; Furthermore, following S503, the method may further include: S702: Determine whether the number of valid pixels in the second reference pixel set is less than the preset number.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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. Init: minIdx[2] = {0, 2}, maxIdx[2]= {1, 3} 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. Step1: if(L[minIdx[0]]>L[minIdx[1]], swap(minIdx[0], minIdx[1]) Step2: if(L[maxIdx[0]]>L[maxIdx[1]], swap(maxIdx[0], maxIdx[1]) Step3: if(L[minIdx[0]]>L[maxIdx[1]], swap(minIdx, maxIdx) Step4: if(L[minIdx[1]]>L[maxIdx[0]], swap(minIdx[1], maxIdx[0]).

[0065] In this way, we can obtain the two pixels with smaller brightness values, and their corresponding brightness values ​​are respectively... luma 0min and luma 1 min This indicates that the corresponding chromaticity 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 chromaticity values ​​are represented by... chroma 0 max and chroma 1 max This is represented as follows. Further, by averaging the brightness values ​​corresponding to the two smaller pixels, the brightness value corresponding to the first average point can be obtained. 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. 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: luma min =( luma 0 min + luma 1 min +1)>>1 luma max =( luma 0 max + luma 1 max +1)>>1 chroma min =( chroma 0 min + chroma 1 min +1)>>1 chroma max =(chroma 0 max + chroma 1 max +1)>>1.

[0066] 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 It can be calculated from equation (2). (2) Among them, model parameters To predict the slope in the model, the model parameters The intercept is used 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.

[0067] 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.

[0068] 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: 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.

[0069] 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: 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.

[0070] 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.

[0071] Specifically, when the total number of adjacent reference pixels within the selected area used by the coding block is 0, 0 valid pixels will be selected. The following three special cases will result in 0 valid pixels: In the first scenario, for INTRA_LT_CCLM mode, when both the upper and left adjacent regions are invalid, the selected region... = =0, such as Figure 8A As shown; in Figure 8A In the middle, the gray diagonal-filled area indicates an invalid area; In the second scenario, for INTRA_L_CCLM mode, when both the left-side adjacent region and the lower-left adjacent region are invalid, the selected region... =0, such as Figure 8B As shown. In Figure 8B In the middle, the gray diagonal-filled area indicates an invalid area; In the third scenario, for INTRA_T_CCLM mode, when both the upper adjacent region and the upper right adjacent region are invalid, the selected region... =0, such as Figure 8C As shown. In Figure 8C In the text, the gray diagonal-filled area indicates an invalid region.

[0072] 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 parameters... It can be set to 0, model parameters It can be set to the preset component value corresponding to the image component to be predicted.

[0073] Assuming the image component to be predicted is the chrominance component, then the predicted values ​​corresponding to the chrominance components of all pixels within the current coding block can be obtained. All values ​​are 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~255, and the median value is 128, so 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~1023, and the median value is 512, so the preset component value can be 512.

[0074] Specifically, when the total number of adjacent reference pixels within the selection area used by the coding block is 2, then 2 valid pixels will be selected. Still assuming the size of the coding block is... Then only or This situation only occurs with certain encoded blocks. This is due to limitations in the latest VVC reference software, VTM 5.0. , The partitioning of coding blocks into N and N means that, in the partitioning of coding blocks for video images, these three sizes of coding blocks will not appear; therefore, the value of N usually satisfies The following three special cases will result in 2 valid pixels: In the first case, for INTRA_LT_CCLM mode, regarding or coded blocks ( When the adjacent regions on the side with side length 2 are valid, while the adjacent regions on the side with side length N are invalid, the selected region is... =2、 =0, or =0、 =2, such as Figure 9A As shown; in Figure 9A In the diagram, gray diagonal lines indicate invalid areas, while solid gray areas indicate valid areas. In the second scenario, for the INTRA_L_CCLM mode, regarding... coded blocks ( 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... =2, such as Figure 9B As shown; in Figure 9B In the diagram, gray diagonal lines indicate invalid areas, while solid gray areas indicate valid areas. The third scenario, for INTRA_T_CCLM mode, is... coded blocks ( 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... =2, such as Figure 9C As shown; in Figure 9C In the diagram, gray diagonal lines indicate invalid areas, while solid gray areas indicate valid areas.

[0075] 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.

[0076] In existing solutions, when there are two valid pixels, it is necessary to copy these two valid pixels to obtain four pixels. For example, assuming the four pixels are numbered 0, 1, 2, and 3, then pixel 0 represents the second selected valid pixel; pixel 1 represents the first selected valid pixel; pixel 2 represents the second selected valid pixel; and pixel 3 represents the first selected valid pixel. The model parameters can then be determined based on these four pixels numbered 0, 1, 2, and 3. and Thus, a prediction model as shown in equation (1) is established, and the predicted value corresponding to the image component to be predicted can be obtained through this prediction model.

[0077] 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 the number of effective pixels is two, the model parameters... It can also be set to 0, model parameters Alternatively, it 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 chrominance component, then the predicted values ​​corresponding to the chrominance components of all pixels within the current coding block can be used. Fill all values ​​with preset component values, i.e., the default values ​​for chromaticity components.

[0078] 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.

[0079] See Figure 10 This illustrates a flowchart of a model parameter derivation provided in an embodiment of this application. Figure 10 In this model, assuming the image component to be predicted is the chrominance component, adjacent reference pixels are first obtained from the selected region 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 the number of valid pixels in the second adjacent reference pixel set is then determined. When the number of valid pixels in either the first or second reference pixel set is 0, the model parameters are adjusted. Set to 0, model parameters When set to the default value, the predicted values ​​corresponding to the chroma components are filled with the default values. When there are 2 valid pixels in the first or second reference pixel set, the processing steps are the same as when there are 0 valid pixels. However, when there are 4 valid pixels in the second reference pixel set, the two pixels with the larger chroma component value and the two pixels with the smaller chroma component value are obtained through 4 comparisons, and then the two mean points are calculated. The model parameters are derived based on the two mean points. and The chromaticity components are then predicted based on the constructed prediction model. Thus, only coded blocks with at least four valid pixels in the second reference pixel set can have their model parameters derived in CCLM mode. For coded blocks with fewer than four valid pixels, default values ​​are used to fill the gaps, reducing computational complexity when the number of reference pixels in the selected area is less than four, while maintaining essentially unchanged encoding and decoding performance.

[0080] In this embodiment, a unified model parameter derivation process is achieved. 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 that coding block. Therefore, this embodiment can also provide a simplified process for model parameter derivation, such as... Figure 11 As shown.

[0081] and Figure 10compared to, Figure 11 The derivation process of the model parameters shown is more concise. Figure 11 In this model, assuming the image component to be predicted is a chroma component with a preset component value of 512, firstly, adjacent reference pixels are obtained from the selected region 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 a 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 a preset number, the model parameters are adjusted. Set to 0, model parameters The value 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, 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 the two mean points are calculated. The model parameters are derived based on the two mean points. and The chromaticity components are then predicted based on 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 undergo 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. This reduces the computational complexity when the number of reference pixels in the selected area is less than the preset number, while maintaining essentially unchanged encoding and decoding performance. Typically, the preset number in this embodiment is four.

[0082] Furthermore, in this embodiment, the number of valid pixels in the first reference pixel set can be determined based on the number of valid pixels within the selected region. Therefore, this embodiment can also provide another simplified process for model parameter derivation, such as... Figure 12 As shown.

[0083] exist Figure 12In this model, assuming the image component to be predicted is a chroma component with a preset component value of 512, the selection area is first determined to obtain a first reference pixel set. Then, the number of valid pixels in the first reference pixel set is determined. When the number of valid pixels in the first reference pixel set is greater than or equal to 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 either the first or second reference pixel set is less than a 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, four comparisons are performed to obtain the two pixels with the larger chroma component value and the two pixels with the smaller chroma component value. Then, two mean points are calculated. Based on these two mean points, the model parameters are derived. and The chromaticity components are then predicted based on the constructed prediction model. Thus, only coded blocks with a preset number of valid pixels in the second reference pixel set can have their model parameters derived in CCLM mode; for coded blocks with fewer than the preset number of valid pixels, default values ​​are used for filling. This reduces the computational complexity when the number of reference pixels in the selected area is less than the preset number, while maintaining essentially unchanged encoding and decoding performance. Typically, the preset number in this embodiment is four.

[0084] Furthermore, in some embodiments, VVC defines two variables: numSampL and numSampT. The variable numSampL represents the selected region. The total number of pixels in the selection area; the variable numSampT represents the selected area. Total number of pixels in: For INTRA_LT_CCLM mode, numSampT=W, numSampL=H; For INTRA_L_CCLM mode, numSampT=0, numSampL=min{W+H, H+H}; For INTRA_T_CCLM mode, numSampT=min{W+H, W+W}, numSampL=0; In addition, the validity of the selected region (or adjacent regions) also needs to be considered. That is, the variables numSampL and numSampT only represent the number of valid pixels within the above range.

[0085] 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. if(numSampL==0&&numSampT==0) Set the predicted values ​​corresponding to the chromaticity components to the default values; else 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.

[0086] 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). if (numSampL + numSampT < preset number) Set the predicted values ​​corresponding to the chromaticity components to the default values; else 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.

[0087] 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.

[0088] 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: 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. 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.

[0089] 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.

[0090] It should also be noted that, assuming the image component to be predicted is a chroma component, with a preset number of 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 embodiment), the model parameters can also be... Set to 0, model parameters Set to the intermediate value (also known as the default value) corresponding to the chrominance component, so that the predicted value corresponding to the chrominance component of all pixels in the coding block is filled with the default value; in addition, for all cases that may produce 2 valid pixels, numSampL and numSampT can both be set to 0, so that the predicted value corresponding to the chrominance component of all pixels in the coding block is filled with the default value.

[0091] 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.

[0092] 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.

[0093] 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.

[0094] Without affecting encoding and decoding performance, this application can have the following beneficial effects: 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.

[0095] 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 ​​corresponding to the chroma components of all pixels within the current coding block. All values ​​are filled with preset component values, i.e., the default values ​​of the chroma components, without affecting encoding and decoding performance.

[0096] 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.

[0097] Based on the same inventive concept as the foregoing embodiments, see [link to previous document]. Figure 13 This diagram illustrates the structural composition of an image component prediction device 130 according to an embodiment of this application. The image component prediction device 130 may include: an acquisition unit 1301, a prediction unit 1302, and a filtering unit 1303, wherein... 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; 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. 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. 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.

[0098] 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.

[0099] 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.

[0100] 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.

[0101] In the above scheme, see [reference] Figure 13 The image component prediction device 130 may further include a determining 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.

[0102] In the above scheme, see [reference] Figure 13 The image component prediction device 130 may further include a filling unit 1305, configured to fill the image component to be predicted for each pixel in the coding block with the preset component value.

[0103] 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.

[0104] 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. 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.

[0105] In the above scheme, see [reference] 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] Based on the composition of the image component prediction device 130 and the computer storage medium described above, see [link to relevant documentation]. Figure 14 This illustrates the specific hardware structure of the image component prediction device 130 provided in this embodiment, which 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, in... Figure 14 All buses are designated as bus system 1404. Among them, network interface 1401 is used for receiving and transmitting signals during information exchange with other external network elements. Memory 1402 is used to store computer programs that can run on processor 1403; Processor 1403, when running the computer program, performs the following: 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 less than a preset number, the 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 less than the preset number, the 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, 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.

[0110] 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 SDRAM (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.

[0111] 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 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can 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 can be executed by a combination of hardware and software modules in the decoding processor. The software modules can be located 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.

[0112] 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.

[0113] 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.

[0114] 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.

[0115] See Figure 15 This illustrates a schematic diagram of the composition structure of an encoder provided in an embodiment of this application. Figure 15 As shown, the encoder 150 may include at least the image component prediction device 130 described in any of the foregoing embodiments.

[0116] See Figure 16 This illustrates a schematic diagram of the composition structure of a decoder provided in an embodiment of this application. Figure 16 As shown, the decoder 160 may include at least the image component prediction device 130 described in any of the foregoing embodiments.

[0117] 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.

[0118] 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.

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

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

[0121] 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.

[0122] 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.

[0123] Industrial applicability 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. A method for reading a bit stream, characterized in that, The process involves reading a bitstream and executing a video decoding method to decode the bitstream to generate a video or image, wherein the video decoding method includes: 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 equal to 0, the 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, 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. 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: Obtain reference pixels in reference rows and / or reference columns adjacent to the coded block; wherein the reference row is composed of rows adjacent to the top and top right sides of the coded block, and the reference column is composed of columns adjacent to the left and bottom left sides of the coded block; and Based on the reference pixels, a first set of reference pixels corresponding to the image component to be predicted is determined.

2. The method according to claim 1, wherein, The step of filtering the first reference pixel set to obtain the second reference pixel set includes: The position of the pixel to be selected is determined based on the pixel positions corresponding to adjacent reference pixels in the first reference pixel set. Based on the determined position of the pixel to be selected, a valid pixel corresponding to the position of the pixel to be selected is selected from the first reference pixel set, and a second reference pixel set is determined based on the selected valid pixel; wherein, the number of valid pixels in the second reference pixel set is less than or equal to a preset number.

3. 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: The preset component value is determined based on the bit depth of the video image.

4. The method according to claim 3, wherein, The preset component value is set to 1 << (BitDepth-1), where BitDepth is the bit depth of the image component to be predicted.

5. The method according to claim 1, wherein, The method further includes: For each pixel in the coding block, the preset component value is used to fill the image component to be predicted for that pixel with a predicted value.

6. 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: Based on the prediction model, the image components to be predicted for the pixels in the coding block are predicted to obtain the predicted values ​​corresponding to the image components to be predicted for the pixels.

7. The method according to any one of claims 1 to 6, wherein, The preset number is 4.

8. A method for storing a bit stream, characterized in that, Perform a video encoding method to generate a bitstream; and storing the bitstream; wherein, the video encoding method includes: 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 equal to 0, the 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, 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. 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: Obtain reference pixels in reference rows and / or reference columns adjacent to the coded block; wherein, the reference row is composed of the rows adjacent to the top and top right sides of the coded block, and the reference column is composed of the columns adjacent to the left and bottom left sides of the coded block; Based on the reference pixels, a first set of reference pixels corresponding to the image component to be predicted is determined.

9. The method according to claim 8, wherein, The step of filtering the first reference pixel set to obtain the second reference pixel set includes: The position of the pixel to be selected is determined based on the pixel positions corresponding to adjacent reference pixels in the first reference pixel set. Based on the determined position of the pixel to be selected, a valid pixel corresponding to the position of the pixel to be selected is selected from the first reference pixel set, and a second reference pixel set is determined based on the selected valid pixel; wherein, the number of valid pixels in the second reference pixel set is less than or equal to a preset number.

10. 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: The preset component value is determined based on the bit depth of the video image.

11. The method according to claim 10, wherein, The preset component value is set to 1 << (BitDepth-1), where BitDepth is the bit depth of the image component to be predicted.

12. The method according to claim 8, wherein, The method further includes: For each pixel in the coding block, the preset component value is used to fill the image component to be predicted for that pixel with a predicted value.

13. 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: Based on the prediction model, the image components to be predicted for the pixels in the coding block are predicted to obtain the predicted values ​​corresponding to the image components to be predicted for the pixels.

14. The method according to any one of claims 8 to 13, wherein, The preset number is 4.

15. A method for transmitting a bit stream, characterized in that, Perform a video encoding method to generate a bitstream; and transmitting the bitstream; wherein, the video encoding method includes: 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 equal to 0, the 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, 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. 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: Obtain reference pixels in reference rows and / or reference columns adjacent to the coded block; wherein, the reference row is composed of the rows adjacent to the top and top right sides of the coded block, and the reference column is composed of the columns adjacent to the left and bottom left sides of the coded block; Based on the reference pixels, a first set of reference pixels corresponding to the image component to be predicted is determined.

16. The method according to claim 15, wherein, The step of filtering the first reference pixel set to obtain the second reference pixel set includes: The position of the pixel to be selected is determined based on the pixel positions corresponding to adjacent reference pixels in the first reference pixel set. Based on the determined position of the pixel to be selected, a valid pixel corresponding to the position of the pixel to be selected is selected from the first reference pixel set, and a second reference pixel set is determined based on the selected valid pixel; wherein, the number of valid pixels in the second reference pixel set is less than or equal to a preset number.

17. The method according to claim 15, wherein, The step of using a preset component value as the predicted value corresponding to the image component to be predicted includes: The preset component value is determined based on the bit depth of the video image.

18. The method according to claim 17, wherein, The preset component value is set to 1 << (BitDepth-1), where BitDepth is the bit depth of the image component to be predicted.

19. The method according to claim 15, wherein, The method further includes: For each pixel in the coding block, the preset component value is used to fill the image component to be predicted for that pixel with a predicted value.

20. The method of claim 15, wherein, After obtaining the prediction model corresponding to the image component to be predicted based on the model parameters, the method further includes: Based on the prediction model, the image components to be predicted for the pixels in the coding block are predicted to obtain the predicted values ​​corresponding to the image components to be predicted for the pixels.

21. The method according to any one of claims 15 to 20, wherein, The preset number is 4.