WO2024077572A1 - 编解码方法、编码器、解码器以及存储介质 - Google Patents
编解码方法、编码器、解码器以及存储介质 Download PDFInfo
- Publication number
- WO2024077572A1 WO2024077572A1 PCT/CN2022/125219 CN2022125219W WO2024077572A1 WO 2024077572 A1 WO2024077572 A1 WO 2024077572A1 CN 2022125219 W CN2022125219 W CN 2022125219W WO 2024077572 A1 WO2024077572 A1 WO 2024077572A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- bvd
- candidate
- current block
- list
- symbol
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
- H04N19/517—Processing of motion vectors by encoding
- H04N19/52—Processing of motion vectors by encoding by predictive encoding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/86—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
Definitions
- the embodiments of the present application relate to the field of image processing technology, and in particular to a coding and decoding method, an encoder, a decoder, and a storage medium.
- H.265/High Efficiency Video Coding HEVC
- JVET Joint Video Exploration Team
- VVC VVC Reference software test platform
- Intrablockcopy is an extended tool of VVC for the coding of screen content type video sequences (Screen content coding), which significantly improves the coding efficiency of screen content sequences.
- the transmission method of the symbol information of the block vector difference (BVD) is often more complicated, which increases the transmission bit rate to a certain extent, thereby reducing the coding performance of the IBC mode.
- the embodiments of the present application provide a coding and decoding method, an encoder, a decoder, and a storage medium, which can effectively save the code rate required for symbol transmission of BVD in the IBC mode, thereby improving the coding efficiency.
- an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
- Sorting candidate BVDs of the current block according to the absolute value of the BVD of the current block to determine a sorting result
- a reconstruction value of the current block is determined according to the BVD of the current block.
- an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
- Sorting candidate BVDs of the current block according to the absolute value of the BVD of the current block to determine a sorting result
- the BVD absolute value and the BVD symbol index information are written into the bitstream.
- an encoder comprising a first determining unit and an encoding unit; wherein:
- the first determining unit is configured to sort the candidate BVDs of the current block according to the BVD absolute value of the current block to determine a sorting result; determine the BVD symbol index information of the current block according to the BVD symbol information of the current block and the sorting result;
- the encoding unit is configured to write the BVD absolute value and the BVD symbol index information into a bit stream.
- an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein,
- the first memory is used to store a computer program that can be run on the first processor
- the first processor is used to execute the method as described in the second aspect when running the computer program.
- an embodiment of the present application provides a decoder, the decoder comprising a decoding unit and a second determining unit; wherein:
- the decoding unit is configured to decode the code stream
- the second determining unit is configured to determine the BVD absolute value and BVD symbol index information of the current block
- the candidate BVDs of the current block are sorted to determine the sorting result; according to the BVD symbol index information and the sorting result, the BVD of the current block is determined; according to the BVD of the current block, the reconstruction value of the current block is determined.
- an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:
- the second memory is used to store a computer program that can be run on the second processor
- the second processor is used to execute the method as described in the first aspect when running the computer program.
- an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the method as described in the first aspect is implemented, or the method as described in the second aspect is implemented.
- the embodiment of the present application provides a coding and decoding method, an encoder, a decoder, and a storage medium.
- the code stream is decoded to determine the BVD absolute value and BVD symbol index information of the current block; the candidate BVDs of the current block are sorted according to the BVD absolute value of the current block to determine the sorting result; the BVD of the current block is determined according to the BVD symbol index information and the sorting result; the reconstruction value of the current block is determined according to the BVD of the current block.
- the candidate BVDs of the current block are sorted according to the BVD absolute value of the current block to determine the sorting result; the BVD symbol index information of the current block is determined according to the BVD symbol information and the sorting result of the current block; and the BVD absolute value and BVD symbol index information are written into the code stream.
- the candidate BVDs of the current block can be effectively sorted according to the absolute value of the BVD of the current block, so that the sorting result can be used to determine and transmit the BVD symbol index information during encoding, and the sorting result can be used to parse the BVD symbol information of the current block during decoding.
- the CABAC encoding and decoding technology can be used to encode and decode the BVD symbol information, which can effectively save the code rate required for the symbol transmission of the BVD in the IBC mode, thereby improving the encoding efficiency.
- Figure 1 is a schematic diagram of the prediction of the IBC model
- FIG2 is a schematic diagram of adjacent blocks
- FIG3 is a block diagram of a video encoding system provided by an embodiment of the present application.
- FIG4 is a block diagram of a video decoding system provided by an embodiment of the present application.
- FIG5 is a schematic diagram 1 of a decoding method in an embodiment of the present application.
- FIG6 is a schematic diagram of template types
- FIG7 is a schematic diagram of the BVP and BVD of the current coding block
- FIG8 is a schematic diagram of template motion compensation
- FIG9 is a schematic diagram of a BVD combination
- FIG10 is a second schematic diagram of a decoding method in an embodiment of the present application.
- FIG11 is a schematic diagram of calculating cost
- FIG12 is a schematic diagram 1 of the encoding method in an embodiment of the present application.
- FIG13 is a second schematic diagram of the encoding method in an embodiment of the present application.
- FIG14 is a schematic diagram of the structure of the encoder
- FIG15 is a second schematic diagram of the structure of the encoder
- FIG16 is a schematic diagram of the structure of a decoder
- FIG. 17 is a second schematic diagram of the composition structure of the decoder.
- a first image component, a second image component and a third image component are generally used to represent a coding block (Codingblock, CB); wherein the three image components are a brightness component, a blue chrominance component and a red chrominance component, respectively.
- the brightness 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; thus, the video image can be represented in the YCbCr format or in the YUV format.
- the first image component may be a brightness component
- the second image component may be a blue chrominance component
- the third image component may be a red chrominance component
- the general video codec standards are based on a block-based hybrid coding framework.
- Each frame in the video image is divided into square largest coding units (LCU) or coding tree units (CTU) of the same size (such as 128 ⁇ 128, 64 ⁇ 64, etc.), and each largest coding unit or coding tree unit can be divided into rectangular coding units (CU) according to rules; and coding units may be divided into smaller prediction units (PU), transform units (TU), etc.
- LCU square largest coding units
- CTU coding tree units
- CU rectangular coding units
- coding units may be divided into smaller prediction units (PU), transform units (TU), etc.
- the hybrid coding framework may include modules such as prediction, transform, quantization, entropy coding, and inloop filter.
- the prediction module may include intra prediction and inter prediction
- inter prediction may include motion estimation and motion compensation. Since there is a strong correlation between adjacent pixels in a frame of a video image, the use of intra prediction in video coding and decoding technology can eliminate the spatial redundancy between adjacent pixels; however, since there is also a strong similarity between adjacent frames in a video image, the use of inter prediction in video coding and decoding technology can eliminate the temporal redundancy between adjacent frames, thereby improving coding and decoding efficiency.
- the basic process of video codec is as follows: at the encoding end, a frame of image is divided into blocks, intra-frame prediction or inter-frame prediction is used for the current block to generate the prediction block of the current block, the original block of the current block minus the prediction block to obtain the residual block, the residual block is transformed and quantized to obtain the quantization coefficient matrix, and the quantization coefficient matrix is entropy encoded and output to the bitstream.
- intra-frame prediction or inter-frame prediction is used for the current block to generate the prediction block of the current block, and on the other hand, the bitstream is decoded to obtain the quantization coefficient matrix, the quantization coefficient matrix is inversely quantized and inversely transformed to obtain the residual block, and the prediction block and the residual block are added to obtain the reconstructed block.
- the reconstructed blocks constitute the reconstructed image, and the reconstructed image is loop-filtered based on the image or block to obtain the decoded image.
- the encoding end also needs to perform similar operations as the decoding end to obtain the decoded image.
- the decoded image can be used as a reference frame for inter-frame prediction for subsequent frames.
- the decoding end determines the same block division information as the encoding end by decoding and analyzing the existing information, and the mode information or parameter information such as prediction, transformation, quantization, entropy coding, loop filtering, etc., so as to ensure that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end.
- the decoded image obtained by the encoding end is also usually called a reconstructed image.
- the current block can be divided into prediction units during prediction, and the current block can be divided into transformation units during transformation.
- the division of prediction units and transformation units can be different.
- the above is the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process may be optimized.
- the embodiment of the present application is applicable to the basic process of the video codec under the block-based hybrid coding framework, but is not limited to the framework and process.
- the current block (CB) may be a current coding unit (CU) or a current prediction unit (PU), etc.
- Intrablockcopy is an extended tool of VVC for the coding of video sequences of screen content type (Screen content coding), which significantly improves the coding efficiency of screen content sequences.
- IBC is a block-level coding mode. Similar to inter-frame technology, the encoder performs motion search, namely block matching (BM), to find the best block vector (BV), also known as motion vector (MV), for each CU.
- BV block matching
- MV motion vector
- the block vector is a vector pointing from the current block to the reference block.
- the difference from inter-frame technology is that the best block vector of IBC is obtained by searching in the reconstructed area of the frame where the current CU is located (i.e., the current coded frame), while the inter-frame motion vector is obtained by searching the adjacent reference frames of the current coded frame in the time domain.
- Figure 1 is a prediction diagram of the IBC mode.
- the specific process of obtaining the reconstructed pixels of the current coding block in the IBC mode in H.266/VVC may include deriving BV, deriving prediction samples using BV, deriving residual samples, and deriving reconstructed samples using the prediction samples and the residual samples.
- Input luma position (xCb, yCb), which specifies the top left corner sample of the current coding block relative to the top left corner luma sample of the current picture, a variable cbWidth, which specifies the width of the current coding block in luma samples, and a variable cbHeight, which specifies the height of the current coding block in luma samples.
- the IBC mode is divided into IBCMERGE and IBCAMVP.
- IBCMERGE When deriving bvL, it is necessary to establish an IBC block vector candidate list bvCandList.
- the following introduces the list establishment process of IBCMERGE.
- the list establishment process of IBCAMVP is consistent with IBCMERGE, but the maximum number of candidates of the two is inconsistent.
- Step 1 When IsGt4by4 is equal to TRUE (the variable IsGt4by4 is the brightness width multiplied by the height, and is TRUE when IsGt4by4 is greater than 16), the derivation process of the spatial block vector candidate from the adjacent coding unit specified in the decoding specification is called using the brightness coding block position (xCb, yCb), the brightness coding block width cbWidth and the height cbHeight as input, and the output is the availability flags availableFlagA1, availableFlagB1 and the block vectors bvA1 and bvB1.
- A1 and B1 are adjacent blocks.
- Figure 2 is a schematic diagram of adjacent blocks. As shown in Figure 2, the relative positions of the adjacent blocks where A1 and B1 are located and the current coding block are the lower left corner and the upper right corner, respectively.
- Step 2 When IsGt4by4 is equal to TRUE, the block vector candidate list bvCandList is constructed as follows:
- Step 3 The variable numCurrCand represents the number of candidates currently obtained.
- the derivation process of numCurrCand is as follows:
- numCurrCand is set equal to the number of candidates in bvCandList; otherwise numCurrCand is set to 0.
- Step 4 When numCurrCand is less than MaxNumIbcMergeCand (the maximum number of candidates in MERGE mode) and NumHmvpIbcCand (the maximum number of candidates representing the historical optimal block vector (Hmvp) in IBC mode) is greater than 0, the derivation process of the historical IBC block vector candidate specified in the decoding specification is called with bvCandList and numCurrCand as input and the modified bvCandList and numCurrCand as output.
- MaxNumIbcMergeCand the maximum number of candidates in MERGE mode
- NumHmvpIbcCand the maximum number of candidates representing the historical optimal block vector (Hmvp) in IBC mode
- bvCandList[numCurrCand][0] (ie, the horizontal component of bv) is set equal to 0.
- bvCandList[numCurrCand][1] ie, the vertical component of bv is set equal to 0.
- the block vector candidate list bvCandList is established, and general_merge_flag is used to indicate whether it is IBCMERGE mode.
- the candidate index bvIdx is derived as follows:
- bvIdx general_merge_flag[xCb][yCb]? merge_idx[xCb][yCb]:mvp_l0_flag[xCb][yCb]
- the specific bvL can be obtained according to the index bvIdx and the block vector candidate list bvCandList:
- the specific bvL can be obtained by indexing bvIdx and the block vector candidate list bvCandList as the predicted bvL.
- the real bvL also needs to add the block vector difference (Block Vector Difference, BVD).
- BVD Block Vector Difference
- Step 1 Get the horizontal and vertical components of BVD, where MvdL0 is the forward motion vector difference.
- Step 2 Perform a rounding operation on the prediction bvL obtained above, wherein the right shift parameter AmvrShift is used for rounding and the left shift parameter AmvrShift is used to improve the resolution.
- Chroma If dual-tree partitioning is used, IBC is not performed for chroma. If single-tree partitioning is used, BV for chroma needs to be derived.
- Input luma position (xCb, yCb), which specifies the top-left sample of the current coded block relative to the top-left luma sample of the current picture, a variable cbWidth, which specifies the width of the current coded block in luma samples, a variable cbHeight, which specifies the height of the current coded block in luma samples, a block vector bv, and a variable cIdx, which specifies the color component index of the current block.
- Output array predSamples of predicted samples.
- IbcBufWidthY is the width of the brightness pixels of the reconstructed buffer stored in IBC
- CtbSizeY is the size of CTU (Coding Tree Unit)
- ibcVirBuf is the reconstructed pixels stored in IBC.
- SubWidthC and SubHeightC depend on the chroma format sampling structure specified by sps_chroma_format_idc. The specific correspondence is shown in the following table:
- the decoding process of the residual signal of the coding block in the inter-frame prediction mode specified in the decoding specification can be called.
- the image reconstruction process of the specified color component specified in the decoding specification can be called.
- basic block vector prediction (Block Vector Predition, BVP) can be used for motion estimation to search for the best block motion vector, and the difference between the searched best block motion vector and the basic block vector is the block vector difference BVD.
- BVD The encoding process of BVD is as follows: for the horizontal component and the vertical component of BVD, the flag of whether BVD is zero is encoded respectively; if it is not zero, its absolute value is encoded, and then the BVD symbol is bypassed; otherwise, no bit is encoded.
- the decoding method of BVD in VVC is the same as the decoding method of MVD between frames.
- the specific decoding process of MVD is:
- mvd_sign_flag[compIdx] represents the sign of the motion vector difference of a certain (horizontal or vertical) component compIdx: if mvd_sign_flag[compIdx] is equal to 0, the corresponding motion vector component difference has a positive value; otherwise (mvd_sign_flag[compIdx] is equal to 1), the corresponding motion vector component difference is a negative value; when mvd_sign_flag[compIdx] does not exist, it is inferred to be equal to 0.
- the value of lMvd[compIdx] should be in the range of -217 to 217-1:
- bvd_sign_flag[compIdx] represents the sign of the motion vector difference of a certain (horizontal or vertical) component compIdx: if bvd_sign_flag[compIdx] is equal to 0, the corresponding motion vector component difference has a positive value; otherwise (bvd_sign_flag[compIdx] is equal to 1), the corresponding motion vector component difference is a negative value; when bvd_sign_flag[compIdx] does not exist, it is inferred to be equal to 0.
- bypass coding is currently used for the BVD symbols in the IBC mode.
- Bypass coding is an equal-probability coding method that does not require adaptive update of the probability. Instead, it uses a fixed probability of 0 and 1, each accounting for 1/2, for coding.
- the coding method is simple and cannot be adaptively updated according to video information and historical coding information.
- One BVD symbol information corresponds to one bit of the code stream, and there is a large bit rate redundancy.
- the video encoding 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, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109 and a decoded image cache unit 110, etc.
- the filtering unit 108 can implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering
- the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive binary Arithmatic coding, CABAC).
- a video coding block can be obtained by dividing the coding tree block (CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 101 to transform the video coding block, including transforming the residual information from the pixel domain to the transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate;
- the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block; specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block;
- the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding of the received video coding 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 a process of generating a motion vector, and the motion vector can estimate the motion of the video coding block, and then
- the motion vector determined by the motion estimation unit 105 performs motion compensation; after determining the intra-frame prediction mode, the intra-frame prediction unit 103 is also used to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated and determined motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstruct the residual block in the pixel domain, and the reconstructed residual block is removed by the filter control analysis unit 107 and the filtering unit 108.
- the encoding unit 109 is used to encode various coding parameters and quantized transform coefficients.
- the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode and output the code stream of the video signal; and the decoded image buffer unit 110 is used to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are 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-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image cache unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering.
- the decoding unit 201 can implement header information decoding and CABAC decoding
- the filtering unit 205 can implement deblocking filtering and SAO filtering.
- a bit stream of the video signal is output; the bit stream is input into the video decoding system 20, and first passes through the decoding unit 201 to obtain the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data of the current video decoding block based on the determined intra-frame prediction mode and the data of the previously decoded blocks from the current frame or picture; the motion compensation unit 204 is to determine the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and use The prediction information is used to generate a predictive block of the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 and the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal passes through the filtering unit 205 to remove the block effect artifacts,
- the encoding method in the embodiment of the present application can be applied to the intra-frame prediction unit 103 shown in Figure 3 and the encoding unit 109 part that can implement the CABAC encoding algorithm.
- the decoding method in the embodiment of the present application can also be applied to the intra-frame prediction unit 203 shown in Figure 4 and the decoding unit 201 that can implement the CABAC decoding algorithm.
- the encoding and decoding method in the embodiment of the present application can be applied to both the video encoding system and the video decoding system, and can even be applied to both the video encoding system and the video decoding system at the same time, but the embodiment of the present application is not specifically limited.
- the "current block” specifically refers to the current encoding block in the intra-frame prediction; when the encoding and decoding method is applied to the video decoding system, the "current block” specifically refers to the current decoding block in the intra-frame prediction.
- FIG5 is a schematic diagram 1 of the decoding method in the embodiment of the present application.
- the method for the decoder to perform decoding processing may include the following steps:
- Step 101 Decode the code stream to determine the BVD absolute value and BVD symbol index information of the current block.
- the decoder can determine the BVD absolute value and BVD symbol index information of the current block by decoding the bit stream.
- the decoder can directly parse the bitstream to obtain the real absolute value of the BVD of the current block, that is, the decoder decodes the bitstream to determine the absolute value of the BVD of the current block.
- the decoder decodes the bitstream and can also determine the BVD symbol index information of the current block, that is, parse and obtain the symbol prediction index of the current block.
- the BVD absolute value includes the first component absolute value absBvdX and the second component absolute value absBvdY; that is, the BVD absolute value includes the horizontal component absolute value and the vertical component absolute value.
- the BVD of the current block may include the first component candBvdX and the second component candBvdY, and at the same time, the candidate BVD of the current block also includes the first component candBvdX and the second component candBvdY, that is, the BVD may include the horizontal component and the vertical component.
- absBvdX and absBvdY are both not 0, then it can be determined that the number of bits of the BVD symbol index information is 2; if absBvdX or absBvdY is 0, then it can be determined that the number of bits of the BVD symbol index information is 1.
- variable-length encoding method may also be used to encode the BVD symbol index information.
- the BVD symbol index information may be encoded using a truncated unary code, or a truncated binary code may be used for binarization, in which case the number of bits of the BVD symbol index information may not necessarily be 2.
- the BVD symbol index information can be an index value in the candidate BVD list
- the number of bits of the symbol index information corresponding to different candidate BVDs is not exactly the same, which is a variable-length code.
- the number of bits of the binary number of the BVD symbol index information can be determined according to the absolute value of the BVD parsed during the decoding process. Among them, if the absolute values of the horizontal component and the vertical component of the BVD are not 0, the number of bits of the binary number of the BVD symbol index information is 2; if the horizontal component of the BVD is 0 and the absolute value of the vertical component is not 0, the number of bits of the binary number of the BVD symbol index information is 1; if the horizontal component of the BVD is not 0 and the absolute value of the vertical component is 0, the number of bits of the binary number of the BVD symbol index information is 1.
- the decoder can use CABAC (context adaptive binary arithmetic coding) or bypass the corresponding decoding process to parse the binary number corresponding to the BVD symbol index information from the bitstream.
- CABAC context adaptive binary arithmetic coding
- a single probability model or multiple probability models may be used, which may include but not be limited to different probability models distinguished according to the absolute value of the horizontal component or vertical component of BVD, the sum or difference of the horizontal component and vertical component of BVD, etc.
- the absolute value of the horizontal component or the vertical component of the BVD is used to classify the bits of the BVD symbol index information of the BVD using different probability models:
- a threshold for the absolute value classification of the horizontal or vertical component of BVD is set to THR0, and there are two probability models
- the 0th bit of this binary number is distinguished according to the size relationship between the absolute value of the horizontal component of BVD and THR0, that is, when the absolute value of the horizontal component of BVD is less than or equal to THR0, the first probability model is used, and when the absolute value of the horizontal component of BVD is greater than THR0, the second probability model is used;
- the 1st bit of the above binary number is distinguished according to the size relationship between the absolute value of the vertical component of BVD and THR0, that is, when the absolute value of the vertical component of BVD is less than or equal to THR0, the first probability model is used, and when the absolute value of the vertical component of BVD is greater than THR0, the second probability model is used.
- the absolute value of the BVD can be used to determine a combination list of BVDs, wherein the combination list of BVDs includes any number of candidate BVDs of the current block. That is, the absolute value of the BVD can be used to determine the candidate BVD of the current block, which can also be understood as using the absolute value of the BVD to determine the initial set of candidate BVDs of the current block.
- a combination list of BVDs may be created between the possible symbols of BVDs and the absolute values of BVDs, which may include the cases where only horizontal BVDs exist, only vertical BVDs exist, and both exist.
- BVDs when creating a combination list of BVDs (candidate BVDs), it mainly includes arranging and combining possible symbols of BVD, and multiplying possible horizontal symbols and vertical symbols by the horizontal absolute value component and vertical absolute value component of BVD respectively.
- the candidate BVD can be determined according to absBvdY.
- BVD is divided into horizontal and vertical components.
- horizontal component is zero
- vertical component is encoded, so only the combination list of the vertical component symbols is constructed, specifically the following two cases:
- the first case the horizontal components are all positive, which is just a placeholder.
- the vertical component is first positive and then negative.
- a symbol list is constructed, and then the constructed symbol list is multiplied by the absolute values of the horizontal and vertical components of BVD to obtain the combined list of BVD.
- the second case the horizontal components are all positive, which is just a placeholder.
- the vertical components are first negative and then positive.
- a symbol list is constructed, and then the constructed symbol list is multiplied by the absolute values of the horizontal and vertical components of BVD to obtain the combined list of BVD.
- the candidate BVD may be determined according to absBvdX.
- BVD is divided into horizontal and vertical components.
- the vertical component is zero, only the horizontal component is encoded, so only the combination list of the symbols of the horizontal component is constructed, specifically the following two cases:
- the first case the vertical components are all positive, which is just a placeholder.
- the horizontal components are first positive and then negative.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain the combined list of BVD.
- the second case the vertical components are all positive, which is just a placeholder.
- the horizontal components are first negative and then positive.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain the combined list of BVD.
- the candidate BVD can be determined according to absBvdX and absBvdY.
- BVD is divided into horizontal and vertical components. When both components are not zero, both need to be encoded, so the BVD list is constructed for the horizontal and vertical components together.
- the 0th bit in the list means that both the horizontal and vertical components are positive
- the 1st bit in the list means that the horizontal component is positive and the vertical component is negative
- the 2nd bit in the list means that the horizontal component is negative and the vertical component is positive
- the 3rd bit in the list means that both the horizontal and vertical components are negative.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain a combination list of BVD.
- Step 102 sort the candidate BVDs of the current block according to the absolute value of the BVD of the current block to determine the sorting result.
- the candidate BVDs of the current block may be further sorted according to the BVD absolute value of the current block to determine a sorting result.
- the first-generation values corresponding to one or more candidate BVDs of the current block can be first determined according to the absolute value of the BVD; then the candidate BVDs can be sorted according to the first-generation value to determine the sorting result.
- one or more candidate BVDs may include a BVD in which candBvdX is set equal to -absBvdX or absBvdX, and candBvdY is set equal to -absBvdY or absBvdY.
- the first matching template when determining the first generation value corresponding to one or more candidate BVDs of the current block based on the absolute value of the BVD of the current block, can be first determined based on the candidate BVD; then, based on a preset error criterion, the matching error between the first template of the current block and the first matching template is calculated to determine the first generation value corresponding to the candidate BVD.
- the cost function for calculating the cost of the template area that is, there are multiple choices for the preset error criterion.
- SAD sum of absolute error
- SATD sum of transformed absolute error
- SSE sum of squared differences
- MAD mean absolute difference
- MAE mean absolute error
- MSE mean squared error
- RDO rate distortion function
- predTempSizeW is the width of the template
- predTempSizeH is the height of the template
- predTemp[i][j] is the pixel point of the template at BV
- recTempC[i][j] is the pixel point of the current block template.
- the preset error criterion may include any one of the sum of absolute error SAD, the sum of transformed absolute error SATD, the sum of squared differences SSE, the mean absolute difference MAD, the mean absolute error MAE, the mean squared error MSE, and the rate-distortion function RDO.
- the first template includes one or more sample values in the adjacent decoded area of the current block.
- FIG6 is a schematic diagram of the template type.
- the template can be classified into template types such as upper template, left template, upper right template, lower left template, and upper left template, based on the relative position relationship between the template and the current block.
- the template sizes of different types of different coding blocks can be fixed the same or different.
- the template size selects the same template size for any current coding block (current block).
- the following formula illustrates a setting condition for the template size, where nTbW and nTbH are the width and height of the current brightness coding block (current block), and iTempW and iTempH are the width and height of the adopted template:
- nTbW and nTbH are the width and height of the current luminance coding block, respectively
- iTempW and iTempH are the width and height of the adopted template, respectively:
- different template sizes can also be selected according to the number of pixels in the current brightness coding block.
- the following formula illustrates a template size setting condition:
- nTbW and nTbH are the width and height of the current luminance coding block
- nTbW ⁇ nTbH are the number of pixels of the current luminance coding block
- iTempW and iTempH are the width and height of the template used:
- the block vector prediction value BVP of the current block when determining the first matching template based on the candidate BVD, can be determined first; then the candidate BV of the current block is determined based on the BVP and the candidate BVD; wherein the candidate BV is used to indicate the position of the first matching template; then, the first matching template can be determined based on the candidate BV.
- the two-dimensional vector of the candidate BV can be selected to be set to (currBvpX+candBvdX, currBvpY+candBvdY), that is, the two-dimensional vector of BV is determined based on the first component candBvdX, the second component candBvdY of the candidate BVD, and the third component currBvpX, the fourth component currBvpY of BVP.
- the first matching template when determining the first matching template according to the candidate BV, may be determined according to the position of the current point and the two-dimensional vector of the candidate BV.
- the position of the current point can be selected as the starting point, and the area indicated by the two-dimensional vector of the candidate BV, which has the same shape and contains the same number of samples as the first template, can be determined as the first matching template.
- FIG. 7 is a schematic diagram of the BVP and BVD of the current coding block
- Figure 8 is a schematic diagram of template motion compensation.
- the current block is used to determine whether the BV is available (the available condition is that the reference block pointed to by the BV has been reconstructed and does not exceed the search range set by the IBC and the image boundary and other conditions). If the current BV is available, then the template of the current block and the new BV will be used for motion compensation to obtain the template at the corresponding BV.
- Figure 9 is a schematic diagram of the BVD combination. As shown in Figure 9, the horizontal and vertical components of the BVD generate a total of 4 combinations of BVDs, which are used for motion compensation at the templates. There are several situations in which the template is used when calculating the cost:
- the first type the upper template and the left template of the current block both exist, and the upper template and the left template at the corresponding BV both exist. In this case, both the upper template and the left template are available.
- the second method both the upper template and the left template of the current block exist, and only the upper template exists at the corresponding BV.
- Method 2 If the left template at the corresponding BV does not exist, the leftmost template width column in the reference block is used instead of the left template, that is, the upper template and the left template are used for calculation.
- the third type the upper template and the left template of the current block both exist, and only the left template exists at the corresponding BV.
- Method 1 the upper template at the corresponding BV does not exist, so it is not used directly, that is, only the left template is used for calculation.
- Method 2 the upper template at the corresponding BV does not exist, and the uppermost template height row inside the reference block is used to replace the upper template, that is, the upper template and the left template are used for calculation.
- the fourth type only the upper template exists in the current block. There are three methods: Method 1: The upper template at the corresponding BV does not exist, so it is not used directly. Method 2: The upper template at the corresponding BV does not exist, and the uppermost template height row inside the reference block is used to replace the upper template. Method 3: The upper template at the corresponding BV exists, so it is used directly.
- the fifth type only the left template exists in the current block. There are three methods: Method 1: the left template at the corresponding BV does not exist, so it is not used directly. Method 2: the left template at the corresponding BV does not exist, and the leftmost template width column in the reference block is used to replace the left template. Method 3: the left template at the corresponding BV exists, so it is used directly.
- the sixth type the upper template and the left template of the current block do not exist, and the BVD combination of this case is ignored.
- the cost in this case is set to the maximum value of the cost evaluation criterion.
- the template is processed at this time, including but not limited to the following method: weighted fusion of the two, calculated as follows:
- the standard of weighted fusion can select a fixed weighting coefficient or allocate a weighting coefficient according to the sum of the absolute values of the differences between the pixel values of the reconstructed brightness and the predicted brightness of each template.
- the formula for calculating the weighting coefficient of the latter is as follows, where SAD A is the average absolute difference of the upper template and SAD L is the average absolute difference of the left template:
- template prediction can be performed based on a combination list of BVP and BVD of the current block (candidate BVD), and the cost (first generation value) of each BVD combination (candidate BVD) in the BVD combination list can be calculated, that is, the cost of the template area can be calculated, and the cost of various combinations in the BVD combination list can be calculated using a template, specifically, the cost of the reconstructed brightness pixels at the position obtained by template prediction using the reconstructed brightness pixels at the current block template position and the BV obtained by the combination of the BVP and BVD of the current block.
- the candidate BVDs can be sorted using the first generation value, thereby obtaining a sorting result.
- the sorting result can be a sorted candidate BVD list of the current block, or a candidate BVD set that determines the candidate BVD with the smallest first generation value through sorting.
- the sorting process can be to sort the candidate BVDs according to the first generation value to determine the candidate BVD list of the current block, wherein the candidate BVD list includes at least one candidate BVD.
- the sorting result may be a new list OrderedList (candidate BVD list of the current block) arranged in ascending (descending) order.
- a sorting method such as bubble sort, selection sort, insertion sort, shell sort, merge sort, quick sort, radix sort, heap sort, counting sort, bucket sort, etc. may be used.
- the sorting result may also be a new list OrderedList (candidate BVD list of the current block) in a specific order.
- the candidate BVDs when the candidate BVDs are sorted according to the first generation value to determine the candidate BVD list of the current block, if absBvdX and absBvdY are not equal to 0, the candidate BVDs are stored in the first array and the second array, respectively; then, based on the first generation value, the first candidate BVD and the second candidate BVD in the first array, and the third candidate BVD and the fourth candidate BVD in the second array are determined; finally, the first candidate BVD, the second candidate BVD, the third candidate BVD, and the fourth candidate BVD can be sorted based on the first generation value to determine the candidate BVD list.
- both the horizontal component and the vertical component of BVD exist that is, both absBvdX and absBvdY are not equal to 0
- the combination list (candidate BVD) is ⁇ (+BVD HOR , +BVD VER ), (+BVD HOR , -BVD VER ), (-BVD HOR , -BVD VER ), (-BVD HOR , +BVD VER ) ⁇
- its corresponding cost list is ⁇ Cost(+BVD HOR , +BVD VER ), Cost(+BVD HOR , -BVD VER ), Cost(-BVD HOR , -BVD VER ), Cost(-BVD HOR , +BVD VER ) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- posiGrp stores two BVD combinations with positive signs on the same component (level)
- negaGrp stores two BVD combinations with negative signs on the same component (level).
- posiGrp ⁇ (+BVD HOR , +BVD VER ), (+BVD HOR , -BVD VER ) ⁇
- negaGrp ⁇ (-BVD HOR , +BVD VER ), (-BVD HOR , -BVD VER ) ⁇ .
- the order of the members in the two lists posiGrp and negaGrp can be arranged arbitrarily.
- Second comparison Compare Cost(-BVD HOR , +BVD VER ) and Cost(-BVD HOR , -BVD VER ), set negaGrp[0] to the smaller BVD combination of the two, and set negaGrp[1] to the larger BVD combination of the two;
- the third comparison compare the Cost corresponding to posiGrp[0] and negaGrp[0].
- an available method is as follows: if the first generation value of the first candidate BVD is less than or equal to the first generation value of the third candidate BVD, the first candidate BVD is set as the first candidate BVD in the candidate BVD list, the third candidate BVD is set as the second candidate BVD in the candidate BVD list, the second candidate BVD is set as the third candidate BVD in the candidate BVD list, and the fourth candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the third candidate BVD is set as the first candidate BVD in the candidate BVD list
- the first candidate BVD is set as the second candidate BVD in the candidate BVD list
- the fourth candidate BVD is set as the third candidate BVD in the candidate BVD list
- the second candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the final sorting process can be: if in the third comparison, the Cost corresponding to posiGrp[0] is less than or equal to the Cost corresponding to negaGrp[0], posiGrp[0] is sorted at the 0th position in the candidate BVD list OrderedList, negaGrp[0] is sorted at the 1st position in the candidate BVD list OrderedList, posiGrp[1] is sorted at the 2nd position in the candidate BVD list OrderedList, and negaGrp[1] is sorted at the 3rd position in the candidate BVD list OrderedList.
- the Cost corresponding to posiGrp[0] is greater than the Cost corresponding to negaGrp[0], sort negaGrp[0] at the 0th position in the candidate BVD list OrderedList, sort posiGrp[0] at the 1st position in the candidate BVD list OrderedList, sort negaGrp[1] at the 2nd position in the candidate BVD list OrderedList, and sort posiGrp[1] at the 3rd position in the candidate BVD list OrderedList.
- the candidate BVD at position 0 in the candidate BVD list of the current block is the first candidate BVD in the candidate BVD list
- the candidate BVD at position 1 is the second candidate BVD in the candidate BVD list
- the candidate BVD at position 2 is the third candidate BVD in the candidate BVD list
- the candidate BVD at position 3 is the fourth candidate BVD in the candidate BVD list.
- the first candidate BVD, the second candidate BVD, the third candidate BVD, and the fourth candidate BVD are sorted based on the first generation value to determine the candidate BVD list
- another available method is as follows: if the first generation value of the first candidate BVD is less than or equal to the first generation value of the third candidate BVD, the first candidate BVD is set as the first candidate BVD in the candidate BVD list, the second candidate BVD is set as the second candidate BVD in the candidate BVD list, the third candidate BVD is set as the third candidate BVD in the candidate BVD list, and the fourth candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the third candidate BVD is set as the first candidate BVD in the candidate BVD list
- the fourth candidate BVD is set as the second candidate BVD in the candidate BVD list
- the first candidate BVD is set as the third candidate BVD in the candidate BVD list
- the second candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the final sorting process can be: if in the third comparison, the Cost corresponding to posiGrp[0] is less than or equal to the Cost corresponding to negaGrp[0], posiGrp[0] is sorted at the 0th position in the candidate BVD list OrderedList, negaGrp[0] is sorted at the 2nd position in the candidate BVD list OrderedList, posiGrp[1] is sorted at the 1st position in the candidate BVD list OrderedList, and negaGrp[1] is sorted at the 3rd position in the candidate BVD list OrderedList.
- the Cost corresponding to posiGrp[0] is greater than the Cost corresponding to negaGrp[0], sort negaGrp[0] at the 0th position in the candidate BVD list OrderedList, sort posiGrp[0] at the 2nd position in the candidate BVD list OrderedList, sort negaGrp[1] at the 1st position in the candidate BVD list OrderedList, and sort posiGrp[1] at the 3rd position in the candidate BVD list OrderedList.
- the candidate BVDs are sorted according to the first generation value to determine the candidate BVD list of the current block, if absBvdX is equal to 0 or absBvdY is equal to 0, the candidate BVD with the smallest first generation value among the candidate BVDs is set as the first candidate BVD in the candidate BVD list, and another candidate BVD among the candidate BVDs is set as the second candidate BVD in the candidate BVD list.
- the two candidate BVDs can be directly sorted according to the size of the first generation value to generate a candidate BVD list.
- the combination list is ⁇ (0, +BVD VER ), (0, -BVD VER ) ⁇
- the corresponding cost list is ⁇ Cost(0, +BVD VER ), Cost(0, -BVD VER ) ⁇ .
- the sorting process is: compare the size of Cost (0, +BVD VER ) and Cost (0, -BVD VER ):
- the combination list is ⁇ (+BVD HOR , 0), (-BVD HOR , 0) ⁇
- the corresponding cost list is ⁇ Cost(+BVD HOR , 0), Cost(-BVD HOR , 0) ⁇ .
- the sorting process is: compare the size of Cost (+BVD HOR , 0) and Cost (-BVD HOR , 0):
- (+BVD HOR , 0) is sorted at the 0th position of the candidate BVD list OrderedList, and (-BVD HOR , 0) is sorted at the 1st position of the candidate BVD list OrderedList;
- (-BVD HOR , 0) is sorted at the 0th position of the candidate BVD list OrderedList, and (+BVD HOR , 0) is sorted at the 1st position of the candidate BVD list OrderedList.
- the sorting process can be to sort the candidate BVDs according to the first generation value to determine the candidate BVD set of the current block, wherein the candidate BVD set includes at least one candidate BVD.
- the candidate BVDs are sorted according to the first-generation values to determine the candidate BVD set of the current block, if absBvdX and absBvdY are not equal to 0, the candidate BVDs are stored in the first array and the second array respectively; then the fifth candidate BVD with the smallest first-generation value in the first array and the sixth candidate BVD with the smallest first-generation value in the second array are determined; finally, the candidate BVD with the smallest first-generation value among the fifth candidate BVD and the sixth candidate BVD can be determined as the BVD with the smallest cost in the candidate BVD set.
- posiGrp stores the sign combination of two BVDs with positive signs on the same component (level)
- negaGrp stores the sign combination of two BVDs with negative signs on the same component (level).
- posiGrp ⁇ (+, +), (+, -) ⁇
- negaGrp ⁇ (-, +), (-, -) ⁇ .
- the order of the members in the two lists posiGrp and negaGrp can be arranged arbitrarily.
- First comparison compare Cost(+, +) and Cost(+, -), set posiGrp[0] to the smaller BVD sign combination of the two, and set posiGrp[1] to the larger BVD sign combination of the two;
- Second comparison Compare Cost(-, +) and Cost(-, -), set negaGrp[0] to the smaller BVD sign combination of the two, and set negaGrp[1] to the larger BVD sign combination of the two;
- the third comparison compare the Cost corresponding to posiGrp[0] and negaGrp[0].
- a symbol combination of a BVD with the minimum cost can be determined, that is, the BVD with the minimum cost in the candidate BVD set can be determined.
- the two candidate BVDs can be directly sorted according to the size of the first generation value to determine the BVD with the minimum cost in the candidate BVD set.
- the candidate BVDs when the candidate BVDs are sorted according to the first-generation value to determine the candidate BVD set of the current block, if absBvdX is equal to 0 or absBvdY is equal to 0, then the candidate BVD with the smallest first-generation value among the candidate BVDs can be determined as the BVD with the smallest cost in the candidate BVD set.
- the combination list is ⁇ (+, +), (+, -) ⁇
- the corresponding cost list is ⁇ Cost(+, +), Cost(+, -) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- the comparison process is: compare the size of Cost(+, +) and Cost(+, -), and then determine the sign combination of a BVD with the smallest Cost, that is, determine the BVD with the smallest cost in the candidate BVD set.
- the combination list is ⁇ (+, +), (-, +) ⁇
- the corresponding cost list is ⁇ Cost(+, +), Cost(-, +) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- the comparison process is: compare the size of Cost(+, +) and Cost(-, +), and then determine the sign combination of a BVD with the smallest Cost, that is, determine the BVD with the smallest cost in the candidate BVD set.
- Step 103 Determine the BVD of the current block according to the BVD symbol index information and the sorting result.
- the BVD of the current block can be determined according to the BVD symbol index information and the sorting result.
- the candidate BVD list of the current block obtained by the sorting process is an ascending (descending) list
- the BVD combination list OrderedList may be firstly transformed into the index transformation list TransformedList according to the transformation rule.
- the candidate BVD list may be transformed to determine an index transformation list (TransformedList).
- the candBvdX of the BVD of the current block when determining the BVD of the current block based on the BVD symbol index information and the sorting result, when absBvdX and absBvdY are both not 0, if the first bit of the BVD symbol index information is 0, it is determined that the candBvdX of the BVD of the current block is the same as the candBvdX of the first candidate BVD or the third candidate BVD in the index conversion list; then the candBvdY of the BVD of the current block can be determined according to the first candidate BVD or the third candidate BVD.
- the second bit of the BVD symbol index information is 0, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the first candidate BVD; if the second bit is 1, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the third candidate BVD.
- the BVD of the current block when determining the BVD of the current block based on the BVD symbol index information and the sorting result, when absBvdX and absBvdY are both not 0, if the first bit of the BVD symbol index information is 1, it is determined that the first component symbol is the same as the first component symbol of the second candidate BVD or the fourth candidate BVD in the index conversion list; then candBvdY of the BVD of the current block can be determined according to the second candidate BVD or the fourth candidate BVD.
- the second bit of the BVD symbol index information is 0, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the second candidate BVD; if the second bit is 1, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the fourth candidate BVD.
- the symbol prediction index of BVD is two bits.
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD horizontal component is equal to a1.
- Check its vertical component If the 1st bit is 0, the true BVD vertical component is equal to a2; if the 1st bit is 1, the true BVD vertical component is equal to -a2.
- the true BVD horizontal component is equal to -a1.
- the real BVD combination is the horizontal component -BVD HOR and the vertical component +BVD VER .
- the real BVD combination is the horizontal component -BVD HOR and the vertical component -BVD VER .
- the real BVD combination is the horizontal component +BVD HOR and the vertical component +BVD VER .
- the real BVD combination is the horizontal component +BVD HOR and the vertical component -BVD VER .
- the BVD symbol index information when determining the BVD of the current block based on the BVD symbol index information and the sorting result, when absBvdX is 0, if the value of the BVD symbol index information is 0, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the first candidate BVD in the index conversion list; if the value of the BVD symbol index information is 1, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the second candidate BVD in the index conversion list.
- the symbol prediction index of the BVD is one bit.
- index transformation list TransformedList is the same as the sorted BVD combination list OrderedList.
- the index transformation list TransformedList is:
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD vertical component is a2, otherwise, the true BVD vertical component is -a2.
- the index transformation list TransformedList is:
- the BVD symbol index information when determining the BVD of the current block based on the BVD symbol index information and the sorting result, when absBvdY is 0, if the value of the BVD symbol index information is 0, it is determined that the candBvdX of the BVD of the current block is the same as the candBvdX of the first candidate BVD in the index conversion list; if the value of the BVD symbol index information is 1, it is determined that the candBvdX of the BVD of the current block is the same as the candBvdX of the second candidate BVD in the index conversion list.
- the symbol prediction index of the BVD is one bit.
- index transformation list TransformedList is the same as the sorted BVD combination list OrderedList.
- the index transformation list TransformedList is:
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD horizontal component is a1, otherwise, the true BVD horizontal component is -a1.
- the index transformation list TransformedList is:
- BVD of the current block when determining the BVD of the current block based on the BVD symbol index information and the candidate BVD list, when both absBvdX and absBvdY are not 0, if the first bit of the BVD symbol index information is 0, then it is determined that the candBvdX of the BVD of the current block is the same as the candBvdX of the first candidate BVD in the candidate BVD list, otherwise they are different; then the candidate BVD list is traversed to determine the first candidate BVD with the same candBvdX as the BVD of the current block; if the second bit of the BVD symbol index information is 0, then it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the first candidate BVD, otherwise they are different.
- both the horizontal component and the vertical component of BVD exist.
- the symbol prediction index of BVD is two bits:
- the horizontal component of the real BVD is equal to a1; if the 0th bit is 1, the horizontal component of the real BVD is equal to -a1, that is, the opposite of a1, and the horizontal component of the real BVD is judged to be e1. Then, the sorted list (the candidate BVD list of the current block) is traversed starting from index 0. When the BVD with the same horizontal component as the real BVD judged above appears in the list for the first time, its vertical component is checked.
- the vertical component of the real BVD is equal to f2; if the 1st bit is 1, the vertical component of the real BVD is equal to -f2, that is, the opposite of f2, and the vertical component of the real BVD is judged to be e2.
- the real BVD is obtained, that is, the BVD with a horizontal component of e1 and a vertical component of e2.
- the horizontal component of the true BVD is -BVD HOR
- the vertical component is +BVD VER .
- the horizontal component of the true BVD is -BVD HOR and the vertical component is -BVD VER .
- BVD symbol index information when determining the BVD of the current block based on the BVD symbol index information and the candidate BVD list, when absBvdX is 0, if the value of the BVD symbol index information is 0, then it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the first candidate BVD in the candidate BVD list; if the value of the BVD symbol index information is 1, then it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the second candidate BVD in the candidate BVD list.
- the vertical component of the real BVD is equal to a2; if the 0th bit is 1, the vertical component of the real BVD is equal to -a2, that is, the opposite of a2. At this time, the vertical component of the real BVD is e2 and the horizontal component is 0. In this way, the real BVD is obtained, that is, the BVD with a horizontal component of 0 and a vertical component of e2.
- BVD symbol index information when determining the BVD of the current block based on the BVD symbol index information and the candidate BVD list, when absBvdY is 0, if the value of the BVD symbol index information is 0, then it is determined that the candBvdX of the BVD of the current block is the same as the candBvdX of the first candidate BVD in the candidate BVD list; if the value of the BVD symbol index information is 1, then it is determined that the candBvdX of the BVD of the current block is the same as the candBvdX of the second candidate BVD in the candidate BVD list.
- the horizontal component of the real BVD is equal to a1; if the 0th bit is 1, the horizontal component of the real BVD is equal to -a1, that is, the opposite of a1. At this time, the horizontal component of the real BVD is e1 and the vertical component is 0. In this way, the real BVD is obtained, that is, the BVD with a horizontal component of e1 and a vertical component of 0.
- the candidate BVD list of the current block obtained by the sorting process is a list in a specific order
- the candidate BVD indicated by the BVD symbol index information in the candidate BVD list can be directly determined as the BVD of the current block.
- the sorted BVD combination list OrderedList can be directly assigned to TransformedList, that is, the candidate BVD list OrderedList and the index transformation list TransformedList are the same. Therefore, in TransformedList (or OrderedList), the BVD combination corresponding to the symbol prediction index of BVD is the real BVD.
- the candidate BVD list of the current block obtained by the sorting process is a list in a specific order
- the two components corresponding to the BVD can be directly encoded at the same time, and correspondingly, at the decoding end, the two components corresponding to the BVD can be directly determined together through the BVD symbol index information.
- the BVD symbol index information obtained by decoding can be directly used to determine the candidate BVD indicated by the BVD symbol index information from the candidate BVD list.
- the encoder can use a traversal method to determine the transmitted index (BVD symbol index information).
- the candidate BVD indicated by the BVD symbol index information in the candidate BVD list can also be directly determined as the BVD of the current block.
- both the horizontal component and the vertical component of BVD exist.
- the symbol prediction index of BVD is two bits:
- Table 21 OrderedList of sorted BVD combinations where both horizontal and vertical BVDs exist
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD horizontal component is equal to a1.
- Check its vertical component If the 1st bit is 0, the true BVD vertical component is equal to a2; if the 1st bit is 1, the true BVD vertical component is equal to -a2.
- the true BVD horizontal component is equal to -a1.
- the real BVD combination is the horizontal component -BVD HOR and the vertical component +BVD VER .
- the real BVD combination is the horizontal component -BVD HOR and the vertical component -BVD VER .
- the real BVD combination is the horizontal component +BVD HOR and the vertical component +BVD VER .
- the real BVD combination is the horizontal component +BVD HOR and the vertical component -BVD VER .
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the vertical component of the real BVD is equal to a2, otherwise, the vertical component of the real BVD is equal to -a2.
- TransformedList is:
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the horizontal component of the real BVD is equal to a1, otherwise, the horizontal component of the real BVD is equal to -a1.
- TransformedList is:
- the candidate BVD with the minimum template matching cost is determined after the sorting, that is, the minimum cost BVD in the candidate BVD set is determined.
- the minimum cost BVD in the candidate BVD set is determined.
- the minimum BVD symbol combination determines the symbol of bit0 and bit1 when the value is equal to 0, and the symbol when the value is equal to 1 is opposite to this.
- the candBvdX of the BVD of the current block when determining the BVD of the current block based on the BVD symbol index information and the sorting result, when absBvdX and absBvdY are both not 0, if the first bit of the BVD symbol index information is 1, then it is determined that the candBvdX of the BVD of the current block has an opposite sign to the candBvdX of the BVD with the lowest cost in the candidate BVD set; then the candBvdY of the BVD of the current block can be determined according to the BVD with the lowest cost in another array other than the array where the BVD with the lowest cost in the candidate BVD set is located.
- the second bit of the BVD sign index information is 0, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the BVD with the lowest cost in the candidate BVD set; if the second bit is 1, it is determined that the candBvdY of the BVD of the current block is opposite in sign to the candBvdY of the BVD with the lowest cost in the candidate BVD set.
- the candBvdY of the BVD of the current block when determining the candBvdY of the BVD of the current block according to the BVD with the lowest cost in another array other than the array where the BVD with the lowest cost in the candidate BVD set is located, if the second bit of the BVD sign index information is 0, it is determined that the candBvdY of the BVD of the current block is the same as the candBvdY of the BVD with the lowest cost in another array; if the second bit is 1, it is determined that the candBvdY of the BVD of the current block has an opposite sign to the candBvdY of the BVD with the lowest cost in another array.
- the signs of the horizontal component and the vertical component of the real BVD are bvdSign[0] and bvdSign[1], where a value of 0 is positive and a value of 1 is negative.
- the above method of determining the BVD of the current block based on the candidate BVD set can save the steps of establishing a list and obtaining the symbol prediction index.
- the decoding end can directly obtain the real BVD symbol through three comparisons, which is less complex.
- Step 104 Determine a reconstruction value of the current block according to the BVD of the current block.
- the decoder can use the BVD of the current block to perform motion compensation, thereby determining a reconstructed value of the current block.
- the overall process of the decoding end is as follows:
- the symbol prediction index (ie, BVD symbol index information) bvdIdx is derived as follows:
- bvsd_idx_single can use different probability models according to the absolute value:
- compIdx 0...1, indicating horizontal component or vertical component.
- bvsd_idx can use two different probability models:
- bvsd_idx_single can use a single probability model:
- the first form is:
- abs_bvd_greater0_flag[0] or abs_bvd_greater0_flag[1] is TRUE:
- abs_bvd_greater0_flag[0] and abs_bvd_greater0_flag[1] are both TRUE, when the binary string of the parsed bvsd_idx is 00B, bvsd_idx is 0; when the binary string of the parsed bvsd_idx is 01B, bvsd_idx is 1; when the binary string of the parsed bvsd_idx is 10B, bvsd_idx is 2; when the binary string of the parsed bvsd_idx is 11B, bvsd_idx is 3.
- abs_bvd_greater0_flag[0] or abs_bvd_greater0_flag[1] is TRUE, when the binary string of the parsed bvsd_idx is 0B, bvsd_idx is 0; when the binary string of the parsed bvsd_idx is 1B, bvsd_idx is 1.
- abs_bvd_greater0_flag[0] or abs_bvd_greater0_flag[1] is TRUE:
- the second form is:
- abs_bvd_greater0_flag[0] and abs_bvd_greater0_flag[1] are both TRUE, when the binary string of the parsed bvsd_idx is 00B, bvsd_idx is 0; when the binary string of the parsed bvsd_idx is 01B, bvsd_idx is 1; when the binary string of the parsed bvsd_idx is 10B, bvsd_idx is 2; when the binary string of the parsed bvsd_idx is 11B, bvsd_idx is 3.
- abs_bvd_greater0_flag[0] or abs_bvd_greater0_flag[1] is TRUE:
- abs_bvd_greater0_flag[0] or abs_bvd_greater0_flag[1] is TRUE:
- bvsd_idx When the binary string of the parsed bvsd_idx is 00B, bvsd_idx is 0; when the binary string of the parsed bvsd_idx is 01B, bvsd_idx is 1; when the binary string of the parsed bvsd_idx is 100B, bvsd_idx is 2; when the binary string of the parsed bvsd_idx is 101B, bvsd_idx is 3.
- bvsd_idx When the binary string of the parsed bvsd_idx is 1B, bvsd_idx is 0; when the binary string of the parsed bvsd_idx is 010B, bvsd_idx is 1; when the binary string of the parsed bvsd_idx is 011B, bvsd_idx is 2; when the binary string of the parsed bvsd_idx is 00100B, bvsd_idx is 3.
- the decoding method proposed in the above steps 101 to 104 creates a combination list of BVD between possible symbols of BVD and the absolute value of BVD, and sorts the combination list using a template.
- the symbol prediction index is obtained using the real BVD symbol and the sorted list for CABAC encoding, which has higher coding efficiency than bypass coding, thereby saving the bit rate required for BVD transmission in IBC.
- the decoding method proposed in the embodiment of the present application can make full use of the similarity between the template and the current coding block to effectively sort the symbol combination list of BVD; on the other hand, CABAC can be used for encoding, which has higher coding efficiency than bypass coding.
- the embodiment of the present application provides a coding and decoding method, at the decoding end, decoding the bitstream, determining the BVD absolute value and BVD symbol index information of the current block; sorting the candidate BVDs of the current block according to the BVD absolute value of the current block, and determining the sorting result; determining the BVD of the current block according to the BVD symbol index information and the sorting result; determining the reconstruction value of the current block according to the BVD of the current block.
- the candidate BVDs of the current block can be effectively sorted according to the absolute value of the BVD of the current block, so that the sorting result can be used to determine and transmit the BVD symbol index information during encoding, and the sorting result can be used to parse the BVD symbol information of the current block during decoding.
- the CABAC encoding and decoding technology can be used to encode and decode the BVD symbol information, which can effectively save the code rate required for the symbol transmission of the BVD in the IBC mode, thereby improving the encoding efficiency.
- another embodiment of the present application proposes a decoding method, wherein, for a decoder, when performing decoding processing, the BVD decoding input can be the code stream information of the BVD absolute value and symbol (BVD symbol index information), and the BVD decoding output can be the real information of the BVD absolute value and symbol.
- the BVD decoding input can be the code stream information of the BVD absolute value and symbol (BVD symbol index information)
- the BVD decoding output can be the real information of the BVD absolute value and symbol.
- Figure 10 is a second schematic diagram of the decoding method in an embodiment of the present application.
- the BVD decoding process includes parsing the absolute value of the BVD (step 201), parsing the symbol prediction index of the BVD, that is, parsing the BVD symbol index information (step 202), by creating a combination list of BVDs between possible symbols of the BVD and the absolute value of the BVD, that is, determining the candidate BVD of the current block (step 203), performing template prediction based on the combination list of the BVP and BVD of the current block, calculating the cost of each BVD combination in the BVD combination list, that is, calculating the cost of the template area for the combination list (first generation value) (step 204), sorting the list and deriving the real BVD based on the symbol prediction index and the sorted list, and performing motion compensation (step 205).
- the decoder can directly parse the real absolute value of BVD from the bitstream, that is, the decoder decodes the bitstream and can determine the absolute value of BVD of the current block.
- the number of bits of the binary number of the symbol prediction index can be determined according to the absolute value of BVD parsed in step 201 during the decoding process. If the absolute values of the horizontal component and the vertical component of BVD are not 0, the number of bits of the binary number of the symbol prediction index is 2; if the horizontal component of BVD is 0 and the absolute value of the vertical component is not 0, the number of bits of the binary number of the symbol prediction index is 1; if the horizontal component of BVD is not 0 and the absolute value of the vertical component is 0, the number of bits of the binary number of the symbol prediction index is 1.
- the decoder can use CABAC (context adaptive binary arithmetic coding) or bypass the corresponding decoding process to parse the binary number corresponding to the symbol prediction index from the bitstream.
- CABAC context adaptive binary arithmetic coding
- a single probability model or multiple probability models can be used, which may include but are not limited to different probability models distinguished according to the absolute value of the horizontal component or vertical component of BVD, the sum or difference of the horizontal component and vertical component of BVD, etc.
- the combination list of BVDs can be created according to different situations, such as only horizontal BVDs exist, only vertical BVDs exist, and both exist.
- Determining the BVD combination list includes permuting and combining possible symbols of the BVD, and multiplying possible horizontal symbols and vertical symbols by the horizontal absolute value component and the vertical absolute value component of the BVD respectively.
- Classification example 1 BVD is divided into horizontal component and vertical component.
- the horizontal component is zero, only the vertical component is encoded, so only the combination list of the vertical component symbols is constructed, specifically the following two cases:
- the first case the horizontal components are all positive, which is just a placeholder.
- the vertical component is first positive and then negative.
- a symbol list is constructed, and then the constructed symbol list is multiplied by the absolute values of the horizontal and vertical components of BVD to obtain the combined list of BVD.
- the second case the horizontal components are all positive, which is just a placeholder.
- the vertical components are first negative and then positive.
- a symbol list is constructed, and then the constructed symbol list is multiplied by the absolute values of the horizontal and vertical components of BVD to obtain the combined list of BVD.
- Classification example 2 BVD is divided into horizontal component and vertical component.
- the vertical component is zero, only the horizontal component is encoded, so only the combination list of the horizontal component symbols is constructed, specifically the following two cases:
- the first case the vertical components are all positive, which is just a placeholder.
- the horizontal components are first positive and then negative.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain the combined list of BVD.
- the second case the vertical components are all positive, which is just a placeholder.
- the horizontal components are first negative and then positive.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain the combined list of BVD.
- Classification example 3 BVD is divided into horizontal component and vertical component. When both components are not zero, both need to be encoded, so the BVD list is constructed for the horizontal and vertical components together. There are 24 cases, namely, any arrangement of the four combinations of ⁇ +1, +1 ⁇ , ⁇ +1, -1 ⁇ , ⁇ -1, +1 ⁇ and ⁇ -1, -1 ⁇ .
- the following examples illustrate:
- the 0th bit in the list means that both the horizontal and vertical components are positive
- the 1st bit in the list means that the horizontal component is positive and the vertical component is negative
- the 2nd bit in the list means that the horizontal component is negative and the vertical component is positive
- the 3rd bit in the list means that both the horizontal and vertical components are negative.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain a combination list of BVD.
- the cost (first generation value) of each BVD combination (candidate BVD) in the BVD combination list is calculated, that is, the cost of the template area is calculated.
- the cost of various combinations in the BVD combination list can be calculated using the template, specifically, the cost of the reconstructed luminance pixels at the position obtained by template prediction using the reconstructed luminance pixels at the current block template position and the BV obtained by the combination of the BVP and BVD of the current block.
- the pixel availability of the template position can be determined based on the pixel availability of the neighboring area of the current block, including the reconstruction of brightness information.
- the template can be classified into template types such as upper template, left template, upper right template, lower left template, and upper left template according to the relative position relationship between the template and the current block.
- the template sizes of different types of different coding blocks can be fixed the same or different.
- the template size may select the same template size for any current coding block (current block), or may select different template sizes according to different sizes of the current coding block, or may select different template sizes according to the number of pixels in the current brightness coding block.
- a new BV can be generated using the combined list of the BVP and BVD of the current block.
- the current block is used to determine whether the BV is available (the available condition is that the reference block pointed to by the BV has been reconstructed and does not exceed the search range set by the IBC and the image boundary and other conditions). If the current BV is available, the template of the current block and the new BV are used for motion compensation to obtain the template at the corresponding BV.
- the horizontal and vertical components of the BVD generate a total of 4 combinations of BVDs, which are used for motion compensation at the templates. There are several situations in which the template is used when calculating the cost:
- the first type the upper template and the left template of the current block both exist, and the upper template and the left template at the corresponding BV both exist. In this case, both the upper template and the left template are available.
- the second method both the upper template and the left template of the current block exist, and only the upper template exists at the corresponding BV.
- Method 2 If the left template at the corresponding BV does not exist, the leftmost template width column in the reference block is used instead of the left template, that is, the upper template and the left template are used for calculation.
- the third type the upper template and the left template of the current block both exist, and only the left template exists at the corresponding BV.
- Method 1 the upper template at the corresponding BV does not exist, so it is not used directly, that is, only the left template is used for calculation.
- Method 2 the upper template at the corresponding BV does not exist, and the uppermost template height row inside the reference block is used to replace the upper template, that is, the upper template and the left template are used for calculation.
- the fourth type only the upper template exists in the current block. There are three methods: Method 1: The upper template at the corresponding BV does not exist, so it is not used directly. Method 2: The upper template at the corresponding BV does not exist, and the uppermost template height row inside the reference block is used to replace the upper template. Method 3: The upper template at the corresponding BV exists, so it is used directly.
- the fifth type only the left template exists in the current block. There are three methods: Method 1: the left template at the corresponding BV does not exist, so it is not used directly. Method 2: the left template at the corresponding BV does not exist, and the leftmost template width column in the reference block is used to replace the left template. Method 3: the left template at the corresponding BV exists, so it is used directly.
- the sixth type the upper template and the left template of the current block do not exist, and the BVD combination of this case is ignored.
- the cost in this case is set to the maximum value of the cost evaluation criterion.
- the evaluation criteria such as the sum of absolute difference (SAD), the sum of absolute difference (SATD), the sum of squared differences (SSE), the mean absolute difference (MAD), the mean absolute error (MAE), the mean squared error (MSE), and the rate distortion function (RDO) can be selected.
- SAD sum of absolute difference
- SATD sum of absolute difference
- SSE sum of squared differences
- MAD mean absolute difference
- MAE mean absolute error
- MSE mean squared error
- RDO rate distortion function
- step 205 can be executed, that is, sorting the combination list according to the cost obtained for the template area, that is, the candidate BVDs can be sorted using the first generation value, and the symbol prediction index of the BVD and the sorted list (the candidate BVD list of the current block) can be used to obtain the real BVD, and then perform motion compensation.
- a new list OrderedList (candidate BVD list of the current block) arranged in ascending (descending) order can be used, or a new list OrderedList arranged in a specific order can be used.
- sorting methods such as bubble sort, selection sort, insertion sort, shell sort, merge sort, quick sort, radix sort, heap sort, counting sort, and bucket sort.
- Case 1 Assume that the combination list (candidate BVD) is ⁇ (+BVD HOR , +BVD VER ), (+BVD HOR , -BVD VER ), (-BVD HOR , -BVD VER ), (-BVD HOR , +BVD VER ) ⁇ , and its corresponding cost list is ⁇ Cost(+BVD HOR , +BVD VER ), Cost(+BVD HOR , -BVD VER ), Cost(-BVD HOR , -BVD VER ), Cost(-BVD HOR , +BVD VER ) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- posiGrp stores two BVD combinations with positive signs on the same component (level)
- negaGrp stores two BVD combinations with negative signs on the same component (level).
- posiGrp ⁇ (+BVD HOR , +BVD VER ), (+BVD HOR , -BVD VER ) ⁇
- negaGrp ⁇ (-BVD HOR , +BVD VER ), (-BVD HOR , -BVD VER ) ⁇ .
- the order of the members in the two lists posiGrp and negaGrp can be arranged arbitrarily.
- Second comparison Compare Cost(-BVD HOR , +BVD VER ) and Cost(-BVD HOR , -BVD VER ), set negaGrp[0] to the smaller BVD combination of the two, and set negaGrp[1] to the larger BVD combination of the two;
- the third comparison compare the Cost corresponding to posiGrp[0] and negaGrp[0];
- the Cost corresponding to posiGrp[0] is less than or equal to the Cost corresponding to negaGrp[0]
- posiGrp[0] is sorted at the 0th position in the candidate BVD list OrderedList
- negaGrp[0] is sorted at the 1st position in the candidate BVD list OrderedList
- posiGrp[1] is sorted at the 2nd position in the candidate BVD list OrderedList
- negaGrp[1] is sorted at the 3rd position in the candidate BVD list OrderedList.
- the Cost corresponding to posiGrp[0] is greater than the Cost corresponding to negaGrp[0], sort negaGrp[0] at the 0th position in the candidate BVD list OrderedList, sort posiGrp[0] at the 1st position in the candidate BVD list OrderedList, sort negaGrp[1] at the 2nd position in the candidate BVD list OrderedList, and sort posiGrp[1] at the 3rd position in the candidate BVD list OrderedList.
- the candidate BVD at position 0 in the candidate BVD list of the current block is the first candidate BVD in the candidate BVD list
- the candidate BVD at position 1 is the second candidate BVD in the candidate BVD list
- the candidate BVD at position 2 is the third candidate BVD in the candidate BVD list
- the candidate BVD at position 3 is the fourth candidate BVD in the candidate BVD list.
- the Cost corresponding to posiGrp[0] is less than or equal to the Cost corresponding to negaGrp[0], sort posiGrp[0] at the 0th position in the candidate BVD list OrderedList, sort negaGrp[0] at the 2nd position in the candidate BVD list OrderedList, sort posiGrp[1] at the 1st position in the candidate BVD list OrderedList, and sort negaGrp[1] at the 3rd position in the candidate BVD list OrderedList.
- the Cost corresponding to posiGrp[0] is greater than the Cost corresponding to negaGrp[0], sort negaGrp[0] at the 0th position in the candidate BVD list OrderedList, sort posiGrp[0] at the 2nd position in the candidate BVD list OrderedList, sort negaGrp[1] at the 1st position in the candidate BVD list OrderedList, and sort posiGrp[1] at the 3rd position in the candidate BVD list OrderedList.
- the sorting process is: compare the size of Cost (0, +BVD VER ) and Cost (0, -BVD VER ):
- the third case Assume that the combination list is ⁇ (+BVD HOR , 0), (-BVD HOR , 0) ⁇ , and its corresponding cost list is ⁇ Cost(+BVD HOR , 0), Cost(-BVD HOR , 0) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- the sorting process is: compare the size of Cost (+BVD HOR , 0) and Cost (-BVD HOR , 0):
- (+BVD HOR , 0) is sorted at the 0th position of the candidate BVD list OrderedList, and (-BVD HOR , 0) is sorted at the 1st position of the candidate BVD list OrderedList;
- (-BVD HOR , 0) is sorted at the 0th position of the candidate BVD list OrderedList, and (+BVD HOR , 0) is sorted at the 1st position of the candidate BVD list OrderedList.
- the sorting result obtained may also be the candidate BVD set of the current block.
- the candidate BVDs may be sorted according to the first generation value to determine the candidate BVD set of the current block, wherein the candidate BVD set includes at least one candidate BVD.
- posiGrp stores the sign combination of two BVDs with positive signs on the same component (level)
- negaGrp stores the sign combination of two BVDs with negative signs on the same component (level).
- posiGrp ⁇ (+, +), (+, -) ⁇
- negaGrp ⁇ (-, +), (-, -) ⁇ .
- the order of the members in the two lists posiGrp and negaGrp can be arranged arbitrarily.
- First comparison compare Cost(+, +) and Cost(+, -), set posiGrp[0] to the smaller BVD combination, and set posiGrp[1] to the larger BVD combination;
- Second comparison Compare Cost(-, +) and Cost(-, -), set negaGrp[0] to the smaller BVD sign combination of the two, and set negaGrp[1] to the larger BVD sign combination of the two;
- the third comparison compare the Cost corresponding to posiGrp[0] and negaGrp[0].
- a symbol combination of a BVD with the minimum cost can be determined, that is, the BVD with the minimum cost in the candidate BVD set can be determined.
- the combination list is ⁇ (+, +), (+, -) ⁇
- the corresponding cost list is ⁇ Cost(+, +), Cost(+, -) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- the comparison process is: compare the size of Cost(+, +) and Cost(+, -), and then determine the sign combination of a BVD with the smallest Cost, that is, determine the BVD with the smallest cost in the candidate BVD set.
- the combination list is ⁇ (+, +), (-, +) ⁇
- the corresponding cost list is ⁇ Cost(+, +), Cost(-, +) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- the comparison process is: compare the size of Cost(+, +) and Cost(-, +), and then determine the sign combination of a BVD with the smallest Cost, that is, determine the BVD with the smallest cost in the candidate BVD set.
- the sorted list (candidate BVD list of the current block) is divided into three cases, namely, BVD has only horizontal components, BVD has only vertical components, and BVD has both horizontal and vertical components, so three cases are also introduced here.
- OrderedList arranged in ascending (descending) order.
- One is to use the conversion list to indirectly obtain the symbol of the real BVD, and the other is to directly use logical reasoning to obtain the real BVD symbol.
- the decoder Before using the transformation list to indirectly obtain the real BVD symbol, the decoder needs to first convert the BVD combination list OrderedList into the index transformation list TransformedList according to the transformation rules.
- both the horizontal component and the vertical component of BVD exist.
- the symbol prediction index of BVD is two bits:
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD horizontal component is equal to a1.
- Check its vertical component If the 1st bit is 0, the true BVD vertical component is equal to a2; if the 1st bit is 1, the true BVD vertical component is equal to -a2.
- the true BVD horizontal component is equal to -a1.
- index transformation list TransformedList is the same as the sorted BVD combination list OrderedList.
- the index transformation list TransformedList is:
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD vertical component is a2, otherwise, the true BVD vertical component is -a2.
- index transformation list TransformedList is the same as the sorted BVD combination list OrderedList.
- the index transformation list TransformedList is:
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD horizontal component is a1, otherwise, the true BVD horizontal component is -a1.
- the horizontal component of the real BVD is equal to a1; if the 0th bit is 1, the horizontal component of the real BVD is equal to -a1, that is, the opposite of a1, and the horizontal component of the real BVD is judged to be e1. Then, the sorted list (the candidate BVD list of the current block) is traversed starting from index 0. When the BVD with the same horizontal component as the real BVD judged above appears in the list for the first time, its vertical component is checked.
- the vertical component of the real BVD is equal to f2; if the 1st bit is 1, the vertical component of the real BVD is equal to -f2, that is, the opposite of f2, and the vertical component of the real BVD is judged to be e2.
- the real BVD is obtained, that is, the BVD with a horizontal component of e1 and a vertical component of e2.
- the vertical component of the real BVD is equal to a2; if the 0th bit is 1, the vertical component of the real BVD is equal to -a2, that is, the opposite of a2. At this time, the vertical component of the real BVD is e2 and the horizontal component is 0. In this way, the real BVD is obtained, that is, the BVD with a horizontal component of 0 and a vertical component of e2.
- Table 70 OrderedList of sorted BVD combinations where only horizontal BVDs exist
- the horizontal component of the real BVD is equal to a1; if the 0th bit is 1, the horizontal component of the real BVD is equal to -a1, that is, the opposite of a1. At this time, the horizontal component of the real BVD is e1 and the vertical component is 0. In this way, the real BVD is obtained, that is, the BVD with a horizontal component of e1 and a vertical component of 0.
- the sorted BVD combination list OrderedList can be directly assigned to TransformedList.
- the BVD combination corresponding to the symbol prediction index of BVD is the real BVD.
- both the horizontal component and the vertical component of BVD exist.
- the symbol prediction index of BVD is two bits:
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the true BVD horizontal component is equal to a1.
- Check its vertical component If the 1st bit is 0, the true BVD vertical component is equal to a2; if the 1st bit is 1, the true BVD vertical component is equal to -a2.
- the true BVD horizontal component is equal to -a1.
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the vertical component of the real BVD is equal to a2, otherwise, the vertical component of the real BVD is equal to -a2.
- the symbol of the real BVD is obtained according to the following rules.
- the predicted index of the parsed symbol is equal to the index of the leftmost column in the table:
- the horizontal component of the real BVD is equal to a1, otherwise, the horizontal component of the real BVD is equal to -a1.
- the candidate BVD with the minimum template matching cost is determined after the sorting, that is, the minimum cost BVD in the candidate BVD set is determined.
- the minimum cost BVD in the candidate BVD set is determined.
- the minimum BVD symbol combination determines the symbol of bit0 and bit1 when the value is equal to 0, and the symbol when the value is equal to 1 is opposite to this.
- the signs of the horizontal component and the vertical component of the real BVD are bvdSign[0] and bvdSign[1], where a value of 0 is positive and a value of 1 is negative.
- the above method for determining the BVD of the current block based on the candidate BVD set can omit the steps of establishing a list and obtaining a symbol prediction index, and the decoding end can directly obtain the real BVD symbol through three comparisons.
- the parsing position is as described in (1) in the overall process of the decoding end of the main technical solution, and is located after bvd_coding(), the overall process of the decoding end is as follows:
- bvd_sign_bin[1] is the 0th bit mentioned above.
- abs_bvd[compIdx] abs_bvd_greater0_flag[compIdx]*(abs_bvd_minus1[compIdx]+1)
- compIdx 0...1, indicating horizontal component or vertical component.
- posiGrp stores the sign combination of two BVDs with positive signs on the same component (vertical)
- negaGrp stores the sign combination of two BVDs with negative signs on the same component (vertical).
- posiGrp ⁇ (+, +), (-, +) ⁇
- negaGrp ⁇ (+, -), (-, -) ⁇ .
- the order of the members in the two lists posiGrp and negaGrp can be arranged arbitrarily.
- Second comparison Compare Cost(+,-) and Cost(-,-), set negaGrp[0] to the smaller BVD combination of the two, and set negaGrp[1] to the larger BVD combination of the two;
- the third comparison compare the Cost corresponding to posiGrp[0] and negaGrp[0];
- the order of the horizontal component and the vertical component can be interchanged, and the order of the horizontal component and the vertical component can be determined by a certain criterion, including but not limited to the following method, the order of the horizontal component and the vertical component is determined by the absolute value of the horizontal component and the vertical component of the BVD.
- the sorted BVD combination list (candidate BVD list) their respective costs can be stored, and then a reordering can be performed based on these stored costs.
- the specific process is: if the cost difference between a candidate in the list and the previous candidate is lower than the ⁇ value, for example,
- FIG11 is a schematic diagram of calculating the cost.
- the algorithm for calculating the cost is defined as follows:
- the list is considered diverse enough and the re-ranking stops.
- this minimum cost difference is less than ⁇ , the candidate is considered redundant and is moved to another position that is sufficiently diverse compared to its previous candidates.
- the encoding and decoding method proposed in the embodiment of the present application can effectively save the code rate required for the symbol transmission of BVD in the IBC mode.
- a combination list of BVD can be created between the possible symbols of BVD and the absolute value of BVD, and the combination list can be sorted using a template, and the symbol prediction index can be obtained using the real BVD symbol and the sorted list for CABAC encoding.
- the proposed scheme has higher coding efficiency than bypass coding, thereby saving the code rate required for BVD transmission in IBC.
- the embodiment of the present application proposes a new symbol transmission method for BVD in IBC, which can make full use of the similarity between the template and the current coding block to effectively sort the symbol combination list of BVD; at the same time, CABAC is used for encoding, which has higher coding efficiency than bypass coding.
- the embodiment of the present application provides a coding and decoding method, at the decoding end, decoding the bitstream, determining the BVD absolute value and BVD symbol index information of the current block; sorting the candidate BVDs of the current block according to the BVD absolute value of the current block, and determining the sorting result; determining the BVD of the current block according to the BVD symbol index information and the sorting result; determining the reconstruction value of the current block according to the BVD of the current block.
- the candidate BVDs of the current block can be effectively sorted according to the absolute value of the BVD of the current block, so that the sorting result can be used to determine and transmit the BVD symbol index information during encoding, and the sorting result can be used to parse the BVD symbol information of the current block during decoding.
- the CABAC encoding and decoding technology can be used to encode and decode the BVD symbol information, which can effectively save the code rate required for the symbol transmission of the BVD in the IBC mode, thereby improving the encoding efficiency.
- FIG12 is a schematic diagram 1 of the encoding method in the embodiment of the present application.
- the method for a decoder to perform decoding processing may include the following steps:
- Step 301 Sort candidate BVDs of the current block according to the absolute value of the BVD of the current block to determine a sorting result.
- the encoder may first determine the absolute value of the BVD of the current block, and then sort the candidate BVDs of the current block according to the absolute value of the BVD of the current block, thereby determining the sorting result.
- the BVD absolute value includes the first component absolute value absBvdX and the second component absolute value absBvdY; that is, the BVD absolute value includes the horizontal component absolute value and the vertical component absolute value.
- the BVD of the current block may include the first component candBvdX and the second component candBvdY, and at the same time, the candidate BVD of the current block also includes the first component candBvdX and the second component candBvdY, that is, the BVD may include the horizontal component and the vertical component.
- absBvdX and absBvdY are both not 0, then it can be determined that the number of bits of the BVD symbol index information is 2; if absBvdX or absBvdY is 0, then it can be determined that the number of bits of the BVD symbol index information is 1.
- variable-length encoding method may also be used to encode the BVD symbol index information.
- the BVD symbol index information may be encoded using a truncated unary code, or a truncated binary code may be used for binarization, in which case the number of bits of the BVD symbol index information may not necessarily be 2.
- the BVD symbol index information can be an index value in the candidate BVD list
- the number of bits of the symbol index information corresponding to different candidate BVDs is not exactly the same, which is a variable-length code.
- the absolute value of the BVD can be used to determine a combination list of BVDs, wherein the combination list of BVDs includes any number of candidate BVDs of the current block. That is, the candidate BVD of the current block can be determined by the absolute value of the BVD, which can also be understood as determining the initial set of candidate BVDs of the current block by using the absolute value of the BVD.
- a combination list of BVDs may be created between the possible symbols of BVDs and the absolute values of BVDs, which may include the cases where only horizontal BVDs exist, only vertical BVDs exist, and both exist.
- BVDs when creating a combination list of BVDs (candidate BVDs), it mainly includes arranging and combining possible symbols of BVD, and multiplying possible horizontal symbols and vertical symbols by the horizontal absolute value component and vertical absolute value component of BVD respectively.
- the candidate BVD can be determined according to absBvdY.
- BVD is divided into horizontal and vertical components.
- horizontal component is zero
- vertical component is encoded, so only the combination list of the vertical component symbols is constructed, specifically the following two cases:
- the first case the horizontal components are all positive, which is just a placeholder.
- the vertical component is first positive and then negative.
- a symbol list is constructed, and then the constructed symbol list is multiplied by the absolute values of the horizontal and vertical components of BVD to obtain the combined list of BVD.
- the second case the horizontal components are all positive, which is just a placeholder.
- the vertical components are first negative and then positive.
- a symbol list is constructed, and then the constructed symbol list is multiplied by the absolute values of the horizontal and vertical components of BVD to obtain the combined list of BVD.
- the candidate BVD may be determined according to absBvdX.
- BVD is divided into horizontal and vertical components.
- the vertical component is zero, only the horizontal component is encoded, so only the combination list of the symbols of the horizontal component is constructed, specifically the following two cases:
- the first case the vertical components are all positive, which is just a placeholder.
- the horizontal components are first positive and then negative.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain the combined list of BVD.
- the second case the vertical components are all positive, which is just a placeholder.
- the horizontal components are first negative and then positive.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain the combined list of BVD.
- the candidate BVD can be determined according to absBvdX and absBvdY.
- BVD is divided into horizontal and vertical components. When both components are not zero, both need to be encoded, so the BVD list is constructed for the horizontal and vertical components together.
- the 0th bit in the list means that both the horizontal and vertical components are positive
- the 1st bit in the list means that the horizontal component is positive and the vertical component is negative
- the 2nd bit in the list means that the horizontal component is negative and the vertical component is positive
- the 3rd bit in the list means that both the horizontal and vertical components are negative.
- a sign list is constructed, and then the constructed sign list is multiplied by the absolute values of the vertical and horizontal components of BVD to obtain a combination list of BVD.
- the candidate BVDs of the current block may be sorted according to the absolute value of the BVD to determine a sorting result.
- the first-generation value corresponding to one or more candidate BVDs of the current block can be determined according to the absolute value of the BVD; then the candidate BVDs can be sorted according to the first-generation value to determine the sorting result.
- one or more candidate BVDs may include a BVD in which candBvdX is set equal to -absBvdX or absBvdX, and candBvdY is set equal to -absBvdY or absBvdY.
- the first matching template when determining the first generation value corresponding to one or more candidate BVDs of the current block based on the absolute value of the BVD of the current block, can be first determined based on the candidate BVD; then, based on a preset error criterion, the matching error between the first template of the current block and the first matching template is calculated to determine the first generation value corresponding to the candidate BVD.
- the cost function for calculating the cost of the template area that is, there are multiple choices for the preset error criterion.
- SAD sum of absolute error
- SATD sum of transformed absolute error
- SSE sum of squared differences
- MAD mean absolute difference
- MAE mean absolute error
- MSE mean squared error
- RDO rate distortion function
- predTempSizeW is the width of the template
- predTempSizeH is the height of the template
- predTemp[i][j] is the pixel point of the template at BV
- recTempC[i][j] is the pixel point of the current block template.
- the preset error criterion may include any one of the sum of absolute error SAD, the sum of transformed absolute error SATD, the sum of squared differences SSE, the mean absolute difference MAD, the mean absolute error MAE, the mean squared error MSE, and the rate-distortion function RDO.
- the first template includes one or more sample values in the adjacent decoded area of the current block.
- the template when selecting a template (the first template of the current block), it is possible to determine whether the pixels at the template position are available, including reconstructing brightness information, based on the pixel availability of the neighboring area of the current block.
- the template can be classified into template types such as upper template, left template, upper right template, lower left template, and upper left template, based on the relative position relationship between the template and the current block.
- the template sizes of different types of different coding blocks can be fixed the same or different.
- the template size may select the same template size for any current coding block (current block), or may select different template sizes according to different sizes of the current coding block, or may select different template sizes according to the number of pixels in the current brightness coding block.
- the block vector prediction value BVP of the current block when determining the first matching template based on the candidate BVD, can be determined first; then the candidate BV of the current block is determined based on the BVP and the candidate BVD; wherein the candidate BV is used to indicate the position of the first matching template; then, the first matching template can be determined based on the candidate BV.
- the two-dimensional vector of the candidate BV can be selected to be set to (currBvpX+candBvdX, currBvpY+candBvdY), that is, the two-dimensional vector of BV is determined based on the first component candBvdX, the second component candBvdY of the candidate BVD, and the third component currBvpX, the fourth component currBvpY of BVP.
- the first matching template when determining the first matching template according to the candidate BV, may be determined according to the position of the current point and the two-dimensional vector of the candidate BV.
- the position of the current point can be selected as the starting point, and the area indicated by the two-dimensional vector of the candidate BV, which has the same shape and contains the same number of samples as the first template, can be determined as the first matching template.
- a new BV can be generated using the combined list of the BVP and BVD of the current block.
- the current block is used to determine whether the BV is available (the available condition is that the reference block pointed to by the BV has been reconstructed and does not exceed the search range set by the IBC and the image boundary and other conditions). If the current BV is available, the template of the current block and the new BV are used for motion compensation to obtain the template at the corresponding BV.
- the horizontal and vertical components of the BVD generate a total of 4 combinations of BVDs, which are used for motion compensation at the templates. There are several situations in which the template is used when calculating the cost:
- the first type the upper template and the left template of the current block both exist, and the upper template and the left template at the corresponding BV both exist. In this case, both the upper template and the left template are available.
- the second method both the upper template and the left template of the current block exist, and only the upper template exists at the corresponding BV.
- Method 2 If the left template at the corresponding BV does not exist, the leftmost template width column in the reference block is used instead of the left template, that is, the upper template and the left template are used for calculation.
- the third type the upper template and the left template of the current block both exist, and only the left template exists at the corresponding BV.
- Method 1 The upper template at the corresponding BV does not exist, so it is not used directly, that is, only the left template is used for calculation.
- Method 2 The upper template at the corresponding BV does not exist, and the template height row at the top of the reference block is used to replace the upper template, that is, the upper template and the left template are used for calculation.
- the fourth type only the upper template exists in the current block. There are three methods: Method 1: The upper template at the corresponding BV does not exist, so it is not used directly. Method 2: The upper template at the corresponding BV does not exist, and the uppermost template height row inside the reference block is used to replace the upper template. Method 3: The upper template at the corresponding BV exists, so it is used directly.
- the fifth type only the left template exists in the current block. There are three methods: Method 1: the left template at the corresponding BV does not exist, so it is not used directly. Method 2: the left template at the corresponding BV does not exist, and the leftmost template width column in the reference block is used to replace the left template. Method 3: the left template at the corresponding BV exists, so it is used directly.
- the sixth type the upper template and the left template of the current block do not exist, and the BVD combination of this case is ignored.
- the cost in this case is set to the maximum value of the cost evaluation criterion.
- the template is processed at this time, including but not limited to the following method: weighted fusion of the two.
- the weighted fusion standard can select a fixed weighting coefficient or allocate a weighting coefficient according to the sum of the absolute values of the differences between the pixel values of the reconstructed brightness and the predicted brightness of each template.
- template prediction can be performed based on a combination list of BVP and BVD of the current block (candidate BVD), and the cost (first generation value) of each BVD combination (candidate BVD) in the BVD combination list can be calculated, that is, the cost of the template area can be calculated, and the cost of various combinations in the BVD combination list can be calculated using a template, specifically, the cost of the reconstructed brightness pixels at the position obtained by template prediction using the reconstructed brightness pixels at the current block template position and the BV obtained by the combination of the BVP and BVD of the current block.
- the candidate BVDs can be sorted using the first generation value, thereby obtaining a sorting result.
- the sorting result can be a sorted candidate BVD list of the current block, or a candidate BVD set that determines the candidate BVD with the smallest first generation value through sorting.
- the sorting process can be to sort the candidate BVDs according to the first generation value to determine the candidate BVD list of the current block, wherein the candidate BVD list includes at least one candidate BVD.
- the sorting result may be a new list OrderedList (candidate BVD list of the current block) arranged in ascending (descending) order.
- a sorting method such as bubble sort, selection sort, insertion sort, shell sort, merge sort, quick sort, radix sort, heap sort, counting sort, bucket sort, etc. may be used.
- the sorting result may also be a new list OrderedList (candidate BVD list of the current block) in a specific order.
- the candidate BVDs when the candidate BVDs are sorted according to the first generation value to determine the candidate BVD list of the current block, if absBvdX and absBvdY are not equal to 0, the candidate BVDs are stored in the first array and the second array, respectively; then, based on the first generation value, the first candidate BVD and the second candidate BVD in the first array, and the third candidate BVD and the fourth candidate BVD in the second array are determined; finally, the first candidate BVD, the second candidate BVD, the third candidate BVD, and the fourth candidate BVD can be sorted based on the first generation value to determine the candidate BVD list.
- both the horizontal component and the vertical component of BVD exist that is, both absBvdX and absBvdY are not equal to 0
- the combination list (candidate BVD) is ⁇ (+BVD HOR , +BVD VER ), (+BVD HOR , -BVD VER ), (-BVD HOR , -BVD VER ), (-BVD HOR , +BVD VER ) ⁇
- its corresponding cost list is ⁇ Cost(+BVD HOR , +BVD VER ), Cost(+BVD HOR , -BVD VER ), Cost(-BVD HOR , -BVD VER ), Cost(-BVD HOR , +BVD VER ) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- posiGrp stores two BVD combinations with positive signs on the same component (level)
- negaGrp stores two BVD combinations with negative signs on the same component (level).
- posiGrp ⁇ (+BVD HOR , +BVD VER ), (+BVD HOR , -BVD VER ) ⁇
- negaGrp ⁇ (-BVD HOR , +BVD VER ), (-BVD HOR , -BVD VER ) ⁇ .
- the order of the members in the two lists posiGrp and negaGrp can be arranged arbitrarily.
- Second comparison Compare Cost(-BVD HOR , +BVD VER ) and Cost(-BVD HOR , -BVD VER ), set negaGrp[0] to the smaller BVD combination of the two, and set negaGrp[1] to the larger BVD combination of the two;
- the third comparison compare the Cost corresponding to posiGrp[0] and negaGrp[0].
- an available method is as follows: if the first generation value of the first candidate BVD is less than or equal to the first generation value of the third candidate BVD, the first candidate BVD is set as the first candidate BVD in the candidate BVD list, the third candidate BVD is set as the second candidate BVD in the candidate BVD list, the second candidate BVD is set as the third candidate BVD in the candidate BVD list, and the fourth candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the third candidate BVD is set as the first candidate BVD in the candidate BVD list
- the first candidate BVD is set as the second candidate BVD in the candidate BVD list
- the fourth candidate BVD is set as the third candidate BVD in the candidate BVD list
- the second candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the final sorting process can be: if in the third comparison, the Cost corresponding to posiGrp[0] is less than or equal to the Cost corresponding to negaGrp[0], posiGrp[0] is sorted at the 0th position in the candidate BVD list OrderedList, negaGrp[0] is sorted at the 1st position in the candidate BVD list OrderedList, posiGrp[1] is sorted at the 2nd position in the candidate BVD list OrderedList, and negaGrp[1] is sorted at the 3rd position in the candidate BVD list OrderedList.
- the Cost corresponding to posiGrp[0] is greater than the Cost corresponding to negaGrp[0], sort negaGrp[0] at the 0th position in the candidate BVD list OrderedList, sort posiGrp[0] at the 1st position in the candidate BVD list OrderedList, sort negaGrp[1] at the 2nd position in the candidate BVD list OrderedList, and sort posiGrp[1] at the 3rd position in the candidate BVD list OrderedList.
- the candidate BVD at position 0 in the candidate BVD list of the current block is the first candidate BVD in the candidate BVD list
- the candidate BVD at position 1 is the second candidate BVD in the candidate BVD list
- the candidate BVD at position 2 is the third candidate BVD in the candidate BVD list
- the candidate BVD at position 3 is the fourth candidate BVD in the candidate BVD list.
- the first candidate BVD, the second candidate BVD, the third candidate BVD, and the fourth candidate BVD are sorted based on the first generation value to determine the candidate BVD list
- another available method is as follows: if the first generation value of the first candidate BVD is less than or equal to the first generation value of the third candidate BVD, the first candidate BVD is set as the first candidate BVD in the candidate BVD list, the second candidate BVD is set as the second candidate BVD in the candidate BVD list, the third candidate BVD is set as the third candidate BVD in the candidate BVD list, and the fourth candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the third candidate BVD is set as the first candidate BVD in the candidate BVD list
- the fourth candidate BVD is set as the second candidate BVD in the candidate BVD list
- the first candidate BVD is set as the third candidate BVD in the candidate BVD list
- the second candidate BVD is set as the fourth candidate BVD in the candidate BVD list.
- the final sorting process can be: if in the third comparison, the Cost corresponding to posiGrp[0] is less than or equal to the Cost corresponding to negaGrp[0], posiGrp[0] is sorted at the 0th position in the candidate BVD list OrderedList, negaGrp[0] is sorted at the 2nd position in the candidate BVD list OrderedList, posiGrp[1] is sorted at the 1st position in the candidate BVD list OrderedList, and negaGrp[1] is sorted at the 3rd position in the candidate BVD list OrderedList.
- the Cost corresponding to posiGrp[0] is greater than the Cost corresponding to negaGrp[0], sort negaGrp[0] at the 0th position in the candidate BVD list OrderedList, sort posiGrp[0] at the 2nd position in the candidate BVD list OrderedList, sort negaGrp[1] at the 1st position in the candidate BVD list OrderedList, and sort posiGrp[1] at the 3rd position in the candidate BVD list OrderedList.
- the candidate BVDs are sorted according to the first generation value to determine the candidate BVD list of the current block, if absBvdX is equal to 0 or absBvdY is equal to 0, the candidate BVD with the smallest first generation value among the candidate BVDs is set as the first candidate BVD in the candidate BVD list, and another candidate BVD among the candidate BVDs is set as the second candidate BVD in the candidate BVD list.
- the two candidate BVDs can be directly sorted according to the size of the first generation value to generate a candidate BVD list.
- the combination list is ⁇ (0, +BVD VER ), (0, -BVD VER ) ⁇
- the corresponding cost list is ⁇ Cost(0, +BVD VER ), Cost(0, -BVD VER ) ⁇ .
- the sorting process is: compare the size of Cost (0, +BVD VER ) and Cost (0, -BVD VER ):
- the combination list is ⁇ (+BVD HOR , 0), (-BVD HOR , 0) ⁇
- the corresponding cost list is ⁇ Cost(+BVD HOR , 0), Cost(-BVD HOR , 0) ⁇ .
- the sorting process is: compare the size of Cost (+BVD HOR , 0) and Cost (-BVD HOR , 0):
- (+BVD HOR , 0) is sorted at the 0th position of the candidate BVD list OrderedList, and (-BVD HOR , 0) is sorted at the 1st position of the candidate BVD list OrderedList;
- (-BVD HOR , 0) is sorted at the 0th position of the candidate BVD list OrderedList, and (+BVD HOR , 0) is sorted at the 1st position of the candidate BVD list OrderedList.
- the sorting process can be to sort the candidate BVDs according to the first generation value to determine the candidate BVD set of the current block, wherein the candidate BVD set includes at least one candidate BVD.
- the candidate BVDs are sorted according to the first-generation values to determine the candidate BVD set of the current block, if absBvdX and absBvdY are not equal to 0, the candidate BVDs are stored in the first array and the second array respectively; then the fifth candidate BVD with the smallest first-generation value in the first array and the sixth candidate BVD with the smallest first-generation value in the second array are determined; finally, the candidate BVD with the smallest first-generation value among the fifth candidate BVD and the sixth candidate BVD can be determined as the BVD with the smallest cost in the candidate BVD set.
- posiGrp stores the sign combination of two BVDs with positive signs on the same component (level)
- negaGrp stores the sign combination of two BVDs with negative signs on the same component (level).
- posiGrp ⁇ (+, +), (+, -) ⁇
- negaGrp ⁇ (-, +), (-, -) ⁇ .
- the order of the members in the two lists posiGrp and negaGrp can be arranged arbitrarily.
- First comparison compare Cost(+, +) and Cost(+, -), set posiGrp[0] to the smaller BVD combination, and set posiGrp[1] to the larger BVD combination;
- Second comparison Compare Cost(-, +) and Cost(-, -), set negaGrp[0] to the smaller BVD sign combination of the two, and set negaGrp[1] to the larger BVD sign combination of the two;
- the third comparison compare the Cost corresponding to posiGrp[0] and negaGrp[0].
- a symbol combination of a BVD with the minimum cost can be determined, that is, the BVD with the minimum cost in the candidate BVD set can be determined.
- the two candidate BVDs can be directly sorted according to the size of the first generation value to determine the BVD with the minimum cost in the candidate BVD set.
- the candidate BVDs when the candidate BVDs are sorted according to the first-generation value to determine the candidate BVD set of the current block, if absBvdX is equal to 0 or absBvdY is equal to 0, then the candidate BVD with the smallest first-generation value among the candidate BVDs can be determined as the BVD with the smallest cost in the candidate BVD set.
- the combination list is ⁇ (+, +), (+, -) ⁇
- the corresponding cost list is ⁇ Cost(+, +), Cost(+, -) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- the comparison process is: compare the size of Cost(+, +) and Cost(+, -), and then determine the sign combination of a BVD with the smallest Cost, that is, determine the BVD with the smallest cost in the candidate BVD set.
- the combination list is ⁇ (+, +), (-, +) ⁇
- the corresponding cost list is ⁇ Cost(+, +), Cost(-, +) ⁇ .
- the order of the members in the above two lists can be arranged arbitrarily.
- the comparison process is: compare the size of Cost(+, +) and Cost(-, +), and then determine the sign combination of a BVD with the smallest Cost, that is, determine the BVD with the smallest cost in the candidate BVD set.
- Step 302 Determine the BVD symbol index information of the current block according to the BVD symbol information of the current block and the sorting result.
- the BVD symbol index information of the current block can be further determined based on the BVD symbol information of the current block and the sorting result.
- the candidate BVD list of the current block obtained by the sorting process is an ascending (descending) list
- the BVD combination list OrderedList may be converted into the index conversion list TransformedList according to the conversion rule.
- the candidate BVD list may be transformed to determine an index transformation list (TransformedList).
- the first bit of the BVD symbol index information is determined to be 0; otherwise, the first bit is determined to be 1.
- the second bit of the BVD symbol index information is determined to be 0; otherwise, the second bit is determined to be 1.
- the first bit when the first bit is determined to be 1, if the second component symbol of the BVD symbol information of the current block is the same as the second component symbol of the candidate BVD with an index of 1 in the index conversion list, the second bit of the BVD symbol index information is determined to be 0; otherwise, the second bit is determined to be 1.
- the symbol prediction index of BVD is two bits.
- Table 78 OrderedList of sorted BVD combinations where both horizontal and vertical BVDs exist
- the symbol prediction index is obtained according to the following rules.
- the symbol prediction index is equal to the index of the leftmost column in the table:
- Table 80 OrderedList instance of sorted BVD combination list where both horizontal and vertical BVD exist
- the BVD symbol index information of the current block when determining the BVD symbol index information of the current block based on the BVD symbol information and the sorting result of the current block, when absBvdX is 0, if the second component symbol of the BVD symbol information of the current block is the same as the second component symbol of the first candidate BVD in the index conversion list, the BVD symbol index information is determined to be 0; otherwise, the BVD symbol index information is determined to be 1.
- the symbol prediction index of BVD is one bit:
- index transformation list TransformedList is the same as the sorted BVD combination list OrderedList.
- the index transformation list TransformedList is:
- the symbol prediction index is obtained according to the following rules.
- the symbol prediction index is equal to the index of the leftmost column in the table:
- the index transformation list TransformedList is:
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Priority Applications (7)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2025521229A JP2025533269A (ja) | 2022-10-13 | 2022-10-13 | 符号化・復号化方法、エンコーダ、デコーダ、並びに記憶媒体 |
| CN202280100854.XA CN120051993A (zh) | 2022-10-13 | 2022-10-13 | 编解码方法、编码器、解码器以及存储介质 |
| EP22961761.8A EP4604534A4 (en) | 2022-10-13 | 2022-10-13 | ENCODING METHOD, DECODING METHOD, ENCODERS, DECODERS AND STORAGE MEDIA |
| PCT/CN2022/125219 WO2024077572A1 (zh) | 2022-10-13 | 2022-10-13 | 编解码方法、编码器、解码器以及存储介质 |
| TW112137584A TW202425636A (zh) | 2022-10-13 | 2023-09-28 | 編解碼方法、編碼器、解碼器以及儲存媒介 |
| US19/175,097 US20250240431A1 (en) | 2022-10-13 | 2025-04-10 | Decoding method, encoders and decoders |
| MX2025004358A MX2025004358A (es) | 2022-10-13 | 2025-04-11 | Metodo de codificacion, metodo de descodificacion, codificadores, descodificadores y medio de almacenamiento |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2022/125219 WO2024077572A1 (zh) | 2022-10-13 | 2022-10-13 | 编解码方法、编码器、解码器以及存储介质 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/175,097 Continuation US20250240431A1 (en) | 2022-10-13 | 2025-04-10 | Decoding method, encoders and decoders |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024077572A1 true WO2024077572A1 (zh) | 2024-04-18 |
Family
ID=90668448
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/125219 Ceased WO2024077572A1 (zh) | 2022-10-13 | 2022-10-13 | 编解码方法、编码器、解码器以及存储介质 |
Country Status (7)
| Country | Link |
|---|---|
| US (1) | US20250240431A1 (enExample) |
| EP (1) | EP4604534A4 (enExample) |
| JP (1) | JP2025533269A (enExample) |
| CN (1) | CN120051993A (enExample) |
| MX (1) | MX2025004358A (enExample) |
| TW (1) | TW202425636A (enExample) |
| WO (1) | WO2024077572A1 (enExample) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20240223772A1 (en) * | 2023-01-03 | 2024-07-04 | Comcast Cable Communications, Llc | Magnitude Coding for Selected Subset of Prediction Candidates |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106464904A (zh) * | 2014-06-20 | 2017-02-22 | 高通股份有限公司 | 用于视频译码的帧内块复制块向量信令 |
| US20170332097A1 (en) * | 2014-11-27 | 2017-11-16 | Kt Corporation | Video signal processing method and device |
| CN111866515A (zh) * | 2019-04-30 | 2020-10-30 | 杭州海康威视数字技术股份有限公司 | 一种矢量差解码方法、装置及电子设备 |
| WO2020245391A1 (en) * | 2019-06-07 | 2020-12-10 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Region based intra block copy |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9854253B2 (en) * | 2014-06-30 | 2017-12-26 | Qualcomm Incorporated | Method for motion vector difference (MVD) and intra block copy vector difference (BVD) coding of screen content video data |
| WO2022063729A1 (en) * | 2020-09-28 | 2022-03-31 | Interdigital Vc Holdings France, Sas | Template matching prediction for versatile video coding |
| EP4584955A1 (en) * | 2022-09-09 | 2025-07-16 | Comcast Cable Communications, LLC | Sign coding and decoding using prediction |
-
2022
- 2022-10-13 CN CN202280100854.XA patent/CN120051993A/zh active Pending
- 2022-10-13 WO PCT/CN2022/125219 patent/WO2024077572A1/zh not_active Ceased
- 2022-10-13 JP JP2025521229A patent/JP2025533269A/ja active Pending
- 2022-10-13 EP EP22961761.8A patent/EP4604534A4/en active Pending
-
2023
- 2023-09-28 TW TW112137584A patent/TW202425636A/zh unknown
-
2025
- 2025-04-10 US US19/175,097 patent/US20250240431A1/en active Pending
- 2025-04-11 MX MX2025004358A patent/MX2025004358A/es unknown
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106464904A (zh) * | 2014-06-20 | 2017-02-22 | 高通股份有限公司 | 用于视频译码的帧内块复制块向量信令 |
| US20170332097A1 (en) * | 2014-11-27 | 2017-11-16 | Kt Corporation | Video signal processing method and device |
| CN111866515A (zh) * | 2019-04-30 | 2020-10-30 | 杭州海康威视数字技术股份有限公司 | 一种矢量差解码方法、装置及电子设备 |
| WO2020245391A1 (en) * | 2019-06-07 | 2020-12-10 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Region based intra block copy |
Non-Patent Citations (3)
| Title |
|---|
| M. SALEHIFAR (LGE), S. PALURI (LGE), S. KIM (LGE): "CE8-Related : On MVD Coding", 14. JVET MEETING; 20190319 - 20190327; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 12 March 2019 (2019-03-12), XP030202735 * |
| See also references of EP4604534A4 * |
| Y. SUN (HIKVISION), F. CHEN, L. WANG (HIKVISION): "CE8-related: Simple BVD coding scheme without adding more context", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 1 July 2019 (2019-07-01), XP030219267 * |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2025533269A (ja) | 2025-10-03 |
| MX2025004358A (es) | 2025-05-02 |
| TW202425636A (zh) | 2024-06-16 |
| US20250240431A1 (en) | 2025-07-24 |
| CN120051993A (zh) | 2025-05-27 |
| EP4604534A4 (en) | 2026-05-27 |
| EP4604534A1 (en) | 2025-08-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20250126301A1 (en) | Loop filtering method and device | |
| TWI867184B (zh) | 幀間預測方法、編碼器、解碼器以及儲存媒介 | |
| TWI888505B (zh) | 編碼方法、解碼方法、編碼器、解碼器以及儲存媒介 | |
| CN119135922A (zh) | 视频解码方法、视频编码方法、装置及设备 | |
| CN117413515A (zh) | 编解码方法、编码器、解码器以及计算机存储介质 | |
| CN114827612B (zh) | 视频图像编码和解码方法、设备及介质 | |
| US20250240431A1 (en) | Decoding method, encoders and decoders | |
| WO2024197748A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2024212255A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025076670A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| TW202404369A (zh) | 視訊編、解碼方法及裝置、碼流、解碼器、編碼器、電子設備、儲存媒介 | |
| WO2025065696A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025007263A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| CN120982082A (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| JP2026500444A (ja) | 復号方法、符号化方法、復号装置および符号化装置 | |
| WO2024207132A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025213394A1 (zh) | 编解码方法、编码器、解码器以及存储介质 | |
| WO2025145334A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2024207136A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025152089A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025007272A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025236218A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025213400A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025065610A1 (zh) | 编解码方法、记录方法、编解码器以及存储介质 | |
| WO2025213396A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22961761 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202280100854.X Country of ref document: CN |
|
| ENP | Entry into the national phase |
Ref document number: 2025521229 Country of ref document: JP Kind code of ref document: A |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2025521229 Country of ref document: JP |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202517043924 Country of ref document: IN |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2022961761 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2022961761 Country of ref document: EP Effective date: 20250513 |
|
| WWP | Wipo information: published in national office |
Ref document number: 202280100854.X Country of ref document: CN |
|
| WWP | Wipo information: published in national office |
Ref document number: 202517043924 Country of ref document: IN |
|
| WWP | Wipo information: published in national office |
Ref document number: 2022961761 Country of ref document: EP |