Image component prediction method, encoder, decoder and storage medium
The image component prediction method simplifies matrix multiplication derivation by using a preset calculation model on buffered reference samples, reducing complexity and enabling parallel processing in H.266/VVC video coding.
Patent Information
- Application Number
- JP2024165178
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2039-12-19
AI Technical Summary
The complexity and inefficiency of matrix-based intra prediction in H.266/VVC video coding, particularly due to the need to determine different numbers of prediction modes for various block types, hinder parallel processing and increase computational complexity.
An image component prediction method that determines a set of adjacent reference samples and a preset parameter value, buffers them to create an input reference sample set, and uses a preset calculation model to derive an input sample matrix for image component prediction, independent of block type, facilitating parallel processing.
This approach simplifies the derivation process for matrix multiplication, reduces computational complexity, and enables parallel processing, thereby enhancing the efficiency of video encoding and decoding.
Smart Images

Figure 2024178354000001_ABST
Abstract
Description
[Technical field]
[0001] The present application relates to the field of image processing technology, and in particular to an image component prediction method, an encoder, a decoder, and a storage medium. [Background technology]
[0002] With the increasing demands of people for video display quality, 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 the rapid development of video applications, so 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] Currently, H.266 / VVC adopts a 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, so the derivation process is complicated, not suitable for parallel processing, and 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, which 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, embodiments of the present application provide an image component prediction method applied to an encoder, the method comprising: determining a neighboring reference sample set of a current block and determining a preset sample corresponding to the current block, the neighboring reference sample set including 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, embodiments of the present application provide an image component prediction method for application to a decoder, the method comprising: determining a neighboring reference sample set of a current block and determining a preset sample corresponding to the current block, the neighboring reference sample set including 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 application provides an encoder, the encoder comprising: a first determination unit, a first buffer unit, and a first prediction unit, where: 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 predicted block of the current block.
[0009] According to a fourth aspect, embodiments of the present application 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, when executing the computer program, to perform the method according to the first aspect.
[0010] According to a fifth aspect, an embodiment of the present application provides a decoder, the decoder comprising: a second determination unit, a second buffer unit, and a second prediction unit, where: 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 predicted 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, when executing the computer program, perform the method according to the second aspect.
[0012] According to a seventh aspect, an embodiment of the present application provides a computer storage medium having stored thereon an image component prediction program, the image component prediction program, when executed by a first processor, realizing a method according to the first aspect, or, when executed by a second processor, realizing a method according to the second aspect. Effect 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 neighboring reference sample set of a current block is determined, a preset parameter value corresponding to the current block is determined, and the neighboring reference sample set and the preset parameter value are buffered to generate an input reference sample set, and 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 of the current block. In this way, the technical solution of the present embodiment does not need to determine the type of the current block, so that the calculation complexity is reduced and the hardware implementation is easy. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first preset calculation model, the derivation process of the input sample for matrix multiplication is simplified, and thus the derivation process of the input sample matrix is unified. Furthermore, the technical solution of the present embodiment can realize parallel processing without depending on the type of the current block, so that the calculation complexity can also be reduced. [Brief description of the drawings]
[0014] [Figure 1] 1 is a block diagram showing the configuration of a video encoding system according to an embodiment of the present invention; [Diagram 2] FIG. 1 is a block diagram showing the configuration of a video decoding system according to an embodiment of the present invention. [Diagram 3] 1 is an exemplary flowchart of an image component prediction method according to an embodiment of the present disclosure. [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. 2 is a schematic structural diagram of a buffer filling according to a related technical solution; [Figure 5B] FIG. 2 is a schematic structural diagram of another buffer filling according to a related technical solution; [Figure 5C]FIG. 2 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 of determining an input sample according to a related technical solution; [Figure 6B] FIG. 11 is another schematic structural diagram of determining input samples according to an embodiment of the present application; [Figure 7] 4 is an exemplary flowchart of another image component prediction method according to an embodiment of the present disclosure. [Figure 8] FIG. 2 is a schematic structural diagram illustrating generating a predicted value according to an embodiment of the present application; [Figure 9] FIG. 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 application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] In order to more fully understand the features and technical contents of the present embodiment, the present embodiment will be described in detail below with reference to the 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 YCbCr format or 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, the input data predicted by MIP may include information such as the reference pixels in the upper row and the reference pixels in the left column of the current block, the MIP prediction mode (which may be represented by modeId) applied to the current block, the width and height information of the current block and whether it needs to be replaced, and the output data predicted by MIP may include the 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, the predicted value of the current block can be obtained.
[0019] However, in the MIP prediction process, the step of creating input samples has a strong correlation with the type of luminance block (which can be represented by mipSizeId), that is, different input sample derivation methods are used to obtain the input sample matrix according to different types of luminance blocks, so the derivation process is complicated, and in particular, when the type of luminance block (mipSizeId) is 0 or 1, the derivation methods of p[0] and p[x] of the input sample matrix are different, so it is not suitable for parallel processing. Furthermore, with various types of luminance blocks, various numbers of MIP prediction modes are added in the intra luminance prediction process, and when luminance prediction is performed for each MIP prediction mode, it is necessary to perform a determination of the type of luminance block once for each MIP prediction mode, which also increases the complexity.
[0020] The present embodiment provides an image component prediction method, and according to the technical solution of the present application, a neighboring reference sample set of a current block is determined, and a preset parameter value corresponding to the current block is determined, where the neighboring reference sample set includes at least one reference sample, and the neighboring reference sample set and the preset parameter value are buffered to generate an input reference sample set, and then an input sample matrix is determined according to the input reference sample set using a first preset calculation model, and image component prediction is performed on the current block according to the input sample matrix to obtain a predicted block of the current block. In this way, the technical solution of the present embodiment does not need to determine the type of the current block, so that the calculation complexity is reduced and the hardware implementation is easy. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first preset calculation model, the derivation process of the input sample for matrix multiplication is simplified, and thus the derivation process of the input sample matrix is unified. Furthermore, the technical solution of the present embodiment can realize parallel processing without depending on the type of the current block, so that the calculation complexity can also be reduced.
[0021] Hereinafter, each embodiment of the present application 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 splitting 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 transforming the residual information from a 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 used to code 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 relative 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. Based on the vector, the motion of the video coding block can be estimated, and then the motion compensation unit 104 can 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 coding unit 109. And, the motion estimation unit 105 can also send the motion vector data determined by the calculation to the coding unit 109. And, 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 can be removed by the filter control analysis unit 107 and the filtering unit 108, and then the reconstructed residual block is added to one prediction block in a frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The coding unit 109 is configured to code various coding parameters and quantized transform coefficients, and in a CABAC based coding algorithm, the context content is based on neighboring coding blocks and can be used to code 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 picture is coded, 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 configuration of a video decoding system according to an embodiment of the present application 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, etc., where the decoding unit 201 can realize header information decoding and CABAC decoding, and the filtering unit 205 can realize deblocking filtering and SAO filtering. After the input video signal is subjected to the encoding process shown in FIG. 1, 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 can be processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain. The intra prediction unit 203 may be configured to generate prediction data of the current video decoded block based on the determined intra prediction mode and data of the previous decoded block from the current frame or image. The motion compensation unit 204 may determine prediction information of the video decoded block by analyzing the motion vector and other related syntax elements, and generate a prediction block of the currently decoded video decoded 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 of the decoded video signal are removed by the filtering unit 205, thereby improving the video quality. The decoded video block is then stored in the decoded image buffer unit 206, which is configured to store a reference image used for subsequent intra prediction or motion compensation, and output a video signal, i.e., to obtain a restored original video signal. This can be done.
[0024] The image component prediction method according to the embodiment of the present application 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 embodiment of the present application 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 embodiment of the present application 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 current encoding 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 current decoded block in intra prediction.
[0025] Based on the above exemplary application scenario of Fig. 1 or Fig. 2, an exemplary flow chart 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 neighboring reference sample set of a current block is determined, and a preset parameter value corresponding to the current block is determined, where the neighboring reference sample set 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 currently to be subjected to the first image component, the second image component, or the third image component prediction.
[0027] Here, assuming that the current block performs a 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 is also called a luma block, or assuming that the current block performs a 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 is also called a chroma block.
[0028] It should further be 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 adjacent reference sample set may be obtained by filtering reference pixels in the left adjacent region and upper adjacent region of the current block, or may be obtained by filtering reference pixels in the left adjacent region and bottom-left adjacent region of the current block, or may be obtained by filtering reference pixels in the upper adjacent region and upper right adjacent region of the current block, and the present embodiment is not particularly limited thereto.
[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; 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 (referred to as the top row), the top right edge (referred to as the top row), the left edge (referred to as the left column), or the bottom left edge (referred to as 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 the neighboring reference sample set 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; 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 edge and the left edge of the current block, and the present embodiment is not particularly limited thereto.
[0033] Further, in some embodiments, in step S301, determining the neighboring reference sample set of the current block includes: performing 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; and constituting 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 adjacent region and the upper adjacent 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 adjacent region is a valid region and the upper adjacent 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 adjacent region is an invalid region and the upper adjacent 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 embodiment of the present application is not particularly limited thereto.
[0036] In practical applications, when predicting a current block, the upper block and the left block of the current block have already been coded. The reference pixels according to the MIP technique may be the reconstructed values of the reference pixels adjacent to the upper row of the current block and the reconstructed values of the 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 the reference pixels corresponding to the upper edge and the reference pixels corresponding to the left edge of the current block. FIG. 4A shows a schematic diagram of the reference pixel position according to an embodiment of the present application. In FIG. 4A, both the left adjacent region and the upper adjacent region are valid regions, where the reference pixels corresponding to the upper edge of the current block are pixels filled with gray and can be represented by refT, and the reference pixels corresponding to the left edge of the current block are pixels filled with diagonal lines and can be represented by refL, where the reference pixels of the current block include refT and refL, and the adjacent reference sample set is obtained by filtering refT and refL. It should be particularly noted that the invalid positions (such as the border of the image) can be filled in the same way as the reference pixels are obtained in the conventional intra prediction technique.
[0037] In the case of MIP technology, the current block can be classified into three types according to the size of the current block, and the type of the current block can be recorded in mipSizeId. Specifically, if the type of the current block is different, the number of samples included in the adjacent reference sample set and the number of output samples for matrix multiplication are different.
[0038] Suppose the current block is a 4x4 image block, mipSizeId=0, its input reference pixel set contains 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, then the input reference pixel set contains 4 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 contains two pixel points selected from each side, the number of input sample points for matrix multiplication is 7, and an 8×4 MIP prediction block is output.
[0041] In this way, 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 for the number of input sample points, thereby obtaining a set of adjacent reference samples.
[0042] Moreover, 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 from the obtained reference pixels that corresponds to the sampling position, and creating the set of adjacent reference samples with the selected parameter sample.
[0043] Further, 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 edge and left edge) of the current block respectively, 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 formula (1). Furthermore, in 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 formula (2). Here, S can be replaced by W and H, respectively, where W represents the upper edge and H represents the left edge.
number
number
[0046] After the downsampling process according to Equation (1) and Equation (2), two parts of reference samples can be obtained, as shown in Fig. 4B, including the top-edge reference sample redT obtained by performing the downsampling process on the top-edge reference pixel refT of the current block, and the left-edge reference sample redL obtained by performing the downsampling process on the left-edge reference pixel refL of the current block. In Fig. 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, and thus the adjacent 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 a 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 manner, after obtaining the neighboring reference sample set and the preset parameter values of the current block, they can be buffered to generate an 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 an input reference sample set is obtained by adding one bit at the end of the initial buffer to buffer the preset parameter value, 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 value using one data unit after the initial input reference sample set to obtain the input reference sample set.
[0054] Furthermore, in the case of creating an initial input reference sample set, the creation method on the encoder side is different from that on the decoder side, and this is mainly related 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 an 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 a reference sample corresponding to an upper edge of the current block of the adjacent reference sample set is stored before a reference sample corresponding to a 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 such that a reference sample corresponding to an upper edge of a current block of the adjacent reference sample set is stored after a reference sample corresponding to a 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 respectively 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 side of the adjacent reference sample set can be stored after the reference sample corresponding to the left side of the adjacent reference sample set, or the reference sample corresponding to the left side of the adjacent reference sample set can be stored before the reference sample corresponding to the upper side of the adjacent reference sample set, that is, the transposition 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 side of the adjacent reference sample set can be stored before the reference sample corresponding to the left side of the adjacent reference sample set, or the reference sample corresponding to the left side of the adjacent reference sample set can be stored after the reference sample corresponding to the upper side of the adjacent reference sample set, that is, the transposition needs not to be performed.
[0057] It should be further noted that the encoder needs to write the determined transposition flag value into the bitstream to facilitate the subsequent analysis process at the decoder.
[0058] When applied to a decoder side, in some embodiments, buffering the neighboring reference sample sets to obtain an 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 a reference sample corresponding to an upper edge of the current block of the adjacent reference sample set is stored before a reference sample corresponding to a 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 such that a reference sample corresponding to an upper edge of a current block of the adjacent reference sample set is stored after a reference sample corresponding to a 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 is noted that on 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 the 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 stored in pTemp first, and then all reference pixels redL corresponding to the left edge are stored 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. Since 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 the reference pixels redL corresponding to the left side are stored in pTemp first, and then all the reference pixels redT corresponding to the top side are stored from the bit immediately following all the stored redL. As shown in FIG. 5B, if we still take 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. Since all the 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, the 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 Fig. 5C. In Fig. 5C, still taking the current block of 4x4 as an example, 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 further 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 be used as P[0], and then the sample at the 0th position of pTemp should be subtracted from the sample corresponding to each other position to be used as P[x], specifically:
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 of the other positions and stored in the previous position, specifically as follows:
number
[0066] As shown in Figure 6A, take the current block of 4x4 as an example, the initial buffer stores 4 values, but the number of input samples is 4, in this case, the 4 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 an input sample matrix of 1x4. However, in the current solution, the derivation process of the input sample for matrix multiplication needs to be related to the type mipSizeId of the current block, which makes the derivation process cumbersome and somewhat complicated, and also, when mipSizeId=0 or 1, the calculation formulas of p[0] and p[i] are different, which is not suitable for parallel processing.
[0067] In the present 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 the input sample derivation process of matrix multiplication can be unified, and the input sample can be determined only 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 a position (i+1) of the input reference sample set (i is a positive integer greater than or equal to 0 and less than N) and a sample corresponding to a position (0), 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] Moreover, in some embodiments, calculating the i-th input sample using the first preset calculation model further comprises: The method may include performing a subtraction operation using the first preset computation 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 equal to the sample corresponding to a 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), the number of input samples is the number of elements included in the input sample matrix, 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, and thus, after obtaining N input samples, the input sample matrix can be constructed. As shown in FIG. 6B, still taking the current block of 4x4 as an example, five values are stored in the input reference sample set, but the number of input samples is 4. 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], 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 prediction value of at least one pixel of the MIP prediction block can be first calculated, and then clipping, transposition, upsampling, etc. can be sequentially performed to finally obtain a prediction block of the current block.
[0075] It is further noted that, assuming that 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 may be obtained, where the luma prediction block 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 may be obtained, where the chroma prediction block provides a chroma prediction value for at least one pixel, and the embodiment of the present application 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, a weight matrix (represented by mWeight), a shift factor (represented by sW) and an offset factor (represented by fO) corresponding to the current block can also be obtained, and then, as shown in FIG. 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 pre-set calculation model, thereby obtaining a 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 pre-established 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] In addition, in the encoder or decoder, a shift factor table as shown in Table 1 and an offset factor table as shown in Table 2 are also pre-established. The shift factor table and the offset factor table are also stored in the encoder or decoder. In this way, the shift factor sW and offset factor fO that the current block needs to use 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, and 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 to perform a transposition process on the MIP prediction block.
[0088] In step S404, if the determination result is "YES", 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.
[0089] In step S405, if the result of the determination 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 includes: 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 scheme; determining to perform a transposition operation on the MIP prediction block if the first cost value is less than the second cost value; or and determining 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.
[0092] When applied to the decoder side, in some embodiments, in step S403, determining whether to perform a transposition operation on the MIP prediction block includes: Parsing the bitstream to obtain a value of a transposition processing instruction flag; and determining whether to perform a transposition process on the MIP prediction block according to a value of the transposition process instruction flag.
[0093] It should be noted that the transposition instruction flag is represented by isTransposed, and it can be determined whether it is necessary to perform a transposition operation on the MIP prediction block according to the value of isTransposed. Specifically, the encoder side can set the value of isTransposed to 1 if the first cost value is less than the second cost value, and determine that it is necessary to perform a transposition operation on the MIP prediction block in this case; or set the value of isTransposed to 0 if the first cost value is equal to or greater than the second cost value, and determine that it is not necessary to perform a transposition operation on the MIP prediction block in this case. The decoder side can obtain the value of the transposition instruction flag by analyzing the bitstream, and determine that it is necessary to perform a transposition operation on the MIP prediction block if the value of isTransposed is analyzed to 1, or determine that it is not necessary to perform a transposition operation on the MIP prediction block if the value of isTransposed is analyzed to 0.
[0094] More specifically, if isTransposed is 0, it indicates that there is no need to perform a transposition process on the MIP predicted block, in which case the MIP predicted block predMip can be directly used to perform the subsequent step (i.e., step S406) to determine whether the size of the MIP predicted 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 predicted block, in which case the transposition process can be performed according to the following equation:
number
[0095] In this way, after performing the transposition process on the MIP prediction block based on equation (7), 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 MIP prediction block only includes two kinds of sizes: 4×4 MIP prediction block and 8×8 MIP prediction block, so the size of the current block may be the same as or different from the size of the MIP prediction block, that is, the current block may not be filled with samples corresponding to the MIP prediction block, so that 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, it indicates that when the size of the MIP prediction block is the same as the size of the current block, i.e., when the width and height of the MIP prediction block are both the same as the current block, there is no need to perform an upsampling process on the MIP prediction block, in this case, the current block can be directly filled with the MIP prediction block, that is, there is no empty pixel point in the current block after filling, 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] represents the position coordinates of a pixel point, x represents the horizontal direction, 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 prediction block. In this way, based on formula (8), the MIP prediction block predMip[x][y] can be directly used as the prediction 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 includes: 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 first fills the position predSamples[x][-1] corresponding to the upper row of the current block with the top edge reference pixel refT, and then fills 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), 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 pixels and the predicted values to fill the corresponding positions), first perform horizontal interpolation and then vertical interpolation, so as to finally obtain the upsampling result predSamples[x][y] of the current block, where predSamples[x][y] is the predicted value of the current block obtained according to the MIP prediction mode.
[0109] In the present embodiment, when the image component prediction method is applied to the encoder side, the image component prediction method can be used to calculate a predicted value of at least one pixel of the current block, and then a residual corresponding to at least one pixel can be calculated according to the difference between the actual value and the predicted value of at least one pixel of the current block, and the calculated residual can be written into the bitstream. In addition, after obtaining the 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 the 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. In addition, the image component prediction method can also be used to calculate a predicted value of at least one pixel of the current block, and then a residual corresponding to at least one pixel can be directly obtained by analyzing the bitstream, and further, an actual value of at least one pixel of the current block can be obtained according to the predicted value and the residual of at least one pixel of the current block.
[0110] This embodiment provides an image component prediction method applied to an encoder or a decoder. According to the image component prediction method, a neighboring reference sample set of a current block is determined, and a preset parameter value corresponding to the current block is determined, where the neighboring reference sample set includes at least one reference sample, and the neighboring reference sample set and the preset parameter value are buffered to generate an input reference sample set, and 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 of 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, so that the calculation complexity is reduced and the hardware implementation is easy. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first preset calculation model, the derivation process of the input sample for matrix multiplication is simplified, and thus the derivation process of the input sample matrix is unified. Furthermore, the technical solution according to the embodiment of the present application can realize parallel processing without depending on the type of the current block, so that the calculation complexity can also be reduced.
[0111] Based on the same inventive concept as the above embodiment, referring to FIG. 9, a schematic structural diagram of an encoder 90 according to the embodiment of the present application is shown. As shown in FIG. 9, the encoder 90 includes a first determination unit 901, a first buffer unit 902, and a first prediction unit 903, in which: 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 predicted 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, the first acquisition unit 904 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, the first processing unit 905 being 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 acquisition unit 904 is further configured to acquire 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 buffer the pre-set 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 a position of the i+1-th (i is a positive integer greater than or equal to 0 and less than N) position of the input reference sample set and a sample corresponding to a position of the 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 equal to the sample corresponding to the i+1th position of the reference sample set, and set the subtrahend of the subtraction operation 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, the MIP prediction block including 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 and 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 prediction sample of the MIP prediction block to obtain a MIP prediction 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 sample 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 respectively calculate 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 using a rate-distortion optimization scheme; The first judgment unit 907 is specifically configured to determine to perform a transposition operation on the MIP prediction block when 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 when 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 weighting matrix, the shift factor and the offset factor to calculate the MIP prediction block.
[0127] In the above solution, when the second filtering process is an upsampling filtering process, 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 different from a pixel position of the MIP prediction block.
[0128] It can be understood that in the present 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 of course be modular or non-modular. In addition, each constituent unit in the present embodiment may be integrated into one processing unit, each unit may be used separately as one unit, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software functional module.
[0129] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in one computer-readable storage medium. Based on this understanding, the essential part of the technical solution of this embodiment, i.e., the 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 one storage medium and includes some instructions for causing a computer device (which may be a personal computer, a server, or 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 codes, such as U disks, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0130] Thus, 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, the image component prediction program, when executed by a first processor, realizing 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 realize 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 the sake of clarity, all the various buses are represented 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 and from 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 neighboring reference sample set of a current block and determining a preset sample corresponding to the current block, the neighboring reference sample set including 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 the first memory 1002 in the present embodiment may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Here, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a 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, for example, 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-mentioned method may be performed through an instruction in the form of an integrated logic circuit of hardware or software in the first processor 1003. The above-mentioned 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 may be realized or executed. The general-purpose processor may be a microprocessor, any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being 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 familiar to those skilled 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 the information in the first memory 1002 and combines with its hardware to complete the steps of the method.
[0134] It can be 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 in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic unit 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 a memory and executed by a 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 includes a first determining unit, a first buffer unit, and a first predicting unit, where the first determining unit is configured to determine a neighboring reference sample set of a current block and determine a preset parameter value corresponding to the current block, the first buffer unit is configured to buffer the neighboring reference sample set and the preset parameter value to create an input reference sample set, the first determining unit is further configured to use a first preset calculation model to determine an input sample matrix according to the input reference sample set, and the first predicting 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 derivation process of the input sample of matrix multiplication is simplified, which not only unifies the derivation process of the input sample matrix, but also does not need to determine the type of the current block, which reduces time and complexity, and makes it easier to implement hardware.
[0137] Based on the same inventive concept as the above embodiment, referring to FIG. 11, a schematic structural diagram of a decoder 110 according to the embodiment of the present application is shown. As shown in FIG. 11, the decoder 110 includes a second determination unit 1101, a second buffer unit 1102, and a second prediction unit 1103, in which: 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, and the second acquisition unit 1104 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 acquisition unit 1104 is further configured to acquire 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 binary digit 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 use one data unit after the initial input reference sample set to buffer the pre-set parameter value 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, the parsing unit 1106 being configured to parse the bitstream to obtain a value of a 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 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.
[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 according to a sample corresponding to a position of the i+1-th (i is a positive integer greater than or equal to 0 and less than N) position of the input reference sample set and a sample corresponding to a position of the 0-th position of the input reference sample set using a first preset calculation model, 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 obtain a MIP prediction block of the current block according to the input sample matrix, the MIP prediction block including 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 and 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 prediction sample of the MIP prediction block to obtain a MIP prediction 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 sample 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 judgment unit 1108 is specifically configured to judge whether to perform a transposition process on the MIP prediction block according to the value of the transposition process indication 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 weighting 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 different from a pixel position of the MIP prediction block.
[0154] It can be 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 of course be modular or non-modular. In addition, each constituent unit in this embodiment may be integrated into one processing unit, each unit may be used separately as one unit, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software function 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 one computer-readable storage medium. On the basis of the above, 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 method described in the above embodiment when executed by a second processor.
[0156] Based on the above configuration of the decoder 110 and the computer storage medium, referring to FIG. 12, a specific hardware structure of the decoder 110 according to the embodiment of the present application is shown, the decoder 110 may include a second communication interface 1201, a second memory 1202, and a second processor 1203, and each component is coupled through a second bus system 1204. It can be understood that the second bus system 1204 is used to realize the connection communication 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 the sake of clarity, all the various buses are represented as the second bus system 1204 in FIG. 12.
[0157] The second communication interface 1201 is configured to receive and transmit signals in the process of transmitting and receiving information to and from other external elements; The second memory 1202 is configured to store a computer program executable by the second processor 1203; When executing the computer program, the second processor 1203 determining a neighboring reference sample set of a current block and determining a preset sample corresponding to the current block, the neighboring reference sample set including 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 can be 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 repeatedly here.
[0160] This embodiment provides a decoder, which includes a second determination unit, a second buffer unit, and a second prediction unit, where the second determination unit is configured to determine a neighboring reference sample set of a current block and determine a preset parameter value corresponding to the current block, the second buffer unit is configured to buffer the neighboring reference sample set and the preset parameter value to create an input reference sample set, the second determination unit is further configured to use a first preset calculation model to determine an input sample matrix 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 derivation process of the input sample for matrix multiplication is simplified, which not only unifies the derivation process of the input sample matrix, but also reduces time and complexity and makes it easier to implement hardware because there is no need to determine the type of the current block.
[0161] It should be noted that, in this application, the terms "comprises," "has," 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 specifically limited, an element qualified with the term "comprises" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the 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 convenience of explanation.
[0163] The methods disclosed in the several method embodiments provided herein may be combined in any manner without conflict to obtain new method embodiments.
[0164] The technical features disclosed in the several product embodiments provided in this application may 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 conceived by a person 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 shall be subject to the scope of protection of the claims. [Industrial Applicability]
[0167] According to the embodiment of the present application, a neighboring reference sample set of a current block is determined, a preset parameter value corresponding to the current block is determined, and the neighboring reference sample set and the preset parameter value are buffered to generate an input reference sample set, and 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 of 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, so that the calculation complexity is reduced and the hardware implementation is easy. Furthermore, since the input sample matrix can be determined according to the input reference sample set and the first preset calculation model, the derivation process of the input sample for matrix multiplication is simplified, and thus the derivation process of the input sample matrix is unified. Furthermore, the technical solution of the embodiment of the present application can realize parallel processing without depending on the type of the current block, so that the calculation complexity can also be reduced.
Claims
1. 1. A method for image component prediction applied to an encoder, comprising: determining a set of neighboring reference samples of a current block and determining a preset parameter value corresponding to the current block, the set of neighboring reference samples including 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.
2. 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, the at least one edge of the current block including at least one of a top edge, a top right edge, a left edge, and a bottom left edge; determining a set of neighboring reference samples of the current block according to the obtained reference pixels; The method of claim 1 .
3. Determining a set of neighboring reference samples of the current block according to the obtained reference pixels includes: performing 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; and constructing a set of neighboring reference samples of the current block according to the determined reference samples. The image component prediction method according to claim 2 .
4. The first filtering process includes a downsampling filtering process or a low-pass filtering process. The image component prediction method according to claim 3 .
5. Determining a 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 minus one binary digit to obtain the preset parameter value. The method of claim 1 .
6. Buffering the adjacent 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 value using one data unit after the initial input reference sample set to obtain the input reference sample set. The method of claim 1 .
7. Buffering the adjacent reference sample sets to obtain an initial input reference sample set includes: determining a value of a transposition instruction flag using a rate distortion optimization (RDO) scheme; If the value of the transposition processing instruction flag is 0, store the reference samples in a buffer such that a reference sample corresponding to an upper edge of the current block of the adjacent reference sample set is stored before a reference sample corresponding to a 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, storing the reference samples in a buffer such that a reference sample corresponding to an upper side of the current block of the adjacent reference sample set is stored after a reference sample corresponding to a left side 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. The image component prediction method according to claim 6.
8. Determining an input sample matrix using a first preset computation 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) and a sample corresponding to a 0-th position of the input reference sample set, where N represents the number of elements included in the input sample matrix; constructing said input sample matrix according to the N input samples obtained by the calculation; The method of claim 1 .
9. Calculating the i-th input sample using the first preset calculation model includes: performing a subtraction operation using the first preset computation model to obtain the i-th input sample; The image component prediction method according to claim 8.
10. The image component prediction method includes: setting a minuend of said subtraction operation equal to the sample corresponding to the i+1 th position of said set of reference samples; setting a subtrahend of the subtraction operation equal to a sample corresponding to a 0th position of the reference sample set. The image component prediction method according to claim 9.
11. performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block, Obtaining a matrix-based intra prediction (MIP) prediction block of the current block according to the input sample matrix, the MIP prediction block including prediction samples of at least some pixel positions of the current block; If any one of the width and height of the MIP prediction block is different from that of the current block, performing a second filtering process on the MIP prediction block to obtain a prediction block of the current block; or if both the width and height of the MIP prediction block are the same as the current block, setting a prediction block of the current block to be equal to the MIP prediction block, where the prediction block includes prediction samples for all pixel positions of the current block. Method for predicting an image component according to any one of the preceding claims.
12. Obtaining a MIP predicted block of the current block according to the input sample matrix includes: performing a clipping process on predicted samples of the MIP predicted block to obtain a MIP predicted block of the current block; The method of claim 11 .
13. Obtaining a MIP predicted block of the current block according to the input sample matrix includes: determining whether to perform a transposition process on the MIP prediction block; If the judgment result is "yes", performing a transposition process on the prediction samples of the MIP prediction block, and determining the transposed MIP prediction block as the MIP prediction block of the current block. The method of claim 11 .
14. The determination of whether to perform a transposition process on the MIP prediction block includes: Calculating a first cost value when a transposition process is performed on the MIP prediction block using a rate-distortion optimization (RDO) scheme, and a second cost value when a transposition process is not performed on the MIP prediction block; determining to perform a transposition operation on the MIP prediction block if the first cost value is less than the second cost value; or determining 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. The image component prediction method of claim 13.
15. The second filtering process includes an upsampling filtering process or a low-pass filtering process. The method of claim 11 .
16. Obtaining a MIP predicted 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. The method of claim 11 .
17. When the second filtering process is an upsampling filtering process, the image component prediction method further comprises: determining a horizontal upsampling factor and a vertical upsampling factor corresponding to the current block; and determining a prediction value of a pixel position to be filled of the current block according to the MIP prediction block, the horizontal upsampling factor, and the vertical upsampling factor using a third preset calculation model 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. The image component prediction method of claim 15.
18. 1. A method for image component prediction applied to a decoder, comprising: determining a set of neighboring reference samples of a current block and determining a preset parameter value corresponding to the current block, the set of neighboring reference samples including 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.
19. 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; determining a set of neighboring reference samples of the current block according to the obtained reference pixels; 20. The method of claim 18, wherein the image component prediction method is a method for predicting an image component.
20. Determining a set of neighboring reference samples of the current block according to the obtained reference pixels includes: performing 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; and constructing a set of neighboring reference samples of the current block according to the determined reference samples.
20. The method of claim 19, wherein the image component prediction method is a method for predicting an image component.
21. The first filtering process includes a downsampling filtering process or a low-pass filtering process.
21. The method of claim 20.
22. Determining a 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 minus one binary digit to obtain the preset parameter value.
20. The method of claim 18, wherein the image component prediction method is a method for predicting an image component.
23. Buffering the adjacent 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 value using one data unit after the initial input reference sample set to obtain the input reference sample set.
20. The method of claim 18, wherein the image component prediction method is a method for predicting an image component.
24. Buffering the adjacent reference sample sets to obtain an initial input reference sample set includes: 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 a reference sample corresponding to an upper edge of the current block of the adjacent reference sample set is stored before a reference sample corresponding to a 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, storing the reference samples in a buffer such that a reference sample corresponding to an upper side of the current block of the adjacent reference sample set is stored after a reference sample corresponding to a left side 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.
24. The image component prediction method of claim 23.
25. Determining an input sample matrix using a first preset computation 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) and a sample corresponding to a 0-th position of the input reference sample set, where N represents the number of elements included in the input sample matrix; constructing said input sample matrix according to the N input samples obtained by the calculation; 20. The method of claim 18, wherein the image component prediction method is a method for predicting an image component.
26. Calculating the i-th input sample using the first preset calculation model includes: performing a subtraction operation using the first preset computation model to obtain the i-th input sample; 26. The method of claim 25.
27. The image component prediction method includes: setting a minuend of said subtraction operation equal to the sample corresponding to the i+1 th position of said set of reference samples; setting a subtrahend of the subtraction operation equal to a sample corresponding to a 0th position of the reference sample set.
27. The method of claim 26, wherein the image component prediction method is
28. performing image component prediction on the current block according to the input sample matrix to obtain a predicted block of the current block, Obtaining a MIP prediction block of the current block according to the input sample matrix, the MIP prediction block including prediction samples of at least some pixel positions of the current block; If any one of the width and height of the MIP prediction block is different from that of the current block, performing a second filtering process on the MIP prediction block to obtain a prediction block of the current block; or if both the width and height of the MIP prediction block are the same as the current block, setting a prediction block of the current block to be equal to the MIP prediction block, where the prediction block includes prediction samples for all pixel positions of the current block. A method for predicting an image component according to any one of claims 18 to 27.
29. Obtaining a MIP predicted block of the current block according to the input sample matrix includes: performing a clipping process on predicted samples of the MIP predicted block to obtain a MIP predicted block of the current block; 29. The method of claim 28.
30. Obtaining a MIP predicted block of the current block according to the input sample matrix includes: determining whether to perform a transposition process on the MIP prediction block; If the judgment result is "yes", performing a transposition process on the prediction samples of the MIP prediction block, and determining the transposed MIP prediction block as the MIP prediction block of the current block.
29. The method of claim 28.
31. The determination of whether to perform a transposition process on the MIP prediction block includes: Parsing the bitstream to obtain a value of a transposition processing instruction flag; and determining whether to perform a transposition process on the MIP prediction block according to a value of the transposition process instruction flag.
31. The image component prediction method of claim 30.
32. The second filtering process includes an upsampling filtering process or a low-pass filtering process.
29. The method of claim 28.
33. Obtaining a MIP predicted 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.
29. The method of claim 28.
34. When the second filtering process is an upsampling filtering process, the image component prediction method further comprises: determining a horizontal upsampling factor and a vertical upsampling factor corresponding to the current block; and determining a prediction value of a pixel position to be filled of the current block according to the MIP prediction block, the horizontal upsampling factor, and the vertical upsampling factor using a third preset calculation model 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.
33. The method of claim 32.
35. 1. An encoder comprising: A first determination unit, a first buffer unit, and a first prediction unit, The first determining unit 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; the first buffer unit is 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 encoder, wherein the first prediction unit is configured to perform image component prediction on a current block according to the input sample matrix to obtain a predicted block of the current block.
36. 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; The encoder, wherein the first processor, when executing the computer program, is configured to perform the method of any one of claims 1 to 17.
37. A decoder comprising: A second determination unit, a second buffer unit, and a second prediction unit, The second determining unit 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; the second buffer unit is 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 a current block according to the input sample matrix to obtain a predicted block of the current block.
38. 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; The decoder, wherein the second processor, when executing the computer program, is configured to perform a method according to any one of claims 18 to 34.
39. A computer storage medium having an image component prediction program stored therein, The computer storage medium, wherein the image component prediction program, when executed by a first processor, implements the method of any one of claims 1 to 17, or, when executed by a second processor, implements the method of any one of claims 18 to 34.
Citation Information
Patent Citations
Video decoding apparatus and video encoding apparatus
JP2021048485A
Image component prediction method, encoder, decoder and storage medium
JP7596319B2
Video decoding apparatus and video coding apparatus
US20230164327A1
