WO2021056224A1 - 预测值的确定方法、编码器、解码器以及存储介质 - Google Patents

预测值的确定方法、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2021056224A1
WO2021056224A1 PCT/CN2019/107613 CN2019107613W WO2021056224A1 WO 2021056224 A1 WO2021056224 A1 WO 2021056224A1 CN 2019107613 W CN2019107613 W CN 2019107613W WO 2021056224 A1 WO2021056224 A1 WO 2021056224A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
pixel
value
matrix
size
Prior art date
Application number
PCT/CN2019/107613
Other languages
English (en)
French (fr)
Inventor
霍俊彦
马彦卓
万帅
杨付正
张伟
王海鑫
孙宇
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2019/107613 priority Critical patent/WO2021056224A1/zh
Priority to CN201980085524.6A priority patent/CN113261279B/zh
Publication of WO2021056224A1 publication Critical patent/WO2021056224A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction

Definitions

  • the embodiments of the present application relate to a matrix-based intra prediction technology (MIP, Matrix-based Intra Prediction) in intra prediction in the field of video coding, in particular to a method for determining a prediction value, an encoder, a decoder, and a storage medium.
  • MIP matrix-based intra prediction technology
  • VVC Versatile Video Coding
  • JVET Joint Video Exploration Team
  • JVET-N0217 Weighted Intra Prediction
  • MIP adds a different number of MIP modes in the intra-frame brightness prediction process according to the difference in the size of the intra-frame luminance coding block, and then improves the MIP technology in JVET-O0925.
  • MIP matrix A In video coding and decoding, there are three tables involved in the use of MIP to determine the predicted value, which need to be obtained before the calculation of the predicted value. They are MIP matrix A, weighting parameter table fO, and bit shift parameter table sW. Among them, A matrix All values of A[i][j] and fO are stored as unsigned 7-bit binary numbers, and sW is the offset corresponding to the prediction mode.
  • the sW table of the prediction mode In the existing MIP technology in VVC, it is necessary to perform the MIP mode to predict the pixels in the block For the calculation of the pixel value, in the calculation of the pixel value, the sW table of the prediction mode should be checked, and the sW value obtained by the table look-up will be used for all the pixels of the prediction block.
  • the embodiments of the present application provide a method for determining a prediction value, an encoder, a decoder, and a storage medium, which can improve the prediction accuracy in video coding and decoding, and increase the coding and decoding rate.
  • an embodiment of the present application provides a method for determining a prediction value, which is used in an encoder, and the method includes:
  • an embodiment of the present application provides a method for determining a prediction value for a decoder, and the method includes:
  • the coding mode of the current block is the matrix-based intra prediction mode MIP
  • the reconstructed value of the neighboring pixels of the current block is obtained, and the reconstructed value of the neighboring pixels is filtered to obtain the reference value of the current block set;
  • an encoder in a third aspect, provides an encoder, and the encoder includes:
  • the first acquiring unit is configured to acquire reconstructed values of adjacent pixels of the current block
  • the first filtering unit is configured to perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block;
  • a first calculation unit configured to calculate a prediction input value set based on the size of the current block, the bit depth of the pixel brightness component in the current block, and the reference value set;
  • the first determining unit is configured to determine the MIP matrix of the matrix-based intra prediction MIP mode of the current block according to the size of the current block; and according to a preset bit shift parameter matrix set, and the current block The corresponding relationship between the size of the block and the position of the pixel in the current block, determining the bit shift parameter of the pixel in the current block;
  • the first calculation unit is further configured to calculate the predicted value of the current block according to the predicted input value set, the MIP matrix of the current block, and the bit shift parameter of the pixel.
  • an embodiment of the present application provides a decoder, and the decoder includes:
  • the parsing unit is configured to parse the code stream to obtain the current block size and encoding mode
  • the second acquiring unit is configured to acquire the reconstructed values of adjacent pixels of the current block when the encoding mode of the current block is the matrix-based intra prediction mode MIP;
  • the second filtering unit is configured to perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block;
  • a second calculation unit configured to calculate a set of predicted input values based on the size of the current block, the bit depth of the pixel brightness component in the current block, and the reference value set;
  • the second determining unit is configured to determine the MIP matrix of the matrix-based intra prediction MIP mode of the current block according to the size of the current block; and based on the pixel position of each pixel in the current block, from the Determine the bit shift parameter of each pixel in the current block in the mapping relationship between the size of the current block, the prediction mode index and the preset constant;
  • the second calculation unit is further configured to calculate the predicted value of the current block according to the predicted input value set, the MIP matrix of the current block, and the bit shift parameter of each pixel.
  • an encoder in a fifth aspect, provides an encoder, and the encoder includes:
  • the first memory relies on the first processor to perform operations through a first communication bus.
  • the executable instructions are executed by the When the first processor executes, it executes the method for determining the predicted value described in one or more embodiments above.
  • an embodiment of the present application provides a decoder, and the decoder includes:
  • the second memory relies on the second processor to perform operations through a second communication bus.
  • the executable instructions When the second processor executes, it executes the method for determining the predicted value described in one or more of the foregoing embodiments.
  • an embodiment of the present application provides a storage medium, wherein, when the executable instruction is executed by one or more first processors, the first processor or the second processor executes one of the foregoing Or the method for determining the predicted value described in multiple embodiments.
  • the embodiments of the present application provide a method, an encoder, a decoder, and a storage medium for determining a predicted value.
  • the method may include: obtaining a reconstructed value of a neighboring pixel of the current block; filtering the reconstructed value of the neighboring pixel to obtain The reference value set of the current block; the prediction input value set is calculated based on the size of the current block, the bit depth of the pixel brightness component in the current block and the reference value set; the matrix-based intra prediction MIP of the current block is determined according to the size of the current block The MIP matrix of the mode; according to the preset bit shift parameter matrix set, and the corresponding relationship between the size of the current block and the position of the pixel in the current block, determine the bit shift parameter of the pixel in the current block; according to the predicted input value set , The MIP matrix of the current block and the bit shift parameters of the pixels, calculate the predicted value of the current block.
  • the bit shift parameters of the pixels of the current block used are related to the position of the pixel, and it is realized that some pixels in specific positions correspond to their own bits.
  • the shift parameter can effectively reduce the dynamic range of the input value during MIP mode prediction. Therefore, when the same number of bits is used to represent the MIP input value and the MIP matrix, it can more accurately represent the dynamic range The data improves the accuracy of the MIP prediction value calculation process, thereby improving the coding and decoding efficiency.
  • FIG. 1 is a device diagram of a video encoding and decoding system provided by an embodiment of the application
  • FIG. 2 is a schematic structural diagram of a video encoder provided by an embodiment of the application.
  • FIG. 3 is a schematic structural diagram of a video decoder provided by an embodiment of the application.
  • Figure 4 is a schematic diagram of the process of encoding pixels in MIP mode
  • Fig. 5 is a schematic diagram of a flow of encoding in MIP mode
  • FIG. 6 is a schematic flowchart of an optional method for determining a predicted value according to an embodiment of the application
  • FIG. 7 is a schematic diagram of an optional MIP mode encoding process provided by an embodiment of the application.
  • FIG. 8 is a schematic flowchart of another optional method for determining a predicted value provided by an embodiment of the present application according to an embodiment of the present application;
  • FIG. 9 is a schematic structural diagram of an optional encoder provided by an embodiment of the application.
  • FIG. 10 is a schematic structural diagram of an optional decoder provided by an embodiment of this application.
  • FIG. 11 is a schematic structural diagram of another optional encoder provided by an embodiment of the application.
  • FIG. 12 is a schematic structural diagram of another optional decoder provided by an embodiment of the application.
  • first ⁇ second ⁇ third referred to in the embodiments of this application only distinguishes similar objects, and does not represent a specific order for the objects. Understandably, “first ⁇ second ⁇ third” "When permitted, the specific order or sequence can be interchanged, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein.
  • H.266 The next generation video coding standard.
  • VVC Versatile Video Coding, multifunctional video coding, another name for H.266.
  • VTM The Test Model of VVC, is the reference software test platform for VVC.
  • MIP Matrix-based Intra Prediction, matrix-based intra prediction.
  • the function of predictive coding is to construct the predicted value of the current block by using the existing reconstructed image in space or time in video coding, and only transmit the difference between the original value and the predicted value, so as to reduce the transmission.
  • the purpose of the data volume can be the original value of brightness and the predicted value of brightness; in chroma prediction, the original value and predicted value here can be the original value of chroma and the value of chroma. Predictive value.
  • the function of intra prediction is to construct the prediction value of the current block by using the pixel units in the previous row and the pixel units in the left column adjacent to the current block. Using the restored neighboring pixels around the current block (that is, the pixel unit in the upper row and the pixel unit in the left column adjacent to the current block), each pixel unit of the current block is predicted.
  • FIG. 1 is a schematic structural diagram of the video encoding and decoding architecture of an embodiment of the application.
  • the video encoding and decoding architecture includes one or A plurality of electronic devices 11 to 1K and a communication network 01, wherein the electronic devices 11 to 1K can perform video interaction through the communication network 01.
  • the electronic device may be various types of devices with video encoding and decoding functions.
  • the electronic device may include a mobile phone, a tablet computer, a personal computer, a television, a server, and the like.
  • the electronic device has a video codec function, including a video encoder and/or a video decoder.
  • the composition structure of the video encoder 21 includes: a transform and quantization unit 211, an intra-frame estimation unit 212, an intra-frame prediction unit 213, a motion compensation unit 214, a motion estimation unit 215, and an inverse transform and inverse quantization unit 216 , Filter control analysis unit 217, filter unit 218, encoding unit 219, decoded image buffer unit 210, etc.; wherein, the filter unit 218 can implement deblocking filtering and sample adaptive indentation (SAO, Sample Adaptive Offset) filtering, encoding unit 219 can realize header information coding and context-based adaptive binary arithmetic coding (CABAC, Context-based Adaptive Binary Arithmatic Coding).
  • SAO sample adaptive indentation
  • CABAC Context-based Adaptive Binary Arithmatic Coding
  • a video coding block can be obtained by dividing the coding tree block (CTU, Coding Tree Unit), and then the residual pixel information obtained after intra-frame or inter-frame prediction is passed through the transformation and quantization unit 211 transforms the video coding block, including transforming the residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce the bit rate;
  • the intra-frame estimation unit 212 and the intra-frame prediction unit 213 are It is used to perform intra-frame prediction on the video coding block;
  • the intra-frame estimation unit 212 and the intra-frame prediction unit 213 are used to determine the intra-frame prediction mode to be used to code the video coding block;
  • the motion compensation unit 214 and the motion estimation unit 215 use To perform inter-frame predictive coding of the received video coding block with respect to one or more blocks in one or more reference frames to provide temporal prediction information;
  • the motion estimation performed by the motion estimation unit 215 is a process of generating motion vectors, The motion vector can estimate the motion
  • the context content can be based on adjacent coding blocks, can be used to encode information indicating the determined intra prediction mode, and output the code stream of the source video data; and the decoded image buffer unit 210 is used to store reconstructed video coding blocks for prediction reference. As the video image coding progresses, new reconstructed video coding blocks are continuously generated, and these reconstructed video coding blocks are all stored in the decoded image buffer unit 210.
  • the video decoder 22 corresponding to the video encoder 21 has a composition structure as shown in FIG. 3, including: a header information decoding and CABAC decoding unit 221, an inverse transform and inverse quantization unit 222, an intra prediction unit 223, and a motion compensation unit 224 , Deblocking filter and SAO filter unit 225 and decoded image buffer unit 226; the video image undergoes transformation and quantization unit 211, intra-frame estimation unit 212, intra-frame prediction unit 213, motion compensation unit 214, motion The estimation unit 215, the filtering unit 218, and the encoding unit 219 output the code stream of the video image after partial processing; the code stream is input to the video decoder 22, and then passes through the header information decoding and CABAC decoding unit 225 in the video decoder 22.
  • the transformation and dequantization unit 222, the intra prediction unit 223, and the motion compensation unit 224 perform partial processing, and finally restore the original video image.
  • the method for determining the predicted value is mainly applied to the intra prediction unit 213 in video encoding and the intra prediction module 223 in video decoding. At the same time.
  • MIP Matrix-based Intra Prediction
  • the latest VVC accepted the Affine Linear Weighted Intra Prediction proposed by HHI in the Joint Video Expert Group JVET-N0217, and was renamed the MIP technology.
  • This technology is based on the difference in the size of the intra-frame luminance coding block. A different number of matrix-based intra prediction modes have been added to the intra-luminance prediction process.
  • VVC In order to capture the finer edge directions presented in natural video, VVC expands the 33 kinds of intra-frame luminance prediction angle modes defined in the video compression standard (HEVC, High Efficiency Video Coding) to 65 kinds, including 65 kinds of intra-frame angle prediction There are also two non-angle modes, namely Planar mode numbered 0 and DC mode numbered 1. Therefore, the intra prediction process in VVC includes two non-angle modes and 65 angle modes. Here, These 67 prediction modes are called traditional modes of intra prediction.
  • HEVC High Efficiency Video Coding
  • the MIP technology divides the brightness blocks into three categories according to the size of the intra-frame brightness coding block. If the size of the brightness block is W*H, the brightness blocks can be divided into three categories according to the size of the brightness block:
  • Brightness blocks with a size of 4 ⁇ 4 belong to the first type of brightness blocks, 8 ⁇ 4, 4 ⁇ 8 and 8 ⁇ 8 brightness blocks are the second type of fast brightness, and other sizes of brightness blocks belong to the third type of brightness. Piece.
  • the MIP technology adds M types of MIP modes on the basis of 67 traditional intra-frame prediction modes.
  • MIP technology is only applied to intra-frame brightness prediction.
  • the input of MIP prediction is also the previous row and left column of the current block (equivalent to the image block to be coded below), and the output is the current block’s data.
  • Forecast value the specific forecasting process is divided into three steps: averaging, matrix vector multiplication and interpolation. That is to say, by performing these three operations on the input reconstructed brightness values of the adjacent pixels in the previous row and the left column, the predicted brightness value of the current block can be obtained.
  • Figure 4 is a schematic diagram of the process of encoding pixels in MIP mode, as shown in Figure 4, the specific implementation is as follows:
  • Step 1 Perform averaging operation on the upper adjacent reference points of the current brightness block to obtain the vector redT, which has a total of N values; perform averaging operation on the left adjacent reference points of the current brightness block to obtain the vector redL, which has a total of N values.
  • Step 2 Obtain the matrix mWeight, the weighting parameter f0 and the bit shift parameter sW, and obtain the partial prediction value of the current block identified by the crossed line as shown in Fig. 3 through the following formula calculation:
  • predMip[x,y] is the predicted value of (x,y) pixel position
  • pTemp[i] is the i-th reference value in the reference value set of the current block when using MIP mode for prediction
  • p[x] is the The i-th prediction input value when MIP mode is predicted
  • inSize is determined according to the MIP mode number MipSizeId.
  • the value of MipSizeId is equal to 0
  • the value of inSize is equal to 4.
  • the value of MipSizeId is equal to 1
  • the value of inSize is The value is equal to 8.
  • the value of MipSizeId is equal to 2
  • the value of inSize is equal to 7
  • the value of MipSizeId is determined according to the current block size.
  • the value of MipSizeId is equal to 0.
  • the value of MipSizeId is equal to 1.
  • the value of MipSizeId is equal to 2.
  • BitDepth is the bit depth of the brightness component (bit depth, that is, how many binary numbers are used to represent the sample value of the brightness component sample ),
  • mWeight represents the MIP matrix A
  • predC predC
  • incH and incW are used to determine the parameters of the matrix element corresponding to the (x, y) pixel position
  • ">>" is the bit shift operator
  • oW represents the bit shift operation used
  • SW represents the number of bit shifts to the right
  • fO represents the weighting parameter
  • sW and fO can be determined at least according to the current block size or the value of MipSizeId (determined by the current block size), for example, it is related to the value of MipSizeId
  • the mapping table of determines the values of sW and fO, and the values of sW and fO recorded in the mapping table are at least under different values of MipSizeId.
  • the third step through linear interpolation, the remaining predicted value in the current block is obtained, and then the partial predicted value of the current block identified by multiple small dots as shown in FIG. 4 can be obtained.
  • the three values involved in the MIP technology need to be obtained in the process of determining the predicted value, namely mWeight, fO, and sW.
  • the value of mWeight is related to the prediction mode and pixel spatial position, while fO and sW are only related to the prediction. Mode related.
  • p[i] is calculated by formulas (3), (4) and (5).
  • the value of mWeight and fO are both stored as unsigned 7-bit binary numbers.
  • sW is the offset corresponding to the prediction mode. According to the prediction mode (as shown in Table 1 below), the value is one of 5, 6, and 7, which can be obtained by looking up Table 1.
  • the pixel value of the pixel can be obtained by calculating the matrix vector product ,
  • the final overall memory requirement is 4.5395 kilobytes.
  • FIG. 5 is a schematic diagram of the coding process in MIP mode. As shown in Figure 5, the implementation process is as follows:
  • the encoder of the electronic device obtains the index number of the MIP mode when encoding, and then, according to the mode index number of the MIP, obtains the mWeight and fO trained by the machine from the mapping table, and according to the mode index number of the MIP, from the mapping Get sW in the table, and finally, execute (mWeight[x][y]-fO)>>sW to predict and get the predicted value.
  • the original floating-point number mWeight f [x][y] of all values of mWeight is an offset starting from its minimum value (usually a negative value, denoted by fO)
  • mWeight[x][y] is stored as an unsigned 7-bit binary number, resulting in a certain loss in its representation accuracy.
  • the parameters with a small value range have to further reduce the representation accuracy to adapt to the common value change range of all the parameters in the entire matrix.
  • the original matrix The variation range of the parameters in is also related to the way of obtaining p[i] data.
  • the calculation method of the p[i] data in the existing method causes the expansion of the parameter change range, reduces the accuracy of the data in the weight matrix, increases the prediction difference of the MIP mode, and reduces the coding and decoding efficiency.
  • FIG. 6 is a schematic flowchart of an optional method for determining a predicted value provided by an embodiment of the present application. As shown in FIG. 6, the method is applied to an encoder, and the method may include:
  • the encoder in order to determine the predicted value of the current block, it first needs to obtain the reconstructed value of the neighboring pixels of the current block, where the neighboring pixels include the reconstructed value of the pixel position of the previous row of the current block and the pixel position of the left column. Rebuild value.
  • S102 Perform filtering processing on reconstructed values of adjacent pixels to obtain a reference value set of the current block.
  • the encoder After the encoder obtains the reconstructed values of adjacent pixels, for example, the obtained reconstructed value of the previous row of pixels is redT, a total of N values, and the reconstructed value of the left column of pixels is redL, a total of N values, composed of redT and redL A new vector pTemp is used as the reference value set of the current block.
  • the process of obtaining the reference value of the current block may include: dividing the reconstructed values of adjacent pixels into N groups, and calculating adjacent pixels in each group. The average value of the reconstructed value of the pixel, the average value is used as the reference value in the reference value set, and N is a positive integer.
  • N is set as a positive integer value corresponding to the preset current block size. That is to say, the process of filtering the reconstructed values of adjacent pixels in S102 can be as follows: first divide redT and redL into N groups, and then average each group to obtain N averages, and use the N averages as The reference value in the reference set.
  • the value of inSize is equal to 4.
  • the value of inSize is equal to 8.
  • the value of inSize is Equal to 7.
  • S103 Calculate a prediction input value set based on the size of the current block, the bit depth of the pixel brightness component in the current block, and the reference value set.
  • the prediction input value set is used to calculate the prediction value of the current block according to the matrix-based intra prediction mode MIP.
  • the encoder when the size of the current block is less than the set threshold, calculates the first prediction in the prediction input value set according to the bit depth of the pixel brightness component in the current block and the specified reference value in the reference value set. Input value; According to the reference value set, calculate other prediction input values in the prediction input set except the first prediction input value to obtain the prediction input value set.
  • the first constant is calculated according to the bit depth; the specified reference value in the reference value set is subtracted from the difference of the first constant to determine the first predicted input value.
  • the designated reference value is the first reference value in the reference value set.
  • the size of the current block can be represented by MipSizeId
  • MipSizeId is a number less than 2
  • the process of obtaining the first constant is: setting the first constant to a value obtained by performing a binary bit left shift operation on the value 1, where the left shift number used in the binary bit left shift operation It is equal to the value of bit depth minus 1.
  • the value of the first constant is the value obtained by shifting 1 to the left, and the number of left shifts is the bit depth minus one.
  • the prediction input value set is used to calculate the prediction value of the current block according to the MIP; after the first constant is obtained through calculation, the difference between the first reference value minus the first constant can be used as the first constant.
  • a predictive input value is used.
  • Other predictive input values p[i] include: when the size of the current block is less than the preset threshold, except for the first predictive input value; other predictive input values p[i] can also include the size of the current block greater than or equal to
  • the predicted input value when the threshold is preset can be calculated using the following formula (4) or (5).
  • S104 Determine the MIP matrix of the matrix-based intra prediction MIP mode of the current block according to the size of the current block.
  • S105 Determine the bit shift parameter of the pixel in the current block according to the preset bit shift parameter matrix set and the correspondence between the size of the current block and the position of the pixel in the current block.
  • one or more mapping tables are pre-stored in the encoder, and the MIP matrix of the current block can be determined through one or more mapping tables, which is represented by mWeight, The bit shift parameter sW of the current block, and the weighting parameter f0 of the current block.
  • the encoder selects the MIP matrix corresponding to the size of the current block from one or more MIP matrices stored in advance.
  • the values in the above MIP matrix are constants, that is, the values in the MIP matrix are not updated during the calculation of the MIP predicted value.
  • the constant values in the MIP matrix can be calculated according to the above formulas (3)-(5) The method is obtained by offline training; optionally, the constant value in the MIP matrix can be derived from the MIP matrix corresponding to other different p[0] calculation methods according to the calculation methods of the above formulas (3)-(5) .
  • f0 can be determined at least according to the current block size or the value of MipSizeId
  • sW can be determined at least according to the current block size (or MipSizeId) and the pixel position, or the current block size, the value of the pixel position, and the prediction mode.
  • the index is determined.
  • a mapping table related to the value of MipSizeId is used to determine the value of fO
  • a mapping table related to the value of MipSizeId is used to determine the value of fO.
  • the value of fO recorded in the mapping table is at least under different values of MipSizeId.
  • the encoder determines the position of some specific pixels of the current block according to the size of the current block and the correspondence between the size of the current block and the positions of pixels in the current block; according to the size of the current block And the preset bit shift parameter matrix set to determine the bit shift parameter matrix used to decode the current block; according to the position of some specific pixels in the current block, from the bit shift parameter matrix of the current block, determine the bit shift parameter matrix in the current block Part of the bit shift parameter of a specific pixel.
  • the preset bit shift parameter matrix set is a bit shift parameter matrix stored in advance.
  • the elements in the bit shift parameter matrix are preset constants, for example, 5, 6, or 7.
  • the positions of some specific pixels can be realized by one pixel position apart, and the specific embodiment of the present application is not limited, as shown in FIG. 4 s position.
  • the elements in the bit shift parameter matrix are preset constants and other values can be selected, which are not limited in the embodiments of the present application.
  • the sW can be determined according to the index of the preset mode and the pixel position, and the specific value can be other values.
  • the encoder determines the implementation process of the bit shift parameters of some specific pixels in the current block from the bit shift parameter matrix of the current block according to the positions of some specific pixels in the current block: Determine the coding mode of the current block; determine the bit shift parameters of some specific pixels in the current block from the bit shift parameter matrix of the current block according to the position and coding mode of some specific pixels in the current block.
  • the sW can be determined by first using the pixel position as the first index, and then using the prediction mode as the second index to determine the sW.
  • the increase of the sW value is related to the pixel position.
  • sW can be stored in a two-dimensional table.
  • One dimension is the mode index
  • the other dimension is the pixel position as the index.
  • For the current block regardless of any MIP mode of any type of luminance block, it is obtained through the correspondence between the position of the pixel in the current block and the prediction mode.
  • it is necessary to adjust the adaptive multiples of mWeight[x][y] and fO.
  • mWeight[x][y] and fO need to be responded to Corresponding to the adjustment change, it becomes a positive correlation, and the effect of improving accuracy can be achieved at this time.
  • the pixel position is determined by the current block size.
  • the same principle is used to determine the sW related to the pixel position.
  • FIG. 7 is a schematic diagram of the coding process in MIP mode, as shown in Figure 7, the implementation process is as follows:
  • the encoder of the electronic device obtains the index number of the MIP mode when encoding, and then obtains the mWeight and fO trained by the machine from the mapping table according to the mode index number of the MIP, as well as the mode index number and pixel position according to the MIP , Obtain the sW corresponding to the pixel from the bit shift parameter matrix, that is, determine the sW mapping according to the mode index number, and then determine the specific sW according to the pixel position.
  • the sW value corresponding to the current pixel is 6 as an example, as shown in Figure 7, the sW corresponding to the pixel at the specific position of the current block is 4 ⁇ 4 data block A, and finally, execute (mWeight[x][y]-fO)>>sW for the specific position
  • execute (mWeight[x][y]-fO)>>sW for the specific position For the prediction of the pixel, based on the prediction result of the pixel at a specific location, continue to determine the prediction result of the pixel at other locations to obtain the prediction value of the current block.
  • the original floating-point number mWeight f [x][y] of all values of mWeight is a fixed-point value of the offset starting from its minimum value (usually a negative value, denoted by f0), expressed as formula (6).
  • sW may be related to the pixel position, or may be related to the pixel position and the prediction mode, as shown in FIG. 4 Pixels close to the right or bottom border are more affected by the pixel position.
  • the pixel value near the right or lower boundary obtained by MIP prediction has a larger variation range, and its pixel accuracy is lower than that of pixels near the upper left boundary, so the sW of pixels near the upper left boundary should take a larger value.
  • the sW of pixels close to the right or lower border should be a smaller value.
  • sW must obtain a smaller value close to the right or lower boundary to ensure that other tables (mWeight f [x] [y] and fO) can be stored as unsigned 7-bit binary numbers. Therefore, sW is set as a parameter related to the pixel position, so that the pixel accuracy of the MIP prediction block near the upper left boundary is improved.
  • S106 Calculate the prediction value of the current block according to the prediction input value set, the MIP matrix of the current block, and the bit shift parameter of the pixel.
  • a set of predicted input values can be obtained. Based on the set of predicted input values, prediction can be performed to obtain the predicted value of a pixel at a specific position in the current block, for example, as shown in Figure 4 The predicted value of the pixel location identified by the crossed line.
  • S106 may include: calculating the current block based on the predicted input value set, the MIP matrix of the current block and the bit shift parameters of the pixel The predicted value of the pixel at a specific location; filtering processing is performed on the predicted value of the pixel at a specific location to obtain the predicted value of all pixels in the current block. Specifically, interpolation filtering is performed on the predicted value of the pixel at the specific position to obtain the predicted value of the pixel at other positions except the specific position in the current block.
  • the MIP matrix of the current block corresponding to the current block size, the bit shift parameter of the pixel of the current block, and the weighting parameter of the current block are determined from one or more pre-stored mapping tables;
  • the value set, the MIP matrix of the current block, the bit shift parameter of the pixel of the current block, and the weighting parameter of the current block are used to calculate the predicted value of the pixel at a specific position in the current block.
  • the above-mentioned parameters and the set of input values can be input into formula (1) and formula (2), and the predicted value of the specific pixel position in the current block can be calculated.
  • the MIP matrix of the current block corresponding to the current block size, the bit shift parameter of the pixel of the current block, and the weighting parameter of the current block are obtained from the mapping table in combination with the size of the current block, for example, when When the current block size is 4x4, the value of MipSizeId is equal to 0, when the current block size is 4x8, 8x4, or 8x8, the value of MipSizeId is equal to 1, and when the current block size is greater than 8x8, the value of MipSizeId is equal to 2.
  • the MIP matrix of the current block corresponding to the current block size can be found from the mapping table according to the value of MipSizeId and the specific position of the pixel, and the bit shift parameter of the pixel of the current block can be determined from Table 2.
  • the filtering process of the predicted value of the specific position can be continued to obtain the predicted values of all pixels in the current block.
  • S106 may include: performing interpolation filtering on the predicted values of pixels at a specific location to obtain predictions of pixels at other locations in the current block except for the specific location. value.
  • the bit shift parameters of the pixels of the current block used are related to the position of the pixel, which realizes the determination of some specific positions.
  • the pixel corresponds to its own bit shift parameter, which can effectively reduce the dynamic range of the input value during MIP mode prediction. Therefore, when the same number of bits is used to represent the MIP input value and the MIP matrix, it can be more accurate Represents the data in the dynamic range, which improves the accuracy of the MIP prediction value calculation process, thereby improving the coding efficiency.
  • FIG. 8 is a schematic flowchart of another optional method for determining a predicted value provided by an embodiment of the present application. Referring to FIG. 8, the method is applied to a decoder, and the method may include:
  • the coding mode can be one of the traditional intra prediction modes, or it can be A mode of the MIP mode, here, mainly for a mode in the MIP mode.
  • the size of the current block is 4x4, 4x8, 8x4, or 8x8.
  • the encoding mode M 35.
  • the encoding mode M One mode in 19
  • coding mode M one of 11 modes.
  • the decoder first obtains the reconstruction value of the neighboring pixels of the current block, where the neighboring pixels include the reconstruction value of the previous row of pixel positions of the current block and the reconstruction of the left column of pixel positions value.
  • the obtained reconstructed value of the previous row of pixels is redT
  • the reconstructed value of the pixel in the left column is redL
  • redT and redL form a new
  • the vector pTemp is used as the reference value set of the current block.
  • filtering processing is performed on the reconstructed values of adjacent pixels to obtain the reference value set of the current block, including: The reconstructed value of is divided into N groups, the average of the reconstructed values of adjacent pixels in each group is calculated, and the average is used as the reference value in the reference value set, and N is a positive integer.
  • N is set as a positive integer value corresponding to the preset current block size.
  • the process of filtering the reconstructed values of adjacent pixels in S202 can be specifically as follows: first divide redT and redL into N groups, and then average each group to obtain N averages, and then divide the N averages. As a reference value in the reference set.
  • the value of inSize is equal to 4.
  • the value of inSize is equal to 8.
  • the value of inSize is Equal to 7.
  • S203 Calculate a prediction input value set based on the size of the current block, the bit depth of the pixel brightness component in the current block, and the reference value set.
  • the process of implementing S203 by the decoder is consistent with the principle of S103 implemented on the encoder side, and the description is consistent, and will not be repeated here.
  • S204 Determine the MIP matrix of the matrix-based intra prediction MIP mode of the current block according to the size of the current block.
  • the process of implementing S204 by the decoder is consistent with the principle of S104 implemented on the encoder side, and the description is the same, and will not be repeated here.
  • S205 Determine the bit shift parameter of each pixel in the current block from the mapping relationship between the size of the current block, the prediction mode index, and the preset constant based on the pixel position of each pixel in the current block.
  • the process of implementing S205 by the decoder is consistent with the principle of S105 implemented on the encoder side, and the description is the same, and will not be repeated here.
  • S206 Calculate the prediction value of the current block according to the prediction input value set, the MIP matrix of the current block, and the bit shift parameter of each pixel.
  • the process of implementing S206 by the decoder is consistent with the principle of S106 implemented on the encoder side, and the description is the same, and will not be repeated here.
  • the bit shift parameters of the pixels of the current block used are related to the position of the pixel, which realizes the determination of some specific positions.
  • the pixel corresponds to its own bit shift parameter, which can effectively reduce the dynamic range of the input value during MIP mode prediction. Therefore, when the same number of bits is used to represent the MIP input value and the MIP matrix, it can be more accurate Represents the data in the dynamic range, which improves the accuracy of the MIP prediction value calculation process, thereby improving the decoding efficiency.
  • FIG. 9 is a schematic structural diagram of an optional encoder 1 provided in an embodiment of the application. As shown in FIG. 9, the encoder may include:
  • the first acquiring unit 10 is configured to acquire reconstructed values of adjacent pixels of the current block
  • the first filtering unit 11 is configured to perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block;
  • the first calculation unit 12 is configured to calculate a prediction input value set based on the size of the current block, the bit depth of the pixel brightness component in the current block, and the reference value set;
  • the first determining unit 13 is configured to determine the MIP matrix of the matrix-based intra prediction MIP mode of the current block according to the size of the current block; and according to a preset bit shift parameter matrix set, and the The corresponding relationship between the size of the current block and the position of the pixel in the current block, determining the bit shift parameter of the pixel in the current block;
  • the first calculation unit 12 is further configured to calculate the predicted value of the current block according to the predicted input value set, the MIP matrix of the current block, and the bit shift parameter of the pixel.
  • the first determining unit 13 is further configured to be based on the size of the current block and the correspondence between the size of the current block and the position of the pixel in the current block , Determine the position of some specific pixels of the current block; determine the bit shift parameter matrix for decoding the current block according to the size of the current block and a preset bit shift parameter matrix set; The position of part of the specific pixels in the block is determined from the bit shift parameter matrix of the current block, and the bit shift parameters of the part of the specific pixels in the current block are determined.
  • the elements in the bit shift parameter matrix are preset constants.
  • the first determining unit 13 is further configured to determine the encoding mode of the current block; according to the positions of some specific pixels in the current block and the encoding mode, the current In the bit shift parameter matrix of the block, the bit shift parameters of some specific pixels in the current block are determined.
  • the first determining unit 13 is further configured to select the MIP matrix corresponding to the size of the current block from the one or more pre-stored MIP matrices.
  • the first calculation unit 12 is further configured to, when the size of the current block is less than a set threshold, according to the bit depth of the pixel brightness component in the current block and the The specified reference value in the reference value set is calculated to calculate the first predicted input value in the predicted input value set; according to the reference value set, the predicted input values other than the first predicted input value in the predicted input set are calculated, Thereby, the predicted input value set is obtained.
  • the first filtering unit 11 is further configured to divide the reconstruction values of the adjacent pixels into N groups by the filtering process, and calculate the reconstruction values of the adjacent pixels in each group.
  • the average value of the value, and the average value is used as the reference value in the reference value set.
  • N is set to a positive integer value corresponding to the preset current block size.
  • the first calculation unit 12 is further configured to calculate a first constant according to the bit depth; subtract one of the first constant from a specified reference value in the reference value set The difference is determined as the first predicted input value.
  • the first calculation unit 12 is further configured to set the first constant to a value obtained by performing a binary bit left shift operation on the value 1, wherein the binary bit left The number of left shifts used in the shift operation is equal to the value of the bit depth minus one.
  • the designated reference value is the first reference value in the reference value set.
  • the first calculation unit 12 is further configured to calculate the current block based on the prediction input value set, the MIP matrix of the current block, and the bit shift parameter of the pixel.
  • the first calculation unit 12 is further configured to perform interpolation filtering on the predicted value of the pixel at the specific position to obtain the pixel value of the pixel at other positions except the specific position in the current block. Predictive value.
  • the bit shift parameters of the pixels of the current block used are related to the position of the pixel, which realizes the determination of some specific positions.
  • the pixel corresponds to its own bit shift parameter, which can effectively reduce the dynamic range of the input value during MIP mode prediction. Therefore, when the same number of bits is used to represent the MIP input value and the MIP matrix, it can be more accurate Represents the data in the dynamic range, which improves the accuracy of the MIP prediction value calculation process, thereby improving the coding efficiency.
  • FIG. 10 is a schematic structural diagram of an optional decoder 2 provided by an embodiment of the present application. As shown in FIG. 10, the decoder 2 may include:
  • the parsing unit 20 is configured to parse the code stream to obtain the size and coding mode of the current block;
  • the second acquiring unit 21 is configured to acquire the reconstructed values of adjacent pixels of the current block when the encoding mode of the current block is the matrix-based intra prediction mode MIP;
  • the second filtering unit 22 is configured to perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block;
  • the second calculation unit 23 is configured to calculate a prediction input value set based on the size of the current block, the bit depth of the pixel brightness component in the current block, and the reference value set;
  • the second determining unit 24 is configured to determine the MIP matrix of the matrix-based intra prediction MIP mode of the current block according to the size of the current block; Determining the bit shift parameter of each pixel in the current block in the mapping relationship between the size of the current block, the prediction mode index, and the preset constant;
  • the second calculation unit 23 is further configured to calculate the predicted value of the current block according to the predicted input value set, the MIP matrix of the current block, and the bit shift parameter of each pixel.
  • the second determining unit 24 is further configured to be based on the size of the current block, and the correspondence between the size of the current block and the position of the pixel in the current block , Determine the position of some specific pixels of the current block;
  • the bit shift parameters of some specific pixels in the current block are determined from the bit shift parameter matrix of the current block.
  • the elements in the bit shift parameter matrix are preset constants.
  • the second determining unit 24 is further configured to shift the parameter matrix from the bit of the current block according to the position of some specific pixels in the current block and the coding mode. , Determining the bit shift parameters of some specific pixels in the current block.
  • the second determining unit 24 is further configured to select the MIP matrix corresponding to the size of the current block from the one or more pre-stored MIP matrices.
  • the second calculation unit 23 is further configured to, when the size of the current block is less than a set threshold, according to the bit depth of the pixel brightness component in the current block and the The specified reference value in the reference value set is calculated to calculate the first predicted input value in the predicted input value set; according to the reference value set, the predicted input values other than the first predicted input value in the predicted input set are calculated, Thereby, the predicted input value set is obtained.
  • the second filtering unit 22 is further configured to divide the reconstruction values of the adjacent pixels into N groups by the filtering process, and calculate the reconstruction values of the adjacent pixels in each group.
  • the average value of the value, and the average value is used as the reference value in the reference value set.
  • N is set to a positive integer value corresponding to the preset current block size.
  • the second calculation unit 23 is further configured to calculate a first constant according to the bit depth; subtract one of the first constant from the specified reference value in the reference value set. The difference is determined as the first predicted input value.
  • the second calculation unit 23 is further configured to set the first constant to a value obtained by performing a binary bit left shift operation on the value 1, wherein the binary bit left The number of left shifts used in the shift operation is equal to the value of the bit depth minus one.
  • the designated reference value is the first reference value in the reference value set.
  • the second calculation unit 23 is further configured to calculate the current block based on the prediction input value set, the MIP matrix of the current block, and the bit shift parameter of the pixel.
  • the second calculation unit 23 is further configured to perform interpolation filtering on the predicted value of the pixel at the specific position to obtain the pixel value of the pixel at other positions except the specific position in the current block. Predictive value.
  • the bit shift parameters of the pixels of the current block used are related to the position of the pixel, which realizes the determination of some specific positions.
  • the pixel corresponds to its own bit shift parameter, which can effectively reduce the dynamic range of the input value during MIP mode prediction. Therefore, when the same number of bits is used to represent the MIP input value and the MIP matrix, it can be more accurate Represents the data in the dynamic range, which improves the accuracy of the MIP prediction value calculation process, thereby improving the decoding efficiency.
  • FIG. 11 is a schematic structural diagram of another optional encoder proposed in an embodiment of the application.
  • the encoder 1 proposed in an embodiment of the application may further include a first processor 14 and storing the first processor 14 A first memory 15 for the processor 14 to execute instructions.
  • the first memory 15 relies on the first processor 14 to perform operations through the first communication bus 16.
  • the executable instructions are executed by the first processor 14 During execution, the method for determining the predicted value of the encoder described above is executed.
  • FIG. 12 is a schematic structural diagram of another optional decoder proposed in an embodiment of this application.
  • the decoder 2 proposed in an embodiment of this application may further include a second processor 25 and store the second processor 25.
  • the second memory 26 of the second processor 25 can execute instructions.
  • the second memory 26 relies on the second processor 25 to perform operations through the second communication bus 27.
  • the executable instructions are executed by the second processor 25 During execution, the above-mentioned method for determining the predicted value of the decoder is executed.
  • the various components in the encoder are coupled together through the first communication bus 16.
  • the first communication bus 16 is used to implement connection and communication between these components.
  • the first communication bus 16 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the communication bus 16 in FIG. 11.
  • the various components in the decoder are coupled together through the second communication bus 27.
  • the second communication bus 27 is used to implement connection and communication between these components.
  • the second communication bus 2 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the communication bus 27 in FIG. 12.
  • An embodiment of the present application provides a storage medium that stores executable instructions, and when the executable instructions are executed by one or more first processors, the first processor executes one or more of the foregoing embodiments The method for determining the predicted value of the encoder.
  • An embodiment of the present application provides a storage medium that stores executable instructions, and when the executable instructions are executed by one or more second processors, the second processor executes one or more of the foregoing embodiments The method for determining the predicted value of the decoder.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Synchronous Link Dynamic Random Access Memory
  • Synchlink DRAM Synchronous Link Dynamic Random Access Memory
  • DRRAM Direct Rambus RAM
  • the processor may be an integrated circuit chip with signal processing capabilities.
  • each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application can 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 can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the embodiments described herein can be implemented by hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable Logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, and others for performing the functions described in this application Electronic unit or its combination.
  • ASIC application specific integrated circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing equipment
  • PLD programmable Logic Device
  • PLD Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the technology described herein can be implemented by modules (such as procedures, functions, etc.) that perform the functions described herein.
  • the software codes can be stored in the memory and executed by the processor.
  • the memory can be implemented in the processor or external to the processor.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a terminal which may be a mobile phone, a computer, a server, or a network device, etc.
  • the embodiment of the application provides a method for determining a predicted value, an encoder, a decoder, and a storage medium.
  • the bit shift parameter of the pixel of the current block used is the same as that of the pixel Position-related, realizes that some pixels at specific positions correspond to their own bit shift parameters, which can effectively reduce the dynamic range of input values during MIP mode prediction. Therefore, the same number of bits is used to represent the MIP input value
  • the data in the dynamic range can be represented more accurately, and the accuracy in the calculation of the MIP prediction value is improved, thereby improving the coding and decoding efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种预测值的确定方法、编码器、解码器以及存储介质,该方法包括:获取当前块相邻像素的重建值(S101);对相邻像素的重建值进行滤波处理,得到当前块的参考值集(S102);基于当前块的大小、当前块中像素亮度分量的比特深度和参考值集,计算预测输入值集(S103);根据当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵(S104);根据预设的比特移位参数矩阵集,以及当前块的大小与当前块中像素的位置之间的对应关系,确定当前块中像素的比特移位参数(S105);根据预测输入值集、当前块的MIP矩阵和像素的比特移位参数,计算当前块的预测值(S106)。

Description

预测值的确定方法、编码器、解码器以及存储介质 技术领域
本申请实施例涉及视频编码领域的帧内预测中基于矩阵的帧内预测技术(MIP,Matrix-based Intra Prediction),尤其涉及一种预测值的确定方法、编码器、解码器以及存储介质。
背景技术
目前,在最新的多功能视频编码(VVC,Versatile Video Coding)中接受了由HHI在联合视频探索小组(JVET,Joint Video Explore Team)-N0217中提出的仿射线性权重帧内预测技术(Affine Linear Weighted Intra Prediction),并更名为MIP,MIP针对帧内亮度编码块大小的不同,在帧内亮度预测过程中增加了不同数量的MIP模式,而后在JVET-O0925中改进了MIP技术。
在视频编解码中,采用MIP确定预测值时中涉及三个表,需要在进行预测值的计算前获取,分别是MIP矩阵A、加权参数表fO和比特移位参数表sW,其中,A矩阵的所有数值A[i][j]和fO都是以无符号7位二进制数字保存,sW是对应于预测模式的偏移,现有VVC中的MIP技术中,需要进行MIP模式预测块中像素的像素值的计算,在像素值的计算中,要对预测模式进行sW的查表,通过查表所得的sW值将用于该预测块的全部像素。
然而,由于偏移量越大,精度越高,但为保证数值范围的完整表示,偏移量的取值不能太大,而无差别使用同一个sW值使得原本取值范围较小的参数也不得不进一步降低表示精度,以适应整个矩阵的所有参数共同的取值变化范围,从而导致其表示精度会有一定损失。可见,现有视频编解码中的预测方法的预测精度较低。
发明内容
本申请实施例提供一种预测值的确定方法、编码器、解码器以及存储介质,能够提高视频编解码中的预测精度,提高编解码速率。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供一种预测值的确定方法,用于编码器,所述方法包括:
获取当前块相邻像素的重建值;
对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
根据所述当前块的大小,确定所述当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;
根据预设的比特移位参数矩阵集,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块中像素的比特移位参数;
根据所述预测输入值集、所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块的预测值。
第二方面,本申请实施例提供一种预测值的确定方法,用于解码器,所述方法包括:
解析码流,获得当前块的大小和编码模式;
当所述当前块的编码模式是基于矩阵的帧内预测模式MIP时,获取当前块相邻像素的重建值,对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
根据所述当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;
基于所述当前块中的每个像素的像素位置,从所述当前块的大小、预测模式索引和预设常数的映射关系中,确定当前块中的每个像素的比特移位参数;
根据所述预测输入值集、所述当前块的MIP矩阵和所述每个像素的比特移位参数,计算所述当前块的预测值。
第三方面,本申请实施例提供一种编码器,所述编码器包括:
第一获取单元,被配置为获取当前块相邻像素的重建值;
第一滤波单元,被配置为对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
第一计算单元,被配置为基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
第一确定单元,被配置为根据所述当前块的大小,确定所述当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;以及根据预设的比特移位参数矩阵集,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块中像素的比特移位参数;
所述第一计算单元,还被配置为根据所述预测输入值集、所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块的预测值。
第四方面,本申请实施例提供一种解码器,所述解码器包括:
解析单元,被配置为解析码流,获得当前块的大小和编码模式;
第二获取单元,被配置为当所述当前块的编码模式是基于矩阵的帧内预测模式MIP时,获取当前块相邻像素的重建值;
第二滤波单元,被配置为对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
第二计算单元,被配置为基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
第二确定单元,被配置为根据所述当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;以及基于所述当前块中的每个像素的像素位置,从所述当前块的大小、预测模式索引和预设常数的映射关系中,确定当前块中的每个像素的比特移位参数;
所述第二计算单元,还被配置为根据所述预测输入值集、所述当前块的MIP矩阵和所述每个像素的比特移位参数,计算所述当前块的预测值。
第五方面,本申请实施例提供一种编码器,所述编码器包括:
第一处理器以及存储有所述第一处理器可执行指令的第一存储器,所述第一存储器通过第一通信总线依赖所述第一处理器执行操作,当所述可执行指令被所述第一处理器执行时,执行上述一个或多个实施例所述的预测值的确定方法。
第六方面,本申请实施例提供一种解码器,所述解码器包括:
第二处理器以及存储有所述第二处理器可执行指令的第二存储器,所述第二存储器通过第二通信总线依赖所述第二处理器执行操作,当所述可执行指令被所述第二处理器执行时,执行上述的一个或多个实施例所述的预测值的确定方法。
第七方面,本申请实施例提供一种存储介质,其中,当所述可执行指令被一个或多个第一处理器执行的时候,所述第一处理器或第二处理器执行上述的一个或多个实施例所述的预测值的确定方法。
本申请实施例提供了一种预测值的确定方法、编码器、解码器以及存储介质,该方法可以包括:获取当前块相邻像素的重建值;对相邻像素的重建值进行滤波处理,得到当前块的参考值集;基于当前块的大小、当前块中像素亮度分量的比特深度和参考值集,计算预测输入值集;根据当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;根据预设的比特移位参数矩阵集,以及当前块的大小与当前块中像素的位置之间的对应关系,确定当前块中像素的比特移位参数;根据预测输入值集、当前块的MIP矩阵和像素的比特移位参数,计算当前块的预测值。在本申请实施例中,在进行当前块中全部像素的预测值的时候,采用的当前块的像素的比特移位参数是与像素的位置相关的,实现了部分特定位置的像素对应自己的比特移位参数,从而能够得到有效降低了MIP模式预测时输入值的动态取值范围,因此,在使用相同的比特数表示MIP输入值和MIP矩阵的情况下,可以更加精确地表示动态范围中的数据,提高了MIP预测值计算过程中的精度,进而提高编解码效率。
附图说明
图1为本申请实施例提供的一种视频编解码系统的设备图;
图2为本申请实施例提供的一种视频编码器的结构示意图;
图3为本申请实施例提供的一种视频解码器的结构示意图;
图4为采用MIP模式对像素进行编码的流程示意图;
图5为采用MIP模式进行编码的流程示意图;
图6为本申请实施例提供的一种可选的预测值的确定方法的流程示意图;
图7为本申请实施例提供的可选的采用MIP模式进行编码的流程示意图;
图8为本申请实施例提供的本申请实施例提供的另一种可选的预测值的确定方法的流程示意图;
图9为本申请实施例提供的一种可选的编码器的结构示意图;
图10为本申请实施例提供的一种可选的解码器的结构示意图;
图11为本申请实施例提供的另一种可选的编码器的结构示意图;
图12为本申请实施例提供的另一种可选的解码器的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请的具体技术方案做进一步详细描述。以下实施例用于说明本申请,但不用来限制本申请的范围。
除非另有定义,本申请所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
下面先对本申请中的名称进行解释说明。
H.266:下一代视频编码标准。
VVC:Versatile Video Coding,多功能视频编码,H.266的别称。
VTM:The Test Model of VVC,是VVC的参考软件测试平台。
MIP:Matrix-based Intra Prediction,基于矩阵的帧内预测。
在本申请实施例中,预测编码的功能是:在视频编码中利用空间或时间上已有的重建图像构造当前块的预测值,仅将原始值和预测值的差值传输,以达到减少传输数据量的目的。其中,在亮度预测中,这里的原始值和预测值可以为亮度的原始值和亮度的预测值;在色度预测中,这里的原始值和预测值可以为色度的原始值和色度的预测值。
帧内预测的功能是:利用与当前块相邻的上一行像素单元和左一列像素单元构造该当前块的预测值。利用当前块周围已经恢复的邻近像素(即与当前块相邻的上一行中的像素单元和左一列中像素单元),对当前块的每个像素单元进行预测。
在已知上述几种基本概念的基础上,本申请实施例提供一种视频编解码的架构,图1为本申请实施例视频编解码的架构的结构示意图,该视频编解码的架构包括一个或多个电子设备11至1K和通信网络01,其中,电子设备11至1K可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有视频编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、电视机、服务器等。
电子设备具有视频编解码功能,包括视频编码器和/或视频解码器。
如图2所示,视频编码器21的组成结构包括:变换与量化单元211、帧内估计单元212、帧内预测单元213、运动补偿单元214、运动估计单元215、反变换与反量化单元216、滤波器控制分析单元217、滤波单元218、编码单元219和解码图像缓存单元210等;其中,滤波单元218可以实现去方块滤波及样本自适应缩进(SAO,Sample Adaptive 0ffset)滤波,编码单元219可以实现头信息编码及基于上下文的自适应二进制算术编码(CABAC,Context-based Adaptive Binary Arithmatic Coding)。
其中,针对输入的源视频数据,通过编码树块(CTU,Coding Tree Unit)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元211对该视频 编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元212和帧内预测单元213是用于对该视频编码块进行帧内预测;帧内估计单元212和帧内预测单元213用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元214和运动估计单元215用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元215执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由运动补偿单元214基于由运动估计单元215所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元213还用于将所选择的帧内预测数据提供到编码单元219,而且运动估计单元215将所计算确定的运动向量数据也发送到编码单元219;此外,反变换与反量化单元216是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元217和滤波单元218去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元210的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元219是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该源视频数据的码流;而解码图像缓存单元210是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元210中。
与视频编码器21对应的视频解码器22,其组成结构如图3所示,包括:头信息解码及CABAC解码单元221、反变换与反量化单元222、帧内预测单元223、运动补偿单元224、去方块滤波及SAO滤波单元225和解码图像缓存单元226等部件;视频图像经过视频编码系统21中变换与量化单元211、帧内估计单元212、帧内预测单元213、运动补偿单元214、运动估计单元215、滤波单元218以及编码单元219等部分处理之后,输出该视频图像的码流;该码流输入视频解码器22中,经过视频解码器22中头信息解码及CABAC解码单元225、反变换与反量化单元222、帧内预测单元223以及运动补偿单元224等部分处理,最终恢复出原来的视频图像。
本申请实施例提供的采用MIP模式进行编解码时,确定预测值的方法主要应用于视频编码中的帧内预测单元213和和视频解码中的帧内预测模块223中,对编码端和解码端同时作用。
在最新的VVC中接受了由HHI在JVET-N0217中提出的仿射线性权重帧内预测技术(Affine Linear Weighted Intra Prediction),并称为基于矩阵的帧内预测技术(MIP,Matrix-based Intra Prediction)。MIP技术针对帧内亮度编码块大小的不同,在帧内亮度预测过程中增加了不同数量的基于矩阵的帧内预测模式(MIP模式),而后在JVET-O0925中改进了MIP技术。
在视频图像中,在最新的VVC中接受了由HHI在联合视频专家组JVET-N0217中提出的Affine Linear Weighted Intra Prediction,并更名为MIP技术,该技术针对帧内亮度编码块大小的不同,在帧内亮度预测过程中增加了不同数量的基于矩阵的帧内预测模式。
为了捕捉自然视频中呈现的更精细的边缘方向,VVC中将视频压缩标准(HEVC,High Efficiency Video Coding)中定义的33种帧内亮度预测角度模式扩展到了65种,包括65种帧内角度预测模式,另外还有两种非角度模式,即编号为0的Planar模式和编号为1的DC模式;所以,VVC中的帧内预测过程中包含两种非角度模式和65种角度模式,这里,将这67种预测模式称为帧内预测的传统模式。
其中,MIP技术根据帧内亮度编码块的大小将亮度块分为三类,设亮度块大小为W*H,则按照亮度块的大小可以将亮度块分为三类:
大小为4×4的亮度块为第一类亮度块的,大小为8×4,4×8和8×8的亮度块为第二类亮度快的,其他大小的亮度块为第三类亮度块。
针对这三种类型的帧内亮度编码块,MIP技术在67种传统帧内预测模式的基础上增加了M种MIP模式。
针对第一类亮度块,M=35,针对第二类亮度块,M=19,针对第三类亮度块,M=11。
具体来说,MIP技术只应用于帧内亮度预测,与传统模式相同,MIP预测的输入也为当前块(相当于下述待编码图像块)的上一行和左一列数据,输出为当前块的预测值,具体的预测过程分为三步:平均,矩阵向量乘法和插值。也就是说,通过对输入的上一行和左一列相邻像素点的重建亮度值进行这三步操作,就可以得到当前块的亮度预测值。
图4为采用MIP模式对像素进行编码的流程示意图,如图4所示,具体实现如下:
第一步:对当前亮度块的上侧相邻参考点进行平均操作获得向量redT,共N个值;对当前亮度块的左侧相邻参考点进行平均操作获得向量redL,共N个值。当亮度块大小为第一类块时,N=2; 当亮度块大小为第二类或第三类块时,N=4。向量redT和向量redL组成一个新的向量pTemp并进行后续操作;
第二步:获取矩阵mWeight,加权参数fO和比特移位参数sW,通过下列公式计算获得如图3中用交叉线标识的当前块的部分预测值:
Figure PCTCN2019107613-appb-000001
Figure PCTCN2019107613-appb-000002
其中,当MipSizeId=0或者1时,采用下列公式计算:
p[0]=pTemp[0]-(1<<(BitDepth-1))    (3)
p[i]=pTemp[i]-pTemp[0]  i=1,...,inSize-1   (4)
当MipSizeId=2时,采用下列公式计算:
p[i]=pTemp[i+1]-pTemp[0]  i=0,...,inSize-2   (5)
其中,predMip[x,y]为(x,y)像素位置的预测值;pTemp[i]为采用MIP模式进行预测时当前块的参考值集中第i个参考值,p[x]为的采用MIP模式进行预测时第i个预测输入值;inSize是根据MIP的模式序号MipSizeId确定的,当MipSizeId的取值等于0时,inSize的取值等于4,当MipSizeId的取值等于1,inSize的取值等于8,当MipSizeId的取值等于2时,inSize的取值等于7,MipSizeId的取值根据当前块大小确定,当当前块大小为4x4时,MipSizeId的取值等于0,当当前块大小为4x8、8x4时,MipSizeId的取值等于1,当当前块大小大于8x8时,MipSizeId的取值等于2,BitDepth是亮度分量的比特深度(bit depth,即使用多少位二进制数表示亮度分量采样值sample),mWeight表示MIP矩阵A,predC、incH和incW用于确定对应于(x,y)像素位置的矩阵元素的参数,“>>”为比特右移操作符,oW表示比特右移操作中使用的移位偏移量,sW表示比特右移位数,fO表示加权参数,sW和fO至少可以根据当前块大小或MipSizeId(由当前块大小决定)的取值确定,例如使用与MipSizeId取值相关的映射表确定sW和fO的值,该映射表中记录的至少在不同MipSizeId取值下sW和fO的取值。
第三步:通过线性插值,获得当前块中剩余的预测值,即可获得如图4中用多个小圆点标识的当前块的部分预测值。
可见,在MIP技术中涉及三个值需要在确定预测值的过程中获取,分别是mWeight、fO和sW,其中,mWeight的值与预测模式、像素空间位置都相关,而fO和sW仅与预测模式相关。而p[i]是通过公式(3)、(4)和(5)计算得到的,mWeight的值和fO都是以无符号7位二进制数字保存。sW是对应于预测模式的偏移,依据预测模式(如下表1所示),取值为5,6,7之一,通过查表1得出,计算矩阵向量乘积可得到该像素的像素值,最终整体存储器需求为4.5395千字节。
表1
Figure PCTCN2019107613-appb-000003
在采用MIP模式进行预测时,对于当前块来说,首先确定所使用模式的索引,根据该模式索引,通过查表得到一个用于当前块的固定的sW值,而后mWeight-fO,再经过右移sW位得到原始浮点数矩阵用于预测值的计算,图5为采用MIP模式进行编码的流程示意图,如图5所示,实现过程如下:
首先,电子设备的编码器在编码时,获取MIP模式的索引号,然后,根据MIP的模式索引号,从映射表中获取机器训练出的mWeight和fO,以及根据MIP的模式索引号,从映射表中获取sW,最后,执行(mWeight[x][y]-fO)>>sW进行预测,得到预测值。
也就是说,现有VVC中的MIP技术,mWeight的所有数值的原始浮点数mWeight f[x][y],是以 从其最小值(常常为负值,以fO表示)起始的偏移量的定点化值表示:
mWeight[x][y]=(mWeight f[x][y]+fO)<<sW   (6)
其中,mWeight[x][y]是以无符号7位二进制数字保存,导致其表示精度会有一定损失,这里sW越大,精度越高,但为保证数值范围的完整表示,sW的取值不能太大,由于在整个矩阵中无差别使用同一个sW值,使得原本取值范围较小的参数也不得不进一步降低表示精度,以适应整个矩阵中所有参数共同的取值变化范围,原始矩阵中的参数的变化范围,与p[i]数据的获取方式也有关联。现有方法中对p[i]数据的计算方式造成了参数变化范围的扩大,降低了权重矩阵中的数据的精度,增大了MIP模式的预测差,降低了编解码效率。
为了提高MIP模式的预测精度,以提高编解码效率,本申请实施例提供一种预测值的确定方法,图6为本申请实施例提供的一种可选的预测值的确定方法的流程示意图,参考图6所示,该方法应用于一编码器中,该方法可以包括:
S101、获取当前块相邻像素的重建值。
编码器在编码的过程中,为了确定出当前块的预测值,首先需要获取当前块相邻像素的重建值,这里相邻像素包括当前块的上一行像素位置的重建值和左一列像素位置的重建值。
S102、对相邻像素的重建值进行滤波处理,得到当前块的参考值集。
编码器在获取到相邻像素的重建值之后,例如,获取到的上一行像素的重建值为redT,共N个值,左一列像素的重建值为redL,共N个值,redT和redL组成一个新的向量pTemp作为当前块的参考值集。
为了经过滤波处理得到当前块的参考值集,在本申请的一些实施例中,得到当前块的参考值的过程可以包括:对相邻像素的重建值分成N个组,计算各组中相邻像素的重建值的均值,将均值作为参考值集中的参考值,N为正整数。
其中,将N设置为预先设定的当前块大小对应的正整数值。也就是说,S102中对相邻像素的重建值进行滤波处理的过程,可以为:先将redT和redL分成N个组,然后对每一组求均值,得到N个均值,将N个均值作为参考集中的参考值。
举例来说,当当前块大小为4x4时,inSize的取值等于4,当当前块大小为4x8、8x4或8x8时,inSize的取值等于8,当当前块大小大于8x8时,inSize的取值等于7。
S103、基于当前块的大小、当前块中像素亮度分量的比特深度和参考值集,计算预测输入值集。
其中,预测输入值集用于根据基于矩阵的帧内预测模式MIP计算当前块的预测值。
在本申请实施例中,当当前块的大小小于设定的阈值时,编码器根据当前块中像素亮度分量的比特深度和参考值集中的指定参考值,计算预测输入值集中的第一个预测输入值;根据参考值集,计算预测输入集中除第一个预测输入值外的其他预测输入值,从而得到预测输入值集。
在本申请的一些实施例中,根据比特深度,计算第一常数;将参考值集中的指定参考值减去所述第一常数之差,确定为第一个预测输入值。
需要说明的是,在本申请实施例中,指定参考值为参考值集中的第一个参考值。
在本申请实施例中,当当前块的大小可以用MipSizeId表示时,MipSizeId为小于2的数时,即MipSizeId等于0或者1时,先根据当前块中像素亮度分量的比特深度的取值,计算第一常数。
在本申请的一些实施例中,第一常数的获取过程为:将第一常数设置为对数值1进行二进制比特左移操作后的取值,其中,二进制比特左移操作使用的左移位数等于比特深度的取值减1。
也就是说,第一常数的取值为对1进行左移后的值,且左移位数为比特深度减1。
在本申请实施例中,预测输入值集用于根据MIP计算当前块的预测值;通过计算得到第一常数之后,可以用参考值中的第一个参考值减去第一常数之差作为第一个预测输入值。
示例性的,可以采用下列公式(3)计算得到第一个预测输入值p[0]。
而其他预测输入值p[i]包括:当前块的大小小于预设阈值时除第一个预测输入值以外的预测输入值;其他预测输入值p[i]还可以包括当前块的大小大于等于预设阈值时的预测输入值,可以采用下列公式(4)或(5)计算得到。
S104、根据当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵。
S105、根据预设的比特移位参数矩阵集,以及当前块的大小与当前块中像素的位置之间的对应关系,确定当前块中像素的比特移位参数。
在本申请的一些实施例中,在编码器中预先存储有一个或多个映射表(例如,MIP矩阵),通过一个或多个映射表,可以确定出当前块的MIP矩阵,用mWeight表示,当前块的比特右移参数sW, 以及当前块的加权参数fO。编码器从预先存储的一个或多个MIP矩阵中,选择与当前块的大小对应的MIP矩阵。
需要说明的是,上述MIP矩阵中的数值是常数,即在MIP预测值的计算过程中不更新MIP矩阵中的数值,MIP矩阵中的常数数值可以根据上述公式(3)-(5)的计算方式,使用离线训练的方法获得;可选地,MIP矩阵中的常数数值可以根据上述公式(3)-(5)的计算方式,从其他不同的p[0]计算方式对应的MIP矩阵推导得到。
在本申请实施例中,fO至少可以根据当前块大小或MipSizeId的取值确定,sW至少可以根据当前块大小(或者MipSizeId)和像素位置确定,或者当前块大小、像素位置的取值以及预测模式索引确定。例如使用与MipSizeId取值相关的映射表确定fO的值,使用与MipSizeId取值相关的映射表确定fO的值,该映射表中记录的至少在不同MipSizeId取值下fO的取值。
在本申请的一些实施例中,编码器根据当前块的大小,以及当前块的大小与当前块中像素的位置之间的对应关系,确定当前块的部分特定像素的位置;根据当前块的大小和预设的比特移位参数矩阵集,确定用于解码当前块的比特移位参数矩阵;根据当前块中的部分特定像素的位置,从当前块的比特移位参数矩阵中,确定当前块中的部分特定像素的比特移位参数。
需要说明的是,预设的比特移位参数矩阵集是事先存储的比特移位参数矩阵。其中,比特移位参数矩阵中的元素是预设的常数,例如,5、6或7。
在本申请实施例中,部分特定像素的位置可以为隔一个像素位置来实现,具体的本申请实施例不作限制,如图4中所示的
Figure PCTCN2019107613-appb-000004
的位置。
在本申请的一些实施例中,比特移位参数矩阵中的元素是预设的常数与可以选取其他数值,本申请实施例不作限制。
在本申请实施例中,针对第一类亮度块、第二类亮度块和第三类亮度块,可以根据预设模式的索引和像素位置确定的sW,具体数值都可以选取其他数值。
在本申请的一些实施例中,编码器根据当前块中的部分特定像素的位置,从当前块的比特移位参数矩阵中,确定当前块中的部分特定像素的比特移位参数的实现过程:确定当前块的编码模式;根据当前块中的部分特定像素的位置和编码模式,从当前块的比特移位参数矩阵中,确定当前块中的部分特定像素的比特移位参数。
在本申请实施例中,sW的确定,可以先对像素位置作为第一索引,后对预测模式作为第二索引来确sW。
也就是说,在本申请实施例中,增加MIP模式计算时,sW数值增加与像素位置相关。
示例性的,sW可以使用二维表格存储。其中一维为模式索引,另一维为像素位置为索引。对于当前块,无论任何类型亮度块的任何MIP模式,通过当前块中像素的位置和预测模式的对应关系来得到。其中,处理sW的值时,需要对mWeight[x][y]和fO适应性倍数调整,在某一像素位置对应的sW的数值变化时,mWeight[x][y]和fO需要得到响应的对应调整变化,成正相关,此时可以达到提高精度的效果。
示例性的,以第一类亮度块为例,储存sW的比特右移参数矩阵变成二维的一个例子如表2所示。
表2
Figure PCTCN2019107613-appb-000005
Figure PCTCN2019107613-appb-000006
其中,像素位置是由当前块大小决定的。对于第二类亮度块和第三类亮度快也是同样的原理进行与像素位置有关的sW的确定的。
示例性的,在采用MIP模式进行预测时,对于当前块来说,首先确定所使用模式的索引和像素位置,根据该模式索引和像素位置,通过查表得到一个用于当前块的像素对应的sW值,而后mWeight-fO,再经过右移sW位得到原始浮点数矩阵用于预测值的计算,图7为采用MIP模式进行编码的流程示意图,如图7所示,实现过程如下:
首先,电子设备的编码器在编码时,获取MIP模式的索引号,然后,根据MIP的模式索引号,从映射表中获取机器训练出的mWeight和fO,以及根据MIP的模式索引号和像素位置,从比特移位参数矩阵中获取像素对应的sW,即根据模式索引号确定sW映射,再根据像素位置,确定具体的sW,假设当前像素位于左上角,则该当前像素对应的sW的值以6为例,如图7中的所示当前块的特定位置的像素对应的sW为4×4的数据块A,最后,执行(mWeight[x][y]-fO)>>sW进行特定位置的像素的预测,基于特定位置的像素预测结果,继续确定其他位置的像素的预测结果,得到当前块的预测值。
mWeight的所有数值的原始浮点数mWeight f[x][y],是以从其最小值(常常为负值,以fO表示)起始的偏移量的定点化值表示为公式(6)。
其中,mWeight[x][y]是以无符号7位二进制数字保存,导致其表示精度会有一定损失,这里sW越大,精度越高,但为保证数值范围的完整表示,sW的取值不能太大。在本申请实施例中,sW可以与像素位置相关,也可以与像素位置和预测模式相关,是图4中
Figure PCTCN2019107613-appb-000007
靠近右边界或下边界的像素,他们受到像素位置影响更为明显。在本申请实施例中,通过MIP预测得到的靠近右边界或下边界的像素值变化范围较大,其像素精度低于靠近左上边界的像素,故靠近左上边界像素的sW应取较大值,靠近右边界或下边界像素的sW应取较小值。sW必须取得靠近右边界或下边界的较小值,才能保证其他表格(mWeight f[x][y]和fO)都能以无符号7位二进制数字存储。所以sW设为与像素位置相关的参数,使得MIP预测块靠近左上边界的像素精度提高。
S106、根据预测输入值集、当前块的MIP矩阵和像素的比特移位参数,计算当前块的预测值。
在本申请实施例中,在确定出所有的预测输入值,可以得到预测输入值集,根据预测输入值集,就可以进行预测,得到当前块中特定位置像素的预测值,例如,图4中用交叉线标识的像素位置的预测值。
为了确定出当前块中特定位置像素的预测值,在一种可选的实施例中,S106可以包括:根据预测输入值集,当前块的MIP矩阵和像素的比特移位参数,计算当前块中特定位置的像素的预测值;对特定位置的像素的预测值进行滤波处理,得到当前块中全部像素的预测值。详细的,对特定位置的像素的预测值进行插值滤波,得到当前块中除了特定位置外其他位置的像素的预测值。
在本申请实施例中,从预先存储的一个或多个映射表中,确定与当前块大小对应的当前块的MIP矩阵、当前块的像素的比特移位参数和当前块的加权参数;根据输入值集、当前块的MIP矩阵、当前块的像素的比特移位参数和当前块的加权参数,计算当前块中特定位置的像素的预测值。
也就是说,在从映射表中获取到上述参数之后,可以将上述参数和输入值集输入至公式(1)和公式(2),计算得到当前块中特定像素位置的预测值。
在本申请实施例中,结合当前块的大小,从映射表中获取与当前块大小对应的当前块的MIP矩阵,当前块的像素的比特移位参数,以及当前块的加权参数,例如,当当前块的大小为4x4时,MipSizeId的取值等于0,当当前块大小为4x8、8x4或8x8时,MipSizeId的取值等于1,当当前块大小大于8x8时,MipSizeId的取值等于2。可以根据MipSizeId的值和像素的特定位置,从映射表 中查找到与当前块大小对应的当前块的MIP矩阵,以及从表2中确定当前块的像素的比特移位参数。
通过S106确定出特定位置的预测值之后,可以继续对特定位置的预测值进行滤波处理,以得到当前块中全部像素的预测值。
为了得到当前块中全部像素的预测值,在一种可选的实施例中,S106可以包括:对特定位置像素的预测值进行插值滤波,得到当前块中除了特定位置外其他位置的像素的预测值。
这里,主要是对特定位置的像素的预测值进行插值滤波,就可以得到输了特定位置以外的其他位置的像素的预测值,从而就可以得到当前块中全部像素的预测值。
可以理解的是,在本申请实施例中,在进行当前块中全部像素的预测值的时候,采用的当前块的像素的比特移位参数是与像素的位置相关的,实现了部分特定位置的像素对应自己的比特移位参数,从而能够得到有效降低了MIP模式预测时输入值的动态取值范围,因此,在使用相同的比特数表示MIP输入值和MIP矩阵的情况下,可以更加精确地表示动态范围中的数据,提高了MIP预测值计算过程中的精度,进而提高编码效率。
为了提高MIP模式的预测精度,以提高解码效率,本申请实施例提供一种预测值的确定方法,图8为本申请实施例提供的另一种可选的预测值的确定方法的流程示意图,参考图8所示,该方法应用于一解码器中,该方法可以包括:
S201、解析码流,获得当前块的大小和编码模式。
在解码器中,在接收到码流之后,首先,解析码流,从而可以获取到当前块的大小和编码模式,其中,编码模式可以为传统帧内预测模式中的一种模式,还可以为MIP模式的中一种模式,这里,主要是针对MIP模式中的一种模式。
S202、当当前块的编码模式是基于矩阵的帧内预测模式MIP时,获取当前块相邻像素的重建值,对相邻像素的重建值进行滤波处理,得到当前块的参考值集。
例如,当前块的大小为4x4,4x8、8x4或者8x8,当当前块的大小为4x4,编码模式M=35中的一种模式,当当前块的大小为4x8、8x4或者8x8时,编码模式M=19中的一种模式,当当前块为其他大小,编码模式M=11中的一种模式。
也就是说,当当前块的编码模式为MIP模式时,首先解码器获取当前块相邻像素的重建值,这里相邻像素包括当前块的上一行像素位置的重建值和左一列像素位置的重建值。
在获取到相邻像素的重建值之后,例如,获取到的上一行像素的重建值为redT,共N个值,左一列像素的重建值为redL,共N个值,redT和redL组成一个新的向量pTemp作为当前块的参考值集。
为了经过滤波处理得到当前块的参考值集,在一种可选的实施例中,S202中,对相邻像素的重建值进行滤波处理,得到当前块的参考值集,包括:将相邻像素的重建值分成N个组,计算各组中相邻像素的重建值的均值,将均值作为参考值集中的参考值,N为正整数。
其中,将N设置为预先设定的当前块大小对应的正整数值。
也就是说,S202中对相邻像素的重建值进行滤波处理的过程,具体可以为:先将redT和redL分成N个组,然后对每一组求均值,得到N个均值,将N个均值作为参考集中的参考值。
举例来说,当当前块大小为4x4时,inSize的取值等于4,当当前块大小为4x8、8x4或8x8时,inSize的取值等于8,当当前块大小大于8x8时,inSize的取值等于7。
S203、基于当前块的大小、当前块中像素亮度分量的比特深度和参考值集,计算预测输入值集。
在本申请实施例中,解码器实现S203的过程与编码器侧的实现的S103的原理,描述一致,此处不再赘述。
S204、根据当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵。
在本申请实施例中,解码器实现S204的过程与编码器侧的实现的S104的原理,描述一致,此处不再赘述。
S205、基于当前块中的每个像素的像素位置,从当前块的大小、预测模式索引和预设常数的映射关系中,确定当前块中的每个像素的比特移位参数。
在本申请实施例中,解码器实现S205的过程与编码器侧的实现的S105的原理,描述一致,此处不再赘述。
S206、根据预测输入值集、当前块的MIP矩阵和每个像素的比特移位参数,计算当前块的预测值。
在本申请实施例中,解码器实现S206的过程与编码器侧的实现的S106的原理,描述一致,此处不再赘述。
可以理解的是,在本申请实施例中,在进行当前块中全部像素的预测值的时候,采用的当前块的像素的比特移位参数是与像素的位置相关的,实现了部分特定位置的像素对应自己的比特移位参数,从而能够得到有效降低了MIP模式预测时输入值的动态取值范围,因此,在使用相同的比特数表示MIP输入值和MIP矩阵的情况下,可以更加精确地表示动态范围中的数据,提高了MIP预测值计算过程中的精度,进而提高解码效率。
基于同一发明构思下,本申请实施例提供一种编码器,图9为本申请实施例提供的一种可选的编码器1的结构示意图,如图9所示,该编码器可以包括:
第一获取单元10,被配置为获取当前块相邻像素的重建值;
第一滤波单元11,被配置为对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
第一计算单元12,被配置为基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
第一确定单元13,被配置为根据所述当前块的大小,确定所述当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;以及根据预设的比特移位参数矩阵集,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块中像素的比特移位参数;
所述第一计算单元12,还被配置为根据所述预测输入值集、所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块的预测值。
在本申请的一些实施例中,所述第一确定单元13,还被配置为根据所述当前块的大小,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块的部分特定像素的位置;根据所述当前块的大小和预设的比特移位参数矩阵集,确定用于解码所述当前块的比特移位参数矩阵;根据所述当前块中的部分特定像素的位置,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
在本申请的一些实施例中,所述比特移位参数矩阵中的元素是预设的常数。
在本申请的一些实施例中,所述第一确定单元13,还被配置为确定当前块的编码模式;根据所述当前块中的部分特定像素的位置和所述编码模式,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
在本申请的一些实施例中,所述第一确定单元13,还被配置为从所述预先存储的一个或多个MIP矩阵中,选择与所述当前块的大小对应的所述MIP矩阵。
在本申请的一些实施例中,所述第一计算单元12,还被配置为当所述当前块的大小小于设定的阈值时,根据所述当前块中像素亮度分量的比特深度和所述参考值集中的指定参考值,计算所述预测输入值集中的第一个预测输入值;根据所述参考值集,计算所述预测输入集中除第一个预测输入值外的其他预测输入值,从而得到所述预测输入值集。
在本申请的一些实施例中,所述第一滤波单元11,还被配置为所述滤波处理对所述相邻像素的重建值分成N个组,计算各组中所述相邻像素的重建值的均值,将所述均值作为所述参考值集中的参考值。
在本申请的一些实施例中,将N设置为预先设定的所述当前块大小对应的正整数值。
在本申请的一些实施例中,所述第一计算单元12,还被配置为根据所述比特深度,计算第一常数;将所述参考值集中的指定参考值减去所述第一常数之差,确定为所述第一个预测输入值。
在本申请的一些实施例中,所述第一计算单元12,还被配置为将所述第一常数设置为对数值1进行二进制比特左移操作后的取值,其中,所述二进制比特左移操作使用的左移位数等于所述比特深度的取值减1。
在本申请的一些实施例中,所述指定参考值是所述参考值集中的第一个参考值。
在本申请的一些实施例中,所述第一计算单元12,还被配置为根据所述预测输入值集,所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块中特定位置的像素的预测值;对所述特定位置的像素的预测值进行滤波处理,得到所述当前块中全部像素的预测值。
在本申请的一些实施例中,所述第一计算单元12,还被配置为对所述特定位置的像素的预测值进行插值滤波,得到所述当前块中除了特定位置外其他位置的像素的预测值。
可以理解的是,在本申请实施例中,在进行当前块中全部像素的预测值的时候,采用的当前块的像素的比特移位参数是与像素的位置相关的,实现了部分特定位置的像素对应自己的比特移位参数,从而能够得到有效降低了MIP模式预测时输入值的动态取值范围,因此,在使用相同的比特数表示MIP输入值和MIP矩阵的情况下,可以更加精确地表示动态范围中的数据,提高了MIP预测 值计算过程中的精度,进而提高编码效率。
基于同一发明构思下,本申请实施例提供一种解码器,图10为本申请实施例提供的一种可选的解码器2的结构示意图,如图10所示,该解码器2可以包括:
解析单元20,被配置为解析码流,获得当前块的大小和编码模式;
第二获取单元21,被配置为当所述当前块的编码模式是基于矩阵的帧内预测模式MIP时,获取当前块相邻像素的重建值;
第二滤波单元22,被配置为对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
第二计算单元23,被配置为基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
第二确定单元24,被配置为根据所述当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;以及基于所述当前块中的每个像素的像素位置,从所述当前块的大小、预测模式索引和预设常数的映射关系中,确定当前块中的每个像素的比特移位参数;
所述第二计算单元23,还被配置为根据所述预测输入值集、所述当前块的MIP矩阵和所述每个像素的比特移位参数,计算所述当前块的预测值。
在本申请的一些实施例中,所述第二确定单元24,还被配置为根据所述当前块的大小,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块的部分特定像素的位置;
根据所述当前块的大小和预设的比特移位参数矩阵集,确定用于解码所述当前块的比特移位参数矩阵;
根据所述当前块中的部分特定像素的位置,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
在本申请的一些实施例中,所述比特移位参数矩阵中的元素是预设的常数。
在本申请的一些实施例中,所述第二确定单元24,还被配置为根据所述当前块中的部分特定像素的位置和所述编码模式,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
在本申请的一些实施例中,所述第二确定单元24,还被配置为从所述预先存储的一个或多个MIP矩阵中,选择与所述当前块的大小对应所述MIP矩阵。
在本申请的一些实施例中,所述第二计算单元23,还被配置为当所述当前块的大小小于设定的阈值时,根据所述当前块中像素亮度分量的比特深度和所述参考值集中的指定参考值,计算所述预测输入值集中的第一个预测输入值;根据所述参考值集,计算所述预测输入集中除第一个预测输入值外的其他预测输入值,从而得到所述预测输入值集。
在本申请的一些实施例中,所述第二滤波单元22,还被配置为所述滤波处理对所述相邻像素的重建值分成N个组,计算各组中所述相邻像素的重建值的均值,将所述均值作为所述参考值集中的参考值。
在本申请的一些实施例中,将N设置为预先设定的所述当前块大小对应的正整数值。
在本申请的一些实施例中,所述第二计算单元23,还被配置为根据所述比特深度,计算第一常数;将所述参考值集中的指定参考值减去所述第一常数之差,确定为所述第一个预测输入值。
在本申请的一些实施例中,所述第二计算单元23,还被配置为将所述第一常数设置为对数值1进行二进制比特左移操作后的取值,其中,所述二进制比特左移操作使用的左移位数等于所述比特深度的取值减1。
在本申请的一些实施例中,所述指定参考值是所述参考值集中的第一个参考值。
在本申请的一些实施例中,所述第二计算单元23,还被配置为根据所述预测输入值集,所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块中特定位置的像素的预测值;对所述特定位置的像素的预测值进行滤波处理,得到所述当前块中全部像素的预测值。
在本申请的一些实施例中,所述第二计算单元23,还被配置为对所述特定位置的像素的预测值进行插值滤波,得到所述当前块中除了特定位置外其他位置的像素的预测值。
可以理解的是,在本申请实施例中,在进行当前块中全部像素的预测值的时候,采用的当前块的像素的比特移位参数是与像素的位置相关的,实现了部分特定位置的像素对应自己的比特移位参数,从而能够得到有效降低了MIP模式预测时输入值的动态取值范围,因此,在使用相同的比特数表示MIP输入值和MIP矩阵的情况下,可以更加精确地表示动态范围中的数据,提高了MIP预测 值计算过程中的精度,进而提高解码效率。
图11为本申请实施例提出的另一种可选的编码器的结构示意图,如图11所示,本申请实施例提出的编码器1还可以包括第一处理器14以及存储有所述第一处理器14可执行指令的第一存储器15,所述第一存储器15通过第一通信总线16依赖所述第一处理器14执行操作,当所述可执行指令被所述第一处理器14执行时,执行上述编码器的预测值的确定方法。
图12为本申请实施例提出的另一种可选的解码器的结构示意图,如图12所示,本申请实施例提出的解码器2还可以包括第二处理器25以及存储有所述第二处理器25可执行指令的第二存储器26,所述第二存储器26通过第二通信总线27依赖所述第二处理器25执行操作,当所述可执行指令被所述第二处理器25执行时,执行上述解码器的预测值的确定方法。
需要说明的是,实际应用时,编码器中的各个组件通过第一通信总线16耦合在一起。可理解,第一通信总线16用于实现这些组件之间的连接通信。第一通信总线16除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图11中将各种总线都标为通信总线16。
需要说明的是,实际应用时,解码器中的各个组件通过第二通信总线27耦合在一起。可理解,第二通信总线27用于实现这些组件之间的连接通信。第二通信总线2除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图12中将各种总线都标为通信总线27。
本申请实施例提供了一种存储介质,存储有可执行指令,当所述可执行指令被一个或多个第一处理器执行的时候,所述第一处理器执行上述一个或多个实施例所述的编码器的预测值的确定方法。
本申请实施例提供了一种存储介质,存储有可执行指令,当所述可执行指令被一个或多个第二处理器执行的时候,所述第二处理器执行上述一个或多个实施例所述的解码器的预测值的确定方法。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
而处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。
对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包 含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机、计算机、服务器、或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本申请的保护之内。
工业实用性
本申请实施例提供了一种预测值的确定方法、编码器、解码器以及存储介质,在进行当前块中全部像素的预测值的时候,采用的当前块的像素的比特移位参数是与像素的位置相关的,实现了部分特定位置的像素对应自己的比特移位参数,从而能够得到有效降低了MIP模式预测时输入值的动态取值范围,因此,在使用相同的比特数表示MIP输入值和MIP矩阵的情况下,可以更加精确地表示动态范围中的数据,提高了MIP预测值计算过程中的精度,进而提高编解码效率。

Claims (31)

  1. 一种预测值的确定方法,用于编码器,其中,包括:
    获取当前块相邻像素的重建值;
    对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
    基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
    根据所述当前块的大小,确定所述当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;
    根据预设的比特移位参数矩阵集,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块中像素的比特移位参数;
    根据所述预测输入值集、所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块的预测值。
  2. 根据权利要求1所述的方法,其中,所述根据预设的比特移位参数矩阵集,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块中像素的比特移位参数,包括:
    根据所述当前块的大小,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块的部分特定像素的位置;
    根据所述当前块的大小和预设的比特移位参数矩阵集,确定用于解码所述当前块的比特移位参数矩阵;
    根据所述当前块中的部分特定像素的位置,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
  3. 根据权利要求2所述的方法,其中,
    所述比特移位参数矩阵中的元素是预设的常数。
  4. 根据权利要求2所述的方法,其中,所述根据所述当前块中的部分特定像素的位置,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数,包括:
    确定当前块的编码模式;
    根据所述当前块中的部分特定像素的位置和所述编码模式,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
  5. 根据权利要求1所述的方法,其中,所述根据所述当前块的大小,确定所述当前块的基于矩阵的帧内预测MIP模式的MIP矩阵,包括:
    从所述预先存储的一个或多个MIP矩阵中,选择与所述当前块的大小对应的所述MIP矩阵。
  6. 根据权利要求1所述的方法,其中,所述基于所述当前块的大小、当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集,包括:
    当所述当前块的大小小于设定的阈值时,根据所述当前块中像素亮度分量的比特深度和所述参考值集中的指定参考值,计算所述预测输入值集中的第一个预测输入值;
    根据所述参考值集,计算所述预测输入集中除第一个预测输入值外的其他预测输入值,从而得到所述预测输入值集。
  7. 根据权利要求1或6所述的方法,其中,所述对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集,包括:
    所述滤波处理对所述相邻像素的重建值分成N个组,计算各组中所述相邻像素的重建值的均值,将所述均值作为所述参考值集中的参考值。
  8. 根据权利要求7所述的方法,其中,所述方法还包括:
    将N设置为预先设定的所述当前块大小对应的正整数值。
  9. 根据权利要求6所述的方法,其中,所述根据所述当前块中像素亮度分量的比特深度和所述参考值集中的指定参考值,计算所述预测输入值集中的第一个预测输入值,包括:
    根据所述比特深度,计算第一常数;
    将所述参考值集中的指定参考值减去所述第一常数之差,确定为所述第一个预测输入值。
  10. 根据权利要求9所述的方法,其中,所述根据所述比特深度,计算第一常数,包括:
    将所述第一常数设置为对数值1进行二进制比特左移操作后的取值,其中,所述二进制比特左移操作使用的左移位数等于所述比特深度的取值减1。
  11. 根据权利要求1至10任一项所述的方法,其中,
    所述指定参考值是所述参考值集中的第一个参考值。
  12. 根据权利要求1所述的方法,其中,所述根据所述预测输入值集、所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块的预测值,包括:
    根据所述预测输入值集,所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块中特定位置的像素的预测值;
    对所述特定位置的像素的预测值进行滤波处理,得到所述当前块中全部像素的预测值。
  13. 根据权利要求12所述的方法,其中,所述对所述特定位置的像素的预测值进行滤波处理,得到所述当前块中全部像素的预测值,包括:
    对所述特定位置的像素的预测值进行插值滤波,得到所述当前块中除了特定位置外其他位置的像素的预测值。
  14. 一种预测值的确定方法,用于解码器,其特征在于,包括:
    解析码流,获得当前块的大小和编码模式;
    当所述当前块的编码模式是基于矩阵的帧内预测模式MIP时,获取当前块相邻像素的重建值,对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
    基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
    根据所述当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;
    基于所述当前块中的每个像素的像素位置,从所述当前块的大小、预测模式索引和预设常数的映射关系中,确定当前块中的每个像素的比特移位参数;
    根据所述预测输入值集、所述当前块的MIP矩阵和所述每个像素的比特移位参数,计算所述当前块的预测值。
  15. 根据权利要求14所述的方法,其中,所述根据预设的比特移位参数矩阵集,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块中像素的比特移位参数,包括:
    根据所述当前块的大小,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块的部分特定像素的位置;
    根据所述当前块的大小和预设的比特移位参数矩阵集,确定用于解码所述当前块的比特移位参数矩阵;
    根据所述当前块中的部分特定像素的位置,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
  16. 根据权利要求15所述的方法,其中,
    所述比特移位参数矩阵中的元素是预设的常数。
  17. 根据权利要求15所述的方法,其中,
    所述根据所述当前块中的部分特定像素的位置,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数,包括:
    根据所述当前块中的部分特定像素的位置和所述编码模式,从所述当前块的比特移位参数矩阵中,确定所述当前块中的部分特定像素的比特移位参数。
  18. 根据权利要求14所述的方法,其中,所述根据所述当前块的大小,确定所述当前块的基于矩阵的帧内预测MIP模式的MIP矩阵,包括:
    从所述预先存储的一个或多个MIP矩阵中,选择与所述当前块的大小对应所述MIP矩阵。
  19. 根据权利要求14所述的方法,其中,所述基于所述当前块的大小、当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集,包括:
    当所述当前块的大小小于设定的阈值时,根据所述当前块中像素亮度分量的比特深度和所述参考值集中的指定参考值,计算所述预测输入值集中的第一个预测输入值;
    根据所述参考值集,计算所述预测输入集中除第一个预测输入值外的其他预测输入值,从而得到所述预测输入值集。
  20. 根据权利要求14或19所述的方法,其中,所述对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集,包括:
    所述滤波处理对所述相邻像素的重建值分成N个组,计算各组中所述相邻像素的重建值的均值,将所述均值作为所述参考值集中的参考值。
  21. 根据权利要求20所述的方法,其中,所述方法还包括:
    将N设置为预先设定的所述当前块大小对应的正整数值。
  22. 根据权利要求19所述的方法,其中,所述根据所述当前块中像素亮度分量的比特深度和所述参考值集中的指定参考值,计算所述预测输入值集中的第一个预测输入值,包括:
    根据所述比特深度,计算第一常数;
    将所述参考值集中的指定参考值减去所述第一常数之差,确定为所述第一个预测输入值。
  23. 根据权利要求22所述的方法,其中,所述根据所述比特深度,计算第一常数,包括:
    将所述第一常数设置为对数值1进行二进制比特左移操作后的取值,其中,所述二进制比特左移操作使用的左移位数等于所述比特深度的取值减1。
  24. 根据权利要求14至23任一项所述的方法,其中,
    所述指定参考值是所述参考值集中的第一个参考值。
  25. 根据权利要求14所述的方法,其中,所述根据所述预测输入值集、所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块的预测值,包括:
    根据所述预测输入值集,所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块中特定位置的像素的预测值;
    对所述特定位置的像素的预测值进行滤波处理,得到所述当前块中全部像素的预测值。
  26. 根据权利要求25所述的方法,其中,所述对所述特定位置的像素的预测值进行滤波处理,得到所述当前块中全部像素的预测值,包括:
    对所述特定位置的像素的预测值进行插值滤波,得到所述当前块中除了特定位置外其他位置的像素的预测值。
  27. 一种编码器,其中,所述编码器包括:
    第一获取单元,被配置为获取当前块相邻像素的重建值;
    第一滤波单元,被配置为对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
    第一计算单元,被配置为基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
    第一确定单元,被配置为根据所述当前块的大小,确定所述当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;以及根据预设的比特移位参数矩阵集,以及所述当前块的大小与所述当前块中像素的位置之间的对应关系,确定所述当前块中像素的比特移位参数;
    所述第一计算单元,还被配置为根据所述预测输入值集、所述当前块的MIP矩阵和所述像素的比特移位参数,计算所述当前块的预测值。
  28. 一种解码器,其中,所述解码器包括:
    解析单元,被配置为解析码流,获得当前块的大小和编码模式;
    第二获取单元,被配置为当所述当前块的编码模式是基于矩阵的帧内预测模式MIP时,获取当前块相邻像素的重建值;
    第二滤波单元,被配置为对所述相邻像素的重建值进行滤波处理,得到所述当前块的参考值集;
    第二计算单元,被配置为基于所述当前块的大小、所述当前块中像素亮度分量的比特深度和所述参考值集,计算预测输入值集;
    第二确定单元,被配置为根据所述当前块的大小,确定当前块的基于矩阵的帧内预测MIP模式的MIP矩阵;以及基于所述当前块中的每个像素的像素位置,从所述当前块的大小、预测模式索引和预设常数的映射关系中,确定当前块中的每个像素的比特移位参数;
    所述第二计算单元,还被配置为根据所述预测输入值集、所述当前块的MIP矩阵和所述每个像素的比特移位参数,计算所述当前块的预测值。
  29. 一种编码器,其中,所述编码器包括:
    第一处理器以及存储有所述第一处理器可执行指令的第一存储器,所述第一存储器通过第一通信总线依赖所述第一处理器执行操作,当所述可执行指令被所述第一处理器执行时,执行上述的权利要求1至13任一项所述的预测值的确定方法。
  30. 一种解码器,其中,所述解码器包括:
    第二处理器以及存储有所述第二处理器可执行指令的第二存储器,所述第二存储器通过第二通信总线依赖所述第二处理器执行操作,当所述可执行指令被所述第二处理器执行时,执行上述的权利要求14至26任一项所述的预测值的确定方法。
  31. 一种存储介质,其中,存储有可执行指令,当所述可执行指令被一个或多个第一处理器 执行的时候,所述第一处理器执行所述的权利要求1至13任一项所述的预测值的确定方法;或者,当所述可执行指令被一个或多个第二处理器执行的时候,所述第一处理器执行所述的权利要求14至26任一项所述的预测值的确定方法。
PCT/CN2019/107613 2019-09-24 2019-09-24 预测值的确定方法、编码器、解码器以及存储介质 WO2021056224A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/107613 WO2021056224A1 (zh) 2019-09-24 2019-09-24 预测值的确定方法、编码器、解码器以及存储介质
CN201980085524.6A CN113261279B (zh) 2019-09-24 2019-09-24 预测值的确定方法、编码器、解码器以及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/107613 WO2021056224A1 (zh) 2019-09-24 2019-09-24 预测值的确定方法、编码器、解码器以及存储介质

Publications (1)

Publication Number Publication Date
WO2021056224A1 true WO2021056224A1 (zh) 2021-04-01

Family

ID=75165541

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/107613 WO2021056224A1 (zh) 2019-09-24 2019-09-24 预测值的确定方法、编码器、解码器以及存储介质

Country Status (2)

Country Link
CN (1) CN113261279B (zh)
WO (1) WO2021056224A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516728A (zh) * 2015-12-15 2016-04-20 华中科技大学 一种H.265/HEVC中8x8子宏块的并行帧内预测方法
CN109792521A (zh) * 2016-10-04 2019-05-21 韩国电子通信研究院 用于对图像进行编码/解码的方法和设备以及存储比特流的记录介质
CN109804624A (zh) * 2016-10-04 2019-05-24 株式会社Kt 用于处理视频信号的方法和设备
CN109996083A (zh) * 2017-12-29 2019-07-09 杭州海康威视数字技术股份有限公司 帧内预测方法及装置
US10404980B1 (en) * 2018-07-10 2019-09-03 Tencent America LLC Intra prediction with wide angle mode in video coding

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4678015B2 (ja) * 2007-07-13 2011-04-27 富士通株式会社 動画像符号化装置及び動画像符号化方法
WO2012134046A2 (ko) * 2011-04-01 2012-10-04 주식회사 아이벡스피티홀딩스 동영상의 부호화 방법
CN103379319B (zh) * 2012-04-12 2018-03-20 中兴通讯股份有限公司 一种滤波方法、滤波器及包含该滤波器的编码器和解码器
SG10201808973XA (en) * 2012-04-13 2018-11-29 Mitsubishi Electric Corp Image encoding device, image decoding device, image encoding method and image decoding method
US11202079B2 (en) * 2018-02-05 2021-12-14 Tencent America LLC Method and apparatus for video decoding of an affine model in an intra block copy mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516728A (zh) * 2015-12-15 2016-04-20 华中科技大学 一种H.265/HEVC中8x8子宏块的并行帧内预测方法
CN109792521A (zh) * 2016-10-04 2019-05-21 韩国电子通信研究院 用于对图像进行编码/解码的方法和设备以及存储比特流的记录介质
CN109804624A (zh) * 2016-10-04 2019-05-24 株式会社Kt 用于处理视频信号的方法和设备
CN109996083A (zh) * 2017-12-29 2019-07-09 杭州海康威视数字技术股份有限公司 帧内预测方法及装置
US10404980B1 (en) * 2018-07-10 2019-09-03 Tencent America LLC Intra prediction with wide angle mode in video coding

Also Published As

Publication number Publication date
CN113261279B (zh) 2024-04-26
CN113261279A (zh) 2021-08-13

Similar Documents

Publication Publication Date Title
JP7448563B2 (ja) 画像コーデック方法、エンコーダ、デコーダおよび記憶媒体
WO2021004155A1 (zh) 图像分量预测方法、编码器、解码器以及存储介质
WO2021120122A1 (zh) 图像分量预测方法、编码器、解码器以及存储介质
JP2024050765A (ja) 予測値の確定方法、エンコーダー、デコーダー及びコンピューター記憶媒体
CN113784128B (zh) 图像预测方法、编码器、解码器以及存储介质
WO2021056223A1 (zh) 图像编解码方法、编码器、解码器以及存储介质
WO2021056224A1 (zh) 预测值的确定方法、编码器、解码器以及存储介质
WO2022227082A1 (zh) 块划分方法、编码器、解码器以及计算机存储介质
WO2022178686A1 (zh) 编解码方法、编解码设备、编解码系统以及计算机可读存储介质
CN113766233B (zh) 图像预测方法、编码器、解码器以及存储介质
WO2021134327A1 (zh) 变换方法、编码器、解码器以及存储介质
RU2794647C2 (ru) Способы определения значения предсказания, кодер, декодер и компьютерный носитель данных
JP7305769B2 (ja) 予測方向の決定方法、デコーダ及びコンピュータ記憶媒体
WO2024113311A1 (zh) 编解码方法、编解码器、码流以及存储介质
WO2023197189A1 (zh) 编解码方法、装置、编码设备、解码设备以及存储介质
WO2020192180A1 (zh) 图像分量的预测方法、编码器、解码器及计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19947378

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19947378

Country of ref document: EP

Kind code of ref document: A1