WO2020258001A1 - Luminance component prediction method, encoder, decoder and storage medium - Google Patents

Luminance component prediction method, encoder, decoder and storage medium Download PDF

Info

Publication number
WO2020258001A1
WO2020258001A1 PCT/CN2019/092664 CN2019092664W WO2020258001A1 WO 2020258001 A1 WO2020258001 A1 WO 2020258001A1 CN 2019092664 W CN2019092664 W CN 2019092664W WO 2020258001 A1 WO2020258001 A1 WO 2020258001A1
Authority
WO
WIPO (PCT)
Prior art keywords
side length
current block
preset
mip
prediction
Prior art date
Application number
PCT/CN2019/092664
Other languages
French (fr)
Chinese (zh)
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/092664 priority Critical patent/WO2020258001A1/en
Priority to CN201980083001.8A priority patent/CN113243105B/en
Publication of WO2020258001A1 publication Critical patent/WO2020258001A1/en

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

Definitions

  • the embodiments of the present application relate to the technical field of video coding and decoding, and in particular to a method for predicting a luminance component, an encoder, a decoder, and a storage medium.
  • MIP Matrix-based Intra Prediction
  • VVC Versatile Video Coding
  • MIP is based on neural
  • the intra-frame prediction technology of the network uses a multilayer neural network to predict the brightness value of the current block based on the adjacent reconstructed brightness block.
  • the input of MIP prediction is also the data of the adjacent brightness block in the previous row and the left column of the current block, and the output is the brightness component prediction value of the current block.
  • the specific prediction process is divided into three steps: downsampling, matrix vector multiplication and interpolation.
  • the embodiments of the present application provide a luminance component prediction method, an encoder, a decoder, and a storage medium, which can reduce complexity and reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance. Effectively improve coding and decoding efficiency.
  • the embodiment of the present application provides a method for predicting a luminance component, which is applied to an encoder, and the method includes:
  • the size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the length of the second side;
  • the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not the first preset size, constructing a matrix-based intra prediction MIP list corresponding to the current block according to the preset prediction strategy;
  • the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
  • the embodiment of the application provides a method for predicting a luminance component, which is applied to a decoder, and the method includes:
  • the size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the second side length;
  • the code stream data corresponding to the current block is parsed according to the preset prediction strategy to obtain the current block Corresponding MIP list and brightness component prediction values; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
  • An embodiment of the present application provides an encoder, which includes: a first acquisition part, a construction part, and an encoding part,
  • the first acquiring part is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set to The ratio of the first side length to the second side length;
  • the construction part is configured to construct a matrix-based matrix corresponding to the current block according to a preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not a first preset size Intra-frame prediction MIP list; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
  • the first obtaining part is further configured to obtain the predicted value of the luminance component corresponding to the current block according to the MIP list;
  • the coding part is configured to perform coding processing on the current block according to the MIP list and the predicted value of the luminance component to obtain code stream data corresponding to the current block.
  • An embodiment of the present application provides a decoder, the encoder includes: a second acquiring part and a decoding part,
  • the second acquiring part is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio Set as the ratio of the first side length to the second side length;
  • the decoding part is configured to analyze the code stream corresponding to the current block according to the preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold and the size of the current block is not the first preset size Data to obtain the MIP list and the brightness component prediction value corresponding to the current block; wherein the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
  • the second obtaining part is further configured to obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
  • An embodiment of the present application provides an encoder.
  • the encoder includes a first processor, a first memory storing executable instructions of the first processor, a first communication interface, and a first communication interface for connecting to the first processor.
  • An embodiment of the present application provides an encoder, which includes a second processor, a second memory storing executable instructions of the second processor, a second communication interface, and a second communication interface for connecting to the second processor.
  • the embodiment of the present application provides a computer-readable storage medium with a program stored thereon and applied to an encoder and a decoder.
  • the program is executed by a processor, the method for predicting the luminance component as described above is realized.
  • the embodiments of the present application provide a luminance component prediction method, an encoder, a decoder, and a storage medium.
  • the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than Or equal to the second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, the Set the prediction strategy to construct the matrix-based intra prediction MIP list corresponding to the current block; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; The list and the predicted value of the luminance component encode the current block to obtain the code stream data corresponding to the current block.
  • the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then
  • the preset prediction strategy parses the code stream data corresponding to the current block to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; and obtains the image data corresponding to the current block according to the MIP list and the predicted value of the brightness component. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block.
  • the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
  • Figure 1 is a schematic diagram of the arrangement of 67 prediction modes in intra prediction
  • Figure 2 is a schematic flow chart of encoding in MIP mode
  • FIG. 3 is a schematic diagram of the arrangement of the adjacent brightness block on the upper side and the adjacent brightness block on the left side of the current block;
  • Figure 4 is a schematic diagram of the arrangement of determining the DM mode
  • Figure 5 is a schematic diagram of the structure of a video encoding system
  • Figure 6 is a schematic structural diagram of a video decoding system
  • FIG. 7 is a schematic diagram 1 of the implementation process of a luminance component prediction method proposed by an embodiment of the application.
  • FIG. 8 is a schematic diagram of the existing MIP prediction logic branch
  • Fig. 9 is a schematic diagram of MIP prediction logic branches in this application.
  • FIG. 10 is a second schematic diagram of the implementation process of a method for predicting luminance components according to an embodiment of the application.
  • FIG. 11 is a third schematic diagram of the implementation process of a luminance component prediction method proposed by an embodiment of this application.
  • FIG. 12 is a fourth schematic diagram of the implementation process of a method for predicting luminance components according to an embodiment of this application.
  • FIG. 13 is a schematic diagram 5 of the implementation process of a luminance component prediction method proposed by an embodiment of this application.
  • FIG. 14 is a schematic diagram 1 of the composition structure of an encoder proposed in an embodiment of the application.
  • FIG. 15 is a second schematic diagram of the composition structure of the encoder proposed in an embodiment of the application.
  • FIG. 16 is a schematic diagram 1 of the composition structure of a decoder proposed by an embodiment of the application.
  • FIG. 17 is a second schematic diagram of the composition structure of the decoder proposed in an embodiment of the application.
  • VVC accepted the ray-like weighted intra prediction technology (Affine Linear Weighted Intra Prediction) proposed in the Joint Video Experts Team (JVET)-N0217, and changed its name to matrix-based intra prediction , Namely MIP technology, this technology adds a different number of matrix-based intra prediction modes in the intra-frame brightness prediction process according to the different sizes of intra-frame luminance coding blocks.
  • JVET Joint Video Experts Team
  • VVC expands the 33 kinds of intra-frame luminance prediction angle modes defined in the video compression standard (High Efficiency Video Coding, HEVC) to 65 kinds.
  • Figure 1 shows the intra-frame prediction.
  • these 67 prediction modes are referred to as traditional intra prediction modes.
  • MIP is an intra-frame prediction technology based on neural networks, which uses a multilayer neural network to predict the brightness value of the current block based on adjacent reconstructed pixels. Specifically, the MIP technology divides the brightness coding blocks into three categories according to the size of the brightness coding block in the frame. Set the size of the brightness coding block as W ⁇ H, where W is the width parameter and H is the height parameter, according to the size of the brightness coding block Luma coding blocks can be divided into three categories:
  • Luminance coding blocks with a size of 4 ⁇ 4 belong to the first type of luminance block
  • 8 ⁇ 4, 4 ⁇ 8 and 8 ⁇ 8 luminance coding blocks are classified as the second type of luminance block
  • other sizes of luminance coding blocks belong to the third type. Brightness block.
  • MIP technology adds M types of MIP modes on the basis of 67 traditional intra-frame prediction modes.
  • M 35
  • M 11.
  • 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, and the output is the predicted value of the current block.
  • the specific prediction process is divided into three Steps: averaging, matrix vector multiplication and interpolation. In other words, by performing these three operations on the input reconstructed brightness values of the adjacent pixels in the upper row and the left column, the predicted value of the brightness component of the current block can be obtained.
  • FIG. 2 is a schematic flow chart of encoding in MIP mode. As shown in Figure 2, the specific implementation of brightness prediction in MIP mode is as follows:
  • Step 1 Perform averaging operation on the adjacent reference points on the upper side of the current block to obtain the vector bdry top with a total of N values; perform averaging operation on the adjacent reference points on the left side of the current block to obtain the vector bdry left with a total of N values.
  • N the first type of brightness code
  • N 4.
  • Vector bdry top and vector bdry left form a new vector bdry red and perform subsequent operations;
  • Step 2 Obtain the corresponding matrix A k and the offset b k through the mode number k of the MIP mode, and obtain the partial prediction value of the current block as shown in Figure 2 by the following formula (1):
  • Pred red A k ⁇ bdry red +b k (1)
  • Step 3 Obtain the remaining predicted value Predred in the current block through linear interpolation.
  • the decoder can determine which encoding mode is used by analyzing the mode information.
  • One mode whether it is a traditional mode or a MIP mode; if it is a traditional mode, which is the specific traditional mode; if it is a MIP mode, which is the specific MIP mode.
  • VVC intra-frame prediction the rate-distortion cost RDcost of 67 traditional modes and M MIP modes is compared for each luminance coding block, and the optimal mode is selected among 67 traditional modes and M MIP modes. coding.
  • VVC uses the most probable mode list (Most Probable Modes List, MPM)-based intra mode coding technology,
  • the optimal mode selected by the current block is the traditional mode, it is necessary to construct an MPM list containing the 6 most likely traditional modes;
  • the optimal mode selected by the block is the MIP mode, and a MIPMPM list containing the 3 most likely MIP modes needs to be constructed.
  • Figure 3 is a schematic diagram of the arrangement of the adjacent brightness block on the upper side of the current block and the adjacent brightness block on the left side.
  • the optimal mode of the luminance block (A) and the adjacent luminance block (L) on the left is derived.
  • the MPM list needs to be constructed. In the process of constructing the MPM list, it is first necessary to obtain the traditional mode ABOVE corresponding to the optimal mode of the upper adjacent luminance block and the traditional mode LEFT corresponding to the optimal mode of the adjacent luminance block on the left.
  • the MIPMPM list in VVC intra prediction, if the optimal mode of the current block is the MIP mode, the MIPMPM list needs to be constructed. In the process of constructing the MIPMPM list, it is first necessary to obtain the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper adjacent luminance block and the MIP mode LEFT_MIP corresponding to the optimal mode of the adjacent luminance block on the left.
  • MIPMPM the number in MIPMPM is the number of the MIP mode, and the number range is 0 to (M-1)
  • M-1 the number in MIPMPM is the number of the MIP mode
  • the number range is 0 to (M-1)
  • the default list of the first type of brightness block is: ⁇ 17, 34, 5 ⁇ ;
  • the default list of the second type of brightness block is: ⁇ 0, 7, 16 ⁇ ;
  • the default list of the third type of luminance block is: ⁇ 1, 4, 6 ⁇ .
  • FIG. 4 is a schematic diagram of determining the arrangement of the DM mode. As shown in Figure 4, since the MIP technology is only applied to the luma coding block, when the frame at the CR position in Figure 4 When the intra prediction mode is the MIP mode, the MIP mode needs to be mapped to the traditional mode through the "MIP-traditional mapping table" to perform intra prediction of the current chrominance block.
  • DM Direct Mode
  • the traditional mode needs to be mapped to the MIP mode in the construction of the MIPMPM list, and the MIP mode needs to be mapped to the traditional mode in the construction of the MPM list and the determination of the DM mode.
  • mapping from the traditional mode to the MIP mode needs to be used in the MIPMPM list construction process.
  • the traditional mode is mapped to the MIP mode through the "traditional-MIP mapping table”.
  • mapping from the MIP mode to the traditional mode needs to be used in the MPM list construction process and the DM mode acquisition process.
  • 35/19/11 MIP modes are mapped to 67 traditional modes through the "MIP-Traditional Mapping Table".
  • MIP-Traditional Mapping Table For the three types of luminance blocks, three "MIP-traditional mapping tables" are shown in Table 2, Table 3 and Table 4.
  • MIP mode 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
  • Traditional model 0 1 0 1 0 twenty two 18 18 1 0 1 0 1 0 44 0 50 1 0
  • FIG. 5 is a schematic structural diagram of a video encoding system.
  • the video encoding system 100 includes a transform and quantization module 101, an intra-frame estimation module 102, an intra-frame prediction module 103, a motion compensation module 104, and a motion estimation module 105, Inverse transform and inverse quantization module 106, filter control analysis module 107, deblocking filter and sample adaptive indentation (Sample Adaptive Offset, SAO) filter module 108, header information coding and context-based adaptive binary arithmetic coding (Context- Based on Adaptive Binary Arithmatic Coding, CABAC) encoding module 109 and decoded image buffer module 110;
  • Figure 6 is a schematic diagram of the structure of the video decoding system, as shown in Figure 6, the video decoding system 200 includes header information decoding and CABAC decoding module 201 , Inverse transform and inverse quantization module 202, intra-frame prediction module 203, motion compensation module 204, deblocking filter and SAO filter module 205, de
  • the video image passes through the transformation and quantization module 101, the intra-frame estimation module 102, the intra-frame prediction module 103, the motion compensation module 104, the motion estimation module 105, the deblocking filtering and SAO filtering module 108, the header information encoding and CABAC in the video encoding system 100
  • the module 109 and other parts it outputs the code stream of the video image;
  • the code stream is input into the video decoding system 200, and passes through the header information decoding and CABAC decoding module 201 in the video decoding system 200, the inverse transform and inverse quantization module 202, and the intraframe
  • the prediction module 203 and the motion compensation module 204 perform partial processing, and finally restore the original video image.
  • the current block can have 25 sizes.
  • the standard stipulates that the maximum size of the brightness block is 128 ⁇ 128, but since the maximum size of the transform unit is 64 ⁇ 64, that is, the brightness block is at 128 ⁇ Under the size of 128, quadtree division must be performed first, so the maximum luminance block size is 64 ⁇ 64.
  • Table 5 is a schematic table of the size of the brightness block, as shown in Table 5.
  • the MIP mode is restricted according to the height parameter and the width parameter of the current block. Specifically, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block is not encoded in the MIP mode.
  • Table 6 is the limitation of the brightness block size in the MIP mode in the prior art, as shown in Table 6,
  • MipSizeId can be used to indicate the application category of MIP
  • numModes indicates the number of MIP modes
  • boundarySize indicates the number of brightness blocks in the upper reference row or left reference column obtained by downsampling
  • predW indicates the width parameter of the prediction block.
  • predH represents the height parameter of the prediction block
  • predC represents the side length of the MIP matrix.
  • Table 7 shows the grammatical relationship corresponding to the MIP mode in the prior art. As shown in Table 7, the MipSizeId, numModes, boundarySize, predW, predH, and predC in the grammar have the following relationships:
  • the value of MipSizeId is 0 for 4 ⁇ 4 brightness block, the value of 1 is 4 ⁇ 8, 8 ⁇ 4, 8 ⁇ 8 brightness block, and the value is 2 for brightness blocks of other sizes.
  • numModes indicates how many MIP prediction modes there will be, that is, there are 35 types of 4 ⁇ 4 brightness blocks, 19 types of 4 ⁇ 8, 8 ⁇ 4, and 8 ⁇ 8 brightness blocks, and 11 types of brightness blocks of other sizes.
  • the boundarySize indicates that the adjacent luminance blocks in the upper or left column of the current block are finally down-sampled into 2 or 4 adjacent luminance blocks.
  • the current block when the current block is 4 ⁇ 4 in size, 4 adjacent luminance blocks are generated after down-sampling adjacent luminance blocks, that is, the left column and the upper adjacent luminance blocks are both down-sampled into 2 luminance blocks and then spliced, and then Carry out matrix operation to generate 4 ⁇ 4 prediction matrix, a total of 35 modes, no upsampling is required at this time; when the current block is 4 ⁇ 8, 8 ⁇ 4 or 8 ⁇ 8 size, after the adjacent luminance block is downsampled Generate 8 adjacent brightness blocks, that is, the left column and the upper adjacent brightness blocks are down-sampled into 4 brightness blocks and then spliced, and then matrix operation is performed to generate a 4 ⁇ 4 prediction matrix, a total of 19 modes are required.
  • Up-sampling is performed; when the current block is of other sizes, 8 adjacent luminance blocks are generated after the adjacent luminance blocks are down-sampled, that is, the left column and the upper adjacent luminance blocks are all down-sampled into 4 luminance blocks and then spliced.
  • a 4 ⁇ 8 prediction matrix will be generated, a total of 11 modes; when the current block is 16 ⁇ 4, a 8 ⁇ 4 prediction matrix will be generated, a total of 11 modes; the current block is other For large hours, an 8 ⁇ 8 prediction matrix will be generated with a total of 11 modes.
  • Table 8 shows the classification of luminance blocks in MIP mode. As shown in Table 8, according to the size of the generated MIP prediction block, the luminance block can be divided into several situations shown in Table 11: 4 ⁇ 4 size will be generated after matrix operation The brightness block of the prediction block, the brightness block of the 4 ⁇ 8 or 8 ⁇ 4 size prediction block will be generated after the matrix operation, the brightness block of the 8 ⁇ 8 size prediction block will be generated after the matrix operation, and the brightness that is not specified in the current VVC for MIP prediction Piece.
  • the MIP algorithm will have some redundant logic branches. Specifically, when the current block width and height are both less than or equal to 8, it will generate 4 ⁇ 4 prediction blocks, a total of 35 or 19 types; when the current block width and height are greater than 8, except for 4 ⁇ 16 and 16 ⁇ 4, 8 ⁇ 8 prediction blocks will be generated, a total of 11 types; When the block is 4 ⁇ 16, 4 ⁇ 8 prediction blocks will be generated, 11 types in total; when the current block is 16 ⁇ 4, 8 ⁇ 4 prediction blocks will be generated, 11 types in total. For brightness blocks of two sizes, 4 ⁇ 16 and 16 ⁇ 4, the algorithm needs to determine whether to extract odd rows of the existing matrix during matrix operation, and it will also make the prediction block not all square.
  • mWeight and vBias are weight matrices and bias matrices trained by deep learning for each MIP mode.
  • mWeight is the weight matrix of each type of MIP mode
  • vBias is the bias matrix of each type of MIP mode.
  • sB is the left shift of the bias matrix
  • oW is the rounded reserved value
  • sW is the right shift of the overall predicted value. The sW value in different MIP modes needs to be obtained by looking up the table.
  • the encoder uses the variables incW and incH to determine whether it needs to extract the predicted values of odd rows, specifically:
  • the introduction of MIP technology has brought about major changes to the current intra-frame prediction and coding framework. While coding and decoding performance has been improved, a large number of logic branches have also been introduced, which has increased the overall time and complexity. Specifically, the prediction process of the existing MIP model is very cumbersome, with too many branches, which increases the complexity. At the same time, many variables are introduced in the prediction process and the storage space is increased.
  • the luminance component prediction method proposed in this application can be applied to both the encoder and the decoder, which can simplify the MIP prediction process and reduce the complexity and reduce The storage space and overall time required in the small encoding and decoding process can effectively improve the encoding and decoding efficiency.
  • the luminance component prediction method proposed in this application can affect the intra prediction part in the video coding mixing framework, that is, it is mainly used in the intra prediction module 103 in video coding and the intra prediction module 203 in video decoding. Simultaneously act on the encoding end and the decoding end.
  • FIG. 7 is a schematic diagram 1 of the implementation process of a luminance component prediction method proposed in an embodiment of the present application, which is applied to an encoder, as shown in FIG. 7, in the embodiment of the present application,
  • the method for the encoder to predict the luminance component may include the following steps.
  • Step 101 Calculate the size ratio according to the first side length and the second side length corresponding to the current block; where the first side length is greater than or equal to the second side length, and the size ratio is set as the ratio of the first side length and the second side length ratio.
  • the encoder may first calculate the size ratio corresponding to the current block according to the first side length and the second side length corresponding to the current block.
  • the current block may represent the current block to be encoded or the current block to be decoded.
  • the encoder when the encoder performs encoding, the current block is the block to be encoded.
  • the first side length may be the longer side of the current block
  • the second side length may be the shorter side of the current block, that is, the first side length may be greater than or equal to the second side.
  • Side length Specifically, the first side length and the second side length can be respectively the height parameter and the width parameter corresponding to the current block. That is to say, the ratio of the first side length and the second side length, that is, the size ratio, can be either height or width. The ratio can also be an aspect ratio.
  • the size ratio represents the current block corresponding
  • the ratio of the long side to the short side of, therefore, the size ratio is a natural number greater than or equal to 1.
  • the encoder when the encoder encodes the current block, it can first select the optimal encoding mode in the traditional mode and the MIP mode. Specifically, the encoder can select the optimal encoding method according to the size corresponding to the current block. The ratio is used to select the optimal encoding method.
  • an optimal mode can be selected for coding processing in the traditional mode and the MIP mode.
  • the traditional mode includes 67 intra prediction modes including Planar mode numbered 0, DC mode numbered 1, and 65 angle modes.
  • the encoder when the encoder selects the optimal mode, it can compare the Rdcost of 67 traditional modes and M MIP modes on the current block, so that the optimal mode can be selected according to the comparison result. And encode it. Among them, based on the type of the current brightness coding module, the value of M is different.
  • Step 102 If the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, construct the MIP list corresponding to the current block according to the preset prediction strategy; wherein the preset prediction strategy is used based on The size-dependent MIP mode performs brightness prediction.
  • the encoder after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than or equal to the preset ratio threshold, if the size of the current block is If it is not the first preset size, the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy.
  • the preset ratio threshold is equal to 4, and the first preset size is 4 ⁇ 16 and 16 ⁇ 4.
  • the encoder when the encoder encodes the current block according to the MIP mode, it needs to first limit the size of the current block. Specifically, when the size ratio of the current block is less than or equal to 4. And when the size of the current block is not 4 ⁇ 16, and it is not 16 ⁇ 4 at the same time, the encoder will determine the luminance prediction of the current block according to the MIP mode.
  • a size-dependent MIP mode prediction method that is, a preset prediction strategy
  • the block performs brightness prediction, so that the corresponding MIP list can be obtained.
  • Fig. 8 is a schematic diagram of the existing MIP prediction logic branch. As shown in Fig. 8, combined with the above Table 8, in the prior art, when encoding the current block, it is assumed that the first side length is the height parameter, and the second side length is The width parameter, based on the first side length H and the second side length W of the current block, can be encoded through the following steps:
  • S701 Determine whether to use the MIP mode, if yes, execute S702, otherwise execute S7011;
  • S704 Generate a 4 ⁇ 4 prediction matrix through 35 MIP modes, and end.
  • S705 Generate a 4 ⁇ 4 prediction matrix through 19 MIP modes, and end.
  • S707 Generate an 8 ⁇ 8 prediction matrix through 11 MIP modes, and end.
  • S709 Generate a 4 ⁇ 8 prediction matrix through 11 MIP modes, and end.
  • S710 Generate an 8 ⁇ 4 prediction matrix through 11 MIP modes, and end.
  • the MIP algorithm will have some redundant logic branches. Specifically, when the current block is 4 ⁇ 16, 4 ⁇ There are 11 types of 8 prediction blocks; when the current block is 16 ⁇ 4, 8 ⁇ 4 prediction blocks will be generated, a total of 11 types. For brightness blocks of two sizes, 4 ⁇ 16 and 16 ⁇ 4, the algorithm needs to determine whether to extract odd rows of the existing matrix during matrix operation, and it will also make the prediction block not all square.
  • FIG. 9 is a schematic diagram of the MIP prediction logic branch in the application, as shown in FIG. 9, combined with the above-mentioned Table 9,
  • the encoding process can be performed through the following steps:
  • S801 Determine whether to use the MIP mode, if yes, execute S802, otherwise execute S807;
  • S804 Generate a 4 ⁇ 4 prediction matrix through 35 MIP modes, and end.
  • S805 Generate a 4 ⁇ 4 prediction matrix through 19 MIP modes, and end.
  • S806 Generate an 8 ⁇ 8 prediction matrix through 11 MIP modes, and end.
  • the brightness component prediction method proposed in this application can effectively solve the problem that due to the existence of brightness blocks of 4 ⁇ 16 and 16 ⁇ 4, the MIP algorithm will have some redundant logic branches. At the same time, since the obtained prediction blocks are all squares, the determination of whether to extract odd rows of the existing matrix can be avoided during matrix operations.
  • Table 10 is the grammatical relationship corresponding to the MIP mode in this application.
  • the MipSizeId, numModes, boundarySize, predW, predH, and predC in the syntax have the following relationships:
  • the brightness component prediction method proposed in this application can prohibit the use of MIP modes for two brightness blocks of 4 ⁇ 16 and 16 ⁇ 4, and predW and predH when MipSizeId is equal to 2, due to the current
  • the side length of the luminance encoding must be greater than or equal to 8, so it can be directly equal to 8 without performing comparison operations.
  • This change makes predW, predH and predC completely equal, so the syntax can be further simplified, using predC instead of all predW and predH in the MIP mode, that is, the size of the prediction matrix generated by the MIP mode is completely equal to the size of the matrix in the MIP, and there is no need Additional comparison.
  • the encoder after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size of the current block is 4 ⁇ 16 or 16 ⁇ 4, Then, even if the size ratio is less than or equal to 4, the encoder will not encode the current block according to the MIP mode, which can simplify prediction branching and syntax semantics, and reduce time complexity.
  • the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy, where the MIP list is MIPMPM.
  • the MPM intra-mode coding technology is used in VVC.
  • the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper neighboring luminance block
  • the MIP mode LEFT_MIP mode corresponding to the optimal mode of the adjacent brightness block on the left
  • the encoder constructs the MIP list corresponding to the current block according to the preset prediction strategy, it needs to first obtain the first prediction mode of the upper neighboring luminance block corresponding to the current block, and at the same time obtain the left neighbor corresponding to the current block.
  • the second prediction mode of the luma block is to say, before the encoder constructs the MIP list corresponding to the current block according to the preset prediction strategy, it needs to first obtain the first prediction mode of the upper neighboring luminance block corresponding to the current block, and at the same time obtain the left neighbor corresponding to the current block.
  • the second prediction mode of the luma block is to say, before the encoder constructs the MIP list corresponding to the current block according to the preset prediction strategy, it needs to first obtain the first prediction mode of the upper neighboring luminance block corresponding to the current block, and at the same time obtain the left neighbor corresponding to the current block.
  • the second prediction mode of the luma block is to say, before the encoder constructs the MIP list corresponding to the current
  • the size ratio of the current block that is, the aspect ratio and aspect ratio corresponding to the current block are both less than or equal to 4.
  • the size of the current block is not 4 ⁇ 16 and 16 ⁇ 4.
  • the encoder can construct the MIP list according to the first construction strategy based on the first side length and the second side length, where the first construction strategy Used for brightness prediction through 35 MIP modes. Specifically, the encoder may construct the MIP list according to the first prediction mode, the second prediction mode, and 35 MIP modes.
  • the encoder can construct the MIP according to the second construction strategy based on the first side length and the second side length List, where the second construction strategy is used for brightness prediction through 19 MIP modes. Specifically, the encoder may construct the MIP list according to the first prediction mode, the second prediction mode, and 19 MIP modes.
  • the encoder can be based on the first side length and the second side length, according to the third configuration
  • the strategy constructs the MIP list, where the third construct strategy is used for brightness prediction through 11 MIP modes.
  • the encoder may construct the MIP list according to the first prediction mode, the second prediction mode, and 11 MIP modes.
  • Step 103 Obtain the predicted value of the luminance component corresponding to the current block according to the MIP list.
  • Step 104 Perform encoding processing on the current block according to the MIP list and the predicted value of the luminance component to obtain code stream data corresponding to the current block.
  • the encoder after the encoder constructs the MIP list corresponding to the current block according to the preset prediction strategy, it can continue to obtain the brightness component prediction value corresponding to the current block according to the MIP list, and then can directly follow the MIP list and the brightness component The prediction value encodes the current block.
  • the luminance component prediction method proposed in the embodiments of the present application can modify the syntax of the MIP prediction process, while the encoding process of the MIP technology, the construction process of the MIPMPM list, and the traditional mode
  • the syntax of the process of mutual mapping with MIP mode may not be modified.
  • the encoder can obtain the prediction value of the luminance component corresponding to the current block according to the MIP list, so that the encoding process of the current block can be continued.
  • the encoder when the encoder obtains the predicted value of the brightness component corresponding to the current block according to the MIP list, it can read the mode number k of the MIP mode from the MIP list, so as to obtain the corresponding matrix Ak and the offset bk are used to perform matrix vector multiplication according to the above formula (1), so as to obtain the predicted value of the brightness component corresponding to the current block.
  • the encoder can reduce algorithm branches and syntax semantics, making the implementation of MIP technology more concise and unified.
  • 4 The brightness blocks of ⁇ 16 and 16 ⁇ 4 are branched separately, but this application can reduce the number of judgments in the MIP prediction process, avoiding the need to extract odd rows before the matrix is multiplied, and the matrix can be unified
  • the calculation method, and the generated prediction blocks are unified into square blocks, which reduces the probability by half.
  • the luminance component prediction method proposed in the present application reduces the complexity without significant loss in coding performance.
  • the embodiment of the present application in the case of reducing MIP prediction branches, according to the general test standard of VVC, there is no significant loss in overall performance.
  • the BD-rates on Y, U, and V are 0.05%, -0.04%, and -0.04%, respectively.
  • the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed.
  • Matrix intra prediction MIP list among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block.
  • the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
  • FIG. 10 is a schematic diagram of the second implementation flow of a luminance component prediction method proposed in an embodiment of the present application.
  • the encoder is working according to the current block corresponding
  • the first side length and the second side length are calculated to obtain the size ratio, that is, after the above step 101, and before the brightness component prediction value corresponding to the current block is obtained according to the MIP list, that is, before step 103, the method for the encoder to perform the brightness component prediction is also It can include the following steps:
  • Step 105 If the size ratio is less than the preset ratio threshold, construct the MIP list corresponding to the current block according to the preset prediction strategy.
  • the encoder after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than the preset ratio threshold, the encoder can be constructed according to the preset prediction strategy The MIP list corresponding to the current block.
  • the restriction conditions for encoding the block are modified to the restriction conditions in this application that if the aspect ratio of the current block is greater than or equal to 4, or if the aspect ratio is greater than or equal to 4, then the current block is not encoded in the MIP mode. It can effectively solve the problem of excessively redundant logic branches in the MIP algorithm due to the existence of two size brightness blocks of 4 ⁇ 16 and 16 ⁇ 4. At the same time, because the obtained prediction blocks are all square, it can be used in The matrix operation avoids the decision whether to extract odd rows of the existing matrix.
  • the brightness component prediction method proposed in this application can set all aspect ratios including 4 ⁇ 16 and 16 ⁇ 4 brightness blocks to 4, or the aspect ratio to 4. MIP mode is prohibited for the current block of, and predW and predH when MipSizeId is equal to 2, since the side length of the current luminance encoding must be greater than or equal to 8, there is no need to perform comparison operations and can be directly equal to 8.
  • the encoder can reduce algorithm branches and syntax semantics, make the implementation of MIP technology more concise and unified, and reduce the complexity of the MIP mode. Specifically, Compared with the traditional luma intra prediction mode, the calculation complexity of the MIP mode is higher. In the prior art, MIP not only has more branches, but also requires more luma blocks for MIP prediction. In this application, all bandwidths can be removed. Brightness blocks with an aspect ratio greater than or equal to 4, or with an aspect ratio greater than or equal to 4, can specifically include 4 ⁇ 16, 8 ⁇ 32, 16 ⁇ 64, 16 ⁇ 4, 32 ⁇ 8, 64 ⁇ 16 brightness blocks, thereby saving time complexity.
  • the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed.
  • Matrix intra prediction MIP list among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block.
  • the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
  • FIG. 11 is a schematic diagram of the third implementation process of a luminance component prediction method proposed by an embodiment of the application.
  • the encoder is in accordance with the current block corresponding
  • the method for the encoder to perform the brightness component prediction is also It can include the following steps:
  • Step 106 If the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not the first preset side length, construct the MIP list corresponding to the current block according to the preset prediction strategy.
  • the encoder after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than the preset ratio threshold, at the same time, the first side length and the second side length If the length is not the first preset side length, the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy.
  • the first preset side length is equal to 64.
  • the MIP mode when the MIP mode is restricted, if the size ratio of the current block is greater than or equal to 4, and the first side length or the second side length is 64, the MIP mode is not used to The current block is encoded.
  • Table 12 is the third limitation of the brightness block size in the MIP mode in this application.
  • the brightness component prediction method proposed by this application can not only change 4 ⁇ 16, 16 ⁇ 4, 32 ⁇ 8, 8 ⁇ 32, 16 ⁇ 64, and 64 ⁇ 16 Luminance blocks of these sizes are restricted to not perform MIP prediction, and the three types of luminance blocks of 64 ⁇ 32, 32 ⁇ 64, and 64 ⁇ 64 are also restricted to not perform MIP prediction.
  • the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
  • the restriction condition for encoding the block is modified as the restriction condition in this application that if the size ratio of the current block is greater than or equal to 4, and the first side length or the second side length is 64, the current block is not encoded in the MIP mode
  • Fig. 12 is a fourth schematic diagram of the implementation process of a luminance component prediction method proposed by an embodiment of the application.
  • the method for the encoder to predict the luminance component may further include the following steps:
  • Step 107 If the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, construct the MIP list corresponding to the current block according to the preset prediction strategy.
  • the encoder after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than or equal to the preset ratio threshold, if the first side length Neither the second side length nor the second side length is the first preset side length, then the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy.
  • the brightness component prediction method proposed in this application when the MIP mode is restricted, if the size ratio of the current block is greater than 4, and the first side length or the second side length is 64, the current block is not evaluated in the MIP mode. Encode. Table 13 is the limit 4 of the brightness block size in the MIP mode in this application. As shown in Table 13, the brightness component prediction method proposed by this application can not only change the 4 ⁇ 16 and 16 ⁇ 4 The brightness block of these two sizes is limited to not perform MIP prediction, and it is also possible to limit the brightness block size of 64 ⁇ 32, 32 ⁇ 64, 16 ⁇ 64, 64 ⁇ 16 and 64 ⁇ 64 without MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
  • the restriction condition of block encoding is modified as the restriction condition in this application that if the size ratio of the current block is greater than 4, and the first side length or the second side length is 64, then the current block is not encoded in MIP mode. It can effectively solve the problem of excessively redundant logic branches in the MIP algorithm due to the existence of two size brightness blocks of 4 ⁇ 16 and 16 ⁇ 4. At the same time, because the obtained prediction blocks are all square, it can be used in The matrix operation avoids the decision whether to extract odd rows of the existing matrix.
  • the brightness component prediction method proposed in this application can set all aspect ratios including 4 ⁇ 16 and 16 ⁇ 4 brightness blocks to 4, or the aspect ratio to 4. MIP mode is prohibited for the current block of, and predW and predH when MipSizeId is equal to 2, since the side length of the current luminance encoding must be greater than or equal to 8, there is no need to perform comparison operations and can be directly equal to 8.
  • the encoder can reduce algorithm branches and syntax and semantics, making the implementation of MIP technology more concise and unified.
  • the prior art needs to compare 4
  • the brightness blocks of ⁇ 16 and 16 ⁇ 4 are branched separately, but this application can reduce the number of judgments in the MIP prediction process, avoiding the need to extract odd rows before the matrix is multiplied, and the matrix can be unified
  • the calculation method, and the generated prediction blocks are unified into square blocks, which reduces the probability by half.
  • the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed.
  • Matrix intra prediction MIP list among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block.
  • the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
  • FIG. 13 is a schematic diagram 5 of the implementation process of a luminance component prediction method proposed by an embodiment of the application, which is applied to a decoder, as shown in FIG. 13, in the embodiment of the application, the method for predicting the luminance component by the decoder can be Include the following steps.
  • Step 201 Calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the ratio of the first side length and the second side length ratio.
  • the decoder may first calculate the size ratio corresponding to the current block according to the first side length and the second side length corresponding to the current block.
  • the current block may represent the current block to be encoded or the current block to be decoded.
  • the current block when the decoder is performing decoding, the current block is the block to be decoded.
  • the first side length may be the longer side of the current block
  • the second side length may be the shorter side of the current block, that is, the first side length may be greater than or equal to the second side.
  • Side length Specifically, the first side length and the second side length can be respectively the height parameter and the width parameter corresponding to the current block. That is to say, the ratio of the first side length and the second side length, that is, the size ratio, can be either height or width. The ratio can also be an aspect ratio.
  • the size ratio represents the current block corresponding
  • the ratio of the long side to the short side of, therefore, the size ratio is a natural number greater than or equal to 1.
  • Step 202 If the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and MIP list corresponding to the current block.
  • Luminance component prediction value among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode.
  • the decoder after the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than or equal to the preset ratio threshold, if the size of the current block is If the size is not the first preset size, the decoder can analyze the bitstream data corresponding to the current block according to the preset prediction strategy, so as to obtain the MIP list and the predicted value of the luminance component corresponding to the current block.
  • the preset ratio threshold is equal to 4, and at the same time, the first preset size is 4 ⁇ 16 and 16 ⁇ 4.
  • the decoder when the decoder decodes the current block according to the MIP mode, it needs to first limit the size of the current block. Specifically, when the size ratio of the current block is less than or equal to 4. And when the size of the current block is not 4 ⁇ 16, and it is not 16 ⁇ 4 at the same time, the decoder will determine the brightness prediction of the current block according to the MIP mode.
  • a size-dependent MIP mode prediction method that is, a preset prediction strategy
  • the decoder can compare the current prediction strategy based on the preset prediction strategy characterizing the size-dependent MIP mode.
  • the block performs brightness prediction, so that the corresponding MIP list can be obtained.
  • the MIP algorithm will have some logic branches that are too redundant. Specifically, when the current block is 4 ⁇ 16, 4 will be generated. ⁇ 8 prediction blocks, 11 types; when the current block is 16 ⁇ 4, 8 ⁇ 4 prediction blocks will be generated, 11 types in total. For brightness blocks of two sizes, 4 ⁇ 16 and 16 ⁇ 4, the algorithm needs to determine whether to extract odd rows of the existing matrix during matrix operation, and it will also make the prediction block not all square.
  • the luminance component prediction method proposed by this application can restrict the luminance blocks of the two sizes of 4 ⁇ 16 and 16 ⁇ 4 from performing MIP prediction by changing the restriction conditions of the MIP mode. , It will simplify the prediction branch, simplify the syntax and semantics of the algorithm, reduce time complexity, and save memory.
  • Step 203 Obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
  • the decoder parses the bitstream data corresponding to the current block according to the preset prediction strategy, and obtains the MIP list and the predicted value of the brightness component corresponding to the current block, it can then use the MIP list and the predicted value of the brightness component to obtain, Obtain the image data corresponding to the current block.
  • the decoder can reduce algorithm branches and syntax semantics, making the implementation of MIP technology more concise and unified, and reducing the complexity of the MIP mode. Specifically, Compared with the traditional luma intra prediction mode, the calculation complexity of the MIP mode is higher. In the prior art, MIP not only has more branches, but also requires more luma blocks for MIP prediction. In this application, all bandwidths can be removed. Brightness blocks with an aspect ratio greater than or equal to 4, or with an aspect ratio greater than or equal to 4, can specifically include 4 ⁇ 16, 8 ⁇ 32, 16 ⁇ 64, 16 ⁇ 4, 32 ⁇ 8, 64 ⁇ 16 brightness blocks, thereby saving time complexity.
  • the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, that is, after the above step 201, and obtains according to the MIP list and the predicted value of the luminance component
  • the method for the decoder to predict the luminance component may further include the following steps:
  • Step 204 If the size ratio is less than the preset ratio threshold, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
  • the decoder after the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than the preset ratio threshold, the decoder can analyze according to the preset prediction strategy
  • the code stream data corresponding to the current block obtains the MIP list and the predicted value of the luminance component corresponding to the current block.
  • the brightness component prediction method proposed by this application can not only restrict the brightness blocks of the two sizes of 4 ⁇ 16 and 16 ⁇ 4 from MIP prediction by changing the restriction conditions of the MIP mode, but also The brightness blocks of four sizes of 32 ⁇ 8, 8 ⁇ 32, 16 ⁇ 64, and 64 ⁇ 16 are restricted from performing MIP prediction.
  • the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
  • the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, that is, after the above step 201, and obtains according to the MIP list and the predicted value of the luminance component
  • the method for the decoder to predict the luminance component may further include the following steps:
  • Step 205 If the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not the first preset side length, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the current block corresponding The MIP list and the predicted value of the luminance component.
  • the encoder can parse the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
  • the first preset side length is equal to 64.
  • the brightness component prediction method proposed by this application when the MIP mode is restricted, if the size ratio of the current block is greater than or equal to 4, and the first side length or the second side length is 64, the MIP mode is not used to The current block is decoded. As shown in Table 12, the brightness component prediction method proposed by this application can not only change 4 ⁇ 16, 16 ⁇ 4, 32 ⁇ 8, 8 ⁇ 32, 16 ⁇ 64, and 64 ⁇ 16 Luminance blocks of these sizes are restricted to not perform MIP prediction, and the three types of luminance blocks of 64 ⁇ 32, 32 ⁇ 64, and 64 ⁇ 64 are also restricted to not perform MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
  • the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, that is, after the above step 201, and obtains according to the MIP list and the predicted value of the luminance component
  • the method for the decoder to predict the luminance component may further include the following steps:
  • Step 206 If the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the current The MIP list corresponding to the block and the predicted value of the luminance component.
  • the encoder can parse the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
  • the brightness component prediction method proposed in this application when the MIP mode is restricted, if the size ratio of the current block is greater than 4, and the first side length or the second side length is 64, the current block is not evaluated in the MIP mode.
  • the brightness component prediction method proposed by this application can not only restrict the brightness blocks of the two sizes of 4 ⁇ 16 and 16 ⁇ 4 from performing MIP prediction, but also by changing the restriction conditions of the MIP mode. For the five types of luminance blocks of 64 ⁇ 32, 32 ⁇ 64, 16 ⁇ 64, 64 ⁇ 16, and 64 ⁇ 64, MIP prediction is not restricted. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
  • the decoder can reduce algorithm branches and syntax and semantics, so that the implementation of MIP technology is more concise and unified.
  • 4 The brightness blocks of ⁇ 16 and 16 ⁇ 4 are branched separately, but this application can reduce the number of judgments in the MIP prediction process, avoiding the need to extract odd rows before the matrix is multiplied, and the matrix can be unified
  • the calculation method, and the generated prediction blocks are unified into square blocks, which reduces the probability by half.
  • the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block If the size is not the first preset size, the bitstream data corresponding to the current block is analyzed according to the preset prediction strategy to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; according to the MIP list and the predicted value of the brightness component, the data corresponding to the current block is obtained Image data.
  • the encoder when it encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4 ⁇ 16 and 16 ⁇ 4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
  • FIG. 14 is a schematic diagram 1 of the composition structure of the encoder proposed in the embodiment of the application.
  • the encoder 300 proposed in the embodiment of the present application may include a first An acquisition part 301, a construction part 302 and an encoding part 303.
  • the first acquiring part 301 is configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set Is the ratio of the first side length to the second side length.
  • the constructing part 302 is configured to construct a base corresponding to the current block according to a preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold and the size of the current block is not the first preset size.
  • Matrix intra-frame prediction MIP list wherein the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode.
  • the first obtaining part 301 is further configured to obtain the predicted value of the luminance component corresponding to the current block according to the MIP list.
  • the encoding part 303 is configured to perform encoding processing on the current block according to the MIP list and the predicted value of the luminance component to obtain code stream data corresponding to the current block.
  • the construction part 302 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list Before obtaining the prediction value of the brightness component corresponding to the current block, if the size ratio is less than a preset ratio threshold, construct a MIP list corresponding to the current block according to the preset prediction strategy.
  • the construction part 302 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list Before obtaining the predicted value of the brightness component corresponding to the current block, if the size ratio is less than a preset ratio threshold, and the first side length and the second side length are not the first preset side length, then The preset prediction strategy constructs a MIP list corresponding to the current block.
  • the construction part 302 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list Before obtaining the predicted value of the brightness component corresponding to the current block, if the size ratio is less than or equal to a preset ratio threshold, and the first side length and the second side length are not the first preset side length, then Constructing the MIP list corresponding to the current block according to the preset prediction strategy.
  • the first obtaining part 301 is further configured to obtain the upper phase corresponding to the current block before constructing the MIP list corresponding to the current block according to the preset prediction strategy.
  • the construction part 302 is specifically configured to, if the size of the current block is a second preset size, according to the first prediction mode, the second prediction mode, and 35 types
  • the MIP mode constructs the MIP list.
  • the construction part 302 is further specifically configured to, if the size of the current block is a third preset size, perform according to the first prediction mode and the second prediction mode And 19 kinds of MIP modes construct the MIP list.
  • the structure part 302 is also specifically configured to perform according to the first side length and the second side length greater than the second preset side length.
  • the prediction mode, the second prediction mode, and the 11 MIP modes construct the MIP list.
  • the preset ratio threshold is equal to 4; the first preset size is 4 ⁇ 16 and 16 ⁇ 4; the first preset side length is equal to 64; The second preset size is 4 ⁇ 4; the third preset size is 4 ⁇ 8, 8 ⁇ 4, or 8 ⁇ 8; the second preset side length is equal to 8.
  • FIG. 15 is a second schematic diagram of the composition structure of the encoder proposed in the embodiment of the application.
  • the encoder 300 proposed in the embodiment of the application may further include a first processor 304, and store the first processor 304 to execute The first memory 305 of instructions, the first communication interface 306, and the first bus 307 for connecting the first processor 304, the first memory 305, and the first communication interface 306.
  • the above-mentioned first processor 304 is configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to Second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first A preset size, the matrix-based intra prediction MIP list corresponding to the current block is constructed according to a preset prediction strategy; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; The MIP list obtains the predicted value of the brightness component corresponding to the current block; and the encoding process is performed on the current block according to the MIP list and the predicted value of the brightness component to obtain the code stream data corresponding to the current block.
  • the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this embodiment is essentially or correct
  • the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal A computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the method in this embodiment.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • the embodiment of the present application provides an image encoder, which calculates the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed.
  • Matrix intra prediction MIP list among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block.
  • the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
  • FIG. 16 is a first schematic diagram of the composition structure of the decoder proposed in this embodiment of the application.
  • the decoder 400 proposed in this embodiment of the application may include a first Second, the acquisition part 401 and the decoding part 402.
  • the second acquiring part 401 is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size The ratio is set as the ratio of the first side length to the second side length.
  • the decoding part 402 is configured to analyze the code corresponding to the current block according to the preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold and the size of the current block is not the first preset size Stream data to obtain the MIP list and the brightness component prediction value corresponding to the current block; wherein the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode.
  • the second obtaining part 401 is further configured to obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
  • the decoding part 402 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list And the brightness component prediction value, before obtaining the image data corresponding to the current block, if the size ratio is less than a preset ratio threshold, the bitstream data is parsed according to the preset prediction strategy to obtain the current block The corresponding MIP list and the predicted value of the luminance component.
  • the decoding part 402 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list And the predicted value of the brightness component, before obtaining the image data corresponding to the current block, if the size ratio is less than a preset ratio threshold, the first side length and the second side length are not the first preset Side length, the code stream data is analyzed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
  • the decoding part 402 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list And the brightness component prediction value, before obtaining the image data corresponding to the current block, if the size ratio is less than or equal to a preset ratio threshold, the first side length and the second side length are not the first If the side length is preset, the code stream data is analyzed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
  • the preset ratio threshold is equal to 4; the first preset size is 4 ⁇ 16 and 16 ⁇ 4; the first preset side length is equal to 64.
  • FIG. 17 is a second schematic diagram of the composition structure of the decoder proposed in the embodiment of the application.
  • the decoder 400 proposed in the embodiment of the present application may further include a second processor 403, which stores a second processor 403 for executable The second memory 404 of instructions, the second communication interface 405, and the second bus 406 for connecting the second processor 403, the second memory 404, and the second communication interface 405.
  • the above-mentioned second processor 403 is configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than Or equal to the second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not Is the first preset size, the code stream data corresponding to the current block is parsed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block; wherein, the preset prediction strategy is used to The size-dependent MIP mode performs brightness prediction; according to the MIP list and the brightness component prediction value, the image data corresponding to the current block is obtained.
  • the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this embodiment is essentially or correct
  • the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal A computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the method in this embodiment.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • the embodiment of the application provides an image decoder, which calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block If the size is not the first preset size, the bitstream data corresponding to the current block is analyzed according to the preset prediction strategy to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; according to the MIP list and the predicted value of the brightness component, the data corresponding to the current block is obtained Image data.
  • the encoder when it encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4 ⁇ 16 and 16 ⁇ 4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
  • the embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method as described in the foregoing embodiment is implemented.
  • the program instructions corresponding to a luminance component prediction method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc., when the program instructions corresponding to a luminance component prediction method in the storage medium When being read or executed by an electronic device, it includes the following steps:
  • the size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the length of the second side;
  • the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not the first preset size, constructing a matrix-based intra prediction MIP list corresponding to the current block according to the preset prediction strategy;
  • the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
  • the program instructions corresponding to a luminance component prediction method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc., when the program instructions corresponding to a luminance component prediction method in the storage medium When being read by an electronic device or executed, it also includes the following steps:
  • the size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the second side length;
  • the code stream data corresponding to the current block is parsed according to the preset prediction strategy to obtain the current block Corresponding MIP list and brightness component prediction values; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
  • this application may be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device realizes the functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
  • the embodiments of the present application provide a luminance component prediction method, an encoder, a decoder, and a storage medium.
  • the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than Or equal to the second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, the Set the prediction strategy to construct the matrix-based intra prediction MIP list corresponding to the current block; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; The list and the predicted value of the luminance component encode the current block to obtain the code stream data corresponding to the current block.
  • the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then
  • the preset prediction strategy parses the code stream data corresponding to the current block to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; and obtains the image data corresponding to the current block according to the MIP list and the predicted value of the brightness component. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block.
  • the decoder can also use MIP mode after obtaining the bitstream data of the current block.
  • the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.

Abstract

Disclosed are a luminance component prediction method, an encoder, a decoder and a storage medium. The luminance component prediction method comprises: calculating a size ratio according to a first side length and a second side length which correspond to a current block, wherein the first side length is greater than or equal to the second side length, and the size ratio is set to be the ratio of the first side length to the second side length; if the size ratio is less than or equal to a preset ratio threshold value, and the size of the current block is not a first preset size, constructing, according to a preset prediction strategy, a matrix-based intra prediction (MIP) list corresponding to the current block, wherein the preset prediction strategy is used for luminance prediction based on a size-dependent MIP mode; acquiring, according to the MIP list, a luminance component prediction value corresponding to the current block; and performing encoding processing on the current block according to the MIP list and the luminance component prediction value in order to obtain code stream data corresponding to the current block.

Description

亮度分量预测方法、编码器、解码器以及存储介质Luminance component prediction method, encoder, decoder and storage medium 技术领域Technical field
本申请实施例涉及视频编解码技术领域,尤其涉及的是一种亮度分量预测方法、编码器、解码器以及存储介质。The embodiments of the present application relate to the technical field of video coding and decoding, and in particular to a method for predicting a luminance component, an encoder, a decoder, and a storage medium.
背景技术Background technique
在多功能视频编码(Versatile Video Coding,VVC)的参考软件测试平台中,一种新的帧内编码技术,基于矩阵的帧内预测(Matrix-based Intra Prediction,MIP)被提出,MIP是基于神经网络的帧内预测技术,即利用多层神经网络基于相邻已重建亮度块预测当前块的亮度值。具体地,与传统帧内模式相同,在利用MIP模式进行帧内预测时,MIP预测的输入也为当前块的上一行和左一列相邻亮度块的数据,输出为当前块的亮度分量预测值。具体的预测过程分为三步:下采样,矩阵向量乘法和插值。In the reference software test platform for Versatile Video Coding (VVC), a new intra-frame coding technology, Matrix-based Intra Prediction (MIP) is proposed. MIP is based on neural The intra-frame prediction technology of the network uses a multilayer neural network to predict the brightness value of the current block based on the adjacent reconstructed brightness block. Specifically, the same as the traditional intra mode, when using MIP mode to perform intra prediction, the input of MIP prediction is also the data of the adjacent brightness block in the previous row and the left column of the current block, and the output is the brightness component prediction value of the current block. . The specific prediction process is divided into three steps: downsampling, matrix vector multiplication and interpolation.
然而,由于MIP模式的复杂度较高,因此MIP技术在提高编解码性能的同时,编解码过程中所需要的存储空间和整体时间也大大增加,从而降低了编解码效率。However, due to the high complexity of the MIP mode, while the MIP technology improves the coding and decoding performance, the storage space and overall time required in the coding and decoding process are also greatly increased, thereby reducing the coding and decoding efficiency.
发明内容Summary of the invention
本申请实施例提供一种亮度分量预测方法、编码器、解码器以及存储介质,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。The embodiments of the present application provide a luminance component prediction method, an encoder, a decoder, and a storage medium, which can reduce complexity and reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance. Effectively improve coding and decoding efficiency.
本申请实施例的技术方案是这样实现的:The technical solutions of the embodiments of the present application are implemented as follows:
本申请实施例提供了一种亮度分量预测方法,应用于编码器,所述方法包括:The embodiment of the present application provides a method for predicting a luminance component, which is applied to an encoder, and the method includes:
根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the length of the second side;
若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造所述当前块对应的基于矩阵的帧内预测MIP列表;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;If the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not the first preset size, constructing a matrix-based intra prediction MIP list corresponding to the current block according to the preset prediction strategy; Wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
根据所述MIP列表获取所述当前块对应的亮度分量预测值;Acquiring, according to the MIP list, the predicted value of the luminance component corresponding to the current block;
按照所述MIP列表和所述亮度分量预测值对所述当前块进行编码处理,获得所述当前块对应的码流数据。Perform encoding processing on the current block according to the MIP list and the predicted value of the brightness component to obtain code stream data corresponding to the current block.
本申请实施例提供了一种亮度分量预测方法,应用于解码器,所述方法包括:The embodiment of the application provides a method for predicting a luminance component, which is applied to a decoder, and the method includes:
根据所述当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the second side length;
若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析所述当前块对应的码流数据,获得所述当前块对应的MIP列表和亮度分量预测值;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;If the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the code stream data corresponding to the current block is parsed according to the preset prediction strategy to obtain the current block Corresponding MIP list and brightness component prediction values; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据。Obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
本申请实施例提供了一种编码器,所述编码器包括:第一获取部分,构造部分以及 编码部分,An embodiment of the present application provides an encoder, which includes: a first acquisition part, a construction part, and an encoding part,
所述第一获取部分,配置于根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The first acquiring part is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set to The ratio of the first side length to the second side length;
所述构造部分,配置于若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造所述当前块对应的基于矩阵的帧内预测MIP列表;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;The construction part is configured to construct a matrix-based matrix corresponding to the current block according to a preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not a first preset size Intra-frame prediction MIP list; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
所述第一获取部分,还用于根据所述MIP列表获取所述当前块对应的亮度分量预测值;The first obtaining part is further configured to obtain the predicted value of the luminance component corresponding to the current block according to the MIP list;
所述编码部分,配置于按照所述MIP列表和所述亮度分量预测值对所述当前块进行编码处理,获得所述当前块对应的码流数据。The coding part is configured to perform coding processing on the current block according to the MIP list and the predicted value of the luminance component to obtain code stream data corresponding to the current block.
本申请实施例提供了一种解码器,所述编码器包括:第二获取部分和解码部分,An embodiment of the present application provides a decoder, the encoder includes: a second acquiring part and a decoding part,
所述第二获取部分,配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The second acquiring part is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio Set as the ratio of the first side length to the second side length;
所述解码部分,配置于若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析所述当前块对应的码流数据,获得所述当前块对应的MIP列表和亮度分量预测值;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;The decoding part is configured to analyze the code stream corresponding to the current block according to the preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold and the size of the current block is not the first preset size Data to obtain the MIP list and the brightness component prediction value corresponding to the current block; wherein the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
所述第二获取部分还配置于根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据。The second obtaining part is further configured to obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
本申请实施例提供了一种编码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器、第一通信接口,和用于连接所述第一处理器、所述第一存储器以及所述第一通信接口的第一总线,当所述指令被所述第一处理器执行时,实现如上所述的亮度分量预测方法。An embodiment of the present application provides an encoder. The encoder includes a first processor, a first memory storing executable instructions of the first processor, a first communication interface, and a first communication interface for connecting to the first processor. The processor, the first memory, and the first bus of the first communication interface, when the instruction is executed by the first processor, implement the brightness component prediction method as described above.
本申请实施例提供了一种编码器,所述编码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器、第二通信接口,和用于连接所述第二处理器、所述第二存储器以及所述第二通信接口的第二总线,当所述指令被所述第二处理器执行时,实现如上所述的亮度分量预测方法。An embodiment of the present application provides an encoder, which includes a second processor, a second memory storing executable instructions of the second processor, a second communication interface, and a second communication interface for connecting to the second processor. The processor, the second memory, and the second bus of the second communication interface, when the instruction is executed by the second processor, implement the brightness component prediction method as described above.
本申请实施例提供了一种计算机可读存储介质,其上存储有程序,应用于编码器和解码器中,所述程序被处理器执行时,实现如上所述的亮度分量预测方法。The embodiment of the present application provides a computer-readable storage medium with a program stored thereon and applied to an encoder and a decoder. When the program is executed by a processor, the method for predicting the luminance component as described above is realized.
本申请实施例提供了一种亮度分量预测方法、编码器、解码器以及存储介质,编码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造当前块对应的基于矩阵的帧内预测MIP列表;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据MIP列表获取当前块对应的亮度分量预测值;按照MIP列表和亮度分量预测值对当前块进行编码处理,获得当前块对应的码流数据。相应地,解码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值;根据MIP列表和亮度分量预测值,获得当前块对应的图像数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸 为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。The embodiments of the present application provide a luminance component prediction method, an encoder, a decoder, and a storage medium. The encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than Or equal to the second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, the Set the prediction strategy to construct the matrix-based intra prediction MIP list corresponding to the current block; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; The list and the predicted value of the luminance component encode the current block to obtain the code stream data corresponding to the current block. Correspondingly, the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then The preset prediction strategy parses the code stream data corresponding to the current block to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; and obtains the image data corresponding to the current block according to the MIP list and the predicted value of the brightness component. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
附图说明Description of the drawings
图1为帧内预测中的67种预测模式的排布示意图;Figure 1 is a schematic diagram of the arrangement of 67 prediction modes in intra prediction;
图2为MIP模式进行编码的流程示意图;Figure 2 is a schematic flow chart of encoding in MIP mode;
图3为当前块的上侧相邻亮度块和左侧相邻亮度块的排布示意图;FIG. 3 is a schematic diagram of the arrangement of the adjacent brightness block on the upper side and the adjacent brightness block on the left side of the current block;
图4为确定DM模式的排布示意图;Figure 4 is a schematic diagram of the arrangement of determining the DM mode;
图5为视频编码系统的结构示意图;Figure 5 is a schematic diagram of the structure of a video encoding system;
图6为视频解码系统的结构示意图;Figure 6 is a schematic structural diagram of a video decoding system;
图7为本申请实施例提出的一种亮度分量预测方法的实现流程示意图一;FIG. 7 is a schematic diagram 1 of the implementation process of a luminance component prediction method proposed by an embodiment of the application;
图8为现有的MIP预测逻辑分支示意图;FIG. 8 is a schematic diagram of the existing MIP prediction logic branch;
图9为本申请中MIP预测逻辑分支示意图;Fig. 9 is a schematic diagram of MIP prediction logic branches in this application;
图10为本申请实施例提出的一种亮度分量预测方法的实现流程示意图二;FIG. 10 is a second schematic diagram of the implementation process of a method for predicting luminance components according to an embodiment of the application;
图11为本申请实施例提出的一种亮度分量预测方法的实现流程示意图三;FIG. 11 is a third schematic diagram of the implementation process of a luminance component prediction method proposed by an embodiment of this application;
图12为本申请实施例提出的一种亮度分量预测方法的实现流程示意图四;FIG. 12 is a fourth schematic diagram of the implementation process of a method for predicting luminance components according to an embodiment of this application;
图13为本申请实施例提出的一种亮度分量预测方法的实现流程示意图五;FIG. 13 is a schematic diagram 5 of the implementation process of a luminance component prediction method proposed by an embodiment of this application;
图14为本申请实施例提出的编码器的组成结构示意图一;FIG. 14 is a schematic diagram 1 of the composition structure of an encoder proposed in an embodiment of the application;
图15为本申请实施例提出的编码器的组成结构示意图二;FIG. 15 is a second schematic diagram of the composition structure of the encoder proposed in an embodiment of the application;
图16为本申请实施例提出的解码器的组成结构示意图一;FIG. 16 is a schematic diagram 1 of the composition structure of a decoder proposed by an embodiment of the application;
图17为本申请实施例提出的解码器的组成结构示意图二。FIG. 17 is a second schematic diagram of the composition structure of the decoder proposed in an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It is understandable that the specific embodiments described here are only used to explain the related application, but not to limit the application. In addition, it should be noted that, for ease of description, only the parts related to the relevant application are shown in the drawings.
在视频图像中,VVC接受了联合视频专家组(Joint Video Experts Team,JVET)-N0217中提出的仿射线性权重帧内预测技术(Affine Linear Weighted Intra Prediction),并更名为基于矩阵的帧内预测,即MIP技术,该技术针对帧内亮度编码块大小的不同,在帧内亮度预测过程中增加了不同数量的基于矩阵的帧内预测模式。In video images, VVC accepted the ray-like weighted intra prediction technology (Affine Linear Weighted Intra Prediction) proposed in the Joint Video Experts Team (JVET)-N0217, and changed its name to matrix-based intra prediction , Namely MIP technology, this technology adds a different number of matrix-based intra prediction modes in the intra-frame brightness prediction process according to the different sizes of intra-frame luminance coding blocks.
为了捕捉自然视频中呈现的更精细的边缘方向,VVC中将视频压缩标准(High Efficiency Video Coding,HEVC)中定义的33种帧内亮度预测角度模式扩展到了65种,图1为帧内预测中的67种预测模式的排布示意图,如图1所示,箭头编号为2-66的表示65种帧内角度预测模式,另外还有两种非角度模式,即编号为0的渐变平坦Planar模式和编号为1的直流DC模式;所以,VVC中的帧内预测过程中包含两种非角度模式和65种角度模式,这里,将这67种预测模式称为帧内预测的传统模式。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 (High Efficiency Video Coding, HEVC) to 65 kinds. Figure 1 shows the intra-frame prediction. A schematic diagram of the arrangement of 67 kinds of prediction modes, as shown in Figure 1, the arrows numbered 2-66 indicate 65 kinds of intra-angle prediction modes, and there are two non-angle modes, namely, the gradient flat Planar mode numbered 0 And the direct current 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 referred to as traditional intra prediction modes.
MIP是基于神经网络的帧内预测技术,即利用多层神经网络基于相邻已重建像素预测当前块的亮度值。具体地,MIP技术根据帧内亮度编码块的大小将亮度编码块分为三类,设亮度编码块大小为W×H,其中,W为宽度参数,H为高度参数,按照亮度编码 块的大小可以将亮度编码块分为三类:MIP is an intra-frame prediction technology based on neural networks, which uses a multilayer neural network to predict the brightness value of the current block based on adjacent reconstructed pixels. Specifically, the MIP technology divides the brightness coding blocks into three categories according to the size of the brightness coding block in the frame. Set the size of the brightness coding block as W×H, where W is the width parameter and H is the height parameter, according to the size of the brightness coding block Luma coding blocks can be divided into three categories:
大小为4×4的亮度编码块为第一类亮度块,大小为8×4,4×8和8×8的亮度编码块为第二类亮度块,其他大小的亮度编码块为第三类亮度块。Luminance coding blocks with a size of 4×4 belong to the first type of luminance block, 8×4, 4×8 and 8×8 luminance coding blocks are classified as the second type of luminance block, and other sizes of luminance coding blocks belong to the third type. Brightness block.
针对这三种类型的帧内亮度编码块,MIP技术在67种传统帧内预测模式的基础上增加了M种MIP模式,其中,针对第一类亮度块,M=35,针对第二类亮度块,M=19,针对第三类亮度块,M=11。For these three types of intra-frame luminance coding blocks, MIP technology adds M types of MIP modes on the basis of 67 traditional intra-frame prediction modes. Among them, for the first type of luminance block, M=35, for the second type of luminance Block, M=19, for the third type of luminance block, M=11.
具体来说,MIP技术只应用于帧内亮度预测,与传统模式相同,MIP预测的输入也为当前块的上一行和左一列数据,输出为当前块的预测值,具体的预测过程分为三步:平均,矩阵向量乘法和插值。也就是说,通过对输入的上一行和左一列相邻像素点的重建亮度值进行这三步操作,就可以得到当前块的亮度分量预测值。Specifically, MIP technology is only applied to intra-frame brightness prediction. Like the traditional mode, the input of MIP prediction is also the previous row and left column of the current block, and the output is the predicted value of the current block. The specific prediction process is divided into three Steps: averaging, matrix vector multiplication and interpolation. In other words, by performing these three operations on the input reconstructed brightness values of the adjacent pixels in the upper row and the left column, the predicted value of the brightness component of the current block can be obtained.
图2为MIP模式进行编码的流程示意图,如图2所示,MIP模式进行亮度预测的具体实现如下:Figure 2 is a schematic flow chart of encoding in MIP mode. As shown in Figure 2, the specific implementation of brightness prediction in MIP mode is as follows:
第一步:对当前块的上侧相邻参考点进行平均操作获得向量bdry top,共N个值;对当前块的左侧相邻参考点进行平均操作获得向量bdry left,共N个值。当当前亮度编码为第一类亮度编码时,N=2;当当前亮度编码为第二类或第三类亮度编码时,N=4。向量bdry top和向量bdry left组成一个新的向量bdry red并进行后续操作; Step 1: Perform averaging operation on the adjacent reference points on the upper side of the current block to obtain the vector bdry top with a total of N values; perform averaging operation on the adjacent reference points on the left side of the current block to obtain the vector bdry left with a total of N values. When the current brightness code is the first type of brightness code, N=2; when the current brightness code is the second or third type of brightness code, N=4. Vector bdry top and vector bdry left form a new vector bdry red and perform subsequent operations;
第二步:通过MIP模式的模式号k获取对应的矩阵A k和偏移量b k,通过下列公式(1)计算获得如图2中用交叉线标识的当前块的部分预测值: Step 2: Obtain the corresponding matrix A k and the offset b k through the mode number k of the MIP mode, and obtain the partial prediction value of the current block as shown in Figure 2 by the following formula (1):
Pred red=A k·bdry red+b k     (1) Pred red =A k ·bdry red +b k (1)
第三步:通过线性插值,获得当前块中剩余的预测值Predred。Step 3: Obtain the remaining predicted value Predred in the current block through linear interpolation.
需要说明的是,针对当前块进行编码的实现过程,需要将帧内预测具体使用的哪一种编码模式写入到压缩码流中,从而使解码端通过解析该模式信息,可以确定具体使用哪一种模式,是传统模式还是MIP模式;若是传统模式,具体是哪一种传统模式;若是MIP模式,具体是哪一种MIP模式。It should be noted that for the implementation process of encoding the current block, which encoding mode used for intra prediction needs to be written into the compressed code stream, so that the decoder can determine which encoding mode is used by analyzing the mode information. One mode, whether it is a traditional mode or a MIP mode; if it is a traditional mode, which is the specific traditional mode; if it is a MIP mode, which is the specific MIP mode.
在VVC的帧内预测中,对每个亮度编码块都会进行67个传统模式和M个MIP模式的率失真代价RDcost比较,在67个传统模式和M个MIP模式中选出最优模式并进行编码。为了节省比特开销,VVC中使用了基于最可能模式列表(Most Probable Modes List,MPM)的帧内模式编码技术,In VVC intra-frame prediction, the rate-distortion cost RDcost of 67 traditional modes and M MIP modes is compared for each luminance coding block, and the optimal mode is selected among 67 traditional modes and M MIP modes. coding. In order to save bit overhead, VVC uses the most probable mode list (Most Probable Modes List, MPM)-based intra mode coding technology,
需要注意的是,由于多参考行技术(extend reference line)和帧内子块划分技术(Itra Sub-Patitionar,ISP)只对MPM列表中的模式使用,所以当extendrefflag和ispflag都为0,即使用0参考行且不进行子块划分时,不必编码mpmflag,直接编码最优模式在MPM列表中的位置。It should be noted that since the multiple reference line technology (extend reference line) and the intra sub-patitionar (Itra Sub-Patitionar, ISP) are only used for the modes in the MPM list, when both extendrefflag and ispflag are 0, use 0 When the reference line is not divided into sub-blocks, it is not necessary to encode mpmflag, and the position of the optimal mode in the MPM list is directly encoded.
进一步地,针对MPM列表和MIPMPM列表的构造来说,在VVC亮度帧内预测中,若当前块选中的最优模式是传统模式,则需要构造包含6个最可能传统模式的MPM列表;若当前块选中的最优模式是MIP模式,则需要构造包含3个最可能MIP模式的MIPMPM列表。Further, for the construction of the MPM list and the MIPMPM list, in VVC luma intra prediction, if the optimal mode selected by the current block is the traditional mode, it is necessary to construct an MPM list containing the 6 most likely traditional modes; The optimal mode selected by the block is the MIP mode, and a MIPMPM list containing the 3 most likely MIP modes needs to be constructed.
图3为当前块的上侧相邻亮度块和左侧相邻亮度块的排布示意图,如图3所示,上述两个列表都是根据如图4所示的当前块的上侧相邻亮度块(A)和左侧相邻亮度块(L)的最优模式进行推导的。Figure 3 is a schematic diagram of the arrangement of the adjacent brightness block on the upper side of the current block and the adjacent brightness block on the left side. The optimal mode of the luminance block (A) and the adjacent luminance block (L) on the left is derived.
具体来说,针对MPM列表的构造来说,在VVC帧内预测中,若当前块的最优模式是传统模式,则需要构造MPM列表。构造MPM列表的过程中,首先需要获取上侧相邻亮度块最优模式所对应的传统模式ABOVE和左侧相邻亮度块最优模式所对应的传统模式LEFT。Specifically, for the construction of the MPM list, in VVC intra prediction, if the optimal mode of the current block is the traditional mode, the MPM list needs to be constructed. In the process of constructing the MPM list, it is first necessary to obtain the traditional mode ABOVE corresponding to the optimal mode of the upper adjacent luminance block and the traditional mode LEFT corresponding to the optimal mode of the adjacent luminance block on the left.
进一步地,针对MIPMPM列表的构造来说,在VVC帧内预测中,若当前块的最优 模式是MIP模式,则需要构造MIPMPM列表。构造MIPMPM列表的过程中,首先需要获取上侧相邻亮度块的最优模式所对应的MIP模式ABOVE_MIP和左侧相邻亮度块的最优模式所对应的MIP模式LEFT_MIP模式。Further, for the construction of the MIPMPM list, in VVC intra prediction, if the optimal mode of the current block is the MIP mode, the MIPMPM list needs to be constructed. In the process of constructing the MIPMPM list, it is first necessary to obtain the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper adjacent luminance block and the MIP mode LEFT_MIP corresponding to the optimal mode of the adjacent luminance block on the left.
进一步地,在获取到LEFT_MIP和ABOVE_MIP之后,按照如下方法进行包含3个最可能MIPMPM模式的MIPMPM列表的构造,其中,MIPMPM中的编号为MIP模式的编号,编号范围为0至(M-1),对于第一类亮度块编号为0-34;对于第二类亮度块编号为0-18;对于第三类亮度块编号为0-10:Further, after obtaining LEFT_MIP and ABOVE_MIP, construct the MIPMPM list containing the 3 most probable MIPMPM modes according to the following method, where the number in MIPMPM is the number of the MIP mode, and the number range is 0 to (M-1) For the first type of brightness block number is 0-34; for the second type of brightness block number is 0-18; for the third type of brightness block number is 0-10:
若LEFT_MIP可用(不为-1),将LEFT_MIP放入MIPMPMlist中;If LEFT_MIP is available (not -1), put LEFT_MIP into MIPMPMlist;
若ABOVE_MIP可用(不为-1),将ABOVE_MIP通过冗余检查后放入MIPMPMlist中;If ABOVE_MIP is available (not -1), put ABOVE_MIP into MIPMPMlist after passing the redundancy check;
若LEFT_MIP不可用(为-1),ABOVE_MIP不可用(为-1),根据当前块的类型将默认列表通过冗余检查后添入直到补满MIPMPMlist:If LEFT_MIP is not available (for -1), ABOVE_MIP is not available (for -1), according to the type of the current block, the default list will be added after the redundancy check is passed until MIPMPMlist is filled:
第一类亮度块默认列表为:{17,34,5};The default list of the first type of brightness block is: {17, 34, 5};
第二类亮度块默认列表为:{0,7,16};The default list of the second type of brightness block is: {0, 7, 16};
第三类亮度块默认列表为:{1,4,6}。The default list of the third type of luminance block is: {1, 4, 6}.
进一步地,需要补充的是,在VVC的色度帧内预测过程中有一种利用分量间相关性的直接模式(Direct Mode,DM),会使用当前块对应的同位亮度编码块的中心位置的帧内预测模式来进行当前色度块的帧内预测,图4为确定DM模式的排布示意图,如图4所示,由于MIP技术只应用于亮度编码块,所以当图4中CR位置的帧内预测模式为MIP模式时,需要将该MIP模式通过“MIP-传统映射表”映射为传统模式,进行当前色度块的帧内预测。Further, it needs to be added that there is a direct mode (Direct Mode, DM) that uses inter-component correlation in the chroma intra prediction process of VVC, which uses the frame at the center of the co-located luminance coding block corresponding to the current block Intra prediction mode is used to perform intra prediction of the current chrominance block. Figure 4 is a schematic diagram of determining the arrangement of the DM mode. As shown in Figure 4, since the MIP technology is only applied to the luma coding block, when the frame at the CR position in Figure 4 When the intra prediction mode is the MIP mode, the MIP mode needs to be mapped to the traditional mode through the "MIP-traditional mapping table" to perform intra prediction of the current chrominance block.
也就是说,由于MIP技术的引入,在帧内预测过程中,在构建MIPMPM列表中,需要将传统模式映射为MIP模式,在构建MPM列表和确定DM模式中,需要将MIP模式映射为传统模式。That is to say, due to the introduction of MIP technology, in the process of intra prediction, the traditional mode needs to be mapped to the MIP mode in the construction of the MIPMPM list, and the MIP mode needs to be mapped to the traditional mode in the construction of the MPM list and the determination of the DM mode. .
然而,在实际应用中,在MIPMPM列表构造过程需要使用到传统模式到MIP模式的映射,如表1所示,具体通过“传统-MIP映射表”将传统模式映射为MIP模式。However, in practical applications, the mapping from the traditional mode to the MIP mode needs to be used in the MIPMPM list construction process. As shown in Table 1, the traditional mode is mapped to the MIP mode through the "traditional-MIP mapping table".
表1Table 1
Figure PCTCN2019092664-appb-000001
Figure PCTCN2019092664-appb-000001
另外,在MPM列表构造过程和DM模式的获取过程中需要使用到MIP模式到传统模式的映射。具体通过“MIP-传统映射表”将35/19/11种MIP模式映射为67种传统模式。针对三种类型的亮度块,三种“MIP-传统映射表”如表2,表3和表4所示。In addition, the mapping from the MIP mode to the traditional mode needs to be used in the MPM list construction process and the DM mode acquisition process. Specifically, 35/19/11 MIP modes are mapped to 67 traditional modes through the "MIP-Traditional Mapping Table". For the three types of luminance blocks, three "MIP-traditional mapping tables" are shown in Table 2, Table 3 and Table 4.
表2Table 2
MIP模式 MIP mode 00 11 22 33 44 55 66 77 88 99 1010 1111 1212 1313 1414 1515 1616 1717
传统模式 Traditional model 00 1818 1818 00 1818 00 1212 00 1818 22 1818 1212 1818 1818 11 1818 1818 00
MIP模式MIP mode 1818 1919 2020 21twenty one 22twenty two 23twenty three 24twenty four 2525 2626 2727 2828 2929 3030 3131 3232 3333 3434  To
传统模式 Traditional model 00 5050 00 5050 00 5656 00 5050 6666 5050 5656 5050 5050 11 5050 5050 5050  To
表3table 3
MIP模式 MIP mode 00 11 22 33 44 55 66 77 88 99 1010 1111 1212 1313 1414 1515 1616 1717 1818
传统模式 Traditional model 00 11 00 11 00 22twenty two 1818 1818 11 00 11 00 11 00 4444 00 5050 11 00
表4Table 4
MIP模式 MIP mode 00 11 22 33 44 55 66 77 88 99 1010
传统模式Traditional model 11 11 11 11 1818 00 11 00 11 5050 00
图5为视频编码系统的结构示意图,如图5所示,该视频编码系统100包括变换与量化模块101、帧内估计模块102、帧内预测模块103、运动补偿模块104、运动估计模块105、反变换与反量化模块106、滤波器控制分析模块107、去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波模块108、头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmatic Coding,CABAC)编码模块109和解码图像缓存模块110等部件;图6为视频解码系统的结构示意图,如图6所示,该视频解码系统200包括头信息解码及CABAC解码模块201、反变换与反量化模块202、帧内预测模块203、运动补偿模块204、去方块滤波及SAO滤波模块205和解码图像缓存模块206等部件。视频图像经过视频编码系统100中变换与量化模块101、帧内估计模块102、帧内预测模块103、运动补偿模块104、运动估计模块105、去方块滤波及SAO滤波模块108以及头信息编码及CABAC模块109等部分处理之后,输出该视频图像的码流;该码流输入视频解码系统200中,经过视频解码系统200中头信息解码及CABAC解码模块201、反变换与反量化模块202、帧内预测模块203以及运动补偿模块204等部分处理,最终恢复出原来的视频图像。Figure 5 is a schematic structural diagram of a video encoding system. As shown in Figure 5, the video encoding system 100 includes a transform and quantization module 101, an intra-frame estimation module 102, an intra-frame prediction module 103, a motion compensation module 104, and a motion estimation module 105, Inverse transform and inverse quantization module 106, filter control analysis module 107, deblocking filter and sample adaptive indentation (Sample Adaptive Offset, SAO) filter module 108, header information coding and context-based adaptive binary arithmetic coding (Context- Based on Adaptive Binary Arithmatic Coding, CABAC) encoding module 109 and decoded image buffer module 110; Figure 6 is a schematic diagram of the structure of the video decoding system, as shown in Figure 6, the video decoding system 200 includes header information decoding and CABAC decoding module 201 , Inverse transform and inverse quantization module 202, intra-frame prediction module 203, motion compensation module 204, deblocking filter and SAO filter module 205, decoded image buffer module 206 and other components. The video image passes through the transformation and quantization module 101, the intra-frame estimation module 102, the intra-frame prediction module 103, the motion compensation module 104, the motion estimation module 105, the deblocking filtering and SAO filtering module 108, the header information encoding and CABAC in the video encoding system 100 After processing by the module 109 and other parts, it outputs the code stream of the video image; the code stream is input into the video decoding system 200, and passes through the header information decoding and CABAC decoding module 201 in the video decoding system 200, the inverse transform and inverse quantization module 202, and the intraframe The prediction module 203 and the motion compensation module 204 perform partial processing, and finally restore the original video image.
按照高度参数和宽度参数,当前块可以为25种尺寸,具体地,标准中规定亮度块最大为128×128,但由于变换单元的最大尺寸为64×64,也就是说,亮度块在128×128的尺寸下必定需要先进行四叉树划分,因此最大的亮度块尺寸是64×64。表5为亮度块的尺寸示意表,如表5所示,According to the height and width parameters, the current block can have 25 sizes. Specifically, the standard stipulates that the maximum size of the brightness block is 128×128, but since the maximum size of the transform unit is 64×64, that is, the brightness block is at 128× Under the size of 128, quadtree division must be performed first, so the maximum luminance block size is 64×64. Table 5 is a schematic table of the size of the brightness block, as shown in Table 5.
表5table 5
(4×4)(4×4) (4×8)(4×8) (4×16)(4×16) (4×32)(4×32) (4×64)(4×64)
(8×4)(8×4) (8×8)(8×8) (8×16)(8×16) (8×32)(8×32) (8×64)(8×64)
(16×4)(16×4) (16×8)(16×8) (16×16)(16×16) (16×32)(16×32) (16×64)(16×64)
(32×4)(32×4) (32×8)(32×8) (32×16)(32×16) (32×32)(32×32) (32×64)(32×64)
(64×4)(64×4) (64×8)(64×8) (64×16)(64×16) (64×32)(64×32) (64×64)(64×64)
现有技术中,根据当前块的高度参数和宽度参数对MIP模式进行限制,具体地,如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行编码,表6为现有技术中MIP模式下亮度块尺寸的限制,如表6所示,In the prior art, the MIP mode is restricted according to the height parameter and the width parameter of the current block. Specifically, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block is not encoded in the MIP mode. , Table 6 is the limitation of the brightness block size in the MIP mode in the prior art, as shown in Table 6,
表6Table 6
Figure PCTCN2019092664-appb-000002
Figure PCTCN2019092664-appb-000002
现有技术中,在MIP模式的第一类亮度块中(对应于4×4的亮度块),上相邻和左相邻亮度块各2个,经过矩阵运算,生成4×4的预测块;在MIP模式的第二类亮度块中(对应于4×8,8×4,8×8的亮度块),上相邻和左相邻亮度块各4个,经过矩阵运算,生成4×4的预测块;在MIP模式的第三类亮度块中(对应于其他大小的亮度块),上相邻和左相邻亮度块各4个,经过矩阵运算,生成4×8的预测块(4×16的亮度块),8×4的预测块(16×4的亮度块)或8×8的预测块(其他大小的亮度块)。其中,由于第三类亮度块会生成非正方形预测块,因此在计算时需要对矩阵进行奇数行的抽取。In the prior art, in the first type of brightness block in the MIP mode (corresponding to a 4×4 brightness block), there are two upper and left neighboring brightness blocks each, after matrix operation, a 4×4 prediction block is generated ; In the second type of brightness block in MIP mode (corresponding to 4×8, 8×4, 8×8 brightness blocks), there are 4 upper and left neighboring brightness blocks each, after matrix operation, 4× 4 prediction blocks; in the third type of brightness blocks in the MIP mode (corresponding to brightness blocks of other sizes), there are 4 upper and left adjacent brightness blocks each. After matrix operation, a 4×8 prediction block ( 4×16 brightness block), 8×4 prediction block (16×4 brightness block) or 8×8 prediction block (other size brightness block). Among them, since the third type of luminance block will generate a non-square prediction block, it is necessary to extract odd rows of the matrix during calculation.
进一步地,在语法中,可以通过MipSizeId表示MIP的应用类别,numModes表示MIP模式的数量,boundarySize表示下采样获得的上参考行或左参考列的亮度块个数,predW表示预测块的宽度参数,predH表示预测块的高度参数,predC表示MIP的矩阵的边长。表7为现有技术中MIP模式对应的语法关系,如表7所示,语法中的MipSizeId,numModes,boundarySize,predW,predH,predC有以下关系:Further, in the syntax, MipSizeId can be used to indicate the application category of MIP, numModes indicates the number of MIP modes, boundarySize indicates the number of brightness blocks in the upper reference row or left reference column obtained by downsampling, and predW indicates the width parameter of the prediction block. predH represents the height parameter of the prediction block, and predC represents the side length of the MIP matrix. Table 7 shows the grammatical relationship corresponding to the MIP mode in the prior art. As shown in Table 7, the MipSizeId, numModes, boundarySize, predW, predH, and predC in the grammar have the following relationships:
表7Table 7
MipSizeIdMipSizeId numModesnumModes boundarySizeboundarySize predW predW predHpredH predCpredC
00 3535 22 44 44 44
11 1919 44 44 44 44
22 1111 44 Min(nTbW,8)Min(nTbW, 8) Min(nTbH,8)Min(nTbH, 8) 88
进一步地,在语法中,MipSizeId取值为0表示4×4的亮度块,取值为1表示4×8,8×4,8×8的亮度块,取值为2表示其他大小的亮度块。numModes表示一共会有多少种MIP预测模式,即4×4的亮度块共有35种,4×8,8×4,8×8的亮度块共有19种,其他大小的亮度块共有11种。boundarySize表示当前块上行或左列的相邻亮度块最终被下采样成2个或4个相邻亮度块。Further, in the syntax, the value of MipSizeId is 0 for 4×4 brightness block, the value of 1 is 4×8, 8×4, 8×8 brightness block, and the value is 2 for brightness blocks of other sizes. . numModes indicates how many MIP prediction modes there will be, that is, there are 35 types of 4×4 brightness blocks, 19 types of 4×8, 8×4, and 8×8 brightness blocks, and 11 types of brightness blocks of other sizes. The boundarySize indicates that the adjacent luminance blocks in the upper or left column of the current block are finally down-sampled into 2 or 4 adjacent luminance blocks.
在MIP技术中,需要先根据基于当前块的大小分成的三类MIP模式对相邻亮度块进行不同方法的下采样,经过矩阵运算后生成的预测块有四种大小,之后又需要分情况讨论是否需要对每一类预测块进行上采样、怎样上采样,最终恢复成当前块的大小。In MIP technology, it is necessary to downsample adjacent luminance blocks in different ways according to three types of MIP modes based on the size of the current block. The prediction blocks generated after matrix operation have four sizes, and then they need to be discussed in different situations. Whether it is necessary to upsample each type of prediction block, how to upsample, and finally restore the size of the current block.
具体地,在当前块为4×4大小时,相邻亮度块下采样后生成4个相邻亮度块,即左列和上行相邻亮度块均下采样成2个亮度块后进行拼接,再进行矩阵运算,生成4×4的预测矩阵,共35种模式,此时不需要进行上采样;在当前块为4×8,8×4或8×8大小时,相邻亮度块下采样后生成8个相邻亮度块,即左列和上行相邻亮度块均下采样成4个亮度块后进行拼接,再进行矩阵运算,生成4×4的预测矩阵,共19种模式,此时需要进行上采样;在当前块为其他大小时,相邻亮度块下采样后生成8个相邻亮度块,即左列和上行相邻亮度块均下采样成4个亮度块后进行拼接。其中,当前块为4×16时,会生成4×8的预测矩阵,共11种模式;当前块为16×4时,会生成8×4的预测矩阵,共11种模式;当前块为其他大小时,会生成8×8的预测矩阵,共11种模式。Specifically, when the current block is 4×4 in size, 4 adjacent luminance blocks are generated after down-sampling adjacent luminance blocks, that is, the left column and the upper adjacent luminance blocks are both down-sampled into 2 luminance blocks and then spliced, and then Carry out matrix operation to generate 4×4 prediction matrix, a total of 35 modes, no upsampling is required at this time; when the current block is 4×8, 8×4 or 8×8 size, after the adjacent luminance block is downsampled Generate 8 adjacent brightness blocks, that is, the left column and the upper adjacent brightness blocks are down-sampled into 4 brightness blocks and then spliced, and then matrix operation is performed to generate a 4×4 prediction matrix, a total of 19 modes are required. Up-sampling is performed; when the current block is of other sizes, 8 adjacent luminance blocks are generated after the adjacent luminance blocks are down-sampled, that is, the left column and the upper adjacent luminance blocks are all down-sampled into 4 luminance blocks and then spliced. Among them, when the current block is 4×16, a 4×8 prediction matrix will be generated, a total of 11 modes; when the current block is 16×4, a 8×4 prediction matrix will be generated, a total of 11 modes; the current block is other For large hours, an 8×8 prediction matrix will be generated with a total of 11 modes.
表8为MIP模式下亮度块的分类示意,如表8所示,根据生成的MIP预测块的大小,亮度块可以分为表11所示的几种情况:矩阵运算后会生成4×4大小预测块的亮度块、矩阵运算后会生成4×8或8×4大小预测块的亮度块、矩阵运算后会生成8×8大小预测块的亮度块以及目前VVC中规定不做MIP预测的亮度块。Table 8 shows the classification of luminance blocks in MIP mode. As shown in Table 8, according to the size of the generated MIP prediction block, the luminance block can be divided into several situations shown in Table 11: 4×4 size will be generated after matrix operation The brightness block of the prediction block, the brightness block of the 4×8 or 8×4 size prediction block will be generated after the matrix operation, the brightness block of the 8×8 size prediction block will be generated after the matrix operation, and the brightness that is not specified in the current VVC for MIP prediction Piece.
表8Table 8
Figure PCTCN2019092664-appb-000003
Figure PCTCN2019092664-appb-000003
可以看出,由于4×16和16×4这两种大小的亮度块的存在,MIP算法会有部分过于冗余的逻辑分支,具体地,在当前块宽高均小于等于8时,会生成4×4大小的预测块,共35种或19种;在当前块宽高均大于8时,除4×16和16×4以外,会生成8×8的预测块,共11种;在当前块为4×16时,会生成4×8的预测块,共11种;在当前 块为16×4时,会生成8×4的预测块,共11种。针对4×16和16×4这两种大小的亮度块,算法需要在矩阵运算时判断是否对现有矩阵进行奇数行的抽取,同时也会使得预测块不全是正方形。It can be seen that due to the existence of two size brightness blocks of 4×16 and 16×4, the MIP algorithm will have some redundant logic branches. Specifically, when the current block width and height are both less than or equal to 8, it will generate 4×4 prediction blocks, a total of 35 or 19 types; when the current block width and height are greater than 8, except for 4×16 and 16×4, 8×8 prediction blocks will be generated, a total of 11 types; When the block is 4×16, 4×8 prediction blocks will be generated, 11 types in total; when the current block is 16×4, 8×4 prediction blocks will be generated, 11 types in total. For brightness blocks of two sizes, 4×16 and 16×4, the algorithm needs to determine whether to extract odd rows of the existing matrix during matrix operation, and it will also make the prediction block not all square.
现有技术中,编码器在通过MIP模式进行亮度预测时,可以通过如下的公式(2)进行:In the prior art, when the encoder performs brightness prediction in the MIP mode, it can be performed by the following formula (2):
Figure PCTCN2019092664-appb-000004
Figure PCTCN2019092664-appb-000004
其中,mWeight和vBias是各MIP模式通过深度学习训练出来的权重矩阵和偏置矩阵,具体地,mWeight为每一类MIP模式的权重矩阵,vBias为每一类MIP模式的偏置矩阵。sB为偏置矩阵的左移量,oW为四舍五入的保留值,sW为整体预测值的右移量,需要通过查表得到不同MIP模式下的sW值。Among them, mWeight and vBias are weight matrices and bias matrices trained by deep learning for each MIP mode. Specifically, mWeight is the weight matrix of each type of MIP mode, and vBias is the bias matrix of each type of MIP mode. sB is the left shift of the bias matrix, oW is the rounded reserved value, and sW is the right shift of the overall predicted value. The sW value in different MIP modes needs to be obtained by looking up the table.
基于JVET-N1001-v7,在生成MIP的预测矩阵时,编码器是通过变量incW和incH来判断是否需要抽取奇数行的预测值,具体地:Based on JVET-N1001-v7, when generating the MIP prediction matrix, the encoder uses the variables incW and incH to determine whether it needs to extract the predicted values of odd rows, specifically:
oW=1<<(sW-1)oW=1<<(sW-1)
sB=BitDepth Y-1 sB=BitDepth Y -1
mipW=isTransposed?predH:predWmipW=isTransposed? predH:predW
mipH=isTransposed?predW:predHmipH=isTransposed? predW:predH
incW=(predC>mipW)?2:1incW=(predC>mipW)? 2:1
incH=(predC>mipH)?2:1incH=(predC>mipH)? 2:1
其中,incW=2或incH=2代表需要在宽度参数或者高度参数上进行抽取。Among them, incW=2 or incH=2 means that the width parameter or the height parameter needs to be extracted.
由此可见,MIP技术的引入使目前的帧内预测和编码框架产生了较大的改变,在编解码性能提高的同时也引入了大量的逻辑分支,增加了整体的时间和复杂度。具体地,现有的MIP模式的预测过程十分繁琐,分支太多,增加了复杂度,同时在预测过程中会引入很多变量,增加了存储空间。为了克服上述缺陷,本申请提出的亮度分量预测方法,既可以应用于编码器,也可以应用于解码器,可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。It can be seen that the introduction of MIP technology has brought about major changes to the current intra-frame prediction and coding framework. While coding and decoding performance has been improved, a large number of logic branches have also been introduced, which has increased the overall time and complexity. Specifically, the prediction process of the existing MIP model is very cumbersome, with too many branches, which increases the complexity. At the same time, many variables are introduced in the prediction process and the storage space is increased. In order to overcome the above-mentioned shortcomings, the luminance component prediction method proposed in this application can be applied to both the encoder and the decoder, which can simplify the MIP prediction process and reduce the complexity and reduce The storage space and overall time required in the small encoding and decoding process can effectively improve the encoding and decoding efficiency.
进一步地,本申请提出的亮度分量预测方法,可以影响视频编码混合框架中的帧内预测部分,即主要应用于视频编码中的帧内预测模块103和视频解码中的帧内预测模块203中,对编码端和解码端同时作用。Furthermore, the luminance component prediction method proposed in this application can affect the intra prediction part in the video coding mixing framework, that is, it is mainly used in the intra prediction module 103 in video coding and the intra prediction module 203 in video decoding. Simultaneously act on the encoding end and the decoding end.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
在本申请的一个实施例中,图7为本申请实施例提出的一种亮度分量预测方法的实现流程示意图一,应用于编码器中,如图7所示,在本申请的实施例中,编码器进行亮度分量预测的方法可以包括以下步骤。In an embodiment of the present application, FIG. 7 is a schematic diagram 1 of the implementation process of a luminance component prediction method proposed in an embodiment of the present application, which is applied to an encoder, as shown in FIG. 7, in the embodiment of the present application, The method for the encoder to predict the luminance component may include the following steps.
步骤101:根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值。Step 101: Calculate the size ratio according to the first side length and the second side length corresponding to the current block; where the first side length is greater than or equal to the second side length, and the size ratio is set as the ratio of the first side length and the second side length ratio.
在本申请的实施例中,编码器可以先根据当前块对应的第一边长和第二边长计算获得当前块对应的尺寸比值。其中,当前块可以表征当前待编码块或者当前待解码块,具体地,在本申请的实施例中,编码器在进行编码时,当前块即为待编码块。In the embodiment of the present application, the encoder may first calculate the size ratio corresponding to the current block according to the first side length and the second side length corresponding to the current block. Among them, the current block may represent the current block to be encoded or the current block to be decoded. Specifically, in the embodiment of the present application, when the encoder performs encoding, the current block is the block to be encoded.
进一步地,在本申请的实施例中,第一边长可以为当前块较长的一个边,第二边长可以为当前块较短的一个边,即第一边长可以大于或者等于第二边长。具体地,第一边 长和第二边长可以分别为当前块对应的高度参数和宽度参数,也就说,第一边长和第二边长的比值,即尺寸比值,既可以为高宽比,也可以为宽高比。Further, in the embodiments of the present application, the first side length may be the longer side of the current block, and the second side length may be the shorter side of the current block, that is, the first side length may be greater than or equal to the second side. Side length. Specifically, the first side length and the second side length can be respectively the height parameter and the width parameter corresponding to the current block. That is to say, the ratio of the first side length and the second side length, that is, the size ratio, can be either height or width. The ratio can also be an aspect ratio.
需要说明的是,在本申请的实施中,正是由于第一边长可以为当前块较长的一个边,第二边长可以为当前块较短的一个边,即尺寸比值表征当前块对应的长边和短边的比值,因此,尺寸比值为大于或者等于1的自然数。It should be noted that in the implementation of this application, it is precisely because the first side length can be the longer side of the current block, and the second side length can be the shorter side of the current block, that is, the size ratio represents the current block corresponding The ratio of the long side to the short side of, therefore, the size ratio is a natural number greater than or equal to 1.
进一步地,在本申请的实施例中,编码器在对当前块进行编码时,可以在传统模式和MIP模式中先对最优编码方式进行选择,具体地,编码器可以根据当前块对应的尺寸比值进行最优编码方式的选择。Further, in the embodiment of the present application, when the encoder encodes the current block, it can first select the optimal encoding mode in the traditional mode and the MIP mode. Specifically, the encoder can select the optimal encoding method according to the size corresponding to the current block. The ratio is used to select the optimal encoding method.
需要说明的是,在本申请的实施例中,在VVC的帧内预测过程中,对于任意一个亮度编码块,都可以在传统模式和MIP模式中选择一个最优模式进行编码处理。其中,传统模式为包括有编号为0的Planar模式、编号为1的DC模式以及65种角度模式的67种帧内预测模式。It should be noted that, in the embodiment of the present application, in the intra prediction process of VVC, for any luma coding block, an optimal mode can be selected for coding processing in the traditional mode and the MIP mode. Among them, the traditional mode includes 67 intra prediction modes including Planar mode numbered 0, DC mode numbered 1, and 65 angle modes.
进一步地,在本申请的实施例中,编码器在进行最优模式的选择时,可以对当前块进行67个传统模式和M个MIP模式的Rdcost比较,从而可以根据比较结果选出最优模式并进行编码。其中,基于当前亮度编码模块的类别,M的取值也不相同,具体地,当当前亮度编码模块为第一类亮度块,即当前亮度编码模块大小为4×4时,M=35;当当前亮度编码模块为第二类亮度块,即当前亮度编码模块大小为8×4,4×8或8×8时,M=19;当当前亮度编码模块为第三类亮度块,即当前亮度编码模块为其他大小时,M=11。Further, in the embodiment of the present application, when the encoder selects the optimal mode, it can compare the Rdcost of 67 traditional modes and M MIP modes on the current block, so that the optimal mode can be selected according to the comparison result. And encode it. Among them, based on the type of the current brightness coding module, the value of M is different. Specifically, when the current brightness coding module is the first type of brightness block, that is, when the current brightness coding module size is 4×4, M=35; The current brightness coding module is the second type of brightness block, that is, when the current brightness coding module size is 8×4, 4×8, or 8×8, M=19; when the current brightness coding module is the third type of brightness block, that is, the current brightness When the encoding module is of other sizes, M=11.
步骤102:若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造当前块对应的MIP列表;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测。Step 102: If the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, construct the MIP list corresponding to the current block according to the preset prediction strategy; wherein the preset prediction strategy is used based on The size-dependent MIP mode performs brightness prediction.
在本申请的实施例中,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,在尺寸比值小于或者等于预设比例阈值的前提下,如果当前块的尺寸不为第一预设尺寸,那么编码器便可以根据预设预测策略构造当前块对应的MIP列表。In the embodiment of this application, after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than or equal to the preset ratio threshold, if the size of the current block is If it is not the first preset size, the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy.
进一步地,在本申请的实施例中,预设比例阈值等于4,同时,第一预设尺寸为4×16和16×4。Further, in the embodiment of the present application, the preset ratio threshold is equal to 4, and the first preset size is 4×16 and 16×4.
需要说明的是,在本申请的实施例中,编码器在按照MIP模式对当前块进行编码时,需要先对当前块的尺寸进行限定,具体地,当当前块的尺寸比值小于或者等于4,且当前块的尺寸不为4×16,同时也不为16×4时,编码器才会确定按照MIP模式对当前块进行亮度预测。It should be noted that in the embodiment of the present application, when the encoder encodes the current block according to the MIP mode, it needs to first limit the size of the current block. Specifically, when the size ratio of the current block is less than or equal to 4. And when the size of the current block is not 4×16, and it is not 16×4 at the same time, the encoder will determine the luminance prediction of the current block according to the MIP mode.
进一步地,在本申请的实施中,可以预先设置一个依赖于尺寸的MIP模式的预测方法,即预设预测策略,其中,编码器可以根据表征基于尺寸依赖的MIP模式的预设预测策略对当前块进行亮度预测,从而可以获得对应的MIP列表。Further, in the implementation of this application, a size-dependent MIP mode prediction method, that is, a preset prediction strategy, can be preset The block performs brightness prediction, so that the corresponding MIP list can be obtained.
需要说明的是,在本申请的实施中,现有技术在进行最优编码模式的选择时,可以限制当前块的尺寸比值小于或者等于4时,按照MIP模式进行亮度的预测。图8为现有的MIP预测逻辑分支示意图,如图8所示,结合上述表8,现有技术中,在对当前块进行编码时,假设第一边长为高度参数,第二边长为宽度参数,则基于当前块的第一边长H和第二边长W,可以通过以下步骤进行编码处理:It should be noted that, in the implementation of the present application, the prior art can limit the current block size ratio to be less than or equal to 4 when selecting the optimal encoding mode, and then perform brightness prediction according to the MIP mode. Fig. 8 is a schematic diagram of the existing MIP prediction logic branch. As shown in Fig. 8, combined with the above Table 8, in the prior art, when encoding the current block, it is assumed that the first side length is the height parameter, and the second side length is The width parameter, based on the first side length H and the second side length W of the current block, can be encoded through the following steps:
S701:判断是否使用MIP模式,若是,则执行S702,否则执行S7011;S701: Determine whether to use the MIP mode, if yes, execute S702, otherwise execute S7011;
S702:H和W是否均小于或者等于8,若是,则执行S703,否则执行S706;S702: Whether H and W are both less than or equal to 8, if yes, go to S703, otherwise go to S706;
S703:H和W是否均为4,若是,则执行S704,否则执行S705;S703: Whether H and W are both 4, if yes, execute S704, otherwise, execute S705;
S704:通过35种MIP模式生成4×4的预测矩阵,结束。S704: Generate a 4×4 prediction matrix through 35 MIP modes, and end.
S705:通过19种MIP模式生成4×4的预测矩阵,结束。S705: Generate a 4×4 prediction matrix through 19 MIP modes, and end.
S706:是否满足H大于等于8或者W大于等于8,若是,则执行S707,否则执行 S708;S706: Whether H is greater than or equal to 8 or W is greater than or equal to 8, if yes, execute S707, otherwise, execute S708;
S707:通过11种MIP模式生成8×8的预测矩阵,结束。S707: Generate an 8×8 prediction matrix through 11 MIP modes, and end.
S708:W是否大于等于H,若是,则执行S709,都则执行S7010;S708: Whether W is greater than or equal to H, if yes, execute S709, and if so, execute S7010;
S709:通过11种MIP模式生成4×8的预测矩阵,结束。S709: Generate a 4×8 prediction matrix through 11 MIP modes, and end.
S710:通过11种MIP模式生成8×4的预测矩阵,结束。S710: Generate an 8×4 prediction matrix through 11 MIP modes, and end.
S711:使用传统预测模式。S711: Use traditional prediction mode.
可以看出,由于4×16和16×4这两种大小的亮度块的存在,MIP算法会有部分过于冗余的逻辑分支,具体地,在当前块为4×16时,会生成4×8的预测块,共11种;在当前块为16×4时,会生成8×4的预测块,共11种。针对4×16和16×4这两种大小的亮度块,算法需要在矩阵运算时判断是否对现有矩阵进行奇数行的抽取,同时也会使得预测块不全是正方形。It can be seen that due to the existence of two size brightness blocks of 4×16 and 16×4, the MIP algorithm will have some redundant logic branches. Specifically, when the current block is 4×16, 4× There are 11 types of 8 prediction blocks; when the current block is 16×4, 8×4 prediction blocks will be generated, a total of 11 types. For brightness blocks of two sizes, 4×16 and 16×4, the algorithm needs to determine whether to extract odd rows of the existing matrix during matrix operation, and it will also make the prediction block not all square.
基于上述表6可知,现有技术中,在进行MIP模式的限制时,如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行编码。进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的尺寸比值大于4,且当前块的尺寸为4×16和16×4,则不通过MIP模式对当前块进行编码。表9为本申请中MIP模式下亮度块尺寸的限制一,如表9所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,可以将4×16和16×4这两种大小的亮度块限制不进行MIP预测,这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。Based on the foregoing Table 6, it can be seen that in the prior art, when the MIP mode is restricted, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block is not encoded in the MIP mode. Furthermore, in the brightness component prediction method proposed by this application, when the MIP mode is restricted, if the size ratio of the current block is greater than 4, and the size of the current block is 4×16 and 16×4, the current block is not used in the MIP mode. Block encoding. Table 9 is the first limit of the size of the luminance block in the MIP mode in this application. As shown in Table 9, the luminance component prediction method proposed in this application can change the limit conditions of the MIP mode to 4×16 and 16×4. These two sizes of luminance blocks are restricted to not perform MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm are simplified, the time complexity is reduced, and the memory is saved.
表9Table 9
Figure PCTCN2019092664-appb-000005
Figure PCTCN2019092664-appb-000005
进一步地,在本申请的实施例中,在改变MIP模式的限制条件之后,与上述图11相比,图9为本申请中MIP预测逻辑分支示意图,如图9所示,结合上述表9,在本申请的实施例中,在对当前块进行编码时,假设第一边长为高度参数,第二边长为宽度参数,则基于当前块的第一边长H和第二边长W,可以通过以下步骤进行编码处理:Further, in the embodiment of the present application, after the restriction conditions of the MIP mode are changed, compared with the above-mentioned FIG. 11, FIG. 9 is a schematic diagram of the MIP prediction logic branch in the application, as shown in FIG. 9, combined with the above-mentioned Table 9, In the embodiment of the present application, when encoding the current block, assuming that the first side length is the height parameter and the second side length is the width parameter, based on the first side length H and the second side length W of the current block, The encoding process can be performed through the following steps:
S801:判断是否使用MIP模式,若是,则执行S802,否则执行S807;S801: Determine whether to use the MIP mode, if yes, execute S802, otherwise execute S807;
S802:H和W是否均小于或者等于8,若是,则执行S803,否则执行S806;S802: Whether H and W are both less than or equal to 8, if yes, go to S803, otherwise go to S806;
S803:H和W是否均为4,若是,则执行S804,否则执行S805;S803: Whether H and W are both 4, if yes, execute S804, otherwise, execute S805;
S804:通过35种MIP模式生成4×4的预测矩阵,结束。S804: Generate a 4×4 prediction matrix through 35 MIP modes, and end.
S805:通过19种MIP模式生成4×4的预测矩阵,结束。S805: Generate a 4×4 prediction matrix through 19 MIP modes, and end.
S806:通过11种MIP模式生成8×8的预测矩阵,结束。S806: Generate an 8×8 prediction matrix through 11 MIP modes, and end.
S807:使用传统模式。S807: Use traditional mode.
对比上述图8和图9,本申请提出的亮度分量预测方法,可以有效地解决由于4×16 和16×4这两种大小的亮度块的存在,MIP算法会有部分过于冗余的逻辑分支的问题,同时,由于获得的预测块均为正方形,从而可以在矩阵运算时避免了是否对现有矩阵进行奇数行抽取的判定。Comparing the foregoing Figures 8 and 9, the brightness component prediction method proposed in this application can effectively solve the problem that due to the existence of brightness blocks of 4×16 and 16×4, the MIP algorithm will have some redundant logic branches. At the same time, since the obtained prediction blocks are all squares, the determination of whether to extract odd rows of the existing matrix can be avoided during matrix operations.
进一步地,在本申请的实施例中,在语法语义上,在进行MIP模式的限制时,将满足Abs(Log2(cbWidth)-Log2(cbHeight))<=2)条件的当前块允许进行MIP预测,修改为满足Abs(Log2(cbWidth)-Log2(cbHeight))<2)&&(Log2(cbWidth)!=4&&Log2(cbHeight)!=2)&&(Log2(cbWidth)!=2)&&Log2(cbHeight)!=4)条件的当前块才可以使用MIP模式。Further, in the embodiment of the present application, in terms of syntax and semantics, when the MIP mode is restricted, the current block that satisfies the Abs(Log2(cbWidth)-Log2(cbHeight))<=2) condition is allowed to perform MIP prediction , Modified to satisfy Abs(Log2(cbWidth)-Log2(cbHeight))<2)&&(Log2(cbWidth)!=4&&Log2(cbHeight)!=2)&&(Log2(cbWidth)!=2)&&Log2(cbHeight)! =4) Only the current block under the conditions can use the MIP mode.
进一步地,在本申请的实施例中,在对MIP的预测过程的语法进行修改时,具体可以对上述表7中的语法进行修改,具体地,表10为本申请中MIP模式对应的语法关系,如表10所示,在本申请的实施例中,语法中的MipSizeId,numModes,boundarySize,predW,predH,predC有以下关系:Further, in the embodiment of the present application, when the grammar of the MIP prediction process is modified, the grammar in Table 7 can be specifically modified. Specifically, Table 10 is the grammatical relationship corresponding to the MIP mode in this application. As shown in Table 10, in the embodiment of this application, the MipSizeId, numModes, boundarySize, predW, predH, and predC in the syntax have the following relationships:
表10Table 10
MipSizeIdMipSizeId numModes numModes boundarySizeboundarySize predCpredC
00 3535 22 44
11 1919 44 44
22 1111 44 88
由此可见,与现有技术相比,本申请提出的亮度分量预测方法,可以将4×16和16×4两种亮度块禁止使用MIP模式,进而predW和predH在MipSizeId等于2时,由于当前亮度编码的边长必定大于或者等于8,因此不用进行比较运算,可以直接等于8。这种改动使得predW、predH和predC完全相等,因此可以进一步简化语法,使用predC代替MIP模式中所有的predW和predH,即MIP模式生成的预测矩阵的大小完全等于MIP中矩阵的大小,而不需要额外的比较。It can be seen that, compared with the prior art, the brightness component prediction method proposed in this application can prohibit the use of MIP modes for two brightness blocks of 4×16 and 16×4, and predW and predH when MipSizeId is equal to 2, due to the current The side length of the luminance encoding must be greater than or equal to 8, so it can be directly equal to 8 without performing comparison operations. This change makes predW, predH and predC completely equal, so the syntax can be further simplified, using predC instead of all predW and predH in the MIP mode, that is, the size of the prediction matrix generated by the MIP mode is completely equal to the size of the matrix in the MIP, and there is no need Additional comparison.
现有技术中,在使用MIP模式对4×16和16×4两种亮度块进行预测时,需要通过矩阵的奇数行抽取,以生成4×8和8×4大小的预测块,因此语法上需要判断是否需要抽取这一步操作,而本申请提出的亮度分量预测方法,在改变MIP模式的限制条件之后,可以有效地避免矩阵的奇数行抽取,与上述公式(2)相比,在本申请的实施中,编码器在通过MIP模式进行亮度预测时,可以通过如下的公式(3)进行:In the prior art, when using the MIP mode to predict two kinds of brightness blocks, 4×16 and 16×4, it is necessary to extract the odd rows of the matrix to generate prediction blocks of 4×8 and 8×4 sizes. It is necessary to determine whether this step of extraction is required, and the brightness component prediction method proposed in this application can effectively avoid the extraction of odd rows of the matrix after changing the restriction conditions of the MIP mode. Compared with the above formula (2), in this application In the implementation of, when the encoder performs brightness prediction in MIP mode, it can be performed by the following formula (3):
Figure PCTCN2019092664-appb-000006
Figure PCTCN2019092664-appb-000006
其中,among them,
oW=1<<(sW-1)oW=1<<(sW-1)
sB=BitDepth Y-1 sB=BitDepth Y -1
需要说明的是,在本申请的实施例中,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,如果当前块的尺寸为4×16或16×4,那么,即使尺寸比值小于或者等于4,编码器也不会按照MIP模式对当前块进行编码处理,从而可以简化预测分支和语法语义,降低时间复杂度。It should be noted that, in the embodiment of the present application, after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size of the current block is 4×16 or 16×4, Then, even if the size ratio is less than or equal to 4, the encoder will not encode the current block according to the MIP mode, which can simplify prediction branching and syntax semantics, and reduce time complexity.
进一步地。在本申请的实施例中,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,当当前块的尺寸比值小于或者等于4,且当前块的尺寸不为4×16,同时也不为16×4时,编码器便可以根据预设预测策略构造当前块对应的MIP列表,其中,MIP列表即为MIPMPM。further. In the embodiment of the present application, after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, when the size ratio of the current block is less than or equal to 4, and the size of the current block is not 4 ×16 and not 16×4 at the same time, the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy, where the MIP list is MIPMPM.
需要说明的是,在本申请的实施例中,为了节省比特开销,VVC中使用了MPM的 帧内模式编码技术。具体地,在构造MIPMPM列表时,首先需要获取上侧相邻亮度块的第一预测模式,即上侧相邻亮度块的最优模式所对应的MIP模式ABOVE_MIP,和左侧相邻亮度块的第二预测模式,即左侧相邻亮度块的最优模式所对应的MIP模式LEFT_MIP模式,然后基于第一预测模式和第二预测模式进行MIP列表的构造。It should be noted that, in the embodiments of the present application, in order to save bit overhead, the MPM intra-mode coding technology is used in VVC. Specifically, when constructing the MIPMPM list, it is first necessary to obtain the first prediction mode of the upper neighboring luminance block, that is, the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper neighboring luminance block, and the The second prediction mode is the MIP mode LEFT_MIP mode corresponding to the optimal mode of the adjacent brightness block on the left, and then the MIP list is constructed based on the first prediction mode and the second prediction mode.
也就是说,编码器在根据预设预测策略构造当前块对应的MIP列表之前,需要先获取当前块对应的上侧相邻亮度块的第一预测模式,同时获取当前块对应的左侧相邻亮度块的第二预测模式。That is to say, before the encoder constructs the MIP list corresponding to the current block according to the preset prediction strategy, it needs to first obtain the first prediction mode of the upper neighboring luminance block corresponding to the current block, and at the same time obtain the left neighbor corresponding to the current block. The second prediction mode of the luma block.
进一步地,在本申请的实施例中,基于当前块的尺寸比值,即当前块对应的宽高比和高宽比均小于或者等于4,同时,当前块的尺寸不为4×16和16×4,编码器在根据第一边长和第二边长,构造当前块对应的MIP列表时,可以包括以下三种情况:Further, in the embodiment of the present application, based on the size ratio of the current block, that is, the aspect ratio and aspect ratio corresponding to the current block are both less than or equal to 4. At the same time, the size of the current block is not 4×16 and 16× 4. When the encoder constructs the MIP list corresponding to the current block according to the first side length and the second side length, the following three situations can be included:
当当前块属于第一类亮度块,即当前块的尺寸为4×4时,编码器可以基于第一边长和第二边长,按照第一构造策略构造MIP列表,其中,第一构造策略用于通过35种MIP模式进行亮度预测。具体地,编码器可以根据第一预测模式、第二预测模式以及35种MIP模式构造MIP列表。When the current block belongs to the first type of luminance block, that is, when the size of the current block is 4×4, the encoder can construct the MIP list according to the first construction strategy based on the first side length and the second side length, where the first construction strategy Used for brightness prediction through 35 MIP modes. Specifically, the encoder may construct the MIP list according to the first prediction mode, the second prediction mode, and 35 MIP modes.
当当前块属于第二类亮度块,即当前块的尺寸为4×8、8×4或者8×8时,编码器可以基于第一边长和第二边长,按照第二构造策略构造MIP列表,其中,第二构造策略用于通过19种MIP模式进行亮度预测。具体地,编码器可以根据第一预测模式、第二预测模式以及19种MIP模式构造MIP列表。When the current block belongs to the second type of luminance block, that is, when the size of the current block is 4×8, 8×4 or 8×8, the encoder can construct the MIP according to the second construction strategy based on the first side length and the second side length List, where the second construction strategy is used for brightness prediction through 19 MIP modes. Specifically, the encoder may construct the MIP list according to the first prediction mode, the second prediction mode, and 19 MIP modes.
当当前块属于第三类亮度块,即当前块的第一边长H大于8,且第二边长W大于8时,编码器可以基于第一边长和第二边长,按照第三构造策略构造MIP列表,其中,第三构造策略用于通过11种MIP模式进行亮度预测。具体地,编码器可以根据第一预测模式、第二预测模式以及11种MIP模式构造MIP列表。When the current block belongs to the third type of luminance block, that is, when the first side length H of the current block is greater than 8, and the second side length W is greater than 8, the encoder can be based on the first side length and the second side length, according to the third configuration The strategy constructs the MIP list, where the third construct strategy is used for brightness prediction through 11 MIP modes. Specifically, the encoder may construct the MIP list according to the first prediction mode, the second prediction mode, and 11 MIP modes.
步骤103:根据MIP列表获取当前块对应的亮度分量预测值。Step 103: Obtain the predicted value of the luminance component corresponding to the current block according to the MIP list.
步骤104:按照MIP列表和亮度分量预测值对当前块进行编码处理,获得当前块对应的码流数据。Step 104: Perform encoding processing on the current block according to the MIP list and the predicted value of the luminance component to obtain code stream data corresponding to the current block.
在本申请的实施例中,编码器在根据预设预测策略构造当前块对应的MIP列表之后,可以继续根据MIP列表获取当前块对应的亮度分量预测值,然后便可以直接按照MIP列表和亮度分量预测值对当前块进行编码处理。In the embodiment of the present application, after the encoder constructs the MIP list corresponding to the current block according to the preset prediction strategy, it can continue to obtain the brightness component prediction value corresponding to the current block according to the MIP list, and then can directly follow the MIP list and the brightness component The prediction value encodes the current block.
需要说明的是,在本申请的实施例中,本申请实施例提出的亮度分量预测方法,可以对MIP的预测过程的语法进行修改,而MIP技术的编码过程、MIPMPM列表的构造过程、传统模式和MIP模式相互映射的过程的语法可以不进行修改。It should be noted that, in the embodiments of the present application, the luminance component prediction method proposed in the embodiments of the present application can modify the syntax of the MIP prediction process, while the encoding process of the MIP technology, the construction process of the MIPMPM list, and the traditional mode The syntax of the process of mutual mapping with MIP mode may not be modified.
进一步地,在本申请的实施例中,编码器在构造MIP列表之后,便可以根据MIP列表获取当前块对应的亮度分量预测值,从而便可以继续对当前块进行编码处理。Further, in the embodiment of the present application, after constructing the MIP list, the encoder can obtain the prediction value of the luminance component corresponding to the current block according to the MIP list, so that the encoding process of the current block can be continued.
需要说明的是,在本申请的实施例中,编码器在根据MIP列表获取当前块对应的亮度分量预测值时,可以从MIP列表中读取MIP模式的模式号k,从而可以获取对应的矩阵Ak和偏移量bk,以根据上述公式(1)进行矩阵向量乘法,从而可以获得当前块对应的亮度分量预测值。It should be noted that, in the embodiment of the present application, when the encoder obtains the predicted value of the brightness component corresponding to the current block according to the MIP list, it can read the mode number k of the MIP mode from the MIP list, so as to obtain the corresponding matrix Ak and the offset bk are used to perform matrix vector multiplication according to the above formula (1), so as to obtain the predicted value of the brightness component corresponding to the current block.
基于上述步骤101至步骤104的亮度分量预测方法,在本申请的实施例中,编码器可以减少算法分支和语法语义,使MIP技术的实现更加简洁统一,具体地,现有技术中需要对4×16和16×4这两种大小的亮度块单独进行算法的分支,而本申请则可以在MIP预测过程中减少判断次数,避免矩阵相乘前判断是否需要进行奇数行的抽取,可以统一矩阵运算的方法,同时生成的预测块统一为正方形块,减少了一半的可能性。Based on the brightness component prediction method from step 101 to step 104, in the embodiment of the present application, the encoder can reduce algorithm branches and syntax semantics, making the implementation of MIP technology more concise and unified. Specifically, in the prior art, 4 The brightness blocks of ×16 and 16×4 are branched separately, but this application can reduce the number of judgments in the MIP prediction process, avoiding the need to extract odd rows before the matrix is multiplied, and the matrix can be unified The calculation method, and the generated prediction blocks are unified into square blocks, which reduces the probability by half.
需要说明的是,本申请提出的亮度分量预测方法,在降低复杂度的同时,编码性能没有明显损失。具体地,本申请的实施例中,在减少MIP预测分支的情况下,根据VVC 的通测标准,整体性能没有明显损失。Y、U、V上的BD-rate分别为0.05%、-0.04%以及-0.04%。It should be noted that the luminance component prediction method proposed in the present application reduces the complexity without significant loss in coding performance. Specifically, in the embodiment of the present application, in the case of reducing MIP prediction branches, according to the general test standard of VVC, there is no significant loss in overall performance. The BD-rates on Y, U, and V are 0.05%, -0.04%, and -0.04%, respectively.
本申请实施例提出的一种亮度分量预测方法,编码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造当前块对应的基于矩阵的帧内预测MIP列表;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据MIP列表获取当前块对应的亮度分量预测值;按照MIP列表和亮度分量预测值对当前块进行编码处理,获得当前块对应的码流数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。In the brightness component prediction method proposed in the embodiment of the present application, the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed. Matrix intra prediction MIP list; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
基于上述实施例,在本申请的另一实施例中,图10为本申请实施例提出的一种亮度分量预测方法的实现流程示意图二,如图10所示,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,即上述步骤101之后,且根据MIP列表获取当前块对应的亮度分量预测值之前,即步骤103之前,编码器进行亮度分量预测的方法还可以包括以下步骤:Based on the foregoing embodiment, in another embodiment of the present application, FIG. 10 is a schematic diagram of the second implementation flow of a luminance component prediction method proposed in an embodiment of the present application. As shown in FIG. 10, the encoder is working according to the current block corresponding After the first side length and the second side length are calculated to obtain the size ratio, that is, after the above step 101, and before the brightness component prediction value corresponding to the current block is obtained according to the MIP list, that is, before step 103, the method for the encoder to perform the brightness component prediction is also It can include the following steps:
步骤105:若尺寸比值小于预设比例阈值,则根据预设预测策略构造当前块对应的MIP列表。Step 105: If the size ratio is less than the preset ratio threshold, construct the MIP list corresponding to the current block according to the preset prediction strategy.
在本申请的实施例中,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,如果尺寸比值小于预设比例阈值,那么编码器可以根据预设预测策略构造当前块对应的MIP列表。In the embodiment of the present application, after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than the preset ratio threshold, the encoder can be constructed according to the preset prediction strategy The MIP list corresponding to the current block.
基于上述表6可知,现有技术中,在进行MIP模式的限制时,如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行编码。进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的宽高比大于或者等于4,或者,高宽比大于或者等于4,则不通过MIP模式对当前块进行编码。表11为本申请中MIP模式下亮度块尺寸的限制二,如表11所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,不仅可以将4×16和16×4这两种大小的亮度块限制不进行MIP预测,同时还将32×8、8×32、16×64以及64×16这四种大小的亮度块限制不进行MIP预测。这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。Based on the foregoing Table 6, it can be seen that in the prior art, when the MIP mode is restricted, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block is not encoded in the MIP mode. Further, in the brightness component prediction method proposed in this application, when the MIP mode is restricted, if the aspect ratio of the current block is greater than or equal to 4, or the aspect ratio is greater than or equal to 4, the current block is not evaluated in the MIP mode. Encode. Table 11 is the second limitation of the brightness block size in the MIP mode in this application. As shown in Table 11, the brightness component prediction method proposed by this application can not only change the 4×16 and 16× 4 Luminance blocks of these two sizes are restricted from performing MIP prediction. At the same time, four luma blocks of 32×8, 8×32, 16×64, and 64×16 are restricted from performing MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
表11Table 11
Figure PCTCN2019092664-appb-000007
Figure PCTCN2019092664-appb-000007
进一步地,在本申请的实施例中,在改变MIP模式的限制条件之后,即将现有技术中的如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行编码的限制条件,修改为本申请中的如果当前块的宽高比大于或者等于4,或者,高宽比大于或者等于4,则不通过MIP模式对当前块进行编码的限制条件之后,可以有效地解决由于4×16和16×4这两种大小的亮度块的存在,MIP算法会有部分过于冗余的逻辑分支的问题,同时,由于获得的预测块均为正方形,从而可以在矩阵运算时避免了是否对现有矩阵进行奇数行抽取的判定。Further, in the embodiment of the present application, after changing the restriction conditions of the MIP mode, that is, in the prior art, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block will not be processed through the MIP mode. The restriction conditions for encoding the block are modified to the restriction conditions in this application that if the aspect ratio of the current block is greater than or equal to 4, or if the aspect ratio is greater than or equal to 4, then the current block is not encoded in the MIP mode. It can effectively solve the problem of excessively redundant logic branches in the MIP algorithm due to the existence of two size brightness blocks of 4×16 and 16×4. At the same time, because the obtained prediction blocks are all square, it can be used in The matrix operation avoids the decision whether to extract odd rows of the existing matrix.
进一步地,在本申请的实施例中,语法上,在进行MIP模式的限制时,将满足Abs(Log2(cbWidth)-Log2(cbHeight))<=2)条件的当前块允许进行MIP预测,修改为满足Abs(Log2(cbWidth)-Log2(cbHeight))<2)条件的当前块才可以使用MIP模式。Further, in the embodiment of the present application, grammatically, when the MIP mode is restricted, the current block that satisfies the condition of Abs(Log2(cbWidth)-Log2(cbHeight))<=2) is allowed to perform MIP prediction, modify Only the current block that meets the condition of Abs(Log2(cbWidth)-Log2(cbHeight))<2) can use MIP mode.
由此可见,与现有技术相比,本申请提出的亮度分量预测方法,可以将包括4×16和16×4两种亮度块在内的所有宽高比为4,或高宽比为4的当前块禁止使用MIP模式,进而predW和predH在MipSizeId等于2时,由于当前亮度编码的边长必定大于或者等于8,因此不用进行比较运算,可以直接等于8。这种改动使得predW、predH和predC完全相等,因此可以进一步简化语法,使用predC代替MIP模式中所有的predW和predH,即MIP模式生成的预测矩阵的大小完全等于MIP中矩阵的大小,而不需要额外的比较。It can be seen that, compared with the prior art, the brightness component prediction method proposed in this application can set all aspect ratios including 4×16 and 16×4 brightness blocks to 4, or the aspect ratio to 4. MIP mode is prohibited for the current block of, and predW and predH when MipSizeId is equal to 2, since the side length of the current luminance encoding must be greater than or equal to 8, there is no need to perform comparison operations and can be directly equal to 8. This change makes predW, predH and predC completely equal, so the syntax can be further simplified, using predC instead of all predW and predH in the MIP mode, that is, the size of the prediction matrix generated by the MIP mode is completely equal to the size of the matrix in the MIP, and there is no need Additional comparison.
基于上述步骤101至步骤105的亮度分量预测方法,在本申请的实施例中,编码器可以减少算法分支和语法语义,使MIP技术的实现更加简洁统一,降低MIP模式的复杂度,具体地,相比于传统亮度帧内预测模式,MIP模式的计算复杂度更高,现有技术中MIP不仅分支较多,需要进行MIP预测的亮度块也较多,而在本申请中,可以去掉所有宽高比大于等于4,或高宽比大于等于4的亮度块,具体可以包括4×16,8×32,16×64,16×4,32×8,64×16大小的亮度块,从而节省时间复杂度。Based on the brightness component prediction method from step 101 to step 105, in the embodiment of the present application, the encoder can reduce algorithm branches and syntax semantics, make the implementation of MIP technology more concise and unified, and reduce the complexity of the MIP mode. Specifically, Compared with the traditional luma intra prediction mode, the calculation complexity of the MIP mode is higher. In the prior art, MIP not only has more branches, but also requires more luma blocks for MIP prediction. In this application, all bandwidths can be removed. Brightness blocks with an aspect ratio greater than or equal to 4, or with an aspect ratio greater than or equal to 4, can specifically include 4×16, 8×32, 16×64, 16×4, 32×8, 64×16 brightness blocks, thereby saving time complexity.
本申请实施例提出的一种亮度分量预测方法,编码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造当前块对应的基于矩阵的帧内预测MIP列表;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据MIP列表获取当前块对应的亮度分量预测值;按照MIP列表和亮度分量预测值对当前块进行编码处理,获得当前块对应的码流数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式 进行亮度预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。In the brightness component prediction method proposed in the embodiment of the present application, the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed. Matrix intra prediction MIP list; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
基于上述实施例,在本申请的又一实施例中,图11为本申请实施例提出的一种亮度分量预测方法的实现流程示意图三,如图11所示,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,即上述步骤101之后,且根据MIP列表获取当前块对应的亮度分量预测值之前,即步骤103之前,编码器进行亮度分量预测的方法还可以包括以下步骤:Based on the foregoing embodiment, in another embodiment of the present application, FIG. 11 is a schematic diagram of the third implementation process of a luminance component prediction method proposed by an embodiment of the application. As shown in FIG. 11, the encoder is in accordance with the current block corresponding After the first side length and the second side length are calculated to obtain the size ratio, that is, after the above step 101, and before the brightness component prediction value corresponding to the current block is obtained according to the MIP list, that is, before step 103, the method for the encoder to perform the brightness component prediction is also It can include the following steps:
步骤106:若尺寸比值小于预设比例阈值,第一边长和第二边长均不为第一预设边长,则根据预设预测策略构造当前块对应的MIP列表。Step 106: If the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not the first preset side length, construct the MIP list corresponding to the current block according to the preset prediction strategy.
在本申请的实施例中,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,如果尺寸比值小于预设比例阈值,同时,第一边长和第二边长均不为第一预设边长,那么编码器可以根据预设预测策略构造当前块对应的MIP列表。In the embodiment of the present application, after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than the preset ratio threshold, at the same time, the first side length and the second side length If the length is not the first preset side length, the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy.
需要说明的是,在本申请的实施例中,第一预设边长等于64。It should be noted that in the embodiment of the present application, the first preset side length is equal to 64.
进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的尺寸比值大于或者等于4,且第一边长或第二边长为64,则不通过MIP模式对当前块进行编码。表12为本申请中MIP模式下亮度块尺寸的限制三。Further, in the brightness component prediction method proposed by this application, when the MIP mode is restricted, if the size ratio of the current block is greater than or equal to 4, and the first side length or the second side length is 64, the MIP mode is not used to The current block is encoded. Table 12 is the third limitation of the brightness block size in the MIP mode in this application.
表12Table 12
Figure PCTCN2019092664-appb-000008
Figure PCTCN2019092664-appb-000008
如表12所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,不仅可以将4×16、16×4、32×8、8×32、16×64以及64×16这几种大小的亮度块限制不进行MIP预测,还对64×32、32×64以及64×64这三种大小的亮度块限制不进行MIP预测。这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。As shown in Table 12, the brightness component prediction method proposed by this application can not only change 4×16, 16×4, 32×8, 8×32, 16×64, and 64× 16 Luminance blocks of these sizes are restricted to not perform MIP prediction, and the three types of luminance blocks of 64×32, 32×64, and 64×64 are also restricted to not perform MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
进一步地,在本申请的实施例中,在改变MIP模式的限制条件之后,即将现有技术中的如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行编码的限制条件,修改为本申请中的如果当前块的尺寸比值大于或者等于4,且第一边长或第二边长为64,则不通过MIP模式对当前块进行编码的限制条件之后,可以有效地解决由于4×16和16×4这两种大小的亮度块的存在,MIP算法会有部分过于冗余的逻辑分支的问题,同时,由于获得的预测块均为正方形,从而可以在矩阵运算时避免了是否对现有矩阵进行奇数行抽取的判定。Further, in the embodiment of the present application, after changing the restriction conditions of the MIP mode, that is, in the prior art, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block will not be processed through the MIP mode. The restriction condition for encoding the block is modified as the restriction condition in this application that if the size ratio of the current block is greater than or equal to 4, and the first side length or the second side length is 64, the current block is not encoded in the MIP mode After that, it can effectively solve the problem of excessively redundant logic branches in the MIP algorithm due to the existence of two size brightness blocks of 4×16 and 16×4. At the same time, because the obtained prediction blocks are all square, It is possible to avoid the determination of whether to extract odd rows of the existing matrix during matrix operations.
进一步地,在本申请的实施例中,语法上,在进行MIP模式的限制时,将满足Abs(Log2(cbWidth)-Log2(cbHeight))<=2)条件的当前块允许进行MIP预测,修改为满足Abs(Log2(cbWidth)-Log2(cbHeight))<2)&&Log2(cbWidth)<6&&Log2(cbHeight)<6条件的当前块才可以使用MIP模式。Further, in the embodiment of the present application, grammatically, when the MIP mode is restricted, the current block that satisfies the condition of Abs(Log2(cbWidth)-Log2(cbHeight))<=2) is allowed to perform MIP prediction, modify Only the current block that meets the condition of Abs(Log2(cbWidth)-Log2(cbHeight))<2)&&Log2(cbWidth)<6&&Log2(cbHeight)<6 can use MIP mode.
图12为本申请实施例提出的一种亮度分量预测方法的实现流程示意图四,如图12所示,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,即上述步骤101之后,且根据MIP列表获取当前块对应的亮度分量预测值之前,即步骤103之前,编码器进行亮度分量预测的方法还可以包括以下步骤:Fig. 12 is a fourth schematic diagram of the implementation process of a luminance component prediction method proposed by an embodiment of the application. As shown in Fig. 12, after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, That is, after step 101 and before obtaining the predicted value of the luminance component corresponding to the current block according to the MIP list, that is, before step 103, the method for the encoder to predict the luminance component may further include the following steps:
步骤107:若尺寸比值小于或者等于预设比例阈值,第一边长和第二边长均不为第一预设边长,则根据预设预测策略构造当前块对应的MIP列表。Step 107: If the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, construct the MIP list corresponding to the current block according to the preset prediction strategy.
在本申请的实施例中,编码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,在尺寸比值小于或者等于预设比例阈值的前提下,如果第一边长和第二边长均不为第一预设边长,那么编码器可以根据预设预测策略构造当前块对应的MIP列表。In the embodiment of the present application, after the encoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than or equal to the preset ratio threshold, if the first side length Neither the second side length nor the second side length is the first preset side length, then the encoder can construct the MIP list corresponding to the current block according to the preset prediction strategy.
进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的尺寸比值大于4,且第一边长或第二边长为64,则不通过MIP模式对当前块进行编码。表13为本申请中MIP模式下亮度块尺寸的限制四,如表13所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,不仅可以将4×16和16×4这两种大小的亮度块限制不进行MIP预测,还可以对64×32、32×64、16×64、64×16以及64×64这五种大小的亮度块限制不进行MIP预测。这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。Further, in the brightness component prediction method proposed in this application, when the MIP mode is restricted, if the size ratio of the current block is greater than 4, and the first side length or the second side length is 64, the current block is not evaluated in the MIP mode. Encode. Table 13 is the limit 4 of the brightness block size in the MIP mode in this application. As shown in Table 13, the brightness component prediction method proposed by this application can not only change the 4×16 and 16× 4 The brightness block of these two sizes is limited to not perform MIP prediction, and it is also possible to limit the brightness block size of 64×32, 32×64, 16×64, 64×16 and 64×64 without MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
表13Table 13
Figure PCTCN2019092664-appb-000009
Figure PCTCN2019092664-appb-000009
进一步地,在本申请的实施例中,在改变MIP模式的限制条件之后,即将现有技术中的如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行编码的限制条件,修改为本申请中的如果当前块的尺寸比值大于4,且第一边长或第二边长为64,则不通过MIP模式对当前块进行编码的限制条件之后,可以有效地解决由于4×16和16×4这两种大小的亮度块的存在,MIP算法会有部分过于冗余的逻辑分支的问题,同时,由于获得的预测块均为正方形,从而可以在矩阵运算时避免了是否对现有矩阵进行奇数行抽取的判定。Further, in the embodiment of the present application, after changing the restriction conditions of the MIP mode, that is, in the prior art, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block will not be processed through the MIP mode. The restriction condition of block encoding is modified as the restriction condition in this application that if the size ratio of the current block is greater than 4, and the first side length or the second side length is 64, then the current block is not encoded in MIP mode. It can effectively solve the problem of excessively redundant logic branches in the MIP algorithm due to the existence of two size brightness blocks of 4×16 and 16×4. At the same time, because the obtained prediction blocks are all square, it can be used in The matrix operation avoids the decision whether to extract odd rows of the existing matrix.
进一步地,在本申请的实施例中,语法上,在进行MIP模式的限制时,将满足Abs(Log2(cbWidth)-Log2(cbHeight))<=2)条件的当前块允许进行MIP预测,修改为满足Abs(Log2(cbWidth)-Log2(cbHeight))<2)&&Log2(cbWidth)<6&&Log2(cbHeight)<6&&(Log2(cbWidth)!=4&&Log2(cbHeight)!=2)&&(Log2(cbWidth)!=2) &&Log2(cbHeight)!=4)条件的当前块才可以使用MIP模式。Further, in the embodiment of the present application, grammatically, when the MIP mode is restricted, the current block that satisfies the condition of Abs(Log2(cbWidth)-Log2(cbHeight))<=2) is allowed to perform MIP prediction, modify To satisfy Abs(Log2(cbWidth)-Log2(cbHeight))<2)&&Log2(cbWidth)<6&&Log2(cbHeight)<6&&(Log2(cbWidth)!=4&&Log2(cbHeight)!=2)&&(Log2(cbWidth)! =2) &&Log2(cbHeight)! =4) Only the current block under the conditions can use the MIP mode.
由此可见,与现有技术相比,本申请提出的亮度分量预测方法,可以将包括4×16和16×4两种亮度块在内的所有宽高比为4,或高宽比为4的当前块禁止使用MIP模式,进而predW和predH在MipSizeId等于2时,由于当前亮度编码的边长必定大于或者等于8,因此不用进行比较运算,可以直接等于8。这种改动使得predW、predH和predC完全相等,因此可以进一步简化语法,使用predC代替MIP模式中所有的predW和predH,即MIP模式生成的预测矩阵的大小完全等于MIP中矩阵的大小,而不需要额外的比较。It can be seen that, compared with the prior art, the brightness component prediction method proposed in this application can set all aspect ratios including 4×16 and 16×4 brightness blocks to 4, or the aspect ratio to 4. MIP mode is prohibited for the current block of, and predW and predH when MipSizeId is equal to 2, since the side length of the current luminance encoding must be greater than or equal to 8, there is no need to perform comparison operations and can be directly equal to 8. This change makes predW, predH and predC completely equal, so the syntax can be further simplified, using predC instead of all predW and predH in the MIP mode, that is, the size of the prediction matrix generated by the MIP mode is completely equal to the size of the matrix in the MIP, and there is no need Additional comparison.
基于上述步骤101至步骤107的亮度分量预测方法,在本申请的实施例中,编码器可以减少算法分支和语法语义,使MIP技术的实现更加简洁统一,具体地,现有技术中需要对4×16和16×4这两种大小的亮度块单独进行算法的分支,而本申请则可以在MIP预测过程中减少判断次数,避免矩阵相乘前判断是否需要进行奇数行的抽取,可以统一矩阵运算的方法,同时生成的预测块统一为正方形块,减少了一半的可能性。Based on the luminance component prediction method from step 101 to step 107, in the embodiment of this application, the encoder can reduce algorithm branches and syntax and semantics, making the implementation of MIP technology more concise and unified. Specifically, the prior art needs to compare 4 The brightness blocks of ×16 and 16×4 are branched separately, but this application can reduce the number of judgments in the MIP prediction process, avoiding the need to extract odd rows before the matrix is multiplied, and the matrix can be unified The calculation method, and the generated prediction blocks are unified into square blocks, which reduces the probability by half.
本申请实施例提出的一种亮度分量预测方法,编码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造当前块对应的基于矩阵的帧内预测MIP列表;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据MIP列表获取当前块对应的亮度分量预测值;按照MIP列表和亮度分量预测值对当前块进行编码处理,获得当前块对应的码流数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。In the brightness component prediction method proposed in the embodiment of the present application, the encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed. Matrix intra prediction MIP list; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
图13为本申请实施例提出的一种亮度分量预测方法的实现流程示意图五,应用于解码器中,如图13所示,在本申请的实施例中,解码器进行亮度分量预测的方法可以包括以下步骤。FIG. 13 is a schematic diagram 5 of the implementation process of a luminance component prediction method proposed by an embodiment of the application, which is applied to a decoder, as shown in FIG. 13, in the embodiment of the application, the method for predicting the luminance component by the decoder can be Include the following steps.
步骤201:根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值。Step 201: Calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the ratio of the first side length and the second side length ratio.
在本申请的实施例中,解码器可以先根据当前块对应的第一边长和第二边长计算获得当前块对应的尺寸比值。其中,当前块可以表征当前待编码块或者当前待解码块,具体地,在本申请的实施例中,解码器在进行解码时,当前块即为待解码块。In the embodiment of the present application, the decoder may first calculate the size ratio corresponding to the current block according to the first side length and the second side length corresponding to the current block. Among them, the current block may represent the current block to be encoded or the current block to be decoded. Specifically, in the embodiment of the present application, when the decoder is performing decoding, the current block is the block to be decoded.
进一步地,在本申请的实施例中,第一边长可以为当前块较长的一个边,第二边长可以为当前块较短的一个边,即第一边长可以大于或者等于第二边长。具体地,第一边长和第二边长可以分别为当前块对应的高度参数和宽度参数,也就说,第一边长和第二边长的比值,即尺寸比值,既可以为高宽比,也可以为宽高比。Further, in the embodiments of the present application, the first side length may be the longer side of the current block, and the second side length may be the shorter side of the current block, that is, the first side length may be greater than or equal to the second side. Side length. Specifically, the first side length and the second side length can be respectively the height parameter and the width parameter corresponding to the current block. That is to say, the ratio of the first side length and the second side length, that is, the size ratio, can be either height or width. The ratio can also be an aspect ratio.
需要说明的是,在本申请的实施中,正是由于第一边长可以为当前块较长的一个边,第二边长可以为当前块较短的一个边,即尺寸比值表征当前块对应的长边和短边的比值,因此,尺寸比值为大于或者等于1的自然数。It should be noted that in the implementation of this application, it is precisely because the first side length can be the longer side of the current block, and the second side length can be the shorter side of the current block, that is, the size ratio represents the current block corresponding The ratio of the long side to the short side of, therefore, the size ratio is a natural number greater than or equal to 1.
步骤202:若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测。Step 202: If the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and MIP list corresponding to the current block. Luminance component prediction value; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode.
在本申请的实施例中,解码器在根据当前块对应的第一边长和第二边长计算获得尺 寸比值之后,在尺寸比值小于或者等于预设比例阈值的前提下,如果当前块的尺寸不为第一预设尺寸,那么解码器便可以根据预设预测策略解析当前块对应的码流数据,从而可以获得当前块对应的MIP列表和亮度分量预测值。In the embodiment of the present application, after the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than or equal to the preset ratio threshold, if the size of the current block is If the size is not the first preset size, the decoder can analyze the bitstream data corresponding to the current block according to the preset prediction strategy, so as to obtain the MIP list and the predicted value of the luminance component corresponding to the current block.
进一步地,在本申请的实施中,预设比例阈值等于4,同时,第一预设尺寸为4×16和16×4。Further, in the implementation of this application, the preset ratio threshold is equal to 4, and at the same time, the first preset size is 4×16 and 16×4.
需要说明的是,在本申请的实施例中,解码器在按照MIP模式对当前块进行解码时,需要先对当前块的尺寸进行限定,具体地,当当前块的尺寸比值小于或者等于4,且当前块的尺寸不为4×16,同时也不为16×4时,解码器才会确定按照MIP模式对当前块进行亮度预测。It should be noted that, in the embodiment of this application, when the decoder decodes the current block according to the MIP mode, it needs to first limit the size of the current block. Specifically, when the size ratio of the current block is less than or equal to 4. And when the size of the current block is not 4×16, and it is not 16×4 at the same time, the decoder will determine the brightness prediction of the current block according to the MIP mode.
进一步地,在本申请的实施中,可以预先设置一个依赖于尺寸的MIP模式的预测方法,即预设预测策略,其中,解码器可以根据表征基于尺寸依赖的MIP模式的预设预测策略对当前块进行亮度预测,从而可以获得对应的MIP列表。Further, in the implementation of the present application, a size-dependent MIP mode prediction method, that is, a preset prediction strategy, can be preset, wherein the decoder can compare the current prediction strategy based on the preset prediction strategy characterizing the size-dependent MIP mode. The block performs brightness prediction, so that the corresponding MIP list can be obtained.
现有技术中,由于4×16和16×4这两种大小的亮度块的存在,MIP算法会有部分过于冗余的逻辑分支,具体地,在当前块为4×16时,会生成4×8的预测块,共11种;在当前块为16×4时,会生成8×4的预测块,共11种。针对4×16和16×4这两种大小的亮度块,算法需要在矩阵运算时判断是否对现有矩阵进行奇数行的抽取,同时也会使得预测块不全是正方形。In the prior art, due to the existence of two size luma blocks of 4×16 and 16×4, the MIP algorithm will have some logic branches that are too redundant. Specifically, when the current block is 4×16, 4 will be generated. ×8 prediction blocks, 11 types; when the current block is 16×4, 8×4 prediction blocks will be generated, 11 types in total. For brightness blocks of two sizes, 4×16 and 16×4, the algorithm needs to determine whether to extract odd rows of the existing matrix during matrix operation, and it will also make the prediction block not all square.
基于上述表6可知,现有技术中,在进行MIP模式的限制时,如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行解码。进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的尺寸比值大于4,且当前块的尺寸为4×16和16×4,则不通过MIP模式对当前块进行解码。如表9所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,可以将4×16和16×4这两种大小的亮度块限制不进行MIP预测,这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。Based on Table 6 above, in the prior art, when the MIP mode is restricted, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block is not decoded in the MIP mode. Furthermore, in the brightness component prediction method proposed by this application, when the MIP mode is restricted, if the size ratio of the current block is greater than 4, and the size of the current block is 4×16 and 16×4, the current block is not used in the MIP mode. The block is decoded. As shown in Table 9, the luminance component prediction method proposed by this application can restrict the luminance blocks of the two sizes of 4×16 and 16×4 from performing MIP prediction by changing the restriction conditions of the MIP mode. , It will simplify the prediction branch, simplify the syntax and semantics of the algorithm, reduce time complexity, and save memory.
步骤203:根据MIP列表和亮度分量预测值,获得当前块对应的图像数据。Step 203: Obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
在本申请的实施例中,解码器在根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值之后,便可以根据MIP列表和亮度分量预测值,获得当前块对应的图像数据。In the embodiment of the present application, after the decoder parses the bitstream data corresponding to the current block according to the preset prediction strategy, and obtains the MIP list and the predicted value of the brightness component corresponding to the current block, it can then use the MIP list and the predicted value of the brightness component to obtain, Obtain the image data corresponding to the current block.
基于上述步骤201至步骤203的亮度分量预测方法,在本申请的实施例中,解码器可以减少算法分支和语法语义,使MIP技术的实现更加简洁统一,降低MIP模式的复杂度,具体地,相比于传统亮度帧内预测模式,MIP模式的计算复杂度更高,现有技术中MIP不仅分支较多,需要进行MIP预测的亮度块也较多,而在本申请中,可以去掉所有宽高比大于等于4,或高宽比大于等于4的亮度块,具体可以包括4×16,8×32,16×64,16×4,32×8,64×16大小的亮度块,从而节省时间复杂度。Based on the luminance component prediction method from step 201 to step 203, in the embodiment of the present application, the decoder can reduce algorithm branches and syntax semantics, making the implementation of MIP technology more concise and unified, and reducing the complexity of the MIP mode. Specifically, Compared with the traditional luma intra prediction mode, the calculation complexity of the MIP mode is higher. In the prior art, MIP not only has more branches, but also requires more luma blocks for MIP prediction. In this application, all bandwidths can be removed. Brightness blocks with an aspect ratio greater than or equal to 4, or with an aspect ratio greater than or equal to 4, can specifically include 4×16, 8×32, 16×64, 16×4, 32×8, 64×16 brightness blocks, thereby saving time complexity.
进一步地,在本申请的实施中,解码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,即上述步骤201之后,且根据MIP列表和亮度分量预测值,获得当前块对应的图像数据之前,即步骤203之前,解码器进行亮度分量预测的方法还可以包括以下步骤:Further, in the implementation of the present application, the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, that is, after the above step 201, and obtains according to the MIP list and the predicted value of the luminance component Before the image data corresponding to the current block, that is, before step 203, the method for the decoder to predict the luminance component may further include the following steps:
步骤204:若尺寸比值小于预设比例阈值,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值。Step 204: If the size ratio is less than the preset ratio threshold, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
在本申请的实施例中,解码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,如果尺寸比值小于预设比例阈值,那么解码器可以根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值。In the embodiment of the present application, after the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than the preset ratio threshold, the decoder can analyze according to the preset prediction strategy The code stream data corresponding to the current block obtains the MIP list and the predicted value of the luminance component corresponding to the current block.
基于上述表6可知,现有技术中,在进行MIP模式的限制时,如果当前块的宽高比 大于4,或者高宽比大于4,则不通过MIP模式对当前块进行解码。进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的宽高比大于或者等于4,或者,高宽比大于或者等于4,则不通过MIP模式对当前块进行解码。如表11所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,不仅可以将4×16和16×4这两种大小的亮度块限制不进行MIP预测,同时还将32×8、8×32、16×64以及64×16这四种大小的亮度块限制不进行MIP预测。这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。Based on the above Table 6, in the prior art, when the MIP mode is restricted, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block is not decoded in the MIP mode. Further, in the brightness component prediction method proposed in this application, when the MIP mode is restricted, if the aspect ratio of the current block is greater than or equal to 4, or the aspect ratio is greater than or equal to 4, the current block is not evaluated in the MIP mode. To decode. As shown in Table 11, the brightness component prediction method proposed by this application can not only restrict the brightness blocks of the two sizes of 4×16 and 16×4 from MIP prediction by changing the restriction conditions of the MIP mode, but also The brightness blocks of four sizes of 32×8, 8×32, 16×64, and 64×16 are restricted from performing MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
进一步地,在本申请的实施中,解码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,即上述步骤201之后,且根据MIP列表和亮度分量预测值,获得当前块对应的图像数据之前,即步骤203之前,解码器进行亮度分量预测的方法还可以包括以下步骤:Further, in the implementation of the present application, the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, that is, after the above step 201, and obtains according to the MIP list and the predicted value of the luminance component Before the image data corresponding to the current block, that is, before step 203, the method for the decoder to predict the luminance component may further include the following steps:
步骤205:若尺寸比值小于预设比例阈值,第一边长和第二边长均不为第一预设边长,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值。Step 205: If the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not the first preset side length, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the current block corresponding The MIP list and the predicted value of the luminance component.
在本申请的实施例中,解码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,如果尺寸比值小于预设比例阈值,同时,第一边长和第二边长均不为第一预设边长,那么编码器可以根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值。其中,第一预设边长等于64。In the embodiment of the present application, after the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than the preset ratio threshold, at the same time, the first side length and the second side length If the length is not the first preset side length, then the encoder can parse the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block. Wherein, the first preset side length is equal to 64.
进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的尺寸比值大于或者等于4,且第一边长或第二边长为64,则不通过MIP模式对当前块进行解码。如表12所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,不仅可以将4×16、16×4、32×8、8×32、16×64以及64×16这几种大小的亮度块限制不进行MIP预测,还对64×32、32×64以及64×64这三种大小的亮度块限制不进行MIP预测。这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。Further, in the brightness component prediction method proposed by this application, when the MIP mode is restricted, if the size ratio of the current block is greater than or equal to 4, and the first side length or the second side length is 64, the MIP mode is not used to The current block is decoded. As shown in Table 12, the brightness component prediction method proposed by this application can not only change 4×16, 16×4, 32×8, 8×32, 16×64, and 64× 16 Luminance blocks of these sizes are restricted to not perform MIP prediction, and the three types of luminance blocks of 64×32, 32×64, and 64×64 are also restricted to not perform MIP prediction. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
进一步地,在本申请的实施中,解码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,即上述步骤201之后,且根据MIP列表和亮度分量预测值,获得当前块对应的图像数据之前,即步骤203之前,解码器进行亮度分量预测的方法还可以包括以下步骤:Further, in the implementation of the present application, the decoder obtains the size ratio according to the first side length and the second side length corresponding to the current block, that is, after the above step 201, and obtains according to the MIP list and the predicted value of the luminance component Before the image data corresponding to the current block, that is, before step 203, the method for the decoder to predict the luminance component may further include the following steps:
步骤206:若尺寸比值小于或者等于预设比例阈值,第一边长和第二边长均不为第一预设边长,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值。Step 206: If the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, analyze the code stream data corresponding to the current block according to the preset prediction strategy to obtain the current The MIP list corresponding to the block and the predicted value of the luminance component.
在本申请的实施例中,解码器在根据当前块对应的第一边长和第二边长计算获得尺寸比值之后,如果尺寸比值小于或者等于预设比例阈值,同时,第一边长和第二边长均不为第一预设边长,那么编码器可以根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值。In the embodiment of the present application, after the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block, if the size ratio is less than or equal to the preset ratio threshold, at the same time, the first side length and the second side length Both side lengths are not the first preset side length, then the encoder can parse the code stream data corresponding to the current block according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
进一步地,本申请提出的亮度分量预测方法,在进行MIP模式的限制时,如果当前块的尺寸比值大于4,且第一边长或第二边长为64,则不通过MIP模式对当前块进行解码。如表13所示,本申请提出的亮度分量预测方法,通过对MIP模式的限制条件的改变,不仅可以将4×16和16×4这两种大小的亮度块限制不进行MIP预测,还可以对64×32、32×64、16×64、64×16以及64×64这五种大小的亮度块限制不进行MIP预测。这样限制后,会简化预测分支,简化算法的语法语义,降低时间复杂度,同时节省内存。Further, in the brightness component prediction method proposed in this application, when the MIP mode is restricted, if the size ratio of the current block is greater than 4, and the first side length or the second side length is 64, the current block is not evaluated in the MIP mode. To decode. As shown in Table 13, the brightness component prediction method proposed by this application can not only restrict the brightness blocks of the two sizes of 4×16 and 16×4 from performing MIP prediction, but also by changing the restriction conditions of the MIP mode. For the five types of luminance blocks of 64×32, 32×64, 16×64, 64×16, and 64×64, MIP prediction is not restricted. After this restriction, the prediction branch will be simplified, the syntax and semantics of the algorithm will be simplified, the time complexity will be reduced, and the memory will be saved.
基于上述步骤201至步骤206的亮度分量预测方法,在本申请的实施例中,解码器可以减少算法分支和语法语义,使MIP技术的实现更加简洁统一,具体地,现有技术中 需要对4×16和16×4这两种大小的亮度块单独进行算法的分支,而本申请则可以在MIP预测过程中减少判断次数,避免矩阵相乘前判断是否需要进行奇数行的抽取,可以统一矩阵运算的方法,同时生成的预测块统一为正方形块,减少了一半的可能性。Based on the luminance component prediction method from step 201 to step 206, in the embodiment of the present application, the decoder can reduce algorithm branches and syntax and semantics, so that the implementation of MIP technology is more concise and unified. Specifically, in the prior art, 4 The brightness blocks of ×16 and 16×4 are branched separately, but this application can reduce the number of judgments in the MIP prediction process, avoiding the need to extract odd rows before the matrix is multiplied, and the matrix can be unified The calculation method, and the generated prediction blocks are unified into square blocks, which reduces the probability by half.
本申请实施例提出的一种亮度分量预测方法,解码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值;根据MIP列表和亮度分量预测值,获得当前块对应的图像数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。In the brightness component prediction method proposed in the embodiment of the application, the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block If the size is not the first preset size, the bitstream data corresponding to the current block is analyzed according to the preset prediction strategy to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; according to the MIP list and the predicted value of the brightness component, the data corresponding to the current block is obtained Image data. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
基于上述实施例,在本申请的再一实施例中,图14为本申请实施例提出的编码器的组成结构示意图一,如图14所示,本申请实施例提出的编码器300可以包括第一获取部分301,构造部分302以及编码部分303。Based on the foregoing embodiment, in another embodiment of the present application, FIG. 14 is a schematic diagram 1 of the composition structure of the encoder proposed in the embodiment of the application. As shown in FIG. 14, the encoder 300 proposed in the embodiment of the present application may include a first An acquisition part 301, a construction part 302 and an encoding part 303.
所述第一获取部分301,配置于根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值。The first acquiring part 301 is configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set Is the ratio of the first side length to the second side length.
所述构造部分302,配置于若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造所述当前块对应的基于矩阵的帧内预测MIP列表;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测。The constructing part 302 is configured to construct a base corresponding to the current block according to a preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold and the size of the current block is not the first preset size. Matrix intra-frame prediction MIP list; wherein the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode.
所述第一获取部分301,还用于根据所述MIP列表获取所述当前块对应的亮度分量预测值。The first obtaining part 301 is further configured to obtain the predicted value of the luminance component corresponding to the current block according to the MIP list.
所述编码部分303,配置于按照所述MIP列表和所述亮度分量预测值对所述当前块进行编码处理,获得所述当前块对应的码流数据。The encoding part 303 is configured to perform encoding processing on the current block according to the MIP list and the predicted value of the luminance component to obtain code stream data corresponding to the current block.
进一步地,在本申请的实施例中,所述构造部分302,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,若所述尺寸比值小于预设比例阈值,则根据所述预设预测策略构造所述当前块对应的MIP列表。Further, in the embodiment of the present application, the construction part 302 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list Before obtaining the prediction value of the brightness component corresponding to the current block, if the size ratio is less than a preset ratio threshold, construct a MIP list corresponding to the current block according to the preset prediction strategy.
进一步地,在本申请的实施例中,所述构造部分302,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,若所述尺寸比值小于预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略构造所述当前块对应的MIP列表。Further, in the embodiment of the present application, the construction part 302 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list Before obtaining the predicted value of the brightness component corresponding to the current block, if the size ratio is less than a preset ratio threshold, and the first side length and the second side length are not the first preset side length, then The preset prediction strategy constructs a MIP list corresponding to the current block.
进一步地,在本申请的实施例中,所述构造部分302,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,若所述尺寸比值小于或者等于预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略构造所述当前块对应的MIP列表。Further, in the embodiment of the present application, the construction part 302 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list Before obtaining the predicted value of the brightness component corresponding to the current block, if the size ratio is less than or equal to a preset ratio threshold, and the first side length and the second side length are not the first preset side length, then Constructing the MIP list corresponding to the current block according to the preset prediction strategy.
进一步地,在本申请的实施例中,所述第一获取部分301,还配置于根据所述预设预测策略构造所述当前块对应的MIP列表之前,获取所述当前块对应的上侧相邻亮度块 的第一预测模式;以及获取所述当前块对应的左侧相邻亮度块的第二预测模式。Further, in the embodiment of the present application, the first obtaining part 301 is further configured to obtain the upper phase corresponding to the current block before constructing the MIP list corresponding to the current block according to the preset prediction strategy. A first prediction mode of a neighboring luminance block; and obtaining a second prediction mode of a left neighboring luminance block corresponding to the current block.
进一步地,在本申请的实施例中,所述构造部分302,具体配置于若当前块的尺寸为第二预设尺寸,则根据所述第一预测模式、所述第二预测模式以及35种MIP模式构造所述MIP列表。Further, in the embodiment of the present application, the construction part 302 is specifically configured to, if the size of the current block is a second preset size, according to the first prediction mode, the second prediction mode, and 35 types The MIP mode constructs the MIP list.
进一步地,在本申请的实施例中,所述构造部分302,还具体配置于若所述当前块的尺寸为第三预设尺寸,则根据所述第一预测模式、所述第二预测模式以及19种MIP模式构造所述MIP列表。Further, in the embodiment of the present application, the construction part 302 is further specifically configured to, if the size of the current block is a third preset size, perform according to the first prediction mode and the second prediction mode And 19 kinds of MIP modes construct the MIP list.
进一步地,在本申请的实施例中,所述构造部分302,还具体配置于若所述第一边长和所述第二边长均大于第二预设边长,则根据所述第一预测模式、所述第二预测模式以及11种MIP模式构造所述MIP列表。Further, in the embodiment of the present application, the structure part 302 is also specifically configured to perform according to the first side length and the second side length greater than the second preset side length. The prediction mode, the second prediction mode, and the 11 MIP modes construct the MIP list.
进一步地,在本申请的实施例中,所述预设比例阈值等于4;所述第一预设尺寸为4×16和16×4;所述第一预设边长等于64;所述第二预设尺寸为4×4;所述第三预设尺寸为4×8、8×4或者8×8;所述第二预设边长等于8。Further, in the embodiment of the present application, the preset ratio threshold is equal to 4; the first preset size is 4×16 and 16×4; the first preset side length is equal to 64; The second preset size is 4×4; the third preset size is 4×8, 8×4, or 8×8; the second preset side length is equal to 8.
图15为本申请实施例提出的编码器的组成结构示意图二,如图15所示,本申请实施例提出的编码器300还可以包括第一处理器304、存储有第一处理器304可执行指令的第一存储器305、第一通信接口306,和用于连接第一处理器304、第一存储器305以及第一通信接口306的第一总线307。FIG. 15 is a second schematic diagram of the composition structure of the encoder proposed in the embodiment of the application. As shown in FIG. 15, the encoder 300 proposed in the embodiment of the application may further include a first processor 304, and store the first processor 304 to execute The first memory 305 of instructions, the first communication interface 306, and the first bus 307 for connecting the first processor 304, the first memory 305, and the first communication interface 306.
进一步地,在本申请的实施例中,上述第一处理器304,用于根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造所述当前块对应的基于矩阵的帧内预测MIP列表;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据所述MIP列表获取所述当前块对应的亮度分量预测值;按照所述MIP列表和所述亮度分量预测值对所述当前块进行编码处理,获得所述当前块对应的码流数据。Further, in the embodiment of the present application, the above-mentioned first processor 304 is configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to Second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first A preset size, the matrix-based intra prediction MIP list corresponding to the current block is constructed according to a preset prediction strategy; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; The MIP list obtains the predicted value of the brightness component corresponding to the current block; and the encoding process is performed on the current block according to the MIP list and the predicted value of the brightness component to obtain the code stream data corresponding to the current block.
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized in the form of hardware or software function module.
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or correct The part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal A computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the method in this embodiment. The aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
本申请实施例提供了一种图像编码器,该编码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造当前块对应的基于矩阵的帧内预测MIP列表;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据MIP列表获取当前块对应的亮度分量预测值;按照MIP列表和亮度分量预测值对当前块进行编码处理,获得当前块对应的码流数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度 预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。The embodiment of the present application provides an image encoder, which calculates the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is Set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the current block based on the preset prediction strategy is constructed. Matrix intra prediction MIP list; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; compare the current block according to the MIP list and the brightness component prediction value Perform encoding processing to obtain code stream data corresponding to the current block. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
基于上述实施例,在本申请的另一实施例中,图16为本申请实施例提出的解码器的组成结构示意图一,如图16所示,本申请实施例提出的解码器400可以包括第二获取部分401和解码部分402。Based on the foregoing embodiment, in another embodiment of the present application, FIG. 16 is a first schematic diagram of the composition structure of the decoder proposed in this embodiment of the application. As shown in FIG. 16, the decoder 400 proposed in this embodiment of the application may include a first Second, the acquisition part 401 and the decoding part 402.
所述第二获取部分401,配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值。The second acquiring part 401 is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size The ratio is set as the ratio of the first side length to the second side length.
所述解码部分402,配置于若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析所述当前块对应的码流数据,获得所述当前块对应的MIP列表和亮度分量预测值;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测。The decoding part 402 is configured to analyze the code corresponding to the current block according to the preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold and the size of the current block is not the first preset size Stream data to obtain the MIP list and the brightness component prediction value corresponding to the current block; wherein the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode.
所述第二获取部分401,还配置于根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据。The second obtaining part 401 is further configured to obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
进一步地,在本申请的实施例中,所述解码部分402,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,若所述尺寸比值小于预设比例阈值,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。Further, in the embodiment of the present application, the decoding part 402 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list And the brightness component prediction value, before obtaining the image data corresponding to the current block, if the size ratio is less than a preset ratio threshold, the bitstream data is parsed according to the preset prediction strategy to obtain the current block The corresponding MIP list and the predicted value of the luminance component.
进一步地,在本申请的实施例中,所述解码部分402,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,若所述尺寸比值小于预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。Further, in the embodiment of the present application, the decoding part 402 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list And the predicted value of the brightness component, before obtaining the image data corresponding to the current block, if the size ratio is less than a preset ratio threshold, the first side length and the second side length are not the first preset Side length, the code stream data is analyzed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
进一步地,在本申请的实施例中,所述解码部分402,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,若所述尺寸比值小于或者等于预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。Further, in the embodiment of the present application, the decoding part 402 is further configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block, and according to the MIP list And the brightness component prediction value, before obtaining the image data corresponding to the current block, if the size ratio is less than or equal to a preset ratio threshold, the first side length and the second side length are not the first If the side length is preset, the code stream data is analyzed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
进一步地,在本申请的实施例中,所述预设比例阈值等于4;所述第一预设尺寸为4×16和16×4;所述第一预设边长等于64。Further, in the embodiment of the present application, the preset ratio threshold is equal to 4; the first preset size is 4×16 and 16×4; the first preset side length is equal to 64.
图17为本申请实施例提出的解码器的组成结构示意图二,如图17所示,本申请实施例提出的解码器400还可以包括第二处理器403、存储有第二处理器403可执行指令的第二存储器404、第二通信接口405,和用于连接第二处理器403、第二存储器404以及第二通信接口405的第二总线406。FIG. 17 is a second schematic diagram of the composition structure of the decoder proposed in the embodiment of the application. As shown in FIG. 17, the decoder 400 proposed in the embodiment of the present application may further include a second processor 403, which stores a second processor 403 for executable The second memory 404 of instructions, the second communication interface 405, and the second bus 406 for connecting the second processor 403, the second memory 404, and the second communication interface 405.
进一步地,在本申请的实施例中,上述第二处理器403,用于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析所述当前块对应的码流数据,获得所述当前块对应的MIP列表和亮度分量预测值;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据所述MIP列表和 所述亮度分量预测值,获得所述当前块对应的图像数据。Further, in the embodiment of the present application, the above-mentioned second processor 403 is configured to calculate the size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than Or equal to the second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not Is the first preset size, the code stream data corresponding to the current block is parsed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block; wherein, the preset prediction strategy is used to The size-dependent MIP mode performs brightness prediction; according to the MIP list and the brightness component prediction value, the image data corresponding to the current block is obtained.
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized in the form of hardware or software function module.
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or correct The part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal A computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the method in this embodiment. The aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
本申请实施例提供了一种图像解码器,该解码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值;根据MIP列表和亮度分量预测值,获得当前块对应的图像数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。The embodiment of the application provides an image decoder, which calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block If the size is not the first preset size, the bitstream data corresponding to the current block is analyzed according to the preset prediction strategy to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; according to the MIP list and the predicted value of the brightness component, the data corresponding to the current block is obtained Image data. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.
本申请实施例提供计算机可读存储介质和计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如上述实施例所述的方法。The embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method as described in the foregoing embodiment is implemented.
具体来讲,本实施例中的一种亮度分量预测方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种亮度分量预测方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:Specifically, the program instructions corresponding to a luminance component prediction method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc., when the program instructions corresponding to a luminance component prediction method in the storage medium When being read or executed by an electronic device, it includes the following steps:
根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the length of the second side;
若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造所述当前块对应的基于矩阵的帧内预测MIP列表;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;If the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not the first preset size, constructing a matrix-based intra prediction MIP list corresponding to the current block according to the preset prediction strategy; Wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
根据所述MIP列表获取所述当前块对应的亮度分量预测值;Acquiring, according to the MIP list, the predicted value of the luminance component corresponding to the current block;
按照所述MIP列表和所述亮度分量预测值对所述当前块进行编码处理,获得所述当前块对应的码流数据。Perform encoding processing on the current block according to the MIP list and the predicted value of the brightness component to obtain code stream data corresponding to the current block.
具体来讲,本实施例中的一种亮度分量预测方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种亮度分量预测方法对应的程序指令被一电子设备读取或被执行时,还包括如下步骤:Specifically, the program instructions corresponding to a luminance component prediction method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc., when the program instructions corresponding to a luminance component prediction method in the storage medium When being read by an electronic device or executed, it also includes the following steps:
根据所述当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the second side length;
若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析所述当前块对应的码流数据,获得所述当前块对应的MIP列表和亮度分量预测值;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮 度预测;If the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the code stream data corresponding to the current block is parsed according to the preset prediction strategy to obtain the current block Corresponding MIP list and brightness component prediction values; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据。Obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的实现流程示意图和/或方框图来描述的。应理解可由计算机程序指令实现流程示意图和/或方框图中的每一流程和/或方框、以及实现流程示意图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to the schematic diagrams and/or block diagrams of the implementation process of the method, equipment (system), and computer program product according to the embodiments of the application. It should be understood that computer program instructions can be used to implement each process and/or block in the schematic flow diagram and/or block diagram, and to implement a combination of processes and/or blocks in the schematic flow diagram and/or block diagram. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated A device for realizing the functions specified in one or more processes in the schematic flow chart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device realizes the functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。The above are only the preferred embodiments of the present application, and are not used to limit the protection scope of the present application.
工业实用性Industrial applicability
本申请实施例提供了一种亮度分量预测方法、编码器、解码器以及存储介质,编码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,第一边长大于或者等于第二边长,尺寸比值设置为第一边长与第二边长的比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造当前块对应的基于矩阵的帧内预测MIP列表;其中,预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;根据MIP列表获取当前块对应的亮度分量预测值;按照MIP列表和亮度分量预测值对当前块进行编码处理,获得当前块对应的码流数据。相应地,解码器根据当前块对应的第一边长和第二边长计算获得尺寸比值;若尺寸比值小于或者等于预设比例阈值,且当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析当前块对应的码流数据,获得当前块对应的MIP列表和亮度分量预测值;根据MIP列表和亮度分量预测值,获得当前块对应的图像数据。也就是说,在本申请的实施例中,编码器在对当前块进行编码时,可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,具体地,除了尺寸比值大于或者等于4的当前块以外,还禁止尺寸为4×16和16×4的当前块使用MIP模式;相应地,解码器在获取当前块的码流数据之后,也可以依据当前块对应的第一边长和第二边长进行尺寸依赖的MIP模式进行亮度预测,从而可以简化MIP的预测过程,能够在保证编解码性能的基础上,降低复杂程度,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。The embodiments of the present application provide a luminance component prediction method, an encoder, a decoder, and a storage medium. The encoder obtains the size ratio by calculating the first side length and the second side length corresponding to the current block; wherein the first side length is greater than Or equal to the second side length, the size ratio is set to the ratio of the first side length to the second side length; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, the Set the prediction strategy to construct the matrix-based intra prediction MIP list corresponding to the current block; among them, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode; obtain the brightness component prediction value corresponding to the current block according to the MIP list; The list and the predicted value of the luminance component encode the current block to obtain the code stream data corresponding to the current block. Correspondingly, the decoder calculates the size ratio according to the first side length and the second side length corresponding to the current block; if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then The preset prediction strategy parses the code stream data corresponding to the current block to obtain the MIP list and the predicted value of the brightness component corresponding to the current block; and obtains the image data corresponding to the current block according to the MIP list and the predicted value of the brightness component. That is to say, in the embodiment of the present application, when the encoder encodes the current block, it can perform brightness prediction in the size-dependent MIP mode according to the first side length and the second side length corresponding to the current block. Specifically, Except for the current block whose size ratio is greater than or equal to 4, the current block whose size is 4×16 and 16×4 is forbidden to use MIP mode; accordingly, the decoder can also use MIP mode after obtaining the bitstream data of the current block. Corresponding to the first side length and the second side length, the size-dependent MIP mode is used for brightness prediction, which can simplify the MIP prediction process, reduce the complexity and reduce the complexity of the coding and decoding process while ensuring the coding and decoding performance. The required storage space and overall time can effectively improve the coding and decoding efficiency.

Claims (27)

  1. 一种亮度分量预测方法,应用于编码器,所述方法包括:A method for predicting luminance components, applied to an encoder, the method including:
    根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the length of the second side;
    若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造所述当前块对应的基于矩阵的帧内预测MIP列表;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;If the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not the first preset size, constructing a matrix-based intra prediction MIP list corresponding to the current block according to the preset prediction strategy; Wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
    根据所述MIP列表获取所述当前块对应的亮度分量预测值;Acquiring, according to the MIP list, the predicted value of the luminance component corresponding to the current block;
    按照所述MIP列表和所述亮度分量预测值对所述当前块进行编码处理,获得所述当前块对应的码流数据。Perform encoding processing on the current block according to the MIP list and the predicted value of the brightness component to obtain code stream data corresponding to the current block.
  2. 根据权利要求1所述的方法,其中,所述根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,所述方法还包括:The method according to claim 1, wherein after the calculating the size ratio according to the first side length and the second side length corresponding to the current block, and the obtaining the corresponding value of the current block according to the MIP list Before the luminance component prediction value, the method further includes:
    若所述尺寸比值小于所述预设比例阈值,则根据所述预设预测策略构造所述当前块对应的MIP列表。If the size ratio is less than the preset ratio threshold, construct the MIP list corresponding to the current block according to the preset prediction strategy.
  3. 根据权利要求1所述的方法,其中,所述根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,所述方法还包括:The method according to claim 1, wherein after the calculating the size ratio according to the first side length and the second side length corresponding to the current block, and the obtaining the corresponding value of the current block according to the MIP list Before the luminance component prediction value, the method further includes:
    若所述尺寸比值小于所述预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略构造所述当前块对应的MIP列表。If the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not the first preset side length, the current block corresponding to the current block is constructed according to the preset prediction strategy List of MIPs.
  4. 根据权利要求1所述的方法,其中,所述根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,所述方法还包括:The method according to claim 1, wherein after the calculating the size ratio according to the first side length and the second side length corresponding to the current block, and the obtaining the corresponding value of the current block according to the MIP list Before the luminance component prediction value, the method further includes:
    若所述尺寸比值小于或者等于所述预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略构造所述当前块对应的MIP列表。If the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, then the current is constructed according to the preset prediction strategy The MIP list corresponding to the block.
  5. 根据权利要求1至4任一项所述的方法,其中,所述根据所述预设预测策略构造所述当前块对应的MIP列表之前,所述方法还包括:The method according to any one of claims 1 to 4, wherein before the constructing the MIP list corresponding to the current block according to the preset prediction strategy, the method further comprises:
    获取所述当前块对应的上侧相邻亮度块的第一预测模式;Acquiring the first prediction mode of the upper neighboring luminance block corresponding to the current block;
    获取所述当前块对应的左侧相邻亮度块的第二预测模式。Acquire the second prediction mode of the left neighboring luminance block corresponding to the current block.
  6. 根据权利要求5所述的方法,其中,所述根据所述预设预测策略构造所述当前块对应的MIP列表,包括:The method according to claim 5, wherein the constructing the MIP list corresponding to the current block according to the preset prediction strategy comprises:
    若当前块的尺寸为第二预设尺寸,则根据所述第一预测模式、所述第二预测模式以及35种MIP模式构造所述MIP列表。If the size of the current block is the second preset size, the MIP list is constructed according to the first prediction mode, the second prediction mode, and 35 MIP modes.
  7. 根据权利要求5所述的方法,其中,所述根据所述预设预测策略构造所述当前块对应的MIP列表,包括:The method according to claim 5, wherein the constructing the MIP list corresponding to the current block according to the preset prediction strategy comprises:
    若所述当前块的尺寸为第三预设尺寸,则根据所述第一预测模式、所述第二预测模式以及19种MIP模式构造所述MIP列表。If the size of the current block is the third preset size, the MIP list is constructed according to the first prediction mode, the second prediction mode, and 19 MIP modes.
  8. 根据权利要求5所述的方法,其中,所述根据所述预设预测策略构造所述当前块对应的MIP列表,包括:The method according to claim 5, wherein the constructing the MIP list corresponding to the current block according to the preset prediction strategy comprises:
    若所述第一边长和所述第二边长均大于第二预设边长,则根据所述第一预测模式、所述第二预测模式以及11种MIP模式构造所述MIP列表。If the first side length and the second side length are both greater than the second preset side length, the MIP list is constructed according to the first prediction mode, the second prediction mode, and 11 MIP modes.
  9. 根据权利要求1至8任一项所述的方法,其中,The method according to any one of claims 1 to 8, wherein:
    所述预设比例阈值等于4;The preset ratio threshold is equal to 4;
    所述第一预设尺寸为4×16和16×4;The first preset size is 4×16 and 16×4;
    所述第一预设边长等于64;The first preset side length is equal to 64;
    所述第二预设尺寸为4×4;The second preset size is 4×4;
    所述第三预设尺寸为4×8、8×4或者8×8;The third preset size is 4×8, 8×4 or 8×8;
    所述第二预设边长等于8。The second preset side length is equal to 8.
  10. 一种亮度分量预测方法,应用于解码器,所述方法包括:A method for predicting luminance components, applied to a decoder, the method including:
    根据所述当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The size ratio is calculated according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set as the first side length and the second side length The ratio of the second side length;
    若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析所述当前块对应的码流数据,获得所述当前块对应的MIP列表和亮度分量预测值;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;If the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then the code stream data corresponding to the current block is parsed according to the preset prediction strategy to obtain the current block Corresponding MIP list and brightness component prediction values; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
    根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据。Obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
  11. 根据权利要求10所述的方法,其中,所述根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,所述方法还包括:10. The method according to claim 10, wherein after said calculating the size ratio according to the first side length and the second side length corresponding to the current block, and the predicting value according to the MIP list and the brightness component Before obtaining the image data corresponding to the current block, the method further includes:
    若所述尺寸比值小于所述预设比例阈值,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。If the size ratio is less than the preset ratio threshold, the bitstream data is parsed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
  12. 根据权利要求10所述的方法,其中,所述根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,所述方法还包括:10. The method according to claim 10, wherein after said calculating the size ratio according to the first side length and the second side length corresponding to the current block, and the predicting value according to the MIP list and the brightness component Before obtaining the image data corresponding to the current block, the method further includes:
    若所述尺寸比值小于所述预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。If the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not the first preset side length, then the code stream data is parsed according to the preset prediction strategy To obtain the MIP list and the predicted value of the luminance component corresponding to the current block.
  13. 根据权利要求10所述的方法,其中,所述根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,所述方法还包括:10. The method according to claim 10, wherein after said calculating the size ratio according to the first side length and the second side length corresponding to the current block, and the predicting value according to the MIP list and the brightness component Before obtaining the image data corresponding to the current block, the method further includes:
    若所述尺寸比值小于或者等于所述预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。If the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, then the code is parsed according to the preset prediction strategy Stream data to obtain the MIP list and the predicted value of the luminance component corresponding to the current block.
  14. 根据权利要求10至13任一项所述的方法,其中,The method according to any one of claims 10 to 13, wherein:
    所述预设比例阈值等于4;The preset ratio threshold is equal to 4;
    所述第一预设尺寸为4×16和16×4;The first preset size is 4×16 and 16×4;
    所述第一预设边长等于64。The first preset side length is equal to 64.
  15. 一种编码器,所述编码器包括:第一获取部分,构造部分以及编码部分,An encoder comprising: a first acquisition part, a construction part and an encoding part,
    所述第一获取部分,配置于根据当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The first acquiring part is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio is set to The ratio of the first side length to the second side length;
    所述构造部分,配置于若所述尺寸比值小于或者等于预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略构造所述当前块对应的基于矩阵的帧内预测MIP列表;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;The construction part is configured to construct a matrix-based matrix corresponding to the current block according to a preset prediction strategy if the size ratio is less than or equal to a preset ratio threshold, and the size of the current block is not a first preset size Intra-frame prediction MIP list; wherein, the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
    所述第一获取部分,还配置于根据所述MIP列表获取所述当前块对应的亮度分量预测值;The first obtaining part is further configured to obtain the predicted value of the luminance component corresponding to the current block according to the MIP list;
    所述编码部分,配置于按照所述MIP列表和所述亮度分量预测值对所述当前块进行 编码处理,获得所述当前块对应的码流数据。The coding part is configured to perform coding processing on the current block according to the MIP list and the predicted value of the luminance component to obtain code stream data corresponding to the current block.
  16. 根据权利要求15所述的编码器,其中,The encoder according to claim 15, wherein:
    所述构造部分,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,若所述尺寸比值小于所述预设比例阈值,则根据所述预设预测策略构造所述当前块对应的MIP列表。The construction part is further configured after the size ratio is calculated according to the first side length and the second side length corresponding to the current block, and before the brightness component prediction value corresponding to the current block is obtained according to the MIP list If the size ratio is less than the preset ratio threshold, construct the MIP list corresponding to the current block according to the preset prediction strategy.
  17. 根据权利要求15所述的编码器,其中,The encoder according to claim 15, wherein:
    所述构造部分,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,若所述尺寸比值小于所述预设比例阈值,所述第一边长和所述第二边长均不为64,则根据所述预设预测策略构造所述当前块对应的MIP列表。The construction part is further configured after the size ratio is calculated according to the first side length and the second side length corresponding to the current block, and before the brightness component prediction value corresponding to the current block is obtained according to the MIP list If the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not 64, the MIP list corresponding to the current block is constructed according to the preset prediction strategy.
  18. 根据权利要求15所述的编码器,其中,The encoder according to claim 15, wherein:
    所述构造部分,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表获取所述当前块对应的亮度分量预测值之前,若所述尺寸比值小于或者等于所述预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略构造所述当前块对应的MIP列表。The construction part is further configured after the size ratio is calculated according to the first side length and the second side length corresponding to the current block, and before the brightness component prediction value corresponding to the current block is obtained according to the MIP list , If the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, then the structure is constructed according to the preset prediction strategy The MIP list corresponding to the current block.
  19. 根据权利要求15至18任一项所述的编码器,其中,The encoder according to any one of claims 15 to 18, wherein:
    所述预设比例阈值等于4;The preset ratio threshold is equal to 4;
    所述第一预设尺寸为4×16和16×4;The first preset size is 4×16 and 16×4;
    所述第一预设边长等于64。The first preset side length is equal to 64.
  20. 一种解码器,所述编码器包括:第二获取部分和解码部分,A decoder, the encoder includes: a second acquisition part and a decoding part,
    所述第二获取部分,配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值;其中,所述第一边长大于或者等于第二边长,所述尺寸比值设置为所述第一边长与所述第二边长的比值;The second acquiring part is configured to calculate a size ratio according to the first side length and the second side length corresponding to the current block; wherein, the first side length is greater than or equal to the second side length, and the size ratio Set as the ratio of the first side length to the second side length;
    所述解码部分,配置于若所述尺寸比值小于或者等于所述预设比例阈值,且所述当前块的尺寸不为第一预设尺寸,则根据预设预测策略解析所述当前块对应的码流数据,获得所述当前块对应的MIP列表和亮度分量预测值;其中,所述预设预测策略用于基于尺寸依赖的MIP模式进行亮度预测;The decoding part is configured to, if the size ratio is less than or equal to the preset ratio threshold, and the size of the current block is not the first preset size, then parse the current block corresponding to the preset prediction strategy. Code stream data to obtain the MIP list and the brightness component prediction value corresponding to the current block; wherein the preset prediction strategy is used for brightness prediction based on the size-dependent MIP mode;
    所述第二获取部分,还配置于根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据。The second obtaining part is further configured to obtain image data corresponding to the current block according to the MIP list and the predicted value of the brightness component.
  21. 根据权利要求20所述的解码器,其中,The decoder according to claim 20, wherein:
    所述解码部分,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,若所述尺寸比值小于所述预设比例阈值,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。The decoding part is further configured to obtain the size ratio according to the first side length and the second side length corresponding to the current block, and the current block is obtained according to the MIP list and the predicted value of the brightness component. Before the image data corresponding to the block, if the size ratio is less than the preset ratio threshold, the bitstream data is parsed according to the preset prediction strategy to obtain the MIP list and the brightness component prediction value corresponding to the current block.
  22. 根据权利要求20所述的解码器,其中,The decoder according to claim 20, wherein:
    所述解码部分,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图像数据之前,若所述尺寸比值小于所述预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。The decoding part is further configured to obtain the size ratio according to the first side length and the second side length corresponding to the current block, and the current block is obtained according to the MIP list and the predicted value of the brightness component. Before the image data corresponding to the block, if the size ratio is less than the preset ratio threshold, and the first side length and the second side length are not the first preset side length, then according to the preset prediction The strategy parses the code stream data to obtain the MIP list and the predicted value of the luminance component corresponding to the current block.
  23. 根据权利要求20所述的解码器,其中,The decoder according to claim 20, wherein:
    所述解码部分,还配置于根据所述当前块对应的第一边长和第二边长计算获得尺寸比值之后,且所述根据所述MIP列表和所述亮度分量预测值,获得所述当前块对应的图 像数据之前,若所述尺寸比值小于或者等于所述预设比例阈值,所述第一边长和所述第二边长均不为第一预设边长,则根据所述预设预测策略解析所述码流数据,获得所述当前块对应的MIP列表和亮度分量预测值。The decoding part is further configured to obtain the size ratio according to the first side length and the second side length corresponding to the current block, and the current block is obtained according to the MIP list and the predicted value of the brightness component. Before the image data corresponding to the block, if the size ratio is less than or equal to the preset ratio threshold, and the first side length and the second side length are not the first preset side length, then according to the preset It is assumed that the prediction strategy parses the code stream data to obtain the MIP list and the predicted value of the luminance component corresponding to the current block.
  24. 根据权利要求20至23任一项所述的解码器,其中,The decoder according to any one of claims 20 to 23, wherein:
    所述预设比例阈值等于4;The preset ratio threshold is equal to 4;
    所述第一预设尺寸为4×16和16×4;The first preset size is 4×16 and 16×4;
    所述第一预设边长等于64。The first preset side length is equal to 64.
  25. 一种编码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器、第一通信接口,和用于连接所述第一处理器、所述第一存储器以及所述第一通信接口的第一总线,当所述指令被所述第一处理器执行时,实现如权利要求1-9任一项所述的方法。An encoder includes a first processor, a first memory storing executable instructions of the first processor, a first communication interface, and a first communication interface for connecting the first processor and the first processor. A memory and the first bus of the first communication interface, when the instruction is executed by the first processor, implement the method according to any one of claims 1-9.
  26. 一种解码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器、第二通信接口,和用于连接所述第二处理器、所述第二存储器以及所述第二通信接口的第二总线,当所述指令被所述第二处理器执行时,实现如权利要求10-14任一项所述的方法。A decoder including a second processor, a second memory storing executable instructions of the second processor, a second communication interface, and a second communication interface for connecting the second processor and the second processor. The second memory and the second bus of the second communication interface, when the instruction is executed by the second processor, implement the method according to any one of claims 10-14.
  27. 一种计算机可读存储介质,其上存储有程序,应用于编码器和解码器中,所述程序被处理器执行时,实现如权利要求1-14任一项所述的方法。A computer-readable storage medium with a program stored thereon and applied to an encoder and a decoder. When the program is executed by a processor, the method according to any one of claims 1-14 is realized.
PCT/CN2019/092664 2019-06-25 2019-06-25 Luminance component prediction method, encoder, decoder and storage medium WO2020258001A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/092664 WO2020258001A1 (en) 2019-06-25 2019-06-25 Luminance component prediction method, encoder, decoder and storage medium
CN201980083001.8A CN113243105B (en) 2019-06-25 2019-06-25 Luminance component prediction method, encoder, decoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/092664 WO2020258001A1 (en) 2019-06-25 2019-06-25 Luminance component prediction method, encoder, decoder and storage medium

Publications (1)

Publication Number Publication Date
WO2020258001A1 true WO2020258001A1 (en) 2020-12-30

Family

ID=74061139

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092664 WO2020258001A1 (en) 2019-06-25 2019-06-25 Luminance component prediction method, encoder, decoder and storage medium

Country Status (2)

Country Link
CN (1) CN113243105B (en)
WO (1) WO2020258001A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964906A (en) * 2009-07-22 2011-02-02 北京工业大学 Rapid intra-frame prediction method and device based on texture characteristics
CN107071417A (en) * 2017-04-10 2017-08-18 电子科技大学 A kind of intra-frame prediction method for Video coding
WO2018119740A1 (en) * 2016-12-28 2018-07-05 华为技术有限公司 Chrominance prediction method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221592A (en) * 2016-06-22 2023-12-12 Lx 半导体科技有限公司 Image encoding/decoding method and image data transmission method
CN117336473A (en) * 2017-01-02 2024-01-02 Lx 半导体科技有限公司 Image encoding/decoding method, method of transmitting image data, and storage medium
US11889100B2 (en) * 2017-11-14 2024-01-30 Qualcomm Incorporated Affine motion vector prediction in video coding
US10623746B2 (en) * 2017-12-07 2020-04-14 Tencent America LLC Method and apparatus for video coding
CN109688414B (en) * 2018-12-19 2022-11-11 同济大学 VVC intra-frame coding unit candidate prediction mode reduction and block division early termination method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964906A (en) * 2009-07-22 2011-02-02 北京工业大学 Rapid intra-frame prediction method and device based on texture characteristics
WO2018119740A1 (en) * 2016-12-28 2018-07-05 华为技术有限公司 Chrominance prediction method and device
CN107071417A (en) * 2017-04-10 2017-08-18 电子科技大学 A kind of intra-frame prediction method for Video coding

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
HUO, JUNYAN ET AL.: "CE3-1.5:CCLM Derived with Four Neighbouring Samples", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP3 AND ISO/IEC JTC 1/SG 29/WG 11, 19 March 2019 (2019-03-19), DOI: 20200310172928A *
PFAFF, J. ET AL.: "CE3:Affine Linear Weighted Intra Prediction (CE3-4.1, CE3-4.2)", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP3 AND ISO/IEC JTC 1/SC 29/WG 11, 19 March 2019 (2019-03-19), DOI: 20200310170600X *
PFAFF, J. ET AL.: "Intra Prediction Modes Based on Neural Networks", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP3 AND ISO/IEC JTC 1/SC 29/WG 11, 10 April 2018 (2018-04-10), DOI: 20200310171524A *
ZHOU, TIANYANG: "CE3-2.1:Intra Chroma Partitioning and Prediction Restriction", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP3 AND ISO/IEC JTC 1/SC 29/WG 11, 19 March 2019 (2019-03-19), DOI: 20200310172228A *

Also Published As

Publication number Publication date
CN113243105A (en) 2021-08-10
CN113243105B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
WO2020258010A1 (en) Image encoding method, image decoding method, encoder, decoder and storage medium
US9332275B2 (en) Methods, apparatuses, and programs for encoding and decoding picture
KR20200013765A (en) Method and apparatus for image coding / decoding using intra prediction
CN113905236B (en) Image encoding/decoding method, encoder, decoder, and storage medium
CN113439440A (en) Image component prediction method, encoder, decoder, and storage medium
CN114830663A (en) Transform method, encoder, decoder, and storage medium
WO2022116113A1 (en) Intra-frame prediction method and device, decoder, and encoder
CN113068026B (en) Coding prediction method, device and computer storage medium
WO2020258001A1 (en) Luminance component prediction method, encoder, decoder and storage medium
CN113395520B (en) Decoding prediction method, device and computer storage medium
CN114424544A (en) Allowing a matrix-based intra-predicted block to have multiple transform blocks
CN116472707A (en) Image prediction method, encoder, decoder, and computer storage medium
CN112313950A (en) Method and apparatus for predicting video image component, and computer storage medium
WO2024007116A1 (en) Decoding method, encoding method, decoder, and encoder
WO2023193253A1 (en) Decoding method, coding method, decoder and encoder
WO2023193254A1 (en) Decoding method, encoding method, decoder, and encoder
TW202325023A (en) Method and apparatus for prediction based on cross component linear model in video coding system
JP2022541115A (en) Image component prediction method, apparatus and computer storage medium
CN113261279A (en) Method for determining prediction value, encoder, decoder, and storage medium

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: 19935151

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: 19935151

Country of ref document: EP

Kind code of ref document: A1