WO2022104498A1 - Intra-frame prediction method, encoder, decoder and computer storage medium - Google Patents

Intra-frame prediction method, encoder, decoder and computer storage medium Download PDF

Info

Publication number
WO2022104498A1
WO2022104498A1 PCT/CN2020/129266 CN2020129266W WO2022104498A1 WO 2022104498 A1 WO2022104498 A1 WO 2022104498A1 CN 2020129266 W CN2020129266 W CN 2020129266W WO 2022104498 A1 WO2022104498 A1 WO 2022104498A1
Authority
WO
WIPO (PCT)
Prior art keywords
block vector
partition
value
block
prediction
Prior art date
Application number
PCT/CN2020/129266
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 CN202080083248.2A priority Critical patent/CN114830651A/en
Priority to PCT/CN2020/129266 priority patent/WO2022104498A1/en
Publication of WO2022104498A1 publication Critical patent/WO2022104498A1/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
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the embodiments of the present application relate to the technical field of encoding and decoding, and in particular, to an intra-frame prediction method, an encoder, a decoder, and a computer storage medium.
  • SCC standard-Screen Content Coding
  • the Intra Block Copy (IBC) technology can be used to predict repeated/cyclic local image features and be applied to screen content coding, but it copies the entire reference block without considering The boundary information of some local image features limits the coding efficiency of IBC technology and its application in ordinary sequences; while for Angular Weighted Prediction (AWP) technology, it is applied to process boundary information in inter-frame images, However, it is not applied to the processing of intra-frame blocks, so that intra-frame images cannot have the same tools for processing edge information as inter-frame images, which reduces the encoding and decoding efficiency of video sequences.
  • IBC Intra Block Copy
  • Embodiments of the present application provide an intra-frame prediction method, an encoder, a decoder, and a computer storage medium, which can improve the encoding and decoding efficiency of video sequences.
  • an embodiment of the present application provides an intra-frame prediction method, which is applied to an encoder, and the method includes:
  • the prediction mode parameter indicates that the non-rectangular block copy INBC mode is used, determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
  • Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
  • an embodiment of the present application provides an intra-frame prediction method, which is applied to a decoder, and the method includes:
  • the prediction mode parameter indicates that the INBC mode is used
  • the code stream is parsed, and the first block vector index number and the second block vector index number are obtained
  • the block vector candidate list Based on the block vector candidate list, determine the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the block vector candidate list. the second target block vector information of the second partition of the corresponding current block in the block vector candidate list;
  • Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
  • an embodiment of the present application provides an encoder, the encoder includes a first determination unit, a first calculation unit, and a first prediction unit; wherein,
  • the first determining unit configured to determine the prediction mode parameter of the current block
  • the first determining unit is further configured to, when the prediction mode parameter indicates to use the INBC mode, determine the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block ;
  • the first calculation unit is configured to determine a first prediction value of the first partition according to the first target block vector information, and determine a second prediction value of the second partition according to the second target block vector information value; and determining a first weight value for the first partition and a second weight value for the second partition;
  • the first prediction unit is configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra prediction of the current block value.
  • an embodiment of the present application provides an encoder, where the encoder includes a first memory and a first processor; wherein,
  • a first memory for storing a computer program executable on the first processor
  • the first processor is configured to execute the method according to the first aspect when running the computer program.
  • an embodiment of the present application provides a decoder, the decoder includes a parsing unit, a second determining unit, a second calculating unit, and a second predicting unit; wherein,
  • the parsing unit is configured to parse the code stream and obtain the prediction mode parameter of the current block; and is also configured to parse the code stream when the prediction mode parameter indicates to use the INBC mode, and obtain the first block vector index number and the second block vector index number;
  • the second determining unit is configured to determine, based on the block vector candidate list, the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second target block vector information of the second partition of the current block corresponding to the second block vector index number in the block vector candidate list;
  • the second calculation unit is configured to determine a first prediction value of the first partition according to the first target block vector information, and determine a second prediction value of the second partition according to the second target block vector information value; and determining a first weight value for the first partition and a second weight value for the second partition;
  • the second prediction unit is configured to perform weighted fusion using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra prediction of the current block value.
  • an embodiment of the present application provides a decoder, the decoder includes a second memory and a second processor; wherein,
  • a second memory for storing a computer program executable on the second processor
  • the second processor is configured to execute the method according to the second aspect when running the computer program.
  • an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in the first aspect is implemented, or the computer program is executed by the second processor.
  • the processor implements the method as described in the second aspect when executed.
  • the embodiments of the present application provide an intra-frame prediction method, an encoder, a decoder, and a computer storage medium.
  • a prediction mode parameter of a current block is determined; when the prediction mode parameter indicates to use the INBC mode, determine first target block vector information of the first partition of the current block and second target block vector information of the second partition of the current block; determining a first predicted value of the first partition according to the first target block vector information, and Determine the second prediction value of the second partition according to the second target block vector information; determine the first weight value of the first partition and the second weight value of the second partition; use the first prediction value, the first weight value, the second prediction value and the second weight value are weighted and fused to determine the intra-frame prediction value of the current block.
  • the prediction mode parameter of the current block is obtained by parsing the code stream; when the prediction mode parameter indicates to use the INBC mode, the code stream is parsed to obtain the vector index number of the first block and the vector index number of the second block; based on A block vector candidate list, determining the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the second target block vector information of the second partition of the corresponding current block in the block vector candidate list; determining the first predicted value of the first partition according to the first target block vector information, and determining the first predicted value of the first partition according to the second target block
  • the vector information determines the second prediction value of the second partition; determines the first weight value of the first partition and the second weight value of the second partition; uses the first prediction value, the first weight The value, the second predicted value and the second weight value are weighted and fused to determine the intra-frame predicted value of the current block.
  • 1 is a schematic diagram of eight angles that can be supported by an angle-weighted prediction mode provided by the related art
  • FIG. 2 is a schematic diagram of a reference weight configuration supported by an angle-weighted prediction mode provided by the related art
  • 3A is a schematic diagram of angle numbers and corresponding partitions in an angle-weighted prediction mode provided by the related art
  • 3B is a schematic diagram of angle numbers and corresponding slopes in an angle-weighted prediction mode provided by the related art
  • FIG. 4 is a schematic diagram of a positional relationship between a current block and an adjacent block provided by the related art
  • FIG. 6 is a schematic diagram of a local feature with boundary information in a common sequence provided by the related art
  • FIG. 7A is a block diagram of the composition of a video coding system provided by an embodiment of the application.
  • 7B is a block diagram of the composition of a video decoding system provided by an embodiment of the application.
  • FIG. 8 is a schematic flowchart of an intra-frame prediction method provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of another intra prediction method provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the composition and structure of an encoder provided by an embodiment of the application.
  • FIG. 11 is a schematic diagram of a specific hardware structure of an encoder provided by an embodiment of the application.
  • FIG. 12 is a schematic diagram of the composition and structure of a decoder provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application.
  • a first image component, a second image component, and a third image component are generally used to represent a coding block (Coding Block, CB); wherein, the three image components are a luminance component and a blue chrominance component respectively. and a red chrominance component.
  • the luminance component is usually represented by the symbol Y
  • the blue chrominance component is usually represented by the symbol Cb or U
  • the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be represented in the YCbCr format or in the YUV format. express.
  • the first image component may be a luminance component
  • the second image component may be a blue chrominance component
  • the third image component may be a red chrominance component, but this is not specifically limited.
  • High-quality video with one or more characteristics of high resolution, high frame rate, high bit depth, high dynamic range, wide color gamut and omnidirectional viewing angle is being processed.
  • HEVC High Efficiency Video Coding
  • VVC Very Low Efficiency Video Coding
  • JVET Joint Video Experts Team
  • the Angular Weighted Prediction (AWP) mode is proposed in the video coding standard.
  • the surrounding position of the current block (including the whole pixel) can be set first. position and sub-pixel position), and then use the angle prediction method to obtain the weight value corresponding to each pixel position, and then realize the weighting of two different inter-frame prediction values through the obtained weight value.
  • the minimum block size supported by the angle-weighted prediction mode is 8 ⁇ 8, and the maximum block size is 64 ⁇ 64.
  • a total of 8 angles can be supported here.
  • FIG. 1 shows a schematic diagram of eight angles supported by an angle-weighted prediction mode provided by the related art.
  • the 8 diagonal lines with arrows represent the 8 supported angles.
  • FIG. 2 shows a schematic diagram of a reference weight configuration supported by an angle-weighted prediction mode provided by the related art.
  • the reference weight configuration may be a distribution function of the reference weight value obtained according to the reference weight index value, and the non-strictly monotonically increasing function assignment is performed with the position of the 8-point dividing point of the effective length of the reference weight as the reference point.
  • the effective length of the reference weight is It can be calculated from the prediction angle and the current block size.
  • FIG. 3A shows a schematic diagram of angle numbers and corresponding partitions in an angle weighted prediction mode provided by the related art.
  • the angle partition 0 is filled with left oblique lines, which includes two angles, angle 0 and angle 1;
  • the angle partition 1 is filled with grid oblique lines, which includes angle 2 and angle 3.
  • Two kinds of angles; the one filled with dots is angle partition 2, which includes two angles of angle 4 and angle 5;
  • the one filled with right slash is angle partition 3, which includes two angles of angle 6 and angle 7.
  • angle 0 corresponds to a slope of 1
  • angle 1 corresponds to a slope of 1/2
  • angle 2 corresponds to a slope of horizontal
  • angle 3 corresponds to a slope of -1/2
  • angle 4 corresponds to a slope of -1
  • angle 5 corresponds to a slope of is -2
  • angle 6 corresponds to a slope of vertical
  • angle 7 corresponds to a slope of 2.
  • the formula derived from the pixel-by-pixel weight is slightly different at this time according to the different partition areas where the angle is located. It is assumed that the block size of the current block is M ⁇ N, where M is the width, N is the height, X is log2 (the absolute value of the slope of the weight prediction angle), and Y is the weight prediction position.
  • the chrominance weight can be derived by directly taking the upper left corner position corresponding to the 2 ⁇ 2 luminance weight. Assume that the block size of the current block is M ⁇ N, where M is the width and N is the height, then the value range of x is 0 ⁇ (M /2-1); the value range of y is 0 ⁇ (N/2-1).
  • the chroma weight derived pixel by pixel is represented by SampleWeightChroma[x][y], as follows,
  • the motion vector storage scheme of the angle-weighted prediction mode is related to the angle partition.
  • the block size of the current block is M ⁇ N, where M is the width, N is the height, X is log2 (the absolute value of the weighted prediction angle slope), and Y is the weighted prediction position.
  • the motion vector storage scheme is as follows:
  • the angle weighted prediction mode needs to have two unidirectional motion vectors for weighted prediction, and the unidirectional motion vector can be selected from the candidate motion vector list according to the index number (index) in the code stream.
  • FIG. 4 shows a schematic diagram of the positional relationship between the current block and the adjacent blocks provided by the related art. As shown in Figure 4, the current block is filled with white, and the adjacent blocks are filled with gray. Here, for the current block, there may be multiple adjacent blocks, for example, represented by A, B, C, D, F, and G.
  • F, G, C, A, and D are adjacent blocks of the current block, and the "availability" of F, G, C, A, D needs to be determined:
  • the motion vectors of these adjacent blocks are put into the candidate motion vector list after duplicate checking in the order of F, G, C, A and D.
  • the weight checking scheme is: G and F weight checking, C and G weight checking, A and F weight checking, D and G and A weight checking. If the number of motion vectors placed in the candidate motion vector list after duplicate checking is greater than 4, only the first four are placed.
  • the third step is to put the derived temporal bidirectional motion vector into the candidate motion vector list.
  • the fourth step if the number of motion vectors in the candidate motion vector list is less than 5, the first motion vector is scaled in different directions, and then the scaled motion vector is filled into the candidate motion vector list until the candidate motion vector list is reached.
  • the number of motion vectors in is 5.
  • IBC Intra Block Copy
  • FIG. 5 it shows a schematic structural diagram of applying the IBC technology provided by the related art.
  • the current image frame that is, a coding tree unit (Coding Tree Unit, CTU)
  • the area filled with dots in the CTU is the search area (that is, the coded area of the current image frame)
  • the black shaded blocks are respectively
  • the distance between the current coding block (Coding Unit, CU) and the matching prediction block (Block Predictor, also known as the reference block), from the current coding block to the matching reference block, is called Block Vector (BV).
  • BV Block Vector
  • the IBC technology can make better use of the redundant information in the frame and improve the coding performance.
  • the IBC technology can be used to predict repetitive/cyclic local image features and be applied to screen content coding, but it copies the entire reference block without considering the boundary information of some local image features. As shown in the rectangular box in Figure 6.
  • the IBC technology is only used in screen content coding (Screen Content Coding, SCC), which limits the coding efficiency of the IBC technology and its application in common sequences.
  • SCC Screen Content Coding
  • AWP AWP technology
  • it can process boundary information when applied to inter-frame images, but it is not applied to the processing of intra-frame blocks, which makes it impossible to make intra-frame images and inter-frame images have the same tools for processing edge information. Codec efficiency of video sequences.
  • an embodiment of the present application provides an intra-frame prediction method.
  • the basic idea of the method is to: determine the prediction mode parameter of the current block; when the prediction mode parameter indicates to use the INBC mode, determine the first partition of the current block The first target block vector information of the current block and the second target block vector information of the second partition of the current block; determine the first predicted value of the first partition according to the first target block vector information, and according to the second target The block vector information determines the second predicted value of the second partition; determines the first weight value of the first partition and the second weight value of the second partition; uses the first predicted value, the first The weight value, the second prediction value and the second weight value are weighted and fused to determine the intra-frame prediction value of the current block.
  • the video coding system 10 includes a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, and a filter control unit
  • SAO sample Adaptive Offset
  • a video coding block can be obtained by dividing the coding tree block (Coding Tree Unit, CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is converted and quantized by the quantization unit 101.
  • the video coding block is transformed, including transforming residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce the bit rate;
  • the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used for Intra prediction is performed on the video coding block; specifically, the intra prediction unit 102 and the intra prediction unit 103 are used to determine the intra prediction mode to be used to encode the video coding block;
  • the motion compensation unit 104 and the motion estimation unit 105 is used to perform inter-predictive encoding of the received video encoding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is to generate a motion vector.
  • the motion vector can estimate the motion of the video coding block, and then the motion compensation unit 104 performs motion compensation based on the motion vector determined by the motion estimation unit 105; after determining the intra prediction mode, the intra prediction unit 103 also uses In order to provide the selected intra prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used for the video encoding.
  • a predictive block in the frame of the cache unit 110 is used to generate a reconstructed video coding block; the coding unit 109 is used to encode various coding parameters and quantized transform coefficients.
  • the context The content can be based on adjacent coding blocks, and can be used to encode information indicating the determined intra prediction mode, and output the code stream of the video signal; the decoded image buffer unit 110 is used to store the reconstructed video coding blocks for prediction reference. . As the video image coding proceeds, new reconstructed video coding blocks are continuously generated, and these reconstructed video coding blocks are all stored in the decoded image buffer unit 110 .
  • the video decoding system 20 includes a decoding unit 201 , an inverse transform and inverse quantization unit 202 , an intra prediction unit 203 , a motion compensation unit 204 , a filtering unit 205 , a decoded image buffer unit 206 , etc., wherein the decoding unit 201 Header decoding and CABAC decoding can be implemented, and the filtering unit 205 can implement deblocking filtering and SAO filtering.
  • the code stream of the video signal is output; the code stream is input into the video decoding system 20, and firstly passes through the decoding unit 201 to obtain the decoded transform coefficient; Inverse transform and inverse quantization unit 202 processes to generate residual blocks in the pixel domain; intra prediction unit 203 may be used to generate based on the determined intra prediction mode and data from previously decoded blocks of the current frame or picture Prediction data for the current video decoding block; motion compensation unit 204 determines prediction information for the video decoding block by parsing the motion vector and other associated syntax elements, and uses the prediction information to generate predictive information for the video decoding block being decoded block; a decoded video block is formed by summing the residual block from inverse transform and inverse quantization unit 202 and the corresponding predictive block produced by intra prediction unit 203 or motion compensation unit 204; the decoded video signal Video quality may be improved by filtering unit 205 in order to remove blocking artifacts; decoded video blocks are then stored in decoded image buffer unit 206, which stores reference
  • the intra-frame prediction method in the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 shown in FIG. 7A and the intra-frame prediction unit 203 shown in FIG. 7B . That is to say, the intra-frame prediction method in the embodiment of the present application can be applied to both a video encoding system and a video decoding system, and can even be applied to a video encoding system and a video decoding system at the same time. There is no specific limitation. It should also be noted that when the intra-frame prediction method is applied to the intra-frame prediction unit 103 shown in FIG.
  • the “current block” specifically refers to the current coding block in the intra-frame prediction; when the intra-frame prediction method is applied In the intra-frame prediction unit 203 shown in FIG. 7B , the “current block” specifically refers to the current decoding block in the intra-frame prediction.
  • the intra-frame prediction method provided by the embodiment of the present application is applied to a video encoding device, that is, an encoder.
  • the functions implemented by the method can be implemented by the first processor in the encoder calling a computer program, and of course the computer program can be stored in the first memory.
  • the encoder includes at least a first processor and a first memory.
  • FIG. 8 shows a schematic flowchart of an intra-frame prediction method provided by an embodiment of the present application. As shown in Figure 8, the method may include:
  • each image block to be encoded currently may be called a coding block (Coding Block, CB).
  • each encoding block may include a first image component, a second image component, and a third image component; and the current block is the encoding of the first image component, the second image component, or the third image component to be predicted currently in the video image piece.
  • the current block performs the first image component prediction, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the current block may also be called a luminance block; or, it is assumed that the current block performs the second image component prediction prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block may also be called a chrominance block.
  • the prediction mode parameter is used to indicate the prediction mode used by the current block and parameters related to the prediction mode.
  • the determination can be performed according to the magnitude of the distortion value.
  • the determination may be made according to the cost result of Rate Distortion Optimization (RDO), or the cost result of the sum of absolute error (Sum of Absolute Difference, SAD), or even It is determined according to the cost result of the sum of absolute transformed difference (Sum of Absolute Transformed Difference, SATD); however, the embodiment of the present application does not make any limitation.
  • the determining the prediction mode parameter of the current block may include:
  • a prediction mode parameter of the current block is determined from the plurality of candidate prediction modes.
  • the determining the prediction mode parameter of the current block from the multiple candidate prediction modes according to the precoding result may include:
  • An optimal rate-distortion cost result is selected from the rate-distortion cost results, and a candidate prediction mode corresponding to the optimal rate-distortion cost result is determined as a prediction mode parameter of the current block.
  • the multiple candidate prediction modes here may refer to intra-frame prediction modes, and by precoding the current block according to the multiple candidate prediction modes, precoding results corresponding to the multiple candidate prediction modes may be determined.
  • the precoding result may be the distortion value corresponding to the candidate prediction mode (or called the encoding mode), the rate-distortion cost result corresponding to the candidate prediction mode, or even other cost results corresponding to the candidate prediction mode, such as SAD Cost result, SATD cost result, etc.
  • the optimal rate-distortion cost result may be selected from the rate-distortion cost results, and The candidate prediction mode is determined as the prediction mode parameter of the current block.
  • INBC Intra Non-rectangle Block Copy
  • IBC Intra Block Copy
  • AWP Angular Weighted Prediction
  • the IBC technology can be used to predict repeated/cyclic local image features, and is applied to screen content coding; the AWP technology is applied to process boundary information in inter-frame images.
  • the purpose of proposing the INBC mode in this embodiment of the present application is to expect that INBC can better handle the edge information of two parts of different texture/color distributions in the same block, the edges of sharp objects in the intra-frame image, the junction between the foreground and the background, and Boundary information, etc., make intra-frame images also have a tool for processing edge information like inter-frame images, thereby effectively improving the encoding and decoding efficiency of video sequences.
  • the various candidate prediction modes here may include the INBC mode and the normal intra mode.
  • the common intra-frame mode may include an angle prediction mode, a position-based intra-frame prediction combination (Position Dependent intra Prediction Combination, PDPC) mode, a matrix-based intra-frame prediction (Matrix weighted Intra Prediction, MIP) mode and the like.
  • the multiple candidate prediction modes may include the INBC mode and the normal intra mode.
  • the INBC mode will compete with the normal intra mode to determine the prediction mode parameters of the current block.
  • the determining the prediction mode parameter of the current block may include:
  • the INBC mode flag is set to the first value
  • the INBC mode flag is set to a second value.
  • the INBC mode flag when the INBC mode flag is set to the first value, it is determined that the current block uses the INBC mode for intra-frame prediction; when the INBC mode flag is set to the second value, it is determined that the current block uses the normal intra-frame mode for frame prediction intraprediction.
  • the first value may be 1, and the second value may be 0; or, the first value may be true, and the second value may be false.
  • the first value may be 0, and the second value may be 1; or, the first value may be false, and the second value may be true.
  • the INBC mode flag bit can be set to 1, and the INBC mode is used to determine the current block. If the prediction mode parameter indicates that the INBC mode is not used, the INBC mode flag can be set to 0, and the normal intra mode is used to determine the intra prediction value of the current block.
  • the method may further include:
  • the encoder can also write the INBC mode flag into the code stream.
  • the prediction mode parameter of the current block that is, the prediction mode used by the current block, can be determined by parsing the code stream.
  • the method may also include:
  • Intra-frame prediction is performed on the current block using the three target candidate angle division modes, and prediction cost results corresponding to the three target candidate angle division modes are determined;
  • the INBC mode used by the current block is determined from the three target candidate angular partition modes.
  • the candidate angle division modes can have 56 modes, which are currently extended to 65 modes in VVC.
  • three target candidate angle division modes can be determined. Taking these three target candidate angle division modes as alternatives, use these three target candidate angle division modes to perform intra-frame prediction on the current block, and determine the prediction cost results corresponding to the three target candidate angle division modes, so as to obtain the results from the three target candidate angle division modes.
  • the INBC mode used by the current block is determined in the target candidate angle division mode.
  • the determining the INBC mode used by the current block from the three target candidate angle division modes based on the prediction cost result may include:
  • the optimal rate-distortion cost result is selected from the rate-distortion cost results, and the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
  • the preset rate-distortion model can be regarded as a relational function between the distortion value, the code rate and the Lagrangian multiplier. Assuming that the distortion value is denoted by D, the code rate is denoted by R, and the Lagrange multiplier is denoted by ⁇ , then the preset rate-distortion model can be shown in Equation (8),
  • J represents the rate-distortion cost result.
  • the calculation process is the same.
  • the embodiment of the present application uses the first rate-distortion cost result of the current block in one of the target candidate angle division modes as an example for description.
  • intra-frame prediction is performed on the current block by using the target candidate angle division mode to obtain the first predicted value of the current block; then according to the first predicted value of the current block and the real value of the current block, the mean square The error (Mean Square Error, MSE) is calculated to obtain the first distortion value of the current block (represented by D1); at this time, assuming that the code rate R is 1, then the preset rate distortion model shown in equation (8) can be calculated to obtain the
  • the second rate-distortion cost result (represented by RDC2) and the third rate-distortion cost result (represented by RDC3) under the other two target candidate angle division modes can also be calculated.
  • the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
  • the determining of three target candidate angle division modes from among multiple candidate angle division modes may include:
  • the three target candidate angle division modes are determined from the plurality of candidate angle division modes.
  • the determining the three target candidate angle division modes from the multiple candidate angle division modes based on the precoding result may include:
  • Three relatively superior SATD cost results are selected from the SATD cost results, and the candidate angle division modes corresponding to the three SATD cost results are determined as the three target candidate angle division modes.
  • three target candidate angle division modes can be selected according to the sum of absolute transformed difference (Sum of Absolute Transformed Difference, SATD) cost result for rate-distortion cost calculation.
  • SATD Absolute Transformed Difference
  • the corresponding precoding results can be obtained according to the precoding results.
  • SATD cost result three relatively superior SATD cost results are selected from the SATD cost results, and the candidate angle division modes corresponding to the selected three SATD cost results are determined as the three target candidate angle division modes.
  • the performing precoding on the current block based on the multiple candidate angle division modes, and determining the precoding results corresponding to the multiple candidate angle division modes may include:
  • the precoding result corresponding to the mode
  • the current block is divided based on each candidate angle division mode, and the first partition and the second partition of the current block in the candidate angle division mode can be determined. Then, after determining the first target block vector information of the first partition and the second target block vector information of the second partition in the candidate angle division mode, the first target block of the first partition in each candidate angle division mode can be The vector information and the vector information of the second target block of the second partition perform precoding on the current block, so as to obtain precoding results corresponding to various candidate angle division modes.
  • the prediction mode parameter indicates that the INBC mode is used.
  • the method may also include:
  • the block vector candidate list including at least one block vector
  • For the candidate angle division mode traverse at least one block vector in the block vector candidate list, and calculate the SAD cost result corresponding to the at least one block vector for the first partition and the SAD cost result for the second partition for the at least one block vector.
  • Select the optimal SAD cost result from the first SAD cost result determine the block vector corresponding to the optimal SAD cost result as the first target block vector information of the first partition; and select the optimal SAD cost result from the second SAD cost result
  • the optimal SAD cost result is selected from the cost results, and the block vector corresponding to the optimal SAD cost result is determined as the second target block vector information of the second partition.
  • the optimal block vector ie, the first target block vector information
  • the precoding results corresponding to the various candidate angle division modes are determined by precoding the current block; and then the precoding results can be obtained according to the precoding results.
  • the SATD cost results corresponding to these various candidate angle division modes, and three relatively superior SATD cost results are selected from the SATD cost results, and the candidate angle division modes corresponding to the selected three SATD cost results are determined as these three Target candidate angle division mode.
  • the rate-distortion cost results corresponding to the three target candidate angle division modes can be obtained;
  • the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
  • the determined prediction mode can be used to encode the current block finally, so that the prediction residual is small and the encoding efficiency can be improved.
  • the prediction mode parameter indicates to use the INBC mode
  • the current block is divided based on the INBC mode, and at least two partitions can be obtained.
  • the at least two partitions may be the first partition and the second partition.
  • the method may also include:
  • a block vector candidate list is constructed, the block vector candidate list including at least one block vector.
  • the building block vector candidate list may include:
  • the block vector candidate list is determined based on the historical block vector prediction information.
  • the block vector candidate list may be determined based on historical block vector prediction information (History based Block Vector Prediction, HBVP).
  • HBVP Block Vector Prediction
  • the HBVP technology specifically copies 8 motion information candidate buffers from previously encoded blocks into a first-in, first-out queue (First Input First Output, FIFO), and the FIFO is continuously updated in a first-in, first-out manner. If the motion information candidate in the FIFO is the same as the motion information just coded, the duplicate motion information candidate will be removed first, and then the motion information of the current coding unit will be added at the end of the FIFO.
  • FIFO First Input First Output
  • the motion information candidates in HBVP are identified together with the existing motion information candidates in the second-generation AVS standard (referred to as AVS2) proposed by the Audio Video coding Standard Workgroup of China (AVS). , which is binarized using the unary method.
  • AVS2 contains five motion information candidates, but in the third-generation AVS standard (referred to as AVS3 for short), the symmetric mode is removed, leaving only 4 motion information candidates, plus 8 candidates in HBVP, a total of up to 12 motion information candidates.
  • HBVP will store the block vector of the encoded IBC coded block in a historical block vector information cache with a maximum storage capacity of 12, so that the block vector prediction information based on history can be obtained.
  • the determining the block vector candidate list based on the historical block vector prediction information may include:
  • the size parameter of the coded block is greater than or greater than the preset size parameter, storing the block vector of the coded block in the zeroth bit of the block vector candidate list;
  • the block vector candidate list is obtained based on the block vectors stored in the zeroth bit, the first bit, the second bit, the third bit, the fourth bit, the fifth bit and the sixth bit in the block vector candidate list.
  • a BV can be allocated from the acquired historical block vector prediction information as one of the candidate BVPs (cbvp_cands[i], a maximum of 7 BVs are stored). details as follows,
  • the BV with the size parameter W ⁇ H ⁇ 64 of the encoded block is buffered to cbvp_cands[0];
  • BVs whose coded blocks appear more than or equal to 2 times in the historical block vector prediction information are cached in cbvp_cands[1];
  • BVs of the adjacent blocks on the left, top, top left, top right, and bottom left of the encoded block are cached in cbvp_cands[2], cbvp_cands[3], cbvp_cands[4], cbvp_cands[5], cbvp_cands[6] respectively;
  • the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block can be determined according to the block vector candidate list.
  • ABVR Adaptive Block Vector Resolution
  • the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block may include:
  • Select the optimal SAD cost result from the first SAD cost result determine the block vector corresponding to the optimal SAD cost result as the first target block vector information of the first partition; and select the optimal SAD cost result from the second SAD cost result
  • the optimal SAD cost result is selected from the cost results, and the block vector corresponding to the optimal SAD cost result is determined as the second target block vector information of the second partition.
  • the optimal block vector can be selected for the first partition and the second partition of the current block by comparing the absolute error and (Sum of Absolute Difference, SAD) cost results. (ie, the first target block vector information and the second target block vector information).
  • the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block may include:
  • the block vector information with the best cost result is determined as the second target block vector information of the second partition.
  • the settings for the preset search range can include:
  • the preset search range is set to 32 ⁇ 32.
  • the preset ratio value may be set to 5%, but is not specifically limited.
  • the size range of the IBC search can be set according to whether the proportion of the same Hash value appearing more than twice is greater than 5%. If the judgment result is yes, it is set to 64 ⁇ 64; otherwise, it is set to 32 ⁇ 32.
  • the BV including the first block of vector information of the first partition and the second block of vector information of the second partition
  • Hash can be obtained.
  • the block vector candidate list if multiple block vector candidate lists are constructed, then the block vector candidate list corresponding to the optimal cost result can be determined as the block vector candidate list described in this embodiment of the present application by calculating the cost result, And the index number corresponding to the block vector candidate list is stored in bvp_idx.
  • the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block may include:
  • a preset search range is determined; in the block vector candidate list, according to the preset The search range respectively performs pixel-by-pixel block vector search on the first partition and the second partition in order to obtain the first block vector information and the second block vector information;
  • the obtained first block vector information and second block vector information are determined as the first target block vector information and the second target block vector information.
  • the search start point BV with SAD ⁇ 1000 is selected in the block vector candidate list (cbvp_cands), otherwise, the start point BV may be set to (0, 0). Record the optimal BVP (bvpasbv_idx), and then perform the BV full search process, as follows,
  • the flag bit skip_me can be set to 1, and then the cost result is calculated, and the currently obtained optimal BV (that is, the first target block vector) can be stored. information and the second target block vector information).
  • BV ie, first target block vector information and second target block vector information).
  • the method may further include:
  • first block vector index number is used to indicate an index number corresponding to the first target block vector information in the block vector candidate list
  • the first block vector index number and the second block vector index number can be determined, and the first block vector index number and the second block vector index number can be determined.
  • the index number is written into the code stream.
  • the first block vector index number and the second block vector index number are obtained by parsing the code stream on the decoder side, and the first target block vector information and the second target block vector information can be determined in combination with the constructed block vector candidate list. information.
  • S803 Determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information.
  • the determining the first predicted value of the first partition according to the first target block vector information may include: performing motion compensation on the first partition according to the first target block vector information, The predicted value of the first partition is obtained.
  • the determining the second predicted value of the second partition according to the second target block vector information may include: performing motion compensation on the second partition according to the second target block vector information , to obtain the predicted value of the second partition.
  • motion compensation can be performed on the first partition according to the first target block vector information, and the predicted value (or referred to as the motion compensation predicted value) of the first partition can be obtained;
  • motion compensation can be performed on the second partition according to the second target block vector information, and a predicted value (or referred to as a motion compensation predicted value) of the second partition can be obtained.
  • S804 Determine a first weight value of the first partition and a second weight value of the second partition.
  • the first weight value of the first partition and the second weight value of the second partition are mainly related to the index number (represented by AwpIdx) of the angle division mode.
  • the determining the first weight value of the first partition and the second weight value of the second partition may include:
  • the first calculation model is used to obtain the mapping angle value
  • mapping angle value using the second calculation model to obtain the slope classification index value
  • the third calculation model is used to obtain the partition value to which the angle belongs
  • a preset weight calculation model is used to obtain a first weight value of the first partition and a second weight value of the second partition.
  • both the first weight value and the second weight value may include luminance weight (represented by AwpWeightArrayY[x][y]) and chrominance weight (represented by AwpWeightArrayUV[x][y]).
  • stepIdx (AwpIdx>>3)-3 (9)
  • stepIdx may be -3, -2, -1, 0, 1, 2, 3; the value of modAngNum may be 0-7.
  • stepIdx (AwpIdx>>3)-3 ModAngNum 0 ⁇ 7 0 -3
  • stepIdx (AwpIdx>>3)-3 ModAngNum 0 ⁇ 7 0 -3
  • 0 to 7 8 ⁇ 15 1 -2 Corresponding to 0 to 7 16 ⁇ 23 2 -1
  • 0 to 7 32 ⁇ 39 4 1 Corresponding to 0 to 7
  • subAngleIdx can be 0, 1, 2, or 3.
  • stepIdx and modAngNum can be obtained from AwpIdx, and the value of modAngNum determines angleIdx and subAngleIdx.
  • a reference weight list is configured according to relevant parameters, and the reference weight list can be represented by ReferenceWeight[x].
  • the width of the current block is represented by M
  • the height is represented by N.
  • DeltaPos_W stepIdx*((ValidLength_W>>3)-1)
  • DeltaPos_H stepIdx*((ValidLength_H>>3)-1)
  • “>>” means right shift operator
  • “ ⁇ ” means left shift operator
  • Clip3 means clamp operator
  • Clip3(0,8,x-FirstPos) means (x-FirstPos) is clamped at 0 and Between 8, the value range of x is 0 to ValidLength_H-1.
  • ReferenceWeights[x] Clip3(0,8,x-10); wherein, for the current block of 8 ⁇ 8, the value range of x is 0 ⁇ 31.
  • the value range of x is 0 to M-1; the value range of y is 0 to N-1.
  • AwpWeightArrayY[x][y] ReferenceWeights[(2y)+(2x)].
  • the chrominance weight of the (x, y) pixel position in the current block is represented by AwpWeightArrayUV[x][y], and the calculation formula of AwpWeightArrayUV[x][y] is as follows,
  • the value range of x is 0 ⁇ M/2-1; the value range of y is 0 ⁇ N/2-1.
  • the first weight value of the first partition and the second partition can be determined The second weight value of .
  • the method may further include: writing the index number of the angle division mode into the code stream.
  • the index number of the angle division mode can be written into the code stream.
  • the index number of the angle division mode can be obtained by parsing the code stream on the decoder side, so as to determine the first weight value of the first partition and the second weight value of the second partition.
  • S805 Use the first predicted value, the first weight value, the second predicted value, and the second weight value to perform weighted fusion to determine the intra-frame predicted value of the current block.
  • the intra prediction value of the current block in the INBC mode can be determined.
  • This embodiment provides an intra-frame prediction method, which is applied to an encoder.
  • determining the prediction mode parameter of the current block when the prediction mode parameter indicates to use the INBC mode, determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
  • the first predicted value of the first partition is determined according to the first target block vector information
  • the second predicted value of the second partition is determined according to the second target block vector information
  • the first weight value and the second weight value of the second partition use the first predicted value, the first weight value, the second predicted value and the second weight value to perform weighted fusion to determine the Intra prediction value of the current block.
  • the embodiment of the present application proposes an INBC intra-frame prediction technology, which combines the IBC technology and the AWP technology.
  • the IBC technology can be used to predict repeated/cyclic local image features, and is applied to screen content coding;
  • the AWP technology is applied to process boundary information in inter-frame images.
  • INBC's research is to expect that INBC can better handle the edge information of two parts of different texture/color distributions in the same block, the edge of sharp objects in the intra image, the junction of foreground and background, and boundary information, etc., so that Intra-frame images, like inter-frame images, have a tool for processing edge information, thereby effectively improving the coding efficiency of video sequences.
  • the implementation process of the INBC mode is as follows:
  • the mode, motion information, and flag of the CU are identified in units of a 4 ⁇ 4 current block.
  • the prediction mode is encoded.
  • SP String Prediction
  • the intra prediction steps of the encoder are as follows:
  • 3 modes are selected by comparing SATD and enter the process of rate-distortion optimization.
  • the three modes perform motion compensation for the two partitions respectively according to the optimal BV combination determined in step (1), and determine the respective target block vector information of the two partitions.
  • the respective motion compensation prediction values of the two partitions are respectively determined.
  • the weighting weight is calculated according to different mode information.
  • the optimal INBC mode among the three modes is determined through the rate-distortion optimization process.
  • the optimal INBC mode competes with other modes such as normal intra mode.
  • the rate-distortion optimization process is as follows: following the historical BV candidate list of IBC, first, in the 56 division modes of AWP, determine the optimal BV for each of the two divisions. Candidate; then select the best three division modes among the 56 division modes, these three division modes perform motion compensation according to the BV of the two partitions determined in the previous step to obtain the predicted value, and then the predicted value of the two partitions A weighted fusion is performed to implement a rate-distortion optimization process, selecting the optimal INBC mode, which is then competed with other modes (such as normal intra mode).
  • flag bit (Flag) setting is also required: that is, flags are respectively set at the sequence (Sequence) level, the frame level, and the CU level to control the use of INBC.
  • sequence Sequence
  • CU level the limit range of the CU size to which the INBC mode is applied is: 4 ⁇ 4 to 16 ⁇ 16.
  • BV block vector
  • HBVP technology copies 8 motion information candidates from the previous coding block into the FIFO, and the FIFO keeps updating continuously in a first-in, first-out manner. If the motion information candidate in the FIFO is the same as the motion information just coded, the duplicate motion information candidate will be removed first, and the motion information of the current coding unit will be added at the end of the FIFO. If the motion information of the current coding unit is different from the motion information of any candidate in the FIFO, the first candidate in the FIFO will be removed, and the latest motion information will be added to the end of the FIFO to ensure that the 8 latest motions are always retained in the FIFO. Information candidates.
  • the motion information candidates in HBVP are identified together with the existing motion information candidates in AVS2, and are binarized using the Unary method.
  • AVS2 contains five motion information candidates, but in AVS3, the symmetric mode is removed, leaving only 4 motion information candidates, plus the 8 candidates of HBVP, a total of 12 candidates at most.
  • HBVP will store the BVs of the encoded IBC coded blocks in a historical BV information cache with a maximum storage capacity of 12, so that the block vector prediction information based on history can be obtained.
  • the BV with the size parameter W ⁇ H ⁇ 64 of the encoded block is buffered to cbvp_cands[0];
  • BV buffers with the number of occurrences of coded blocks ⁇ 2 times in the historical BV information buffer are stored in cbvp_cands[1];
  • BVs of the adjacent blocks on the left, top, top left, top right, and bottom left of the encoded block are cached in cbvp_cands[2], cbvp_cands[3], cbvp_cands[4], cbvp_cands[5], cbvp_cands[6] respectively;
  • step (1.2.2) If the search in step (1.2.1) obtains a legal and reasonable BV (ie, BV[0] ⁇ 0&&BV[1] ⁇ 0). Then the motion estimation ends, and step (1.3) is performed; otherwise, step (1.2.3) is performed.
  • step (2.1) Perform BV prediction, which is the same as step (1.1) above, and will not be repeated here.
  • the first target block vector information of the first partition and the second target block vector information of the second partition in the current block can be obtained.
  • motion compensation is performed according to the first target block vector information to determine the first prediction of the first partition value, and perform motion compensation according to the second target block vector information to determine the second predicted value of the second partition; according to the angle division mode index number (AwpIdx), the first weight value of the first partition and the second prediction value of the second partition can be determined.
  • the second weight value of the partition; finally, the first prediction value, the first weight value, the second prediction value and the second weight value are used for weighted fusion, so that the intra frame prediction value of the current block can be obtained.
  • This embodiment provides an intra-frame prediction method, which is applied to an encoder.
  • the specific implementation of the foregoing embodiments is described in detail through this embodiment, from which it can be seen that, based on the technical solution of this embodiment, using different angle weights to process boundary information in image blocks in intra-frame prediction can better
  • the edge information of two parts of different texture/color distributions in the same partition block, the sharp object edges in the intra-frame image, the junction between the foreground and the background, and the boundary information of the common sequence, etc. are processed, so that the intra-frame image has the same as the inter-frame image.
  • a tool for processing edge information thereby effectively improving the coding efficiency of video sequences.
  • the intra-frame prediction method provided by the embodiment of the present application is applied to a video decoding device, that is, a decoder.
  • the functions implemented by the method can be implemented by calling a computer program by the second processor in the decoder.
  • the computer program can be stored in the second memory.
  • the decoder includes at least a second processor and a second memory.
  • FIG. 9 shows a schematic flowchart of another intra prediction method provided by an embodiment of the present application.
  • the method may include:
  • each decoding block may also include a first image component, a second image component, and a third image component; and the current block is the current block in the video image that is to be predicted for the first image component, the second image component, or the third image component.
  • Decode block may also include a first image component, a second image component, and a third image component; and the current block is the current block in the video image that is to be predicted for the first image component, the second image component, or the third image component.
  • the parsing the code stream to obtain the prediction mode parameters of the current block may include:
  • INBC mode flag bit is the first value, then determine that the current block uses the INBC mode
  • INBC mode flag bit is the second value, it is determined that the current block uses the normal intra mode.
  • the first value may be 1, and the second value may be 0; or, the first value may be true, and the second value may be false.
  • the first value may be 0, and the second value may be 1; or, the first value may be false, and the second value may be true.
  • the encoder can write the INBC mode flag bit into the code stream.
  • the decoder can obtain the INBC mode flag bit of the current block by parsing the code stream, and then can determine whether the current block uses the INBC mode according to the INBC mode flag bit.
  • S903 Determine, based on the block vector candidate list, the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number The second target block vector information of the second partition of the corresponding current block in the block vector candidate list.
  • the prediction mode parameter indicates to use the INBC mode
  • the current block is divided based on the INBC mode, and at least two partitions can be obtained.
  • the at least two partitions may be the first partition and the second partition.
  • the method may further include:
  • a block vector candidate list is constructed, the block vector candidate list including at least one block vector.
  • the building block vector candidate list may include:
  • the block vector candidate list is determined based on the historical block vector prediction information.
  • the block vector candidate list may be determined based on historical block vector prediction information (History based Block Vector Prediction, HBVP).
  • the determining the block vector candidate list based on the historical block vector prediction information may include:
  • the size parameter of the decoded block is greater than or greater than a preset size parameter, storing the block vector of the decoded block in the zeroth bit of the block vector candidate list;
  • the block vector candidate list is obtained based on the block vectors stored in the zeroth bit, the first bit, the second bit, the third bit, the fourth bit, the fifth bit and the sixth bit in the block vector candidate list.
  • the encoder Since the encoder determines the vector information of the first target block and the vector information of the second target block, the encoder sets the index number of the first block vector corresponding to the vector information of the first target block and the vector index of the second target block corresponding to the vector information of the second target block.
  • the sequence number is written into the code stream and transmitted to the decoder. In this way, the decoder does not need to determine the vector information of the first target block and the vector information of the second target block in the same way as the encoder.
  • the decoder can obtain the index number of the first block vector and the second target block vector by parsing the code stream.
  • the block vector index number and then based on the constructed block vector candidate list, the first target block vector information and the second target block vector information can be obtained.
  • the first target block vector information represents the optimal block vector of the first partition of the current block
  • the second target block vector information represents the optimal block vector of the second partition of the current block.
  • S904 Determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information.
  • the determining the first predicted value of the first partition according to the first target block vector information may include: performing motion compensation on the first partition according to the first target block vector information, The predicted value of the first partition is obtained.
  • the determining the second predicted value of the second partition according to the second target block vector information may include: performing motion compensation on the second partition according to the second target block vector information , to obtain the predicted value of the second partition.
  • motion compensation can be performed on the first partition according to the first target block vector information, and the predicted value (or referred to as the motion compensation predicted value) of the first partition can be obtained;
  • motion compensation can be performed on the second partition according to the second target block vector information, and a predicted value (or referred to as a motion compensation predicted value) of the second partition can be obtained.
  • S905 Determine a first weight value of the first partition and a second weight value of the second partition.
  • the first weight value of the first partition and the second weight value of the second partition are mainly related to the index number (represented by AwpIdx) of the angle division mode.
  • the determining the first weight value of the first partition and the second weight value of the second partition may include:
  • the first calculation model is used to obtain the mapping angle value
  • mapping angle value using the second calculation model to obtain the slope classification index value
  • the third calculation model is used to obtain the partition value to which the angle belongs
  • a preset weight calculation model is used to obtain a first weight value of the first partition and a second weight value of the second partition.
  • both the first weight value and the second weight value may include luminance weight (represented by AwpWeightArrayY[x][y]) and chrominance weight (represented by AwpWeightArrayUV[x][y]).
  • the determination of the first weight value and the second weight value in the decoder is the same as the determination process of the first weight value and the second weight value in the encoder, which will not be described in detail here.
  • S906 Use the first predicted value, the first weight value, the second predicted value, and the second weight value to perform weighted fusion to determine the intra-frame predicted value of the current block.
  • the intra prediction value of the current block in the INBC mode can be determined.
  • the mode index i.e. the angle division mode index number
  • BV index i.e. the first block vector index number and the BV index
  • the second block vector index number determines the relevant coefficients for determining the weighting weight and the corresponding target block vector information of the two partitions (the first partition and the second partition), and then weights the motion compensation prediction values of the two partitions to obtain the final The intra-frame prediction value of .
  • the decoder's intra prediction steps are as follows:
  • the BV information of the two partitions (that is, the respective target block vector information of the two partitions, including the first target block vector information and the second target block vector information) can be determined.
  • the respective motion compensation prediction values of the two partitions are determined respectively.
  • This embodiment provides an intra-frame prediction method, which is applied to a decoder.
  • the prediction mode parameter of the current block is obtained; when the prediction mode parameter indicates to use the INBC mode, the code stream is parsed to obtain the first block vector index number and the second block vector index number; based on the block vector candidate list, determining the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the block vector candidate list corresponding second target block vector information of the second partition of the current block; determining the first predicted value of the first partition according to the first target block vector information, and determining the first predicted value of the first partition according to the second target block vector information the second predicted value of the second partition; determine the first weight value of the first partition and the second weight value of the second partition; use the first predicted value, the first weight value, the first The second prediction value and the second weight value are weighted and fused to determine the intra-frame prediction value of the current block.
  • FIG. 10 shows a schematic structural diagram of an encoder 100 provided by an embodiment of the present application.
  • the encoder 100 may include: a first determination unit 1001, a first calculation unit 1002, and a first prediction unit 1003; wherein,
  • a first determining unit 1001 configured to determine a prediction mode parameter of the current block
  • the first determining unit 1001 is further configured to, when the prediction mode parameter indicates to use the INBC mode, determine the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
  • a first calculation unit 1002 configured to determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information and determining a first weight value for the first partition and a second weight value for the second partition;
  • the first prediction unit 1003 is configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra-frame prediction value of the current block .
  • the encoder 100 may further include a precoding unit 1004 configured to perform precoding on the current block based on multiple candidate prediction modes, and determine the precoding corresponding to the multiple candidate prediction modes result;
  • the first determining unit 1001 is further configured to determine a prediction mode parameter of the current block from the multiple candidate prediction modes according to the precoding result.
  • the first determining unit 1001 is specifically configured to obtain rate-distortion cost results corresponding to the multiple candidate prediction modes based on the precoding results; and select an optimal rate-distortion cost result from the rate-distortion cost results , and the candidate prediction mode corresponding to the optimal rate-distortion cost result is determined as the prediction mode parameter of the current block.
  • the encoder 100 may further include a setting unit 1005; wherein, the multiple candidate prediction modes include an INBC mode and a normal intra mode;
  • the setting unit 1005 is configured to set the INBC mode flag bit to a first value if the prediction mode parameter indicates to use the INBC mode; if the prediction mode parameter indicates to use the normal intra mode, then set the INBC mode flag bit to the first value Set to the second value.
  • the first value is 1 and the second value is 0; or, the first value is true and the second value is flase.
  • the encoder 100 may further include a writing unit 1006 configured to write the INBC mode flag bit into the code stream.
  • the first determining unit 1001 is further configured to determine three target candidate angle division modes from among multiple candidate angle division modes; and use the three target candidate angle division modes to frame the current block. intra-prediction, determining prediction cost results corresponding to the three target candidate angle division modes; and determining an INBC mode used by the current block from the three target candidate angle division modes based on the prediction cost results.
  • the first determining unit 1001 is specifically configured to obtain rate-distortion cost results corresponding to the three target candidate angle division modes based on the prediction cost results; and select an optimal rate-distortion cost result from the rate-distortion cost results For the cost result, the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
  • the precoding unit 1004 is further configured to perform precoding on the current block based on the multiple candidate angle division modes, and determine precoding results corresponding to the multiple candidate angle division modes;
  • the first determining unit 1001 is further configured to determine the three target candidate angle division modes from the multiple candidate angle division modes based on the precoding result.
  • the first determining unit 1001 is specifically configured to obtain SATD cost results corresponding to the multiple candidate angle division modes based on the precoding results; and select three relatively better SATDs from the SATD cost results For the cost result, the candidate angle division modes corresponding to the three SATD cost results are determined as the three target candidate angle division modes.
  • the first determining unit 1001 is further configured to, based on multiple candidate angle division modes, determine the first partition and the second partition of the current block in each candidate angle division mode; and determine each candidate angle The first target block vector information of the first partition and the second target block vector information of the second partition in the division mode;
  • the precoding unit 1004 is specifically configured to perform precoding on the current block according to the first target block vector information of the first partition and the second target block vector information of the second partition in each candidate angle division mode, Precoding results corresponding to the multiple candidate angle division modes are obtained.
  • the encoder 100 may further include a first construction unit 1007 configured to construct a block vector candidate list, the block vector candidate list including at least one block vector.
  • the first construction unit 1007 is specifically configured to obtain historical block vector prediction information; and determine the block vector candidate list based on the historical block vector prediction information.
  • the first construction unit 1007 is specifically configured to store the block vector of the encoded block in the zeroth position of the block vector candidate list if the size parameter of the encoded block is greater than or greater than the preset size parameter; and if the number of occurrences of the encoded block in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the encoded block in the first position of the block vector candidate list; and The block vectors of the coded adjacent blocks on the left side, the coded adjacent blocks on the upper side, the coded adjacent blocks on the upper left, the coded adjacent blocks on the upper right, and the coded adjacent blocks on the lower left of the current block are respectively stored in the block.
  • the second, third, fourth, fifth and sixth bits of the vector candidate list; and the zeroth, first, second, third, The block vector stored in the fourth bit, the fifth bit and the sixth bit obtains the block vector candidate list.
  • the first determining unit 1001 is specifically configured to, based on the INBC mode, determine the first partition and the second partition after the current block is divided; The first partition and the second partition perform an intra-block copy search, and select from the block vector candidate list the first block vector information that matches the hash key value of the first partition and the first block vector information that matches the hash key value of the first partition.
  • the second block vector information matching the hash key value of the second partition; and traversing at least one block vector in the block vector candidate list, and calculating the first cost of the first partition corresponding to the at least one block vector result and a second cost result corresponding to the second partition with respect to the at least one block vector; and selecting an optimal cost result from the first cost result, and determining the block vector corresponding to the optimal cost result as the The first and second blocks of vector information of the first partition; and the optimal cost result is selected from the second cost result, and the block vector corresponding to the optimal cost result is determined as the second and second blocks of the second partition vector information; and from the first block of vector information and the first two blocks of vector information, determining the block vector information with the best cost result as the first target block vector information of the first partition; and from Among the second block vector information and the second two-block vector information, the block vector information with the best cost result is determined as the second target block vector information of the second partition.
  • the first determining unit 1001 is further configured to determine a preset search range if at least one of the first target block vector information and the second target block vector information belongs to illegal block vector information In the block vector candidate list, according to the preset search range, the first sub-region and the second sub-region are respectively searched for pixel-by-pixel block vectors in order to obtain the first block vector information and the second block vector information ; and determining the obtained first block vector information and second block vector information as the first target block vector information and the second target block vector information.
  • the first determining unit 1001 is further configured to determine a first block vector index number, where the first block vector index number is used to indicate the corresponding first target block vector information in the block vector candidate list an index number; and determining a second block vector index number, where the second block vector index number is used to indicate an index number corresponding to the second target block vector information in the block vector candidate list;
  • the writing unit 1006 is further configured to write the first block vector index number and the second block vector index number into the code stream.
  • the first calculation unit 1002 is specifically configured to perform motion compensation on the first partition according to the first target block vector information to obtain the predicted value of the first partition.
  • the first calculation unit 1002 is specifically configured to perform motion compensation on the second partition according to the second target block vector information, to obtain the predicted value of the second partition.
  • the first determining unit 1001 is further configured to determine the index number of the angle division mode based on the INBC mode;
  • the first calculation unit 1002 is further configured to divide the mode index number according to the angle, and use the first calculation model to obtain a mapping angle value; and according to the mapping angle value, use the second calculation model to obtain the slope classification index value; and according to For the mapping angle value, a third calculation model is used to obtain the value of the partition to which the angle belongs; and based on the slope classification index value and the value of the partition to which the angle belongs, a preset weight calculation model is used to obtain the first weight of the first partition value and a second weight value for the second partition.
  • the writing unit 1006 is further configured to write the index number of the angle division mode into the code stream.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, and it may also be non-modular.
  • each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
  • the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or The part that contributes to the prior art or the whole 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 for making a computer device (which can be It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: 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.
  • an embodiment of the present application provides a computer storage medium, which is applied to the encoder 100.
  • the computer storage medium stores an intra-frame prediction program, and when the intra-frame prediction program is executed by the first processor, any of the foregoing embodiments is implemented. one of the methods described.
  • FIG. 11 shows a schematic diagram of a specific hardware structure of the encoder 100 provided by the embodiment of the present application.
  • it may include: a first communication interface 1101 , a first memory 1102 and a first processor 1103 ; each component is coupled together through a first bus system 1104 .
  • the first bus system 1104 is used to realize the connection and communication between these components.
  • the first bus system 1104 also includes a power bus, a control bus and a status signal bus.
  • the various buses are labeled as the first bus system 1104 in FIG. 11 . in,
  • the first communication interface 1101 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
  • a first memory 1102 for storing computer programs that can run on the first processor 1103;
  • the first processor 1103 is configured to, when running the computer program, execute:
  • the prediction mode parameter indicates to use the INBC mode, determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
  • Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
  • the first memory 1102 in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
  • the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
  • RAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDRSDRAM
  • enhanced SDRAM ESDRAM
  • synchronous link dynamic random access memory Synchlink DRAM, SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the first processor 1103 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the first processor 1103 or an instruction in the form of software.
  • the above-mentioned first processor 1103 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the first memory 1102, and the first processor 1103 reads the information in the first memory 1102, and completes the steps of the above method in combination with its hardware.
  • the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic Devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), General Purpose Processors, Controllers, Microcontrollers, Microprocessors, Others for performing the functions described herein electronic unit or a combination thereof.
  • the techniques described herein may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described herein.
  • Software codes may be stored in memory and executed by a processor.
  • the memory can be implemented in the processor or external to the processor.
  • the first processor 1103 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
  • This embodiment provides an encoder, and the encoder may include a first determination unit, a first calculation unit, and a first prediction unit.
  • the encoder may include a first determination unit, a first calculation unit, and a first prediction unit.
  • different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The boundary between the foreground and the background and the boundary information of the common sequence, etc., make the intra-frame image and the inter-frame image have a tool for processing edge information, thereby effectively improving the coding efficiency of the video sequence.
  • FIG. 12 shows a schematic structural diagram of a decoder 120 provided by an embodiment of the present application.
  • the decoder 120 may include: a parsing unit 1201, a second determining unit 1202, a second calculating unit 1203, and a second predicting unit 1204; wherein,
  • the parsing unit 1201 is configured to parse the code stream and obtain the prediction mode parameter of the current block; and is also configured to parse the code stream when the prediction mode parameter indicates to use the INBC mode, and obtain the first block vector index number and the second block vector index number;
  • the second determining unit 1202 is configured to determine, based on the block vector candidate list, the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the The second target block vector information of the second partition of the current block corresponding to the second block vector index number in the block vector candidate list;
  • the second calculation unit 1203 is configured to determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information and determining a first weight value for the first partition and a second weight value for the second partition;
  • the second prediction unit 1204 is configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra frame prediction value of the current block .
  • the parsing unit 1201 is further configured to parse the code stream and obtain the INBC mode flag bit;
  • the second determining unit 1202 is further configured to, if the INBC mode flag is a first value, determine that the current block uses the INBC mode; if the INBC mode flag is a second value, determine that the current block uses the INBC mode Normal intra mode.
  • the first value is 1 and the second value is 0; or, the first value is true and the second value is flase.
  • the decoder 120 may further include a second construction unit 1205 configured to construct a block vector candidate list, the block vector candidate list including at least one block vector.
  • the second construction unit 1205 is specifically configured to obtain historical block vector prediction information; and determine the block vector candidate list based on the historical block vector prediction information.
  • the second construction unit 1205 is specifically configured to store the block vector of the decoded block in the zeroth position of the block vector candidate list if the size parameter of the decoded block is greater than or greater than the preset size parameter; and if the number of occurrences of the decoded block in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the decoded block in the first bit of the block vector candidate list; and The block vectors of the decoded adjacent blocks on the left side of the current block, the decoded adjacent blocks on the upper side, the decoded adjacent blocks on the upper left, the decoded adjacent blocks on the upper right, and the decoded adjacent blocks on the lower left are respectively stored in the block.
  • the second, third, fourth, fifth and sixth bits of the vector candidate list; and the zeroth, first, second, third, The block vector stored in the fourth bit, the fifth bit and the sixth bit obtains the block vector candidate list.
  • the second calculation unit 1203 is specifically configured to perform motion compensation on the first partition according to the first target block vector information to obtain the predicted value of the first partition.
  • the second calculation unit 1203 is specifically configured to perform motion compensation on the second partition according to the second target block vector information to obtain the predicted value of the second partition.
  • the parsing unit 1201 is further configured to parse the code stream and obtain the index number of the angle division mode
  • the second calculation unit 1203 is further configured to divide the mode index number according to the angle, obtain the mapping angle value by using the first calculation model; and obtain the slope classification index value by using the second calculation model according to the mapping angle value; For the mapping angle value, a third calculation model is used to obtain the value of the partition to which the angle belongs; and based on the slope classification index value and the value of the partition to which the angle belongs, a preset weight calculation model is used to obtain the first weight of the first partition value and a second weight value for the second partition.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, and it may also be non-modular.
  • each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
  • the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the present embodiment provides a computer storage medium, which is applied to the decoder 120 , where the computer storage medium stores an intra-frame prediction program, and the intra-frame prediction program implements the foregoing embodiments when executed by the second processor The method of any of the above.
  • FIG. 13 shows a schematic diagram of a specific hardware structure of the decoder 120 provided by the embodiment of the present application.
  • it may include: a second communication interface 1301 , a second memory 1302 and a second processor 1303 ; each component is coupled together through a second bus system 1304 .
  • the second bus system 1304 is used to implement connection communication between these components.
  • the second bus system 1304 also includes a power bus, a control bus, and a status signal bus.
  • the various buses are designated as the second bus system 1304 in FIG. 13 . in,
  • the second communication interface 1301 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
  • a second memory 1302 for storing computer programs that can run on the second processor 1303;
  • the second processor 1303 is configured to, when running the computer program, execute:
  • the prediction mode parameter indicates that the INBC mode is used
  • the code stream is parsed, and the first block vector index number and the second block vector index number are obtained
  • the block vector candidate list Based on the block vector candidate list, determine the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the block vector candidate list. the second target block vector information of the second partition of the corresponding current block in the block vector candidate list;
  • Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
  • the second processor 1303 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
  • the hardware function of the second memory 1302 is similar to that of the first memory 1102, and the hardware function of the second processor 1303 is similar to that of the first processor 1103; details are not described here.
  • This embodiment provides a decoder, and the decoder may include a parsing unit, a second determination unit, a second calculation unit, and a second prediction unit.
  • the decoder may include a parsing unit, a second determination unit, a second calculation unit, and a second prediction unit.
  • different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The junction of foreground and background and the boundary information of common sequences, etc., make intra-frame images have a tool for processing edge information like inter-frame images, thereby effectively improving the decoding efficiency of video sequences.
  • the first target block vector information of the first partition of the current block and the second partition of the current block are determined.
  • the second target block vector information determine the first predicted value of the first partition according to the first target block vector information, and determine the second predicted value of the second partition according to the second target block vector information ; determine the first weight value of the first partition and the second weight value of the second partition; reuse the first predicted value, the first weight value, the second predicted value and the first predicted value
  • the two weight values are weighted and fused to determine the intra-frame prediction value of the current block.

Abstract

Disclosed are an intra-frame prediction method, an encoder, a decoder and a computer storage medium. The method comprises: determining a prediction mode parameter of a current block; when the prediction mode parameter indicates that an irrectangular block copy (INBC) mode is used, determining first target block vector information of a first partition of the current block and second target block vector information of a second partition of the current block; determining a first prediction value of the first partition according to the first target block vector information, and determining a second prediction value of the second partition according to the second target block vector information; determining a first weight value of the first partition and a second weight value of the second partition; and performing weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value, and determining an intra-frame prediction value of the current block. In this way, when an INBC mode is used to determine an intra-frame prediction value of a current block, the encoding and decoding efficiency of a video sequence can be improved.

Description

帧内预测方法、编码器、解码器以及计算机存储介质Intra prediction method, encoder, decoder, and computer storage medium 技术领域technical field
本申请实施例涉及编解码技术领域,尤其涉及一种帧内预测方法、编码器、解码器以及计算机存储介质。The embodiments of the present application relate to the technical field of encoding and decoding, and in particular, to an intra-frame prediction method, an encoder, a decoder, and a computer storage medium.
背景技术Background technique
随着科学技术的快速发展,人们对视频观看和处理的要求越来越高,尤其是人们对屏幕内容视频(Screen Content Video,SCV)的需求日益增多。其中,针对屏幕内容所具有的高对比度、有限色彩数据和较多重复区域等特点,目前已经提出了扩展的编码标准-屏幕内容编码(Screen Content Coding,SCC)。With the rapid development of science and technology, people have higher and higher requirements for video viewing and processing, especially the increasing demand for screen content video (SCV). Among them, in view of the characteristics of high contrast, limited color data and many repeated areas of screen content, an extended coding standard-Screen Content Coding (SCC) has been proposed.
在相关技术中,帧内块复制(Intra Block Copy,IBC)技术能够用于预测重复/循环出现的局部图像特征,应用于屏幕内容编码,但是其是对参考块整块进行拷贝,并没有考虑到一些局部图像特征的边界信息,限制了IBC技术的编码效率以及其在普通序列中的应用;而对于角度加权预测(Angular Weighted Prediction,AWP)技术,其应用于帧间图像中处理边界信息,但是并没有应用于帧内块的处理,从而无法使得帧内图像与帧间图像一样拥有用于处理边缘信息的工具,降低了视频序列的编解码效率。In the related art, the Intra Block Copy (IBC) technology can be used to predict repeated/cyclic local image features and be applied to screen content coding, but it copies the entire reference block without considering The boundary information of some local image features limits the coding efficiency of IBC technology and its application in ordinary sequences; while for Angular Weighted Prediction (AWP) technology, it is applied to process boundary information in inter-frame images, However, it is not applied to the processing of intra-frame blocks, so that intra-frame images cannot have the same tools for processing edge information as inter-frame images, which reduces the encoding and decoding efficiency of video sequences.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种帧内预测方法、编码器、解码器以及计算机存储介质,可以提升视频序列的编解码效率。Embodiments of the present application provide an intra-frame prediction method, an encoder, a decoder, and a computer storage medium, which can improve the encoding and decoding efficiency of video sequences.
本申请实施例的技术方案可以如下实现:The technical solutions of the embodiments of the present application can be implemented as follows:
第一方面,本申请实施例提供了一种帧内预测方法,应用于编码器,该方法包括:In a first aspect, an embodiment of the present application provides an intra-frame prediction method, which is applied to an encoder, and the method includes:
确定当前块的预测模式参数;determine the prediction mode parameter of the current block;
当所述预测模式参数指示使用非矩形块复制INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;When the prediction mode parameter indicates that the non-rectangular block copy INBC mode is used, determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;determining a first predictor of the first partition according to the first target block vector information, and determining a second predictor of the second partition according to the second target block vector information;
确定所述第一分区的第一权重值和所述第二分区的第二权重值;determining a first weight value of the first partition and a second weight value of the second partition;
利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
第二方面,本申请实施例提供了一种帧内预测方法,应用于解码器,该方法包括:In a second aspect, an embodiment of the present application provides an intra-frame prediction method, which is applied to a decoder, and the method includes:
解析码流,获取当前块的预测模式参数;Parse the code stream to obtain the prediction mode parameters of the current block;
当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;When the prediction mode parameter indicates that the INBC mode is used, the code stream is parsed, and the first block vector index number and the second block vector index number are obtained;
基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息;Based on the block vector candidate list, determine the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the block vector candidate list. the second target block vector information of the second partition of the corresponding current block in the block vector candidate list;
根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;determining a first predictor of the first partition according to the first target block vector information, and determining a second predictor of the second partition according to the second target block vector information;
确定所述第一分区的第一权重值和所述第二分区的第二权重值;determining a first weight value of the first partition and a second weight value of the second partition;
利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
第三方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元、第一计算单元和第一预测单元;其中,In a third aspect, an embodiment of the present application provides an encoder, the encoder includes a first determination unit, a first calculation unit, and a first prediction unit; wherein,
所述第一确定单元,配置为确定当前块的预测模式参数;the first determining unit, configured to determine the prediction mode parameter of the current block;
所述第一确定单元,还配置为当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;The first determining unit is further configured to, when the prediction mode parameter indicates to use the INBC mode, determine the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block ;
所述第一计算单元,配置为根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;以及确定所述第一分区的第一权重值和所述第二分区的第二权重值;The first calculation unit is configured to determine a first prediction value of the first partition according to the first target block vector information, and determine a second prediction value of the second partition according to the second target block vector information value; and determining a first weight value for the first partition and a second weight value for the second partition;
所述第一预测单元,配置为利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。The first prediction unit is configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra prediction of the current block value.
第四方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,In a fourth aspect, an embodiment of the present application provides an encoder, where the encoder includes a first memory and a first processor; wherein,
第一存储器,用于存储能够在第一处理器上运行的计算机程序;a first memory for storing a computer program executable on the first processor;
第一处理器,用于在运行所述计算机程序时,执行如第一方面所述的方法。The first processor is configured to execute the method according to the first aspect when running the computer program.
第五方面,本申请实施例提供了一种解码器,该解码器包括解析单元、第二确定单元、第二计算单元和第二预测单元;其中,In a fifth aspect, an embodiment of the present application provides a decoder, the decoder includes a parsing unit, a second determining unit, a second calculating unit, and a second predicting unit; wherein,
所述解析单元,配置为解析码流,获取当前块的预测模式参数;以及还配置为当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;The parsing unit is configured to parse the code stream and obtain the prediction mode parameter of the current block; and is also configured to parse the code stream when the prediction mode parameter indicates to use the INBC mode, and obtain the first block vector index number and the second block vector index number;
所述第二确定单元,配置为基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息;The second determining unit is configured to determine, based on the block vector candidate list, the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the the second target block vector information of the second partition of the current block corresponding to the second block vector index number in the block vector candidate list;
所述第二计算单元,配置为根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;以及确定所述第一分区的第一权重值和所述第二分区的第二权重值;The second calculation unit is configured to determine a first prediction value of the first partition according to the first target block vector information, and determine a second prediction value of the second partition according to the second target block vector information value; and determining a first weight value for the first partition and a second weight value for the second partition;
所述第二预测单元,配置为利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。The second prediction unit is configured to perform weighted fusion using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra prediction of the current block value.
第六方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,In a sixth aspect, an embodiment of the present application provides a decoder, the decoder includes a second memory and a second processor; wherein,
第二存储器,用于存储能够在第二处理器上运行的计算机程序;a second memory for storing a computer program executable on the second processor;
第二处理器,用于在运行所述计算机程序时,执行如第二方面所述的方法。The second processor is configured to execute the method according to the second aspect when running the computer program.
第七方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如第一方面所述的方法、或者被第二处理器执行时实现如第二方面所述的方法。In a seventh aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in the first aspect is implemented, or the computer program is executed by the second processor. The processor implements the method as described in the second aspect when executed.
本申请实施例提供了一种帧内预测方法、编码器、解码器以及计算机存储介质,在编码器侧,通过确定当前块的预测模式参数;当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;确定所述第一分区的第一权重值和所述第二分区的第二权重值;利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。在解码器侧,通过解析码流,获取当前块的预测模式参数;当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息;根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;确定所述第一分区的第一权重值和所述第二分区的第二权重值;利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。这样,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及普通序列的边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编解码效率。The embodiments of the present application provide an intra-frame prediction method, an encoder, a decoder, and a computer storage medium. On the encoder side, a prediction mode parameter of a current block is determined; when the prediction mode parameter indicates to use the INBC mode, determine first target block vector information of the first partition of the current block and second target block vector information of the second partition of the current block; determining a first predicted value of the first partition according to the first target block vector information, and Determine the second prediction value of the second partition according to the second target block vector information; determine the first weight value of the first partition and the second weight value of the second partition; use the first prediction value, the first weight value, the second prediction value and the second weight value are weighted and fused to determine the intra-frame prediction value of the current block. On the decoder side, the prediction mode parameter of the current block is obtained by parsing the code stream; when the prediction mode parameter indicates to use the INBC mode, the code stream is parsed to obtain the vector index number of the first block and the vector index number of the second block; based on A block vector candidate list, determining the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the second target block vector information of the second partition of the corresponding current block in the block vector candidate list; determining the first predicted value of the first partition according to the first target block vector information, and determining the first predicted value of the first partition according to the second target block The vector information determines the second prediction value of the second partition; determines the first weight value of the first partition and the second weight value of the second partition; uses the first prediction value, the first weight The value, the second predicted value and the second weight value are weighted and fused to determine the intra-frame predicted value of the current block. In this way, different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The junction of the foreground and background and the boundary information of ordinary sequences, etc., make intra-frame images and inter-frame images have a tool for processing edge information, thereby effectively improving the encoding and decoding efficiency of video sequences.
附图说明Description of drawings
图1为相关技术提供的一种角度加权预测模式可支持的八种角度示意图;1 is a schematic diagram of eight angles that can be supported by an angle-weighted prediction mode provided by the related art;
图2为相关技术提供的一种角度加权预测模式可支持的参考权重配置示意图;2 is a schematic diagram of a reference weight configuration supported by an angle-weighted prediction mode provided by the related art;
图3A为相关技术提供的一种角度加权预测模式中角度编号及对应分区示意图;3A is a schematic diagram of angle numbers and corresponding partitions in an angle-weighted prediction mode provided by the related art;
图3B为相关技术提供的一种角度加权预测模式中角度编号及对应斜率示意图;3B is a schematic diagram of angle numbers and corresponding slopes in an angle-weighted prediction mode provided by the related art;
图4为相关技术提供的一种当前块与相邻块的位置关系示意图;4 is a schematic diagram of a positional relationship between a current block and an adjacent block provided by the related art;
图5为相关技术提供的一种应用IBC技术的结构示意图;5 is a schematic structural diagram of an applied IBC technology provided by the related art;
图6为相关技术提供的一种普通序列中具有边界信息的局部特征示意图;6 is a schematic diagram of a local feature with boundary information in a common sequence provided by the related art;
图7A为本申请实施例提供的一种视频编码系统的组成框图;7A is a block diagram of the composition of a video coding system provided by an embodiment of the application;
图7B为本申请实施例提供的一种视频解码系统的组成框图;7B is a block diagram of the composition of a video decoding system provided by an embodiment of the application;
图8为本申请实施例提供的一种帧内预测方法的流程示意图;FIG. 8 is a schematic flowchart of an intra-frame prediction method provided by an embodiment of the present application;
图9为本申请实施例提供的另一种帧内预测方法的流程示意图;9 is a schematic flowchart of another intra prediction method provided by an embodiment of the present application;
图10为本申请实施例提供的一种编码器的组成结构示意图;10 is a schematic diagram of the composition and structure of an encoder provided by an embodiment of the application;
图11为本申请实施例提供的一种编码器的具体硬件结构示意图;11 is a schematic diagram of a specific hardware structure of an encoder provided by an embodiment of the application;
图12为本申请实施例提供的一种解码器的组成结构示意图;12 is a schematic diagram of the composition and structure of a decoder provided by an embodiment of the present application;
图13为本申请实施例提供的一种解码器的具体硬件结构示意图。FIG. 13 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application.
具体实施方式Detailed ways
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。In order to have a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
在视频图像中,一般采用第一图像分量、第二图像分量和第三图像分量来表征编码块(Coding Block,CB);其中,这三个图像分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量。具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。In a video image, a first image component, a second image component, and a third image component are generally used to represent a coding block (Coding Block, CB); wherein, the three image components are a luminance component and a blue chrominance component respectively. and a red chrominance component. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be represented in the YCbCr format or in the YUV format. express.
在本申请实施例中,第一图像分量可以为亮度分量,第二图像分量可以为蓝色色度分量,第三图像分量可以为红色色度分量,但是这里不作具体限定。In this embodiment of the present application, the first image component may be a luminance component, the second image component may be a blue chrominance component, and the third image component may be a red chrominance component, but this is not specifically limited.
目前,随着人们对视频显示质量要求的提高,在对具有高分辨率、高帧率、高位深、高动态范围、宽色域和全向视角中的一个或多个特征的高质量视频进行编码时,与H.265/高效率视频编码(High Efficiency Video Coding,HEVC)标准相比,H.266/多功能视频编码(Versatile Video Coding,VVC)性能提高大约50%,联合视频专家组(Joint Video Experts Team,JVET)负责该标准化项目,各种帧内预测模式和帧间预测模式已被验证在对高质量视频进行编码时实现高压缩效率,因此在VVC中被采纳。At present, with the improvement of people's requirements for video display quality, high-quality video with one or more characteristics of high resolution, high frame rate, high bit depth, high dynamic range, wide color gamut and omnidirectional viewing angle is being processed. When encoding, compared with the H.265/High Efficiency Video Coding (HEVC) standard, the performance of H.266/Versatile Video Coding (VVC) is improved by about 50%. Joint Video Experts Team, JVET) is responsible for this standardization project, and various intra-frame prediction modes and inter-frame prediction modes have been verified to achieve high compression efficiency when encoding high-quality video, so they were adopted in VVC.
为了捕捉视频中呈现的更精细的边缘方向,视频编码标准中提出了角度加权预测(Angular Weighted Prediction,AWP)模式,通过借助帧内角度预测的思想:可以先设置当前块周边位置(包括整像素位置以及亚像素位置)的参考权重值,然后利用角度预测的方法得到每个像素位置对应的权重值,再通过得到的权重值来实现两个不同帧间预测值的加权。In order to capture the finer edge directions presented in the video, the Angular Weighted Prediction (AWP) mode is proposed in the video coding standard. By using the idea of intra-frame angle prediction: the surrounding position of the current block (including the whole pixel) can be set first. position and sub-pixel position), and then use the angle prediction method to obtain the weight value corresponding to each pixel position, and then realize the weighting of two different inter-frame prediction values through the obtained weight value.
其中,角度加权预测模式支持的最小块尺寸为8×8,最大块尺寸为64×64,这里总共可支持8种角度,这8种角度的权重预测斜率绝对值共五种,分别是{水平(Horizontal,HOR),垂直(Vertical,VER),1,2,1/2},由于每个角度可支持7种参考权重配置,因此对于每个块而言,角度加权预测模式的模式数量共有56种模式。参见图1,其示出了相关技术提供的一种角度加权预测模式可支持的八种角度示意图。在图1中,8条带箭头的斜线表示可支持的八种角度。Among them, the minimum block size supported by the angle-weighted prediction mode is 8×8, and the maximum block size is 64×64. A total of 8 angles can be supported here. There are five absolute values of the weighted prediction slopes of these 8 angles, which are {horizontal (Horizontal, HOR), Vertical (Vertical, VER), 1, 2, 1/2}, since each angle can support 7 kinds of reference weight configurations, so for each block, the number of modes of the angle-weighted prediction mode is total 56 modes. Referring to FIG. 1, it shows a schematic diagram of eight angles supported by an angle-weighted prediction mode provided by the related art. In Figure 1, the 8 diagonal lines with arrows represent the 8 supported angles.
参见图2,其示出了相关技术提供的一种角度加权预测模式可支持的参考权重配置示意图。在图2中,其提供了7种参考权重的预测位置。具体地,参考权重配置可以是根据参考权重索引值得到的参考权重值的分布函数,以参考权重有效长度的8等分点位置作为基准点进行非严格单调递增函数赋值,这里,参考权重有效长度可以由预测角度以及当前块尺寸计算得到。Referring to FIG. 2, it shows a schematic diagram of a reference weight configuration supported by an angle-weighted prediction mode provided by the related art. In Figure 2, it provides the predicted positions for 7 reference weights. Specifically, the reference weight configuration may be a distribution function of the reference weight value obtained according to the reference weight index value, and the non-strictly monotonically increasing function assignment is performed with the position of the 8-point dividing point of the effective length of the reference weight as the reference point. Here, the effective length of the reference weight is It can be calculated from the prediction angle and the current block size.
应理解,针对图1所示的8种角度,可以将其划分为4个分区,如图3A所示,其示出了相关技术提供的一种角度加权预测模式中角度编号及对应分区示意图。在图3A中,用左斜线填充的为角度分区0,其包括有角度0和角度1这两种角度;用网格斜线填充的为角度分区1,其包括有角度2和角度3这两种角度;用点填充的为角度分区2,其包括有角度4和角度5这两种角度;用右斜线填充的为角度分区3,其包括有角度6和角度7这两种角度。如图3B所示,其示出了相关技术提供的一种角度加权预测模式中角度编号及对应斜率示意图。在图3B中,角度0对应斜率为1,角度1对应斜率为1/2,角度2对应斜率为水平,角度3对应斜率为-1/2,角度4对应斜率为-1,角度5对应斜率为-2,角度6对应斜率为垂直,角度7对应斜率为2。It should be understood that the eight angles shown in FIG. 1 can be divided into 4 partitions, as shown in FIG. 3A , which shows a schematic diagram of angle numbers and corresponding partitions in an angle weighted prediction mode provided by the related art. In FIG. 3A , the angle partition 0 is filled with left oblique lines, which includes two angles, angle 0 and angle 1; the angle partition 1 is filled with grid oblique lines, which includes angle 2 and angle 3. Two kinds of angles; the one filled with dots is angle partition 2, which includes two angles of angle 4 and angle 5; the one filled with right slash is angle partition 3, which includes two angles of angle 6 and angle 7. As shown in FIG. 3B , it shows a schematic diagram of angle numbers and corresponding slopes in an angle-weighted prediction mode provided by the related art. In FIG. 3B, angle 0 corresponds to a slope of 1, angle 1 corresponds to a slope of 1/2, angle 2 corresponds to a slope of horizontal, angle 3 corresponds to a slope of -1/2, angle 4 corresponds to a slope of -1, and angle 5 corresponds to a slope of is -2, angle 6 corresponds to a slope of vertical, and angle 7 corresponds to a slope of 2.
需要说明的是,根据角度所在分区区域的不同,这时候逐像素权重导出的公式稍有差异。假定当前块的块尺寸为M×N,其中M为宽度,N为高度,X为log2(权重预测角度斜率绝对值),Y为权重预测位置。It should be noted that the formula derived from the pixel-by-pixel weight is slightly different at this time according to the different partition areas where the angle is located. It is assumed that the block size of the current block is M×N, where M is the width, N is the height, X is log2 (the absolute value of the slope of the weight prediction angle), and Y is the weight prediction position.
下面以位于角度分区0中的角度0以及角度1为例进行描述,权重值的推导过程如下:The following description takes the angle 0 and the angle 1 located in the angle partition 0 as examples. The derivation process of the weight value is as follows:
(a)对于亮度分量的权重值而言,(a) For the weight value of the luminance component,
首先,计算参考权重有效长度,可以用ValidLength表示,如下所示,First, calculate the effective length of the reference weight, which can be represented by ValidLength, as shown below,
ValidLength=(N+(M>>X))<<1          (1)ValidLength=(N+(M>>X))<<1      (1)
其次,设置参考权重值,用ReferenceWeights[x]表示,其中x的取值范围是0~(ValidLength-1)。这里,Secondly, set the reference weight value, which is represented by ReferenceWeights[x], where the value range of x is 0~(ValidLength-1). here,
FirstPos=(ValidLength>>1)-6+Y×((ValidLength-1)>>3)         (2)FirstPos=(ValidLength>>1)-6+Y×((ValidLength-1)>>3)      (2)
ReferenceWeights[x]=Clip3(0,8,x-FirstPos)           (3)ReferenceWeights[x]=Clip3(0,8,x-FirstPos) (3)
再次,逐像素导出的亮度权重用SampleWeight[x][y]表示,具体如下,Again, the luminance weight derived pixel by pixel is represented by SampleWeight[x][y], as follows,
SampleWeight[x][y]=ReferenceWeights[(y<<1)+((x<<1)>>X)]        (4)SampleWeight[x][y]=ReferenceWeights[(y<<1)+((x<<1)>>X)]     (4)
(b)对于色度分量的权重值而言,(b) For the weight value of the chrominance component,
色度权重的导出可以直接取对应2×2亮度权重的左上角位置,假定当前块的块尺寸为M×N,其中M为宽度,N为高度,那么x的取值范围是0~(M/2-1);y的取值范围是0~(N/2-1)。逐像素导出的色度权重用SampleWeightChroma[x][y]表示,具体如下,The chrominance weight can be derived by directly taking the upper left corner position corresponding to the 2×2 luminance weight. Assume that the block size of the current block is M×N, where M is the width and N is the height, then the value range of x is 0~(M /2-1); the value range of y is 0~(N/2-1). The chroma weight derived pixel by pixel is represented by SampleWeightChroma[x][y], as follows,
SampleWedghtChroma[x][y]=SampleWedght[x>>1][y>>1]      (5)SampleWedghtChroma[x][y]=SampleWedght[x>>1][y>>1] (5)
这里,“>>”表示右移运算符,“<<”表示左移运算符,Clip3表示嵌位运算符,将x-FirstPos嵌位在0和8之间。Here, ">>" represents the right shift operator, "<<" represents the left shift operator, and Clip3 represents the clamp operator, which clamps x-FirstPos between 0 and 8.
还需要说明的是,角度加权预测模式的运动矢量存储方案与角度分区有关。这里,假定当前块的块尺寸为M×N,其中M为宽度,N为高度,X为log2(权重预测角度斜率绝对值),Y为权重预测位置。仍以位于角度分区0的角度0以及角度1为例,其运动矢量存储方案如下,It should also be noted that the motion vector storage scheme of the angle-weighted prediction mode is related to the angle partition. Here, it is assumed that the block size of the current block is M×N, where M is the width, N is the height, X is log2 (the absolute value of the weighted prediction angle slope), and Y is the weighted prediction position. Still taking angle 0 and angle 1 located in angle partition 0 as an example, the motion vector storage scheme is as follows:
首先,计算参考权重有效长度,用ValidLenth表示,如下所示,First, calculate the effective length of the reference weight, represented by ValidLenth, as shown below,
ValidLength=(N+(M>>X))<<1        (6)ValidLength=(N+(M>>X))<<1     (6)
其次,针对当前块中每个4×4块,标记其中心位置为(x,y),那么Secondly, for each 4×4 block in the current block, mark its center position as (x, y), then
FirstPos=(ValidLength>>1)-6+Y×((ValidLength-1)>>3)       (7)FirstPos=(ValidLength>>1)-6+Y×((ValidLength-1)>>3) (7)
再次,判断(y<<1)+((x<<1)>>X)是否大于或等于FirstPos。其中,若(y<<1)+((x<<1)>>X)大于或等于FirstPos,则存储第一运动信息;否则,则存储第二运动信息。这里,当前块使用角度预测加权模式将被划分为两个分区(如第一分区和第二分区),其中,第一运动信息是指第一分区对应的运动信息,第二运动信息是指第二分区对应的运动信息。Again, it is judged whether (y<<1)+((x<<1)>>X) is greater than or equal to FirstPos. Wherein, if (y<<1)+((x<<1)>>X) is greater than or equal to FirstPos, the first motion information is stored; otherwise, the second motion information is stored. Here, the current block is divided into two partitions (such as the first partition and the second partition) using the angle prediction weighting mode, where the first motion information refers to the motion information corresponding to the first partition, and the second motion information refers to the first partition. The motion information corresponding to the second partition.
另外,角度加权预测模式需要有两个单向运动矢量进行加权预测,单向运动矢量可以根据码流中的索引序号(index)在候选运动矢量列表中选择。参见图4,其示出了相关技术提供的一种当前块与相邻块的位置关系示意图。如图4所示,当前块用白色填充,相邻块用灰色填充。这里,对于当前块而言,可以具有多个相邻块,比如用A、B、C、D、F、G表示。In addition, the angle weighted prediction mode needs to have two unidirectional motion vectors for weighted prediction, and the unidirectional motion vector can be selected from the candidate motion vector list according to the index number (index) in the code stream. Referring to FIG. 4 , it shows a schematic diagram of the positional relationship between the current block and the adjacent blocks provided by the related art. As shown in Figure 4, the current block is filled with white, and the adjacent blocks are filled with gray. Here, for the current block, there may be multiple adjacent blocks, for example, represented by A, B, C, D, F, and G.
基于图4,构建候选运动矢量列表的过程如下,Based on Figure 4, the process of constructing the candidate motion vector list is as follows,
第一步,F、G、C、A和D是当前块的相邻块,需要确定F、G、C、A、D的“可用”性:In the first step, F, G, C, A, and D are adjacent blocks of the current block, and the "availability" of F, G, C, A, D needs to be determined:
i)如果F存在且采用帧间预测模式,则F“可用”;否则,F“不可用”。i) If F exists and inter prediction mode is employed, F is "available"; otherwise, F is "unavailable".
j)如果G存在且采用帧间预测模式,则G“可用”;否则,G“不可用”。j) If G exists and inter prediction mode is employed, G is "available"; otherwise, G is "unavailable".
k)如果C存在且采用帧间预测模式,则C“可用”;否则,C“不可用”。k) If C exists and the inter prediction mode is used, then C is "available"; otherwise, C is "unavailable".
l)如果A存在且采用帧间预测模式,则A“可用”;否则,A“不可用”。1) If A exists and the inter prediction mode is adopted, then A is "available"; otherwise, A is "unavailable".
n)如果D存在且采用帧间预测模式,则D“可用”;否则,D“不可用”。n) If D exists and inter prediction mode is employed, D is "available"; otherwise, D is "unavailable".
第二步,按F、G、C、A和D的顺序将这些相邻块的运动矢量经过查重后放入候选运动矢量列表。其中,查重方案为:G与F查重,C与G查重,A与F查重,D与G和A查重。如果经过查重后的放入候选运动矢量列表的运动矢量个数大于4,则只放入前四个。In the second step, the motion vectors of these adjacent blocks are put into the candidate motion vector list after duplicate checking in the order of F, G, C, A and D. Among them, the weight checking scheme is: G and F weight checking, C and G weight checking, A and F weight checking, D and G and A weight checking. If the number of motion vectors placed in the candidate motion vector list after duplicate checking is greater than 4, only the first four are placed.
第三步,将导出的时域双向的运动矢量放入候选运动矢量列表。The third step is to put the derived temporal bidirectional motion vector into the candidate motion vector list.
第四步,如果候选运动矢量列表中的运动矢量个数小于5,则对第一个运动矢量按照不同方向进行缩放,然后将缩放后的运动矢量填入候选运动矢量列表,直到候选运动矢量列表中的运动矢量个数为5。In the fourth step, if the number of motion vectors in the candidate motion vector list is less than 5, the first motion vector is scaled in different directions, and then the scaled motion vector is filled into the candidate motion vector list until the candidate motion vector list is reached. The number of motion vectors in is 5.
可以理解,根据屏幕内容特点,对于文字、图形等屏幕内容序列,同一帧中存在很多重复纹理,即具有较强的空间相关性。这时候如果在编码当前块时,能够参考当前帧内已编码完成的块,那么将可以大大提升编码效率。具体来讲,针对屏幕图像空间相关性强的特点,这种参考当前帧内已编码完成的块,并用于当前块预测值的技术,即可被称为帧内块复制(Intra Block Copy,IBC)技术。这里,IBC和帧间预测类似,只不过IBC的预测块是由当前图像帧内的重建块产生的。It can be understood that, according to the characteristics of screen content, for screen content sequences such as text and graphics, there are many repeated textures in the same frame, that is, there is a strong spatial correlation. At this time, if the encoded block in the current frame can be referred to when encoding the current block, the encoding efficiency can be greatly improved. Specifically, in view of the strong spatial correlation of screen images, this technique of referring to the coded block in the current frame and using it for the prediction value of the current block can be called Intra Block Copy (IBC). )technology. Here, IBC is similar to inter-frame prediction, except that the prediction block of IBC is generated by the reconstructed block in the current image frame.
参见图5,其示出了相关技术提供的一种应用IBC技术的结构示意图。如图5所示,针对当前图像帧,即一个编码树单元(Coding Tree Unit,CTU),该CTU中的用点填充区域为搜索区域(即当前图像帧的已编码区域),黑色阴影块分别为当前的编码块(Coding Unit,CU)和与之匹配的预测块(Block Predictor,也可称为参考块),从当前的编码块指向与之匹配的参考块之间的距离,称之为块矢量(Block  Vector,BV)。由于右下方的当前块与左上方已编码的参考块十分相似,若此时在编码器侧通过搜索方式找到左上方的参考块位置,则在码流中仅需要传输两个块之间的位置矢量(BV),后续在解码器通过这一信息就可以获得准确的预测值。与普通帧内预测模式相比,IBC技术可以更好的利用帧内冗余信息,获得编码性能提升。Referring to FIG. 5, it shows a schematic structural diagram of applying the IBC technology provided by the related art. As shown in Figure 5, for the current image frame, that is, a coding tree unit (Coding Tree Unit, CTU), the area filled with dots in the CTU is the search area (that is, the coded area of the current image frame), and the black shaded blocks are respectively The distance between the current coding block (Coding Unit, CU) and the matching prediction block (Block Predictor, also known as the reference block), from the current coding block to the matching reference block, is called Block Vector (BV). Since the current block in the lower right is very similar to the reference block already encoded in the upper left, if the position of the reference block in the upper left is found by searching on the encoder side, only the position between the two blocks needs to be transmitted in the code stream Vector (BV), which is then used by the decoder to obtain accurate predictions. Compared with the common intra-frame prediction mode, the IBC technology can make better use of the redundant information in the frame and improve the coding performance.
然而,相关技术中,IBC技术能够用于预测重复/循环出现的局部图像特征,应用于屏幕内容编码,但是其是对参考块整块进行拷贝,并没有考虑到一些局部图像特征的边界信息,如图6中的矩形框所示。另外,目前IBC技术仅仅用于屏幕内容编码(Screen Content Coding,SCC)中,这限制了IBC技术的编码效率以及其在普通序列中的应用。但是对于AWP技术,其应用于帧间图像中可以处理边界信息,但是并没有应用于帧内块的处理,导致无法使得帧内图像与帧间图像一样拥有用于处理边缘信息的工具,降低了视频序列的编解码效率。However, in the related art, the IBC technology can be used to predict repetitive/cyclic local image features and be applied to screen content coding, but it copies the entire reference block without considering the boundary information of some local image features. As shown in the rectangular box in Figure 6. In addition, currently the IBC technology is only used in screen content coding (Screen Content Coding, SCC), which limits the coding efficiency of the IBC technology and its application in common sequences. However, for AWP technology, it can process boundary information when applied to inter-frame images, but it is not applied to the processing of intra-frame blocks, which makes it impossible to make intra-frame images and inter-frame images have the same tools for processing edge information. Codec efficiency of video sequences.
基于此,本申请实施例提供了一种帧内预测方法,该方法的基本思想是:确定当前块的预测模式参数;当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;确定所述第一分区的第一权重值和所述第二分区的第二权重值;利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。这样,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及普通序列的边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编解码效率。Based on this, an embodiment of the present application provides an intra-frame prediction method. The basic idea of the method is to: determine the prediction mode parameter of the current block; when the prediction mode parameter indicates to use the INBC mode, determine the first partition of the current block The first target block vector information of the current block and the second target block vector information of the second partition of the current block; determine the first predicted value of the first partition according to the first target block vector information, and according to the second target The block vector information determines the second predicted value of the second partition; determines the first weight value of the first partition and the second weight value of the second partition; uses the first predicted value, the first The weight value, the second prediction value and the second weight value are weighted and fused to determine the intra-frame prediction value of the current block. In this way, different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The junction of the foreground and background and the boundary information of ordinary sequences, etc., make intra-frame images and inter-frame images have a tool for processing edge information, thereby effectively improving the encoding and decoding efficiency of video sequences.
下面将结合附图对本申请各实施例进行详细说明。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
参见图7A,其示出了本申请实施例提供的一种视频编码系统的组成框图示例。如图7A所示,视频编码系统10包括变换与量化单元101、帧内估计单元102、帧内预测单元103、运动补偿单元104、运动估计单元105、反变换与反量化单元106、滤波器控制分析单元107、滤波单元108、编码单元109和解码图像缓存单元110等,其中,滤波单元108可以实现去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波,编码单元109可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmatic Coding,CABAC)。针对输入的原始视频信号,通过编码树块(Coding Tree Unit,CTU)的划分可得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元101对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元102和帧内预测单元103是用于对该视频编码块进行帧内预测;明确地说,帧内估计单元102和帧内预测单元103用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元104和运动估计单元105用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元105执行的运动估计为产生运动向量的过程,该运动向量可以估计该视频编码块的运动,然后由运动补偿单元104基于由运动估计单元105所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元103还用于将所选择的帧内预测数据提供到编码单元109,而且运动估计单元105将所计算确定的运动向量数据也发送到编码单元109;此外,反变换与反量化单元106是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元107和滤波单元108去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元109是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;解码图像缓存单元110是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元110中。Referring to FIG. 7A , it shows an example of a composition block diagram of a video coding system provided by an embodiment of the present application. As shown in FIG. 7A , the video coding system 10 includes a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, and a filter control unit The analysis unit 107, the filtering unit 108, the encoding unit 109, the decoded image buffering unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering, and the encoding unit 109 can implement the header Information coding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC). For the input original video signal, a video coding block can be obtained by dividing the coding tree block (Coding Tree Unit, CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is converted and quantized by the quantization unit 101. The video coding block is transformed, including transforming residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce the bit rate; the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used for Intra prediction is performed on the video coding block; specifically, the intra prediction unit 102 and the intra prediction unit 103 are used to determine the intra prediction mode to be used to encode the video coding block; the motion compensation unit 104 and the motion estimation unit 105 is used to perform inter-predictive encoding of the received video encoding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is to generate a motion vector. process, the motion vector can estimate the motion of the video coding block, and then the motion compensation unit 104 performs motion compensation based on the motion vector determined by the motion estimation unit 105; after determining the intra prediction mode, the intra prediction unit 103 also uses In order to provide the selected intra prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used for the video encoding. Reconstruction of blocks, reconstructing a residual block in the pixel domain, the reconstructed residual block removes the blocking artifact by the filter control analysis unit 107 and the filtering unit 108, and then adds the reconstructed residual block to the decoded image A predictive block in the frame of the cache unit 110 is used to generate a reconstructed video coding block; the coding unit 109 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context The content can be based on adjacent coding blocks, and can be used to encode information indicating the determined intra prediction mode, and output the code stream of the video signal; the decoded image buffer unit 110 is used to store the reconstructed video coding blocks for prediction reference. . As the video image coding proceeds, new reconstructed video coding blocks are continuously generated, and these reconstructed video coding blocks are all stored in the decoded image buffer unit 110 .
参见图7B,其示出了本申请实施例提供的一种视频解码系统的组成框图示例。如图7B所示,视频解码系统20包括解码单元201、反变换与反量化单元202、帧内预测单元203、运动补偿单元204、滤波单元205和解码图像缓存单元206等,其中,解码单元201可以实现头信息解码以及CABAC解码,滤波单元205可以实现去方块滤波以及SAO滤波。输入的视频信号经过图7A的编码处理之后,输出该视频信号的码流;该码流输入视频解码系统20中,首先经过解码单元201,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元202进行处理,以便在像素域中产生残差块;帧内预测单元203可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元204是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元202的残差块与由帧内预测单元203或运动补偿单元204产生的对应预测性块进行求和,而形成 解码的视频块;该解码的视频信号通过滤波单元205以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元206中,解码图像缓存单元206存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。Referring to FIG. 7B , it shows an example of a block diagram of a video decoding system provided by an embodiment of the present application. As shown in FIG. 7B , the video decoding system 20 includes a decoding unit 201 , an inverse transform and inverse quantization unit 202 , an intra prediction unit 203 , a motion compensation unit 204 , a filtering unit 205 , a decoded image buffer unit 206 , etc., wherein the decoding unit 201 Header decoding and CABAC decoding can be implemented, and the filtering unit 205 can implement deblocking filtering and SAO filtering. After the input video signal is subjected to the encoding process of FIG. 7A, the code stream of the video signal is output; the code stream is input into the video decoding system 20, and firstly passes through the decoding unit 201 to obtain the decoded transform coefficient; Inverse transform and inverse quantization unit 202 processes to generate residual blocks in the pixel domain; intra prediction unit 203 may be used to generate based on the determined intra prediction mode and data from previously decoded blocks of the current frame or picture Prediction data for the current video decoding block; motion compensation unit 204 determines prediction information for the video decoding block by parsing the motion vector and other associated syntax elements, and uses the prediction information to generate predictive information for the video decoding block being decoded block; a decoded video block is formed by summing the residual block from inverse transform and inverse quantization unit 202 and the corresponding predictive block produced by intra prediction unit 203 or motion compensation unit 204; the decoded video signal Video quality may be improved by filtering unit 205 in order to remove blocking artifacts; decoded video blocks are then stored in decoded image buffer unit 206, which stores reference images for subsequent intra prediction or motion compensation , and is also used for the output of the video signal, that is, the restored original video signal is obtained.
需要说明的是,本申请实施例中的帧内预测方法,主要应用在如图7A所示的帧内预测单元103部分和如图7B所示的帧内预测单元203部分。也就是说,本申请实施例中的帧内预测方法,既可以应用于视频编码系统,也可以应用于视频解码系统,甚至还可以同时应用于视频编码系统和视频解码系统,但是本申请实施例不作具体限定。还需要说明的是,当该帧内预测方法应用于图7A所示的帧内预测单元103部分时,“当前块”具体是指帧内预测中的当前编码块;当该帧内预测方法应用于图7B所示的帧内预测单元203部分时,“当前块”具体是指帧内预测中的当前解码块。It should be noted that the intra-frame prediction method in the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 shown in FIG. 7A and the intra-frame prediction unit 203 shown in FIG. 7B . That is to say, the intra-frame prediction method in the embodiment of the present application can be applied to both a video encoding system and a video decoding system, and can even be applied to a video encoding system and a video decoding system at the same time. There is no specific limitation. It should also be noted that when the intra-frame prediction method is applied to the intra-frame prediction unit 103 shown in FIG. 7A , the “current block” specifically refers to the current coding block in the intra-frame prediction; when the intra-frame prediction method is applied In the intra-frame prediction unit 203 shown in FIG. 7B , the “current block” specifically refers to the current decoding block in the intra-frame prediction.
还需要说明的是,在进行详细阐述之前,说明书通篇中提到的“第一”、“第二”、“第三”等,仅仅是为了区分不同的特征,不具有限定优先级、先后顺序、大小关系等功能。It should also be noted that, before going into detail, the “first”, “second”, “third”, etc. mentioned throughout the specification are only for distinguishing different features, and do not have a limited priority or sequence. order, size relationship, etc.
本申请的一实施例中,本申请实施例提供的帧内预测方法应用于视频编码设备,即编码器。该方法所实现的功能可以通过编码器中的第一处理器调用计算机程序来实现,当然计算机程序可以保存在第一存储器中,可见,该编码器至少包括第一处理器和第一存储器。In an embodiment of the present application, the intra-frame prediction method provided by the embodiment of the present application is applied to a video encoding device, that is, an encoder. The functions implemented by the method can be implemented by the first processor in the encoder calling a computer program, and of course the computer program can be stored in the first memory. It can be seen that the encoder includes at least a first processor and a first memory.
基于上述图7A的应用场景示例,参见图8,其示出了本申请实施例提供的一种帧内预测方法的流程示意图。如图8所示,该方法可以包括:Based on the application scenario example of FIG. 7A above, see FIG. 8 , which shows a schematic flowchart of an intra-frame prediction method provided by an embodiment of the present application. As shown in Figure 8, the method may include:
S801:确定当前块的预测模式参数。S801: Determine the prediction mode parameter of the current block.
需要说明的是,视频图像可以划分为多个图像块,每个当前待编码的图像块可以称为编码块(Coding Block,CB)。这里,每个编码块可以包括第一图像分量、第二图像分量和第三图像分量;而当前块为视频图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的编码块。It should be noted that a video image may be divided into multiple image blocks, and each image block to be encoded currently may be called a coding block (Coding Block, CB). Here, each encoding block may include a first image component, a second image component, and a third image component; and the current block is the encoding of the first image component, the second image component, or the third image component to be predicted currently in the video image piece.
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。Wherein, it is assumed that the current block performs the first image component prediction, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the current block may also be called a luminance block; or, it is assumed that the current block performs the second image component prediction prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block may also be called a chrominance block.
还需要说明的是,预测模式参数用于指示当前块使用的预测模式以及该预测模式相关的参数。通常情况下,针对预测模式参数的确定,可以根据失真值的大小进行确定。在一种具体的实施例中,可以根据率失真优化(Rate Distortion Optimization,RDO)的代价结果进行确定,也可以根据绝对误差和(Sum of Absolute Difference,SAD)的代价结果进行确定,甚至也可以根据绝对变换差和(Sum of Absolute Transformed Difference,SATD)的代价结果进行确定;但是本申请实施例不作任何限定。It should also be noted that the prediction mode parameter is used to indicate the prediction mode used by the current block and parameters related to the prediction mode. Generally, for the determination of the prediction mode parameters, the determination can be performed according to the magnitude of the distortion value. In a specific embodiment, the determination may be made according to the cost result of Rate Distortion Optimization (RDO), or the cost result of the sum of absolute error (Sum of Absolute Difference, SAD), or even It is determined according to the cost result of the sum of absolute transformed difference (Sum of Absolute Transformed Difference, SATD); however, the embodiment of the present application does not make any limitation.
在一些实施例中,所述确定当前块的预测模式参数,可以包括:In some embodiments, the determining the prediction mode parameter of the current block may include:
基于多种候选预测模式对所述当前块进行预编码,确定所述多种候选预测模式对应的预编码结果;Perform precoding on the current block based on multiple candidate prediction modes, and determine precoding results corresponding to the multiple candidate prediction modes;
根据所述预编码结果,从所述多种候选预测模式中确定所述当前块的预测模式参数。According to the precoding result, a prediction mode parameter of the current block is determined from the plurality of candidate prediction modes.
在一种具体的实施例中,所述根据所述预编码结果,从所述多种候选预测模式中确定所述当前块的预测模式参数,可以包括:In a specific embodiment, the determining the prediction mode parameter of the current block from the multiple candidate prediction modes according to the precoding result may include:
基于所述预编码结果,获得所述多种候选预测模式对应的率失真代价结果;obtaining rate-distortion cost results corresponding to the multiple candidate prediction modes based on the precoding results;
从所述率失真代价结果中选取最优率失真代价结果,将所述最优率失真代价结果对应的候选预测模式确定为所述当前块的预测模式参数。An optimal rate-distortion cost result is selected from the rate-distortion cost results, and a candidate prediction mode corresponding to the optimal rate-distortion cost result is determined as a prediction mode parameter of the current block.
需要说明的是,这里的多种候选预测模式可以是指帧内预测模式,根据这多种候选预测模式对当前块进行预编码,可以确定这多种候选预测模式对应的预编码结果。其中,预编码结果可以是候选预测模式(或称为编码模式)对应的失真值,也可以是候选预测模式对应的率失真代价结果,甚至还可以是候选预测模式对应的其他代价结果,比如SAD代价结果、SATD代价结果等。示例性地,在根据预编码结果获得这多种候选预测模式对应的率失真代价结果后,可以从该率失真代价结果中选取最优率失真代价结果,并且将最优率失真代价结果对应的候选预测模式确定为当前块的预测模式参数。It should be noted that the multiple candidate prediction modes here may refer to intra-frame prediction modes, and by precoding the current block according to the multiple candidate prediction modes, precoding results corresponding to the multiple candidate prediction modes may be determined. The precoding result may be the distortion value corresponding to the candidate prediction mode (or called the encoding mode), the rate-distortion cost result corresponding to the candidate prediction mode, or even other cost results corresponding to the candidate prediction mode, such as SAD Cost result, SATD cost result, etc. Exemplarily, after obtaining the rate-distortion cost results corresponding to the multiple candidate prediction modes according to the precoding results, the optimal rate-distortion cost result may be selected from the rate-distortion cost results, and The candidate prediction mode is determined as the prediction mode parameter of the current block.
还需要说明的是,本申请实施例提出了一种非矩形块复制(Intra Non-rectangle Block Copy,INBC)模式,该模式是将帧内块复制(Intra Block Copy,IBC)技术与角度加权预测(Angular Weighted Prediction,AWP)技术相结合。其中,IBC技术能够用于预测重复/循环出现的局部图像特征,应用于屏幕内容编码;AWP技术应用于帧间图像中处理边界信息。如此,本申请实施例提出INBC模式的目的在于期待INBC能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及边界信息等,使得帧内图像也像帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编解码效率。It should also be noted that the embodiment of the present application proposes an Intra Non-rectangle Block Copy (INBC) mode, which is a combination of Intra Block Copy (IBC) technology and angle-weighted prediction. (Angular Weighted Prediction, AWP) technology. Among them, the IBC technology can be used to predict repeated/cyclic local image features, and is applied to screen content coding; the AWP technology is applied to process boundary information in inter-frame images. In this way, the purpose of proposing the INBC mode in this embodiment of the present application is to expect that INBC can better handle the edge information of two parts of different texture/color distributions in the same block, the edges of sharp objects in the intra-frame image, the junction between the foreground and the background, and Boundary information, etc., make intra-frame images also have a tool for processing edge information like inter-frame images, thereby effectively improving the encoding and decoding efficiency of video sequences.
也就是说,这里的多种候选预测模式可以包括有INBC模式和普通帧内模式。其中,普通帧内模式可以包括有角度预测模式、基于位置的帧内预测组合(Position Dependent intra Prediction Combination, PDPC)模式、基于矩阵的帧内预测(Matrix weighted Intra Prediction,MIP)模式等。如此,多种候选预测模式可包括INBC模式和普通帧内模式,这时候INBC模式将和普通帧内模式进行模式竞争,以确定出当前块的预测模式参数。That is to say, the various candidate prediction modes here may include the INBC mode and the normal intra mode. Wherein, the common intra-frame mode may include an angle prediction mode, a position-based intra-frame prediction combination (Position Dependent intra Prediction Combination, PDPC) mode, a matrix-based intra-frame prediction (Matrix weighted Intra Prediction, MIP) mode and the like. In this way, the multiple candidate prediction modes may include the INBC mode and the normal intra mode. At this time, the INBC mode will compete with the normal intra mode to determine the prediction mode parameters of the current block.
在一些实施例中,所述确定当前块的预测模式参数,可以包括:In some embodiments, the determining the prediction mode parameter of the current block may include:
若所述预测模式参数指示使用INBC模式,则将INBC模式标志位设置为第一值;If the prediction mode parameter indicates that the INBC mode is used, the INBC mode flag is set to the first value;
若所述预测模式参数指示使用普通帧内模式,则将所述INBC模式标志位设置为第二值。If the prediction mode parameter indicates that the normal intra mode is used, the INBC mode flag is set to a second value.
需要说明的是,当INBC模式标志位设置为第一值时,确定当前块使用INBC模式进行帧内预测;当INBC模式标志位设置为第二值时,确定当前块使用普通帧内模式进行帧内预测。It should be noted that when the INBC mode flag is set to the first value, it is determined that the current block uses the INBC mode for intra-frame prediction; when the INBC mode flag is set to the second value, it is determined that the current block uses the normal intra-frame mode for frame prediction intraprediction.
还需要说明的是,在一种具体的实现方式中,第一值可以为1,第二值可以0;或者,第一值可以为true,第二值可以为false。在另一种具体的实现方式中,第一值可以为0,第二值可以1;或者,第一值可以为false,第二值可以为true。It should also be noted that, in a specific implementation manner, the first value may be 1, and the second value may be 0; or, the first value may be true, and the second value may be false. In another specific implementation manner, the first value may be 0, and the second value may be 1; or, the first value may be false, and the second value may be true.
这样,以第一值为1,第二值为0为例,在编码器中,如果预测模式参数指示使用INBC模式,那么可以将INBC模式标志位设置为1,这时候使用INBC模式确定当前块的帧内预测值;如果预测模式参数指示不使用INBC模式,那么可以将INBC模式标志位设置为0,这时候使用普通帧内模式确定当前块的帧内预测值。In this way, taking the first value as 1 and the second value as 0 as an example, in the encoder, if the prediction mode parameter indicates to use the INBC mode, then the INBC mode flag bit can be set to 1, and the INBC mode is used to determine the current block. If the prediction mode parameter indicates that the INBC mode is not used, the INBC mode flag can be set to 0, and the normal intra mode is used to determine the intra prediction value of the current block.
进一步地,在一些实施例中,在确定出INBC模式标志位之后,该方法还可以包括:Further, in some embodiments, after determining the INBC mode flag bit, the method may further include:
将所述INBC模式标志位写入码流。Write the INBC mode flag into the code stream.
也就是说,编码器还可以将INBC模式标志位写入码流。这样,在解码器侧,通过解析码流就可以确定出当前块的预测模式参数,即当前块使用的预测模式。That is to say, the encoder can also write the INBC mode flag into the code stream. In this way, on the decoder side, the prediction mode parameter of the current block, that is, the prediction mode used by the current block, can be determined by parsing the code stream.
可以理解,对于本申请实施例提供的INBC模式,它属于多种候选角度划分模式中之一。在一些实施例中,该方法还可以包括:It can be understood that, for the INBC mode provided by this embodiment of the present application, it belongs to one of multiple candidate angle division modes. In some embodiments, the method may also include:
从多种候选角度划分模式中,确定三种目标候选角度划分模式;From the multiple candidate angle division modes, determine three target candidate angle division modes;
利用所述三种目标候选角度划分模式对所述当前块进行帧内预测,确定所述三种目标候选角度划分模式对应的预测代价结果;Intra-frame prediction is performed on the current block using the three target candidate angle division modes, and prediction cost results corresponding to the three target candidate angle division modes are determined;
基于所述预测代价结果,从所述三种目标候选角度划分模式中确定所述当前块使用的INBC模式。Based on the prediction cost result, the INBC mode used by the current block is determined from the three target candidate angular partition modes.
通常而言,候选角度划分模式可以有56种模式,目前VVC中扩展至65种模式。在这多种候选角度划分模式中,可以确定出三种目标候选角度划分模式。将这三种目标候选角度划分模式作为备选,利用这三种目标候选角度划分模式对当前块进行帧内预测,确定出三种目标候选角度划分模式对应的预测代价结果,以便从这三种目标候选角度划分模式中确定出当前块使用的INBC模式。Generally speaking, the candidate angle division modes can have 56 modes, which are currently extended to 65 modes in VVC. Among the multiple candidate angle division modes, three target candidate angle division modes can be determined. Taking these three target candidate angle division modes as alternatives, use these three target candidate angle division modes to perform intra-frame prediction on the current block, and determine the prediction cost results corresponding to the three target candidate angle division modes, so as to obtain the results from the three target candidate angle division modes. The INBC mode used by the current block is determined in the target candidate angle division mode.
在一种具体的实施例中,所述基于所述预测代价结果,从所述三种目标候选角度划分模式中确定所述当前块使用的INBC模式,可以包括:In a specific embodiment, the determining the INBC mode used by the current block from the three target candidate angle division modes based on the prediction cost result may include:
基于所述预测代价结果,获得所述三种目标候选角度划分模式对应的率失真代价结果;Based on the prediction cost results, obtain rate-distortion cost results corresponding to the three target candidate angle division modes;
从所述率失真代价结果中选取最优率失真代价结果,将所述最优率失真代价结果对应的目标候选角度划分模式确定为所述当前块使用的INBC模式。The optimal rate-distortion cost result is selected from the rate-distortion cost results, and the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
需要说明的是,预设率失真模型可以看作是关于失真值、码率和拉格朗日乘子之间的关系函数。假定失真值用D表示,码率用R表示,拉格朗日乘子用λ表示,那么预设率失真模型可以如式(8)所示,It should be noted that the preset rate-distortion model can be regarded as a relational function between the distortion value, the code rate and the Lagrangian multiplier. Assuming that the distortion value is denoted by D, the code rate is denoted by R, and the Lagrange multiplier is denoted by λ, then the preset rate-distortion model can be shown in Equation (8),
J=D+λ·R        (8)J=D+λ·R (8)
其中,J表示率失真代价结果。这里,对于率失真代价结果的计算,无论是何种预测模式,其计算过程是相同的。本申请实施例以其中一种目标候选角度划分模式下当前块的第一率失真代价结果为例进行说明。具体来讲,利用该目标候选角度划分模式对当前块进行帧内预测,得到所述当前块的第一预测值;然后根据当前块的第一预测值和当前块的真实值,可以利用均方误差(Mean Square Error,MSE)计算得到当前块的第一失真值(用D1表示);这时候假定码率R为1,那么通过式(8)所示的预设率失真模型可以计算得到该目标候选角度划分模式下的第一率失真代价结果(用RDC1表示),记为RDC1=D1+λ。同理,还可以计算得到其他两种目标候选角度划分模式下的第二率失真代价结果(用RDC2表示)和第三率失真代价结果(用RDC3表示),从RDC1、RDC2和RDC3中选取最优率失真代价结果,以将最优率失真代价结果对应的目标候选角度划分模式确定为当前块使用的INBC模式。where J represents the rate-distortion cost result. Here, for the calculation of the rate-distortion cost result, regardless of the prediction mode, the calculation process is the same. The embodiment of the present application uses the first rate-distortion cost result of the current block in one of the target candidate angle division modes as an example for description. Specifically, intra-frame prediction is performed on the current block by using the target candidate angle division mode to obtain the first predicted value of the current block; then according to the first predicted value of the current block and the real value of the current block, the mean square The error (Mean Square Error, MSE) is calculated to obtain the first distortion value of the current block (represented by D1); at this time, assuming that the code rate R is 1, then the preset rate distortion model shown in equation (8) can be calculated to obtain the The first rate-distortion cost result (represented by RDC1) in the target candidate angle division mode is denoted as RDC1=D1+λ. Similarly, the second rate-distortion cost result (represented by RDC2) and the third rate-distortion cost result (represented by RDC3) under the other two target candidate angle division modes can also be calculated. For the optimal rate-distortion cost result, the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
进一步地,对于三种目标候选角度划分模式的确定,在一些实施例中,所述从多种候选角度划分模式中,确定三种目标候选角度划分模式,可以包括:Further, for the determination of three target candidate angle division modes, in some embodiments, the determining of three target candidate angle division modes from among multiple candidate angle division modes may include:
基于所述多种候选角度划分模式对所述当前块进行预编码,确定所述多种候选角度划分模式对应的预编码结果;Perform precoding on the current block based on the multiple candidate angle division modes, and determine precoding results corresponding to the multiple candidate angle division modes;
基于所述预编码结果,从所述多种候选角度划分模式中确定所述三种目标候选角度划分模式。Based on the precoding result, the three target candidate angle division modes are determined from the plurality of candidate angle division modes.
在一种具体的实施例中,所述基于所述预编码结果,从所述多种候选角度划分模式中确定所述三种 目标候选角度划分模式,可以包括:In a specific embodiment, the determining the three target candidate angle division modes from the multiple candidate angle division modes based on the precoding result may include:
基于所述预编码结果,获得所述多种候选角度划分模式对应的SATD代价结果;obtaining SATD cost results corresponding to the multiple candidate angle division modes based on the precoding result;
从所述SATD代价结果中选取相对较优的三个SATD代价结果,将所述三个SATD代价结果对应的候选角度划分模式确定为所述三种目标候选角度划分模式。Three relatively superior SATD cost results are selected from the SATD cost results, and the candidate angle division modes corresponding to the three SATD cost results are determined as the three target candidate angle division modes.
需要说明的是,针对这多种候选角度划分模式,可以根据绝对变换差和(Sum of Absolute Transformed Difference,SATD)代价结果选取出三种目标候选角度划分模式以进行率失真代价计算。It should be noted that, for these various candidate angle division modes, three target candidate angle division modes can be selected according to the sum of absolute transformed difference (Sum of Absolute Transformed Difference, SATD) cost result for rate-distortion cost calculation.
也就是说,在利用多种候选角度划分模式对当前块进行预编码,确定出这多种候选角度划分模式对应的预编码结果后,可以根据预编码结果获得这多种候选角度划分模式对应的SATD代价结果;然后从SATD代价结果中选取相对较优的三个SATD代价结果,将所选取的三个SATD代价结果对应的候选角度划分模式确定为这三种目标候选角度划分模式。That is to say, after precoding the current block by using multiple candidate angle division modes, and determining the precoding results corresponding to these multiple candidate angle division modes, the corresponding precoding results can be obtained according to the precoding results. SATD cost result; then three relatively superior SATD cost results are selected from the SATD cost results, and the candidate angle division modes corresponding to the selected three SATD cost results are determined as the three target candidate angle division modes.
具体来讲,在一些实施例中,所述基于所述多种候选角度划分模式对所述当前块进行预编码,确定所述多种候选角度划分模式对应的预编码结果,可以包括:Specifically, in some embodiments, the performing precoding on the current block based on the multiple candidate angle division modes, and determining the precoding results corresponding to the multiple candidate angle division modes, may include:
基于多种候选角度划分模式,确定每一候选角度划分模式下所述当前块的第一分区和第二分区;determining a first partition and a second partition of the current block in each candidate angular partition mode based on multiple candidate angular partition modes;
确定每一候选角度划分模式下所述第一分区的第一目标块矢量信息以及所述第二分区的第二目标块矢量信息;determining the first target block vector information of the first partition and the second target block vector information of the second partition under each candidate angle division mode;
根据每一候选角度划分模式下所述第一分区的第一目标块矢量信息以及所述第二分区的第二目标块矢量信息对所述当前块进行预编码,得到所述多种候选角度划分模式对应的预编码结果。Precoding the current block according to the first target block vector information of the first partition and the second target block vector information of the second partition in each candidate angle division mode, to obtain the multiple candidate angle divisions The precoding result corresponding to the mode.
需要说明的是,基于每一种候选角度划分模式对当前块进行划分,可以确定出该候选角度划分模式下当前块的第一分区和第二分区。然后在确定出该候选角度划分模式下第一分区的第一目标块矢量信息以及第二分区的第二目标块矢量信息后,可以根据每一候选角度划分模式下第一分区的第一目标块矢量信息以及第二分区的第二目标块矢量信息对当前块进行预编码,用以得到多种候选角度划分模式对应的预编码结果。It should be noted that the current block is divided based on each candidate angle division mode, and the first partition and the second partition of the current block in the candidate angle division mode can be determined. Then, after determining the first target block vector information of the first partition and the second target block vector information of the second partition in the candidate angle division mode, the first target block of the first partition in each candidate angle division mode can be The vector information and the vector information of the second target block of the second partition perform precoding on the current block, so as to obtain precoding results corresponding to various candidate angle division modes.
还需要说明的是,针对候选角度划分模式下第一分区的第一目标块矢量信息以及第二分区的第二目标块矢量信息的确定,在一些实施例中,在预测模式参数指示使用INBC模式时,该方法还可以包括:It should also be noted that, for the determination of the first target block vector information of the first partition and the second target block vector information of the second partition in the candidate angle division mode, in some embodiments, the prediction mode parameter indicates that the INBC mode is used. , the method may also include:
构建块矢量候选列表,所述块矢量候选列表包括至少一个块矢量;building a block vector candidate list, the block vector candidate list including at least one block vector;
针对所述候选角度划分模式,遍历所述块矢量候选列表中的至少一个块矢量,计算所述第一分区关于所述至少一个块矢量对应的SAD代价结果以及所述第二分区关于所述至少一个块矢量对应的SAD代价结果;For the candidate angle division mode, traverse at least one block vector in the block vector candidate list, and calculate the SAD cost result corresponding to the at least one block vector for the first partition and the SAD cost result for the second partition for the at least one block vector. The SAD cost result corresponding to a block vector;
从所述第一SAD代价结果中选取最优SAD代价结果,将所述最优SAD代价结果对应的块矢量确定为所述第一分区的第一目标块矢量信息;以及从所述第二SAD代价结果中选取最优SAD代价结果,将所述最优SAD代价结果对应的块矢量确定为所述第二分区的第二目标块矢量信息。Select the optimal SAD cost result from the first SAD cost result, determine the block vector corresponding to the optimal SAD cost result as the first target block vector information of the first partition; and select the optimal SAD cost result from the second SAD cost result The optimal SAD cost result is selected from the cost results, and the block vector corresponding to the optimal SAD cost result is determined as the second target block vector information of the second partition.
这样,基于多种候选角度划分模式(比如56种候选角度划分模式),根据SAD代价在确定出每一候选角度划分模式下第一分区的最优块矢量(即第一目标块矢量信息)和第二分区的最优块矢量(即第二目标块矢量信息)后,通过对当前块进行预编码,以确定出这多种候选角度划分模式对应的预编码结果;然后可以根据预编码结果获得这多种候选角度划分模式对应的SATD代价结果,并从SATD代价结果中选取相对较优的三个SATD代价结果,将所选取的三个SATD代价结果对应的候选角度划分模式确定为这三种目标候选角度划分模式。进一步地,在利用这三种目标候选角度划分模式对当前块进行帧内预测之后,可以得到这三种目标候选角度划分模式对应的率失真代价结果;然后从得到的率失真代价结果中选取最优率失真代价结果,将最优率失真代价结果对应的目标候选角度划分模式确定为当前块使用的INBC模式。In this way, based on multiple candidate angle division modes (such as 56 candidate angle division modes), according to the SAD cost, the optimal block vector (ie, the first target block vector information) of the first partition under each candidate angle division mode is determined and the After the optimal block vector of the second partition (that is, the second target block vector information), the precoding results corresponding to the various candidate angle division modes are determined by precoding the current block; and then the precoding results can be obtained according to the precoding results. The SATD cost results corresponding to these various candidate angle division modes, and three relatively superior SATD cost results are selected from the SATD cost results, and the candidate angle division modes corresponding to the selected three SATD cost results are determined as these three Target candidate angle division mode. Further, after using the three target candidate angle division modes to perform intra-frame prediction on the current block, the rate-distortion cost results corresponding to the three target candidate angle division modes can be obtained; For the optimal rate-distortion cost result, the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
如此,在确定出当前块的预测模式参数后,最终可以使用所确定的预测模式对当前块进行编码,从而使得预测残差较小,能够提高编码效率。In this way, after the prediction mode parameter of the current block is determined, the determined prediction mode can be used to encode the current block finally, so that the prediction residual is small and the encoding efficiency can be improved.
S802:当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息。S802: When the prediction mode parameter indicates to use the INBC mode, determine the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block.
需要说明的是,在预测模式参数指示使用INBC模式时,这时候基于INBC模式对当前块进行划分,可以得到至少两个分区。其中,这至少两个分区可以是第一分区和第二分区。It should be noted that, when the prediction mode parameter indicates to use the INBC mode, at this time, the current block is divided based on the INBC mode, and at least two partitions can be obtained. Wherein, the at least two partitions may be the first partition and the second partition.
还需要说明的是,在预测模式参数指示使用INBC模式时,这时候还需要构建块矢量候选列表(Block Vector Prediction,BVP),以便确定出第一分区的第一目标块矢量信息和第二分区的第二目标块块矢量信息。在一些实施例中,该方法还可以包括:It should also be noted that when the prediction mode parameter indicates to use the INBC mode, a block vector candidate list (Block Vector Prediction, BVP) needs to be constructed at this time, so as to determine the first target block vector information of the first partition and the second partition. The second target block block vector information. In some embodiments, the method may also include:
构建块矢量候选列表,所述块矢量候选列表包括至少一个块矢量。A block vector candidate list is constructed, the block vector candidate list including at least one block vector.
这里,对于块矢量候选列表,在一种具体的实施例中,所述构建块矢量候选列表,可以包括:Here, for the block vector candidate list, in a specific embodiment, the building block vector candidate list may include:
获取历史的块矢量预测信息;Obtain historical block vector prediction information;
基于所述历史的块矢量预测信息,确定所述块矢量候选列表。The block vector candidate list is determined based on the historical block vector prediction information.
也就是说,块矢量候选列表可以是基于历史的块矢量预测信息(History based Block Vector Prediction,HBVP)确定的。其中,HBVP技术具体是从先前已编码块拷贝8个运动信息候选缓存到先进先出队列(First Input First Output,FIFO)中,FIFO是以先进先出的方式保持不断更新。如果FIFO中的运动信息候选与刚刚编码完成的运动信息相同,那么这个重复的运动信息候选首先会被移除,然后在FIFO的尾部会加入当前编码单元的运动信息。如果当前编码单元的运动信息与FIFO中任意候选的运动信息均不相同,那么就会去掉FIFO中第一个候选,然后再将最新的运动信息加到FIFO末尾,以保证FIFO中永远保留8个最新的运动信息候选。HBVP中的运动信息候选与数字音视频编解码技术标准工作组(Audio Video coding Standard Workgroup of China,AVS)提出的第二代AVS标准(可简称为AVS2)中已有的运动信息候选一起进行标识,使用一元(Unary)的方式进行二值化。AVS2中包含了五个运动信息候选,但在第三代AVS标准(可简称为AVS3)中去掉了对称模式,只剩余4个运动信息候选,再加上HBVP中的8个候选一共最多是12个运动信息候选。简而言之,HBVP会将已编码的IBC编码块的块矢量存放在一个历史块矢量信息缓存中,该缓存的最大存储容量为12个,从而可以得到基于历史的块矢量预测信息。That is, the block vector candidate list may be determined based on historical block vector prediction information (History based Block Vector Prediction, HBVP). Among them, the HBVP technology specifically copies 8 motion information candidate buffers from previously encoded blocks into a first-in, first-out queue (First Input First Output, FIFO), and the FIFO is continuously updated in a first-in, first-out manner. If the motion information candidate in the FIFO is the same as the motion information just coded, the duplicate motion information candidate will be removed first, and then the motion information of the current coding unit will be added at the end of the FIFO. If the motion information of the current coding unit is different from the motion information of any candidate in the FIFO, then the first candidate in the FIFO will be removed, and then the latest motion information will be added to the end of the FIFO to ensure that 8 are always reserved in the FIFO. The latest motion information candidate. The motion information candidates in HBVP are identified together with the existing motion information candidates in the second-generation AVS standard (referred to as AVS2) proposed by the Audio Video coding Standard Workgroup of China (AVS). , which is binarized using the unary method. AVS2 contains five motion information candidates, but in the third-generation AVS standard (referred to as AVS3 for short), the symmetric mode is removed, leaving only 4 motion information candidates, plus 8 candidates in HBVP, a total of up to 12 motion information candidates. In short, HBVP will store the block vector of the encoded IBC coded block in a historical block vector information cache with a maximum storage capacity of 12, so that the block vector prediction information based on history can be obtained.
在一种更具体的实施例中,所述基于所述历史的块矢量预测信息,确定所述块矢量候选列表,可以包括:In a more specific embodiment, the determining the block vector candidate list based on the historical block vector prediction information may include:
若已编码块的尺寸参数大于或大于预设尺寸参数,则将所述已编码块的块矢量存储在所述块矢量候选列表的第零位;以及If the size parameter of the coded block is greater than or greater than the preset size parameter, storing the block vector of the coded block in the zeroth bit of the block vector candidate list; and
若已编码块在所述历史的块矢量预测信息中出现的次数大于或等于预设次数,则将所述已编码块的块矢量存储在所述块矢量候选列表的第一位;以及If the number of occurrences of the coded block in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the coded block in the first position of the block vector candidate list; and
将当前块的左侧已编码相邻块、上侧已编码相邻块、左上已编码相邻块、右上已编码相邻块和左下已编码相邻块的块矢量分别存储在所述块矢量候选列表的第二位、第三位、第四位、第五位和第六位;Store the block vectors of the coded adjacent blocks on the left side of the current block, the coded adjacent blocks on the upper side, the coded adjacent blocks on the upper left, the coded adjacent blocks on the upper right, and the coded adjacent blocks on the lower left, respectively, in the block vector. The second, third, fourth, fifth and sixth positions of the candidate list;
基于所述块矢量候选列表中的第零位、第一位、第二位、第三位、第四位、第五位和第六位所存储的块矢量,得到所述块矢量候选列表。The block vector candidate list is obtained based on the block vectors stored in the zeroth bit, the first bit, the second bit, the third bit, the fourth bit, the fifth bit and the sixth bit in the block vector candidate list.
需要说明的是,块矢量候选列表(BVP)中最多存储有7个块矢量;其中,第i个块矢量候选列表可以用cbvp_cands[i]表示,i=0,1,2,…,6。It should be noted that the block vector candidate list (BVP) stores up to 7 block vectors; wherein, the i-th block vector candidate list can be represented by cbvp_cands[i], i=0, 1, 2, . . . , 6.
也就是说,可以从所获取到的历史的块矢量预测信息中分配BV,以作为候选的BVP之一(cbvp_cands[i],最多存储有7个BV)。具体如下,That is, a BV can be allocated from the acquired historical block vector prediction information as one of the candidate BVPs (cbvp_cands[i], a maximum of 7 BVs are stored). details as follows,
已编码块的尺寸参数W×H≥64的BV缓存至cbvp_cands[0];The BV with the size parameter W×H≥64 of the encoded block is buffered to cbvp_cands[0];
已编码块在历史的块矢量预测信息中出现的次数≥2次的BV缓存至cbvp_cands[1];BVs whose coded blocks appear more than or equal to 2 times in the historical block vector prediction information are cached in cbvp_cands[1];
已编码块在当前块的左、上、左上、右上、左下的相邻块的BV分别缓存至cbvp_cands[2]、cbvp_cands[3]、cbvp_cands[4]、cbvp_cands[5]、cbvp_cands[6];The BVs of the adjacent blocks on the left, top, top left, top right, and bottom left of the encoded block are cached in cbvp_cands[2], cbvp_cands[3], cbvp_cands[4], cbvp_cands[5], cbvp_cands[6] respectively;
至此,块矢量候选列表(cbvp_cands)填充完成。So far, the block vector candidate list (cbvp_cands) is filled.
这样,在得到块矢量候选列表之后,可以根据块矢量候选列表确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息。在本申请实施例中,如果开启了自适应像素精度(Adaptive Block Vector Resolution,ABVR),那么会尝试整像素精度或者四倍像素精度的BV;否则,仅使用整像素精度的BV。下面首先以整像素精度的BV为例进行详细说明。In this way, after the block vector candidate list is obtained, the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block can be determined according to the block vector candidate list. In this embodiment of the present application, if Adaptive Block Vector Resolution (ABVR) is enabled, BV with integer pixel precision or quadruple pixel precision is tried; otherwise, only BV with integer pixel precision is used. The following first takes BV with integer pixel precision as an example for detailed description.
在一种具体的实施例中,所述确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息,可以包括:In a specific embodiment, the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block may include:
基于所述INBC模式,确定所述当前块划分后的所述第一分区和所述第二分区;determining the first partition and the second partition after the current block is divided based on the INBC mode;
遍历所述块矢量候选列表中的至少一个块矢量,计算所述第一分区关于所述至少一个块矢量对应的第一SAD代价结果以及所述第二分区关于所述至少一个块矢量对应的第二SAD代价结果;Traverse at least one block vector in the block vector candidate list, and calculate the first SAD cost result corresponding to the at least one block vector of the first partition and the first SAD cost result corresponding to the at least one block vector of the second partition 2. SAD consideration results;
从所述第一SAD代价结果中选取最优SAD代价结果,将所述最优SAD代价结果对应的块矢量确定为所述第一分区的第一目标块矢量信息;以及从所述第二SAD代价结果中选取最优SAD代价结果,将所述最优SAD代价结果对应的块矢量确定为所述第二分区的第二目标块矢量信息。Select the optimal SAD cost result from the first SAD cost result, determine the block vector corresponding to the optimal SAD cost result as the first target block vector information of the first partition; and select the optimal SAD cost result from the second SAD cost result The optimal SAD cost result is selected from the cost results, and the block vector corresponding to the optimal SAD cost result is determined as the second target block vector information of the second partition.
需要说明的是,在当前块使用INBC模式时,这时候可以通过比较绝对误差和(Sum of Absolute Difference,SAD)代价结果,从而为当前块的第一分区和第二分区选取出最优块矢量(即第一目标块矢量信息和第二目标块矢量信息)。It should be noted that when the current block uses the INBC mode, the optimal block vector can be selected for the first partition and the second partition of the current block by comparing the absolute error and (Sum of Absolute Difference, SAD) cost results. (ie, the first target block vector information and the second target block vector information).
在另一种具体的实施例中,所述确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息,可以包括:In another specific embodiment, the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block may include:
基于所述INBC模式,确定所述当前块划分后的所述第一分区和所述第二分区;determining the first partition and the second partition after the current block is divided based on the INBC mode;
建立预设哈希表,对所述第一分区和所述第二分区进行帧内块复制搜索,从所述块矢量候选列表中 选取与所述第一分区的哈希键值匹配的第一一块矢量信息以及与所述第二分区的哈希键值匹配的第二一块矢量信息;Establishing a preset hash table, performing an intra-frame block copy search on the first partition and the second partition, and selecting the first partition matching the hash key value of the first partition from the block vector candidate list a piece of vector information and a second piece of vector information that matches the hash key value of the second partition;
遍历所述块矢量候选列表中的至少一个块矢量,计算所述第一分区关于所述至少一个块矢量对应的第一代价结果以及所述第二分区关于所述至少一个块矢量对应的第二代价结果;Traverse at least one block vector in the block vector candidate list, and calculate a first cost result corresponding to the at least one block vector of the first partition and a second cost result of the second partition corresponding to the at least one block vector result of consideration;
从所述第一代价结果中选取最优代价结果,将所述最优代价结果对应的块矢量确定为所述第一分区的第一二块矢量信息;以及从所述第二代价结果中选取最优代价结果,将所述最优代价结果对应的块矢量确定为所述第二分区的第二二块矢量信息;Select the optimal cost result from the first cost result, determine the block vector corresponding to the optimal cost result as the first and second block vector information of the first partition; and select from the second cost result the optimal cost result, determining the block vector corresponding to the optimal cost result as the second two-block vector information of the second partition;
从所述第一一块矢量信息和所述第一二块矢量信息中,将代价结果最优的块矢量信息确定为所述第一分区的第一目标块矢量信息;以及From the first block of vector information and the first two blocks of vector information, determining the block vector information with the best cost result as the first target block vector information of the first partition; and
从所述第二一块矢量信息和所述第二二块矢量信息中,将代价结果最优的块矢量信息确定为所述第二分区的第二目标块矢量信息。From the second block vector information and the second two-block vector information, the block vector information with the best cost result is determined as the second target block vector information of the second partition.
需要说明的是,首先建立两个预设哈希(Hash)表,分别是m_hash2Pos和m_pos2Hash,然后搜索命中的预测参考块和BV。这里,对于预设搜索范围的设置,可以包括:It should be noted that, firstly, two preset hash (Hash) tables are established, namely m_hash2Pos and m_pos2Hash, and then the hit prediction reference block and BV are searched. Here, the settings for the preset search range can include:
确定同一Hash值出现的位置超过两次的比例值;Determine the proportional value where the same Hash value appears more than twice;
判断所确定的比例值是否大于预设比例值;Determine whether the determined ratio value is greater than the preset ratio value;
若判断结果为是,则设置预设搜索范围为64×64;If the judgment result is yes, set the preset search range to 64×64;
若判断结果为否,则设置预设搜索范围为32×32。If the judgment result is no, the preset search range is set to 32×32.
在本申请实施例中,预设比例值可以设置为5%,但不作具体限定。这样,可以根据同一Hash值出现的位置超过两次的比例值是否大于5%来设置IBC搜索的大小范围,若判断结果是,则设置为64×64;否则设置为32×32。在搜索命中的预测参考块和BV后,可以得到Hash搜索出的BV(包括第一分区的第一一块矢量信息和第二分区的第二一块矢量信息)。然后在块矢量候选列表中尝试所有的BV,通过计算代价结果,根据最优代价结果选取出第一分区的第一二块矢量信息和第二分区的第二二块矢量信息;将其和之前Hash搜索出的BV进行比较,根据代价结果选取出更优的BV,以得到最终的第一分区的第一目标块矢量信息和第二分区的第二目标块矢量信息。这里,针对块矢量候选列表,如果构建出多个块矢量候选列表,那么可以通过计算代价结果,将最优代价结果对应的块矢量候选列表确定为本申请实施例所述的块矢量候选列表,并且在bvp_idx中存储该块矢量候选列表相应的索引序号。In this embodiment of the present application, the preset ratio value may be set to 5%, but is not specifically limited. In this way, the size range of the IBC search can be set according to whether the proportion of the same Hash value appearing more than twice is greater than 5%. If the judgment result is yes, it is set to 64×64; otherwise, it is set to 32×32. After searching for the hit prediction reference block and BV, the BV (including the first block of vector information of the first partition and the second block of vector information of the second partition) searched by Hash can be obtained. Then try all BVs in the block vector candidate list, and select the first and second blocks of vector information of the first partition and the second and second blocks of vector information of the second partition according to the optimal cost result by calculating the cost result; The BVs searched by Hash are compared, and a better BV is selected according to the cost result, so as to obtain the final vector information of the first target block of the first partition and the vector information of the second target block of the second partition. Here, for the block vector candidate list, if multiple block vector candidate lists are constructed, then the block vector candidate list corresponding to the optimal cost result can be determined as the block vector candidate list described in this embodiment of the present application by calculating the cost result, And the index number corresponding to the block vector candidate list is stored in bvp_idx.
需要说明的是,如果上述得到第一目标块矢量信息(可以用BV[0]表示)和第二目标块矢量信息(可以用BV[1]表示)均属于合法块矢量信息,即BV[0]≠0&&BV[1]≠0,那么运动估计结束;如果上述得到第一目标块矢量信息和第二目标块矢量信息中至少之一属于合法块矢量信息,即BV[0]=0||BV[1]=0,那么需要重新确定第一目标块矢量信息和第二目标块矢量信息。在又一种具体的实施例中,所述确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息,可以包括:It should be noted that, if the first target block vector information (which can be represented by BV[0]) and the second target block vector information (which can be represented by BV[1]) obtained above belong to legal block vector information, that is, BV[0 ]≠0&&BV[1]≠0, then motion estimation ends; if at least one of the first target block vector information and the second target block vector information obtained above belongs to legal block vector information, that is, BV[0]=0||BV [1]=0, then the first target block vector information and the second target block vector information need to be re-determined. In another specific embodiment, the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block may include:
若所述第一目标块矢量信息和所述第二目标块矢量信息中至少之一属于非合法块矢量信息,则确定预设搜索范围;在所述块矢量候选列表中,根据所述预设搜索范围分别按照顺序对所述第一分区和所述第二分区进行逐像素的块矢量搜索,得到第一块矢量信息和第二块矢量信息;If at least one of the first target block vector information and the second target block vector information belongs to illegal block vector information, a preset search range is determined; in the block vector candidate list, according to the preset The search range respectively performs pixel-by-pixel block vector search on the first partition and the second partition in order to obtain the first block vector information and the second block vector information;
将所得到的第一块矢量信息和第二块矢量信息确定为所述第一目标块矢量信息和所述第二目标块矢量信息。The obtained first block vector information and second block vector information are determined as the first target block vector information and the second target block vector information.
需要说明的是,在块矢量候选列表(cbvp_cands)中选取SAD<1000的搜索起始点BV,否则,起始点BV可设置为(0,0)。记录最优的BVP(bvpasbv_idx),然后再进行BV全搜索流程,具体如下,It should be noted that the search start point BV with SAD<1000 is selected in the block vector candidate list (cbvp_cands), otherwise, the start point BV may be set to (0, 0). Record the optimal BVP (bvpasbv_idx), and then perform the BV full search process, as follows,
首先设置预设搜索范围。然后根据上述得到的bvpasbv_idx,以其对应的BV计算SAD,放在sad_best_cand和mv_cand中。再根据设置的预设搜索范围,分别按照顺序在正上方(bvx=0,bvy逐像素变换),正左方(bvy=0,bvx逐像素变换)进行BV搜索更新;需要注意的是,bvx=0,bvy=0指的是相对搜索起始点的BV。对于W<16&&H<16的编码块,再进行一轮搜索,提高预测精度。这时候在预设搜索范围内除正上方、正左方之外,以整像素或两倍像素间隔尝试其他BV,以选取到最优BV(即第一目标块矢量信息和第二目标块矢量信息)。First set the preset search range. Then, according to the bvpasbv_idx obtained above, calculate the SAD with its corresponding BV, and put it in sad_best_cand and mv_cand. Then, according to the preset search range set, BV search and update are performed on the top (bvx=0, bvy pixel-by-pixel transformation) and right left (bvy=0, bvx pixel-by-pixel transformation) in order; it should be noted that bvx =0, bvy=0 refers to the BV relative to the search start point. For coding blocks with W<16 && H<16, another round of search is performed to improve the prediction accuracy. At this time, in the preset search range, except directly above and directly left, try other BVs at the interval of whole pixels or twice pixels to select the optimal BV (that is, the first target block vector information and the second target block vector information. information).
还需要说明的是,在根据哈希搜索或者全搜索得到合法的块矢量之后,可以令标志位skip_me=1,然后计算代价结果,并存储当前所得到的最优BV(即第一目标块矢量信息和第二目标块矢量信息)。It should also be noted that after obtaining a legal block vector according to a hash search or a full search, the flag bit skip_me can be set to 1, and then the cost result is calculated, and the currently obtained optimal BV (that is, the first target block vector) can be stored. information and the second target block vector information).
另外,在本申请实施例中,对于四倍像素精度的BV而言,首先进行BV预测,以确定出块矢量候选列表;然后因为标志位skip_me=1,那么可以跳过原先的运动估计流程,仍采用整像素精度得到的BV作为最优BV,然后再根据四倍精度要求,调整该BV为四的整数倍;最后可以计算代价结果(比如率失真代价结果),根据代价结果以更新最优BV(即第一目标块矢量信息和第二目标块矢量信息)。In addition, in the embodiment of the present application, for BV with quadruple pixel precision, BV prediction is first performed to determine the candidate list of block generation vectors; then because the flag bit skip_me=1, the original motion estimation process can be skipped, The BV obtained with integer pixel precision is still used as the optimal BV, and then the BV is adjusted to an integer multiple of four according to the requirement of quadruple precision; finally, the cost result (such as the rate-distortion cost result) can be calculated, and the optimal BV can be updated according to the cost result. BV (ie, first target block vector information and second target block vector information).
在一些实施例中,在确定所述第一目标块矢量信息和所述第二目标块矢量信息之后,该方法还可以包括:In some embodiments, after determining the first target block vector information and the second target block vector information, the method may further include:
确定第一块矢量索引序号,所述第一块矢量索引序号用于指示所述第一目标块矢量信息在所述块矢量候选列表中对应的索引序号;determining a first block vector index number, where the first block vector index number is used to indicate an index number corresponding to the first target block vector information in the block vector candidate list;
确定第二块矢量索引序号,所述第二块矢量索引序号用于指示所述第二目标块矢量信息在所述块矢量候选列表中对应的索引序号;determining a second block vector index number, where the second block vector index number is used to indicate the index number corresponding to the second target block vector information in the block vector candidate list;
将所述第一块矢量索引序号和所述第二块矢量索引序号写入码流。Write the first block vector index number and the second block vector index number into the code stream.
也就是说,在得到第一目标块矢量信息和第二目标块矢量信息,可以确定出第一块矢量索引序号和第二块矢量索引序号,并将第一块矢量索引序号和第二块矢量索引序号写入码流。如此,在解码器侧通过解析码流获取到第一块矢量索引序号和第二块矢量索引序号,结合所构建的块矢量候选列表就能够确定出第一目标块矢量信息和第二目标块矢量信息。That is to say, after obtaining the first target block vector information and the second target block vector information, the first block vector index number and the second block vector index number can be determined, and the first block vector index number and the second block vector index number can be determined. The index number is written into the code stream. In this way, the first block vector index number and the second block vector index number are obtained by parsing the code stream on the decoder side, and the first target block vector information and the second target block vector information can be determined in combination with the constructed block vector candidate list. information.
S803:根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值。S803: Determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information.
需要说明的是,所述根据所述第一目标块矢量信息确定所述第一分区的第一预测值,可以包括:根据所述第一目标块矢量信息对所述第一分区进行运动补偿,得到所述第一分区的预测值。It should be noted that the determining the first predicted value of the first partition according to the first target block vector information may include: performing motion compensation on the first partition according to the first target block vector information, The predicted value of the first partition is obtained.
还需要说明的是,所述根据所述第二目标块矢量信息确定所述第二分区的第二预测值,可以包括:根据所述第二目标块矢量信息对所述第二分区进行运动补偿,得到所述第二分区的预测值。It should also be noted that the determining the second predicted value of the second partition according to the second target block vector information may include: performing motion compensation on the second partition according to the second target block vector information , to obtain the predicted value of the second partition.
也就是说,在得到第一目标块矢量信息后,可以根据该第一目标块矢量信息对第一分区进行运动补偿,能够得到第一分区的预测值(或称为运动补偿预测值);在得到第二目标块矢量信息后,可以根据该第二目标块矢量信息对第二分区进行运动补偿,能够得到第二分区的预测值(或称为运动补偿预测值)。That is to say, after obtaining the first target block vector information, motion compensation can be performed on the first partition according to the first target block vector information, and the predicted value (or referred to as the motion compensation predicted value) of the first partition can be obtained; After obtaining the second target block vector information, motion compensation can be performed on the second partition according to the second target block vector information, and a predicted value (or referred to as a motion compensation predicted value) of the second partition can be obtained.
S804:确定所述第一分区的第一权重值和所述第二分区的第二权重值。S804: Determine a first weight value of the first partition and a second weight value of the second partition.
需要说明的是,第一分区的第一权重值和第二分区的第二权重值主要和角度划分模式索引序号(用AwpIdx表示)有关。在一些实施例中,所述确定所述第一分区的第一权重值和所述第二分区的第二权重值,可以包括:It should be noted that, the first weight value of the first partition and the second weight value of the second partition are mainly related to the index number (represented by AwpIdx) of the angle division mode. In some embodiments, the determining the first weight value of the first partition and the second weight value of the second partition may include:
基于所述INBC模式,确定角度划分模式索引序号;Based on the INBC mode, determine the index number of the angle division mode;
根据所述角度划分模式索引序号,利用第一计算模型得到映射角度值;According to the angle division mode index sequence number, the first calculation model is used to obtain the mapping angle value;
根据所述映射角度值,利用第二计算模型得到斜率归类索引值;According to the mapping angle value, using the second calculation model to obtain the slope classification index value;
根据所述映射角度值,利用第三计算模型得到角度所属分区值;According to the mapping angle value, the third calculation model is used to obtain the partition value to which the angle belongs;
基于所述斜率归类索引值以及所述角度所属分区值,利用预设权重计算模型得到所述第一分区的第一权重值和所述第二分区的第二权重值。Based on the slope classification index value and the partition value to which the angle belongs, a preset weight calculation model is used to obtain a first weight value of the first partition and a second weight value of the second partition.
需要说明的是,在确定出AwpIdx之后,可以得到映射角度值(用ModAngNum表示);根据ModAngNum,进而可以确定出斜率归类索引值(用angleIdx表示)和角度所属分区值(用subAngleIdx表示)。另外,无论是第一权重值,还是第二权重值,均可以包括亮度权重(用AwpWeightArrayY[x][y]表示)和色度权重(用AwpWeightArrayUV[x][y]表示)。It should be noted that after AwpIdx is determined, the mapping angle value (represented by ModAngNum) can be obtained; according to ModAngNum, the slope classification index value (represented by angleIdx) and the partition value to which the angle belongs (represented by subAngleIdx) can be determined. In addition, both the first weight value and the second weight value may include luminance weight (represented by AwpWeightArrayY[x][y]) and chrominance weight (represented by AwpWeightArrayUV[x][y]).
在本申请实施例中,确定出AwpIdx之后,可以得到中间值(用stepIdx)、angleIdx和subAngleIdx。具体的计算模型如下,In this embodiment of the present application, after AwpIdx is determined, an intermediate value (using stepIdx), angleIdx and subAngleIdx can be obtained. The specific calculation model is as follows:
stepIdx=(AwpIdx>>3)-3       (9)stepIdx=(AwpIdx>>3)-3 (9)
modAngNum=AwpIdx%8          (10)modAngNum=AwpIdx%8 (10)
这里,“>>”表示右移运算符,“%”表示取余运算符。另外,stepIdx的取值可以为-3、-2、-1、0、1、2、3;modAngNum的取值可以为0~7。Here, ">>" represents the right shift operator, and "%" represents the remainder operator. In addition, the value of stepIdx may be -3, -2, -1, 0, 1, 2, 3; the value of modAngNum may be 0-7.
进一步地,若modAngNum等于2,则angleIdx=7;若modAngNum等于6,则angleIdx=8;否则,angleIdx=modAngNum%2。具体用下式表示,Further, if modAngNum is equal to 2, then angleIdx=7; if modAngNum is equal to 6, then angleIdx=8; otherwise, angleIdx=modAngNum%2. Specifically, it is expressed by the following formula,
Figure PCTCN2020129266-appb-000001
Figure PCTCN2020129266-appb-000001
其中,AwpIdx与stepIdx、modAngNum之间的取值对照表如表1所示。The value comparison table between AwpIdx, stepIdx, and modAngNum is shown in Table 1.
表1Table 1
AwpIdxAwpIdx AwpIdx>>3AwpIdx>>3 stepIdx=(AwpIdx>>3)-3stepIdx=(AwpIdx>>3)-3 ModAngNum ModAngNum
0~70~7 00 -3-3 对应0~7Corresponding to 0 to 7
8~158~15 11 -2-2 对应0~7Corresponding to 0 to 7
16~2316~23 22 -1-1 对应0~7Corresponding to 0 to 7
24~3124~31 33 00 对应0~7Corresponding to 0 to 7
32~3932~39 44 11 对应0~7Corresponding to 0 to 7
40~4740~47 55 22 对应0~7Corresponding to 0 to 7
48~5548~55 66 33 对应0~7Corresponding to 0 to 7
另外,在得到ModAngNum之后,对于subAngleIdx,其计算模型如下,In addition, after obtaining ModAngNum, for subAngleIdx, the calculation model is as follows,
subAngleIdx=modAngNum>>1         (12)subAngleIdx=modAngNum>>1 (12)
这里,subAngleIdx的取值可以为0、1、2、3。Here, the value of subAngleIdx can be 0, 1, 2, or 3.
也就是说,可以由AwpIdx得到stepIdx和modAngNum,而且modAngNum的值决定angleIdx和subAngleIdx。That is, stepIdx and modAngNum can be obtained from AwpIdx, and the value of modAngNum determines angleIdx and subAngleIdx.
结合上述的图3A和图3B,modAngNum与AwpIdx、subAngleIdx之间的取值对照表如表2所示。3A and 3B, the comparison table of values between modAngNum, AwpIdx, and subAngleIdx is shown in Table 2.
表2Table 2
ModAngNum ModAngNum angleIdxangleIdx subAngleIdxsubAngleIdx
00 00 00
11 11 00
22 77 11
33 11 11
44 00 22
55 11 22
66 88 33
77 11 33
这样,根据角度所属分区值(subAngleIdx)和斜率归类索引值(angleIdx)可以得到准确的映射角度值(ModAngNum)。In this way, an accurate mapping angle value (ModAngNum) can be obtained according to the subAngleIdx to which the angle belongs and the slope classification index value (angleIdx).
进一步地,根据相关参数配置参考权重列表,该参考权重列表可以用ReferenceWeight[x]表示。这里,当前块的宽度用M表示,高度用N表示。Further, a reference weight list is configured according to relevant parameters, and the reference weight list can be represented by ReferenceWeight[x]. Here, the width of the current block is represented by M, and the height is represented by N.
ValidLength_W=(M+(N>>angleIdx))<<1ValidLength_W=(M+(N>>angleIdx))<<1
ValidLength_H=(N+(M>>angleIdx))<<1ValidLength_H=(N+(M>>angleIdx))<<1
DeltaPos_W=stepIdx*((ValidLength_W>>3)-1)DeltaPos_W=stepIdx*((ValidLength_W>>3)-1)
DeltaPos_H=stepIdx*((ValidLength_H>>3)-1)DeltaPos_H=stepIdx*((ValidLength_H>>3)-1)
FirstPos=(ValidLength_H>>1)-6+DeltaPos_HFirstPos=(ValidLength_H>>1)-6+DeltaPos_H
ReferenceWeights[x]=Clip3(0,8,x-FirstPos);ReferenceWeights[x]=Clip3(0,8,x-FirstPos);
其中,“>>”表示右移运算符,“<<”表示左移运算符,Clip3表示嵌位运算符,Clip3(0,8,x-FirstPos)表示(x-FirstPos)嵌位在0和8之间,x的取值范围是0~ValidLength_H-1。Among them, ">>" means right shift operator, "<<" means left shift operator, Clip3 means clamp operator, Clip3(0,8,x-FirstPos) means (x-FirstPos) is clamped at 0 and Between 8, the value range of x is 0 to ValidLength_H-1.
下面以8×8、angIdx=0、stepIdx=0为例,假定角度划分模式索引序号为24、modAngNum为0、angleIdx为0,subAngleIdx为0,进行如下计算:The following takes 8×8, angIdx=0, stepIdx=0 as an example, assuming that the index number of the angle division mode is 24, modAngNum is 0, angleIdx is 0, and subAngleIdx is 0, the following calculation is performed:
ValidLength_W=(8+8)<<1=16*2=32ValidLength_W=(8+8)<<1=16*2=32
ValidLength_H=(8+8)<<1=16*2=32ValidLength_H=(8+8)<<1=16*2=32
DeltaPos_W=0DeltaPos_W=0
DeltaPos_H=0DeltaPos_H=0
FirstPos=16-6+0=10FirstPos=16-6+0=10
ReferenceWeights[x]=Clip3(0,8,x-10);其中,对于8×8的当前块,x的取值范围是0~31。ReferenceWeights[x]=Clip3(0,8,x-10); wherein, for the current block of 8×8, the value range of x is 0˜31.
如此,当前块中(x,y)像素位置的亮度权重用AwpWeightArrayY[x][y]表示,AwpWeightArrayY[x][y]的计算公式如下,In this way, the brightness weight of the (x, y) pixel position in the current block is represented by AwpWeightArrayY[x][y], and the calculation formula of AwpWeightArrayY[x][y] is as follows,
AwpWeightArrayY[x][y]=ReferenceWeights[(y<<1)+((x<<1)>>angleIdx)]     (13)AwpWeightArrayY[x][y]=ReferenceWeights[(y<<1)+((x<<1)>>angleIdx)]   (13)
其中,x的取值范围是0~M-1;y的取值范围是0~N-1。The value range of x is 0 to M-1; the value range of y is 0 to N-1.
以subAngleIdx=0、angleIdx=0为例,那么AwpWeightArrayY[x][y]=ReferenceWeights[(2y)+(2x)]。Taking subAngleIdx=0 and angleIdx=0 as an example, then AwpWeightArrayY[x][y]=ReferenceWeights[(2y)+(2x)].
当前块中(x,y)像素位置的色度权重用AwpWeightArrayUV[x][y]表示,AwpWeightArrayUV[x][y]的计算公式如下,The chrominance weight of the (x, y) pixel position in the current block is represented by AwpWeightArrayUV[x][y], and the calculation formula of AwpWeightArrayUV[x][y] is as follows,
AwpWeightArrayUV[x][y]=AwpWeightArrayY[x<<1][y<<1]        (14)AwpWeightArrayUV[x][y]=AwpWeightArrayY[x<<1][y<<1] (14)
其中,x的取值范围是0~M/2-1;y的取值范围是0~N/2-1。The value range of x is 0~M/2-1; the value range of y is 0~N/2-1.
这样,根据当前块中各像素位置的亮度权重(AwpWeightArrayY[x][y])以及对应的色度权重AwpWeightArrayUV[x][y],可以确定出第一分区的第一权重值和第二分区的第二权重值。In this way, according to the luminance weight (AwpWeightArrayY[x][y]) of each pixel position in the current block and the corresponding chrominance weight AwpWeightArrayUV[x][y], the first weight value of the first partition and the second partition can be determined The second weight value of .
此外,还需要说明的是,在确定角度划分模式索引序号之后,该方法还可以包括:将所述角度划分 模式索引序号写入码流。In addition, it should also be noted that, after determining the index number of the angle division mode, the method may further include: writing the index number of the angle division mode into the code stream.
也就是说,在得到角度划分模式索引序号之后,可以将该角度划分模式索引序号写入码流。如此,在解码器侧通过解析码流即可获取到该角度划分模式索引序号,以便确定出第一分区的第一权重值和第二分区的第二权重值。That is, after obtaining the index number of the angle division mode, the index number of the angle division mode can be written into the code stream. In this way, the index number of the angle division mode can be obtained by parsing the code stream on the decoder side, so as to determine the first weight value of the first partition and the second weight value of the second partition.
S805:利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。S805: Use the first predicted value, the first weight value, the second predicted value, and the second weight value to perform weighted fusion to determine the intra-frame predicted value of the current block.
需要说明的是,在得到第一预测值、第一权重值、第二预测值和第二权重值之后,可以将第一预测值、第一权重值、第二预测值和第二权重值进行加权融合,就可以确定出INBC模式下当前块的帧内预测值。It should be noted that, after obtaining the first predicted value, the first weighted value, the second predicted value and the second weighted value, the first predicted value, the first weighted value, the second predicted value and the second weighted value may be By weighted fusion, the intra prediction value of the current block in the INBC mode can be determined.
本实施例提供了一种帧内预测方法,应用于编码器。通过确定当前块的预测模式参数;当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;确定所述第一分区的第一权重值和所述第二分区的第二权重值;利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。这样,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及普通序列的边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编码效率。This embodiment provides an intra-frame prediction method, which is applied to an encoder. By determining the prediction mode parameter of the current block; when the prediction mode parameter indicates to use the INBC mode, determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block; The first predicted value of the first partition is determined according to the first target block vector information, and the second predicted value of the second partition is determined according to the second target block vector information; the first weight value and the second weight value of the second partition; use the first predicted value, the first weight value, the second predicted value and the second weight value to perform weighted fusion to determine the Intra prediction value of the current block. In this way, different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The boundary between the foreground and the background and the boundary information of the common sequence, etc., make the intra-frame image and the inter-frame image have a tool for processing edge information, thereby effectively improving the coding efficiency of the video sequence.
本申请的另一实施例中,本申请实施例提出了一种INBC帧内预测技术,该技术将IBC技术与AWP技术相结合。其中,IBC技术能够用于预测重复/循环出现的局部图像特征,应用于屏幕内容编码;AWP技术应用于帧间图像中处理边界信息。如此,INBC的研究目的在于期待INBC能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编码效率。In another embodiment of the present application, the embodiment of the present application proposes an INBC intra-frame prediction technology, which combines the IBC technology and the AWP technology. Among them, the IBC technology can be used to predict repeated/cyclic local image features, and is applied to screen content coding; the AWP technology is applied to process boundary information in inter-frame images. In this way, the purpose of INBC's research is to expect that INBC can better handle the edge information of two parts of different texture/color distributions in the same block, the edge of sharp objects in the intra image, the junction of foreground and background, and boundary information, etc., so that Intra-frame images, like inter-frame images, have a tool for processing edge information, thereby effectively improving the coding efficiency of video sequences.
这样,在编码器中,INBC模式的实现过程如下:In this way, in the encoder, the implementation process of the INBC mode is as follows:
以4×4的当前块为单位对CU的模式、运动信息和flag进行标识。这里,对预测模式进行编码,一种具体的实现方式中,当串预测(String Prediction,SP)模式开启时,需要先编码是否是INBC模式,而后编码是否是SP模式,最后编码是否是IBC模式。The mode, motion information, and flag of the CU are identified in units of a 4×4 current block. Here, the prediction mode is encoded. In a specific implementation, when the String Prediction (SP) mode is enabled, it is necessary to first encode whether it is in INBC mode, then encode whether it is in SP mode, and finally encode whether it is in IBC mode. .
编码器的帧内预测步骤如下:The intra prediction steps of the encoder are as follows:
(1)推导块矢量候选列表(即BVP列表)。(1) Derive the block vector candidate list (ie, the BVP list).
(2)遍历56种划分模式,针对每一种模式遍历BVP列表,通过比较SAD为每一种模式的两个分区选取出最优BV。(2) Traverse 56 division modes, traverse the BVP list for each mode, and select the optimal BV for the two partitions of each mode by comparing the SAD.
(3)在56种划分模式中,通过比较SATD选择出3种模式进入率失真优化的过程。(3) Among the 56 division modes, 3 modes are selected by comparing SATD and enter the process of rate-distortion optimization.
(4)3种模式根据步骤(1)确定的最优BV组合为两个分区分别进行运动补偿,确定两个分区各自的目标块矢量信息。(4) The three modes perform motion compensation for the two partitions respectively according to the optimal BV combination determined in step (1), and determine the respective target block vector information of the two partitions.
(5)根据两个分区各自的目标块矢量信息,分别确定两个分区各自的运动补偿预测值。(5) According to the respective target block vector information of the two partitions, the respective motion compensation prediction values of the two partitions are respectively determined.
(6)针对这3种模式,根据不同的模式信息计算加权权重。(6) For these three modes, the weighting weight is calculated according to different mode information.
(7)针对这3种模式,通过加权融合获得当前块最终的帧内预测值。(7) For these three modes, obtain the final intra-frame prediction value of the current block through weighted fusion.
(8)针对这3种模式,通过率失真优化过程决策出这3种模式中最优的INBC模式。(8) For these three modes, the optimal INBC mode among the three modes is determined through the rate-distortion optimization process.
(9)最优的INBC模式与其他模式(如普通帧内模式)竞争。(9) The optimal INBC mode competes with other modes such as normal intra mode.
(10)编码最优模式的相关信息(flag、BV索引序号等)。(10) Coding the relevant information of the optimal mode (flag, BV index number, etc.).
需要说明的是,在编码器中,率失真优化的过程为:沿用IBC的历史BV候选列表,首先在AWP的56种划分模式中,为每一种划分的两个分区分别确定最优的BV候选;然后在56种划分模式中选取最优的三种划分模式,这三种划分模式根据上一步决策出的两个分区的BV分别进行运动补偿得到预测值,而后这两个分区的预测值进行加权融合以实现率失真优化过程,选择出最优的INBC模式,而后将其与其他模式(如普通帧内模式)进行竞争。It should be noted that, in the encoder, the rate-distortion optimization process is as follows: following the historical BV candidate list of IBC, first, in the 56 division modes of AWP, determine the optimal BV for each of the two divisions. Candidate; then select the best three division modes among the 56 division modes, these three division modes perform motion compensation according to the BV of the two partitions determined in the previous step to obtain the predicted value, and then the predicted value of the two partitions A weighted fusion is performed to implement a rate-distortion optimization process, selecting the optimal INBC mode, which is then competed with other modes (such as normal intra mode).
还需要说明的是,在编码器中,还需要进行标志位(Flag)设置:即在序列(Sequence)级、帧级、CU级分别设置flag来控制INBC的使用。这里,应用INBC模式的CU尺寸限制范围为:4×4至16×16。It should also be noted that, in the encoder, flag bit (Flag) setting is also required: that is, flags are respectively set at the sequence (Sequence) level, the frame level, and the CU level to control the use of INBC. Here, the limit range of the CU size to which the INBC mode is applied is: 4×4 to 16×16.
针对步骤(1)中BVP列表的推导,在本申请实施例中,如果开启了ABVR,那么会尝试整像素精度或者四倍像素精度的块矢量(BV),否则,仅使用整像素精度的BV。具体过程如下:For the derivation of the BVP list in step (1), in this embodiment of the present application, if ABVR is enabled, a block vector (BV) with integer pixel precision or quadruple pixel precision will be tried, otherwise, only the BV with integer pixel precision will be used. . The specific process is as follows:
(a)首先尝试整像素精度的BV。(a) First try BV with integer pixel precision.
(1.1)使用HBVP技术进行BV预测(1.1) BV prediction using HBVP technology
(1.1.1)HBVP技术从先前编码块拷贝8个运动信息候选到FIFO中,FIFO以先进先出的方式保持不断更新。如果FIFO中的运动信息候选与刚刚编码完成的运动信息相同,这个重复的运动信息候选首先会被移除,在FIFO的尾部会加入当前编码单元的运动信息。如果当前编码单元的运动信息与FIFO中任意候选的运动信息均不相同,就会去掉FIFO中第一个候选,再将最新的运动信息加到FIFO末尾,保证FIFO中永远保留8个最新的运动信息候选。HBVP中的运动信息候选与AVS2中已有的运动信息候选一起进行标识,使用Unary的方式进行二值化。AVS2中包含了五个运动信息候选,但在AVS3中去掉了对称模式,只剩余4个运动信息候选,再加上HBVP的8个候选一共最多是12个候选。简而言之,HBVP会将已编码IBC编码块的BV存放在一个历史BV信息缓存中,该缓存的最大存储容量为12个,从而可以得到基于历史的块矢量预测信息。(1.1.1) HBVP technology copies 8 motion information candidates from the previous coding block into the FIFO, and the FIFO keeps updating continuously in a first-in, first-out manner. If the motion information candidate in the FIFO is the same as the motion information just coded, the duplicate motion information candidate will be removed first, and the motion information of the current coding unit will be added at the end of the FIFO. If the motion information of the current coding unit is different from the motion information of any candidate in the FIFO, the first candidate in the FIFO will be removed, and the latest motion information will be added to the end of the FIFO to ensure that the 8 latest motions are always retained in the FIFO. Information candidates. The motion information candidates in HBVP are identified together with the existing motion information candidates in AVS2, and are binarized using the Unary method. AVS2 contains five motion information candidates, but in AVS3, the symmetric mode is removed, leaving only 4 motion information candidates, plus the 8 candidates of HBVP, a total of 12 candidates at most. In short, HBVP will store the BVs of the encoded IBC coded blocks in a historical BV information cache with a maximum storage capacity of 12, so that the block vector prediction information based on history can be obtained.
(1.1.2)然后根据以下属性,从上述的历史BV信息缓存中分配BV,作为候选的BVP之一(用cbvp_cands[i]表示,i=0,1,2,…,6,即BVP中最多存储7个BV):(1.1.2) Then according to the following attributes, allocate BV from the above-mentioned historical BV information cache as one of the candidate BVPs (represented by cbvp_cands[i], i=0, 1, 2, ..., 6, that is, in the BVP Store up to 7 BVs):
已编码块的尺寸参数W×H≥64的BV缓存至cbvp_cands[0];The BV with the size parameter W×H≥64 of the encoded block is buffered to cbvp_cands[0];
已编码块在历史BV信息缓存中出现的次数≥2次的BV缓存至cbvp_cands[1];BV buffers with the number of occurrences of coded blocks ≥ 2 times in the historical BV information buffer are stored in cbvp_cands[1];
已编码块在当前块的左、上、左上、右上、左下的相邻块的BV分别缓存至cbvp_cands[2]、cbvp_cands[3]、cbvp_cands[4]、cbvp_cands[5]、cbvp_cands[6];The BVs of the adjacent blocks on the left, top, top left, top right, and bottom left of the encoded block are cached in cbvp_cands[2], cbvp_cands[3], cbvp_cands[4], cbvp_cands[5], cbvp_cands[6] respectively;
至此,候选的BVP(cbvp_cands)填充完成。At this point, the candidate BVP (cbvp_cands) filling is completed.
(1.1.3)把cbvp_cands中填入的BVP数量记录在cnt_class_cands中。(1.1.3) Record the number of BVPs filled in cbvp_cands in cnt_class_cands.
(1.2)进行运动估计,选取合适的BV。(1.2) Perform motion estimation and select an appropriate BV.
(1.2.1)首先建立两个Hash表,分别是m_hash2Pos和m_pos2Hash,搜索命中的预测参考块和BV,根据同一个Hash值出现的位置超过两次的比例是否大于5%来设置IBC搜索的大小范围,是则设置为64×64,否则为32×32。再选取出cbvp_cands中带来代价结果(cost)最小的BVP,在bvp_idx中存储相应的索引值。然后在cbvp_cands中尝试所有的BVP为BV,计算cost,和之前Hash搜索出的BV进行比较,选取更优的BV,并且记录该块矢量(BV)、该块矢量的索引序号(bv_idx)及代价结果(cost)。(1.2.1) First establish two Hash tables, namely m_hash2Pos and m_pos2Hash, search for the hit prediction reference block and BV, and set the size of the IBC search according to whether the proportion of the same Hash value appearing more than twice is greater than 5% range, set to 64x64 if yes, 32x32 otherwise. Then select the BVP with the smallest cost result (cost) in cbvp_cands, and store the corresponding index value in bvp_idx. Then try all BVPs as BV in cbvp_cands, calculate the cost, compare it with the BV searched by the previous Hash, select a better BV, and record the block vector (BV), the index number of the block vector (bv_idx) and cost result (cost).
(1.2.2)如果(1.2.1)步骤中搜索得到了合法合理的BV(即BV[0]≠0&&BV[1]≠0)。则运动估计结束,执行(1.3)步骤;否则执行(1.2.3)步骤。(1.2.2) If the search in step (1.2.1) obtains a legal and reasonable BV (ie, BV[0]≠0&&BV[1]≠0). Then the motion estimation ends, and step (1.3) is performed; otherwise, step (1.2.3) is performed.
(1.2.3)在cbvp_cands中选取SAD<1000的搜索起始点BV,否则起始点BV设置为(0,0)。记录最优的BVP(bvpasbv_idx),然后再进行BV本地搜索,流程如下:(1.2.3) Select the search start point BV with SAD<1000 in cbvp_cands, otherwise the start point BV is set to (0, 0). Record the optimal BVP (bvpasbv_idx), and then perform a BV local search. The process is as follows:
首先,设置预设搜索范围;First, set the preset search range;
其次,根据刚刚得到的bvpasbv_idx,以其对应的BV计算SAD,并存储在sad_best_cand和mv_cand中;Secondly, according to the bvpasbv_idx just obtained, calculate the SAD with its corresponding BV, and store it in sad_best_cand and mv_cand;
再次,根据设置的预设搜索范围,分别按照顺序在正上方(bvx=0,bvy逐像素变换)、正左方(bvy=0,bvx逐像素变换)进行BV搜索更新。(注:bvx=0,bvy=0指的是相对搜索起始点的BV);Thirdly, according to the preset search range set, the BV search and update are performed in the order right above (bvx=0, pixel-by-pixel transformation of bvy) and right left (bvy=0, pixel-by-pixel transformation of bvx). (Note: bvx=0, bvy=0 refers to the BV relative to the search starting point);
再次,对于W<16&&H<16的编码块,再进行一轮搜索,提高预测精度。在搜索范围内除正上方、正左方外,以整像素或两倍像素间隔尝试其他BV,以选取最优BV。Again, for the coding blocks with W<16 && H<16, another round of search is performed to improve the prediction accuracy. In the search range, except directly above and directly left, try other BVs at an interval of whole pixels or twice pixels to select the optimal BV.
(1.3)在(1.1)、(1.2)步骤根据Hash搜索或者全搜索得到合法合理的BV后,令skip_me=1,计算率失真代价结果(RDcost),并存储目前最优BV。(1.3) After obtaining a legal and reasonable BV according to Hash search or full search in steps (1.1) and (1.2), set skip_me=1, calculate the rate-distortion cost result (RDcost), and store the current optimal BV.
(b)再尝试四倍像素精度的BV。(b) Try BV with quadruple pixel precision again.
(2.1)进行BV预测,与前述(1.1)步骤相同,这里不再赘述。(2.1) Perform BV prediction, which is the same as step (1.1) above, and will not be repeated here.
(2.2)因为skip_me=1,可以跳过原先的运动估计流程,仍采用整像素精度得到的BV为最优BV;然后再根据四倍精度要求,调整该BV为四的整数倍。(2.2) Because skip_me=1, the original motion estimation process can be skipped, and the BV obtained with integer pixel precision is still used as the optimal BV; and then the BV is adjusted to be an integer multiple of four according to the quadruple precision requirement.
(2.3)计算率失真代价结果(RDcost),更新最优BV。(2.3) Calculate the rate-distortion cost result (RDcost) and update the optimal BV.
至此,可以得到当前块中第一分区的第一目标块矢量信息和第二分区的第二目标块矢量信息。So far, the first target block vector information of the first partition and the second target block vector information of the second partition in the current block can be obtained.
这样,在确定出当前块中第一分区的第一目标块矢量信息和第二分区的第二目标块矢量信息后,根据第一目标块矢量信息进行运动补偿,确定第一分区的第一预测值,以及根据第二目标块矢量信息进行运动补偿,确定第二分区的第二预测值;根据角度划分模式索引序号(AwpIdx),可以确定出第一分区的第一权重值和所述第二分区的第二权重值;最后利用第一预测值、第一权重值、第二预测值和第二权重值进行加权融合,从而可以得到当前块的帧内预测值。In this way, after determining the first target block vector information of the first partition and the second target block vector information of the second partition in the current block, motion compensation is performed according to the first target block vector information to determine the first prediction of the first partition value, and perform motion compensation according to the second target block vector information to determine the second predicted value of the second partition; according to the angle division mode index number (AwpIdx), the first weight value of the first partition and the second prediction value of the second partition can be determined. The second weight value of the partition; finally, the first prediction value, the first weight value, the second prediction value and the second weight value are used for weighted fusion, so that the intra frame prediction value of the current block can be obtained.
本实施例提供了一种帧内预测方法,应用于编码器。通过本实施例对前述实施例的具体实现进行详细阐述,从中可以看出,基于本实施例的技术方案,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的 物体边缘、前景与背景的交界处以及普通序列的边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编码效率。This embodiment provides an intra-frame prediction method, which is applied to an encoder. The specific implementation of the foregoing embodiments is described in detail through this embodiment, from which it can be seen that, based on the technical solution of this embodiment, using different angle weights to process boundary information in image blocks in intra-frame prediction can better The edge information of two parts of different texture/color distributions in the same partition block, the sharp object edges in the intra-frame image, the junction between the foreground and the background, and the boundary information of the common sequence, etc. are processed, so that the intra-frame image has the same as the inter-frame image. A tool for processing edge information, thereby effectively improving the coding efficiency of video sequences.
本申请的又一实施例中,本申请实施例提供的帧内预测方法应用于视频解码设备,即解码器。该方法所实现的功能可以通过解码器中的第二处理器调用计算机程序来实现,当然计算机程序可以保存在第二存储器中,可见,该解码器至少包括第二处理器和第二存储器。In another embodiment of the present application, the intra-frame prediction method provided by the embodiment of the present application is applied to a video decoding device, that is, a decoder. The functions implemented by the method can be implemented by calling a computer program by the second processor in the decoder. Of course, the computer program can be stored in the second memory. It can be seen that the decoder includes at least a second processor and a second memory.
基于上述图7B的应用场景示例,参见图9,其示出了本申请实施例提供的另一种帧内预测方法的流程示意图。如图9所示,该方法可以包括:Based on the application scenario example of FIG. 7B above, see FIG. 9 , which shows a schematic flowchart of another intra prediction method provided by an embodiment of the present application. As shown in Figure 9, the method may include:
S901:解析码流,获取当前块的预测模式参数。S901: Parse the code stream to obtain prediction mode parameters of the current block.
需要说明的是,视频图像可以划分为多个图像块,每个当前待解码的图像块可以称为解码块。这里,每个解码块也可以包括第一图像分量、第二图像分量和第三图像分量;而当前块为视频图像中当前待进行第一图像分量或者第二图像分量或者第三图像分量预测的解码块。It should be noted that a video image may be divided into multiple image blocks, and each image block to be decoded currently may be called a decoding block. Here, each decoding block may also include a first image component, a second image component, and a third image component; and the current block is the current block in the video image that is to be predicted for the first image component, the second image component, or the third image component. Decode block.
在一些实施例中,所述解析码流,获取当前块的预测模式参数,可以包括:In some embodiments, the parsing the code stream to obtain the prediction mode parameters of the current block may include:
解析码流,获取INBC模式标志位;Parse the stream to get the INBC mode flag;
若INBC模式标志位为第一值,则确定所述当前块使用INBC模式;If the INBC mode flag bit is the first value, then determine that the current block uses the INBC mode;
若INBC模式标志位为第二值,则确定所述当前块使用普通帧内模式。If the INBC mode flag bit is the second value, it is determined that the current block uses the normal intra mode.
需要说明的是,在一种具体的实现方式中,第一值可以为1,第二值可以0;或者,第一值可以为true,第二值可以为false。在另一种具体的实现方式中,第一值可以为0,第二值可以1;或者,第一值可以为false,第二值可以为true。It should be noted that, in a specific implementation manner, the first value may be 1, and the second value may be 0; or, the first value may be true, and the second value may be false. In another specific implementation manner, the first value may be 0, and the second value may be 1; or, the first value may be false, and the second value may be true.
还需要说明的是,编码器在确定出预测模式参数之后,编码器可以将INBC模式标志位写入码流。这样,解码器通过解析码流,可以获得当前块的INBC模式标志位,然后根据INBC模式标志位,可以确定出当前块是否使用INBC模式。It should also be noted that after the encoder determines the prediction mode parameter, the encoder can write the INBC mode flag bit into the code stream. In this way, the decoder can obtain the INBC mode flag bit of the current block by parsing the code stream, and then can determine whether the current block uses the INBC mode according to the INBC mode flag bit.
S902:当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号。S902: When the prediction mode parameter indicates to use the INBC mode, parse the code stream to obtain the first block vector index number and the second block vector index number.
S903:基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息。S903: Determine, based on the block vector candidate list, the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number The second target block vector information of the second partition of the corresponding current block in the block vector candidate list.
需要说明的是,在预测模式参数指示使用INBC模式时,这时候基于INBC模式对当前块进行划分,可以得到至少两个分区。其中,这至少两个分区可以是第一分区和第二分区。It should be noted that, when the prediction mode parameter indicates to use the INBC mode, at this time, the current block is divided based on the INBC mode, and at least two partitions can be obtained. Wherein, the at least two partitions may be the first partition and the second partition.
还需要说明的是,第一块矢量索引序号用于指示第一目标块矢量信息在块矢量候选列表中对应的索引序号,第二块矢量索引序号用于指示第二目标块矢量信息在块矢量候选列表中对应的索引序号。因此,在一些实施例中,该方法还可以包括:It should also be noted that the first block vector index number is used to indicate the index number corresponding to the first target block vector information in the block vector candidate list, and the second block vector index number is used to indicate that the second target block vector information is in the block vector The corresponding index number in the candidate list. Therefore, in some embodiments, the method may further include:
构建块矢量候选列表,所述块矢量候选列表包括至少一个块矢量。A block vector candidate list is constructed, the block vector candidate list including at least one block vector.
这里,对于块矢量候选列表,在一种具体的实施例中,所述构建块矢量候选列表,可以包括:Here, for the block vector candidate list, in a specific embodiment, the building block vector candidate list may include:
获取历史的块矢量预测信息;Obtain historical block vector prediction information;
基于所述历史的块矢量预测信息,确定所述块矢量候选列表。The block vector candidate list is determined based on the historical block vector prediction information.
也就是说,块矢量候选列表可以是基于历史的块矢量预测信息(History based Block Vector Prediction,HBVP)确定的。在一种更具体的实施例中,所述基于所述历史的块矢量预测信息,确定所述块矢量候选列表,可以包括:That is, the block vector candidate list may be determined based on historical block vector prediction information (History based Block Vector Prediction, HBVP). In a more specific embodiment, the determining the block vector candidate list based on the historical block vector prediction information may include:
若已解码块的尺寸参数大于或大于预设尺寸参数,则将所述已解码块的块矢量存储在所述块矢量候选列表的第零位;以及If the size parameter of the decoded block is greater than or greater than a preset size parameter, storing the block vector of the decoded block in the zeroth bit of the block vector candidate list; and
若已解码块在所述历史的块矢量预测信息中出现的次数大于或等于预设次数,则将所述已解码块的块矢量存储在所述块矢量候选列表的第一位;以及If the number of times the decoded block appears in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the decoded block in the first position of the block vector candidate list; and
将所述当前块的左侧已解码相邻块、上侧已解码相邻块、左上已解码相邻块、右上已解码相邻块和左下已解码相邻块的块矢量分别存储在所述块矢量候选列表的第二位、第三位、第四位、第五位和第六位;Store the block vectors of the decoded adjacent blocks on the left side of the current block, the decoded adjacent blocks on the upper side, the decoded adjacent blocks on the upper left, the decoded adjacent blocks on the upper right, and the decoded adjacent blocks on the lower left in the the second, third, fourth, fifth and sixth bits of the block vector candidate list;
基于所述块矢量候选列表中的第零位、第一位、第二位、第三位、第四位、第五位和第六位所存储的块矢量,得到所述块矢量候选列表。The block vector candidate list is obtained based on the block vectors stored in the zeroth bit, the first bit, the second bit, the third bit, the fourth bit, the fifth bit and the sixth bit in the block vector candidate list.
需要说明的是,块矢量候选列表(BVP)中最多存储有7个块矢量;其中,第i个块矢量候选列表可以用cbvp_cands[i]表示,i=0,1,2,…,6。It should be noted that the block vector candidate list (BVP) stores up to 7 block vectors; wherein, the i-th block vector candidate list can be represented by cbvp_cands[i], i=0, 1, 2, . . . , 6.
还需要说明的是,解码器中块矢量候选列表的构建与编码器中块矢量候选列表的构建过程相同,这里不再详述。It should also be noted that the construction of the block vector candidate list in the decoder is the same as the construction process of the block vector candidate list in the encoder, which will not be described in detail here.
由于编码器在确定出第一目标块矢量信息和第二目标块矢量信息后,将第一目标块矢量信息对应的第一块矢量索引序号和第二目标块矢量信息对应的第二块矢量索引序号写入码流,并且传输到解码器。这样,在解码器中,就无需同编码器一样来确定第一目标块矢量信息和第二目标块矢量信息,这时候解码器可以通过解析码流,获取到第一块矢量索引序号和第二块矢量索引序号,然后基于所构建的块矢量候选列表,就可以得到第一目标块矢量信息和第二目标块矢量信息。其中,第一目标块矢量信息表示当前块的第一分区的最优块矢量,第二目标块矢量信息表示当前块的第二分区的最优块矢量。Since the encoder determines the vector information of the first target block and the vector information of the second target block, the encoder sets the index number of the first block vector corresponding to the vector information of the first target block and the vector index of the second target block corresponding to the vector information of the second target block. The sequence number is written into the code stream and transmitted to the decoder. In this way, the decoder does not need to determine the vector information of the first target block and the vector information of the second target block in the same way as the encoder. At this time, the decoder can obtain the index number of the first block vector and the second target block vector by parsing the code stream. The block vector index number, and then based on the constructed block vector candidate list, the first target block vector information and the second target block vector information can be obtained. The first target block vector information represents the optimal block vector of the first partition of the current block, and the second target block vector information represents the optimal block vector of the second partition of the current block.
S904:根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值。S904: Determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information.
需要说明的是,所述根据所述第一目标块矢量信息确定所述第一分区的第一预测值,可以包括:根据所述第一目标块矢量信息对所述第一分区进行运动补偿,得到所述第一分区的预测值。It should be noted that the determining the first predicted value of the first partition according to the first target block vector information may include: performing motion compensation on the first partition according to the first target block vector information, The predicted value of the first partition is obtained.
还需要说明的是,所述根据所述第二目标块矢量信息确定所述第二分区的第二预测值,可以包括:根据所述第二目标块矢量信息对所述第二分区进行运动补偿,得到所述第二分区的预测值。It should also be noted that the determining the second predicted value of the second partition according to the second target block vector information may include: performing motion compensation on the second partition according to the second target block vector information , to obtain the predicted value of the second partition.
也就是说,在得到第一目标块矢量信息后,可以根据该第一目标块矢量信息对第一分区进行运动补偿,能够得到第一分区的预测值(或称为运动补偿预测值);在得到第二目标块矢量信息后,可以根据该第二目标块矢量信息对第二分区进行运动补偿,能够得到第二分区的预测值(或称为运动补偿预测值)。That is to say, after obtaining the first target block vector information, motion compensation can be performed on the first partition according to the first target block vector information, and the predicted value (or referred to as the motion compensation predicted value) of the first partition can be obtained; After obtaining the second target block vector information, motion compensation can be performed on the second partition according to the second target block vector information, and a predicted value (or referred to as a motion compensation predicted value) of the second partition can be obtained.
S905:确定所述第一分区的第一权重值和所述第二分区的第二权重值。S905: Determine a first weight value of the first partition and a second weight value of the second partition.
需要说明的是,第一分区的第一权重值和第二分区的第二权重值主要和角度划分模式索引序号(用AwpIdx表示)有关。在一些实施例中,所述确定所述第一分区的第一权重值和所述第二分区的第二权重值,可以包括:It should be noted that, the first weight value of the first partition and the second weight value of the second partition are mainly related to the index number (represented by AwpIdx) of the angle division mode. In some embodiments, the determining the first weight value of the first partition and the second weight value of the second partition may include:
解析码流,获取角度划分模式索引序号;Parse the code stream and obtain the index number of the angle division mode;
根据所述角度划分模式索引序号,利用第一计算模型得到映射角度值;According to the angle division mode index sequence number, the first calculation model is used to obtain the mapping angle value;
根据所述映射角度值,利用第二计算模型得到斜率归类索引值;According to the mapping angle value, using the second calculation model to obtain the slope classification index value;
根据所述映射角度值,利用第三计算模型得到角度所属分区值;According to the mapping angle value, the third calculation model is used to obtain the partition value to which the angle belongs;
基于所述斜率归类索引值以及所述角度所属分区值,利用预设权重计算模型得到所述第一分区的第一权重值和所述第二分区的第二权重值。Based on the slope classification index value and the partition value to which the angle belongs, a preset weight calculation model is used to obtain a first weight value of the first partition and a second weight value of the second partition.
需要说明的是,由于编码器将AwpIdx写入码流,这样对于解码器而言,可以通过解析码流,就可以获得AwpIdx。然后根据AwpIdx,可以进一步得到映射角度值(用ModAngNum表示);根据ModAngNum,可以进一步得到斜率归类索引值(用angleIdx表示)和角度所属分区值(用subAngleIdx表示)。另外,无论是第一权重值,还是第二权重值,均可以包括亮度权重(用AwpWeightArrayY[x][y]表示)和色度权重(用AwpWeightArrayUV[x][y]表示)。It should be noted that since the encoder writes the AwpIdx into the code stream, for the decoder, the AwpIdx can be obtained by parsing the code stream. Then, according to AwpIdx, the mapping angle value (represented by ModAngNum) can be further obtained; according to ModAngNum, the slope classification index value (represented by angleIdx) and the partition value to which the angle belongs (represented by subAngleIdx) can be further obtained. In addition, both the first weight value and the second weight value may include luminance weight (represented by AwpWeightArrayY[x][y]) and chrominance weight (represented by AwpWeightArrayUV[x][y]).
还需要说明的是,在获得AwpIdx之后,解码器中第一权重值和第二权重值的确定与编码器中第一权重值和第二权重值的确定过程相同,这里不再详述。It should also be noted that, after obtaining AwpIdx, the determination of the first weight value and the second weight value in the decoder is the same as the determination process of the first weight value and the second weight value in the encoder, which will not be described in detail here.
S906:利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。S906: Use the first predicted value, the first weight value, the second predicted value, and the second weight value to perform weighted fusion to determine the intra-frame predicted value of the current block.
需要说明的是,在得到第一预测值、第一权重值、第二预测值和第二权重值之后,将第一预测值、第一权重值、第二预测值和第二权重值进行加权融合,就可以确定出INBC模式下当前块的帧内预测值。It should be noted that after obtaining the first predicted value, the first weighted value, the second predicted value and the second weighted value, the first predicted value, the first weighted value, the second predicted value and the second weighted value are weighted After fusion, the intra prediction value of the current block in the INBC mode can be determined.
简言之,在解码器中,通过构建与编码器侧相同的块矢量候选列表,根据编码器侧传输的模式索引(即角度划分模式索引序号)和BV索引(即第一块矢量索引序号和第二块矢量索引序号)分别确定决定加权权重相关的系数以及两个分区(第一分区和第二分区)相应的目标块矢量信息,然后对这两个分区的运动补偿预测值进行加权得到最终的帧内预测值。In short, in the decoder, by constructing the same block vector candidate list as that on the encoder side, the mode index (i.e. the angle division mode index number) and BV index (i.e. the first block vector index number and the BV index) transmitted by the encoder side are divided into The second block vector index number) determines the relevant coefficients for determining the weighting weight and the corresponding target block vector information of the two partitions (the first partition and the second partition), and then weights the motion compensation prediction values of the two partitions to obtain the final The intra-frame prediction value of .
解码器的帧内预测步骤如下:The decoder's intra prediction steps are as follows:
(1)解析码流,获取flag信息、INBC模式的角度划分模式索引序号以及两个分区的BV索引。(1) Parse the code stream to obtain the flag information, the index number of the angle division mode of the INBC mode, and the BV indexes of the two partitions.
(2)推导块矢量候选列表(即BVP列表)。(2) Derive the block vector candidate list (ie, the BVP list).
(3)根据BV索引以及BVP列表,可以确定两个分区的BV信息(即两个分区各自的目标块矢量信息,包括第一目标块矢量信息和第二目标块矢量信息)。(3) According to the BV index and the BVP list, the BV information of the two partitions (that is, the respective target block vector information of the two partitions, including the first target block vector information and the second target block vector information) can be determined.
(4)根据两个分区各自的目标块矢量信息,分别确定两个分区各自的运动补偿预测值。(4) According to the respective target block vector information of the two partitions, the respective motion compensation prediction values of the two partitions are determined respectively.
(5)解析码流,获取模式信息;根据该模式信息计算加权权重。(5) Parse the code stream to obtain mode information; calculate the weighted weight according to the mode information.
(6)通过加权融合获得当前块最终的帧内预测值。(6) Obtain the final intra-frame prediction value of the current block through weighted fusion.
本实施例提供了一种帧内预测方法,应用于解码器。通过解析码流,获取当前块的预测模式参数;当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第 二分区的第二目标块矢量信息;根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;确定所述第一分区的第一权重值和所述第二分区的第二权重值;利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。这样,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及普通序列的边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的解码效率。This embodiment provides an intra-frame prediction method, which is applied to a decoder. By parsing the code stream, the prediction mode parameter of the current block is obtained; when the prediction mode parameter indicates to use the INBC mode, the code stream is parsed to obtain the first block vector index number and the second block vector index number; based on the block vector candidate list, determining the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the block vector candidate list corresponding second target block vector information of the second partition of the current block; determining the first predicted value of the first partition according to the first target block vector information, and determining the first predicted value of the first partition according to the second target block vector information the second predicted value of the second partition; determine the first weight value of the first partition and the second weight value of the second partition; use the first predicted value, the first weight value, the first The second prediction value and the second weight value are weighted and fused to determine the intra-frame prediction value of the current block. In this way, different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The junction of foreground and background and the boundary information of common sequences, etc., make intra-frame images have a tool for processing edge information like inter-frame images, thereby effectively improving the decoding efficiency of video sequences.
本申请的再一实施例中,基于前述实施例相同的发明构思,参见图10,其示出了本申请实施例提供的一种编码器100的组成结构示意图。如图10所示,该编码器100可以包括:第一确定单元1001、第一计算单元1002和第一预测单元1003;其中,In yet another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, see FIG. 10 , which shows a schematic structural diagram of an encoder 100 provided by an embodiment of the present application. As shown in FIG. 10, the encoder 100 may include: a first determination unit 1001, a first calculation unit 1002, and a first prediction unit 1003; wherein,
第一确定单元1001,配置为确定当前块的预测模式参数;a first determining unit 1001, configured to determine a prediction mode parameter of the current block;
第一确定单元1001,还配置为当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;The first determining unit 1001 is further configured to, when the prediction mode parameter indicates to use the INBC mode, determine the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
第一计算单元1002,配置为根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;以及确定所述第一分区的第一权重值和所述第二分区的第二权重值;A first calculation unit 1002, configured to determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information and determining a first weight value for the first partition and a second weight value for the second partition;
第一预测单元1003,配置为利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。The first prediction unit 1003 is configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra-frame prediction value of the current block .
在一些实施例中,参见图10,编码器100还可以包括预编码单元1004,配置为基于多种候选预测模式对所述当前块进行预编码,确定所述多种候选预测模式对应的预编码结果;In some embodiments, referring to FIG. 10 , the encoder 100 may further include a precoding unit 1004 configured to perform precoding on the current block based on multiple candidate prediction modes, and determine the precoding corresponding to the multiple candidate prediction modes result;
第一确定单元1001,还配置为根据所述预编码结果,从所述多种候选预测模式中确定所述当前块的预测模式参数。The first determining unit 1001 is further configured to determine a prediction mode parameter of the current block from the multiple candidate prediction modes according to the precoding result.
进一步地,第一确定单元1001,具体配置为基于所述预编码结果,获得所述多种候选预测模式对应的率失真代价结果;以及从所述率失真代价结果中选取最优率失真代价结果,将所述最优率失真代价结果对应的候选预测模式确定为所述当前块的预测模式参数。Further, the first determining unit 1001 is specifically configured to obtain rate-distortion cost results corresponding to the multiple candidate prediction modes based on the precoding results; and select an optimal rate-distortion cost result from the rate-distortion cost results , and the candidate prediction mode corresponding to the optimal rate-distortion cost result is determined as the prediction mode parameter of the current block.
在一些实施例中,参见图10,编码器100还可以包括设置单元1005;其中,所述多种候选预测模式包括INBC模式和普通帧内模式;In some embodiments, referring to FIG. 10 , the encoder 100 may further include a setting unit 1005; wherein, the multiple candidate prediction modes include an INBC mode and a normal intra mode;
设置单元1005,配置为若所述预测模式参数指示使用INBC模式,则将INBC模式标志位设置为第一值;若所述预测模式参数指示使用普通帧内模式,则将所述INBC模式标志位设置为第二值。The setting unit 1005 is configured to set the INBC mode flag bit to a first value if the prediction mode parameter indicates to use the INBC mode; if the prediction mode parameter indicates to use the normal intra mode, then set the INBC mode flag bit to the first value Set to the second value.
在一些实施例中,所述第一值为1,所述第二值为0;或者,所述第一值为true,所述第二值为flase。In some embodiments, the first value is 1 and the second value is 0; or, the first value is true and the second value is flase.
在一些实施例中,参见图10,编码器100还可以包括写入单元1006,配置为将所述INBC模式标志位写入码流。In some embodiments, referring to FIG. 10 , the encoder 100 may further include a writing unit 1006 configured to write the INBC mode flag bit into the code stream.
在一些实施例中,第一确定单元1001,还配置为从多种候选角度划分模式中,确定三种目标候选角度划分模式;利用所述三种目标候选角度划分模式对所述当前块进行帧内预测,确定所述三种目标候选角度划分模式对应的预测代价结果;以及基于所述预测代价结果,从所述三种目标候选角度划分模式中确定所述当前块使用的INBC模式。In some embodiments, the first determining unit 1001 is further configured to determine three target candidate angle division modes from among multiple candidate angle division modes; and use the three target candidate angle division modes to frame the current block. intra-prediction, determining prediction cost results corresponding to the three target candidate angle division modes; and determining an INBC mode used by the current block from the three target candidate angle division modes based on the prediction cost results.
进一步地,第一确定单元1001,具体配置为基于所述预测代价结果,获得所述三种目标候选角度划分模式对应的率失真代价结果;以及从所述率失真代价结果中选取最优率失真代价结果,将所述最优率失真代价结果对应的目标候选角度划分模式确定为所述当前块使用的INBC模式。Further, the first determining unit 1001 is specifically configured to obtain rate-distortion cost results corresponding to the three target candidate angle division modes based on the prediction cost results; and select an optimal rate-distortion cost result from the rate-distortion cost results For the cost result, the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
在一些实施例中,预编码单元1004,还配置为基于所述多种候选角度划分模式对所述当前块进行预编码,确定所述多种候选角度划分模式对应的预编码结果;In some embodiments, the precoding unit 1004 is further configured to perform precoding on the current block based on the multiple candidate angle division modes, and determine precoding results corresponding to the multiple candidate angle division modes;
第一确定单元1001,还配置为基于所述预编码结果,从所述多种候选角度划分模式中确定所述三种目标候选角度划分模式。The first determining unit 1001 is further configured to determine the three target candidate angle division modes from the multiple candidate angle division modes based on the precoding result.
进一步地,第一确定单元1001,具体配置为基于所述预编码结果,获得所述多种候选角度划分模式对应的SATD代价结果;以及从所述SATD代价结果中选取相对较优的三个SATD代价结果,将所述三个SATD代价结果对应的候选角度划分模式确定为所述三种目标候选角度划分模式。Further, the first determining unit 1001 is specifically configured to obtain SATD cost results corresponding to the multiple candidate angle division modes based on the precoding results; and select three relatively better SATDs from the SATD cost results For the cost result, the candidate angle division modes corresponding to the three SATD cost results are determined as the three target candidate angle division modes.
在一些实施例中,第一确定单元1001,还配置为基于多种候选角度划分模式,确定每一候选角度划分模式下所述当前块的第一分区和第二分区;以及确定每一候选角度划分模式下所述第一分区的第一目标块矢量信息以及所述第二分区的第二目标块矢量信息;In some embodiments, the first determining unit 1001 is further configured to, based on multiple candidate angle division modes, determine the first partition and the second partition of the current block in each candidate angle division mode; and determine each candidate angle The first target block vector information of the first partition and the second target block vector information of the second partition in the division mode;
预编码单元1004,具体配置为根据每一候选角度划分模式下所述第一分区的第一目标块矢量信息以及所述第二分区的第二目标块矢量信息对所述当前块进行预编码,得到所述多种候选角度划分模式对 应的预编码结果。The precoding unit 1004 is specifically configured to perform precoding on the current block according to the first target block vector information of the first partition and the second target block vector information of the second partition in each candidate angle division mode, Precoding results corresponding to the multiple candidate angle division modes are obtained.
在一些实施例中,参见图10,编码器100还可以包括第一构建单元1007,配置为构建块矢量候选列表,所述块矢量候选列表包括至少一个块矢量。In some embodiments, referring to FIG. 10 , the encoder 100 may further include a first construction unit 1007 configured to construct a block vector candidate list, the block vector candidate list including at least one block vector.
在一些实施例中,第一构建单元1007,具体配置为获取历史的块矢量预测信息;以及基于所述历史的块矢量预测信息,确定所述块矢量候选列表。In some embodiments, the first construction unit 1007 is specifically configured to obtain historical block vector prediction information; and determine the block vector candidate list based on the historical block vector prediction information.
进一步地,第一构建单元1007,具体配置为若已编码块的尺寸参数大于或大于预设尺寸参数,则将所述已编码块的块矢量存储在所述块矢量候选列表的第零位;以及若已编码块在所述历史的块矢量预测信息中出现的次数大于或等于预设次数,则将所述已编码块的块矢量存储在所述块矢量候选列表的第一位;以及将所述当前块的左侧已编码相邻块、上侧已编码相邻块、左上已编码相邻块、右上已编码相邻块和左下已编码相邻块的块矢量分别存储在所述块矢量候选列表的第二位、第三位、第四位、第五位和第六位;以及基于所述块矢量候选列表中的第零位、第一位、第二位、第三位、第四位、第五位和第六位所存储的块矢量,得到所述块矢量候选列表。Further, the first construction unit 1007 is specifically configured to store the block vector of the encoded block in the zeroth position of the block vector candidate list if the size parameter of the encoded block is greater than or greater than the preset size parameter; and if the number of occurrences of the encoded block in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the encoded block in the first position of the block vector candidate list; and The block vectors of the coded adjacent blocks on the left side, the coded adjacent blocks on the upper side, the coded adjacent blocks on the upper left, the coded adjacent blocks on the upper right, and the coded adjacent blocks on the lower left of the current block are respectively stored in the block. The second, third, fourth, fifth and sixth bits of the vector candidate list; and the zeroth, first, second, third, The block vector stored in the fourth bit, the fifth bit and the sixth bit obtains the block vector candidate list.
在一些实施例中,第一确定单元1001,具体配置为基于所述INBC模式,确定所述当前块划分后的所述第一分区和所述第二分区;以及建立预设哈希表,对所述第一分区和所述第二分区进行帧内块复制搜索,从所述块矢量候选列表中选取与所述第一分区的哈希键值匹配的第一一块矢量信息以及与所述第二分区的哈希键值匹配的第二一块矢量信息;以及遍历所述块矢量候选列表中的至少一个块矢量,计算所述第一分区关于所述至少一个块矢量对应的第一代价结果以及所述第二分区关于所述至少一个块矢量对应的第二代价结果;以及从所述第一代价结果中选取最优代价结果,将所述最优代价结果对应的块矢量确定为所述第一分区的第一二块矢量信息;以及从所述第二代价结果中选取最优代价结果,将所述最优代价结果对应的块矢量确定为所述第二分区的第二二块矢量信息;以及从所述第一一块矢量信息和所述第一二块矢量信息中,将代价结果最优的块矢量信息确定为所述第一分区的第一目标块矢量信息;以及从所述第二一块矢量信息和所述第二二块矢量信息中,将代价结果最优的块矢量信息确定为所述第二分区的第二目标块矢量信息。In some embodiments, the first determining unit 1001 is specifically configured to, based on the INBC mode, determine the first partition and the second partition after the current block is divided; The first partition and the second partition perform an intra-block copy search, and select from the block vector candidate list the first block vector information that matches the hash key value of the first partition and the first block vector information that matches the hash key value of the first partition. The second block vector information matching the hash key value of the second partition; and traversing at least one block vector in the block vector candidate list, and calculating the first cost of the first partition corresponding to the at least one block vector result and a second cost result corresponding to the second partition with respect to the at least one block vector; and selecting an optimal cost result from the first cost result, and determining the block vector corresponding to the optimal cost result as the The first and second blocks of vector information of the first partition; and the optimal cost result is selected from the second cost result, and the block vector corresponding to the optimal cost result is determined as the second and second blocks of the second partition vector information; and from the first block of vector information and the first two blocks of vector information, determining the block vector information with the best cost result as the first target block vector information of the first partition; and from Among the second block vector information and the second two-block vector information, the block vector information with the best cost result is determined as the second target block vector information of the second partition.
在一些实施例中,第一确定单元1001,还配置为若所述第一目标块矢量信息和所述第二目标块矢量信息中至少之一属于非合法块矢量信息,则确定预设搜索范围;在块矢量候选列表中,根据所述预设搜索范围分别按照顺序对所述第一分区和所述第二分区进行逐像素的块矢量搜索,得到第一块矢量信息和第二块矢量信息;以及将所得到的第一块矢量信息和第二块矢量信息确定为所述第一目标块矢量信息和所述第二目标块矢量信息。In some embodiments, the first determining unit 1001 is further configured to determine a preset search range if at least one of the first target block vector information and the second target block vector information belongs to illegal block vector information In the block vector candidate list, according to the preset search range, the first sub-region and the second sub-region are respectively searched for pixel-by-pixel block vectors in order to obtain the first block vector information and the second block vector information ; and determining the obtained first block vector information and second block vector information as the first target block vector information and the second target block vector information.
在一些实施例中,第一确定单元1001,还配置为确定第一块矢量索引序号,所述第一块矢量索引序号用于指示第一目标块矢量信息在所述块矢量候选列表中对应的索引序号;以及确定第二块矢量索引序号,所述第二块矢量索引序号用于指示第二目标块矢量信息在所述块矢量候选列表中对应的索引序号;In some embodiments, the first determining unit 1001 is further configured to determine a first block vector index number, where the first block vector index number is used to indicate the corresponding first target block vector information in the block vector candidate list an index number; and determining a second block vector index number, where the second block vector index number is used to indicate an index number corresponding to the second target block vector information in the block vector candidate list;
写入单元1006,还配置为将所述第一块矢量索引序号和所述第二块矢量索引序号写入码流。The writing unit 1006 is further configured to write the first block vector index number and the second block vector index number into the code stream.
在一些实施例中,第一计算单元1002,具体配置为根据所述第一目标块矢量信息对所述第一分区进行运动补偿,得到所述第一分区的预测值。In some embodiments, the first calculation unit 1002 is specifically configured to perform motion compensation on the first partition according to the first target block vector information to obtain the predicted value of the first partition.
在一些实施例中,第一计算单元1002,具体配置为根据所述第二目标块矢量信息对所述第二分区进行运动补偿,得到所述第二分区的预测值。In some embodiments, the first calculation unit 1002 is specifically configured to perform motion compensation on the second partition according to the second target block vector information, to obtain the predicted value of the second partition.
在一些实施例中,第一确定单元1001,还配置为基于INBC模式,确定角度划分模式索引序号;In some embodiments, the first determining unit 1001 is further configured to determine the index number of the angle division mode based on the INBC mode;
第一计算单元1002,还配置为根据所述角度划分模式索引序号,利用第一计算模型得到映射角度值;以及根据所述映射角度值,利用第二计算模型得到斜率归类索引值;以及根据所述映射角度值,利用第三计算模型得到角度所属分区值;以及基于所述斜率归类索引值以及所述角度所属分区值,利用预设权重计算模型得到所述第一分区的第一权重值和所述第二分区的第二权重值。The first calculation unit 1002 is further configured to divide the mode index number according to the angle, and use the first calculation model to obtain a mapping angle value; and according to the mapping angle value, use the second calculation model to obtain the slope classification index value; and according to For the mapping angle value, a third calculation model is used to obtain the value of the partition to which the angle belongs; and based on the slope classification index value and the value of the partition to which the angle belongs, a preset weight calculation model is used to obtain the first weight of the first partition value and a second weight value for the second partition.
在一些实施例中,写入单元1006,还配置为将所述角度划分模式索引序号写入码流。In some embodiments, the writing unit 1006 is further configured to write the index number of the angle division mode into the code stream.
可以理解地,在本申请实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that, in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, and it may also be non-modular. Moreover, each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、 磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or The part that contributes to the prior art or the whole 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 for making a computer device (which can be It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: 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.
因此,本申请实施例提供了一种计算机存储介质,应用于编码器100,该计算机存储介质存储有帧内预测程序,所述帧内预测程序被第一处理器执行时实现前述实施例中任一项所述的方法。Therefore, an embodiment of the present application provides a computer storage medium, which is applied to the encoder 100. The computer storage medium stores an intra-frame prediction program, and when the intra-frame prediction program is executed by the first processor, any of the foregoing embodiments is implemented. one of the methods described.
基于上述编码器100的组成以及计算机存储介质,参见图11,其示出了本申请实施例提供的编码器100的具体硬件结构示意图。如图11所示,可以包括:第一通信接口1101、第一存储器1102和第一处理器1103;各个组件通过第一总线系统1104耦合在一起。可理解,第一总线系统1104用于实现这些组件之间的连接通信。第一总线系统1104除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图11中将各种总线都标为第一总线系统1104。其中,Based on the composition of the encoder 100 and the computer storage medium described above, see FIG. 11 , which shows a schematic diagram of a specific hardware structure of the encoder 100 provided by the embodiment of the present application. As shown in FIG. 11 , it may include: a first communication interface 1101 , a first memory 1102 and a first processor 1103 ; each component is coupled together through a first bus system 1104 . It can be understood that the first bus system 1104 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 1104 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the various buses are labeled as the first bus system 1104 in FIG. 11 . in,
第一通信接口1101,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The first communication interface 1101 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
第一存储器1102,用于存储能够在第一处理器1103上运行的计算机程序;a first memory 1102 for storing computer programs that can run on the first processor 1103;
第一处理器1103,用于在运行所述计算机程序时,执行:The first processor 1103 is configured to, when running the computer program, execute:
确定当前块的预测模式参数;determine the prediction mode parameter of the current block;
当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;When the prediction mode parameter indicates to use the INBC mode, determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;determining a first predictor of the first partition according to the first target block vector information, and determining a second predictor of the second partition according to the second target block vector information;
确定所述第一分区的第一权重值和所述第二分区的第二权重值;determining a first weight value of the first partition and a second weight value of the second partition;
利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
可以理解,本申请实施例中的第一存储器1102可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1102旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the first memory 1102 in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) And direct memory bus random access memory (Direct Rambus RAM, DRRAM). The first memory 1102 of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
而第一处理器1103可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1103中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1103可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1102,第一处理器1103读取第一存储器1102中的信息,结合其硬件完成上述方法的步骤。The first processor 1103 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the first processor 1103 or an instruction in the form of software. The above-mentioned first processor 1103 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the first memory 1102, and the first processor 1103 reads the information in the first memory 1102, and completes the steps of the above method in combination with its hardware.
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It will be appreciated that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic Devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), General Purpose Processors, Controllers, Microcontrollers, Microprocessors, Others for performing the functions described herein electronic unit or a combination thereof. For a software implementation, the techniques described herein may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described herein. Software codes may be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
可选地,作为另一个实施例,第一处理器1103还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the first processor 1103 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
本实施例提供了一种编码器,该编码器可以包括第一确定单元、第一计算单元和第一预测单元。这样,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及普通序列的 边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编码效率。This embodiment provides an encoder, and the encoder may include a first determination unit, a first calculation unit, and a first prediction unit. In this way, different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The boundary between the foreground and the background and the boundary information of the common sequence, etc., make the intra-frame image and the inter-frame image have a tool for processing edge information, thereby effectively improving the coding efficiency of the video sequence.
本申请的再一实施例中,基于前述实施例相同的发明构思,参见图12,其示出了本申请实施例提供的一种解码器120的组成结构示意图。如图12所示,该解码器120可以包括:解析单元1201、第二确定单元1202、第二计算单元1203和第二预测单元1204;其中,In yet another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, see FIG. 12 , which shows a schematic structural diagram of a decoder 120 provided by an embodiment of the present application. As shown in FIG. 12, the decoder 120 may include: a parsing unit 1201, a second determining unit 1202, a second calculating unit 1203, and a second predicting unit 1204; wherein,
解析单元1201,配置为解析码流,获取当前块的预测模式参数;以及还配置为当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;The parsing unit 1201 is configured to parse the code stream and obtain the prediction mode parameter of the current block; and is also configured to parse the code stream when the prediction mode parameter indicates to use the INBC mode, and obtain the first block vector index number and the second block vector index number;
第二确定单元1202,配置为基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息;The second determining unit 1202 is configured to determine, based on the block vector candidate list, the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the The second target block vector information of the second partition of the current block corresponding to the second block vector index number in the block vector candidate list;
第二计算单元1203,配置为根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;以及确定所述第一分区的第一权重值和所述第二分区的第二权重值;The second calculation unit 1203 is configured to determine a first predicted value of the first partition according to the first target block vector information, and determine a second predicted value of the second partition according to the second target block vector information and determining a first weight value for the first partition and a second weight value for the second partition;
第二预测单元1204,配置为利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。The second prediction unit 1204 is configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra frame prediction value of the current block .
在一些实施例中,解析单元1201,还配置为解析码流,获取INBC模式标志位;In some embodiments, the parsing unit 1201 is further configured to parse the code stream and obtain the INBC mode flag bit;
第二确定单元1202,还配置为若所述INBC模式标志位为第一值,则确定所述当前块使用INBC模式;若所述INBC模式标志位为第二值,则确定所述当前块使用普通帧内模式。The second determining unit 1202 is further configured to, if the INBC mode flag is a first value, determine that the current block uses the INBC mode; if the INBC mode flag is a second value, determine that the current block uses the INBC mode Normal intra mode.
在一些实施例中,所述第一值为1,所述第二值为0;或者,所述第一值为true,所述第二值为flase。In some embodiments, the first value is 1 and the second value is 0; or, the first value is true and the second value is flase.
在一些实施例中,参见图12,解码器120还可以包括第二构建单元1205,配置为构建块矢量候选列表,所述块矢量候选列表包括至少一个块矢量。In some embodiments, referring to FIG. 12 , the decoder 120 may further include a second construction unit 1205 configured to construct a block vector candidate list, the block vector candidate list including at least one block vector.
在一些实施例中,第二构建单元1205,具体配置为获取历史的块矢量预测信息;以及基于所述历史的块矢量预测信息,确定所述块矢量候选列表。In some embodiments, the second construction unit 1205 is specifically configured to obtain historical block vector prediction information; and determine the block vector candidate list based on the historical block vector prediction information.
进一步地,第二构建单元1205,具体配置为若已解码块的尺寸参数大于或大于预设尺寸参数,则将所述已解码块的块矢量存储在所述块矢量候选列表的第零位;以及若已解码块在所述历史的块矢量预测信息中出现的次数大于或等于预设次数,则将所述已解码块的块矢量存储在所述块矢量候选列表的第一位;以及将所述当前块的左侧已解码相邻块、上侧已解码相邻块、左上已解码相邻块、右上已解码相邻块和左下已解码相邻块的块矢量分别存储在所述块矢量候选列表的第二位、第三位、第四位、第五位和第六位;以及基于所述块矢量候选列表中的第零位、第一位、第二位、第三位、第四位、第五位和第六位所存储的块矢量,得到所述块矢量候选列表。Further, the second construction unit 1205 is specifically configured to store the block vector of the decoded block in the zeroth position of the block vector candidate list if the size parameter of the decoded block is greater than or greater than the preset size parameter; and if the number of occurrences of the decoded block in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the decoded block in the first bit of the block vector candidate list; and The block vectors of the decoded adjacent blocks on the left side of the current block, the decoded adjacent blocks on the upper side, the decoded adjacent blocks on the upper left, the decoded adjacent blocks on the upper right, and the decoded adjacent blocks on the lower left are respectively stored in the block. The second, third, fourth, fifth and sixth bits of the vector candidate list; and the zeroth, first, second, third, The block vector stored in the fourth bit, the fifth bit and the sixth bit obtains the block vector candidate list.
在一些实施例中,第二计算单元1203,具体配置为根据所述第一目标块矢量信息对所述第一分区进行运动补偿,得到所述第一分区的预测值。In some embodiments, the second calculation unit 1203 is specifically configured to perform motion compensation on the first partition according to the first target block vector information to obtain the predicted value of the first partition.
在一些实施例中,第二计算单元1203,具体配置为根据所述第二目标块矢量信息对所述第二分区进行运动补偿,得到所述第二分区的预测值。In some embodiments, the second calculation unit 1203 is specifically configured to perform motion compensation on the second partition according to the second target block vector information to obtain the predicted value of the second partition.
在一些实施例中,解析单元1201,还配置为解析码流,获取角度划分模式索引序号;In some embodiments, the parsing unit 1201 is further configured to parse the code stream and obtain the index number of the angle division mode;
第二计算单元1203,还配置为根据所述角度划分模式索引序号,利用第一计算模型得到映射角度值;以及根据所述映射角度值,利用第二计算模型得到斜率归类索引值;以及根据所述映射角度值,利用第三计算模型得到角度所属分区值;以及基于所述斜率归类索引值以及所述角度所属分区值,利用预设权重计算模型得到所述第一分区的第一权重值和所述第二分区的第二权重值。The second calculation unit 1203 is further configured to divide the mode index number according to the angle, obtain the mapping angle value by using the first calculation model; and obtain the slope classification index value by using the second calculation model according to the mapping angle value; For the mapping angle value, a third calculation model is used to obtain the value of the partition to which the angle belongs; and based on the slope classification index value and the value of the partition to which the angle belongs, a preset weight calculation model is used to obtain the first weight of the first partition value and a second weight value for the second partition.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that, in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a module, and it may also be non-modular. Moreover, each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机存储介质,应用于解码器120,该计算机存储介质存储有帧内预测程序,所述帧内预测程序被第二处理器执行时实现前述实施例中任一项所述的方法。If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such understanding, the present embodiment provides a computer storage medium, which is applied to the decoder 120 , where the computer storage medium stores an intra-frame prediction program, and the intra-frame prediction program implements the foregoing embodiments when executed by the second processor The method of any of the above.
基于上述解码器120的组成以及计算机存储介质,参见图13,其示出了本申请实施例提供的解码器120的具体硬件结构示意图。如图13所示,可以包括:第二通信接口1301、第二存储器1302和第二处理器1303;各个组件通过第二总线系统1304耦合在一起。可理解,第二总线系统1304用于实现这些组件之间的连接通信。第二总线系统1304除包括数据总线之外,还包括电源总线、控制总线和状 态信号总线。但是为了清楚说明起见,在图13中将各种总线都标为第二总线系统1304。其中,Based on the composition of the above-mentioned decoder 120 and the computer storage medium, see FIG. 13 , which shows a schematic diagram of a specific hardware structure of the decoder 120 provided by the embodiment of the present application. As shown in FIG. 13 , it may include: a second communication interface 1301 , a second memory 1302 and a second processor 1303 ; each component is coupled together through a second bus system 1304 . It can be understood that the second bus system 1304 is used to implement connection communication between these components. In addition to the data bus, the second bus system 1304 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the various buses are designated as the second bus system 1304 in FIG. 13 . in,
第二通信接口1301,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The second communication interface 1301 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
第二存储器1302,用于存储能够在第二处理器1303上运行的计算机程序;a second memory 1302 for storing computer programs that can run on the second processor 1303;
第二处理器1303,用于在运行所述计算机程序时,执行:The second processor 1303 is configured to, when running the computer program, execute:
解析码流,获取当前块的预测模式参数;Parse the code stream to obtain the prediction mode parameters of the current block;
当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;When the prediction mode parameter indicates that the INBC mode is used, the code stream is parsed, and the first block vector index number and the second block vector index number are obtained;
基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息;Based on the block vector candidate list, determine the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the block vector candidate list. the second target block vector information of the second partition of the corresponding current block in the block vector candidate list;
根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;determining a first predictor of the first partition according to the first target block vector information, and determining a second predictor of the second partition according to the second target block vector information;
确定所述第一分区的第一权重值和所述第二分区的第二权重值;determining a first weight value of the first partition and a second weight value of the second partition;
利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
可选地,作为另一个实施例,第二处理器1303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the second processor 1303 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
可以理解,第二存储器1302与第一存储器1102的硬件功能类似,第二处理器1303与第一处理器1103的硬件功能类似;这里不再详述。It can be understood that the hardware function of the second memory 1302 is similar to that of the first memory 1102, and the hardware function of the second processor 1303 is similar to that of the first processor 1103; details are not described here.
本实施例提供了一种解码器,该解码器可以包括解析单元、第二确定单元、第二计算单元和第二预测单元。这样,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及普通序列的边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的解码效率。This embodiment provides a decoder, and the decoder may include a parsing unit, a second determination unit, a second calculation unit, and a second prediction unit. In this way, different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The junction of foreground and background and the boundary information of common sequences, etc., make intra-frame images have a tool for processing edge information like inter-frame images, thereby effectively improving the decoding efficiency of video sequences.
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this application, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements , but also other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined under the condition of no conflict to obtain new method embodiments.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in the several product embodiments provided in this application can be combined arbitrarily without conflict to obtain a new product embodiment.
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
工业实用性Industrial Applicability
本申请实施例中,在获取到当前块的预测模式参数后,当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;确定所述第一分区的第一权重值和所述第二分区的第二权重值;再利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。这样,在帧内预测中使用不同的角度加权来处理图像块中的边界信息,能够更好地处理同一划分块中两部分不同纹理/色彩分布的边缘信息、帧内图像中锐利的物体边缘、前景与背景的交界处以及普通序列的边界信息等,使得帧内图像与帧间图像一样拥有一种用于处理边缘信息的工具,从而有效提升视频序列的编解码效率。In the embodiment of the present application, after the prediction mode parameter of the current block is obtained, when the prediction mode parameter indicates to use the INBC mode, the first target block vector information of the first partition of the current block and the second partition of the current block are determined. the second target block vector information; determine the first predicted value of the first partition according to the first target block vector information, and determine the second predicted value of the second partition according to the second target block vector information ; determine the first weight value of the first partition and the second weight value of the second partition; reuse the first predicted value, the first weight value, the second predicted value and the first predicted value The two weight values are weighted and fused to determine the intra-frame prediction value of the current block. In this way, different angle weights are used in intra prediction to process the boundary information in the image block, which can better handle the edge information of two parts of the same divided block with different texture/color distributions, sharp object edges in the intra image, The junction of the foreground and background and the boundary information of ordinary sequences, etc., make intra-frame images and inter-frame images have a tool for processing edge information, thereby effectively improving the encoding and decoding efficiency of video sequences.

Claims (35)

  1. 一种帧内预测方法,应用于编码器,所述方法包括:An intra-frame prediction method, applied to an encoder, the method comprising:
    确定当前块的预测模式参数;determine the prediction mode parameter of the current block;
    当所述预测模式参数指示使用非矩形块复制INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;When the prediction mode parameter indicates that the non-rectangular block copy INBC mode is used, determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block;
    根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;determining a first predictor of the first partition according to the first target block vector information, and determining a second predictor of the second partition according to the second target block vector information;
    确定所述第一分区的第一权重值和所述第二分区的第二权重值;determining a first weight value of the first partition and a second weight value of the second partition;
    利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
  2. 根据权利要求1所述的方法,其中,所述确定当前块的预测模式参数,包括:The method according to claim 1, wherein the determining a prediction mode parameter of the current block comprises:
    基于多种候选预测模式对所述当前块进行预编码,确定所述多种候选预测模式对应的预编码结果;Perform precoding on the current block based on multiple candidate prediction modes, and determine precoding results corresponding to the multiple candidate prediction modes;
    根据所述预编码结果,从所述多种候选预测模式中确定所述当前块的预测模式参数。According to the precoding result, a prediction mode parameter of the current block is determined from the plurality of candidate prediction modes.
  3. 根据权利要求2所述的方法,其中,所述根据所述预编码结果,从所述多种候选预测模式中确定所述当前块的预测模式参数,包括:The method according to claim 2, wherein the determining the prediction mode parameter of the current block from the multiple candidate prediction modes according to the precoding result comprises:
    基于所述预编码结果,获得所述多种候选预测模式对应的率失真代价结果;obtaining rate-distortion cost results corresponding to the multiple candidate prediction modes based on the precoding results;
    从所述率失真代价结果中选取最优率失真代价结果,将所述最优率失真代价结果对应的候选预测模式确定为所述当前块的预测模式参数。An optimal rate-distortion cost result is selected from the rate-distortion cost results, and a candidate prediction mode corresponding to the optimal rate-distortion cost result is determined as a prediction mode parameter of the current block.
  4. 根据权利要求2或3所述的方法,其中,所述多种候选预测模式包括INBC模式和普通帧内模式,所述确定当前块的预测模式参数,包括:The method according to claim 2 or 3, wherein the multiple candidate prediction modes include an INBC mode and a normal intra-frame mode, and the determining a prediction mode parameter of the current block includes:
    若所述预测模式参数指示使用INBC模式,则将INBC模式标志位设置为第一值;If the prediction mode parameter indicates that the INBC mode is used, the INBC mode flag is set to the first value;
    若所述预测模式参数指示使用普通帧内模式,则将所述INBC模式标志位设置为第二值。If the prediction mode parameter indicates that the normal intra mode is used, the INBC mode flag is set to a second value.
  5. 根据权利要求4所述的方法,其中,所述第一值为1,所述第二值为0;或者,所述第一值为true,所述第二值为flase。The method of claim 4, wherein the first value is 1 and the second value is 0; or, the first value is true and the second value is flase.
  6. 根据权利要求4所述的方法,其中,所述方法还包括:The method of claim 4, wherein the method further comprises:
    将所述INBC模式标志位写入码流。Write the INBC mode flag into the code stream.
  7. 根据权利要求1所述的方法,其中,在所述确定当前块的预测模式参数之前,所述方法还包括:The method of claim 1, wherein before said determining the prediction mode parameter of the current block, the method further comprises:
    从多种候选角度划分模式中,确定三种目标候选角度划分模式;From the multiple candidate angle division modes, determine three target candidate angle division modes;
    利用所述三种目标候选角度划分模式对所述当前块进行帧内预测,确定所述三种目标候选角度划分模式对应的预测代价结果;Intra-frame prediction is performed on the current block using the three target candidate angle division modes, and prediction cost results corresponding to the three target candidate angle division modes are determined;
    基于所述预测代价结果,从所述三种目标候选角度划分模式中确定所述当前块使用的INBC模式。Based on the prediction cost result, the INBC mode used by the current block is determined from the three target candidate angular partition modes.
  8. 根据权利要求7所述的方法,其中,所述基于所述预测代价结果,从所述三种目标候选角度划分模式中确定所述当前块使用的INBC模式,包括:The method according to claim 7, wherein the determining the INBC mode used by the current block from the three target candidate angle division modes based on the prediction cost result comprises:
    基于所述预测代价结果,获得所述三种目标候选角度划分模式对应的率失真代价结果;Based on the prediction cost results, obtain rate-distortion cost results corresponding to the three target candidate angle division modes;
    从所述率失真代价结果中选取最优率失真代价结果,将所述最优率失真代价结果对应的目标候选角度划分模式确定为所述当前块使用的INBC模式。The optimal rate-distortion cost result is selected from the rate-distortion cost results, and the target candidate angle division mode corresponding to the optimal rate-distortion cost result is determined as the INBC mode used by the current block.
  9. 根据权利要求7所述的方法,其中,所述从多种候选角度划分模式中,确定三种目标候选角度划分模式,包括:The method according to claim 7, wherein, among the multiple candidate angle division modes, three target candidate angle division modes are determined, comprising:
    基于所述多种候选角度划分模式对所述当前块进行预编码,确定所述多种候选角度划分模式对应的预编码结果;Perform precoding on the current block based on the multiple candidate angle division modes, and determine precoding results corresponding to the multiple candidate angle division modes;
    基于所述预编码结果,从所述多种候选角度划分模式中确定所述三种目标候选角度划分模式。Based on the precoding result, the three target candidate angle division modes are determined from the plurality of candidate angle division modes.
  10. 根据权利要求9所述的方法,其中,所述基于所述预编码结果,从所述多种候选角度划分模式中确定所述三种目标候选角度划分模式,包括:The method according to claim 9, wherein the determining the three target candidate angle division modes from the plurality of candidate angle division modes based on the precoding result comprises:
    基于所述预编码结果,获得所述多种候选角度划分模式对应的绝对变换差和SATD代价结果;Based on the precoding result, obtain absolute transform difference and SATD cost results corresponding to the multiple candidate angle division modes;
    从所述SATD代价结果中选取相对较优的三个SATD代价结果,将所述三个SATD代价结果对应的候选角度划分模式确定为所述三种目标候选角度划分模式。Three relatively superior SATD cost results are selected from the SATD cost results, and the candidate angle division modes corresponding to the three SATD cost results are determined as the three target candidate angle division modes.
  11. 根据权利要求9所述的方法,其中,所述基于所述多种候选角度划分模式对所述当前块进行预编码,确定所述多种候选角度划分模式对应的预编码结果,包括:The method according to claim 9, wherein the performing precoding on the current block based on the multiple candidate angle division modes, and determining the precoding results corresponding to the multiple candidate angle division modes, comprises:
    基于多种候选角度划分模式,确定每一候选角度划分模式下所述当前块的第一分区和第二分区;determining a first partition and a second partition of the current block in each candidate angular partition mode based on multiple candidate angular partition modes;
    确定每一候选角度划分模式下所述第一分区的第一目标块矢量信息以及所述第二分区的第二目标 块矢量信息;determining the first target block vector information of the first partition and the second target block vector information of the second partition under each candidate angle division mode;
    根据每一候选角度划分模式下所述第一分区的第一目标块矢量信息以及所述第二分区的第二目标块矢量信息对所述当前块进行预编码,得到所述多种候选角度划分模式对应的预编码结果。Precoding the current block according to the first target block vector information of the first partition and the second target block vector information of the second partition in each candidate angle division mode, to obtain the multiple candidate angle divisions The precoding result corresponding to the mode.
  12. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, wherein the method further comprises:
    构建块矢量候选列表,所述块矢量候选列表包括至少一个块矢量。A block vector candidate list is constructed, the block vector candidate list including at least one block vector.
  13. 根据权利要求12所述的方法,其中,所述构建块矢量候选列表,包括:The method of claim 12, wherein the building block vector candidate list comprises:
    获取历史的块矢量预测信息;Obtain historical block vector prediction information;
    基于所述历史的块矢量预测信息,确定所述块矢量候选列表。The block vector candidate list is determined based on the historical block vector prediction information.
  14. 根据权利要求13所述的方法,其中,所述基于所述历史的块矢量预测信息,确定所述块矢量候选列表,包括:The method of claim 13, wherein the determining the block vector candidate list based on the historical block vector prediction information comprises:
    若已编码块的尺寸参数大于或大于预设尺寸参数,则将所述已编码块的块矢量存储在所述块矢量候选列表的第零位;以及If the size parameter of the coded block is greater than or greater than the preset size parameter, storing the block vector of the coded block in the zeroth bit of the block vector candidate list; and
    若已编码块在所述历史的块矢量预测信息中出现的次数大于或等于预设次数,则将所述已编码块的块矢量存储在所述块矢量候选列表的第一位;以及If the number of occurrences of the coded block in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the coded block in the first position of the block vector candidate list; and
    将所述当前块的左侧已编码相邻块、上侧已编码相邻块、左上已编码相邻块、右上已编码相邻块和左下已编码相邻块的块矢量分别存储在所述块矢量候选列表的第二位、第三位、第四位、第五位和第六位;Store the block vectors of the coded adjacent blocks on the left side, the coded adjacent blocks on the upper side, the coded adjacent blocks on the upper left, the coded adjacent blocks on the upper right, and the coded adjacent blocks on the lower left of the current block respectively in the the second, third, fourth, fifth and sixth bits of the block vector candidate list;
    基于所述块矢量候选列表中的第零位、第一位、第二位、第三位、第四位、第五位和第六位所存储的块矢量,得到所述块矢量候选列表。The block vector candidate list is obtained based on the block vectors stored in the zeroth bit, the first bit, the second bit, the third bit, the fourth bit, the fifth bit and the sixth bit in the block vector candidate list.
  15. 根据权利要求12所述的方法,其中,所述确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息,包括:The method according to claim 12, wherein the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block comprises:
    基于所述INBC模式,确定所述当前块划分后的所述第一分区和所述第二分区;determining the first partition and the second partition after the current block is divided based on the INBC mode;
    建立预设哈希表,对所述第一分区和所述第二分区进行帧内块复制搜索,从所述块矢量候选列表中选取与所述第一分区的哈希键值匹配的第一一块矢量信息以及与所述第二分区的哈希键值匹配的第二一块矢量信息;Establishing a preset hash table, performing an intra-frame block copy search on the first partition and the second partition, and selecting the first partition matching the hash key value of the first partition from the block vector candidate list a piece of vector information and a second piece of vector information that matches the hash key value of the second partition;
    遍历所述块矢量候选列表中的至少一个块矢量,计算所述第一分区关于所述至少一个块矢量对应的第一代价结果以及所述第二分区关于所述至少一个块矢量对应的第二代价结果;Traverse at least one block vector in the block vector candidate list, and calculate a first cost result corresponding to the at least one block vector of the first partition and a second cost result of the second partition corresponding to the at least one block vector result of consideration;
    从所述第一代价结果中选取最优代价结果,将所述最优代价结果对应的块矢量确定为所述第一分区的第一二块矢量信息;以及从所述第二代价结果中选取最优代价结果,将所述最优代价结果对应的块矢量确定为所述第二分区的第二二块矢量信息;Select the optimal cost result from the first cost result, determine the block vector corresponding to the optimal cost result as the first and second block vector information of the first partition; and select from the second cost result the optimal cost result, determining the block vector corresponding to the optimal cost result as the second two-block vector information of the second partition;
    从所述第一一块矢量信息和所述第一二块矢量信息中,将代价结果最优的块矢量信息确定为所述第一分区的第一目标块矢量信息;以及From the first block of vector information and the first two blocks of vector information, determining the block vector information with the best cost result as the first target block vector information of the first partition; and
    从所述第二一块矢量信息和所述第二二块矢量信息中,将代价结果最优的块矢量信息确定为所述第二分区的第二目标块矢量信息。From the second block vector information and the second two-block vector information, the block vector information with the best cost result is determined as the second target block vector information of the second partition.
  16. 根据权利要求15所述的方法,其中,所述确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息,包括:The method according to claim 15, wherein the determining the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block comprises:
    若所述第一目标块矢量信息和所述第二目标块矢量信息中至少之一属于非合法块矢量信息,则确定预设搜索范围;在所述块矢量候选列表中,根据所述预设搜索范围分别按照顺序对所述第一分区和所述第二分区进行逐像素的块矢量搜索,得到第一块矢量信息和第二块矢量信息;If at least one of the first target block vector information and the second target block vector information belongs to illegal block vector information, a preset search range is determined; in the block vector candidate list, according to the preset The search range respectively performs pixel-by-pixel block vector search on the first partition and the second partition in order to obtain the first block vector information and the second block vector information;
    将所得到的第一块矢量信息和第二块矢量信息确定为所述第一目标块矢量信息和所述第二目标块矢量信息。The obtained first block vector information and second block vector information are determined as the first target block vector information and the second target block vector information.
  17. 根据权利要求1所述的方法,其中,在确定所述第一目标块矢量信息和所述第二目标块矢量信息之后,所述方法还包括:The method according to claim 1, wherein after determining the first target block vector information and the second target block vector information, the method further comprises:
    确定第一块矢量索引序号,所述第一块矢量索引序号用于指示所述第一目标块矢量信息在所述块矢量候选列表中对应的索引序号;determining a first block vector index number, where the first block vector index number is used to indicate an index number corresponding to the first target block vector information in the block vector candidate list;
    确定第二块矢量索引序号,所述第二块矢量索引序号用于指示所述第二目标块矢量信息在所述块矢量候选列表中对应的索引序号;determining a second block vector index number, where the second block vector index number is used to indicate the index number corresponding to the second target block vector information in the block vector candidate list;
    将所述第一块矢量索引序号和所述第二块矢量索引序号写入码流。Write the first block vector index number and the second block vector index number into the code stream.
  18. 根据权利要求1至17任一项所述的方法,其中,所述根据所述第一目标块矢量信息确定所述第一分区的第一预测值,包括:The method according to any one of claims 1 to 17, wherein the determining the first predicted value of the first partition according to the first target block vector information comprises:
    根据所述第一目标块矢量信息对所述第一分区进行运动补偿,得到所述第一分区的预测值。Motion compensation is performed on the first partition according to the first target block vector information to obtain a predicted value of the first partition.
  19. 根据权利要求1至17任一项所述的方法,其中,所述根据所述第二目标块矢量信息确定所述 第二分区的第二预测值,包括:The method according to any one of claims 1 to 17, wherein the determining the second predicted value of the second partition according to the second target block vector information comprises:
    根据所述第二目标块矢量信息对所述第二分区进行运动补偿,得到所述第二分区的预测值。Motion compensation is performed on the second partition according to the second target block vector information to obtain a predicted value of the second partition.
  20. 根据权利要求1至17任一项所述的方法,其中,所述确定所述第一分区的第一权重值和所述第二分区的第二权重值,包括:The method according to any one of claims 1 to 17, wherein the determining the first weight value of the first partition and the second weight value of the second partition comprises:
    基于所述INBC模式,确定角度划分模式索引序号;Based on the INBC mode, determine the index number of the angle division mode;
    根据所述角度划分模式索引序号,利用第一计算模型得到映射角度值;According to the angle division mode index sequence number, the first calculation model is used to obtain the mapping angle value;
    根据所述映射角度值,利用第二计算模型得到斜率归类索引值;According to the mapping angle value, using the second calculation model to obtain the slope classification index value;
    根据所述映射角度值,利用第三计算模型得到角度所属分区值;According to the mapping angle value, the third calculation model is used to obtain the partition value to which the angle belongs;
    基于所述斜率归类索引值以及所述角度所属分区值,利用预设权重计算模型得到所述第一分区的第一权重值和所述第二分区的第二权重值。Based on the slope classification index value and the partition value to which the angle belongs, a preset weight calculation model is used to obtain a first weight value of the first partition and a second weight value of the second partition.
  21. 根据权利要求20所述的方法,其中,在确定角度划分模式索引序号之后,所述方法还包括:The method according to claim 20, wherein after determining the index number of the angle division mode, the method further comprises:
    将所述角度划分模式索引序号写入码流。Write the index number of the angle division mode into the code stream.
  22. 一种帧内预测方法,应用于解码器,所述方法包括:An intra-frame prediction method, applied to a decoder, the method comprising:
    解析码流,获取当前块的预测模式参数;Parse the code stream to obtain the prediction mode parameters of the current block;
    当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;When the prediction mode parameter indicates that the INBC mode is used, the code stream is parsed, and the first block vector index number and the second block vector index number are obtained;
    基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息;Based on the block vector candidate list, determine the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the second block vector index number in the block vector candidate list. the second target block vector information of the second partition of the corresponding current block in the block vector candidate list;
    根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;determining a first predictor of the first partition according to the first target block vector information, and determining a second predictor of the second partition according to the second target block vector information;
    确定所述第一分区的第一权重值和所述第二分区的第二权重值;determining a first weight value of the first partition and a second weight value of the second partition;
    利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。Weighted fusion is performed using the first predicted value, the first weighted value, the second predicted value and the second weighted value to determine the intra-frame predicted value of the current block.
  23. 根据权利要求22所述的方法,其中,所述解析码流,获取当前块的预测模式参数,包括:The method according to claim 22, wherein the parsing the code stream to obtain the prediction mode parameter of the current block comprises:
    解析码流,获取INBC模式标志位;Parse the stream to get the INBC mode flag;
    若所述INBC模式标志位为第一值,则确定所述当前块使用INBC模式;If the INBC mode flag bit is the first value, then determine that the current block uses the INBC mode;
    若所述INBC模式标志位为第二值,则确定所述当前块使用普通帧内模式。If the INBC mode flag bit is the second value, it is determined that the current block uses the normal intra mode.
  24. 根据权利要求23所述的方法,其中,所述第一值为1,所述第二值为0;或者,所述第一值为true,所述第二值为flase。The method of claim 23, wherein the first value is 1 and the second value is 0; or, the first value is true and the second value is flase.
  25. 根据权利要求22所述的方法,其中,所述方法还包括:The method of claim 22, wherein the method further comprises:
    构建所述块矢量候选列表,所述块矢量候选列表包括至少一个块矢量。The block vector candidate list is constructed, the block vector candidate list including at least one block vector.
  26. 根据权利要求25所述的方法,其中,所述构建所述块矢量候选列表,包括:The method of claim 25, wherein the constructing the block vector candidate list comprises:
    获取历史的块矢量预测信息;Obtain historical block vector prediction information;
    基于所述历史的块矢量预测信息,确定所述块矢量候选列表。The block vector candidate list is determined based on the historical block vector prediction information.
  27. 根据权利要求26所述的方法,其中,所述基于所述历史的块矢量预测信息,确定所述块矢量候选列表,包括:The method of claim 26, wherein the determining the block vector candidate list based on the historical block vector prediction information comprises:
    若已解码块的尺寸参数大于或大于预设尺寸参数,则将所述已解码块的块矢量存储在所述块矢量候选列表的第零位;以及If the size parameter of the decoded block is greater than or greater than a preset size parameter, storing the block vector of the decoded block in the zeroth bit of the block vector candidate list; and
    若已解码块在所述历史的块矢量预测信息中出现的次数大于或等于预设次数,则将所述已解码块的块矢量存储在所述块矢量候选列表的第一位;以及If the number of times the decoded block appears in the historical block vector prediction information is greater than or equal to a preset number of times, storing the block vector of the decoded block in the first position of the block vector candidate list; and
    将所述当前块的左侧已解码相邻块、上侧已解码相邻块、左上已解码相邻块、右上已解码相邻块和左下已解码相邻块的块矢量分别存储在所述块矢量候选列表的第二位、第三位、第四位、第五位和第六位;Store the block vectors of the decoded adjacent blocks on the left side of the current block, the decoded adjacent blocks on the upper side, the decoded adjacent blocks on the upper left, the decoded adjacent blocks on the upper right, and the decoded adjacent blocks on the lower left in the the second, third, fourth, fifth and sixth bits of the block vector candidate list;
    基于所述块矢量候选列表中的第零位、第一位、第二位、第三位、第四位、第五位和第六位所存储的块矢量,得到所述块矢量候选列表。The block vector candidate list is obtained based on the block vectors stored in the zeroth bit, the first bit, the second bit, the third bit, the fourth bit, the fifth bit and the sixth bit in the block vector candidate list.
  28. 根据权利要求22至27任一项所述的方法,其中,所述根据所述第一目标块矢量信息确定所述第一分区的第一预测值,包括:The method according to any one of claims 22 to 27, wherein the determining the first predicted value of the first partition according to the first target block vector information comprises:
    根据所述第一目标块矢量信息对所述第一分区进行运动补偿,得到所述第一分区的预测值。Motion compensation is performed on the first partition according to the first target block vector information to obtain a predicted value of the first partition.
  29. 根据权利要求22至27任一项所述的方法,其中,所述根据所述第二目标块矢量信息确定所述第二分区的第二预测值,包括:The method according to any one of claims 22 to 27, wherein the determining the second predicted value of the second partition according to the second target block vector information comprises:
    根据所述第二目标块矢量信息对所述第二分区进行运动补偿,得到所述第二分区的预测值。Motion compensation is performed on the second partition according to the second target block vector information to obtain a predicted value of the second partition.
  30. 根据权利要求22至27任一项所述的方法,其中,所述确定所述第一分区的第一权重值和所述第二分区的第二权重值,包括:The method according to any one of claims 22 to 27, wherein the determining the first weight value of the first partition and the second weight value of the second partition comprises:
    解析码流,获取角度划分模式索引序号;Parse the code stream and obtain the index number of the angle division mode;
    根据所述角度划分模式索引序号,利用第一计算模型得到映射角度值;According to the angle division mode index sequence number, the first calculation model is used to obtain the mapping angle value;
    根据所述映射角度值,利用第二计算模型得到斜率归类索引值;According to the mapping angle value, using the second calculation model to obtain the slope classification index value;
    根据所述映射角度值,利用第三计算模型得到角度所属分区值;According to the mapping angle value, the third calculation model is used to obtain the partition value to which the angle belongs;
    基于所述斜率归类索引值以及所述角度所属分区值,利用预设权重计算模型得到所述第一分区的第一权重值和所述第二分区的第二权重值。Based on the slope classification index value and the partition value to which the angle belongs, a preset weight calculation model is used to obtain a first weight value of the first partition and a second weight value of the second partition.
  31. 一种编码器,所述编码器包括第一确定单元、第一计算单元和第一预测单元;其中,An encoder comprising a first determination unit, a first calculation unit and a first prediction unit; wherein,
    所述第一确定单元,配置为确定当前块的预测模式参数;the first determining unit, configured to determine the prediction mode parameter of the current block;
    所述第一确定单元,还配置为当所述预测模式参数指示使用INBC模式时,确定当前块的第一分区的第一目标块矢量信息和当前块的第二分区的第二目标块矢量信息;The first determining unit is further configured to, when the prediction mode parameter indicates to use the INBC mode, determine the first target block vector information of the first partition of the current block and the second target block vector information of the second partition of the current block ;
    所述第一计算单元,配置为根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;以及确定所述第一分区的第一权重值和所述第二分区的第二权重值;The first calculation unit is configured to determine a first prediction value of the first partition according to the first target block vector information, and determine a second prediction value of the second partition according to the second target block vector information value; and determining a first weight value for the first partition and a second weight value for the second partition;
    所述第一预测单元,配置为利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。The first prediction unit is configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra prediction of the current block value.
  32. 一种编码器,所述编码器包括第一存储器和第一处理器;其中,An encoder comprising a first memory and a first processor; wherein,
    所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;the first memory for storing a computer program executable on the first processor;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求1至21任一项所述的方法。The first processor is configured to execute the method according to any one of claims 1 to 21 when running the computer program.
  33. 一种解码器,所述解码器包括解析单元、第二确定单元、第二计算单元和第二预测单元;其中,A decoder, the decoder includes a parsing unit, a second determination unit, a second calculation unit and a second prediction unit; wherein,
    所述解析单元,配置为解析码流,获取当前块的预测模式参数;以及还配置为当所述预测模式参数指示使用INBC模式时,解析码流,获取第一块矢量索引序号和第二块矢量索引序号;The parsing unit is configured to parse the code stream to obtain the prediction mode parameter of the current block; and is also configured to parse the code stream when the prediction mode parameter indicates to use the INBC mode, to obtain the first block vector index number and the second block vector index number;
    所述第二确定单元,配置为基于块矢量候选列表,确定所述第一块矢量索引序号在所述块矢量候选列表中对应的当前块的第一分区的第一目标块矢量信息,以及所述第二块矢量索引序号在所述块矢量候选列表中对应的当前块的第二分区的第二目标块矢量信息;The second determining unit is configured to, based on the block vector candidate list, determine the first target block vector information of the first partition of the current block corresponding to the first block vector index number in the block vector candidate list, and the the second target block vector information of the second partition of the current block corresponding to the second block vector index number in the block vector candidate list;
    所述第二计算单元,配置为根据所述第一目标块矢量信息确定所述第一分区的第一预测值,以及根据所述第二目标块矢量信息确定所述第二分区的第二预测值;以及确定所述第一分区的第一权重值和所述第二分区的第二权重值;The second calculation unit is configured to determine a first prediction value of the first partition according to the first target block vector information, and determine a second prediction value of the second partition according to the second target block vector information value; and determining a first weight value for the first partition and a second weight value for the second partition;
    所述第二预测单元,配置为利用所述第一预测值、所述第一权重值、所述第二预测值和所述第二权重值进行加权融合,确定所述当前块的帧内预测值。the second prediction unit, configured to perform weighted fusion by using the first prediction value, the first weight value, the second prediction value and the second weight value to determine the intra prediction of the current block value.
  34. 一种解码器,所述解码器包括第二存储器和第二处理器;其中,A decoder comprising a second memory and a second processor; wherein,
    所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;the second memory for storing a computer program executable on the second processor;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求22至30任一项所述的方法。The second processor is configured to execute the method according to any one of claims 22 to 30 when running the computer program.
  35. 一种计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如权利要求1至21任一项所述的方法、或者被第二处理器执行时实现如权利要求22至30任一项所述的方法。A computer storage medium, wherein the computer storage medium stores a computer program, which when executed by a first processor implements the method according to any one of claims 1 to 21, or is executed by a second processor A method as claimed in any one of claims 22 to 30 is implemented when executed.
PCT/CN2020/129266 2020-11-17 2020-11-17 Intra-frame prediction method, encoder, decoder and computer storage medium WO2022104498A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080083248.2A CN114830651A (en) 2020-11-17 2020-11-17 Intra prediction method, encoder, decoder, and computer storage medium
PCT/CN2020/129266 WO2022104498A1 (en) 2020-11-17 2020-11-17 Intra-frame prediction method, encoder, decoder and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/129266 WO2022104498A1 (en) 2020-11-17 2020-11-17 Intra-frame prediction method, encoder, decoder and computer storage medium

Publications (1)

Publication Number Publication Date
WO2022104498A1 true WO2022104498A1 (en) 2022-05-27

Family

ID=81707936

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/129266 WO2022104498A1 (en) 2020-11-17 2020-11-17 Intra-frame prediction method, encoder, decoder and computer storage medium

Country Status (2)

Country Link
CN (1) CN114830651A (en)
WO (1) WO2022104498A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114885164A (en) * 2022-07-12 2022-08-09 深圳比特微电子科技有限公司 Method and device for determining intra-frame prediction mode, electronic equipment and storage medium
CN116156174A (en) * 2023-02-23 2023-05-23 格兰菲智能科技有限公司 Data encoding processing method, device, computer equipment and storage medium
CN116456100A (en) * 2023-06-16 2023-07-18 深流微智能科技(深圳)有限公司 Inter-frame coding tree unit division method and device
CN116668704A (en) * 2023-08-02 2023-08-29 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium
WO2024007128A1 (en) * 2022-07-04 2024-01-11 Oppo广东移动通信有限公司 Video encoding and decoding methods, apparatus, and devices, system, and storage medium
WO2024022325A1 (en) * 2022-07-27 2024-02-01 Mediatek Inc. Method and apparatus of improving performance of convolutional cross-component model in video coding system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375764A (en) * 2016-08-31 2017-02-01 中国科学技术大学 Directional intra prediction and block copy prediction combined video intra coding method
CN110063056A (en) * 2016-12-07 2019-07-26 株式会社Kt Method and apparatus for handling vision signal
US20200120334A1 (en) * 2018-10-10 2020-04-16 Tencent America LLC Method and apparatus for intra block copy in intra-inter blending mode and triangle prediction unit mode
CN111630858A (en) * 2018-11-16 2020-09-04 北京字节跳动网络技术有限公司 Combining weights in inter-frame intra prediction modes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375764A (en) * 2016-08-31 2017-02-01 中国科学技术大学 Directional intra prediction and block copy prediction combined video intra coding method
CN110063056A (en) * 2016-12-07 2019-07-26 株式会社Kt Method and apparatus for handling vision signal
US20200120334A1 (en) * 2018-10-10 2020-04-16 Tencent America LLC Method and apparatus for intra block copy in intra-inter blending mode and triangle prediction unit mode
CN111630858A (en) * 2018-11-16 2020-09-04 北京字节跳动网络技术有限公司 Combining weights in inter-frame intra prediction modes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
H. CHEN (HUAWEI), H. YANG (HUAWEI): "Non-CE8: On IBC motion vector list construction", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-O0162 ; m48255, 25 June 2019 (2019-06-25), XP030218736 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024007128A1 (en) * 2022-07-04 2024-01-11 Oppo广东移动通信有限公司 Video encoding and decoding methods, apparatus, and devices, system, and storage medium
CN114885164A (en) * 2022-07-12 2022-08-09 深圳比特微电子科技有限公司 Method and device for determining intra-frame prediction mode, electronic equipment and storage medium
WO2024022325A1 (en) * 2022-07-27 2024-02-01 Mediatek Inc. Method and apparatus of improving performance of convolutional cross-component model in video coding system
CN116156174A (en) * 2023-02-23 2023-05-23 格兰菲智能科技有限公司 Data encoding processing method, device, computer equipment and storage medium
CN116156174B (en) * 2023-02-23 2024-02-13 格兰菲智能科技有限公司 Data encoding processing method, device, computer equipment and storage medium
CN116456100A (en) * 2023-06-16 2023-07-18 深流微智能科技(深圳)有限公司 Inter-frame coding tree unit division method and device
CN116456100B (en) * 2023-06-16 2023-08-29 深流微智能科技(深圳)有限公司 Inter-frame coding tree unit division method and device
CN116668704A (en) * 2023-08-02 2023-08-29 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium
CN116668704B (en) * 2023-08-02 2024-02-06 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium

Also Published As

Publication number Publication date
CN114830651A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
WO2022104498A1 (en) Intra-frame prediction method, encoder, decoder and computer storage medium
RU2683165C1 (en) Intra block copy prediction with asymmetric partitions and encoder-side search patterns, search ranges and approaches to partitioning
US20200404326A1 (en) Method and device for intra-prediction
WO2021004152A1 (en) Image component prediction method, encoder, decoder, and storage medium
WO2021139572A1 (en) Encoding method, decoding method, encoder, decoder, and storage medium
WO2022087901A1 (en) Image prediction method, encoder, decoder, and computer storage medium
WO2022227622A1 (en) Weight-configurable inter-frame and intra-frame joint prediction coding and decoding methods and devices
CN113068026B (en) Coding prediction method, device and computer storage medium
CN117280691A (en) Enhanced motion vector prediction
WO2022116246A1 (en) Inter-frame prediction method, video encoding and decoding method, apparatus, and medium
AU2019357929A1 (en) Video image component prediction method and apparatus, and computer storage medium
KR20190140820A (en) A method and an apparatus for processing a video signal based on reference between components
CN113395520B (en) Decoding prediction method, device and computer storage medium
WO2021134303A1 (en) Transform method, encoder, decoder, and storage medium
CN116982262A (en) State transition for dependent quantization in video coding
WO2021134327A1 (en) Transformation method, encoder, decoder, and storage medium
WO2020258052A1 (en) Image component prediction method and device, and computer storage medium
WO2020056767A1 (en) Video image component prediction method and apparatus, and computer storage medium
WO2022266971A1 (en) Encoding method, decoding method, encoder, decoder and computer storage medium
CN113347438B (en) Intra-frame prediction method and device, video encoding device and storage medium
WO2023197195A1 (en) Video encoding and decoding method, encoder, decoder and storage medium
WO2023123736A1 (en) Communication method, apparatus, device, system, and storage medium
WO2022140905A1 (en) Prediction methods, encoder, decoder, and storage medium
WO2023065890A1 (en) Multimedia data processing method and apparatus, computer device, computer readable storage medium, and computer program product
WO2023231008A1 (en) Encoding and decoding method, 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: 20961790

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

Country of ref document: EP

Kind code of ref document: A1