Image component prediction method, encoder, decoder and storage medium
The image component prediction method simplifies matrix multiplication derivation by using neighboring reference samples and a calculation model, reducing complexity and enabling parallel processing in video encoding and decoding systems.
Patent Information
- Application Number
- JP2025148166
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-11-26
AI Technical Summary
The complexity of matrix-based intra prediction in H.266/VVC is high due to the need to determine the type of luma block for each prediction mode, making it unsuitable for parallel processing and increasing computational complexity.
An image component prediction method that determines a set of neighboring reference samples and a preset parameter value, buffers them to generate an input reference sample set, and uses a first calculation model to derive an input sample matrix for image component prediction, independent of the current block type, facilitating parallel processing.
This method simplifies the derivation process for matrix multiplication, reduces computational complexity, and enables parallel processing, thereby improving efficiency in video encoding and decoding systems.
Smart Images

Figure 2025172939000001_ABST
Abstract
Description
[Technical Field]
[0001] The present embodiment relates to the field of image processing technology, and more particularly to an image component prediction method, an encoder, a decoder, and a storage medium. [Background technology]
[0002] As people's demands for video display quality increase, new video application formats such as high-definition and ultra-high-definition video are emerging. H.265 / High Efficiency Video Coding (HEVC) can no longer meet the needs of rapid development of video applications. The Joint Video Exploration Team (JVET) has proposed the next-generation video coding standard, H.266 or Versatile Video Coding (VVC), and the corresponding test model is the VVC reference software test platform, such as the VVC Test Model (VTM).
[0003] H.266 / VVC currently adopts matrix-based intra prediction (MIP) technology, which adds different numbers of MIP prediction modes to the intra luma prediction process for different types of intra luma blocks. In the MIP prediction process, the derivation process is also related to the type of luma block, making the derivation process cumbersome and unsuitable for parallel processing, which in turn increases the complexity. Summary of the Invention [Problem to be solved by the invention]
[0004] The embodiments of the present application provide an image component prediction method, an encoder, a decoder, and a storage medium that can simplify the process of deriving input samples for matrix multiplication and reduce the computational complexity. [Means for solving the problem]
[0005] The technical solution of the present embodiment can be realized as follows:
[0006] According to a first aspect, an embodiment of the present application provides an image component prediction method applied to an encoder, the method comprising: determining a set of neighboring reference samples of a current block and determining a predetermined sample corresponding to the current block, wherein the set of neighboring reference samples includes at least one reference sample; buffering the adjacent reference sample set and the preset parameter value to generate an input reference sample set; determining an input sample matrix using a first preset calculation model according to the input reference sample set; performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
[0007] According to a second aspect, an embodiment of the present invention provides an image component prediction method applied to a decoder, the method comprising: determining a set of neighboring reference samples of a current block and determining a predetermined sample corresponding to the current block, wherein the set of neighboring reference samples includes at least one reference sample; buffering the adjacent reference sample set and the preset parameter value to generate an input reference sample set; determining an input sample matrix using a first preset calculation model according to the input reference sample set; performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
[0008] According to a third aspect, an embodiment of the present invention provides an encoder, the encoder comprising: a first determination unit; a first buffer unit; and a first prediction unit, wherein: The first determining unit is configured to determine a neighboring reference sample set of the current block and determine a preset parameter value corresponding to the current block, where the neighboring reference sample set includes at least one reference sample; a first buffer unit configured to buffer the adjacent reference sample set and the preset parameter value to generate an input reference sample set; The first determining unit is further configured to determine an input sample matrix using a first preset calculation model according to the input reference sample set; The first prediction unit is configured to perform image component prediction on a current block according to the input sample matrix to obtain a prediction block of the current block.
[0009] According to a fourth aspect, embodiments of the present invention provide an encoder, the encoder comprising a first memory and a first processor, wherein: the first memory is configured to store a computer program executable by the first processor; The first processor is configured to perform the method according to the first aspect when executing the computer program.
[0010] According to a fifth aspect, an embodiment of the present invention provides a decoder, the decoder comprising: a second determination unit; a second buffer unit; and a second prediction unit, wherein: The second determining unit is configured to determine a neighboring reference sample set of the current block and determine a preset parameter value corresponding to the current block, where the neighboring reference sample set includes at least one reference sample; a second buffer unit configured to buffer the adjacent reference sample set and the preset parameter value to generate an input reference sample set; The second determining unit is further configured to determine an input sample matrix using a first preset calculation model according to the input reference sample set; The second prediction unit is configured to perform image component prediction on the current block according to the input sample matrix to obtain a prediction block of the current block.
[0011] According to a sixth aspect, embodiments of the present invention provide a decoder, the decoder comprising a second memory and a second processor, wherein: the second memory is configured to store a computer program executable on the second processor; The second processor is configured to perform the method according to the second aspect when executing the computer program.
[0012] According to a seventh aspect, an embodiment of the present application provides a computer storage medium having an image component prediction program stored therein, the image component prediction program, when executed by a first processor, implementing the method described in the first aspect, or, when executed by a second processor, implementing the method described in the second aspect. [Effects of the Invention]
[0013] The present embodiment provides an image component prediction method, an encoder, a decoder, and a storage medium. According to the technical solution of the present application, a set of neighboring reference samples of a current block is determined, preset parameter values corresponding to the current block are determined, and the neighboring reference sample set and the preset parameter values are buffered to generate an input reference sample set. According to the input reference sample set, an input sample matrix is determined using a first preset calculation model. Image component prediction is performed on the current block according to the input sample matrix to obtain a predicted block for the current block. Since the technical solution of the present embodiment does not require determining the type of the current block, it reduces computational complexity and facilitates hardware implementation. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first preset calculation model, the process of deriving input samples for matrix multiplication is simplified, thereby unifying the process of deriving the input sample matrix. Furthermore, the technical solution of the present embodiment can realize parallel processing regardless of the type of the current block, thereby reducing computational complexity. [Brief explanation of the drawings]
[0014] [Figure 1] 1 is a block diagram illustrating a configuration of a video encoding system according to an embodiment of the present invention. [Figure 2] 1 is a block diagram showing the configuration of a video decoding system according to an embodiment of the present invention; [Figure 3] 1 is an exemplary flowchart of an image component prediction method according to an embodiment of the present invention. [Figure 4A] FIG. 2 is a schematic structural diagram of a reference pixel position according to an embodiment of the present invention. [Figure 4B] FIG. 2 is a schematic structural diagram of a reference pixel downsampling process according to an embodiment of the present invention; [Figure 5A] FIG. 1 is a schematic structural diagram of a buffer filling according to a related technical solution; [Figure 5B] FIG. 1 is a schematic structural diagram of another buffer filling according to a related technical solution; [Figure 5C]1 is a schematic structural diagram of a buffer filling device according to an embodiment of the present invention; [Figure 6A] FIG. 1 is a schematic structural diagram illustrating determining an input sample according to a related technical solution; [Figure 6B] FIG. 10 is another schematic structural diagram illustrating determining input samples according to an embodiment of the present application; [Figure 7] 10 is an exemplary flowchart of another image component prediction method according to an embodiment of the present application. [Figure 8] FIG. 1 is a schematic structural diagram illustrating generating a predicted value according to an embodiment of the present invention; [Figure 9] 1 is a schematic structural diagram of an encoder according to an embodiment of the present invention; [Figure 10] FIG. 2 is a specific hardware structural diagram of an encoder according to an embodiment of the present invention; [Figure 11] FIG. 2 is a schematic structural diagram of a decoder according to an embodiment of the present invention. [Figure 12] FIG. 2 is a specific hardware structural diagram of a decoder according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION
[0015] In order to more fully understand the features and technical contents of the present embodiment, the following detailed description of the implementation of the present embodiment will be given with reference to the accompanying drawings, which are for illustrative purposes only and are not intended to limit the present embodiment.
[0016] In a video image, a coding block (CB) is usually represented using a first image component, a second image component, and a third image component, where the three image components are one luminance component, one blue chrominance component, and one red chrominance component, respectively. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V. Thus, the video image may be represented in either a YCbCr format or a YUV format.
[0017] In the present embodiment, the first image component may be a luminance component, the second image component may be a blue chromaticity component, and the third image component may be a red chromaticity component, but the present embodiment is not particularly limited thereto.
[0018] In the MIP technique, input data predicted by MIP may include information such as reference pixels in the row above and the column to the left of the current block, the MIP prediction mode (which can be represented by modeId) applied to the current block, width and height information of the current block, and whether it needs to be replaced, and output data predicted by MIP may include a predicted value of the current block. Here, the MIP prediction process specifically includes four steps: configuring MIP core parameters, obtaining reference pixels, creating input samples, and generating predicted values. By performing these four steps, a predicted value of the current block can be obtained.
[0019] However, in the MIP prediction process, the step of generating input samples has a strong correlation with the type of luma block (which can be represented by mipSizeId), i.e., different input sample derivation methods are used to obtain the input sample matrix depending on the type of luma block, making the derivation process complicated. In particular, when the type of luma block (mipSizeId) is 0 or 1, the derivation methods for p[0] and p[x] of the input sample matrix are different, making it unsuitable for parallel processing. Furthermore, with the various types of luma blocks, various numbers of MIP prediction modes are added in the intra luma prediction process. When luma prediction is performed for each MIP prediction mode, it is necessary to determine the type of luma block for each MIP prediction mode, which increases the complexity.
[0020] The present embodiment provides an image component prediction method, which includes determining a neighboring reference sample set for a current block and determining predetermined parameter values corresponding to the current block, where the neighboring reference sample set includes at least one reference sample. The neighboring reference sample set and the predetermined parameter value are buffered to generate an input reference sample set. Then, an input sample matrix is determined using a first predetermined calculation model according to the input reference sample set, and image component prediction is performed on the current block according to the input sample matrix to obtain a predicted block for the current block. Since the technical solution of the present embodiment does not require determining the type of the current block, it reduces computational complexity and facilitates hardware implementation. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first predetermined calculation model, the process of deriving input samples for matrix multiplication is simplified, thereby unifying the process of deriving the input sample matrix. Furthermore, the technical solution of the present embodiment is independent of the type of the current block and can achieve parallel processing, thereby reducing computational complexity.
[0021] Hereinafter, each embodiment of the present invention will be described in detail with reference to the drawings.
[0022] Referring to FIG. 1, an exemplary block diagram of a configuration of a video encoding system according to an embodiment of the present application is shown. As shown in FIG. 1, the video encoding system 100 includes a transform and quantization unit 101, an intra estimation unit 102, an intra prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image buffer unit 110, etc., where the filtering unit 108 can realize deblocking filtering and Sample Adaptive Offset (SAO) filtering, and the encoding unit 109 can realize header information coding and Context-based Adaptive Binary Arithmetic Coding (CABAC). For an input original video signal, one video coding block can be obtained by dividing a coding tree unit (CTU), and then the video coding block can be transformed by the transform and quantization unit 101 based on residual pixel information obtained by performing intra or inter prediction, where the transformation of the video coding block by the transform and quantization unit 101 may include converting the residual information from the pixel domain to a transform domain and quantizing the obtained transform coefficients to further reduce the bit rate. The intra estimation unit 102 and the intra prediction unit 103 are configured to perform intra prediction on the video coding block, specifically, the intra estimation unit 102 and the intra prediction unit 103 are configured to determine an intra prediction mode to be used for encoding the video coding block. The motion compensation unit 104 and the motion estimation unit 105 are configured to provide temporal prediction information by performing inter prediction coding on the received video coding block with respect to one or more blocks in one or more reference frames. The motion estimation performed by the motion estimation unit 105 is the process of generating motion vectors, The motion of the video coding block may be estimated based on the motion vector determined by the motion estimation unit 105, and then the motion compensation unit 104 may perform motion compensation based on the motion vector determined by the motion estimation unit 105. After determining the intra prediction mode, the intra prediction unit 103 is further configured to provide the selected intra prediction data to the encoding unit 109. The motion estimation unit 105 may also send the motion vector data determined by the calculation to the encoding unit 109. Furthermore, the inverse transform and inverse quantization unit 106 is configured to reconstruct the video coding block, i.e., reconstruct a residual block in the pixel domain. Block artifacts of the reconstructed residual block may be removed by the filter control analysis unit 107 and the filtering unit 108, and then the reconstructed residual block is added to a prediction block in a frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is configured to encode various coding parameters and quantized transform coefficients, and in a CABAC-based encoding algorithm, context content is based on neighboring coding blocks and can be used to encode information indicating a determined intra-prediction mode to output a bitstream of the video signal. The decoded picture buffer unit 110 is configured to store reconstructed video coding blocks as prediction references. As the video images are encoded, new reconstructed video coding blocks are continuously generated, and these reconstructed video coding blocks are stored in the decoded picture buffer unit 110.
[0023] Referring to FIG. 2, an exemplary block diagram of a video decoding system according to an embodiment of the present invention is shown. As shown in FIG. 2, the video decoding system 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image buffer unit 206. The decoding unit 201 can perform header information decoding and CABAC decoding, and the filtering unit 205 can perform deblocking filtering and SAO filtering. After the encoding process shown in FIG. 1 is performed on an input video signal, a bitstream of the video signal is output. The bitstream is input to the video decoding system 200 and first processed through the header information decoding and CABAC decoding unit 201 to obtain decoded transform coefficients. The transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain. The intra prediction unit 203 may be configured to generate prediction data for a current video decoding block based on the determined intra prediction mode and data of a previously decoded block from the current frame or image. The motion compensation unit 204 may determine prediction information for the video decoding block by analyzing motion vectors and other related syntax elements, and generate a prediction block for the currently decoded video decoding block based on the prediction information. A decoded video block is formed by adding the residual block from the inverse transform and inverse quantization unit 202 and the corresponding prediction block generated by the intra prediction unit 203 or the motion compensation unit 204. Block artifacts in the decoded video signal are removed by the filtering unit 205, thereby improving video quality. The decoded video block is then stored in a decoded image buffer unit 206, which is configured to store reference images used for subsequent intra prediction or motion compensation and output a video signal, i.e., obtain a restored original video signal. This can be done.
[0024] The image component prediction method according to the present embodiment is mainly applied to the intra prediction unit 103 shown in Fig. 1 and the intra prediction unit 203 shown in Fig. 2. That is, the image component prediction method according to the present embodiment may be applied to a video encoding system, a video decoding system, or both a video encoding system and a video decoding system, but the present embodiment is not particularly limited thereto. It should be noted that when the image component prediction method is applied to the intra prediction unit 103, the "current block" specifically refers to a currently coded block in intra prediction, and when the image component prediction method is applied to the intra prediction unit 203, the "current block" specifically refers to a currently decoded block in intra prediction.
[0025] Based on the above exemplary application scenario of Fig. 1 or Fig. 2, an exemplary flowchart of an image component prediction method according to an embodiment of the present application is shown in Fig. 3. As shown in Fig. 3, the method may include the following steps:
[0026] In step S301, a set of neighboring reference samples of a current block is determined, and a preset parameter value corresponding to the current block is determined, where the set of neighboring reference samples includes at least one reference sample; It should be noted that a video image can be divided into multiple image blocks, and each image block currently to be coded is called a coding block, where each coding block may include a first image component, a second image component, and a third image component, and the current block is the coding block in the video image on which the first image component, the second image component, or the third image component prediction is currently performed.
[0027] Here, if the current block performs first image component prediction and the first image component is a luma component, i.e., the image component to be predicted is a luma component, the current block can also be called a luma block, or if the current block performs second image component prediction and the second image component is a chroma component, i.e., the image component to be predicted is a chroma component, the current block can also be called a chroma block.
[0028] It should be further noted that, when the left adjacent region, the bottom-left adjacent region, the upper adjacent region, and the upper right adjacent region are all valid regions for the current block, the set of adjacent reference samples may be obtained by filtering the reference pixels in the left adjacent region and the upper adjacent region of the current block, or may be obtained by filtering the reference pixels in the left adjacent region and the bottom-left adjacent region of the current block, or may be obtained by filtering the reference pixels in the upper adjacent region and the upper right adjacent region of the current block, and the embodiments of the present application are not particularly limited to these.
[0029] In some embodiments, in step S301, determining a set of neighboring reference samples of the current block includes: Obtaining reference pixels adjacent to at least one edge of the current block, where the at least one edge of the current block includes at least one of a top edge, a top-right edge, a left edge, and a bottom-left edge; and determining a set of neighboring reference samples of the current block according to the obtained reference pixels.
[0030] Here, at least one edge of the current block may be the top edge (called the top row), the top right edge (called the top row), the left edge (called the left column), or the bottom left edge (called the bottom left column), or it may be a combination of both edges, such as the top edge and the left edge, but the present embodiment is not particularly limited to these.
[0031] Further, in some embodiments, if at least one edge of the current block is a left edge and / or a top edge, in step S301, determining a set of neighboring reference samples of the current block may include: Obtaining reference pixels adjacent to at least one edge of the current block, where the at least one edge of the current block includes a top edge and / or a left edge; and determining a set of neighboring reference samples of the current block according to the obtained reference pixels.
[0032] Here, at least one edge of the current block may include the left edge of the current block and / or the top edge of the current block, i.e., at least one edge of the current block may be the top edge of the current block, the left edge of the current block, or the top and left edges of the current block, and the present embodiment is not particularly limited thereto.
[0033] Further, in some embodiments, in step S301, determining a set of neighboring reference samples of the current block includes: performing a first filtering operation on reference pixels adjacent to at least one side of the current block to determine reference samples adjacent to the at least one side; and constructing a set of neighboring reference samples of the current block according to the determined reference samples.
[0034] Further, in some embodiments, The first filtering process includes a downsampling filtering process or a low-pass filtering process.
[0035] It should be noted that if both the left-neighboring region and the upper-neighboring region are valid regions, the adjacent reference sample set may be obtained by filtering reference pixels adjacent to the left edge of the current block and reference pixels adjacent to the upper edge of the current block; if the left-neighboring region is a valid region and the upper-neighboring region is an invalid region, the adjacent reference sample set may be obtained by filtering reference pixels adjacent to the left edge of the current block; if the left-neighboring region is an invalid region and the upper-neighboring region is a valid region, the adjacent reference sample set may be obtained by filtering reference pixels adjacent to the upper edge of the current block. Here, the filtering may be a downsampling filtering process or a low-pass filtering process, and the embodiments of the present application are not particularly limited thereto.
[0036] In practical applications, when predicting a current block, the blocks above and to the left of the current block have already been coded. Reference pixels in the MIP technique may be the reconstructed values of reference pixels adjacent to the upper row of the current block and the reconstructed values of reference pixels adjacent to the left column of the current block. In this case, the reference pixels of the current block may be obtained by obtaining reference pixels corresponding to the top edge and reference pixels corresponding to the left edge of the current block. FIG. 4A shows a schematic diagram of reference pixel locations in an embodiment of the present application. In FIG. 4A, both the left-neighboring region and the upper-neighboring region are valid regions, where the reference pixels corresponding to the top edge of the current block are gray-filled pixels and can be represented by refT, and the reference pixels corresponding to the left edge of the current block are shaded pixels and can be represented by refL. In this case, the reference pixels of the current block include refT and refL, and the set of neighboring reference samples is obtained by filtering refT and refL. It should be noted that invalid positions (such as image boundaries) can be filled in the same way as reference pixels are obtained in conventional intra prediction techniques.
[0037] In the case of MIP technology, the current block can be classified into three types according to its size, and the type of the current block can be recorded in mipSizeId. Specifically, if the type of the current block differs, the number of samples included in the neighbor reference sample set and the number of output samples for matrix multiplication differ.
[0038] Suppose the current block is a 4x4 image block, mipSizeId=0, its input reference pixel set includes two pixel points selected from each side, the number of input sample points for matrix multiplication is 4, and a 4x4 MIP prediction block is output.
[0039] Suppose the current block is a 4xN, Nx4, or 8x8 image block (where N=8, 16, 32, 64) and mipSizeId=1, its input reference pixel set includes four pixel points selected from each side, the number of input sample points for matrix multiplication is 8, and a 4x4 MIP prediction block is output.
[0040] Suppose the current block is an image block of another size and mipSizeId=2, its input reference pixel set includes two pixel points selected from each side, the number of input sample points for matrix multiplication is 7, and an 8x4 MIP prediction block is output.
[0041] Thus, since the sum of the width and height of the current block is greater than the number of input sample points for matrix multiplication, a downsampling process needs to be performed on the acquired reference pixels (including refT and refL) to obtain samples equal to the number of input sample points, thereby obtaining a set of adjacent reference samples.
[0042] Furthermore, in some embodiments, determining a set of neighboring reference samples of the current block according to the obtained reference pixels further comprises: determining a sampling position of a reference pixel based on at least one edge of the current block; selecting a reference sample corresponding to the sampling position from the obtained reference pixels, and creating the set of adjacent reference samples with the selected parameter sample.
[0043] Furthermore, determining a sampling position of a reference pixel based on at least one edge of the current block includes: The method may include performing a downsampling process on at least one edge of the current block to determine the sampling position.
[0044] It should be noted that boundarySize reference samples need to be obtained by sampling each reference edge (including the top and left edges) of the current block, and the value of boundarySize is related to the type mipSizeId of the current block.
[0045] Specifically, for a reference pixel refS, the number of its reference pixels (i.e., the length of the edge of the current block) is nTbS, and in this case, the number of reference pixels that need to be downsampled is boundarySize. Here, the sampling rate of each reference edge can be represented by bDwn, and bDwn can be calculated by Equation (1). Furthermore, for the reference pixel refS, the average value obtained by performing an average operation on the reference pixels of each bDwn can be used as one sample point of the reference sample redS, and redS can be calculated by Equation (2). Here, S can be replaced with W and H, respectively, where W represents the top edge and H represents the left edge.
number
number
[0046] After the downsampling process according to Equations (1) and (2), two reference samples can be obtained, as shown in Figure 4B: a top-edge reference sample redT obtained by downsampling the top-edge reference pixel refT of the current block, and a left-edge reference sample redL obtained by downsampling the left-edge reference pixel refL of the current block. In Figure 4B, taking a 4x4 current block as an example, redL obtained by downsampling the left edge includes two reference pixels, i.e., reference pixel 1 and reference pixel 2, and redT obtained by downsampling the top edge includes two reference pixels, i.e., reference pixel 3 and reference pixel 4. Thus, the neighboring reference sample set of the current block includes four reference pixels.
[0047] In the case of the MIP technique, in addition to obtaining the type mipSizeId of the current block, it is also necessary to obtain a bit depth value (which can be expressed as BitDepth) corresponding to the image component to be predicted of the current block. If it is assumed that the image component to be predicted is a luma component, the luma bit depth of the current block can be obtained, or if it is assumed that the image component to be predicted is a chroma component, the chroma bit depth of the current block can be obtained, thereby obtaining the preset parameter value of the current block.
[0048] Further, in some embodiments, in step S301, determining the preset parameter value corresponding to the current block includes: obtaining a bit depth value corresponding to an image component to be predicted of the current block; converting 1 to a binary value, and shifting the binary value by the bit depth value of the binary value minus one binary digit to obtain the preset parameter value.
[0049] That is, after obtaining the bit depth value BitDepth corresponding to the image component to be predicted of the current block, the preset parameter value can be expressed as 1<<(BitDepth-1).
[0050] In this way, after obtaining the neighboring reference sample set of the current block and the preset parameter values, they can be buffered to generate the input reference sample set.
[0051] In step S302, the adjacent reference sample set and the preset parameter value are buffered to generate an input reference sample set.
[0052] It should be noted that after obtaining the adjacent reference sample set, an initial input reference sample set can be created first, and then one bit is added to the end of the initial buffer to buffer the preset parameter value to obtain the input reference sample set, which facilitates the creation of the subsequent input sample matrix.
[0053] In some embodiments, in step S302, buffering the neighboring reference sample set and the preset parameter value to generate an input reference sample set includes: buffering the adjacent reference sample sets to obtain an initial input reference sample set; and buffering the preset parameter values using one data unit after the initial input reference sample set to obtain the input reference sample set.
[0054] Furthermore, when creating an initial input reference sample set, the creation method on the encoder side differs from that on the decoder side, and this mainly relates to the method of determining the transposition processing instruction flag (which can be expressed as isTransposed).
[0055] When applied to an encoder side, in some embodiments, buffering the neighboring reference sample sets to obtain the initial input reference sample set comprises: determining a value of a transposition processing instruction flag using a rate distortion optimization (RDO) method; If the value of the transposition processing instruction flag is 0, store the reference samples in a buffer such that the reference samples corresponding to the upper edge of the current block of the adjacent reference sample set are stored before the reference samples corresponding to the left edge of the current block of the adjacent reference sample set, and determine the buffer as the initial input reference sample set; or If the value of the transposition processing instruction flag is 1, the method may include storing the reference samples in a buffer so that the reference sample corresponding to the top edge of the current block of the adjacent reference sample set is stored after the reference sample corresponding to the left edge of the current block of the adjacent reference sample set, performing a transposition processing on the buffer, and determining the transposed buffer as the initial input reference sample set.
[0056] It should be noted that a rate distortion optimization (RDO) method can be used to determine the value of the transposition instruction flag. For example, a first cost value when the transposition is performed and a second cost value when the transposition is not performed are calculated, and if the first cost value is smaller than the second cost value, the value of the transposition instruction flag can be determined to be 1, in which case the reference sample corresponding to the upper edge of the adjacent reference sample set can be stored after the reference sample corresponding to the left edge of the adjacent reference sample set, or the reference sample corresponding to the left edge of the adjacent reference sample set can be stored before the reference sample corresponding to the upper edge of the adjacent reference sample set, that is, the transposition operation needs to be performed. If the first cost value is greater than or equal to the second cost value, the value of the transposition instruction flag can be determined to be 0, in which case the reference sample corresponding to the upper edge of the adjacent reference sample set can be stored before the reference sample corresponding to the left edge of the adjacent reference sample set, or the reference sample corresponding to the left edge of the adjacent reference sample set can be stored after the reference sample corresponding to the upper edge of the adjacent reference sample set, that is, the transposition operation does not need to be performed.
[0057] It should be further noted that the encoder side needs to write the determined value of the transposition processing instruction flag into the bitstream to facilitate the subsequent analysis processing at the decoder side.
[0058] When applied to a decoder side, in some embodiments, buffering the neighboring reference sample sets to obtain the initial input reference sample set comprises: Parsing the bitstream to obtain a value of a transposition processing instruction flag; If the value of the transposition processing instruction flag is 0, store the reference samples in a buffer such that the reference samples corresponding to the upper edge of the current block of the adjacent reference sample set are stored before the reference samples corresponding to the left edge of the current block of the adjacent reference sample set, and determine the buffer as the initial input reference sample set; or If the value of the transposition processing instruction flag is 1, the method may include storing the reference samples in a buffer so that the reference sample corresponding to the top edge of the current block of the adjacent reference sample set is stored after the reference sample corresponding to the left edge of the current block of the adjacent reference sample set, performing a transposition processing on the buffer, and determining the transposed buffer as the initial input reference sample set.
[0059] It should be noted that at the decoder side, the value of the transposition processing instruction flag can be directly obtained by analyzing the bitstream, and then it can determine whether transposition processing needs to be performed on the buffer according to the value of the transposition processing instruction flag.
[0060] That is, after determining the value of the transposition instruction flag (isTransposed), assuming that the buffer is represented by pTemp, if isTransposed is 0, all reference pixels redT corresponding to the top edge are first stored in pTemp, and then all reference pixels redL corresponding to the left edge are stored starting from the bit immediately following all stored redT. As shown in FIG. 5A, taking a 4×4 current block as an example, redL includes reference pixel 1 and reference pixel 2, and redT includes reference pixel 3 and reference pixel 4. In this case, the buffer order of pTemp is reference pixel 3, reference pixel 4, reference pixel 1, reference pixel 2. Because all reference pixels corresponding to the top edge of the current block are stored before reference pixels corresponding to the left edge of the current block, transposition is omitted here, and the resulting buffer becomes the initial input reference sample set.
[0061] If isTransposed is 1, all reference pixels redL corresponding to the left side are stored in pTemp first, and then all reference pixels redT corresponding to the top side are stored starting from the bit immediately following all stored redL. As shown in FIG. 5B, taking the 4×4 current block as an example, redL includes reference pixel 1 and reference pixel 2, and redT includes reference pixel 3 and reference pixel 4. In this case, the buffer order of pTemp is reference pixel 1, reference pixel 2, reference pixel 3, reference pixel 4. Because all reference pixels corresponding to the top side are stored after the reference pixels corresponding to the left side, transposition is required here, and the transposed buffer is determined as the initial input reference sample set.
[0062] In this way, after obtaining the initial input reference sample set, a data unit can be extended after the initial input reference sample set, and the data unit is configured to buffer the preset parameter value, i.e., store 1<<(BitDepth-1), as shown in Figure 5C. Still taking the 4x4 current block as an example in Figure 5C, the initial input reference sample set stores four values (i.e., reference samples obtained by downsampling the reference pixels), and in this embodiment, the input reference sample set stores five values, i.e., in addition to the reference samples obtained by downsampling the four reference pixels, one preset parameter value is also stored.
[0063] In step S303, an input sample matrix is determined according to the input reference sample set using a first preset calculation model.
[0064] It should be noted that the input sample is a matrix vector that needs to perform matrix multiplication. The current solution is determined by the initial buffer (represented by pTemp), the type of the current block (represented by mipSizeId), the bit depth value (represented by BitDepth) corresponding to the image component to be predicted, and the number of input samples, and finally obtain the x-th input sample (represented by P[x]) of the input sample matrix. Here, if mipSizeId=0 or 1, 1<<(BitDepth-1) should be subtracted from the sample at the 0th position of pTemp to use as P[0], and then the sample at the 0th position of pTemp should be subtracted from the samples corresponding to each other position to use as P[x], specifically as follows:
number
[0065] When mipSizeId=2, the first position of the initial buffer pTemp can be ignored, and the sample corresponding to the 0th position can be subtracted from the samples corresponding to each other position and stored in the previous position, specifically as follows:
number
[0066] As shown in FIG. 6A, taking a 4×4 current block as an example, four values are stored in the initial buffer, but the number of input samples is four. In this case, the four input samples can be determined according to equation (3) or equation (4), and equations (3) and (4) are represented by p[x], where x=0, 1, 2, 3, thereby forming a 1×4 input sample matrix. However, in the current solution, the derivation process of the input samples for matrix multiplication needs to be related to the type mipSizeId of the current block, which makes the derivation process cumbersome and somewhat complicated. Furthermore, when mipSizeId=0 or 1, the calculation formulas for p[0] and p[i] are different, which is not suitable for parallel processing.
[0067] In this embodiment, the initial buffer is expanded to the input reference sample set and can be used to store 1<<(BitDepth-1), so that the input sample derivation process is no longer related to the type mipSizeId of the current block and can unify the input sample derivation process of matrix multiplication. Furthermore, the input sample can only be determined by the input reference sample set (still represented by pTemp) and the number of input samples, so that the i-th input sample (represented by p[i]) in the input sample matrix is obtained.
[0068] Specifically, in some embodiments, in step S303, determining an input sample matrix using a first preset calculation model according to the input reference sample set includes: Calculating an i-th input sample using a first preset calculation model according to a sample corresponding to an i+1-th position (i is a positive integer greater than or equal to 0 and less than N) of the input reference sample set and a sample corresponding to a 0-th position, where N represents the number of elements included in the input sample matrix; and constructing the input sample matrix according to the N input samples obtained by the calculation.
[0069] Furthermore, in some embodiments, calculating the i-th input sample using the first preset calculation model comprises: The method may include performing a subtraction operation using the first preset calculation model to obtain the i-th input sample.
[0070] Further, in some embodiments, the method further comprises: setting a minuend of said subtraction operation equal to the sample corresponding to the i+1 th position of said set of reference samples; The method may further include setting a subtrahend of the subtraction operation to be equal to the sample corresponding to the 0th position of the reference sample set.
[0071] That is, regardless of the type of the current block, the sample corresponding to the first position of the input reference sample set, i.e., the 0th position, can be ignored, and then the sample corresponding to the 0th position can be subtracted from the samples corresponding to each other position and stored in the previous position, where the first preset calculation model is as follows:
number
[0072] Here, i = 0, 1, ..., N-1, N is the number of input samples (which can also be represented by inSize), and the number of input samples is the number of elements included in the input sample matrix, where pTemp[0] represents the sample corresponding to the 0th position, pTemp[i+1] represents the sample corresponding to the i+1th position, and p[i] represents the i-th input sample. In this way, after obtaining N input samples, the input sample matrix can be constructed. As shown in Figure 6B, still taking a 4x4 current block as an example, five values are stored in the input reference sample set, but the number of input samples is four. In this case, regardless of the type of the current block, four input samples can be determined according to Equation (5), which is represented by p[i], where i = 0, 1, 2, 3, thereby constructing a 1x4 input sample matrix.
[0073] In step S304, perform image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
[0074] It should be noted that after obtaining the input sample matrix, a temporary predicted value of at least one pixel of the MIP prediction block is first calculated, and then clipping, transposition, upsampling, etc. are performed in sequence to finally obtain a prediction block of the current block.
[0075] It should be further noted that if the image component to be predicted is a luma component, the current block may be a current luma block, and finally, a luma prediction block of the current luma block can be obtained, which provides a luma prediction value for at least one pixel; or if the image component to be predicted is a chroma component, the current block may be a current chroma block, and finally, a chroma prediction block of the current chroma block can be obtained, which provides a chroma prediction value for at least one pixel; however, the present embodiment is not particularly limited thereto.
[0076] In some embodiments, for step S304, as shown in FIG. 7, performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block may include the following steps:
[0077] In step S401, obtain a MIP prediction block of a current block according to an input sample matrix, where the MIP prediction block includes prediction samples of at least some pixel positions of the current block.
[0078] It should be noted that after obtaining the input sample matrix, the weight matrix (represented by mWeight), shift factor (represented by sW) and offset factor (represented by fO) corresponding to the current block can also be obtained, and then, as shown in Figure 8, a temporary predicted value of at least one pixel of the MIP prediction block (represented by predMip) can be obtained by calculation using a second preset calculation model, thereby obtaining the MIP prediction block.
[0079] Further, in some embodiments, in step S401, obtaining a MIP prediction block of the current block according to the input sample matrix includes: Obtaining a weight matrix, a shift factor, and an offset factor corresponding to the current block; and performing a matrix multiplication operation on the input sample matrix, the weight matrix, the shift factor, and the offset factor using a second preset calculation model to calculate the MIP prediction block.
[0080] That is, in the encoder or decoder, a weight matrix table is established in advance and stored in the encoder or decoder. In this way, the weight matrix mWeight[x][y] that the current block needs to use can be determined by searching the table according to the type mipSizeId of the current block and the MIP prediction mode modeId.
[0081] Furthermore, in the encoder or decoder, a shift factor table such as that shown in Table 1 and an offset factor table such as that shown in Table 2 are also pre-established. The shift factor table and offset factor table are also stored in the encoder or decoder. In this way, the shift factor sW and offset factor fO that need to be used by the current block can also be determined by searching the table according to the type mipSizeId of the current block and the MIP prediction mode modeId. [Table 1] [Table 2]
[0082] In this way, after obtaining the type mipSizeId of the current block and the MIP prediction mode modeId, the weight matrix mWeight[x][y], the shift factor sW, and the offset factor fO can be determined by searching the table, that is, the MIP prediction block predMip[x][y] can be calculated. Here, the second preset calculation model is as follows.
number
[0083] Here, [x][y] represents the position coordinates of a pixel point, x represents the horizontal direction, y represents the vertical direction, inSize represents the number of input samples, and predSize represents the side length of the MIP prediction block predMip. Here, predSize is only related to the type mipSizeId of the current block. When mipSizeId = 0 or 1, a 4×4 MIP prediction block is output, and in this case, predSize is equal to 4. When mipSizeId = 2, an 8×8 MIP prediction block is output, and in this case, predSize is equal to 8. Thus, based on the above formula (6), a temporary prediction value of at least one pixel of the MIP prediction block predMip can be calculated to obtain the MIP prediction block.
[0084] In step S402, a clipping process is performed on the prediction samples of the MIP prediction block to obtain the MIP prediction block of the current block.
[0085] It should be noted that after obtaining the temporary prediction value of at least one pixel of the MIP prediction block, a clipping process can be performed on the temporary prediction value of at least one pixel of the MIP prediction block. Specifically, when the temporary prediction value is less than 0, it can be set to 0. When the temporary prediction value is greater than (1<<BitDepth)-1, it can be set to (1<<BitDepth)-1, whereby the range of the prediction value can be clipped between 0 and (1<<BitDepth)-1.
[0086] Thus, after performing the clipping process on the MIP prediction block, the prediction value of at least one pixel of the MIP prediction block can be obtained, and the range of the prediction value is between 0 and (1<<BitDepth)-1. Then, it is necessary to determine whether to perform a transposition process according to the transposition process instruction flag bit isTransposed, and the final MIP prediction block can be determined.
[0087] In step S403, it is determined whether or not to perform a transposition process on the MIP prediction block.
[0088] In step S404, if the determination result is "yes", a transposition process is performed on the predicted samples of the MIP predicted block, and the transposed MIP predicted block is determined as the MIP predicted block of the current block.
[0089] In step S405, if the determination result is "No", the MIP predicted block is determined as the MIP predicted block of the current block.
[0090] In step S406, it is determined whether the size of the MIP prediction block is the same as the size of the current block.
[0091] When applied to the encoder side, in some embodiments, in step S403, determining whether to perform a transposition operation on the MIP prediction block comprises: Calculating a first cost value when a transposition process is performed on the MIP prediction block and a second cost value when a transposition process is not performed on the MIP prediction block using a rate-distortion optimization method; determining to perform a transposition operation on the MIP prediction block if the first cost value is less than the second cost value; or If the first cost value is greater than or equal to the second cost value, determining not to perform a transposition operation on the MIP prediction block.
[0092] When applied to the decoder side, in some embodiments, in step S403, determining whether to perform a transposition process on the MIP prediction block comprises: Parsing the bitstream to obtain a value of a transposition processing instruction flag; and determining whether to perform transposition processing on the MIP prediction block according to a value of the transposition processing instruction flag.
[0093] It should be noted that the transposition instruction flag is represented by isTransposed, and whether a transposition operation needs to be performed on the MIP prediction block can be determined according to the value of isTransposed. Specifically, the encoder side can set the value of isTransposed to 1 when the first cost value is smaller than the second cost value, and determine that a transposition operation needs to be performed on the MIP prediction block; or set the value of isTransposed to 0 when the first cost value is equal to or greater than the second cost value, and determine that a transposition operation does not need to be performed on the MIP prediction block. The decoder side can obtain the value of the transposition instruction flag by analyzing the bitstream, and determine that a transposition operation needs to be performed on the MIP prediction block when the value of isTransposed is analyzed to be 1, or determine that a transposition operation does not need to be performed on the MIP prediction block when the value of isTransposed is analyzed to be 0.
[0094] More specifically, if isTransposed is 0, it indicates that there is no need to perform a transposition process on the MIP prediction block, and in this case, the MIP prediction block predMip can be directly used to perform the subsequent step (i.e., step S406) to determine whether the size of the MIP prediction block is the same as the size of the current block. If isTransposed is 0, it indicates that there is a need to perform a transposition process on the MIP prediction block, and in this case, the transposition process can be performed using the following equation:
number
[0095] In this way, based on equation (7), after performing the transposition process on the MIP prediction block, the transposed MIP prediction block can be obtained, and the transposed MIP prediction block is determined as the MIP prediction block. Then, step S406 can be performed to determine whether the size of the MIP prediction block is the same as the size of the current block.
[0096] In step S407, if the size of the MIP prediction block is different from the size of the current block, a second filtering process is performed on the MIP prediction block to obtain a prediction block of the current block.
[0097] In step S408, if the size of the MIP prediction block is the same as the size of the current block, set the prediction block of the current block to be equal to the MIP prediction block, where the prediction block includes prediction samples of all pixel positions of the current block.
[0098] Furthermore, the second filtering process may include an upsampling filtering process or a low-pass filtering process.
[0099] It should be noted that after obtaining the MIP prediction block, the size of the current block may be the same as or different from the size of the MIP prediction block, because the size of the MIP prediction block only includes two types: a 4×4 MIP prediction block and an 8×8 MIP prediction block, which means that the current block may not be filled with samples corresponding to the MIP prediction block, and thus an upsampling operation may need to be performed on the MIP prediction block to generate the final prediction value; that is, whether the size of the MIP prediction block is the same as the size of the current block is determined to determine whether an upsampling process needs to be performed on the MIP prediction block.
[0100] Specifically, if the size of the MIP prediction block is the same as the size of the current block, that is, if the width and height of the MIP prediction block are both the same as the current block, it indicates that there is no need to perform an upsampling process on the MIP prediction block, and in this case, the current block can be directly filled with the MIP prediction block, that is, there are no empty pixel points in the current block after filling, and in this case, the predicted value of each pixel of the current block can be directly set to the predicted value of each pixel of the MIP prediction block, as shown below.
number
[0101] Here, [x][y] represent the position coordinates of a pixel point, x represents the horizontal direction, and y represents the vertical direction, predSamples[x][y] represents the predicted value corresponding to the pixel point at the position coordinates [x][y] of the current block, and predMip[x][y] represents the predicted value corresponding to the pixel point at the position coordinates [x][y] of the MIP predicted block. In this way, based on equation (8), the MIP predicted block predMip[x][y] can be directly used as the predicted block predSamples[x][y] of the current block.
[0102] If the size of the MIP prediction block is different from the size of the current block, i.e., if either the height or width of the MIP prediction block is different from that of the current block, it indicates that an upsampling process needs to be performed on the MIP prediction block, and after performing the upsampling process on it, a prediction block of the current block can be obtained.
[0103] Specifically, in some embodiments, in step S407, if the second filtering process is an upsampling filtering process, the method may include: determining a horizontal upsampling factor and a vertical upsampling factor corresponding to the current block; The method may include determining a predicted value of a pixel position to be filled in the current block using a third preset calculation model according to the MIP predicted block, the horizontal upsampling factor, and the vertical upsampling factor, to obtain a predicted block of the current block, wherein the pixel position to be filled is a pixel position in the current block that is different from a pixel position of the MIP predicted block.
[0104] It should be noted that if the size of the MIP prediction block is different from the size of the current block, there will be empty pixel points in the current block after filling, in which case upsampling needs to be performed on the MIP prediction block predMip[x][y] by linear interpolation.
[0105] Here, assuming that both the width and height of the MIP prediction block are predSize, the width of the current block is nTbW, and the height of the current block is nTbH, a horizontal upsampling factor (represented by upHor) can be calculated according to the side length predSize of the MIP prediction block and the width nTbW of the current block. Similarly, a vertical upsampling factor (represented by upVer) can be calculated according to the side length predSize of the MIP prediction block and the height nTbH of the current block. The specific calculation formula is as follows:
number
[0106] Since the current block cannot be completely filled with the MIP predicted block, the current block needs to be filled according to the horizontal upsampling factor upHor and the vertical upsampling factor upVer, that is, an upsampling operation needs to be performed, and the method of filling in the corresponding positions is as follows:
number
[0107] where x = 0, 1, ..., nTbW-1 and y = 0, 1, ..., nTbH-1.
[0108] Here, the specific upsampling processing method is to first fill the position predSamples[x][-1] corresponding to the upper row of the current block with the top-edge reference pixel refT, and then fill the position predSamples[-1][y] corresponding to the left column of the current block with the left-edge reference pixel refL. Then, based on equation (10), horizontal interpolation is first performed for the pixel positions to be filled in the current block (for example, the empty positions between the predicted values to fill the corresponding positions, or the empty positions between the reference pixel and the predicted value to fill the corresponding positions), and then vertical interpolation is performed, so that the upsampling result predSamples[x][y] of the current block can be finally obtained, and the predSamples[x][y] is the predicted value of the current block obtained according to the MIP prediction mode.
[0109] In this embodiment, when the image component prediction method is applied to an encoder side, the image component prediction method can be used to calculate a predicted value of at least one pixel of a current block, and then a residual corresponding to the at least one pixel of the current block can be calculated according to the difference between the actual value and the predicted value of the at least one pixel, and the calculated residual can be written into a bitstream. After obtaining a transposition processing instruction flag (isTransposed), the value of isTransposed also needs to be written into the bitstream, and then the bitstream is transmitted from the encoder side to the decoder side. Correspondingly, when the image component prediction method is applied to a decoder side, the value of isTransposed is determined by analyzing the bitstream, and then it is determined whether a transposition processing needs to be performed. Furthermore, the image component prediction method can also be used to calculate a predicted value of at least one pixel of a current block, and then a residual corresponding to the at least one pixel can be directly obtained by analyzing the bitstream. Furthermore, the actual value of at least one pixel of the current block can be obtained according to the predicted value and residual of the at least one pixel of the current block.
[0110] This embodiment provides an image component prediction method applicable to an encoder or decoder. The image component prediction method includes: determining a set of neighboring reference samples for a current block; determining predetermined parameter values corresponding to the current block; wherein the neighboring reference sample set includes at least one reference sample; buffering the neighboring reference sample set and the predetermined parameter values to generate an input reference sample set; determining an input sample matrix using a first predetermined calculation model according to the input reference sample set; and performing image component prediction on the current block according to the input sample matrix to obtain a predicted block for the current block. Since the technical solution according to this embodiment does not require determining the type of the current block, it reduces computational complexity and facilitates hardware implementation. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first predetermined calculation model, the process of deriving input samples for matrix multiplication is simplified, thereby unifying the process of deriving the input sample matrix. Furthermore, the technical solution according to this embodiment is independent of the type of the current block and can realize parallel processing, thereby reducing computational complexity.
[0111] Based on the same inventive concept as the above embodiment, referring to Figure 9, a schematic structural diagram of an encoder 90 according to the present embodiment is shown. As shown in Figure 9, the encoder 90 includes a first determination unit 901, a first buffer unit 902, and a first prediction unit 903, where: The first determining unit 901 is configured to determine a neighboring reference sample set of a current block, and determine a preset parameter value corresponding to the current block, where the neighboring reference sample set includes at least one reference sample; a first buffer unit 902 configured to buffer the adjacent reference sample set and the preset parameter value to generate an input reference sample set; The first determining unit 901 is further configured to determine an input sample matrix using a first preset calculation model according to the input reference sample set; The first prediction unit 903 is configured to perform image component prediction on the current block according to the input sample matrix to obtain a prediction block of the current block.
[0112] In the above solution, referring to FIG. 9 , the encoder 90 may further include a first acquisition unit 904, which is configured to acquire reference pixels adjacent to at least one edge of the current block, where the at least one edge of the current block includes at least one of a top edge, a top right edge, a left edge, and a bottom left edge; The first determining unit 901 is configured to determine a set of neighboring reference samples of the current block according to the obtained reference pixels.
[0113] In the above solution, referring to FIG. 9 , the encoder 90 may further include a first processing unit 905, which is configured to perform a first filtering operation on reference pixels adjacent to at least one edge of the current block to determine reference samples adjacent to the at least one edge; The first determining unit 901 is configured to configure a set of neighboring reference samples of the current block according to the determined reference samples.
[0114] In the above solution, the first filtering process includes a downsampling filtering process or a low-pass filtering process.
[0115] In the above solution, the first obtaining unit 904 is further configured to obtain a bit depth value corresponding to an image component to be predicted of the current block; The first processing unit 905 is further configured to convert 1 into a binary value, and shift the binary value by the bit depth value of the binary value minus one binary digit to obtain the preset parameter value.
[0116] In the above solution, the first buffer unit 902 is configured to buffer the adjacent reference sample set to obtain an initial input reference sample set, and to buffer the preset parameter value using one data unit after the initial input reference sample set to obtain the input reference sample set.
[0117] In the above solution, the first determining unit 901 is further configured to determine the value of the transposition processing indication flag using a rate-distortion optimization scheme; Specifically, the first buffer unit 902 is configured to: when the value of the transposition processing instruction flag is 0, store the reference samples in a buffer such that the reference sample corresponding to the top edge of the current block of the adjacent reference sample set is stored before the reference sample corresponding to the left edge of the current block of the adjacent reference sample set, and determine the buffer as the initial input reference sample set; or when the value of the transposition processing instruction flag is 1, store the reference samples in a buffer such that the reference sample corresponding to the top edge of the current block of the adjacent reference sample set is stored after the reference sample corresponding to the left edge of the current block of the adjacent reference sample set, perform a transposition processing on the buffer, and determine the transposed buffer as the initial input reference sample set.
[0118] In the above solution, referring to FIG. 9, the encoder 90 may further include a first calculation unit 906, which is configured to calculate an i-th input sample using a first preset calculation model according to a sample corresponding to an i+1-th position (i is a positive integer greater than or equal to 0 and less than N) of the input reference sample set and a sample corresponding to a 0-th position, where N represents the number of elements included in the input sample matrix; The first determining unit 901 is configured to configure the input sample matrix according to the N input samples obtained by calculation.
[0119] In the above solution, the first calculation unit 906 is specifically configured to perform a subtraction operation using the first preset calculation model to obtain the i-th input sample.
[0120] In the above solution, the first calculation unit 906 is specifically configured to set the minuend of the subtraction operation to be equal to the sample corresponding to the i+1th position of the reference sample set, and set the subtrahend of the subtraction operation to be equal to the sample corresponding to the 0th position of the reference sample set.
[0121] In the above solution, the first acquisition unit 904 is further configured to acquire a MIP prediction block of the current block according to the input sample matrix, where the MIP prediction block includes prediction samples of at least some pixel positions of the current block; The first processing unit 905 is further configured to: perform a second filtering operation on the MIP prediction block to obtain a prediction block of the current block if either the width or height of the MIP prediction block is different from that of the current block; or set the prediction block of the current block to be equal to the MIP prediction block if both the width and height of the MIP prediction block are the same as those of the current block, where the prediction block includes prediction samples of all pixel positions of the current block.
[0122] In the above solution, the first obtaining unit 904 is specifically configured to perform a clipping process on the predicted samples of the MIP predicted block to obtain a MIP predicted block of the current block.
[0123] In the above solution, referring to FIG. 9, the encoder 90 may further include a first judgment unit 907, which is configured to judge whether to perform a transposition process on the MIP prediction block, and if the judgment result is “yes”, to perform a transposition process on the prediction samples of the MIP prediction block, and determine the transposed MIP prediction block as the MIP prediction block of the current block.
[0124] In the above solution, the first calculation unit 906 is further configured to calculate, using a rate-distortion optimization scheme, a first cost value when a transposition operation is performed on the MIP prediction block, and a second cost value when a transposition operation is not performed on the MIP prediction block; The first judgment unit 907 is specifically configured to determine to perform a transposition operation on the MIP prediction block if the first cost value is smaller than the second cost value, or to determine not to perform a transposition operation on the MIP prediction block if the first cost value is greater than or equal to the second cost value.
[0125] In the above solution, the second filtering process includes an upsampling filtering process or a low-pass filtering process.
[0126] In the above solution, the first obtaining unit 904 is further configured to obtain a weight matrix, a shift factor and an offset factor corresponding to the current block; The first calculation unit 906 is further configured to use a second preset calculation model to perform a matrix multiplication operation on the input sample matrix, the weight matrix, the shift factor and the offset factor to calculate the MIP prediction block.
[0127] In the above solution, if the second filtering operation is an upsampling filtering operation, the first determining unit 901 is further configured to determine a horizontal upsampling factor and a vertical upsampling factor corresponding to the current block; The first calculation unit 906 is further configured to determine a prediction value of a pixel position to be filled in the current block using a third preset calculation model according to the MIP prediction block, the horizontal upsampling factor, and the vertical upsampling factor, to obtain a prediction block of the current block, where the pixel position to be filled is a pixel position in the current block that is different from a pixel position of the MIP prediction block.
[0128] It is understood that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and may be modular or non-modular. Furthermore, the constituent units in the embodiments may be integrated into a single processing unit, or each unit may be used separately as a single unit, or two or more units may be integrated into a single unit. The integrated unit may be implemented in the form of hardware or a software functional module.
[0129] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, an essential part of the technical solution of this embodiment, i.e., a part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0130] Therefore, an embodiment of the present application provides a computer storage medium applicable to an encoder 90, the computer storage medium storing an image component prediction program, which, when executed by a first processor, implements any of the methods described in the above embodiments.
[0131] Based on the above configuration of the encoder 90 and the computer storage medium, referring to FIG. 10 , a specific hardware structure of the encoder 90 according to the embodiment of the present application is shown. The encoder 90 may include a first communication interface 1001, a first memory 1002, and a first processor 1003, and each component is coupled via a first bus system 1004. It can be understood that the first bus system 1004 is used to implement the connection communication between these components. The first bus system 1004 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for clarity of explanation, all the various buses are denoted as the first bus system 1004 in FIG. 10 . Here, The first communication interface 1001 is configured to receive and transmit signals in the process of transmitting and receiving information to other external elements; The first memory 1002 is configured to store a computer program executable by the first processor 1003; When executing the computer program, the first processor 1003: determining a set of neighboring reference samples of a current block and determining a predetermined sample corresponding to the current block, wherein the set of neighboring reference samples includes at least one reference sample; buffering the adjacent reference sample set and the preset parameter value to generate an input reference sample set; determining an input sample matrix using a first preset calculation model according to the input reference sample set; performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
[0132] It should be understood that first memory 1002 in this embodiment may be volatile memory, nonvolatile memory, or both volatile and nonvolatile memory. Here, nonvolatile memory may 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. Volatile memory may be random access memory (RAM) used as an external cache. By way of example and not limitation, many forms of RAM can be used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). The memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0133] The first processor 1003 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above-described method can be performed through instructions in the form of hardware integrated logic circuits or software in the first processor 1003. The first processor 1003 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. Each method, step, and logic block diagram disclosed in the embodiments of the present application can be realized or executed. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of the present application can be directly executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be arranged in a storage medium well known in the art, such as a random memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is arranged in a first memory 1002, and the first processor 1003 reads information from the first memory 1002 and combines with its hardware to complete the steps of the method.
[0134] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing unit can be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processing (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field-Programmable Gate Arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof. For a software implementation, the techniques described herein can be implemented through modules (processes, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by the processor. The memory can be implemented within the processor or external to the processor.
[0135] Illustratively, as another embodiment, the first processor 1003 is further configured to perform any of the methods described in the above embodiments when executing the computer program.
[0136] This embodiment provides an encoder, the encoder comprising: a first determination unit, a first buffer unit, and a first prediction unit, wherein the first determination unit is configured to determine a set of neighboring reference samples of a current block and determine preset parameter values corresponding to the current block; the first buffer unit is configured to buffer the set of neighboring reference samples and the preset parameter values to create an input reference sample set; the first determination unit is further configured to determine an input sample matrix using a first preset calculation model according to the input reference sample set; and the first prediction unit is configured to perform image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block. In this way, the process of deriving input samples for matrix multiplication is simplified, which not only unifies the process of deriving the input sample matrix, but also eliminates the need to determine the type of the current block, thereby reducing time and complexity and facilitating hardware implementation.
[0137] Based on the same inventive concept as the above embodiment, referring to Figure 11, a schematic structural diagram of the configuration of a decoder 110 according to the embodiment of the present application is shown. As shown in Figure 11, the decoder 110 comprises a second determination unit 1101, a second buffer unit 1102, and a second prediction unit 1103, where: The second determining unit 1101 is configured to determine a neighboring reference sample set of a current block, and determine a preset parameter value corresponding to the current block, where the neighboring reference sample set includes at least one reference sample; a second buffer unit 1102 configured to buffer the adjacent reference sample set and the preset parameter value to generate an input reference sample set; The second determining unit 1101 is further configured to determine an input sample matrix using a first preset calculation model according to the input reference sample set; The second prediction unit 1103 is configured to perform image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
[0138] In the above solution, referring to FIG. 11 , the decoder 110 may further include a second acquisition unit 1104, which is configured to acquire reference pixels adjacent to at least one edge of the current block, where the at least one edge of the current block includes at least one of a top edge, a top right edge, a left edge, and a bottom left edge; The second determining unit 1101 is configured to determine a set of neighboring reference samples of the current block according to the obtained reference pixels.
[0139] In the above solution, referring to FIG. 11 , the decoder 110 may further include a second processing unit 1105, which is configured to perform a first filtering operation on reference pixels adjacent to at least one edge of the current block to determine reference samples adjacent to the at least one edge; The second determining unit 1101 is configured to configure a set of neighboring reference samples of the current block according to the determined reference samples.
[0140] In the above solution, the first filtering process includes a downsampling filtering process or a low-pass filtering process.
[0141] In the above solution, the second obtaining unit 1104 is further configured to obtain a bit depth value corresponding to an image component to be predicted of the current block; The second processing unit 1105 is further configured to convert 1 into a binary value, and shift the binary value by the bit depth value minus one digit of the binary value to obtain the preset parameter value.
[0142] In the above solution, the second buffer unit 1102 is configured to buffer the adjacent reference sample set to obtain an initial input reference sample set, and to buffer the preset parameter value using one data unit after the initial input reference sample set to obtain the input reference sample set.
[0143] In the above solution, referring to FIG. 11, the decoder 110 may further include a parsing unit 1106, which is configured to parse the bitstream to obtain a value of the transposition processing instruction flag; Specifically, the second buffer unit 1102 is configured to: when the value of the transposition processing instruction flag is 0, store the reference samples in a buffer such that the reference sample corresponding to the upper edge of the current block of the adjacent reference sample set is stored before the reference sample corresponding to the left edge of the current block of the adjacent reference sample set, and determine the buffer as the initial input reference sample set; or when the value of the transposition processing instruction flag is 1, store the reference samples in a buffer such that the reference sample corresponding to the upper edge of the current block of the adjacent reference sample set is stored after the reference sample corresponding to the left edge of the current block of the adjacent reference sample set, perform a transposition processing on the buffer, and determine the transposed buffer as the initial input reference sample set.
[0144] In the above solution, referring to FIG. 11, the decoder 110 may further include a second calculation unit 1107, which is configured to calculate an i-th input sample using a first preset calculation model according to a sample corresponding to an i+1-th position (i is a positive integer greater than or equal to 0 and less than N) of the input reference sample set and a sample corresponding to a 0-th position, where N represents the number of elements included in the input sample matrix; The second determining unit 1101 is configured to configure the input sample matrix according to the N input samples obtained by calculation.
[0145] In the above solution, the second calculation unit 1107 is specifically configured to perform a subtraction operation using the first preset calculation model to obtain the i-th input sample.
[0146] In the above solution, the second calculation unit 1107 is specifically configured to set the minuend of the subtraction operation to be equal to the sample corresponding to the i+1th position of the reference sample set, and set the subtrahend of the subtraction operation to be equal to the sample corresponding to the 0th position of the reference sample set.
[0147] In the above solution, the second acquisition unit 1104 is further configured to acquire a MIP prediction block of the current block according to the input sample matrix, where the MIP prediction block includes prediction samples of at least some pixel positions of the current block; The second processing unit 1105 is further configured to: perform a second filtering operation on the MIP prediction block to obtain a prediction block of the current block if either the width or height of the MIP prediction block is different from that of the current block; or set the prediction block of the current block to be equal to the MIP prediction block if both the width and height of the MIP prediction block are the same as those of the current block, where the prediction block includes prediction samples of all pixel positions of the current block.
[0148] In the above solution, the second obtaining unit 1104 is specifically configured to perform a clipping process on the predicted samples of the MIP predicted block to obtain a MIP predicted block of the current block.
[0149] In the above solution, referring to FIG. 11, the decoder 110 may further include a second judgment unit 1108, which is configured to judge whether to perform a transposition process on the MIP prediction block, and if the judgment result is "yes", to perform a transposition process on the prediction samples of the MIP prediction block, and determine the transposed MIP prediction block as the MIP prediction block of the current block.
[0150] In the above solution, the parsing unit 1106 is specifically configured to parse the bitstream to obtain a value of a transposition processing instruction flag; The second determining unit 1108 is specifically configured to determine whether to perform transposition processing on the MIP prediction block according to the value of the transposition processing instruction flag.
[0151] In the above solution, the second filtering process includes an upsampling filtering process or a low-pass filtering process.
[0152] In the above solution, the second obtaining unit 1104 is further configured to obtain a weight matrix, a shift factor and an offset factor corresponding to the current block; The second calculation unit 1107 is further configured to use a second preset calculation model to perform a matrix multiplication operation on the input sample matrix, the weight matrix, the shift factor and the offset factor to calculate the MIP prediction block.
[0153] In the above solution, the second determining unit 1101 is further configured to determine a horizontal upsampling factor and a vertical upsampling factor corresponding to the current block; The second calculation unit 1107 is further configured to determine a prediction value of a pixel position to be filled in the current block using a third preset calculation model according to the MIP prediction block, the horizontal upsampling factor, and the vertical upsampling factor, to obtain a prediction block of the current block, where the pixel position to be filled is a pixel position in the current block that is different from a pixel position of the MIP prediction block.
[0154] It is understood that in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and may be modular or non-modular. Furthermore, each constituent unit in this embodiment may be integrated into a single processing unit, or each unit may be used separately as a single unit, or two or more units may be integrated into a single unit. The integrated unit may be implemented in the form of hardware or a software functional module.
[0155] When the above-mentioned integrated unit is realized in the form of a software functional module and is not sold or used as a standalone product, it can be stored in a single computer-readable storage medium. Based on this, this embodiment provides a computer storage medium applied to the decoder 110, in which an image component prediction program is stored, and the image component prediction program realizes any of the methods described in the above embodiments when executed by a second processor.
[0156] Based on the above configuration of the decoder 110 and the computer storage medium, FIG. 12 shows a specific hardware structure of the decoder 110 according to an embodiment of the present invention. The decoder 110 may include a second communication interface 1201, a second memory 1202, and a second processor 1203, and each component is coupled via a second bus system 1204. It is understood that the second bus system 1204 is used to implement communication connections between these components. The second bus system 1204 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for clarity, all the various buses in FIG. 12 are referred to as the second bus system 1204.
[0157] The second communication interface 1201 is configured to receive and transmit signals in the process of transmitting and receiving information to other external elements; the second memory 1202 is configured to store a computer program executable by the second processor 1203; When the second processor 1203 executes the computer program, determining a set of neighboring reference samples of a current block and determining a predetermined sample corresponding to the current block, wherein the set of neighboring reference samples includes at least one reference sample; buffering the adjacent reference sample set and the preset parameter value to generate an input reference sample set; determining an input sample matrix using a first preset calculation model according to the input reference sample set; performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
[0158] Illustratively, as another embodiment, the second processor 1203 is further configured to perform any of the methods described in the above embodiments when executing the computer program.
[0159] It is understood that the second memory 1202 has the same hardware function as the first memory 1002, and the second processor 1203 has the same hardware function as the first processor 1003, which will not be described again here.
[0160] This embodiment provides a decoder, the decoder comprising: a second determination unit, a second buffer unit, and a second prediction unit, wherein the second determination unit is configured to determine a set of neighboring reference samples of a current block and determine predetermined parameter values corresponding to the current block; the second buffer unit is configured to buffer the set of neighboring reference samples and the predetermined parameter values to create an input reference sample set; the second determination unit is further configured to determine an input sample matrix using a first predetermined calculation model according to the input reference sample set; and the second prediction unit is configured to perform image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block. In this way, the process of deriving input samples for matrix multiplication is simplified, which not only unifies the process of deriving the input sample matrix, but also eliminates the need to determine the type of the current block, thereby reducing time and complexity and facilitating hardware implementation.
[0161] It should be noted that, in this application, the terms "comprises," "having," or other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a set of elements not only includes those elements, but also includes other elements not expressly listed or that are inherent to those processes, methods, articles, or apparatus. Unless otherwise limited, an element qualified by the term "comprises" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0162] The numbers of the above-mentioned embodiments of the present invention are not intended to indicate the superiority or inferiority of the embodiments, but are intended for the convenience of explanation.
[0163] The methods disclosed in the several method embodiments provided herein can be combined in any manner without conflict to obtain new method embodiments.
[0164] The technical features disclosed in the several product embodiments provided herein can be combined in any non-conflicting manner to obtain new product embodiments.
[0165] The features disclosed in any method or apparatus embodiment provided herein may be combined in any non-conflicting manner to obtain new method or apparatus embodiments.
[0166] The above description is merely a specific embodiment of the present application, and the scope of protection of the present application is not limited thereto. Any modifications or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be subject to the scope of protection of the claims. [Industrial Applicability]
[0167] According to the embodiment of the present application, a set of neighboring reference samples for a current block is determined, preset parameter values corresponding to the current block are determined, and the neighboring reference sample set and the preset parameter values are buffered to generate an input reference sample set. Then, an input sample matrix is determined using a first preset calculation model according to the input reference sample set, and image component prediction is performed on the current block according to the input sample matrix to obtain a predicted block for the current block. In this way, the technical solution according to the embodiment of the present application does not need to determine the type of the current block, thereby reducing calculation complexity and facilitating hardware implementation. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first preset calculation model, the process of deriving input samples for matrix multiplication is simplified, thereby unifying the process of deriving the input sample matrix. Furthermore, the technical solution according to the embodiment of the present application is independent of the type of the current block and can realize parallel processing, thereby reducing calculation complexity.
Claims
1. 1. A method for predicting an image component applied to a decoder, comprising: Obtaining a top edge reference sample adjacent to a top edge of a current block and a left edge reference sample adjacent to a left edge of the current block; determining a downsampled top-side reference sample by performing downsampling on the top-side reference sample, and determining a downsampled left-side reference sample by performing downsampling on the left-side reference sample; determining a set of adjacent reference samples based on the downsampled top-side reference samples and the downsampled left-side reference samples; performing a bit-shifting operation on a binary value corresponding to a number 1 to obtain the preset parameter value, wherein the number of shift bits is equal to a bit-depth value corresponding to the image component of the current block to be predicted minus 1; determining an input sample matrix based on the set of neighboring reference samples and the predetermined parameter values; performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
2. Determining a set of neighboring reference samples based on the downsampled top-side reference samples and the downsampled left-side reference samples includes: Parsing the bitstream to obtain a value of a transposition processing instruction flag; If the value of the transposition processing instruction flag is 1, storing the downsampled left-side reference sample before the downsampled top-side reference sample of the adjacent reference sample set; If the value of the transposition processing instruction flag is 0, storing the downsampled top-side reference sample before the downsampled left-side reference sample of the adjacent reference sample set. The image component prediction method of claim 1 .
3. determining an input sample matrix based on the neighboring reference sample set and the predetermined parameter values, determining a size parameter of the current block; If the value of the size parameter of the current block is equal to a first value or a second value, calculating an i-th input sample according to a sample corresponding to the i-th position and a sample corresponding to a 0-th position of the adjacent reference sample set, and calculating a 0-th input sample according to the preset parameter value and the sample corresponding to the 0-th position of the adjacent reference sample set; If the size parameter value of the current block is equal to a third value, calculating the i-th input sample according to the sample corresponding to the i+1-th position and the sample corresponding to the 0-th position of the neighboring reference sample set. The image component prediction method of claim 1 .
4. If both the width and height of the current block are equal to 4, the value of the size parameter is equal to the first value; If the width or height of the current block is equal to 4, or if both the width and height of the current block are equal to 8, the value of the size parameter is equal to a second value; Otherwise, the value of the size parameter is equal to the third value. The image component prediction method according to claim 3 .
5. The first value is equal to 0, The second value is equal to 1, The third value is equal to 2, The image component prediction method according to claim 4 .
6. performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block, determining a weight matrix corresponding to the current block; determining a predicted sample of the MIP block based on a weight matrix, an input sample matrix, a shift factor, an offset factor, and a sample corresponding to the 0th position of the set of neighboring reference samples; performing a clipping operation on the predicted samples of the MIP block to obtain a predicted MIP block; The image component prediction method of claim 1 .
7. The image component prediction method includes: If the value of the transposition processing instruction flag is equal to 1, performing a transposition processing on the predicted MIP block. The image component prediction method according to claim 6.
8. The image component prediction method includes: If the width or height of the MIP block is different from that of the current block, performing an upsampling process on the predicted MIP block to obtain a predicted block of the current block; If the width and height of the MIP block are the same as the current block, setting a predicted block of the current block to be equal to the predicted MIP block, wherein the predicted block includes predicted samples at all sample positions of the current block.
8. A method for predicting an image component according to claim 6 or 7.
9. 1. A method for predicting an image component applied to an encoder, comprising: Obtaining a top edge reference sample adjacent to a top edge of a current block and a left edge reference sample adjacent to a left edge of the current block; determining a downsampled top-side reference sample by performing downsampling on the top-side reference sample, and determining a downsampled left-side reference sample by performing downsampling on the left-side reference sample; determining a set of adjacent reference samples based on the downsampled top-side reference samples and the downsampled left-side reference samples; performing a bit-shifting operation on a binary value corresponding to a number 1 to obtain the preset parameter value, wherein the number of shift bits is equal to a bit-depth value corresponding to the image component of the current block to be predicted minus 1; determining an input sample matrix based on the set of neighboring reference samples and the predetermined parameter values; performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block.
10. Determining a set of neighboring reference samples based on the downsampled top-side reference samples and the downsampled left-side reference samples includes: determining a value of a transposition processing indication flag using a rate distortion optimization (RDO) scheme; If the value of the transposition processing instruction flag is 1, storing the downsampled left-side reference sample before the downsampled top-side reference sample of the adjacent reference sample set; If the value of the transposition processing instruction flag is 0, storing the downsampled top-side reference sample before the downsampled left-side reference sample of the adjacent reference sample set. The image component prediction method of claim 9.
11. determining an input sample matrix based on the neighboring reference sample set and the predetermined parameter values, determining a size parameter of the current block; If the value of the size parameter of the current block is equal to a first value or a second value, calculating an i-th input sample according to a sample corresponding to the i-th position and a sample corresponding to a 0-th position of the adjacent reference sample set, and calculating a 0-th input sample according to the preset parameter value and the sample corresponding to the 0-th position of the adjacent reference sample set; If the size parameter value of the current block is equal to a third value, calculating the i-th input sample according to the sample corresponding to the i+1-th position and the sample corresponding to the 0-th position of the neighboring reference sample set. The image component prediction method of claim 9.
12. If both the width and height of the current block are equal to 4, the value of the size parameter is equal to the first value; If the width or height of the current block is equal to 4, or if both the width and height of the current block are equal to 8, the value of the size parameter is equal to a second value; Otherwise, the value of the size parameter is equal to the third value. The image component prediction method of claim 11.
13. The first value is equal to 0, The second value is equal to 1, The third value is equal to 2, The image component prediction method of claim 12.
14. performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block, determining a weight matrix corresponding to the current block; determining a predicted sample of the MIP block based on a weight matrix, an input sample matrix, a shift factor, an offset factor, and a sample corresponding to the 0th position of the set of neighboring reference samples; performing a clipping operation on the predicted samples of the MIP block to obtain a predicted MIP block; The image component prediction method of claim 9.
15. The image component prediction method includes: If the value of the transposition processing instruction flag is equal to 1, performing a transposition processing on the predicted MIP block. The image component prediction method of claim 14.
16. The image component prediction method includes: If the width or height of the MIP block is different from that of the current block, performing an upsampling process on the predicted MIP block to obtain a predicted block of the current block; If the width and height of the MIP block are the same as the current block, setting a predicted block of the current block to be equal to the predicted MIP block, wherein the predicted block includes predicted samples at all sample positions of the current block.
16. A method for predicting an image component according to claim 14 or 15.
17. 1. An encoder comprising: a first memory and a first processor; the first memory is configured to store a computer program executable by the first processor; An encoder, wherein the first processor is configured to perform the method of any one of claims 9 to 16 when executing the computer program.
18. A decoder comprising: a second memory and a second processor; the second memory is configured to store a computer program executable by the second processor; A decoder, wherein the second processor is configured to perform the method of any one of claims 1 to 8 when executing the computer program.
19. A computer storage medium having computer programs / instructions and bitstreams stored thereon, comprising: A computer storage medium, the computer program / instructions, when executed by a processor, performing the steps of the method according to any one of claims 9 to 16 to generate the bitstream.
20. A computer storage medium having computer programs / instructions and bitstreams stored thereon, comprising: A computer storage medium, the computer program / instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 8, thereby decoding the bitstream to generate video or images.