WO2025199773A1 - 编解码方法、码流、编码器、解码器以及存储介质 - Google Patents
编解码方法、码流、编码器、解码器以及存储介质Info
- Publication number
- WO2025199773A1 WO2025199773A1 PCT/CN2024/083935 CN2024083935W WO2025199773A1 WO 2025199773 A1 WO2025199773 A1 WO 2025199773A1 CN 2024083935 W CN2024083935 W CN 2024083935W WO 2025199773 A1 WO2025199773 A1 WO 2025199773A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- block
- block vector
- template
- list
- vector
- 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.)
- Pending
Links
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/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
-
- 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/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
Definitions
- intra-frame prediction methods such as intra block copy (IBC), decoder intra mode derivation (DIMD), and template-based intra mode derivation (TIMD)
- IBC intra block copy
- DIMD decoder intra mode derivation
- TMD template-based intra mode derivation
- the block vector list of the current block satisfies at least one of the following:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors of reference blocks corresponding to the reference block vector of the current block
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, TIMD, or SGPM;
- an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors of reference blocks corresponding to the reference block vector of the current block
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, TIMD, or SGPM;
- the block vector list is obtained by sorting the template error values corresponding to the block vectors in the block vector list; wherein the template error values of the block vectors are determined by a preset template error calculation method, and the preset template error calculation method is determined based on the error calculation method of the template search process corresponding to the current block or the second syntax identification information transmitted in the code stream.
- an embodiment of the present application provides a code stream, wherein the code stream is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following: first syntax identification information, second syntax identification information, and third syntax identification information.
- an encoder comprising a first determining unit, wherein:
- a first determining unit is configured to, when determining that a current block uses a preset intra-frame prediction mode, write first syntax identification information into a bitstream; wherein the first syntax identification information indicates that the current block uses the preset intra-frame prediction mode; construct a block vector list for the current block; and determine a prediction block for the current block based on the block vector list for the current block; wherein the block vector list for the current block satisfies at least one of the following:
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, TIMD, or SGPM;
- the block vector list is obtained by sorting the template error values corresponding to the block vectors in the block vector list; wherein the template error values of the block vectors are determined by a preset template error calculation method, and the preset template error calculation method is determined based on the error calculation method of the template search process corresponding to the current block or the second syntax identification information transmitted in the code stream.
- an encoder comprising a first memory and a first processor; wherein,
- a first memory for storing a computer program capable of running on the first processor
- the first processor is configured to execute the method according to the second aspect when running the computer program.
- an embodiment of the present application provides a decoder, comprising a second determining unit, wherein:
- the second determining unit is configured to decode the code stream and determine first syntax identification information; if the first syntax identification information indicates that the current block uses a preset intra-frame prediction mode, construct a block vector list for the current block; and determine a prediction block for the current block based on the block vector list for the current block, wherein the block vector list for the current block satisfies at least one of the following:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors of reference blocks corresponding to the reference block vector of the current block
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, TIMD, or SGPM;
- the block vector list is obtained by sorting the template error values corresponding to the block vectors in the block vector list; wherein the template error values of the block vectors are determined by a preset template error calculation method, and the preset template error calculation method is determined based on the error calculation method of the template search process corresponding to the current block or the second syntax identification information transmitted in the code stream.
- an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein,
- a second memory for storing a computer program capable of running on the second processor
- the second processor is configured to execute the method according to the first aspect when running the computer program.
- an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by at least one processor, implements the method described in the first aspect or the method described in the second aspect.
- Embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder, and a storage medium.
- a current block uses a preset intra-frame prediction mode
- a prediction block for the current block is determined based on the block vector list for the current block; wherein the block vector list for the current block satisfies at least one of the following conditions: the block vector list is constructed by executing at least two AR-BVPs, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors of reference blocks corresponding to a reference block vector of the current block;
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, TIMD, or SGPM; the block vector list is obtained by sorting template error values corresponding to block vectors in the block vector list; wherein the template
- the construction and/or use process of the block vector list in the intra-frame prediction process can be adjusted and improved.
- the diversity of the block vector list can be improved by constructing AR-BVP candidate block vectors in batches, and/or directly using the block vector of the reference block as a candidate block vector to add to the block vector list, and/or using a block vector list with sub-pixel precision for intra-frame prediction, and/or using different template error calculation methods to reorder the block vector list, etc., thereby improving the efficiency of intra-frame prediction and improving encoding and decoding performance.
- FIG1 is a flow chart of a hybrid coding framework
- FIG2 is a schematic diagram of adjacent blocks and non-adjacent blocks
- FIG4 is a second schematic diagram of an implementation method of the AR-BVP technology
- FIG5 is a schematic diagram of the implementation of the IntraTMP technology
- FIG6 is a second schematic diagram of the implementation of the IntraTMP technology
- FIG7 is a schematic diagram of the implementation of the SGPM technology
- FIG8 is a schematic diagram of the implementation of DIMD technology
- FIG9 is a schematic diagram of the implementation of TIMD technology
- FIG10 is a block diagram of an encoder according to an embodiment of the present application.
- FIG11 is a schematic block diagram of a decoder according to an embodiment of the present application.
- FIG13 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application.
- FIG15 is a schematic diagram of a template provided in an embodiment of the present application.
- the transformation converts the predicted image blocks into the frequency domain, redistributing the energy. Combined with quantization, this removes information that is insensitive to the human eye, eliminating visual redundancy.
- Entropy coding can eliminate character redundancy based on the current context model and the probability information of the binary bit stream.
- the first syntax identification information indicates that the current block uses the preset intra-frame prediction mode; if the value of cu_pred_mode obtained through decoding is 0, it can be determined that the first syntax identification information indicates that the current block does not use the preset intra-frame prediction mode.
- the preset intra-frame prediction mode may be a mode for performing intra-frame prediction by constructing a block vector list.
- a block vector list of the current block can be further constructed.
- the block vector list of the current block may satisfy at least one of the following:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors of sub-pixel precision; wherein the block vectors of sub-pixel precision are used for DIMD, or TIMD, or SGPM;
- the block vector list for the current block may be constructed through at least two AR-BVP passes, and between the at least two AR-BVP passes, a check operation may be performed on at least one non-AR-BVP block vector.
- different candidate block vectors may be obtained through at least two AR-BVP passes, and the obtained candidate block vectors may be checked and added to the block vector list.
- a check operation may also be performed on at least one non-AR-BVP block vector.
- the block vector list of the current block may include a reference block vector corresponding to the guide block vector of the current block.
- the block vector of the reference block determined based on the guide block vector in the AR-BVP process may be directly used as a candidate block vector, and the candidate block vector may be checked and added to the block vector list.
- the constructed block vector list of the current block may include block vectors with sub-pixel precision.
- the block vectors added to the block vector list of the current block may be of sub-pixel precision, thereby obtaining a prediction block with sub-pixel precision.
- the block vector list for the current block may be obtained by sorting the template error values corresponding to the block vectors in the block vector list.
- a preset template error calculation method for calculating the template error values of the block vectors in the block vector list may be first determined.
- the preset template error calculation method may be determined based on the error calculation method used in the template search process corresponding to the current block, or may be determined based on second syntax identification information transmitted in the bitstream.
- the third block vector may include the first candidate block vector constructed through AR-BVP, and may also include the first block vector and/or the second block vector. That is, after the first candidate block vector and the second block vector are added to the block vector list of the current block, in addition to the first candidate block vector being used as the guidance block vector for the next AR-BVP, other block vectors in the block vector list of the current block may also be used as guidance block vectors for the next AR-BVP.
- the first block vector in the block vector list of the current block can be used as the first guide block vector, and then A corresponding first candidate block vector is determined based on the first guide block vector, wherein the first candidate block vector is an AR-BVP block vector.
- the obtained first candidate block vector (AR-BVP block vector) and the second block vector (a non-AR-BVP block vector different from the first block vector) can be added to the block vector list of the current block.
- a second AR-BVP process is performed, and the third block vector in the block vector list can be first used as the second guide block vector, wherein the third block vector includes at least the first candidate block vector obtained by the first AR-BVP process. Then, a corresponding second candidate block vector can be determined based on the second guide block vector, and the second candidate block vector is an AR-BVP block vector. Finally, the obtained second candidate block vector can be added to the block vector list.
- the AR-BVP process may be performed more than twice, and this application does not specifically limit this.
- a guide block vector for the next AR-BVP process may be further determined based on the block vector list, and then a corresponding candidate block vector may be determined based on the guide block vector and added to the block vector candidate list.
- the existing block vectors are part or all of the block vectors in the constructed block vector list. After adding the adjacent/non-adjacent block vectors, the first AR-BVP construction process is performed. Thereafter, after adding the block vectors in the historical block vector cache list, the second AR-BVP construction process is performed.
- the corresponding reference block when constructing a block vector list for the current block, the corresponding reference block may be first determined based on the guide block vector, and then the corresponding candidate block vector may be determined using the block vector of the reference block. After AR-BVP processing is completed, when determining the candidate block vector using the block vector of the reference block, the sum of the guide block vector and the block vector of the reference block may be used to determine the candidate block vector and add it to the block vector candidate list, or the block vector of the reference block may be directly used to determine the candidate block vector and add it to the block vector candidate list.
- the first reference block in the process of determining the first candidate block vector based on the first guide block vector, can be first determined based on the first guide block vector, and then the first candidate block vector can be determined based on the block vector of the first reference block.
- the first candidate block vector can be determined by summing the first guide block vector and the block vector of the first reference block, or the block vector of the first reference block can be directly determined as the first candidate block vector.
- the first candidate block vector can also include both the sum of the first guide block vector and the block vector of the first reference block and the block vector of the first reference block, as well as the block vector of the first reference block.
- the block vector of the reference block determined according to the reference block vector can be directly added to the block vector list as a candidate block vector, that is, the block vector list of the current block includes the block vector of the reference block corresponding to the reference block vector of the current block.
- the block vector of the reference block can be directly used as a block vector candidate (candidate block vector).
- each time a reference block vector is obtained based on the guide block vector BV_arbvp and BV_ext can be added to the block vector list as candidate block vectors.
- the first block vector in the block vector list of the current block can be first determined as the first guide block vector of the current block, and the first reference block corresponding to the first guide block vector can be determined; wherein the first block vector includes at least one of the following: the block vector of the adjacent block of the current block, the block vector of the non-adjacent block of the current block, and the block vector in the HMVP; then the block vector of the first reference block is determined as the first candidate block vector of the current block; and/or, the first guide block vector and the block vector of the first reference block are summed to determine the first candidate block vector of the current block; then the first candidate block vector and the second block vector can be added to the block vector list; wherein the second block vector can be a non-AR-BVP block vector, for example, the second block vector can be a non-AR-BVP block vector different from the first block vector; then the third block vector in the block vector list is determined as
- the first block vector in the block vector list of the current block can be used as the first guide block vector, and then the corresponding first candidate block vector is determined based on the first guide block vector, wherein the first candidate block vector is an AR-BVP block vector, and the first candidate block vector may include the block vector of the first reference block corresponding to the first candidate block vector, and/or the sum of the first guide block vector and the block vector of the corresponding first reference block.
- the obtained first candidate block vector (AR-BVP block vector) and the second block vector (a non-AR-BVP block vector different from the first block vector) can be added to the block vector list of the current block.
- a second AR-BVP process is performed.
- the third block vector in the block vector list can be used as a second guide block vector, where the third block vector includes at least the first candidate block vector obtained by the first AR-BVP process.
- a corresponding second candidate block vector can then be determined based on the second guide block vector.
- the second candidate block vector is an AR-BVP block vector and can include the block vector of the second reference block corresponding to the second candidate block vector and/or the sum of the second guide block vector and the block vector of the corresponding second reference block.
- the obtained second candidate block vector can be added to the block vector list.
- the AR-BVP process may be performed more than twice, and this application does not specifically limit this.
- a guide block vector for the next AR-BVP process may be further determined based on the block vector list, and then a corresponding candidate block vector may be determined based on the guide block vector and added to the block vector candidate list.
- AR-BVP when constructing the block vector list, AR-BVP can be constructed in at least two steps; at the same time, during the AR-BVP processing, the block vector of the reference block can be directly used as the candidate block vector.
- the guide block vector may be determined based on existing block vectors in the block vector list.
- the first guide block vector in the first AR-BVP process and the second guide block vector in the second AR-BVP process may be partially identical or completely different.
- the process of constructing an AR-BVP can be the same or different at different times. For example, when constructing an AR-BVP for the first time, all existing block vectors in the block vector list can be used as guide block vectors; when constructing an AR-BVP for the second time, all existing block vectors in the list and the newly added AR-BVP can be used as guide block vectors.
- the first guide block vector in the first AR-BVP processing process may include some or all block vectors in the block vector list
- the second guide block vector in the second AR-BVP processing process may include a non-AR-BVP block vector in the block vector list that is different from the first guide block vector, and may also include a newly constructed AR-BVP block vector (i.e., the first candidate block vector) added to the block vector list after the first AR-BVP processing.
- AR-BVP processing can be performed based on the guidance block vector of the current block to obtain at least one candidate block vector, so that a block vector list of the current block can be constructed until a preset end condition is met; wherein the preset end condition includes at least one of the following: the number of AR-BVP processes is greater than or equal to a preset threshold; the number of candidate block vectors determined by AR-BVP processing is greater than or equal to a first number threshold; the number of block vectors in the block vector list is greater than or equal to a second number threshold.
- the preset threshold, the first quantity threshold, and the second quantity threshold can all be pre-set integers greater than 0, and this application does not specifically limit them.
- the preset threshold can be 3, the first quantity threshold can be 5, and the second quantity threshold can be 15.
- one or more AR-BVP block vectors can be constructed.
- reference block B1 is first determined based on guide block vector BV0,1 .
- a new block vector BV0,2 BV0,1 + BV1,2 is constructed.
- AR-BVP processing can continue.
- the end conditions (preset end conditions) of the AR-BVP construction process may include but are not limited to: the number of iterations of constructing the AR-BVP, the number of AR-BVPs added to the block vector list, and the number of current block vectors in the block vector list.
- the AR-BVP construction process can be the same or different at different times.
- the first AR-BVP construction can be performed independently of the added AR-BVP (the first candidate block vector).
- the second AR-BVP construction can be performed based on the newly added AR-BVP (the second candidate block vector) to construct multiple AR-BVPs for each guide block vector.
- one or more corresponding reference blocks may be determined according to the guide block vector, and block vectors of one or more corresponding reference blocks may also be determined according to the guide block vector.
- the first guide block vector and the block vector of at least one first reference block are summed respectively to determine the first candidate block vector; and/or, the first guide block vector and at least one block vector of the first reference block are summed respectively to determine the first candidate block vector.
- At least one corresponding reference block can be determined at at least one position in the corresponding reference area, and for any of the reference blocks, the reference block can correspond to at least one block vector.
- FIG14 is a schematic diagram of a block vector for a reference block provided in an embodiment of the present application.
- multiple positions may be checked.
- the center, upper left, upper right, lower left, and lower right of the reference block may be checked in sequence to determine whether a coding block exists. If so, the stored block vectors are used as the block vectors.
- Any reference block may include one or more block vectors.
- the reference block at the center may store two block vectors.
- the number of block vectors in the HMVP added to the block vector list may be determined based on the number of block vectors in the block vector list.
- the number of block vectors added from the HMVP to the block vector list may be adjusted according to the number of block vectors that have been added.
- the number of block vectors in the HMVP added to the block vector list can be set according to N and n, for example, the number of block vectors in the HMVP added to the block vector list is determined to be (N–n)/2.
- the block vector before adding any block vector (AR-BVP block vector or non-AR-BVP block vector) to the block vector list, the block vector may be checked. If the block vector does not meet a preset addition condition, the block vector is not added to the block vector list. If the block vector meets the preset addition condition, the block vector is added to the block vector list.
- the preset addition condition includes at least one of the following: the block vector is different from any block vector in the block vector list; or the reference block corresponding to the block vector exists.
- a check operation may be performed on at least one non-AR-BVP block vector.
- a check operation may be performed on a block vector in the HMVP (a non-AR-BVP block vector) to determine whether the block vector in the HMVP can be added to the block vector list of the current block. If the block vector in the HMVP is the same as a block vector already added to the list, the non-AR-BVP block vector is not added. That is, if the non-AR-BVP block vector for which the check operation is performed does not meet the addition condition, the non-AR-BVP block vector is not added.
- the non-AR-BVP block vector can be added to the block vector list of the current block.
- Step 1303 Determine the prediction block of the current block according to the block vector list of the current block.
- the prediction block of the current block can be further determined based on the block vector list of the current block.
- the constructed block vector list of the current block may include block vectors with sub-pixel precision. Accordingly, when determining the prediction block of the current block based on the block vector list of the current block, the template error value of the block vector in the block vector list may be first determined based on the block vector with sub-pixel precision in the block vector list; and then the prediction block of the current block may be determined based on the template error value of the block vector in the block vector list.
- the block vectors in the block vector list have corresponding sub-pixel precision parameters
- the sub-pixel precision parameters can represent the precision value of the block vector.
- the sub-pixel precision parameter can be a value greater than 0 and less than or equal to 1.
- the sub-pixel precision parameter of a block vector is 1/16.
- the template type parameter and the template size parameter corresponding to the template type parameter can be determined first; then, based on the template type parameter, the template size parameter and the sub-pixel bit parameter of the sub-pixel precision block vector, the adjusted block vector corresponding to the sub-pixel precision block vector can be determined; then, based on the adjusted block vector, the prediction value of the reference template can be determined; finally, the template error value of the block vector in the block vector list can be determined based on the prediction value of the reference template and the reconstructed value of the current template.
- the template type parameter can determine the type of the template, wherein the type of the corresponding template can be determined as the upper template or the left template according to the template type parameter.
- the template size parameter can determine the size of the template, wherein the width or height of the corresponding template can be determined according to the template size parameter.
- the corresponding width is the width value of the current block
- the corresponding height is the width value of the current block.
- the height can be determined by the template size parameter; for the left template, the corresponding height is the height value of the current block, and the corresponding width can be determined by the template size parameter.
- Figure 15 is a schematic diagram of the template provided in an embodiment of the present application.
- the height value of the current block is H
- the width value is W.
- the two template types corresponding to the current block are determined according to the template type parameters, such as the upper template and the left template.
- the width of the upper template can be determined as Tw
- the height of the left template can be determined as Th.
- the template corresponding to the current block and the size value of the template can be determined based on the template type parameter and the template size parameter, and then the sub-pixel bit parameter corresponding to the block vector and the size value of the template can be used to perform adjustments to obtain the adjusted block vector.
- the prediction value of a reference template when determining the prediction value of a reference template based on an adjusted block vector, when a candidate reference template corresponding to the adjusted block vector is available, the prediction value of the reference template can be determined based on the adjusted block vector and a sub-pixel difference algorithm; when the candidate reference template corresponding to the adjusted block vector is not available, the prediction value of the reference template can be determined based on the block vector in a block vector list and a sub-pixel difference algorithm.
- the corresponding candidate reference template can be determined based on the adjusted block vector. If the candidate reference template is available, the prediction value of the reference template can be directly determined based on the adjusted block vector and the sub-pixel difference algorithm; if the candidate reference template is not available, the adjusted block vector is no longer used, and the prediction value of the reference template is determined based on the block vector before adjustment and the sub-pixel difference algorithm.
- a candidate reference template with width and height W and Th is obtained based on BV_top. If the candidate reference template is available, the prediction value of the corresponding reference template can be calculated based on BV_top through a sub-pixel difference algorithm; if the candidate reference template is not available, BV_top can be adjusted to be equal to BV, and the prediction value of the corresponding reference template can be calculated through a sub-pixel difference algorithm.
- the sub-pixel difference algorithm can be implemented by a difference filter, wherein the interpolation filter can be a 2-tap interpolation filter, which can be the same as the 2-tap interpolation filter used in inter-frame prediction and IBC prediction.
- the interpolation filter can be a 2-tap interpolation filter, which can be the same as the 2-tap interpolation filter used in inter-frame prediction and IBC prediction.
- the template error value of the predefined intra-frame non-angle mode can be calculated.
- one mode Planar is predefined, and the template error value of the Planar mode is calculated based on the reference pixel; then the best non-angle prediction method can be selected based on the candidate block vector in the block vector list and the template error value of the intra-frame non-angle mode.
- the reference block of the current block can be obtained based on interpolation filtering, where the interpolation filter can use an n-tap filter, for example, n is 8, which can be the same as the interpolation filter during IBC prediction; after obtaining the best non-angle prediction method, it is combined with the prediction block generated by the intra-frame angle mode derived by HoG to obtain the final prediction block.
- the block vector list of the current block can be obtained by sorting the template error values corresponding to the block vectors in the block vector list. Accordingly, when determining the prediction block of the current block based on the block vector list of the current block, a block vector template error calculation can be first performed on the block vectors in the block vector list to determine the template error values of the block vectors in the block vector list; then, the block vector list can be sorted based on the template error values of the block vectors in the block vector list to obtain a sorted block vector list; finally, the prediction block of the current block can be determined based on the sorted block vector list.
- a preset template error calculation method for calculating template error values for block vectors in the block vector list may be determined first.
- the preset template error calculation method may be determined based on an error calculation method used in a template search process corresponding to the current block, or may be determined based on second syntax identification information transmitted in the bitstream.
- one implementation method is that the second syntax identification information is used to indicate the preset template error calculation method.
- the calculation method is SAD or MR-SAD, which can be represented by cu_tmp_lic_flag.
- the value of the second syntax identification information is a first value, it is determined that the second syntax identification information indicates that the preset template error calculation method is SAD; if the value of the second syntax identification information is a second value, it is determined that the second syntax identification information indicates that the preset template error calculation method is MR-SAD.
- the second syntax identification information is used to indicate whether the preset template error calculation method is SATD or MR-SATD, which can be represented by cu_tmp_lic_flag.
- the value of the second syntax identification information is a first value, it is determined that the second syntax identification information indicates that the preset template error calculation method is SATD; if the value of the second syntax identification information is a second value, it is determined that the second syntax identification information indicates that the preset template error calculation method is MR-SATD.
- the second syntax identification information is used to indicate whether the preset template error calculation method is SATD or SAD, which can be represented by cu_tmp_satd_flag.
- the value of the second syntax identification information is a first value, it is determined that the second syntax identification information indicates that the preset template error calculation method is SATD; if the value of the second syntax identification information is a second value, it is determined that the second syntax identification information indicates that the preset template error calculation method is SAD.
- the first value is different from the second value, and the first value and the second value can be in parameter form or in numeric form.
- the second syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
- the first value can be 1 and the second value can be 0; or, the first value can be 0 and the second value can be 1; or, the first value can be true and the second value can be false; or, the first value can be false and the second value can be true.
- the code stream when performing block vector template error calculation on block vectors in a block vector list and determining the template error value of the block vectors in the block vector list, can be decoded to determine the second syntax identification information; then, a preset template error calculation method is determined based on the second syntax identification information; wherein the preset template error calculation method includes any one of the following: SAD, MR-SAD, SATD, MR-SATD; finally, based on the preset template error calculation method, it can be determined that the block vectors in the candidate block vector list correspond to a template error value of at least one template type.
- the preset template error calculation method for performing block vector template error calculation is SAD, MR-SAD, SATD, or MR-SATD.
- the second syntax identification information is represented by cu_tmp_lic_flag
- the preset template error calculation method is SAD or MR-SAD
- SATD the preset template error calculation method
- cu_tmp_satd_flag the value of cu_tmp_satd_flag can be used to determine whether the preset template error calculation method is SAD or SATD.
- the values of cu_tmp_lic_flag and cu_tmp_satd_flag can be used to determine whether the preset template error calculation method is SAD, MR-SAD, SATD, or MR-SATD.
- the preset template error calculation method is SATD
- the preset template error calculation method is MR-SATD
- a first template error calculation method for sparse search and a second template error calculation method for fine search and block vector template error calculation are determined, that is, the template error calculation method of the block vector template error is consistent with that of the fine search stage.
- the sparse search stage uses MR-SAD (the first template error calculation method)
- the fine search stage uses MR-SATD (the second template error calculation method)
- the block vector template error calculation uses MR-SATD.
- a third template error calculation method and a fourth template error calculation method can be determined based on the second grammar identification information; wherein, the third template error calculation method is used to perform a sparse search and block vector template error calculation of at least one template type, and the fourth template error calculation method is used to perform a fine search of at least one template type.
- a third template error calculation method for sparse search and block vector template error calculation, and a fourth template error calculation method for fine search can be determined, that is, the block vector template error calculation is consistent with the template error calculation method in the sparse search stage.
- the sparse search stage uses SAD (the third template error calculation method), the block vector template error calculation uses SATD, and the fine search stage uses SATD (the fourth template error calculation method).
- a fifth template error calculation method can be determined based on the second grammar identification information; wherein, the fifth template error calculation method is used to perform a sparse search of at least one template type, a fine search of at least one template type, and a block vector template error calculation.
- the fifth template error calculation method for performing sparse search, fine search and block vector template error calculation can be determined, that is, the block vector template error calculation is consistent with the template error calculation method of the fine search stage and the sparse search stage.
- the sparse search stage uses MR-SAD (the fifth template error calculation method)
- the fine search stage uses MR-SAD
- the block vector template error calculation uses MR-SAD.
- a sixth template error calculation method for sparse search, fine search and block vector template error calculation can be determined, that is, the block vector template error calculation is consistent with the template error calculation method of the fine search stage and the sparse search stage, and the calculation method is determined by the values of cu_tmp_lic_flag and cu_tmp_satd_flag.
- the value of the first information cu_tmp_lic_flag in the second syntax identification information is the first value, it can be determined to use SAD or SATD. If the value of cu_tmp_satd_flag is the first value, it can be further determined to use SATD. If the value of cu_tmp_satd_flag is the second value, it can be further determined to use SAD.
- the cu_tmp_satd_flag and cu_tmp_lic_flag flags can be encoded at the same time to determine whether the template error of the search and block vector list is calculated using SAD, SATD, MR-SAD, or MR-SATD.
- block vector template error calculation can be performed on the block vectors in the block vector list according to the preset template error calculation method of the sparse search in the template search process corresponding to the current block to determine the template error value of the block vectors in the block vector list; or, block vector template error calculation can be performed on the block vectors in the block vector list according to the preset template error calculation method of the fine search in the template search process corresponding to the current block to determine the template error value of the block vectors in the block vector list.
- the preset template error calculation method for block vector template error calculation can directly reuse the template error calculation method of the sparse search stage, or the preset template error calculation method for block vector template error calculation can directly reuse the template error calculation method of the fine search stage.
- the code stream can be decoded to determine the third syntax identification information; then, at least one number of templates corresponding to at least one template type is determined based on the third syntax identification information; and then, based on the at least one number of templates, the template error values of the block vectors in the candidate block vector list corresponding to at least one template type are sorted respectively to obtain at least one first candidate list corresponding to at least one template type.
- the number of templates corresponding to different template types can be determined. Then, based on the number of templates, the template error values of the block vectors under different template types are sorted, and finally the first candidate lists corresponding to different template types can be obtained, that is, the sorted block vector list includes the first candidate lists corresponding to different template types.
- the third syntax identification information is used to indicate the number of templates corresponding to different template types, which can be represented by cu_tmp_idx.
- the search results that need to be maintained corresponding to different template types can be determined. For example, based on the value of the third syntax identification information, it is determined that the search results corresponding to the L-type template, the upper template, and the left template need to be maintained respectively, that is, the number of templates corresponding to the L-type template, the upper template, and the left template is determined to be M0, M1, and M2, where M0, M1, and M2 are all integers greater than or equal to 0.
- the current block uses MR-SAD to calculate the template error.
- the template error is calculated using MR-SAD for the block vectors in the block vector list, and the template error values diff0, diff1, and diff2 corresponding to the L-type template, the upper template, and the left template are obtained, respectively.
- sparseList0', sparseList1' and sparseList2' are the third candidate lists corresponding to the L-shaped template, the upper template and the left template, respectively.
- a fine search can be performed respectively to obtain the search results sparselist0’, sparselist1’ and sparselist2’ under the template error values corresponding to the L-shaped template, upper template and left template; wherein, sparselist0’, sparselist1’ and sparselist2’ are the fourth candidate lists corresponding to the L-shaped template, upper template and left template respectively.
- AR-BVP construction can be performed based on any of the second candidate lists. Specifically, a third reference block vector can be first determined based on the second candidate list, and then a third candidate block vector for the current block can be determined based on the third reference block vector. Subsequently, a template error value corresponding to the third candidate block vector can be determined, and the second candidate list can be updated based on the template error value corresponding to the third candidate block vector.
- block vectors in the candidate list sparseList obtained through sparse search can be used as guide block vectors (third guide block vectors) to construct AR-BVP candidates (third candidate block vectors). Template error values for these AR-BVP candidates can then be calculated and the sparseList can be updated. SparseLists of different template types can be used to construct AR-BVP candidates, and the sparseList can be updated based on the template error values of the AR-BVP candidates.
- a sparse search can be first performed according to at least one template type to obtain at least one second candidate list corresponding to the at least one template type; then the first candidate list corresponding to the preset template type and the at least one second candidate list are merged to obtain at least one third candidate list corresponding to the at least one template type; then, based on the at least one third candidate list, a fine search can be performed according to at least one template type to obtain at least one fourth candidate list corresponding to the at least one template type; finally, a target candidate list corresponding to the current block can be determined based on the at least one fourth candidate list, and the prediction block of the current block can be determined based on the target candidate list.
- the preset template type may be any one of an L-shaped template, an upper template, and a left template.
- mrgList0 when merging the block vector list and the sparse search results, mrgList0 can be merged with sprseList0, sprseList1 and sprseList2 respectively, and then the merged lists are recorded as sparseList0’, sparseList1’ and sparseList2’, sparseList0’, sparseList1’ and sparseList2’ are the third candidate lists corresponding to the L-shaped template, upper template and left template respectively.
- a block vector list mrgList can be constructed and reordered according to a preset template type (such as an L-type template), and candidate lists sparseList0, sparseList1 and sparseList2 under the L-type template, upper template and left template are obtained according to a sparse search. Subsequently, only mrgList can be merged with sparseList0, sparseList1 and sparseList2 respectively.
- a preset template type such as an L-type template
- all template search areas corresponding to all block vectors in the third candidate list are the same; or, in a process of performing a fine search based on at least one third candidate list, the template search areas corresponding to the fourth block vectors in the third candidate list are the same; wherein the fourth block vector is a block vector derived from the first candidate list.
- the template search regions corresponding to the block vectors in the third candidate list may be the same or different.
- the two template search regions corresponding to any two block vectors in the third candidate list may be the same; or, the two template search regions corresponding to any two fourth block vectors in the third candidate list may be the same.
- the fourth block vector may be a block vector in the third candidate list that originates from the first candidate list. That is, during the merging of the first candidate list with the second candidate list, the fourth block vector in the first candidate list forms the third candidate list.
- the code stream when determining the prediction block of the current block based on the block vector list of the current block, can also be decoded to determine the block vector index number of the current block; then, based on the block vector index number and the block vector list of the current block, the target block vector of the current block can be determined; finally, the prediction block of the current block can be determined based on the target block vector.
- the prediction block of the current block can be further determined based on the decoded block vector index number in combination with the constructed block vector list of the current block. For example, in IBC merge mode, a block vector is selected from the block vector list based on the decoded merge index (block vector index number), thereby obtaining the reference block of the current block as the prediction block.
- the code stream is decoded to determine a residual block of the current block; and then a reconstructed block of the current block can be determined based on the residual block and the prediction block.
- the sum of the residual block and the prediction block can be determined as the reconstructed block of the current block.
- the construction and/or use process of the block vector list in the intra-frame prediction process is adjusted and improved.
- the AR-BVP candidate block vector can be constructed in batches.
- the block vector of the reference block can be directly used as the candidate block vector to be added to the block vector list; on the other hand, a block vector list with sub-pixel precision can be used for intra-frame prediction; on the other hand, multiple methods can be used to determine multiple template error calculation methods, so that the block vector list can be reordered using different template error calculation methods.
- the decoding method proposed in the embodiment of the present application is an improved method for constructing and/or using a block vector list, wherein the block vector list can be an AMVP/Merge list of the IBC mode, a Merge list of the IntraTMP mode, or a block vector list constructed in other intra-frame modes to obtain predictions based on block vectors.
- the block vector list can be an AMVP/Merge list of the IBC mode, a Merge list of the IntraTMP mode, or a block vector list constructed in other intra-frame modes to obtain predictions based on block vectors.
- the AR-BVP candidate block vectors can be constructed in stages, and/or; the block vectors of the reference blocks can be directly added to the block vector list, and/or; a block vector list with sub-pixel precision can be used in the intra-frame mode, and/or; different template error calculation methods can be used to sort the block vector list, etc., thereby improving the diversity of the block vector list and the efficiency of the block vector list.
- the decoding method proposed in the embodiment of the present application is exemplified in the IBC mode with the first syntax identification information being cu_pred_mode.
- the AR-BVP can be constructed in multiple steps, and the block vector of the reference block can also be directly added to the block vector list as a block vector candidate.
- the prediction mode is IBC mode
- LIC local illumination compensation
- the AR-BVP After adding adjacent/non-adjacent block vectors, the AR-BVP is constructed. After that, after adding block vectors in the historical block vector cache list, the AR-BVP is constructed.
- the guide block vectors for constructing AR-BVP may include: all block vectors already in the list, part (one or more) of the block vectors in the list, and a newly constructed block vector (AR-BVP). After determining a certain guide block vector, one or more AR-BVPs may be constructed.
- the end conditions of the construction process may include: the number of iterations of constructing AR-BVP, the number of added AR-BVPs, and the number of current lists; the process of constructing AR-BVPs may be different for different times. For example, when constructing AR-BVP for the first time, all the block vectors already in the list are used as guide block vectors, and construction is not continued based on the added AR-BVP. When constructing AR-BVP for the second time, all the block vectors already in the list and the newly added AR-BVP are used as guide block vectors, and each guide block vector constructs multiple AR-BVPs;
- BV_arbvp and BV_ext can be checked and added separately;
- the number of block vectors (HMVP candidates) added from the HMVP cache can be adjusted based on the number of block vectors already added. For example, if the maximum length of the IBC block vector list is N and there are already n HMVP candidates in the list before adding them, then at most (N – n)/2 HMVP candidates can be added.
- a Y component coding gain of approximately -0.03% can be achieved when the method of directly using the block vector of the reference block as the candidate block vector is applied to the IntraTMP mode.
- DIMD mode a sub-pixel precision block vector list can be constructed.
- a prediction block based on sub-pixel interpolation is obtained based on the block vectors in the block vector list. This is then combined with the prediction block obtained by intra prediction to obtain the final prediction block.
- the prediction block based on sub-pixel difference can be combined with the intra mode prediction block derived from the gradient histogram (HoG).
- HoG gradient histogram
- cu_dimd_flag When cu_dimd_flag is true, it indicates that the current coding block uses the DIMD prediction mode.
- the current block can obtain the HoG based on the reconstructed area (or encoded information) and derive the intra-frame angle mode to generate the corresponding prediction block.
- Candidate block vectors can be obtained from adjacent blocks, non-adjacent blocks, AR-BVP candidates, historical block vector cache, etc.
- the width and height of the template are Tw and Th.
- the width and height of the current block are W and H.
- the template area is shown in Figure 15.
- the candidate block vector is BV, and the predictions for the upper template and the left template are obtained respectively.
- the upper template area is obtained.
- BV is adjusted according to the template height Th
- BV_top BV + (Th ⁇ mv_bits)
- mv_bits is the number of sub-pixel bits. Taking the upper left corner of the current block as the reference, obtain a reference block with a width and height of W and Th according to BV_top. If the reference block is not available, adjust BV_top to be equal to BV and obtain the reference block. If BV contains a sub-pixel part, the reference block is obtained based on sub-pixel interpolation.
- the interpolation filter can be a 2-tap interpolation filter, which can be the same as the 2-tap interpolation filter used in inter-frame prediction and IBC prediction.
- the obtained reference block is used as the prediction of the upper template area.
- the prediction of the left template area is obtained.
- the template error value such as the SAD value, is calculated;
- the template error value of the predefined non-angle mode within the frame can be calculated.
- a predefined mode Planar is used to calculate the template error value of the Planar mode based on the reference pixels;
- the best prediction method is to use a candidate block vector, when the block vector has sub-pixel accuracy, the reference block of the current block can be obtained based on interpolation filtering, where the interpolation filter can use an n-tap filter, for example, n is 8, which can be the same as the interpolation filter used in IBC prediction;
- the best non-angle prediction method is obtained, and it is combined with the prediction block generated by the intra-frame angle mode derived by HoG to obtain the final prediction block, completing the encoding of the current block.
- a Y component coding gain of approximately -0.01% can be achieved when the sub-pixel block vector list is applied to the DIMD and SGPM modes.
- the decoding method proposed in the embodiment of the present application is exemplified in the IntraTMP mode, with the first syntax identification information being cu_tmp_flag, the second syntax identification information being cu_tmp_lic_flag, and the third syntax identification information being cu_tmp_idx.
- the block vector list can be reordered according to the template error.
- the template area and error calculation method can be predefined for the block vector list, or can be consistent with the current prediction process.
- the IntraTMP mode as an example, the current block can use error calculation methods such as SAD and MR-SAD, and the template area can be divided into L-type template, upper template and left template.
- the corresponding syntax elements in the prediction process based on the block vector list are as follows:
- the candidate block vectors can be obtained from adjacent blocks, non-adjacent blocks, AR-BVP candidates, historical block vector cache, etc.
- MR-SAD is used to calculate the template error for the candidates in the block vector list, and the template error values diff0, diff1, and diff2 corresponding to the L-type template, upper template, and left template are obtained respectively.
- the best M0, M1, and M2 candidate block vectors under the L-type template, upper template, and left template are obtained, which can be recorded as mrgList0, mrgList1, and mrgList2;
- the maximum template errors pDiff0, pDiff1, and pDiff2 of the L-shaped template, the upper template, and the lower left template can be obtained.
- This value is related to the template error value of the candidate in the block vector list.
- pDiff0 can be equal to the maximum diff0 in the mrgList0 candidate plus 1.
- the template error value of the candidate block vector searched needs to be less than pDiff;
- sparseList0, sparseList1 and sparseList2 which are the search results under the template error values corresponding to the L-shaped template, upper template and left template respectively;
- the final candidate list can be obtained by merging sparselist0’, sparselist1’ and sparselist2’;
- the IntraTMP mode can use SATD and MR-SATD as the calculation method of the template error.
- One implementation method is to use SAD in the sparse search stage and SATD in the fine search stage. If the cu_tmp_lic_flag flag of the current block is true, MR-SAD and MR-SATD are used accordingly.
- SATD or MR-SATD can be used when calculating the template error value of the block vector list, which is consistent with the fine search stage; another implementation method is to indicate whether SATD is used during the search by writing the flag cu_tmp_satd_flag of the code stream.
- SAD is used when cu_tmp_satd_flag is false
- SATD is used when cu_tmp_satd_flag is true.
- the template error value calculation of the block vector list can be determined by the cu_tmp_satd_flag flag.
- the calculation method is SAD when cu_tmp_satd_flag is false and SATD when cu_tmp_satd_flag is true.
- the candidate list sparseList obtained by sparse search can be used as a guide block vector to construct AR-BVP candidates, calculate the template error values of these AR-BVP candidates, and update the sparseList (the list stores the n candidates with the smallest template error values).
- SparseLists of different template types can be used to construct AR-BVP candidates, and the sparseList is updated based on the template error values of the AR-BVP candidates.
- a block vector list when used in the IntraTMP mode search process, it can only be used for searches corresponding to one template type.
- a block vector list mrgList is constructed and reordered based on the L-shaped template, and candidate lists sparseList0, sparseList1, and sparseList2 under the L-shaped template, the upper template, and the left template are obtained through sparse search.
- mrgList can be merged with sparseList0 (the candidate list corresponding to the L-shaped template).
- An embodiment of the present application provides a coding and decoding method, which, when a current block uses a preset intra-frame prediction mode, constructs a block vector list of the current block; determines a prediction block of the current block based on the block vector list of the current block; wherein the block vector list of the current block satisfies at least one of the following: the block vector list is constructed by executing at least two AR-BVPs, and between executing at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector; the block vector list includes block vectors of reference blocks corresponding to the reference block vector of the current block; the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, or TIMD, or SGPM; the block vector list is obtained by sorting template error values corresponding to the block vectors in the block vector list; wherein the template error value of the block vector is determined by a preset template error calculation method, which is determined
- the construction and/or use process of the block vector list in the intra-frame prediction process can be adjusted and improved.
- the diversity of the block vector list can be improved by constructing AR-BVP candidate block vectors in batches, and/or directly using the block vector of the reference block as a candidate block vector to add to the block vector list, and/or using a block vector list with sub-pixel precision for intra-frame prediction, and/or using different template error calculation methods to reorder the block vector list, etc., thereby improving the efficiency of intra-frame prediction and improving encoding and decoding performance.
- FIG16 is a flow chart of an encoding method provided in an embodiment of the present application. As shown in FIG16 , the method may include:
- Step 1601 When it is determined that the current block uses a preset intra prediction mode, first syntax identification information is written into a bitstream; wherein the first syntax identification information indicates that the current block uses the preset intra prediction mode.
- the method is applied to an encoder.
- the encoding method of the embodiments of the present application can be applied to intra-frame prediction, primarily to the intra-frame prediction method constructed using a block vector list, thereby improving the prediction efficiency of intra-frame prediction.
- the first syntax identification information is used to indicate whether the current block uses a preset intra-frame prediction mode. In some embodiments, if the value of the first syntax identification information is a first value, it is determined that the first syntax identification information indicates that the current block uses the preset intra-frame prediction mode; if the value of the first syntax identification information is a second value, it is determined that the first syntax identification information indicates that the current block does not use the preset intra-frame prediction mode.
- the preset intra-frame prediction mode may include at least one of the following: intra-frame block copy IBC, intra-frame template matching prediction IntraTMP, spatial geometry partitioning mode SGPM, decoding-end intra-frame mode derivation DIMD, and template-based intra-frame mode derivation TIMD.
- the representation method of the first syntax identification information can be different.
- the corresponding first syntax identification information can be expressed as cu_pred_mode
- the corresponding first syntax identification information can be expressed as cu_dimd_flag
- the corresponding first syntax identification information can be expressed as cu_tmp_flag.
- the first value is different from the second value, and the first value and the second value can be in parameter form or in numeric form.
- the first syntax identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
- the first value can be 1 and the second value can be 0; or, the first value can be 0 and the second value can be 1; or, the first value can be true and the second value can be false; or, the first value can be false and the second value can be true.
- the corresponding first syntax identification information can be further determined, and the first syntax identification information can be written into the code stream and transmitted to the encoding end, so that the encoding end determines the preset intra-frame prediction mode used by the current block based on the first syntax identification information obtained by decoding.
- the preset intra-frame prediction mode can be to perform intra-frame prediction by constructing a block vector list. Measurement mode.
- the preset intra prediction mode may include at least one of the following: intra block copy IBC, intra template matching prediction IntraTMP, spatial geometry partitioning mode SGPM, decoding-end intra mode derivation DIMD, and template-based intra mode derivation TIMD.
- IBC realizes prediction through the block vector pointing from the current block to the reference block;
- IntraTMP uses template matching to use the reconstructed block corresponding to the most similar template as the matching block, which is used as the prediction block of the current coding block;
- SGPM can weightedly combine two intra-frame prediction blocks, and the weight value can correspond to different geometric division methods;
- DIMD will derive multiple intra-frame angle modes based on HoG, and will also derive an optimal non-angle mode by constructing a block vector list and calculating the template error, and weightedly combine the prediction blocks of these modes to obtain the final prediction block;
- TIMD constructs the most likely mode (MPM) list based on the existing coding information, and predicts the mode in the list in the template area to obtain the corresponding template error value, thereby deriving the optimal intra-frame mode.
- MPM most likely mode
- Step 1602 Construct a block vector list for the current block; wherein the block vector list for the current block may satisfy at least one of the following: the block vector list is constructed by executing AR-BVP at least twice, and between executing AR-BVP at least twice, a check operation is performed on at least one non-AR-BVP block vector; the block vector list includes block vectors of reference blocks corresponding to the reference block vector of the current block; the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, or TIMD, or SGPM; the block vector list is obtained by sorting template error values corresponding to the block vectors in the block vector list; wherein the template error value of the block vector is determined by a preset template error calculation method, which is determined according to the error calculation method of the template search process corresponding to the current block or the second syntax identification information transmitted in the bitstream.
- the block vector list is constructed by executing AR-BVP at least twice, and between executing AR-BVP at least
- a block vector list of the current block can be further constructed.
- the block vector list of the current block may satisfy at least one of the following:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, or TIMD, or SGPM;
- the block vector list is obtained by sorting the template error values corresponding to the block vectors in the block vector list; wherein the template error value of the block vector is determined by a preset template error calculation method, and the preset template error calculation method is determined based on the error calculation method of the template search process corresponding to the current block or the second syntax identification information transmitted in the code stream.
- the block vector list for the current block may be constructed through at least two AR-BVP passes, and between the at least two AR-BVP passes, a check operation may be performed on at least one non-AR-BVP block vector.
- different candidate block vectors may be obtained through at least two AR-BVP passes, and the obtained candidate block vectors may be checked and added to the block vector list.
- a check operation may also be performed on at least one non-AR-BVP block vector.
- the block vector list of the current block may include a reference block vector corresponding to the guide block vector of the current block.
- the block vector of the reference block determined based on the guide block vector in the AR-BVP process may be directly used as a candidate block vector, and the candidate block vector may be checked and added to the block vector list.
- the constructed block vector list of the current block may include block vectors with sub-pixel precision.
- the block vectors added to the block vector list of the current block may be of sub-pixel precision, thereby obtaining a prediction block with sub-pixel precision.
- the block vector list for the current block may be obtained by sorting the template error values corresponding to the block vectors in the block vector list.
- a preset template error calculation method for calculating the template error values of the block vectors in the block vector list may be first determined.
- the preset template error calculation method may be determined based on the error calculation method used in the template search process corresponding to the current block, or may be determined based on second syntax identification information transmitted in the bitstream.
- the first block vector in the block vector list of the current block can be determined as the first guide block vector of the current block, and the first candidate block vector of the current block can be determined based on the first guide block vector; wherein the first block vector includes at least one of the following: a block vector of an adjacent block of the current block, a block vector of a non-adjacent block of the current block, and a block vector in a historical block vector cache list HMVP; then the first candidate block vector and the second block vector are added to the block vector list; wherein the second block vector can be a non-AR-BVP block vector, for example, the second block vector can be a non-AR-BVP block vector different from the first block vector; then the third block vector in the block vector list is determined as the second guide block vector of the current block, and the second candidate block vector of the current block is determined based on the second guide block vector; wherein the third block vector at least includes the first candidate
- the block vector list of the current block can be constructed by first using the block vectors of the adjacent blocks of the current block, the block vectors of the non-adjacent blocks of the current block, and any number of block vectors in the block vector cache list HMVP of the history block vector.
- the first block vector may be any one or more block vectors in the block vector list of the current block, that is, the first block vector may be a non-AR-BVP block vector.
- the second block vector may be a non-AR-BVP block vector
- the second block vector may be a non-AR-BVP block vector different from the first block vector
- the second block vector may also be a block vector of an adjacent block of the current block, a block vector of a non-adjacent block of the current block, or any number of block vectors in the historical block vector cache list HMVP that are different from the first block vector.
- the third block vector may include the first candidate block vector constructed through AR-BVP, and may also include the first block vector and/or the second block vector. That is, after the first candidate block vector and the second block vector are added to the block vector list of the current block, in addition to the first candidate block vector being used as the guidance block vector for the next AR-BVP, other block vectors in the block vector list of the current block may also be used as guidance block vectors for the next AR-BVP.
- the first block vector in the block vector list of the current block can be used as the first guide block vector, and then the corresponding first candidate block vector can be determined based on the first guide block vector, wherein the first candidate block vector is the AR-BVP block vector.
- the obtained first candidate block vector (AR-BVP block vector) and the second block vector (a non-AR-BVP block vector different from the first block vector) can be added to the block vector list of the current block.
- the AR-BVP can be constructed in two steps.
- the candidate block vectors can be checked and added in the following order:
- the first block vector in the block vector list of the current block can be determined as the first guide block vector of the current block, and the first reference block corresponding to the first guide block vector can be determined; wherein the first block vector includes at least one of the following: a block vector of an adjacent block of the current block, a block vector of a non-adjacent block of the current block, and a block vector in the HMVP; then the block vector of the first reference block is determined as the first candidate block vector of the current block; and/or, the first guide block vector and the block vector of the first reference block are summed to determine the first candidate block vector of the current block; and finally, the first candidate block vector can be added to the block vector list.
- the corresponding reference block when constructing a block vector list for the current block, the corresponding reference block may be first determined based on the guide block vector, and then the corresponding candidate block vector may be determined using the block vector of the reference block. After AR-BVP processing is completed, when determining the candidate block vector using the block vector of the reference block, the sum of the guide block vector and the block vector of the reference block may be used to determine the candidate block vector and add it to the block vector candidate list, or the block vector of the reference block may be directly used to determine the candidate block vector and add it to the block vector candidate list.
- the first reference block in the process of determining the first candidate block vector based on the first guide block vector, can be first determined based on the first guide block vector, and then the first candidate block vector can be determined based on the block vector of the first reference block.
- the first candidate block vector can be determined by summing the first guide block vector and the block vector of the first reference block, or the block vector of the first reference block can be directly determined as the first candidate block vector.
- the first candidate block vector can also include both the sum of the first guide block vector and the block vector of the first reference block and the block vector of the first reference block, as well as the block vector of the first reference block.
- the block vector of the reference block determined according to the reference block vector can be directly added to the block vector list as a candidate block vector, that is, the block vector list of the current block includes the block vector of the reference block corresponding to the reference block vector of the current block.
- the block vector of the reference block can be directly used as a block vector candidate.
- Select candidate block vector.
- each time a reference block vector is obtained based on the guide block vector BV_arbvp and BV_ext can be added to the block vector list as candidate block vectors.
- the first block vector in the block vector list of the current block may be first determined as the first guide block vector of the current block, and a first reference block corresponding to the first guide block vector may be determined; wherein the first block vector includes at least one of the following: a block vector of an adjacent block of the current block, a block vector of a non-adjacent block of the current block, and a block vector in an HMVP; then the block vector of the first reference block is determined as the first candidate block vector of the current block; and/or, the first guide block vector and the block vector of the first reference block are summed to determine the first candidate block vector of the current block; then the first candidate block vector and the second block vector may be summed to determine the first candidate block vector of the current block.
- the amount is added to the block vector list; wherein the second block vector can be a non-AR-BVP block vector, for example, the second block vector can be a non-AR-BVP block vector different from the first block vector; then the third block vector in the block vector list is determined as the second guide block vector of the current block, and the second reference block corresponding to the second guide block vector is determined; wherein the third block vector at least includes the first candidate block vector; then the block vector of the second reference block is determined as the second candidate block vector of the current block; and/or, the second guide block vector and the block vector of the second reference block are summed to determine the second candidate block vector of the current block; finally, the second candidate block vector can be added to the block vector list.
- the first block vector in the block vector list of the current block can be used as the first guide block vector, and then the corresponding first candidate block vector is determined based on the first guide block vector, wherein the first candidate block vector is an AR-BVP block vector, and the first candidate block vector may include the block vector of the first reference block corresponding to the first candidate block vector, and/or the sum of the first guide block vector and the block vector of the corresponding first reference block.
- the obtained first candidate block vector (AR-BVP block vector) and the second block vector (a non-AR-BVP block vector different from the first block vector) can be added to the block vector list of the current block.
- a second AR-BVP process is performed.
- the third block vector in the block vector list can be used as a second guide block vector, where the third block vector includes at least the first candidate block vector obtained by the first AR-BVP process.
- a corresponding second candidate block vector can then be determined based on the second guide block vector.
- the second candidate block vector is an AR-BVP block vector and can include the block vector of the second reference block corresponding to the second candidate block vector and/or the sum of the second guide block vector and the block vector of the corresponding second reference block.
- the obtained second candidate block vector can be added to the block vector list.
- AR-BVP when constructing the block vector list, AR-BVP can be constructed in at least two steps; at the same time, during the AR-BVP processing, the block vector of the reference block can be directly used as the candidate block vector.
- the guide block vector may be determined based on existing block vectors in the block vector list.
- the first guide block vector in the first AR-BVP process and the second guide block vector in the second AR-BVP process may be partially identical or completely different.
- the process of constructing an AR-BVP can be the same or different at different times. For example, when constructing an AR-BVP for the first time, all existing block vectors in the block vector list can be used as guide block vectors; when constructing an AR-BVP for the second time, all existing block vectors in the list and the newly added AR-BVP can be used as guide block vectors.
- the first guide block vector in the first AR-BVP processing process may include some or all block vectors in the block vector list
- the second guide block vector in the second AR-BVP processing process may include a non-AR-BVP block vector in the block vector list that is different from the first guide block vector, and may also include a newly constructed AR-BVP block vector (i.e., the first candidate block vector) added to the block vector list after the first AR-BVP processing.
- AR-BVP processing can be performed based on the guidance block vector of the current block to obtain at least one candidate block vector, so that a block vector list of the current block can be constructed until a preset end condition is met; wherein the preset end condition includes at least one of the following: the number of AR-BVP processes is greater than or equal to a preset threshold; the number of candidate block vectors determined by AR-BVP processing is greater than or equal to a first number threshold; the number of block vectors in the block vector list is greater than or equal to a second number threshold.
- the preset threshold, the first quantity threshold, and the second quantity threshold can all be pre-set integers greater than 0, and this application does not specifically limit them.
- the preset threshold can be 3, the first quantity threshold can be 5, and the second quantity threshold can be 15.
- One or more AR-BVP block vectors can be constructed.
- reference block B1 is first determined based on reference block vector BV0,1 .
- AR-BVP processing can be continued.
- the end conditions (preset end conditions) of the AR-BVP construction process may include but are not limited to: the number of iterations of constructing the AR-BVP, the number of AR-BVPs added to the block vector list, and the number of current block vectors in the block vector list.
- the AR-BVP construction process can be the same or different at different times.
- the first AR-BVP construction can be performed independently of the added AR-BVP (the first candidate block vector).
- the second AR-BVP construction can be performed based on the newly added AR-BVP (the second candidate block vector) to construct multiple AR-BVPs for each guide block vector.
- the guide block vector and the block vector of at least one reference block are summed respectively to determine the candidate block vector; and/or, the guide block vector and at least one block vector of the reference block are summed respectively to determine the candidate block vector.
- one or more corresponding reference blocks may be determined according to the guide block vector, and block vectors of one or more corresponding reference blocks may also be determined according to the guide block vector.
- any reference block may include one or more block vectors.
- the number of block vectors added from the HMVP to the block vector list may be adjusted according to the number of block vectors that have been added.
- the number of block vectors in the HMVP added to the block vector list can be set according to N and n, for example, the number of block vectors in the HMVP added to the block vector list is determined to be (N–n)/2.
- the non-AR-BVP block vector can be added to the block vector list of the current block.
- the height value of the current block is H
- the width value is W.
- Two template types corresponding to the current block are determined according to the template type parameters, such as the upper template and the left template.
- the width of the upper template can be determined as Tw based on the template size parameters of the upper template
- the height of the left template can be determined as Th based on the template size parameters of the left template.
- the prediction of the left template region can also be obtained in the above manner, that is, the prediction value of the corresponding reference template can be further determined based on BV_left.
- the template error value corresponding to the block vector can be calculated based on the prediction value of the reference template and the reconstructed value of the current template, and then the prediction block of the current block can be determined based on the template error value of the block vector in the block vector list.
- the preset template error calculation method is SATD
- the preset template error calculation method is MR-SATD
- a preset template error calculation method when performing block vector template error calculation on block vectors in a block vector list and determining the template error value of the block vector in the block vector list, a preset template error calculation method can be determined, and second syntax identification information can be written into the bitstream; wherein the second syntax identification information is used to determine the preset template error calculation method, and the preset template error calculation method includes any one of the following: SAD, MR-SAD, SATD, MR-SATD; finally, based on the preset template error calculation method, it can be determined that the block vector in the candidate block vector list corresponds to a template error value of at least one template type.
- the preset template error calculation method for performing block vector template error calculation may include any one of SAD, MR-SAD, SATD, and MR-SATD. After determining the preset template error calculation method for performing block vector template error calculation, corresponding second syntax identification information may be further determined, and the second syntax identification information may be written into the bitstream for transmission to the decoding end.
- the second syntax identification information is represented by cu_tmp_lic_flag
- the preset template error calculation method is SAD or MR-SAD
- SATD the preset template error calculation method
- the values of cu_tmp_lic_flag and cu_tmp_satd_flag can be used to determine whether the preset template error calculation method is SAD, MR-SAD, SATD, or MR-SATD.
- a third template error calculation method for sparse search and block vector template error calculation, and a fourth template error calculation method for fine search can be determined, that is, the block vector template error calculation is consistent with the template error calculation method in the sparse search stage.
- a fifth template error calculation method when determining the preset template error calculation method, can be determined; wherein, the fifth template error calculation method is used to perform a sparse search of at least one template type, a fine search of at least one template type, and a block vector template error calculation.
- a fifth template error calculation method can be determined for performing sparse search, fine search and block vector template error calculation, that is, the block vector template error calculation is consistent with the template error calculation method of the fine search stage and the sparse search stage.
- the second syntax identification information includes first information and second information, and when determining the preset template error calculation method, a sixth error calculation method is determined; wherein the sixth error calculation method is used to perform a sparse search of at least one template type, a fine search of at least one template type and a block vector template error calculation; and then the first information and the second information can be determined according to the sixth error calculation method.
- the cu_tmp_satd_flag and cu_tmp_lic_flag flags can be encoded at the same time to indicate which of SAD, SATD, MR-SAD, and MR-SATD is used to calculate the template error of the search and block vector list.
- the block vector list when the block vector list is sorted according to the template error values of the block vectors in the block vector list to obtain the sorted block vector list, at least one number of templates corresponding to at least one template type can be determined, and third syntax identification information can be written into the bitstream; wherein the third syntax identification information is used to determine the at least one number of templates corresponding to the at least one template type; then, based on the at least one template number, the template error values corresponding to the at least one template type of the block vectors in the candidate block vector list are sorted respectively to obtain at least one first candidate list corresponding to the at least one template type.
- the number of templates corresponding to different template types can be determined, and then the template error values of block vectors under different template types can be sorted based on the number of templates. Finally, the first candidate list corresponding to different template types can be obtained, that is, the sorted block vector list includes the first candidate list corresponding to different template types.
- a sparse search can be first performed according to at least one template type to obtain at least one second candidate list corresponding to the at least one template type; then the at least one first candidate list and the at least one second candidate list can be merged to obtain at least one third candidate list corresponding to the at least one template type; then, based on the at least one third candidate list, a fine search can be performed according to at least one template type to obtain at least one fourth candidate list corresponding to the at least one template type; finally, the target candidate list corresponding to the current block can be determined according to the at least one fourth candidate list, and the prediction block of the current block can be determined according to the target candidate list.
- sparse searches are performed for the L-shaped template, upper template, and left template, respectively, and the search results are recorded as sparseList0, sparseList1, and sparseList2, which are the search results under the template error values corresponding to the L-shaped template, upper template, and left template, respectively; wherein, sparseList0, sparseList1, and sparseList2 are the second candidate lists corresponding to the L-shaped template, upper template, and left template, respectively.
- a fine search can be performed respectively to obtain the search results sparselist0’, sparselist1’ and sparselist2’ under the template error values corresponding to the L-shaped template, upper template and left template; wherein, sparselist0’, sparselist1’ and sparselist2’ are the fourth candidate lists corresponding to the L-shaped template, upper template and left template respectively.
- AR-BVP construction can be performed based on any of the second candidate lists. Specifically, a third reference block vector can be first determined based on the second candidate list, and then a third candidate block vector for the current block can be determined based on the third reference block vector. Subsequently, a template error value corresponding to the third candidate block vector can be determined, and the second candidate list can be updated based on the template error value corresponding to the third candidate block vector.
- block vectors in the candidate list sparseList obtained through sparse search can be used as guide block vectors (third guide block vectors) to construct AR-BVP candidates (third candidate block vectors). Template error values for these AR-BVP candidates can then be calculated and the sparseList can be updated. SparseLists of different template types can be used to construct AR-BVP candidates, and the sparseList can be updated based on the template error values of the AR-BVP candidates.
- a sparse search can be first performed according to at least one template type to obtain at least one second candidate list corresponding to the at least one template type; then the first candidate list corresponding to the preset template type and the at least one second candidate list are merged to obtain at least one third candidate list corresponding to the at least one template type; then, based on the at least one third candidate list, a fine search can be performed according to at least one template type to obtain at least one fourth candidate list corresponding to the at least one template type; finally, a target candidate list corresponding to the current block can be determined based on the at least one fourth candidate list, and the prediction block of the current block can be determined based on the target candidate list.
- a first candidate list corresponding to a preset template type can be selected and merged with at least one second candidate list to obtain at least one third candidate list corresponding to at least one template type.
- the preset template type can be any one of an L-shaped template, an upper template, and a left template.
- mrgList0 when merging the block vector list and the sparse search results, mrgList0 can be merged with sprseList0, sprseList1 and sprseList2 respectively, and then the merged lists are recorded as sparseList0', sparseList1' and sparseList2', where sparseList0', sparseList1' and sparseList2' are the third candidate lists corresponding to the L-shaped template, upper template and left template respectively.
- a block vector list mrgList can be constructed and reordered according to a preset template type (such as an L-type template), and candidate lists sparseList0, sparseList1 and sparseList2 under the L-type template, upper template and left template are obtained according to a sparse search. Subsequently, only mrgList can be merged with sparseList0, sparseList1 and sparseList2 respectively.
- a preset template type such as an L-type template
- all template search areas corresponding to all block vectors in the third candidate list are the same; or, in a process of performing a fine search based on at least one third candidate list, the template search areas corresponding to the fourth block vectors in the third candidate list are the same; wherein the fourth block vector is a block vector derived from the first candidate list.
- the fourth block vector may be a block vector in the third candidate list that originates from the first candidate list. That is, during the merging of the first candidate list with the second candidate list, the fourth block vector in the first candidate list forms the third candidate list.
- a target block vector for the current block when determining the prediction block for the current block based on the block vector list of the current block, can also be determined from the block vector list of the current block; then, the prediction block for the current block can be determined based on the target block vector. Accordingly, a block vector index number for the current block can also be determined based on the target block vector, and the block vector index number can be written into the bitstream.
- the block vector index number of the current block may be determined based on the target block vector.
- the merge index (block vector index number) may be determined based on the target block vector.
- a residual block of the current block is determined according to the original block and the predicted block of the current block; and the residual block of the current block is written into the bitstream.
- the difference between the original block and the prediction block of the current block can be determined as the residual block of the current block.
- the construction and/or use process of the block vector list in the intra-frame prediction process is adjusted and improved.
- the AR-BVP candidate block vector can be constructed in batches.
- the block vector of the reference block can be directly used as the candidate block vector to be added to the block vector list; on the other hand, a block vector list with sub-pixel precision can be used for intra-frame prediction; on the other hand, multiple methods can be used to determine multiple template error calculation methods, so that the block vector list can be reordered using different template error calculation methods.
- the encoding method proposed in the embodiment of the present application is an improved method for constructing and/or using a block vector list, wherein the block vector list can be an AMVP/Merge list of the IBC mode, a Merge list of the IntraTMP mode, or a block vector list constructed in other intra-frame modes to obtain predictions based on block vectors.
- the block vector list can be an AMVP/Merge list of the IBC mode, a Merge list of the IntraTMP mode, or a block vector list constructed in other intra-frame modes to obtain predictions based on block vectors.
- the diversity of the block vector list and the efficiency of utilizing the block vector list can be improved by constructing AR-BVP candidate block vectors in batches, and/or; directly adding the block vector of the reference block to the block vector list, and/or; using a block vector list with sub-pixel precision in the intra-frame mode, and/or; using different template error calculation methods to sort the block vector list.
- the encoding method proposed in the embodiment of the present application is exemplarily described in IBC mode with the first syntax identification information being cu_pred_mode.
- the AR-BVP can be constructed in multiple steps, and the block vector of the reference block can also be directly added to the block vector list as a block vector candidate.
- the current block is in IBC merge mode, determine the merge index value, select the corresponding block vector from the block vector list, and obtain the reference block as the prediction block of the current block;
- the residual block is obtained from the predicted block of the current block and the original value of the current block. After conversion through steps such as transform and quantization, it is encoded using the entropy coding method. In addition, the coding information such as cu_pred_mode, merge index value, BVD, etc. is encoded to complete the coding of the current block.
- Candidate block vectors can be obtained from adjacent blocks, non-adjacent blocks, AR-BVP candidates, historical block vector cache, etc.
- the interpolation filter can be a 2-tap interpolation filter, which can be the same as the 2-tap interpolation filter used in inter-frame prediction and IBC prediction.
- the obtained reference block is used as the prediction of the upper template area.
- the prediction of the left template area is obtained.
- the template error value such as the SAD value, is calculated;
- the template error value of the predefined non-angle mode within the frame can be calculated.
- a predefined mode Planar is used to calculate the template error value of the Planar mode based on the reference pixels.
- the best prediction method is to use a candidate block vector, when the block vector has sub-pixel accuracy, the reference block of the current block can be obtained based on interpolation filtering, where the interpolation filter can use an n-tap filter, for example, n is 8, which can be the same as the interpolation filter used in IBC prediction;
- a Y component coding gain of approximately -0.01% can be achieved when the sub-pixel block vector list is applied to the DIMD and SGPM modes.
- the encoding method proposed in the embodiment of the present application is exemplified in the IntraTMP mode, with the first syntax identification information being cu_tmp_flag, the second syntax identification information being cu_tmp_lic_flag, and the third syntax identification information being cu_tmp_idx.
- the block vector list can be reordered according to the template error.
- the template area and error calculation method can be predefined for the block vector list, or they can be kept consistent with the current prediction process.
- the front block can use error calculation methods such as SAD and MR-SAD.
- the template area can be divided into L-type template, upper template and left template.
- the corresponding syntax elements in the prediction process based on the block vector list are as follows:
- the template error values corresponding to the L-shaped template, upper template, and left template under the SAD and MR-SAD calculation methods can be calculated respectively to obtain the corresponding sorted block vector lists, recorded as mrgList0, mrgList1, mrgList2, mrgListMR0, mrgListMR1, and mrgListMR2;
- the maximum template error value pDiff can be obtained according to step 3. This value is related to the template error value of the candidate in the block vector list. For example, pDiff can be equal to the maximum diff in the mrgList candidate plus 1. In subsequent sparse search and fine search, the template error value of the candidate block vector searched needs to be less than pDiff.
- Different template error calculation methods and template types can set corresponding pDiff;
- the IntraTMP mode can use SATD and MR-SATD as the calculation method of the template error.
- One implementation method is to use SAD in the sparse search stage and SATD in the fine search stage. If the cu_tmp_lic_flag flag of the current block is true, MR-SAD and MR-SATD are used accordingly.
- SATD or MR-SATD can be used when calculating the template error value of the block vector list, which is consistent with the fine search stage; another implementation method is to indicate whether SATD is used during the search by writing the flag cu_tmp_satd_flag of the code stream.
- SAD is used when cu_tmp_satd_flag is false
- SATD is used when cu_tmp_satd_flag is true.
- the cu_tmp_satd_flag flag can be used to determine how the template error value of the block vector list is calculated.
- SAD is used when cu_tmp_satd_flag is false
- SATD is used when cu_tmp_satd_flag is true.
- the candidate list sparseList obtained by sparse search can be used as a guide block vector to construct AR-BVP candidates, calculate the template error values of these AR-BVP candidates, and update the sparseList (the list stores the n candidates with the smallest template error values).
- SparseLists of different template types can be used to construct AR-BVP candidates, and the sparseList is updated based on the template error values of the AR-BVP candidates.
- a block vector list when used in the IntraTMP mode search process, it can only be used for searches corresponding to one template type.
- a block vector list mrgList is constructed and reordered based on the L-shaped template, and candidate lists sparseList0, sparseList1, and sparseList2 under the L-shaped template, the upper template, and the left template are obtained through sparse search.
- mrgList can be merged with sparseList0 (the candidate list corresponding to the L-shaped template).
- the embodiment of the present application provides a coding and decoding method, in which, when the current block uses a preset intra-frame prediction mode, a block vector list of the current block is constructed; a prediction block of the current block is determined according to the block vector list of the current block; wherein the block vector list of the current block satisfies at least the following conditions:
- a block vector list is constructed by executing AR-BVP at least twice, and between executing AR-BVP at least twice, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes a block vector of a reference block corresponding to a reference block vector of a current block;
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, or TIMD, or SGPM;
- the block vector list is obtained by sorting template error values corresponding to block vectors in the block vector list; wherein the template error value of the block vector is determined by a prese
- FIG17 is a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application.
- the encoder 170 may include a first determining unit 1701, wherein:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, TIMD, or SGPM;
- a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component.
- the components in this embodiment can be integrated into a processing unit, or the unit can exist physically alone, or two or more units can be integrated into a single unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.
- the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment.
- the aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
- an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 170.
- the computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the aforementioned embodiments.
- Figure 18 is a schematic diagram of the specific hardware structure of an encoder provided by an embodiment of the present application.
- the encoder 170 may include: a first communication interface 1801, a first memory 1802 and a first processor 1803; the components are coupled together through a first bus system 1804.
- the first bus system 1804 is used to realize the connection and communication between these components.
- the first bus system 1804 also includes a power bus, a control bus and a status signal bus.
- various buses are marked as the first bus system 1804 in the figure. Among them,
- the first communication interface 1801 is used to receive and send signals when sending and receiving information with other external network elements;
- a first memory 1802 is used to store computer programs that can be run on the first processor 1803;
- the first processor 1803 is configured to, when running the computer program, perform the following operations: when determining that the current block uses a preset intra-frame prediction mode, writing first syntax identification information into a bitstream; wherein the first syntax identification information indicates that the current block uses the preset intra-frame prediction mode; constructing a block vector list for the current block; and determining a prediction block for the current block based on the block vector list for the current block; wherein the block vector list for the current block satisfies at least one of the following conditions:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors of reference blocks corresponding to the reference block vector of the current block
- the block vector list includes block vectors with sub-pixel precision; wherein the block vectors with sub-pixel precision are used for DIMD, TIMD, or SGPM;
- the block vector list is obtained by sorting the template error values corresponding to the block vectors in the block vector list; wherein the template error values of the block vectors are determined by a preset template error calculation method, and the preset template error calculation method is determined based on the error calculation method of the template search process corresponding to the current block or the second syntax identification information transmitted in the code stream.
- the first memory 1802 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
- the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
- the volatile memory can be a random access memory (RAM), which is used as an external cache.
- the first processor 1803 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1803.
- the above-mentioned first processor 1803 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
- DSP digital signal processor
- ASIC application-specific integrated circuit
- FPGA field programmable gate array
- the various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed.
- the general-purpose processor can be a microprocessor or any conventional processor.
- the steps of the method disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc.
- the storage medium is located in the first memory 1802 , and the first processor 1803 reads the information in the first memory 1802 and completes the steps of the above method in combination with its hardware.
- the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof.
- the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or a combination thereof.
- ASICs application specific integrated circuits
- DSPs digital signal processors
- DSPDs digital signal processing devices
- PLDs programmable logic devices
- FPGAs field programmable gate arrays
- the technology described in this application can be implemented by modules (such as processes, functions, etc.) that perform the functions described in this application.
- the software code can be stored in a memory and executed by a processor.
- the memory can be implemented in the processor or outside the processor.
- the first processor 1803 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
- FIG19 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application.
- the decoder 190 may include a second determining unit 1901, wherein:
- the block vector list is constructed by executing AR-BVP at least twice, and between executing the at least two AR-BVPs, a check operation is performed on at least one non-AR-BVP block vector;
- the block vector list includes block vectors of reference blocks corresponding to the reference block vector of the current block
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请公开了一种编解码方法、码流、编码器、解码器以及存储介质,该方法包括:在当前块使用预设帧内预测模式的情况下,构建当前块的块向量列表;根据当前块的块向量列表,确定当前块的预测块;其中,当前块的块向量列表满足以下至少之一:块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
Description
本申请实施例涉及视频编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。
随着人们对视频显示质量要求的提高,高清和超高清等高分辨率视频应运而生。然而,高分辨率视频通常具有更多信息,因此需要更多带宽。为降低带宽要求,已经引入了涉及视频压缩的视频编码标准。
在视频编码标准中,常见的帧内预测方法,如帧内块复制(Intra Block Copy,IBC)、解码端帧内模式推导(Decoder intra mode derivation,DIMD)、基于模板的帧内模式推导(Template-based intra mode derivation,TIMD)等,可以通过构建块向量列表的方式来获得基于块向量的预测。然而,目前的块向量列表的构建方式较为固定,灵活性差,不能很好地适用于不同的预测场景,降低了帧内预测效率,影响了编解码性能。
发明内容
本申请实施例提供一种编解码方法、码流、编码器、解码器以及存储介质,能够提高帧内预测效率,提升编解码性能。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:
解码码流,确定第一语法标识信息;
在所述第一语法标识信息指示当前块使用预设帧内预测模式的情况下,构建所述当前块的块向量列表;
根据所述当前块的块向量列表,确定所述当前块的预测块;
其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:
在确定当前块使用预设帧内预测模式的情况下,将第一语法标识信息写入码流;其中,所述第一语法标识信息指示所述当前块使用所述预设帧内预测模式;
构建所述当前块的块向量列表;
根据所述当前块的块向量列表,确定所述当前块的预测块;
其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
第三方面,本申请实施例提供了一种码流,其中,码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:第一语法标识信息、第二语法标识信息、第三语法标识信息。
第四方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元,其中:
第一确定单元,配置为在确定当前块使用预设帧内预测模式的情况下,将第一语法标识信息写入码流;其中,所述第一语法标识信息指示所述当前块使用所述预设帧内预测模式;构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
第五方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,
第一存储器,用于存储能够在第一处理器上运行的计算机程序;
第一处理器,用于在运行所述计算机程序时,执行如第二方面所述的方法。
第六方面,本申请实施例提供了一种解码器,该解码器包括第二确定单元,其中:
第二确定单元,配置为解码码流,确定第一语法标识信息;在所述第一语法标识信息指示当前块使用预设帧内预测模式的情况下,构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
第七方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,
第二存储器,用于存储能够在第二处理器上运行的计算机程序;
第二处理器,用于在运行所述计算机程序时,执行如第一方面所述的方法。
第八方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,所述计算机程序被至少一个处理器执行时实现如第一方面所述的方法、或者如第二方面所述的方法。
本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在当前块使用预设帧内预测模式的情况下,构建当前块的块向量列表;根据当前块的块向量列表,确定当前块的预测块;其中,当前块的块向量列表满足以下至少之一:块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。也就是说,在本申请的实施例中,可以对帧内预测过程中的块向量列表的构造和/或使用过程进行调整和改进,可以通过分次构造AR-BVP候选块向量,和/或,直接使用参考块的块向量作为候选块向量添加至块向量列表,和/或,使用亚像素精度的块向量列表来进行帧内预测,和/或,采用不同的模板误差计算方式对块向量列表重排序等方法,提升块向量列表的多样性,从而能够提高帧内预测效率,提升编解码性能。
图1为一种混合编码框架的流程框图;
图2为相邻块和非相邻块的示意图;
图3为AR-BVP技术的实现方式示意图一;
图4为AR-BVP技术的实现方式示意图二;
图5为IntraTMP技术的实现示意图一;
图6为IntraTMP技术的实现示意图二;
图7为SGPM技术的实现示意图;
图8为DIMD技术的实现示意图;
图9为TIMD技术的实现示意图;
图10为本申请实施例提供的一种编码器的组成框图示意图;
图11为本申请实施例提供的一种解码器的组成框图示意图;
图12为本申请实施例提供的一种编解码系统的网络架构示意图;
图13为本申请实施例提供的一种解码方法的流程示意图;
图14为本申请实施例提供的参考块的块向量的示意图;
图15为本申请实施例提供的模板的示意图;
图16为本申请实施例提供的一种编码方法的流程示意图;
图17为本申请实施例提供的一种编码器的组成结构示意图;
图18为本申请实施例提供的一种编码器的具体硬件结构示意图;
图19为本申请实施例提供的一种解码器的组成结构示意图;
图20为本申请实施例提供的一种解码器的具体硬件结构示意图;
图21为本申请实施例提供的一种编解码系统的组成结构示意图。
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
在视频图像中,一般采用第一颜色分量、第二颜色分量和第三颜色分量来表征编码块(Coding Block,CB)。其中,这三个颜色分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。
视频编解码标准可以采用基于块的混合编码框架。具体地,视频中的图像被分割成相同大小(如128x128,64x64等)的正方形的最大编码单元(largest coding unit,LCU)或编码树单元(Coding Tree Unit,CTU)。每个最大编码单元或编码树单元可根据规则划分成矩形的编码单元(coding unit,CU)。编码单元可能还会划分为预测单元(prediction unit,PU),变换单元(transform unit,TU)等。
具体地,如图1所示,混合编码框架包括有预测模块11、变换与量化模块12、熵编码模块13、反量化与反变换模块14、环路滤波模块15和解码图片缓存模块16。其中,预测模块11可以包括帧内预测模块11a和帧间预测模块11b,帧间预测模块11b可以包括运动估计模块(Motion Estimation)和运动补偿模块(Motion Compensation)。由于视频的一个图像中的相邻像素之间存在很强的相关性,在视频编解码技术中使用帧内预测的方法消除相邻像素之间的空间冗余。另外,由于视频中的相邻图像之间存在着很强的相似性,在视频编解码技术中使用图像间预测方法消除相邻图像之间的时间冗余,从而提高编码效率。
进一步地,变换将预测后的图像块转换到频率域,能量重新分布,结合量化可以将人眼不敏感的信息去除,用于消除视觉冗余。熵编码可以根据当前上下文模型以及二进制码流的概率信息消除字符冗余。
视频编解码器的基本流程如下:在编码端,读取一幅黑白图像或彩色图像之后,分别将其划分成块,对当前块使用帧内预测或帧间预测产生当前块的预测块,当前块的原始块减去预测块得到残差块,对残差块进行变换、量化得到量化系数矩阵,对量化系数矩阵进行熵编码输出到码流中。在解码端,对当前
块使用帧内预测或帧间预测产生当前块的预测块,另一方面解析码流得到量化系数矩阵,对量化系数矩阵进行反量化与反变换得到残差块,将预测块和残差块相加得到重建块。重建块组成重建图像,基于图像或基于块对重建图像进行环路滤波得到解码图像。
编码端同样需要和解码端类似的操作获得解码图像。解码图像可以为后续的图像作为帧间预测的参考图像。
编码端确定的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息如果有必要需要写入到码流内。解码端通过解析码流及根据已有信息进行分析确定与编码端相同的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息,从而保证编码端获得的解码图像和解码端获得的解码图像相同。
在预测时可以将当前块划分成预测单元,在变换时可以将当前块划分成变换单元,预测单元和变换单元的划分可以不同。上述是基于块的混合编码框架下的视频编解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,本申请实施例适用于该基于块的混合编码框架下的视频编解码器的基本流程,但不限于该框架及流程。
另外,在本申请实施例中,当前块(Current Block,CB)可以是当前编码单元、当前预测单元、或者当前变换单元等。由于并行处理的需要,图像可以被划分成片(slice)等,同一个图像中的slice可以并行处理,也就是说它们之间没有数据依赖。而“帧”是一种常用的说法,一般可以理解为一帧是一个图像。在本申请实施例中所述的帧也可以替换为图像或slice等。
下面针对相关技术的几种预测技术进行详细介绍。
(1)帧内块复制
帧内块复制技术,是一种基于块向量来获得预测像素的帧内预测技术。类似帧间预测,通过由当前块指向参考块的块向量实现预测,区别在于帧间预测的参考块来自于已编码的重建帧,而IBC的参考块来自于当前帧的已重建部分。块向量信息需要由码流传输,因而与帧内预测类似,存在IBC-AMVP模式和IBC-Merge模式。
IBC-AMVP模式:由编码端搜索得到当前块的参考块和对应的块向量(Block Vector,BV),通过构建候选列表(AMVP List)得到块向量的预测(BV Prediction,BVP)。只需要在码流中写入BVP在列表中的索引值BVP index和BVP、BV间的差值BVD,即可在解码端重建BV完成当前块的预测。
IBC-Merge模式:通过构建的合并候选列表进行预测,通过绝对变换误差和(Sum of Absolute Transformed Difference,SATD)、率失真优化(Rate Distortion Optimization,RDO)等编码过程选择出列表中最佳的合并候选,直接使用该候选的块向量来获取参考块。只编码合并候选在列表中的索引merge index即可在解码端得到BV完成当前块的预测。
可以由以下方法获得AMVP/Merge list中的候选:
1、继承相邻块的块向量
2、继承非相邻块的块向量
3、继承历史块向量缓存列表中的块向量
4、由已有块向量构造自动重定位的块向量预测(Auto-Relocated Block vector prediction,AR-BVP)
5、由已有块向量的平均得到块向量
6、默认块向量(与块大小相关)
其中,图2为相邻块和非相邻块的示意图,如图2所示,点填充小块为当前块,标号1-5处称为相邻块,其余处称为非相邻块。
对于AR-BVP技术,可以为当前编码块B0确定一个指引块向量(guiding BV)BV0,1,并根据该块向量确定参考块B1,若在参考块B1的区域内存在块向量BV1,2,则可以构造新的块向量BV0,2=BV0,1+BV1,2,作为当前编码块的候选块向量。由此类推,根据BV0,n可以确定参考块Bn,若在Bn的区域内存在块向量BVn,n+1,则可以构建新的块向量BV0,n+1=BV0,1+BV1,2+…+BVn,n+1,即可以看作是由以构造的AR-BVP继续构造新的AR-BVP。
图3为AR-BVP技术的实现方式示意图一,如图3所示,当前编码块B0的指引块向量为BV0,1,并根据该块向量确定参考块B1,若在参考块B1的区域内存在块向量BV1,2,则可以构造新的块向量BV0,2=BV0,1+BV1,2,作为当前编码块的候选块向量。根据BV0,2可以确定参考块B2,若在B2的区域内存在块向量BV2,3,则可以构建新的块向量BV0,3=BV0,1+BV1,2+BV2,3。根据BV0,3可以确定参考块B3。
其中,图4为AR-BVP技术的实现方式示意图二,如图4所示,在确定参考块Bn所对应的块向量BVn,n+1时,可以检查多个位置。例如,依次检查参考块中心、左上、右上、左下和右下处是否存在由IBC或帧内模板匹配预测(Intra Template Matching Prediction,IntraTMP)模式预测的编码块,若存在则将其所保存的块向量作为块向量BVn,n+1。
在构建AMVP/Merge list后,可以根据列表内候选的模板误差值对列表重排序。模板误差值可以由候选的参考块模板与当前块模板间的模板误差值,例如绝对误差和(Sum of Absolute Difference,SAD)值得到。
(2)帧内模板匹配预测
帧内模板匹配预测技术,简称IntraTMP技术,是一种特殊的帧内预测编码工具。IntraTMP主要通过以下流程实现:
选择当前块相邻的L型部分已重建像素作为模板,在给定的当前帧已重建区域中搜索最相似的模板,将最相似模板对应的重建块作为匹配块,用作当前块的预测块。
图5为IntraTMP技术的实现示意图一,如图5所示,图中R1至R4是可用的IntraTMP搜索区域。依次在这些区域中按照光栅扫描(raster scan)顺序逐点寻找匹配块。
在这里,编解码器通过标志位intra_tmp_flag表示当前块是否使用IntraTMP模式编码。若是则在解码端进行同样的模板匹配过程以在解码端获得同样的预测块,不需要额外编码当前块到匹配块的块向量信息。
图6为IntraTMP技术的实现示意图二,如图6所示,一种IntraTMP的搜索方式是将搜索过程分为两步:首先是稀疏搜索(Sparse search),然后是精细搜索(Refinement search)。稀疏搜索即以步长S(即水平、垂直方向每隔S点,S>1)进行模板匹配,比如在搜索区域不是逐点寻找匹配块而是在水平、垂直方向隔点搜索。例如,当前进行模板匹配的块向量是(X0,Y0),则下一个进行模板匹配的块向量应为(X0+S,Y0),下一个进行模板匹配的块向量纵坐标应为Y0+S。精细搜索即根据稀疏搜索的搜索结果,在最佳匹配块向量的相邻区域以更小的步长S’进行模板匹配。
IntraTMP可以结合Merge List(IntraTMP with Merge Candidates),根据Merge List中的块向量信息来拓展IntraTMP的搜索过程或者IntraTMP候选块向量列表。例如,根据稀疏搜索得到Sparse list,构造Merge list并与Sparse list合并从而得到更大的候选块向量列表。根据该新列表进行精细搜索,提升搜索的效果。
(3)空域几何划分模式(Spatial Geometry partitioning mode,SGPM)
SGPM模式是一个与几何划分模式(Geometry partitioning mode,GPM)类似的帧内模式,可以将两个帧内预测块加权组合,权重值可以对应为不同的几何划分方式。
图7为SGPM技术的实现示意图,如图7所示,一种SGPM的实现方式是将一种几何划分方式partition mode和两种帧内模式intra mode0、intra mode1进行组合作为一个SGPM的预测候选。可以根据相邻、非相邻块的帧内模式构造帧内模式列表,结合构造的块向量列表,得到可能的帧内模式。将其与可能的几何划分模式组合,构造SGPM模式的预测候选列表。候选列表可以通过模板误差重排序。当SGPM模式的标志位为真时,通过显式传递的索引值sgpm_index确定当前块所选用的预测候选,完成帧内模式的几何划分预测。
(4)解码端帧内模式推导
解码端帧内模式推导DIMD模式是一种基于梯度直方图(Histogram of Gradient,HoG)推导帧内模式的方法,该方法在当前块的模板区域内计算梯度值并转换为角度,从而构造帧内角度模式的直方图,根据该直方图可以得到幅值较高的几个帧内角度模式。
图8为DIMD技术的实现示意图,如图8所示,在常见的DIMD实现中,DIMD编码块会根据HoG推导得到多个帧内角度模式,还会通过构造块向量列表,计算模板误差的方式推导得到一个最佳的非角度模式。将这些模式的预测块加权组合来得到最终的预测块。
(5)基于模板的帧内模式推导技术。
基于模板的帧内模式推导TIMD技术是一种基于帧内模式在模板区域的误差值推导帧内模式的方法。该方法根据已有编码信息构建最可能的模式(Most Probable Mode,MPM)列表,对列表内模式在模板区域做预测来得到对应的模板误差值,从而推导出最优的帧内模式。
图9为TIMD技术的实现示意图,如图9所示,与DIMD方法类似,TIMD在实现中可以使用模板误差值最小的两个预测模式和一个帧内非角度模式来生成预测块,将这些预测块加权组合来得到最终的预测块。
常见的帧内预测方法多可以通过构建块向量列表的方式来获得基于块向量的预测。因而块向量列表的构造和使用对帧内预测效率有较大的影响。相关技术中,存在着在构造块向量列表时AR-BVP候选的构建较为固定;SGPM、DIMD等方法在使用块向量时只考虑了整像素块向量;以及块向量列表的重排序过程较为固定等问题。
也就是说,目前的块向量列表的构建方式较为固定,灵活性差,不能很好地适用于不同的预测场景,降低了帧内预测效率,影响了编解码性能。
基于此,本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在当前块使用预设帧内预测模式的情况下,构建当前块的块向量列表;根据当前块的块向量列表,确定当前块的预测块;其中,当前块的块向量列表满足以下至少之一:块向量列表是通过执行至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。也就是说,在本申请的实施例中,可以对帧内预测过程中的块向量列表的构造和/或使用过程进行调整和改进,可以通过分次构造AR-BVP候选块向量,和/或,直接使用参考块的块向量作为候选块向量添加至块向量列表,和/或,使用亚像素精度的块向量列表来进行帧内预测,和/或,采用不同的模板误差计算方式对块向量列表重排序等方法,提升块向量列表的多样性,从而能够提高帧内预测效率,提升编解码性能。
下面将结合附图对本申请各实施例进行详细说明。
图10为本申请实施例提供的一种编码器的组成框图示意图。如图10所示,编码器100可以包括变换与量化单元101、帧内估计单元102、帧内预测单元103、运动补偿单元104、运动估计单元105、反变换与反量化单元106、滤波器控制分析单元107、滤波单元108、编码单元109和解码图像缓存单元110等,其中,滤波单元108可以实现去方块滤波及样本自适应缩进(Sample Adaptive Offset,SAO)滤波,编码单元109可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmetic Coding,CABAC)。针对输入的原始视频信号,通过编码树单元(Coding Tree Unit,CTU)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元101对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元102和帧内预测单元103是用于对该视频编码块进行帧内预测;明确地说,帧内估计单元102和帧内预测单元103用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元104和运动估计单元105用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元105执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由运动补偿单元104基于由运动估计单元105所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元103还用于将所选择的帧内预测数据提供到编码单元109,而且运动估计单元105将所计算确定的运动向量数据也发送到编码单元109;此外,反变换与反量化单元106是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元107和滤波单元108去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元109是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;而解码图像缓存单元110是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元110中。
图11为本申请实施例提供的一种解码器的组成框图示意图。如图11所示,解码器200包括解码单元201、反变换与反量化单元202、帧内预测单元203、运动补偿单元204、滤波单元205和解码图像缓存单元206等,其中,解码单元201可以实现头信息解码以及CABAC解码,滤波单元205可以实现去方块滤波以及SAO滤波。输入的视频信号经过图14的编码处理之后,输出该视频信号的码流;该码流输入解码器200中,首先经过解码单元201,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元202进行处理,以便在像素域中产生残差块;帧内预测单元203可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元204是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元202的残差块与由帧内预测单元203或运动补偿单元204产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元205以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元206中,解码图像缓存单元206存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
进一步地,图12为本申请实施例提供的一种编解码系统的网络架构示意图。如图12所示,该网络架构包括一个或多个电子设备31至3N和通信网络01,其中,电子设备31至3N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有视频编解码功能的设备,例如,所述电
子设备可以包括智能手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作具体限定。
在本申请的实施例中,这里提供了一种包含解码方法和编码方法的视频编解码系统的网络架构。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。也就是说,本申请实施例中的电子设备具有视频编解码功能,一般可以包括视频编码器(即编码器)和视频解码器(即解码器)。
还需要说明的是,本申请实施例主要应用于如图10所示的帧内预测部分以及如图11所示的帧内预测部分。也就是说,本申请实施例既可以应用于编码器,也可以应用于解码器,甚至还可以同时应用于编码器和解码器。
还需要说明的是,当本申请实施例应用于如图10所示的编码器时,“当前块”具体是指当前待进行预测的编码块;当本申请实施例应用于如图11所示的解码器时,“当前块”具体是指当前待进行预测的解码块。
在本申请的一实施例中,图13为本申请实施例提供的一种解码方法的流程示意图,如图13所示,该方法可以包括:
步骤1301、解码码流,确定第一语法标识信息。
需要说明的是,在本申请的实施例中,该方法应用于解码器。具体来说,基于图15所示解码器200的组成结构,本申请实施例的解码方法可以应用于帧内预测部分,主要是应用于块向量列表构建的帧内预测方法,能够提升帧内预测的预测效率。
还需要说明的是,在本申请的实施例中,第一语法标识信息用于指示当前块是否使用预设帧内预测模式。在一些实施例中,若第一语法标识信息的取值为第一值,则确定第一语法标识信息指示当前块使用预设帧内预测模式;若第一语法标识信息的取值为第二值,则确定第一语法标识信息指示当前块不使用预设帧内预测模式。
还需要说明的是,在本申请的实施例中,预设帧内预测模式可以包括以下至少之一:帧内块复制IBC,帧内模板匹配预测IntraTMP,空域几何划分模式SGPM,解码端帧内模式推导DIMD,基于模板的帧内模式推导TIMD。
可以理解的是,在本申请的实施例中,针对不同的预设帧内预测模式,第一语法标识信息的表示方式可以是不同的,例如,对于IBC,对应的第一语法标识信息可以表示为cu_pred_mode,对于DIMD,对应的第一语法标识信息可以表示为cu_dimd_flag,对于IntraTMP,对应的第一语法标识信息可以表示为cu_tmp_flag。
在这里,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第一语法标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里不作具体限定。示例性地,第一值可以为1,第二值可以为0;或者,第一值可以为0,第二值可以为1;或者,第一值可以为真(true),第二值可以为假(false);或者,第一值可以为假(false),第二值可以为真(true)。
在一种具体的实施例中,以第一值为1,第二值为0为例,如果解码获得cu_pred_mode的取值为1,那么可以确定第一语法标识信息指示当前块使用预设帧内预测模式;如果解码获得cu_pred_mode的取值为0,那么可以确定第一语法标识信息指示当前块不使用预设帧内预测模式。
需要说明的是,在本申请的实施例中,预设帧内预测模式可以为通过构建块向量列表来进行帧内预测的模式。
在一些实施例中,预设帧内预测模式可以包括以下至少之一:帧内块复制IBC,帧内模板匹配预测IntraTMP,空域几何划分模式SGPM,解码端帧内模式推导DIMD,基于模板的帧内模式推导TIMD。
其中,IBC是通过由当前块指向参考块的块向量实现预测的;IntraTMP通过模板匹配来将最相似模板对应的重建块作为匹配块,用作当前编码块的预测块;SGPM可以将两个帧内预测块加权组合,权重值可以对应为不同的几何划分方式;DIMD会根据HoG推导得到多个帧内角度模式,还会通过构造块向量列表,计算模板误差的方式推导得到一个最佳的非角度模式,将这些模式的预测块加权组合来得到最终的预测块;TIMD根据已有编码信息构建最可能的模式(MPM)列表,对列表内模式在模板区域做预测来得到对应的模板误差值,从而推导出最优的帧内模式。
步骤1302、在第一语法标识信息指示当前块使用预设帧内预测模式的情况下,构建当前块的块向量列表;其中,当前块的块向量列表可以满足以下至少之一:块向量列表是通过执行至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,
预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
需要说明的是,在本申请的实施例中,在第一语法标识信息指示当前块使用预设帧内预测模式的情况下,可以进一步构建当前块的块向量列表。
进一步地,在本申请的实施例中,当前块的块向量列表可以满足以下至少之一:
块向量列表是通过执行至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
块向量列表中包括当前块的指引块向量对应的参考块的块向量;
块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
需要说明的是,在本申请的实施例中,当前块的块向量列表可以是通过至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作。其中,在构建当前块的块向量列表的过程中,可以通过至少两次AR-BVP获得不同的候选块向量,并对获得的候选块向量进行检查后添加至块向量列表中。在执行至少两次AR-BVP之间,还可以针对至少一个非AR-BVP块向量执行检查操作。
需要说明的是,在本申请的实施例中,当前块的块向量列表中可以包括当前块的指引块向量对应的参考块向量。其中,在构建当前块的块向量列表的过程中,可以将AR-BVP处理中基于指引块向量确定的参考块的块向量直接作为候选块向量,并对该候选块向量进行检查后添加至块向量列表中。
需要说明的是,在本申请的实施例中,在预设帧内预测模式为DIMD,或者TIMD,或者SGPM的情况下,构建的当前块的块向量列表中可以包括亚像素精度的块向量。其中,添加至当前块的块向量列表中的块向量可以是亚像素精度的,进而可以获得亚像素精度的预测块。
需要说明的是,在本申请的实施例中,当前块的块向量列表可以是通过块向量列表中的块向量对应的模板误差值进行排序获得的。其中,可以先确定用于计算块向量列表中的块向量的模板误差值的预设模板误差计算方式。预设模板误差计算方式可以根据当前块对应的模板搜索过程的误差计算方式确定,也可以通过码流中传输的第二语法标识信息确定。
进一步地,在本申请的实施例中,在构建当前块的块向量列表时,可以将当前块的块向量列表中的第一块向量确定为当前块的第一指引块向量,并根据第一指引块向量确定当前块的第一候选块向量;其中,第一块向量包括以下至少之一:当前块的相邻块的块向量,当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量;然后将第一候选块向量和第二块向量添加至块向量列表;其中,第二块向量可以为非AR-BVP块向量,例如第二块向量可以是与第一块向量不同的非AR-BVP块向量;接着将块向量列表中的第三块向量确定为当前块的第二指引块向量,并根据第二指引块向量确定当前块的第二候选块向量;其中,第三块向量至少包括第一候选块向量;进而可以将第二候选块向量添加至块向量列表。
需要说明的是,在本申请的实施例中,可以先使用当前块的相邻块的块向量,当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量中的任意数量的块向量构建当前块的块向量列表。其中,第一块向量可以为当前块的块向量列表中的任意一个或多个块向量,即第一块向量可以为非AR-BVP块向量。
相应地,在本申请的实施例中,第二块向量可以为非AR-BVP块向量,例如第二块向量可以为与第一块向量不同的非AR-BVP块向量,其中,第二块向量也可以为当前块的相邻块的块向量,当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量中的、不同于第一块向量的任意数量的块向量。
需要说明的是,在本申请的实施例中,第二块向量可以为在完成第一次AR-BVP之后,针对至少一个非AR-BVP块向量执行检查操作之后所确定的可以被添加至块向量列表的非AR-BVP块向量。
相应地,在本申请的实施例中,第三块向量可以包括通过AR-BVP构建的第一候选块向量,还可以包括第一块向量和/或第二块向量。也就是说,在将第一候选块向量和第二块向量添加至当前块的块向量列表之后,除了第一候选块向量可以作为下一次AR-BVP的指引块向量以外,当前块的块向量列表中的其他块向量也可以作为下一次AR-BVP的指引块向量。
可以理解的是,在本申请的实施例中,以两次AR-BVP处理构建当前块的块向量候选列表为例,在第一次AR-BVP处理时,可以使用当前块的块向量列表中的第一块向量作为第一指引块向量,然后
根据该第一指引块向量确定出对应的第一候选块向量,其中,该第一候选块向量为AR-BVP块向量。在第一次AR-BVP处理之后,可以将获得的第一候选块向量(AR-BVP块向量)和第二块向量(不同于第一块向量的非AR-BVP块向量)添加至当前块的块向量列表。接着,执行第二次AR-BVP处理,可以先将块向量列表中的第三块向量作为第二指引块向量,其中,该第三块向量至少包括第一次AR-BVP处理获得的第一候选块向量,然后可以根据该第二指引块向量确定出对应的第二候选块向量,该第二候选块向量为AR-BVP块向量。最后,可以将获得的第二候选块向量添加至块向量列表。
可以理解的是,在本申请的实施例中,在构建当前块的块向量列表的过程中,也可以执行两次以上的AR-BVP处理,本申请不进行具体限定。例如,在将获得的第二候选块向量添加至块向量列表之后,还可以进一步根据块向量列表确定下一次AR-BVP处理的指引块向量,进而根据该指引块向量确定出对应的候选块向量,并添加至块向量候选列表。
示例性地,在一些实施例中,假设在构建块向量列表时,AR-BVP可以分两次构建。例如,可以按如下顺序检查并添加候选块向量:
a)继承相邻块的块向量
b)继承非相邻块的块向量
c)由已有块向量构造AR-BVP
d)继承历史块向量缓存列表中的块向量
e)由已有块向量构造AR-BVP
f)由已有块向量的平均得到块向量
g)默认块向量
其中,已有块向量为构建的块向量列表中的部分或者全部块向量。在添加完相邻/非相邻的块向量后,进行第一次构造AR-BVP的过程。此后在添加完历史块向量缓存列表中的块向量后,进行第二次构造AR-BVP的过程。
进一步地,在本申请的实施例中,在构建当前块的块向量列表时,可以将当前块的块向量列表中的第一块向量确定为当前块的第一指引块向量,并确定第一指引块向量对应的第一参考块;其中,第一块向量包括以下至少之一:当前块的相邻块的块向量,当前块的非相邻块的块向量,HMVP中的块向量;然后将第一参考块的块向量确定为当前块的第一候选块向量;和/或,对第一指引块向量和第一参考块的块向量进行求和,确定当前块的第一候选块向量;最终可以将第一候选块向量添加至块向量列表。
需要说明的是,在本申请的实施例中,在进行当前块的块向量列表的构建过程中,可以先根据指引块向量确定出对应的参考块,然后再利用参考块的块向量确定出对应的候选块向量。其中,在完成AR-BVP处理之后,在利用参考块的块向量确定候选块向量时,既可以将指引块向量和参考块的块向量的求和结果确定为候选块向量,添加至块向量候选列表,也可以直接将参考块的块向量确定为候选块向量,添加至块向量候选列表。
可以理解的是,在本申请的实施例中,在根据第一指引块向量确定第一候选块向量的过程中,可以先根据第一指引块向量确定第一参考块,然后再根据第一参考块的块向量确定第一候选块向量。其中,可以对第一指引块向量与第一参考块的块向量进行求和后确定第一候选块向量,也可以直接将第一参考块的块向量确定为第一候选块向量,当然,第一候选块向量也可以既包括第一指引块向量与第一参考块的块向量的求和结果,也包括第一参考块的块向量。
也就是说,在本申请的实施例中,根据指引块向量确定的参考块的块向量,可以直接作为候选块向量被添加至块向量列表中,即当前块的块向量列表中包括当前块的指引块向量对应的参考块的块向量。
示例性地,在一些实施例中,假设在构建块向量列表时,可以直接将参考块的块向量作为块向量候选(候选块向量)。其中,对给定的一个指引块向量BV_0和对应的参考块的块向量BV_ref,可以通过指引块向量和参考块的块向量相加得到候选块向量BV_arbvp=BV_0+BV_ref,也可以直接将参考块的块向量BV_ref作为候选块向量BV_ext=BV_ref,还可以在构造AR-BVP时,每次根据指引块向量得到参考块向量后,将BV_arbvp和BV_ext作为候选块向量添加至块向量列表。
进一步地,在本申请的实施例中,在构建当前块的块向量列表时,可以先将当前块的块向量列表中的第一块向量确定为当前块的第一指引块向量,并确定第一指引块向量对应的第一参考块;其中,第一块向量包括以下至少之一:当前块的相邻块的块向量,当前块的非相邻块的块向量,HMVP中的块向量;然后将第一参考块的块向量确定为当前块的第一候选块向量;和/或,对第一指引块向量和第一参考块的块向量进行求和,确定当前块的第一候选块向量;接着可以将第一候选块向量和第二块向量添加至块向量列表;其中,第二块向量可以为非AR-BVP块向量,例如第二块向量可以是与第一块向量不同的非AR-BVP块向量;然后将块向量列表中的第三块向量确定为当前块的第二指引块向量,并确定第二指引块向量对应的第二参考块;其中,第三块向量至少包括第一候选块向量;接着将第二参考块的
块向量确定为当前块的第二候选块向量;和/或,对第二指引块向量和第二参考块的块向量进行求和,确定当前块的第二候选块向量;最终可以将第二候选块向量添加至块向量列表。
可以理解的是,在本申请的实施例中,以两次AR-BVP处理构建当前块的块向量候选列表为例,在第一次AR-BVP处理时,可以使用当前块的块向量列表中的第一块向量作为第一指引块向量,然后根据该第一指引块向量确定出对应的第一候选块向量,其中,该第一候选块向量为AR-BVP块向量,该第一候选块向量可以包括第一候选块向量对应的第一参考块的块向量,和/或第一指引块向量与对应的第一参考块的块向量的求和结果。在第一次AR-BVP处理之后,可以将获得的第一候选块向量(AR-BVP块向量)和第二块向量(不同于第一块向量的非AR-BVP块向量)添加至当前块的块向量列表。接着,执行第二次AR-BVP处理,可以先将块向量列表中的第三块向量作为第二指引块向量,其中,该第三块向量至少包括第一次AR-BVP处理获得的第一候选块向量,然后可以根据该第二指引块向量确定出对应的第二候选块向量,该第二候选块向量为AR-BVP块向量,该第二候选块向量可以包括第二候选块向量对应的第二参考块的块向量,和/或第二指引块向量与对应的第二参考块的块向量的求和结果。最后,可以将获得的第二候选块向量添加至块向量列表。
可以理解的是,在本申请的实施例中,在构建当前块的块向量列表的过程中,也可以执行两次以上的AR-BVP处理,本申请不进行具体限定。例如,在将获得的第二候选块向量添加至块向量列表之后,还可以进一步根据块向量列表确定下一次AR-BVP处理的指引块向量,进而根据该指引块向量确定出对应的候选块向量,并添加至块向量候选列表。
可以理解的是,在本申请的实施例中,在构建当前块的块向量列表的过程中,可以选择在其中的任意一次或多次的AR-BVP处理过程中,将指引向量对应的参考块的块向量添加至当前块的块向量列表中。
也就是说,在本申请的实施例中,在构建块向量列表时,AR-BVP可以分至少两次构建;同时,在进行AR-BVP处理的过程中,可以直接将参考块的块向量作为候选块向量。
进一步地,在本申请的实施例中,在进行AR-BVP处理获得候选块向量的过程中,指引块向量可以根据块向量列表中的已有的块向量来确定。其中,第一次AR-BVP处理过程中的第一指引块向量与第二次AR-BVP处理过程中的第二指引块向量可以部分相同,也可以完全不同。
也就是说,在本申请的实施例中,不同次构造AR-BVP的过程可以相同也可以不同。例如,第一次构造AR-BVP时可以以块向量列表中已有的全部块向量作为指引块向量;第二次构造AR-BVP时可以以列表中已有的全部块向量和新添加的AR-BVP作为指引块向量。
示例性地,在一些实施例中,第一次AR-BVP处理过程中的第一指引块向量可以包括块向量列表中的部分或者全部块向量,第二次AR-BVP处理过程中的第二指引块向量可以包括块向量列表中的、与第一指引块向量不同的非AR-BVP块向量,还可以包括第一次AR-BVP处理之后添加至块向量列表中的新构建的AR-BVP块向量(即第一候选块向量)。
进一步地,在本申请的实施例中,可以根据当前块的指引块向量进行AR-BVP处理获得至少一个候选块向量,从而可以构建当前块的块向量列表,直到满足预设结束条件;其中,预设结束条件包括以下至少之一:AR-BVP处理的次数大于或者等于预设阈值;通过AR-BVP处理确定的候选块向量的数量大于或者等于第一数量阈值;块向量列表中的块向量的数量大于或者等于第二数量阈值。
可以理解的是,在本申请的实施例中,预设阈值、第一数量阈值以及第二数量阈值均可以为预先设置的大于0的整数,本申请不进行具体限定。例如,预设阈值可以为3,第一数量阈值可以为5,第二数量阈值可以为15。
也就是说,在本申请的实施例中,在确定指引块向量(如第一指引块向量或第二指引块向量)后,可以构造一个或多个AR-BVP块向量。例如,先根据指引块向量BV0,1确定参考块B1,然后再根据参考块B1的区域内存在的块向量BV1,2构造新的块向量BV0,2=BV0,1+BV1,2。接着,可以继续进行AR-BVP处理,例如根据BV0,n可以确定参考块Bn,若在Bn的区域内存在块向量BVn,n+1,则可以构建新的块向量BV0,n+1=BV0,1+BV1,2+…+BVn,n+1。
需要说明的是,在本申请的实施例中,AR-BVP构造过程的结束条件(预设结束条件)可以包括但不限于:构造AR-BVP的迭代次数、块向量列表中已添加的AR-BVP数量、块向量列表中当前的块向量的数量。
需要说明的是,在本申请的实施例中,不同次构造AR-BVP的过程可以相同也可以不同。例如,第一次构造AR-BVP时可以不根据已添加的AR-BVP(第一候选块向量)继续构造;第二次构造AR-BVP时,每个指引块向量可以构造多个AR-BVP,即可以根据新添加的AR-BVP(第二候选块向量)继续构造。
进一步地,在本申请的实施例中,在根据参考块的块向量确定当前块的候选块向量时,对指引块向
量和至少一个参考块的块向量分别进行求和,确定候选块向量;和/或,对指引块向量和参考块的至少一个块向量分别进行求和,确定候选块向量。
需要说明的是,在本申请的实施例中,根据指引块向量可以确定出对应的一个或多个参考块,根据指引块向量也可以确定出对应的一个或多个参考块的块向量。
示例性地,在一些实施例中,在根据第一参考块的块向量确定当前块的第一候选块向量时,对第一指引块向量和至少一个第一参考块的块向量分别进行求和,确定第一候选块向量;和/或,对第一指引块向量和第一参考块的至少一个块向量分别进行求和,确定第一候选块向量。
也就是说,在本申请的实施例中,对于一个指引块向量,可以在对应的参考区域中的至少一个位置确定对应的至少一个参考块,对于其中的任一个参考块,该参考块可以对应有至少一个块向量。
示例性地,在一些实施例中,图14为本申请实施例提供的参考块的块向量的示意图,如图14所示,在确定参考块所对应的块向量时,可以检查多个位置。例如,依次检查参考块中心、左上、右上、左下和右下处是否存在编码块,若存在则将其所保存的块向量作为块向量,其中,任一个参考块可能包括有一个或多个块向量。例如,中心位置处的参考块保存有2个块向量。
进一步地,在本申请的实施例中,可以选择根据块向量列表中块向量的数量,确定添加至块向量列表的HMVP中的块向量的数量。
也就是说,在本申请的实施例中,在构造块向量列表时,可以根据已添加的块向量数量来调整从HMVP中添加至块向量列表的块向量的数量。
示例性地,在一些实施例中,假设块向量列表的最大长度为N,在添加HMVP中的块向量之前,块向量列表中已有n个块向量,那么可以根据N和n来设置添加至块向量列表的HMVP中的块向量的数量,例如,确定添加至块向量列表的HMVP中的块向量的数量为(N–n)/2。
进一步地,在本申请的实施例中,在将任意的块向量(AR-BVP块向量或非AR-BVP块向量)添加至块向量列表之前,可以先对该块向量进行检查。在该块向量不满足预设添加条件的情况下,则不将该块向量添加至块向量列表中,在该块向量满足预设添加条件的情况下,则将该块向量添加至块向量列表中。其中,预设添加条件包括以下至少之一:该块向量与块向量列表中的任意块向量不同;该块向量对应的参考块存在。
示例性地,在一些实施例中,在执行至少两次AR-BVP之间,可以针对至少一个非AR-BVP块向量执行检查操作。例如,对于HMVP中的块向量(非AR-BVP块向量)进行检查操作,确定HMVP中的块向量是否可以被添加到当前块的块向量列表中。如果HMVP中的块向量和列表中已添加的块向量相同,则不添加该非AR-BVP块向量,即针对执行检查操作的非AR-BVP块向量,如果不满足添加的条件,则选择不添加该非AR-BVP块向量。
相应地,在一些实施例中,在执行至少两次AR-BVP之间,在对至少一个非AR-BVP块向量执行检查操作之后,如果其中的某一个非AR-BVP块向量与列表中已添加的块向量均不同,且该非AR-BVP块向量对应的参考块存在,则可以确定该非AR-BVP块向量可以被添加到当前块的块向量列表中。
步骤1303、根据当前块的块向量列表,确定当前块的预测块。
在本申请的实施例中,在第一语法标识信息指示当前块使用预设帧内预测模式的情况下,在构建当前块的块向量列表之后,可以进一步根据当前块的块向量列表,确定当前块的预测块。
进一步地,在本申请的实施例中,在预设帧内预测模式为DIMD,或者TIMD,或者SGPM的情况下,构建的当前块的块向量列表中可以包括亚像素精度的块向量。相应地,在根据当前块的块向量列表,确定当前块的预测块时,可以先根据块向量列表中的亚像素精度的块向量,确定块向量列表中的块向量的模板误差值;然后可以根据块向量列表中的块向量的模板误差值,确定当前块的预测块。
可以理解的是,在本申请的实施例中,对于亚像素精度的块向量列表,块向量列表中的块向量对应有亚像素精度参数,该亚像素精度参数可以表征的块向量的精度值。其中,亚像素精度参数可以为大于0且小于或者等于1的数值,例如,一个块向量的亚像素精度参数为1/16。
进一步地,在本申请的实施例中,根据块向量列表中的亚像素精度的块向量,确定块向量列表中的块向量的模板误差值时,可以先确定模板类型参数和模板类型参数对应的模板尺寸参数;然后再根据模板类型参数,模板尺寸参数以及亚像素精度的块向量的亚像素比特参数,确定亚像素精度的块向量对应的调整后块向量;接着根据调整后块向量确定参考模板的预测值;最终便可以根据参考模板的预测值和当前模板的重建值,确定块向量列表中的块向量的模板误差值。
需要说明的是,在本申请的实施例中,模板类型参数可以对模板的类型进行确定,其中,根据模板类型参数可以确定对应的模板的类型为上模板或左模板。
需要说明的是,在本申请的实施例中,模板尺寸参数可以对模板的大小进行确定,其中,根据模板尺寸参数可以确定对应的模板的宽或高。其中,对于上模板来说,对应的宽为当前块的宽度值,对应的
高则可以由模板尺寸参数确定;对于左模板来说,对应的高为当前块的高度值,对应的宽则可以由模板尺寸参数确定。
示例性地,在一些实施例中,图15为本申请实施例提供的模板的示意图,如图15所示,当前块的高度值为H,宽度值为W,根据模板类型参数确定当前块对应的两种模板类型,如上模板和左模板,基于上模板的模板尺寸参数可以确定上模板的宽为Tw,基于左模板的模板尺寸参数可以确定左模板的高为Th。
需要说明的是,在本申请的实施例中,在根据模板类型参数,模板尺寸参数以及亚像素精度的块向量的亚像素比特参数,确定亚像素精度的块向量对应的调整后块向量时,可以根据模板类型参数和模板尺寸参数确定当前块对应的模板和模板的尺寸值,然后再使用块向量对应的亚像素比特参数和模板的尺寸值来进行调整,获得调整后的块向量。
示例性地,在一些实施例中,假设基于模板类型参数确定当前块对应的模板为上模板,对应的模板的尺寸值为高度Th,对应的块向量BV的亚像素比特参数为mv_bits,那么可以按照如下公式完成对块向量BV的调整,获得对应的调整后的块向量BV_top:
BV_top=BV+(Th<<mv_bits) (1)
BV_top=BV+(Th<<mv_bits) (1)
示例性地,在一些实施例中,假设基于模板类型参数确定当前块对应的模板为左模板,对应的模板的尺寸值为宽度Tw,对应的块向量BV的亚像素比特参数为mv_bits,那么可以按照如下公式完成对块向量BV的调整,获得对应的调整后的块向量BV_left:
BV_left=BV+(Tw<<mv_bits) (2)
BV_left=BV+(Tw<<mv_bits) (2)
进一步地,在本申请的实施例中,在根据调整后块向量确定参考模板的预测值时,在调整后块向量对应的候选参考模板可用的情况下,可以根据调整后块向量和亚像素差值算法确定参考模板的预测值;在调整后块向量对应的候选参考模板不可用的情况下,可以根据块向量列表中的块向量和亚像素差值算法确定参考模板的预测值。
可以理解的是,在本申请的实施例中,可以基于调整后的块向量确定对应的候选参考模板,如果该候选参考模板可用,那么便可以直接根据调整后块向量和亚像素差值算法来确定参考模板的预测值;如果该候选参考模板不可用,那么不再使用调整后的块向量,而是根据调整前的块向量和亚像素差值算法来确定参考模板的预测值。
示例性地,在一些实施例中,假设调整后的块向量为BV_top,根据BV_top获取宽高为W、Th的候选参考模板,如果该候选参考模板可用,则可以基于BV_top,通过亚像素差值算法计算的到对应的参考模板的预测值;如果该候选参考模板不可用,则可以调整BV_top等于BV,并通过亚像素差值算法计算的到对应的参考模板的预测值。
需要说明的是,在本申请的实施例中,可以通过差值滤波器来实现亚像素差值算法,其中,插值滤波器可以为2-tap插值滤波器,可以与帧间预测、IBC预测中所使用的2-tap插值滤波器相同。
相应地,在本申请的实施例中,也可以通过上述方式获得左模板区域的预测,即根据BV_left进一步确定出对应的参考模板的预测值。最终,可以分别根据参考模板的预测值和当前模板的重建值,计算块向量对应的模板误差值,进而可以根据块向量列表中的块向量的模板误差值,确定当前块的预测块。
示例性地,在一些实施例中,假设预设帧内预测模式为DIMD,可以计算预定义的帧内非角度模式的模板误差值。例如,预定义1个模式Planar,根据参考像素计算Planar模式的模板误差值;然后可以根据块向量列表中的候选块向量和帧内非角度模式的模板误差值选择最佳的非角度预测方法。若最佳的预测方法为使用某一候选块向量,当该块向量为亚像素精度时,可以基于插值滤波获取当前块的参考块,其中插值滤波器可以使用n-tap滤波器,比如n为8,可以和IBC预测时的插值滤波器相同;在得到最佳的非角度预测方法之后,将其与HoG推导得到帧内角度模式生成的预测块组合,得到最终的预测块。
进一步地,在本申请的实施例中,当前块的块向量列表可以是通过块向量列表中的块向量对应的模板误差值进行排序获得的。相应地,在根据当前块的块向量列表,确定当前块的预测块时,可以先对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值;然后可以根据块向量列表中的块向量的模板误差值对块向量列表进行排序,获得排序后的块向量列表;最后可以基于排序后的块向量列表,确定当前块的预测块。
需要说明的是,在本申请的实施例中,可以先确定用于计算块向量列表中的块向量的模板误差值的预设模板误差计算方式。其中,预设模板误差计算方式可以根据当前块对应的模板搜索过程的误差计算方式确定,也可以通过码流中传输的第二语法标识信息确定。
可以理解的是,在本申请的实施例中,一种实现方式为第二语法标识信息用于指示预设模板误差计
算方式为SAD或MR-SAD,这里可以用cu_tmp_lic_flag表示。在一些实施例中,若第二语法标识信息的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SAD;若第二语法标识信息的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为MR-SAD。
可以理解的是,在本申请的实施例中,另一种实现方式为第二语法标识信息用于指示预设模板误差计算方式为SATD或MR-SATD,这里可以用cu_tmp_lic_flag表示。在一些实施例中,若第二语法标识信息的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SATD;若第二语法标识信息的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为MR-SATD。
可以理解的是,在本申请的实施例中,再一种实现方式为第二语法标识信息用于指示预设模板误差计算方式为SATD或SAD,这里可以用cu_tmp_satd_flag表示。在一些实施例中,若第二语法标识信息的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SATD;若第二语法标识信息的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为SAD。
可以理解的是,在本申请的实施例中,又一种实现方式为第二语法标识信息用于指示预设模板误差计算方式为SAD,MR-SAD,SATD,MR-SATD中的一种计算方式,这里可以用cu_tmp_lic_flag和cu_tmp_satd_flag联合表示。在一些实施例中,若第二语法标识信息中的第一信息cu_tmp_lic_flag的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SAD或SATD;若第二语法标识信息中的第一信息cu_tmp_lic_flag的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为MR-SAD或MR-SATD;若第二语法标识信息中的第二信息cu_tmp_satd_flag的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SAD或MR-SATD;若第二语法标识信息中的第二信息cu_tmp_satd_flag的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为SAD或MR-SAD。例如,当cu_tmp_lic_flag的取值为第一值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为SATD;当cu_tmp_lic_flag的取值为第二值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为MR-SATD。
在这里,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第二语法标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里不作具体限定。示例性地,第一值可以为1,第二值可以为0;或者,第一值可以为0,第二值可以为1;或者,第一值可以为真(true),第二值可以为假(false);或者,第一值可以为假(false),第二值可以为真(true)。
在一种具体的实施例中,以第一值为1,第二值为0为例,如果解码获得cu_tmp_lic_flag的取值为1,那么可以确定第二语法标识信息指示预设模板误差计算方式为SAD;如果解码获得cu_tmp_lic_flag的取值为0,那么可以确定第一语法标识信息指示预设模板误差计算方式为MR-SAD。
进一步地,在本申请的实施例中,在对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值时,可以解码码流,确定第二语法标识信息;然后根据第二语法标识信息确定预设模板误差计算方式;其中,预设模板误差计算方式包括以下任意一种:SAD,MR-SAD,SATD,MR-SATD;最后可以基于预设模板误差计算方式,确定候选块向量列表中的块向量对应于至少一个模板类型的模板误差值。
可以理解的是,在本申请的实施例中,可以根据第二语法标识信息确定进行块向量模板误差计算的预设模板误差计算方式是SAD,MR-SAD,SATD,MR-SATD中的哪一种计算方式。
示例性地,在一些实施例中,假设第二语法标识信息使用cu_tmp_lic_flag表示,那么通过cu_tmp_lic_flag取值,可以确定预设模板误差计算方式为SAD或MR-SAD,或者,可以确定预设模板误差计算方式为SATD或MR-SATD。
示例性地,在一些实施例中,假设第二语法标识信息使用cu_tmp_satd_flag表示,那么通过cu_tmp_satd_flag取值,可以确定预设模板误差计算方式为SAD或SATD。
示例性地,在一些实施例中,假设第二标识信息包括第一信息cu_tmp_lic_flag和第二信息cu_tmp_satd_flag,那么通过cu_tmp_lic_flag和cu_tmp_satd_flag取值,可以确定预设模板误差计算方式为SAD,MR-SAD,SATD,MR-SATD中的哪一种计算方式。例如,当cu_tmp_lic_flag的取值为第一值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为SATD;当cu_tmp_lic_flag的取值为第二值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为MR-SATD。
进一步地,在本申请的实施例中,在根据第二语法标识信息确定预设模板误差计算方式时,可以先根据第二语法标识信息确定第一模板误差计算方式和第二模板误差计算方式;其中,第一模板误差计算方式用于执行至少一个模板类型的稀疏搜索,第二模板误差计算方式用于执行至少一个模板类型的精细搜索和块向量模板误差计算。
也就是说,在本申请的实施例中,基于第二语法标识信息(例如cu_tmp_lic_flag)的取值,可以确
定出用于进行稀疏搜索的第一模板误差计算方式,以及用于进行精细搜索和块向量模板误差计算的第二模板误差计算方式,即块向量模板误差计算与精细搜索阶段的模板误差计算方式保持一致。
示例性地,在一些实施例中,假设第二语法标识信息cu_tmp_lic_flag的取值为第一值,那么可以确定稀疏搜索阶段使用MR-SAD(第一模板误差计算方式),精细搜索阶段使用MR-SATD(第二模板误差计算方式),块向量模板误差计算使用MR-SATD。
进一步地,在本申请的实施例中,在根据第二语法标识信息确定预设模板误差计算方式时,可以根据第二语法标识信息确定第三模板误差计算方式和第四模板误差计算方式;其中,第三模板误差计算方式用于执行至少一个模板类型的稀疏搜索和块向量模板误差计算,第四模板误差计算方式用于执行至少一个模板类型的精细搜索。
也就是说,在本申请的实施例中,基于第二语法标识信息(例如cu_tmp_lic_flag)的取值,可以确定出用于进行稀疏搜索和块向量模板误差计算的第三模板误差计算方式,以及用于进行精细搜索的第四模板误差计算方式,即块向量模板误差计算与稀疏搜索阶段的模板误差计算方式保持一致。
示例性地,在一些实施例中,假设第二语法标识信息cu_tmp_lic_flag的取值为第二值,那么可以确定稀疏搜索阶段使用SAD(第三模板误差计算方式),块向量模板误差计算使用SATD,精细搜索阶段使用SATD(第四模板误差计算方式)。
进一步地,在本申请的实施例中,在根据第二语法标识信息确定预设模板误差计算方式时,可以根据第二语法标识信息确定第五模板误差计算方式;其中,第五模板误差计算方式用于执行至少一个模板类型的稀疏搜索,至少一个模板类型的精细搜索和块向量模板误差计算。
也就是说,在本申请的实施例中,基于第二语法标识信息(例如cu_tmp_lic_flag)的取值,可以确定出用于进行稀疏搜索、精细搜索和块向量模板误差计算的第五模板误差计算方式,即块向量模板误差计算与精细搜索阶段和稀疏搜索阶段的模板误差计算方式保持一致。
示例性地,在一些实施例中,假设第二语法标识信息cu_tmp_lic_flag的取值为第一值,那么可以确定稀疏搜索阶段使用MR-SAD(第五模板误差计算方式),精细搜索阶段使用MR-SAD,块向量模板误差计算使用MR-SAD。
进一步,在本申请的实施例中,第二语法标识信息包括第一信息和第二信息,在根据第二语法标识信息确定预设模板误差计算方式时,可以根据第一信息和第二信息,确定第六误差计算方式;其中,第六误差计算方式用于执行至少一个模板类型的稀疏搜索,至少一个模板类型的精细搜索和块向量模板误差计算。
也就是说,在本申请的实施例中,基于第二语法标识信息中的第一信息(例如cu_tmp_lic_flag)和第二信息(如cu_tmp_satd_flag)的取值,可以确定出用于进行稀疏搜索、精细搜索和块向量模板误差计算的第六模板误差计算方式,即块向量模板误差计算与精细搜索阶段和稀疏搜索阶段的模板误差计算方式保持一致,且该计算方式是通过cu_tmp_lic_flag和cu_tmp_satd_flag的取值确定的。
示例性地,在一些实施例中,假设第二语法标识信息中的第一信息cu_tmp_lic_flag的取值为第一值,那么可以确定使用SAD或SATD,如果cu_tmp_satd_flag的取值为第一值,便可以进一步确定使用SATD,如果cu_tmp_satd_flag的取值为第二值,便可以进一步确定使用SAD。
也就是说,在本申请的实施例中,在本申请的实施例中,可以同时编码cu_tmp_satd_flag和cu_tmp_lic_flag标志位来确定搜索及块向量列表的模板误差使用SAD、SATD、MR-SAD、MR-SATD中的哪种方式计算。
进一步地,在对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值时,可以根据当前块对应的模板搜索过程中的稀疏搜索的预设模板误差计算方式对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值;或者,根据当前块对应的模板搜索过程中的精细搜索的预设模板误差计算方式对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值。
也就是说,在本申请的实施例中,块向量模板误差计算的预设模板误差计算方式可以直接复用稀疏搜索阶段的模板误差计算方式,或者,块向量模板误差计算的预设模板误差计算方式可以直接复用精细搜索阶段的模板误差计算方式。
进一步地,在本申请的实施例中,在根据块向量列表中的块向量的模板误差值对块向量列表进行排序,获得排序后的块向量列表时,可以解码码流,确定第三语法标识信息;然后根据第三语法标识信息确定至少一个模板类型对应的至少一个模板数量;接着根据至少一个模板数量,分别对候选块向量列表中的块向量对应于至少一个模板类型的模板误差值进行排序,获得至少一个模板类型对应的至少一个第一候选列表。
需要说明的是,在本申请的实施例中,针对不同模板类型,可以确定不同模板类型对应的模板数量,
然后结合模板数量,对不同模板类型下的块向量的模板误差值进行排序,最终便可以获得不同模板类型对应的第一候选列表,即排序后的块向量列表包括有不同模板类型对应的第一候选列表。
可以理解的是,在本申请的实施例中,第三语法标识信息用于指示不同模板类型对应的模板数量,这里可以用cu_tmp_idx表示。在一些实施例中,根据第三语法标识信息的取值,可以确定出不同模板类型对应的需要维护的搜索结果。例如,根据第三语法标识信息的取值确定需要分别维护L-型模板、上模板和左模板对应的搜索结果,即确定出L-型模板、上模板和左模板对应的模板数量为M0、M1和M2,其中,M0、M1和M2均为大于或者等于0的整数。
示例性地,在一些实施例中,当前块使用MR-SAD计算模板误差,当第三语法标识信息cu_tmp_idx的取值大于阈值N(如N=13)时,需要分别维护L-型模板、上模板和左模板对应的搜索结果。相应地,对块向量列表的块向量使用MR-SAD计算模板误差,并分别得到L-型模板、上模板和左模板对应的模板误差值diff0、diff1和diff2。根据块向量的diff0、diff1和diff2得到L-型模板、上模板和左模板下最佳的M0、M1和M2个候选块向量,可以记为mrgList0,mrgList1和mrgList2;其中,mrgList0,mrgList1和mrgList2分别为L-型模板、上模板和左模板对应的第一候选列表。
进一步地,在本申请的实施例中,在基于排序后的块向量列表,确定当前块的预测块时,可以先分别按照至少一个模板类型进行稀疏搜索,获得至少一个模板类型对应的至少一个第二候选列表;然后再对至少一个第一候选列表和至少一个第二候选列表分别进行合并,获得至少一个模板类型对应的至少一个第三候选列表;接着可以基于至少一个第三候选列表,分别按照至少一个模板类型进行精细搜索,获得至少一个模板类型对应的至少一个第四候选列表;最终可以根据至少一个第四候选列表确定当前块对应的目标候选列表,并根据目标候选列表确定当前块的预测块。
示例性地,在一些实施例中,对于L-型模板、上模板和左模板,分别进行稀疏搜索,将搜索结果记为sparseList0,sparseList1和sparseList2,分别是L-型模板、上模板和左模板对应模板误差值下的搜索结果;其中,sparseList0,sparseList1和sparseList2分别为L-型模板、上模板和左模板对应的第二候选列表。
示例性地,在一些实施例中,将块向量列表和稀疏搜索结果进行合并,即将至少一个第一候选列表和至少一个第二候选列表分别进行合并。例如,将mrgList0和sprseList0合并,即保留L型模板对应的MR-SAD最小的前K个候选块向量,K可以是大于或等于sparseList0最大长度的整数,将合并后列表记为sparseList0’。相应地,可以将mrgList1和sprseList1合并,获得对应的sparseList1’,可以将mrgList2和sprseList2合并,获得对应的sparseList2’。其中,sparseList0’,sparseList1’和sparseList2’分别为L-型模板、上模板和左模板对应的第三候选列表。
示例性地,在一些实施例中,基于L-型模板、上模板和左模板对应的合并后的第三候选列表sparseList0’,sparseList1’和sparseList2’,可以分别进行精细搜索,获得的L-型模板、上模板和左模板对应的模板误差值下的搜索结果sparselist0’,sparselist1’和sparselist2’;其中,sparselist0’,sparselist1’和sparselist2’分别为L-型模板、上模板和左模板对应的第四候选列表。
示例性地,在一些实施例中,在根据至少一个第四候选列表确定当前块对应的目标候选列表时,可以对至少一个第四候选列表进行合并,例如,对sparselist0’,sparselist1’和sparselist2’进行合并后获得最终的目标候选列表。
进一步地,在本申请的实施例中,在进行稀疏搜索,获得至少一个第二候选列表之后,对于其中的任一个第二候选列表,可以选择基于第二候选列表进行AR-BVP构造。其中,可以先根据第二候选列表确定第三指引块向量,然后根据第三指引块向量确定当前块的第三候选块向量;接着可以确定第三候选块向量对应的模板误差值,并根据第三候选块向量对应的模板误差值更新第二候选列表。
示例性地,在一些实施例中,可以以稀疏搜索得到的候选列表sparseList中的块向量作为指引块向量(第三指引块向量)构造AR-BVP候选(第三候选块向量),然后可以计算这些AR-BVP候选的模板误差值并更新sparseList。其中,不同模板类型下的sparseList都可以构造AR-BVP候选,并根据AR-BVP候选的模板误差值更新该sparseList。
进一步地,在本申请的实施例中,在基于排序后的块向量列表,确定当前块的预测块时,可以先分别按照至少一个模板类型进行稀疏搜索,获得至少一个模板类型对应的至少一个第二候选列表;然后对预设模板类型对应的第一候选列表和至少一个第二候选列表分别进行合并,获得至少一个模板类型对应的至少一个第三候选列表;接着可以基于至少一个第三候选列表,分别按照至少一个模板类型进行精细搜索,获得至少一个模板类型对应的至少一个第四候选列表;最终可以根据至少一个第四候选列表确定当前块对应的目标候选列表,并根据目标候选列表确定当前块的预测块
需要说明的是,在本申请的实施例中,在将块向量列表和稀疏搜索结果进行合并时,可以选择使用预设模板类型对应的第一候选列表分别与至少一个第二候选列表进行合并,获得至少一个模板类型对
应的至少一个第三候选列表。其中,预设模板类型可以为L-型模板、上模板和左模板中的任意一种。
示例性地,在一些实施例中,在将块向量列表和稀疏搜索结果进行合并时,可以将mrgList0分别和sprseList0,sprseList1以及sprseList2合并,然后将合并后列表记为sparseList0’,sparseList1’和sparseList2’,sparseList0’,sparseList1’和sparseList2’分别为L-型模板、上模板和左模板对应的第三候选列表。
也就是说,在本申请的实施例中,可以构造并根据预设模板类型(如L型模板)重排序得到块向量列表mrgList,根据稀疏搜索得到L-型模板、上模板和左模板下的候选列表sparseList0、sparseList1和sparseList2,后续可以只将mrgList分别与sparseList0、sparseList1和sparseList2合并。
进一步地,在本申请的实施例中,在基于至少一个第三候选列表进行精细搜索的过程中,第三候选列表中的全部块向量对应的全部模板搜索区域均是相同的;或者,在基于至少一个第三候选列表进行精细搜索的过程中,第三候选列表中的第四块向量对应的模板搜索区域均是相同的;其中,第四块向量为来源于第一候选列表中的块向量。
需要说明的是,在本申请的实施例中,在基于至少一个第三候选列表,分别按照至少一个模板类型进行精细搜索时,对于第三候选列表中的块向量对应的模板搜索区域,可以相同也可以不同。例如,第三候选列表中的任意两个块向量对应的两个模板搜索区域可以是相同的;或者,第三候选列表中的任意两个第四块向量对应的两个模板搜索区域可以是相同的。
可以理解的是,在本申请的实施例中,第四块向量可以为第三候选列表中的、来源于第一候选列表的块向量。即在第一候选列表与第二候选列表进行合并的过程中,第一候选列表中的第四块向量组成了第三候选列表。
进一步地,在本申请的实施例中,在根据当前块的块向量列表,确定当前块的预测块时,还可以解码码流,确定当前块的块向量索引序号;然后根据块向量索引序号和当前块的块向量列表,确定当前块的目标块向量;最终可以根据目标块向量确定当前块的预测块。
示例性地,在一些实施例中,如果预设帧内预测模式为IBC,可以根据解码获得的块向量索引序号,结合构建的当前块的块向量列表,进一步确定当前块的预测块。例如,在IBC merge模式下,根据解码的merge索引(块向量索引序号)从块向量列表中选择块向量,进而得到当前块的参考块作为预测块。
进一步地,在本申请的实施例中,解码码流,确定当前块的残差块;然后可以根据残差块和预测块,确定当前块的重建块。
可以理解的是,在本申请的实施例中,在确定当前块的残差块和预测块之后,可以将残差块和预测块的和值,确定为当前块的重建块。
综上所述,通过上述步骤1301至步骤1303所提出的解码方法,对帧内预测过程中的块向量列表的构造和/或使用过程进行了调整和改进,一方面,在构造块向量列表时,可以分次构造AR-BVP候选块向量,另一方面,也可以直接使用参考块的块向量作为候选块向量添加至块向量列表;再一方面,可以使用亚像素精度的块向量列表来进行帧内预测;又一方面,可以采用多种方式进行多种模板误差计算方式的确定,从而可以采用不同的模板误差计算方式对块向量列表重排序。
也就是说,本申请实施例提出的解码方法,是一种对块向量列表的构造和/或使用的改进方法,其中,块向量列表可以是IBC模式的AMVP/Merge列表、IntraTMP模式的Merge列表、或者其他帧内模式为得到基于块向量的预测而构建的块向量列表。在块向量列表的构造和/或使用过程中,可以通过分次构造AR-BVP候选块向量,和/或;直接将参考块的块向量添加至块向量列表,和/或;在帧内模式中使用亚像素精度的块向量列表和/或;使用不同的模板误差计算方式对块向量列表进行排序等方法的应用,提升了块向量列表的多样性以及对块向量列表的利用效率。
下面,以IBC模式,第一语法标识信息为cu_pred_mode对本申请实施例提出的解码方法进行示例性说明。其中,在构建块向量列表时,AR-BVP可以分多次构建,还可以直接将参考块的块向量作为块向量候选添加至块向量列表中。
解码过程:
1、解码当前块的预测模式cu_pred_mode,当预测模式为IBC模式时,构建块向量列表用于后续预测过程。例如,在merge模式下,构建块向量列表并根据merge索引确定当前块的块向量及预测信息(例如局部光照补偿(Local Illumination Compensation,LIC)标志位等);例如,在AMVP模式下,构建块向量列表并根据BVP索引确定当前块的预测块向量、结合块向量残差BVD得到最终的块向量;
2、构造块向量列表,顺序检查并添加候选块向量,其中分次添加AR-BVP候选。例如,可以按如下顺序构造:
a)继承相邻块的块向量
b)继承非相邻块的块向量
c)由已有块向量构造AR-BVP
d)继承历史块向量缓存列表中的块向量
e)由已有块向量构造AR-BVP
f)由已有块向量的平均得到块向量
g)默认块向量(与块大小相关)
在添加完相邻/非相邻的块向量后,进行构造AR-BVP的过程。此后在添加完历史块向量缓存列表中的块向量后,进行构造AR-BVP的过程;
3、确定构造AR-BVP的过程。构造AR-BVP的指引块向量可以包含:列表中已有的全部块向量、列表中部分(一个或以上)块向量、新构造的块向量(AR-BVP)。在确定某一指引块向量后,可以构造一个或以上的AR-BVP。构造过程的结束条件可以包含:构造AR-BVP的迭代次数、以添加的AR-BVP数量、当前列表的数量;不同次构造AR-BVP的过程可以不同。例如,第一次构造AR-BVP时以列表中已有的全部块向量作为指引块向量,不根据已添加的AR-BVP继续构造。第二次构造AR-BVP时以列表中已有的全部块向量和新添加的AR-BVP作为指引块向量,且每个指引块向量构造多个AR-BVP;
4、对给定的一个指引块向量BV_0和参考块的块向量BV_ref,除了将其相加得到BV_arbvp=BV_0+BV_ref,可以直接将BV_ref作为候选块向量BV_ext=BV_ref检查并添加至块向量列表中。例如,在构造AR-BVP时,每次根据指引块向量得到参考块向量后,可以分别检查并添加BV_arbvp和BV_ext;
5、根据上述步骤构建块向量列表,后续基于该列表完成当前块的编码。例如,IBC merge模式下,根据解码的merge索引从列表中选择块向量,得到当前块的参考块作为预测块。结合解码的残差信息得到当前块的重建块。
其中,在构造块向量列表时,可以根据已添加的块向量数量调整从HMVP缓存中添加块向量(HMVP候选)的数量。例如,IBC的块向量列表最大长度为N,在添加HMVP候选前,列表内已有n个候选。则最多添加(N–n)/2个HMVP候选。
需要说明的是,对本申请实施例提出的解码方法进行试验验证,将分次构造AR-BVP应用于IBC模式时在增强压缩的参考软件测试平台(Enhanced Compression Model,ECM)参考软件上可以取得约-0.01%的Y分量编码增益。
需要说明的是,对本申请实施例提出的解码方法进行试验验证,将直接利用参考块的块向量作为候选块向量的方法应用于IntraTMP模式时可以取得约-0.03%的Y分量编码增益。
下面,以DIMD模式,第一语法标识信息为cu_dimd_flag对本申请实施例提出的解码方法进行示例性说明。其中,在DIMD模式中可以构造亚像素精度的块向量列表,根据块向量列表中块向量得到基于亚像素插值的预测块,之后与由帧内预测得到的预测块组合,得到最终的预测块。例如,将得到基于亚像素差值的预测块与由梯度直方图HoG推导的帧内模式预测块组合。
解码过程:
1、解码当前块的cu_dimd_flag标志位,当cu_dimd_flag为真时,表明当前编码块使用DIMD预测模式。当前块可以根据已重建区域(或已编码的信息)得到HoG并推导得到帧内角度模式,生成对应的预测块。
2、构建块向量列表,其中候选块向量的精度为亚像素精度。例如,块向量的精度为1/16个像素。候选块向量可以由相邻块、非相邻块、AR-BVP候选、历史块向量缓存等得到;
3、计算块向量列表中N个块向量的模板误差值。例如,模板的宽、高为Tw、Th。当前块宽、高为W、H。模板区域如图15。
候选块向量为BV,分别获取对上模板和左模板的预测。例如,获取上模板区域。根据模板高度Th对BV做调整,BV_top=BV+(Th<<mv_bits),mv_bits为亚像素比特数。以当前块左上角为基准,根据BV_top获取宽高为W、Th的参考块。若该参考块不可用,则调整BV_top等于BV并获取参考块。若BV包含亚像素部分,则基于亚像素插值得到参考块。其中插值滤波器可以为2-tap插值滤波器,可以与帧间预测、IBC预测中所使用的2-tap插值滤波器相同。将得到的参考块作为上模板区域的预测。同理得到左模板区域的预测。根据模板区域的预测值和模板区域的重建值,计算模板误差值,比如SAD值;
4、可以计算预定义的帧内非角度模式的模板误差值。例如,预定义1个模式Planar,根据参考像素计算Planar模式的模板误差值;
5、根据候选块向量和帧内非角度模式的模板误差值选择最佳的非角度预测方法。若最佳的预测方法为使用某一候选块向量,当该块向量为亚像素精度时,可以基于插值滤波获取当前块的参考块,其中插值滤波器可以使用n-tap滤波器,比如n为8,可以和IBC预测时的插值滤波器相同;
6、根据上述步骤,得到最佳的非角度预测方法,将其与HoG推导得到帧内角度模式生成的预测块组合,得到最终的预测块,完成当前块的编码。
需要说明的是,对本申请实施例提出的解码方法进行试验验证,将亚像素块向量列表应用于DIMD、SGPM模式时可以取得约-0.01%的Y分量编码增益。
下面,以IntraTMP模式,第一语法标识信息为cu_tmp_flag,第二语法标识信息为cu_tmp_lic_flag,第三语法标识信息为cu_tmp_idx对本申请实施例提出的解码方法进行示例性说明。其中,块向量列表可以根据模板误差重排序。模板误差的计算方式、模板区域的选择可以有多种方式。例如,可以为块向量列表预定义模板区域和误差计算方式,或是与当前的预测过程保持一致。以IntraTMP模式为例,当前块可以使用SAD、MR-SAD等误差计算方法,模板区域可以分为L-型模板、上模板和左模板。对应的基于块向量列表的预测过程中的语法元素如下:
…
cu_tmp_flag
if(cu_tmp_flag)
{
…
cu_tmp_lic_flag
…
cu_tmp_idx
…
}
…
解码过程:
1、解码当前块的cu_tmp_flag标志位,当cu_tmp_flag为真时,表明当前编码块使用IntraTMP预测模式。解码cu_tmp_lic_flag标志位,当cu_tmp_lic_flag为真时,当前块使用SAD计算模板误差值;当cu_tmp_lic_flag为假时,当前块使用MR-SAD计算模板误差值;解码cu_tmp_idx索引值,根据该值确定需要用哪些类型的模板进行模板匹配;
2、构造块向量列表,候选块向量可以由相邻块、非相邻块、AR-BVP候选、历史块向量缓存等得到;
3、计算块向量列表中的候选块向量的模板误差值,并基于模板误差值重排序,保留前M个。根据cu_tmp_lic_flag、cu_tmp_idx确定所使用的模板误差计算方法以及所使用的模板。例如,cu_tmp_lic_flag为真时,当前块使用MR-SAD计算模板误差,cu_tmp_idx大于阈值N时,需要分别维护L-型模板、上模板和左模板对应的搜索结果。相应地,对块向量列表的候选使用MR-SAD计算模板误差,并分别得到L-型模板、上模板和左模板对应的模板误差值diff0、diff1和diff2。根据候选的diff0、diff1和diff2得到L-型模板、上模板和左模板下最佳的M0、M1和M2个候选块向量,可以记为mrgList0,mrgList1和mrgList2;
4、可以根据块向量列表的模板误差得到L-型模板、上模板和左模板下的模板误差最大值pDiff0、pDiff1和pDiff2,该值与块向量列表中候选的模板误差值相关。例如,pDiff0可以等于mrgList0候选中最大的diff0加1。后续稀疏搜索、精细搜索时,搜索的候选块向量模板误差值需要小于pDiff;
5、进行稀疏搜索,将搜索结果记为sparseList0,sparseList1和sparseList2,分别是L-型模板、上模板和左模板对应模板误差值下的搜索结果;
6、将块向量列表和稀疏搜索结果进行合并。例如,将mrgList0和sprseList0合并,即保留L型模板对应的MR-SAD最小的前K个候选块向量,K可以是大于或等于sparseList0最大长度的整数。将合并后列表记为sparseList0’;
7、基于上述步骤得到sparselist0’,sparseList1’和sparseList2’,进行精细搜索,确定最终的IntraTMP块向量候选列表。最终的候选列表可以由sparselist0’,sparselist1’和sparselist2’合并得到;
8、基于最终的IntraTMP块向量候选列表和解码得到的cu_tmp_idx,cu_tmp_lic_flag及其他相关语法元素,得到当前块的预测块,完成当前块的编码。
需要说明的是,在本申请的实施例中,IntraTMP模式可以使用SATD、MR-SATD作为模板误差的计算方式。一种实现方法是,在稀疏搜索阶段使用SAD,在精细搜索阶段使用SATD。如果当前块的cu_tmp_lic_flag标志位为真,则对应地分别使用MR-SAD和MR-SATD。可以在计算块向量列表的模板误差值时使用SATD或MR-SATD,与精细搜索阶段保持一致;另一种实现方式是,通过写入码流的标志位cu_tmp_satd_flag表示是否在搜索时使用SATD。例如,当cu_tmp_satd_flag为假时使用SAD,cu_tmp_satd_flag为真时使用SATD。可以由该cu_tmp_satd_flag标志位确定块向量列表的模板误差值计
算方式,当cu_tmp_satd_flag为假时使用SAD,cu_tmp_satd_flag为真时使用SATD。还可以同时编码cu_tmp_satd_flag和cu_tmp_lic_flag标志位确定搜索及块向量列表的模板误差使用SAD、SATD、MR-SAD、MR-SATD中的哪种方式计算。
需要说明的是,在本申请的实施例中,可以以稀疏搜索得到的候选列表sparseList作为指引块向量构造AR-BVP候选,计算这些AR-BVP候选的模板误差值并更新sparseList(列表中保存模板误差值最小的n个候选)。不同模板类型下的sparseList都可以构造AR-BVP候选,并根据AR-BVP候选的模板误差值更新该sparseList。
需要说明的是,在本申请的实施例中,块向量列表用于IntraTMP模式的搜索过程时,可以只用于一种模板类型对应的搜索。例如,实施例三中构造并根据L型模板重排序得到块向量列表mrgList,根据稀疏搜索得到L-型模板、上模板和左模板下的候选列表sparseList0、sparseList1和sparseList2。可以只将mrgList与sparseList0(L型模板对应的候选列表)合并。
需要说明的是,对本申请实施例提出的解码方法进行试验验证,将分别使用SAD、MR-SAD对块向量列表重排序的方法应用于IntraTMP模式时可以取得约-0.02%的Y分量编码增益。
本申请实施例提供了一种编解码方法,在当前块使用预设帧内预测模式的情况下,构建当前块的块向量列表;根据当前块的块向量列表,确定当前块的预测块;其中,当前块的块向量列表满足以下至少之一:块向量列表是通过执行至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。也就是说,在本申请的实施例中,可以对帧内预测过程中的块向量列表的构造和/或使用过程进行调整和改进,可以通过分次构造AR-BVP候选块向量,和/或,直接使用参考块的块向量作为候选块向量添加至块向量列表,和/或,使用亚像素精度的块向量列表来进行帧内预测,和/或,采用不同的模板误差计算方式对块向量列表重排序等方法,提升块向量列表的多样性,从而能够提高帧内预测效率,提升编解码性能。
在本申请的再一实施例中,图16为本申请实施例提供的一种编码方法的流程示意图。如图16所示,该方法可以包括:
步骤1601、在确定当前块使用预设帧内预测模式的情况下,将第一语法标识信息写入码流;其中,第一语法标识信息指示当前块使用预设帧内预测模式。
需要说明的是,在本申请的实施例中,该方法应用于编码器。具体来说,基于图15所示编码器200的组成结构,本申请实施例的编码方法可以应用于帧内预测部分,主要是应用于块向量列表构建的帧内预测方法,能够提升帧内预测的预测效率。
还需要说明的是,在本申请的实施例中,第一语法标识信息用于指示当前块是否使用预设帧内预测模式。在一些实施例中,若第一语法标识信息的取值为第一值,则确定第一语法标识信息指示当前块使用预设帧内预测模式;若第一语法标识信息的取值为第二值,则确定第一语法标识信息指示当前块不使用预设帧内预测模式。
还需要说明的是,在本申请的实施例中,预设帧内预测模式可以包括以下至少之一:帧内块复制IBC,帧内模板匹配预测IntraTMP,空域几何划分模式SGPM,解码端帧内模式推导DIMD,基于模板的帧内模式推导TIMD。
可以理解的是,在本申请的实施例中,针对不同的预设帧内预测模式,第一语法标识信息的表示方式可以是不同的,例如,对于IBC,对应的第一语法标识信息可以表示为cu_pred_mode,对于DIMD,对应的第一语法标识信息可以表示为cu_dimd_flag,对于IntraTMP,对应的第一语法标识信息可以表示为cu_tmp_flag。
在这里,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第一语法标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里不作具体限定。示例性地,第一值可以为1,第二值可以为0;或者,第一值可以为0,第二值可以为1;或者,第一值可以为真(true),第二值可以为假(false);或者,第一值可以为假(false),第二值可以为真(true)。
可以理解的是,在本申请的实施例中,在确定当前块使用预设帧内预测模式之后,可以进一步确定对应的第一语法标识信息,并将第一语法标识信息写入码流,传输至编码端,以使编码端根据解码获得的第一语法标识信息确定当前块使用的预设帧内预测模式。
需要说明的是,在本申请的实施例中,预设帧内预测模式可以为通过构建块向量列表来进行帧内预
测的模式。
在一些实施例中,预设帧内预测模式可以包括以下至少之一:帧内块复制IBC,帧内模板匹配预测IntraTMP,空域几何划分模式SGPM,解码端帧内模式推导DIMD,基于模板的帧内模式推导TIMD。
其中,IBC是通过由当前块指向参考块的块向量实现预测的;IntraTMP通过模板匹配来将最相似模板对应的重建块作为匹配块,用作当前编码块的预测块;SGPM可以将两个帧内预测块加权组合,权重值可以对应为不同的几何划分方式;DIMD会根据HoG推导得到多个帧内角度模式,还会通过构造块向量列表,计算模板误差的方式推导得到一个最佳的非角度模式,将这些模式的预测块加权组合来得到最终的预测块;TIMD根据已有编码信息构建最可能的模式(MPM)列表,对列表内模式在模板区域做预测来得到对应的模板误差值,从而推导出最优的帧内模式。
步骤1602、构建当前块的块向量列表;其中,当前块的块向量列表可以满足以下至少之一:块向量列表是通过执行至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
需要说明的是,在本申请的实施例中,在确定当前块使用预设帧内预测模式的情况下,可以进一步构建当前块的块向量列表。
进一步地,在本申请的实施例中,当前块的块向量列表可以满足以下至少之一:
块向量列表是通过执行至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
块向量列表中包括当前块的指引块向量对应的参考块的块向量;
块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
需要说明的是,在本申请的实施例中,当前块的块向量列表可以是通过至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作。其中,在构建当前块的块向量列表的过程中,可以通过至少两次AR-BVP获得不同的候选块向量,并对获得的候选块向量进行检查后添加至块向量列表中。在执行至少两次AR-BVP之间,还可以针对至少一个非AR-BVP块向量执行检查操作。
需要说明的是,在本申请的实施例中,当前块的块向量列表中可以包括当前块的指引块向量对应的参考块向量。其中,在构建当前块的块向量列表的过程中,可以将AR-BVP处理中基于指引块向量确定的参考块的块向量直接作为候选块向量,并对该候选块向量进行检查后添加至块向量列表中。
需要说明的是,在本申请的实施例中,在预设帧内预测模式为DIMD,或者TIMD,或者SGPM的情况下,构建的当前块的块向量列表中可以包括亚像素精度的块向量。其中,添加至当前块的块向量列表中的块向量可以是亚像素精度的,进而可以获得亚像素精度的预测块。
需要说明的是,在本申请的实施例中,当前块的块向量列表可以是通过块向量列表中的块向量对应的模板误差值进行排序获得的。其中,可以先确定用于计算块向量列表中的块向量的模板误差值的预设模板误差计算方式。预设模板误差计算方式可以根据当前块对应的模板搜索过程的误差计算方式确定,也可以通过码流中传输的第二语法标识信息确定。
进一步地,在本申请的实施例中,在构建当前块的块向量列表时,可以将当前块的块向量列表中的第一块向量确定为当前块的第一指引块向量,并根据第一指引块向量确定当前块的第一候选块向量;其中,第一块向量包括以下至少之一:当前块的相邻块的块向量,当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量;然后将第一候选块向量和第二块向量添加至块向量列表;其中,第二块向量可以为非AR-BVP块向量,例如第二块向量可以是与第一块向量不同的非AR-BVP块向量;接着将块向量列表中的第三块向量确定为当前块的第二指引块向量,并根据第二指引块向量确定当前块的第二候选块向量;其中,第三块向量至少包括第一候选块向量;进而可以将第二候选块向量添加至块向量列表。
需要说明的是,在本申请的实施例中,可以先使用当前块的相邻块的块向量,当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量中的任意数量的块向量构建当前块的块向量列表。其
中,第一块向量可以为当前块的块向量列表中的任意一个或多个块向量,即第一块向量可以为非AR-BVP块向量。
相应地,在本申请的实施例中,第二块向量可以为非AR-BVP块向量,例如第二块向量可以为与第一块向量不同的非AR-BVP块向量,其中,第二块向量也可以为当前块的相邻块的块向量,当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量中的、不同于第一块向量的任意数量的块向量。
相应地,在本申请的实施例中,第三块向量可以包括通过AR-BVP构建的第一候选块向量,还可以包括第一块向量和/或第二块向量。也就是说,在将第一候选块向量和第二块向量添加至当前块的块向量列表之后,除了第一候选块向量可以作为下一次AR-BVP的指引块向量以外,当前块的块向量列表中的其他块向量也可以作为下一次AR-BVP的指引块向量。
可以理解的是,在本申请的实施例中,以两次AR-BVP处理构建当前块的块向量候选列表为例,在第一次AR-BVP处理时,可以使用当前块的块向量列表中的第一块向量作为第一指引块向量,然后根据该第一指引块向量确定出对应的第一候选块向量,其中,该第一候选块向量为AR-BVP块向量。在第一次AR-BVP处理之后,可以将获得的第一候选块向量(AR-BVP块向量)和第二块向量(不同于第一块向量的非AR-BVP块向量)添加至当前块的块向量列表。接着,执行第二次AR-BVP处理,可以先将块向量列表中的第三块向量作为第二指引块向量,其中,该第三块向量至少包括第一次AR-BVP处理获得的第一候选块向量,然后可以根据该第二指引块向量确定出对应的第二候选块向量,该第二候选块向量为AR-BVP块向量。最后,可以将获得的第二候选块向量添加至块向量列表。
可以理解的是,在本申请的实施例中,在构建当前块的块向量列表的过程中,也可以执行两次以上的AR-BVP处理,本申请不进行具体限定。例如,在将获得的第二候选块向量添加至块向量列表之后,还可以进一步根据块向量列表确定下一次AR-BVP处理的指引块向量,进而根据该指引块向量确定出对应的候选块向量,并添加至块向量候选列表。
示例性地,在一些实施例中,假设在构建块向量列表时,AR-BVP可以分两次构建。例如,可以按如下顺序检查并添加候选块向量:
a)继承相邻块的块向量
b)继承非相邻块的块向量
c)由已有块向量构造AR-BVP
d)继承历史块向量缓存列表中的块向量
e)由已有块向量构造AR-BVP
f)由已有块向量的平均得到块向量
g)默认块向量
其中,已有块向量为构建的块向量列表中的部分或者全部块向量。在添加完相邻/非相邻的块向量后,进行第一次构造AR-BVP的过程。此后在添加完历史块向量缓存列表中的块向量后,进行第二次构造AR-BVP的过程。
进一步地,在本申请的实施例中,在构建当前块的块向量列表时,可以将当前块的块向量列表中的第一块向量确定为当前块的第一指引块向量,并确定第一指引块向量对应的第一参考块;其中,第一块向量包括以下至少之一:当前块的相邻块的块向量,当前块的非相邻块的块向量,HMVP中的块向量;然后将第一参考块的块向量确定为当前块的第一候选块向量;和/或,对第一指引块向量和第一参考块的块向量进行求和,确定当前块的第一候选块向量;最终可以将第一候选块向量添加至块向量列表。
需要说明的是,在本申请的实施例中,在进行当前块的块向量列表的构建过程中,可以先根据指引块向量确定出对应的参考块,然后再利用参考块的块向量确定出对应的候选块向量。其中,在完成AR-BVP处理之后,在利用参考块的块向量确定候选块向量时,既可以将指引块向量和参考块的块向量的求和结果确定为候选块向量,添加至块向量候选列表,也可以直接将参考块的块向量确定为候选块向量,添加至块向量候选列表。
可以理解的是,在本申请的实施例中,在根据第一指引块向量确定第一候选块向量的过程中,可以先根据第一指引块向量确定第一参考块,然后再根据第一参考块的块向量确定第一候选块向量。其中,可以对第一指引块向量与第一参考块的块向量进行求和后确定第一候选块向量,也可以直接将第一参考块的块向量确定为第一候选块向量,当然,第一候选块向量也可以既包括第一指引块向量与第一参考块的块向量的求和结果,也包括第一参考块的块向量。
也就是说,在本申请的实施例中,根据指引块向量确定的参考块的块向量,可以直接作为候选块向量被添加至块向量列表中,即当前块的块向量列表中包括当前块的指引块向量对应的参考块的块向量。
示例性地,在一些实施例中,假设在构建块向量列表时,可以直接将参考块的块向量作为块向量候
选(候选块向量)。其中,对给定的一个指引块向量BV_0和对应的参考块的块向量BV_ref,可以通过指引块向量和参考块的块向量相加得到候选块向量BV_arbvp=BV_0+BV_ref,也可以直接将参考块的块向量BV_ref作为候选块向量BV_ext=BV_ref,还可以在构造AR-BVP时,每次根据指引块向量得到参考块向量后,将BV_arbvp和BV_ext作为候选块向量添加至块向量列表。
进一步地,在本申请的实施例中,在构建当前块的块向量列表时,可以先将当前块的块向量列表中的第一块向量确定为当前块的第一指引块向量,并确定第一指引块向量对应的第一参考块;其中,第一块向量包括以下至少之一:当前块的相邻块的块向量,当前块的非相邻块的块向量,HMVP中的块向量;然后将第一参考块的块向量确定为当前块的第一候选块向量;和/或,对第一指引块向量和第一参考块的块向量进行求和,确定当前块的第一候选块向量;接着可以将第一候选块向量和第二块向量添加至块向量列表;其中,第二块向量可以为非AR-BVP块向量,例如第二块向量可以是与第一块向量不同的非AR-BVP块向量;然后将块向量列表中的第三块向量确定为当前块的第二指引块向量,并确定第二指引块向量对应的第二参考块;其中,第三块向量至少包括第一候选块向量;接着将第二参考块的块向量确定为当前块的第二候选块向量;和/或,对第二指引块向量和第二参考块的块向量进行求和,确定当前块的第二候选块向量;最终可以将第二候选块向量添加至块向量列表。
可以理解的是,在本申请的实施例中,以两次AR-BVP处理构建当前块的块向量候选列表为例,在第一次AR-BVP处理时,可以使用当前块的块向量列表中的第一块向量作为第一指引块向量,然后根据该第一指引块向量确定出对应的第一候选块向量,其中,该第一候选块向量为AR-BVP块向量,该第一候选块向量可以包括第一候选块向量对应的第一参考块的块向量,和/或第一指引块向量与对应的第一参考块的块向量的求和结果。在第一次AR-BVP处理之后,可以将获得的第一候选块向量(AR-BVP块向量)和第二块向量(不同于第一块向量的非AR-BVP块向量)添加至当前块的块向量列表。接着,执行第二次AR-BVP处理,可以先将块向量列表中的第三块向量作为第二指引块向量,其中,该第三块向量至少包括第一次AR-BVP处理获得的第一候选块向量,然后可以根据该第二指引块向量确定出对应的第二候选块向量,该第二候选块向量为AR-BVP块向量,该第二候选块向量可以包括第二候选块向量对应的第二参考块的块向量,和/或第二指引块向量与对应的第二参考块的块向量的求和结果。最后,可以将获得的第二候选块向量添加至块向量列表。
可以理解的是,在本申请的实施例中,在构建当前块的块向量列表的过程中,也可以执行两次以上的AR-BVP处理,本申请不进行具体限定。例如,在将获得的第二候选块向量添加至块向量列表之后,还可以进一步根据块向量列表确定下一次AR-BVP处理的指引块向量,进而根据该指引块向量确定出对应的候选块向量,并添加至块向量候选列表。
可以理解的是,在本申请的实施例中,在构建当前块的块向量列表的过程中,可以选择在其中的任意一次或多次的AR-BVP处理过程中,将指引向量对应的参考块的块向量添加至当前块的块向量列表中。
也就是说,在本申请的实施例中,在构建块向量列表时,AR-BVP可以分至少两次构建;同时,在进行AR-BVP处理的过程中,可以直接将参考块的块向量作为候选块向量。
进一步地,在本申请的实施例中,在进行AR-BVP处理获得候选块向量的过程中,指引块向量可以根据块向量列表中的已有的块向量来确定。其中,第一次AR-BVP处理过程中的第一指引块向量与第二次AR-BVP处理过程中的第二指引块向量可以部分相同,也可以完全不同。
也就是说,在本申请的实施例中,不同次构造AR-BVP的过程可以相同也可以不同。例如,第一次构造AR-BVP时可以以块向量列表中已有的全部块向量作为指引块向量;第二次构造AR-BVP时可以以列表中已有的全部块向量和新添加的AR-BVP作为指引块向量。
示例性地,在一些实施例中,第一次AR-BVP处理过程中的第一指引块向量可以包括块向量列表中的部分或者全部块向量,第二次AR-BVP处理过程中的第二指引块向量可以包括块向量列表中的、与第一指引块向量不同的非AR-BVP块向量,还可以包括第一次AR-BVP处理之后添加至块向量列表中的新构建的AR-BVP块向量(即第一候选块向量)。
进一步地,在本申请的实施例中,可以根据当前块的指引块向量进行AR-BVP处理获得至少一个候选块向量,从而可以构建当前块的块向量列表,直到满足预设结束条件;其中,预设结束条件包括以下至少之一:AR-BVP处理的次数大于或者等于预设阈值;通过AR-BVP处理确定的候选块向量的数量大于或者等于第一数量阈值;块向量列表中的块向量的数量大于或者等于第二数量阈值。
可以理解的是,在本申请的实施例中,预设阈值、第一数量阈值以及第二数量阈值均可以为预先设置的大于0的整数,本申请不进行具体限定。例如,预设阈值可以为3,第一数量阈值可以为5,第二数量阈值可以为15。
也就是说,在本申请的实施例中,在确定指引块向量(如第一指引块向量或第二指引块向量)后,
可以构造一个或多个AR-BVP块向量。例如,先根据指引块向量BV0,1确定参考块B1,然后再根据参考块B1的区域内存在的块向量BV1,2构造新的块向量BV0,2=BV0,1+BV1,2。接着,可以继续进行AR-BVP处理,例如根据BV0,n可以确定参考块Bn,若在Bn的区域内存在块向量BVn,n+1,则可以构建新的块向量BV0,n+1=BV0,1+BV1,2+…+BVn,n+1。
需要说明的是,在本申请的实施例中,AR-BVP构造过程的结束条件(预设结束条件)可以包括但不限于:构造AR-BVP的迭代次数、块向量列表中已添加的AR-BVP数量、块向量列表中当前的块向量的数量。
需要说明的是,在本申请的实施例中,不同次构造AR-BVP的过程可以相同也可以不同。例如,第一次构造AR-BVP时可以不根据已添加的AR-BVP(第一候选块向量)继续构造;第二次构造AR-BVP时,每个指引块向量可以构造多个AR-BVP,即可以根据新添加的AR-BVP(第二候选块向量)继续构造。
进一步地,在本申请的实施例中,在根据参考块的块向量确定当前块的候选块向量时,对指引块向量和至少一个参考块的块向量分别进行求和,确定候选块向量;和/或,对指引块向量和参考块的至少一个块向量分别进行求和,确定候选块向量。
需要说明的是,在本申请的实施例中,根据指引块向量可以确定出对应的一个或多个参考块,根据指引块向量也可以确定出对应的一个或多个参考块的块向量。
示例性地,在一些实施例中,在根据第一参考块的块向量确定当前块的第一候选块向量时,对第一指引块向量和至少一个第一参考块的块向量分别进行求和,确定第一候选块向量;和/或,对第一指引块向量和第一参考块的至少一个块向量分别进行求和,确定第一候选块向量。
也就是说,在本申请的实施例中,对于一个指引块向量,可以在对应的参考区域中的至少一个位置确定对应的至少一个参考块,对于其中的任一个参考块,该参考块可以对应有至少一个块向量。
示例性地,在一些实施例中,如图14所示,在确定参考块所对应的块向量时,可以检查多个位置。例如,依次检查参考块中心、左上、右上、左下和右下处是否存在编码块,若存在则将其所保存的块向量作为块向量,其中,任一个参考块可能包括有一个或多个块向量。
进一步地,在本申请的实施例中,可以选择根据块向量列表中块向量的数量,确定添加至块向量列表的HMVP中的块向量的数量。
也就是说,在本申请的实施例中,在构造块向量列表时,可以根据已添加的块向量数量来调整从HMVP中添加至块向量列表的块向量的数量。
示例性地,在一些实施例中,假设块向量列表的最大长度为N,在添加HMVP中的块向量之前,块向量列表中已有n个块向量,那么可以根据N和n来设置添加至块向量列表的HMVP中的块向量的数量,例如,确定添加至块向量列表的HMVP中的块向量的数量为(N–n)/2。
进一步地,在本申请的实施例中,在将任意的块向量(AR-BVP块向量或非AR-BVP块向量)添加至块向量列表之前,可以先对该块向量进行检查。在该块向量不满足预设添加条件的情况下,则不将该块向量添加至块向量列表中,在该块向量满足预设添加条件的情况下,则将该块向量添加至块向量列表中。其中,预设添加条件包括以下至少之一:该块向量与块向量列表中的任意块向量不同;该块向量对应的参考块存在。
示例性地,在一些实施例中,在执行至少两次AR-BVP之间,可以针对至少一个非AR-BVP块向量执行检查操作。例如,对于HMVP中的块向量(非AR-BVP块向量)进行检查操作,确定HMVP中的块向量是否可以被添加到当前块的块向量列表中。如果HMVP中的块向量和列表中已添加的块向量相同,则
不添加该非AR-BVP块向量,即针对执行检查操作的非AR-BVP块向量,如果不满足添加的条件,则选择不添加该非AR-BVP块向量。
相应地,在一些实施例中,在执行至少两次AR-BVP之间,在对至少一个非AR-BVP块向量执行检查操作之后,如果其中的某一个非AR-BVP块向量与列表中已添加的块向量均不同,且该非AR-BVP块向量对应的参考块存在,则可以确定该非AR-BVP块向量可以被添加到当前块的块向量列表中。
步骤1603、根据当前块的块向量列表,确定当前块的预测块。
在本申请的实施例中,在构建当前块的块向量列表之后,可以进一步根据当前块的块向量列表,确定当前块的预测块。
进一步地,在本申请的实施例中,在预设帧内预测模式为DIMD,或者TIMD,或者SGPM的情况下,构建的当前块的块向量列表中可以包括亚像素精度的块向量。相应地,在根据当前块的块向量列表,确定当前块的预测块时,可以先根据块向量列表中的亚像素精度的块向量,确定块向量列表中的块向量的模板误差值;然后可以根据块向量列表中的块向量的模板误差值,确定当前块的预测块。
可以理解的是,在本申请的实施例中,对于亚像素精度的块向量列表,块向量列表中的块向量对应有亚像素精度参数,该亚像素精度参数可以表征的块向量的精度值。其中,亚像素精度参数可以为大于0且小于或者等于1的数值,例如,一个块向量的亚像素精度参数为1/16。
进一步地,在本申请的实施例中,根据块向量列表中的亚像素精度的块向量,确定块向量列表中的块向量的模板误差值时,可以先确定模板类型参数和模板类型参数对应的模板尺寸参数;然后再根据模板类型参数,模板尺寸参数以及亚像素精度的块向量的亚像素比特参数,确定亚像素精度的块向量对应的调整后块向量;接着根据调整后块向量确定参考模板的预测值;最终便可以根据参考模板的预测值和当前模板的重建值,确定块向量列表中的块向量的模板误差值。
需要说明的是,在本申请的实施例中,模板类型参数可以对模板的类型进行确定,其中,根据模板类型参数可以确定对应的模板的类型为上模板或左模板。
需要说明的是,在本申请的实施例中,模板尺寸参数可以对模板的大小进行确定,其中,根据模板尺寸参数可以确定对应的模板的宽或高。其中,对于上模板来说,对应的宽为当前块的宽度值,对应的高则可以由模板尺寸参数确定;对于左模板来说,对应的高为当前块的高度值,对应的宽则可以由模板尺寸参数确定。
示例性地,在一些实施例中,如图15所示,当前块的高度值为H,宽度值为W,根据模板类型参数确定当前块对应的两种模板类型,如上模板和左模板,基于上模板的模板尺寸参数可以确定上模板的宽为Tw,基于左模板的模板尺寸参数可以确定左模板的高为Th。
需要说明的是,在本申请的实施例中,在根据模板类型参数,模板尺寸参数以及亚像素精度的块向量的亚像素比特参数,确定亚像素精度的块向量对应的调整后块向量时,可以根据模板类型参数和模板尺寸参数确定当前块对应的模板和模板的尺寸值,然后再使用块向量对应的亚像素比特参数和模板的尺寸值来进行调整,获得调整后的块向量。
示例性地,在一些实施例中,假设基于模板类型参数确定当前块对应的模板为上模板,对应的模板的尺寸值为高度Th,对应的块向量BV的亚像素比特参数为mv_bits,那么可以按照如下公式完成对块向量BV的调整,获得对应的调整后的块向量BV_top:
BV_top=BV+(Th<<mv_bits) (1)
BV_top=BV+(Th<<mv_bits) (1)
示例性地,在一些实施例中,假设基于模板类型参数确定当前块对应的模板为左模板,对应的模板的尺寸值为宽度Tw,对应的块向量BV的亚像素比特参数为mv_bits,那么可以按照如下公式完成对块向量BV的调整,获得对应的调整后的块向量BV_left:
BV_left=BV+(Tw<<mv_bits) (2)
BV_left=BV+(Tw<<mv_bits) (2)
进一步地,在本申请的实施例中,在根据调整后块向量确定参考模板的预测值时,在调整后块向量对应的候选参考模板可用的情况下,可以根据调整后块向量和亚像素差值算法确定参考模板的预测值;在调整后块向量对应的候选参考模板不可用的情况下,可以根据块向量列表中的块向量和亚像素差值算法确定参考模板的预测值。
可以理解的是,在本申请的实施例中,可以基于调整后的块向量确定对应的候选参考模板,如果该候选参考模板可用,那么便可以直接根据调整后块向量和亚像素差值算法来确定参考模板的预测值;如果该候选参考模板不可用,那么不再使用调整后的块向量,而是根据调整前的块向量和亚像素差值算法来确定参考模板的预测值。
示例性地,在一些实施例中,假设调整后的块向量为BV_top,根据BV_top获取宽高为W、Th的候选参考模板,如果该候选参考模板可用,则可以基于BV_top,通过亚像素差值算法计算的到对应的参考模板的预测值;如果该候选参考模板不可用,则可以调整BV_top等于BV,并通过亚像素差值算法计算的到对应的参考模板的预测值。
需要说明的是,在本申请的实施例中,可以通过差值滤波器来实现亚像素差值算法,其中,插值滤波器可以为2-tap插值滤波器,可以与帧间预测、IBC预测中所使用的2-tap插值滤波器相同。
相应地,在本申请的实施例中,也可以通过上述方式获得左模板区域的预测,即根据BV_left进一步确定出对应的参考模板的预测值。最终,可以分别根据参考模板的预测值和当前模板的重建值,计算块向量对应的模板误差值,进而可以根据块向量列表中的块向量的模板误差值,确定当前块的预测块。
示例性地,在一些实施例中,假设预设帧内预测模式为DIMD,可以计算预定义的帧内非角度模式的模板误差值。例如,预定义1个模式Planar,根据参考像素计算Planar模式的模板误差值;然后可以根据块向量列表中的候选块向量和帧内非角度模式的模板误差值选择最佳的非角度预测方法。若最佳的预测方法为使用某一候选块向量,当该块向量为亚像素精度时,可以基于插值滤波获取当前块的参考块,其中插值滤波器可以使用n-tap滤波器,比如n为8,可以和IBC预测时的插值滤波器相同;在得
到最佳的非角度预测方法之后,将其与HoG推导得到帧内角度模式生成的预测块组合,得到最终的预测块。
进一步地,在本申请的实施例中,当前块的块向量列表可以是通过块向量列表中的块向量对应的模板误差值进行排序获得的。相应地,在根据当前块的块向量列表,确定当前块的预测块时,可以先对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值;然后可以根据块向量列表中的块向量的模板误差值对块向量列表进行排序,获得排序后的块向量列表;最后可以基于排序后的块向量列表,确定当前块的预测块。
需要说明的是,在本申请的实施例中,可以先确定用于计算块向量列表中的块向量的模板误差值的预设模板误差计算方式。其中,预设模板误差计算方式可以根据当前块对应的模板搜索过程的误差计算方式确定,也可以通过码流中传输的第二语法标识信息确定。
可以理解的是,在本申请的实施例中,一种实现方式为第二语法标识信息用于指示预设模板误差计算方式为SAD或MR-SAD,这里可以用cu_tmp_lic_flag表示。在一些实施例中,若第二语法标识信息的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SAD;若第二语法标识信息的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为MR-SAD。
可以理解的是,在本申请的实施例中,另一种实现方式为第二语法标识信息用于指示预设模板误差计算方式为SATD或MR-SATD,这里可以用cu_tmp_lic_flag表示。在一些实施例中,若第二语法标识信息的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SATD;若第二语法标识信息的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为MR-SATD。
可以理解的是,在本申请的实施例中,再一种实现方式为第二语法标识信息用于指示预设模板误差计算方式为SATD或SAD,这里可以用cu_tmp_satd_flag表示。在一些实施例中,若第二语法标识信息的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SATD;若第二语法标识信息的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为SAD。
可以理解的是,在本申请的实施例中,又一种实现方式为第二语法标识信息用于指示预设模板误差计算方式为SAD,MR-SAD,SATD,MR-SATD中的一种计算方式,这里可以用cu_tmp_lic_flag和cu_tmp_satd_flag联合表示。在一些实施例中,若第二语法标识信息中的第一信息cu_tmp_lic_flag的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SAD或SATD;若第二语法标识信息中的第一信息cu_tmp_lic_flag的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为MR-SAD或MR-SATD;若第二语法标识信息中的第二信息cu_tmp_satd_flag的取值为第一值,则确定第二语法标识信息指示预设模板误差计算方式为SAD或MR-SATD;若第二语法标识信息中的第二信息cu_tmp_satd_flag的取值为第二值,则确定第二语法标识信息指示预设模板误差计算方式为SAD或MR-SAD。例如,当cu_tmp_lic_flag的取值为第一值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为SATD;当cu_tmp_lic_flag的取值为第二值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为MR-SATD。
在这里,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第二语法标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里不作具体限定。示例性地,第一值可以为1,第二值可以为0;或者,第一值可以为0,第二值可以为1;或者,第一值可以为真(true),第二值可以为假(false);或者,第一值可以为假(false),第二值可以为真(true)。
进一步地,在本申请的实施例中,在对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值时,可以确定预设模板误差计算方式,并将第二语法标识信息写入码流;其中,第二语法标识信息用于确定预设模板误差计算方式,预设模板误差计算方式包括以下任意一种:SAD,MR-SAD,SATD,MR-SATD;最后可以基于预设模板误差计算方式,确定候选块向量列表中的块向量对应于至少一个模板类型的模板误差值。
可以理解的是,在本申请的实施例中,进行块向量模板误差计算的预设模板误差计算方式可以包括SAD,MR-SAD,SATD,MR-SATD中的任一种计算方式。在确定出进行块向量模板误差计算的预设模板误差计算方式之后,可以进一步确定对应的第二语法标识信息,并将第二语法标识信息写入码流,传输至解码端。
示例性地,在一些实施例中,假设第二语法标识信息使用cu_tmp_lic_flag表示,那么通过cu_tmp_lic_flag取值,可以确定预设模板误差计算方式为SAD或MR-SAD,或者,可以确定预设模板误差计算方式为SATD或MR-SATD。
示例性地,在一些实施例中,假设第二语法标识信息使用cu_tmp_satd_flag表示,那么通过cu_tmp_satd_flag取值,可以确定预设模板误差计算方式为SAD或SATD。
示例性地,在一些实施例中,假设第二标识信息包括第一信息cu_tmp_lic_flag和第二信息cu_tmp_satd_flag,那么通过cu_tmp_lic_flag和cu_tmp_satd_flag取值,可以确定预设模板误差计算方式为SAD,MR-SAD,SATD,MR-SATD中的哪一种计算方式。例如,当cu_tmp_lic_flag的取值为第一值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为SATD;当cu_tmp_lic_flag的取值为第二值,且cu_tmp_satd_flag的取值为第一值时,可以确定预设模板误差计算方式为MR-SATD。
进一步地,在本申请的实施例中,在确定预设模板误差计算方式时,可以先确定第一模板误差计算方式和第二模板误差计算方式;其中,第一模板误差计算方式用于执行至少一个模板类型的稀疏搜索,第二模板误差计算方式用于执行至少一个模板类型的精细搜索和块向量模板误差计算。
也就是说,在本申请的实施例中,可以确定出用于进行稀疏搜索的第一模板误差计算方式,以及用于进行精细搜索和块向量模板误差计算的第二模板误差计算方式,即块向量模板误差计算与精细搜索阶段的模板误差计算方式保持一致。
进一步地,在本申请的实施例中,在确定预设模板误差计算方式时,可以确定第三模板误差计算方式和第四模板误差计算方式;其中,第三模板误差计算方式用于执行至少一个模板类型的稀疏搜索和块向量模板误差计算,第四模板误差计算方式用于执行至少一个模板类型的精细搜索。
也就是说,在本申请的实施例中,可以确定出用于进行稀疏搜索和块向量模板误差计算的第三模板误差计算方式,以及用于进行精细搜索的第四模板误差计算方式,即块向量模板误差计算与稀疏搜索阶段的模板误差计算方式保持一致。
进一步地,在本申请的实施例中,在确定预设模板误差计算方式时,可以确定第五模板误差计算方式;其中,第五模板误差计算方式用于执行至少一个模板类型的稀疏搜索,至少一个模板类型的精细搜索和块向量模板误差计算。
也就是说,在本申请的实施例中,可以确定出用于进行稀疏搜索、精细搜索和块向量模板误差计算的第五模板误差计算方式,即块向量模板误差计算与精细搜索阶段和稀疏搜索阶段的模板误差计算方式保持一致。
进一步,在本申请的实施例中,第二语法标识信息包括第一信息和第二信息,在确定预设模板误差计算方式时,确定第六误差计算方式;其中,第六误差计算方式用于执行至少一个模板类型的稀疏搜索,至少一个模板类型的精细搜索和块向量模板误差计算;然后可以根据第六误差计算方式确定第一信息和第二信息。
也就是说,在本申请的实施例中,可以确定出用于进行稀疏搜索、精细搜索和块向量模板误差计算的第六模板误差计算方式,即块向量模板误差计算与精细搜索阶段和稀疏搜索阶段的模板误差计算方式保持一致。
也就是说,在本申请的实施例中,在本申请的实施例中,可以同时编码cu_tmp_satd_flag和cu_tmp_lic_flag标志位来指示搜索及块向量列表的模板误差使用SAD、SATD、MR-SAD、MR-SATD中的哪种方式计算。
进一步地,在对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值时,可以根据当前块对应的模板搜索过程中的稀疏搜索的预设模板误差计算方式对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值;或者,根据当前块对应的模板搜索过程中的精细搜索的预设模板误差计算方式对块向量列表中的块向量进行块向量模板误差计算,确定块向量列表中的块向量的模板误差值。
也就是说,在本申请的实施例中,块向量模板误差计算的预设模板误差计算方式可以直接复用稀疏搜索阶段的模板误差计算方式,或者,块向量模板误差计算的预设模板误差计算方式可以直接复用精细搜索阶段的模板误差计算方式。
进一步地,在本申请的实施例中,在根据块向量列表中的块向量的模板误差值对块向量列表进行排序,获得排序后的块向量列表时,可以确定至少一个模板类型对应的至少一个模板数量,并将第三语法标识信息写入码流;其中,第三语法标识信息用于确定至少一个模板类型对应的至少一个模板数量;接着根据至少一个模板数量,分别对候选块向量列表中的块向量对应于至少一个模板类型的模板误差值进行排序,获得至少一个模板类型对应的至少一个第一候选列表。
需要说明的是,在本申请的实施例中,针对不同模板类型,可以确定不同模板类型对应的模板数量,然后结合模板数量,对不同模板类型下的块向量的模板误差值进行排序,最终便可以获得不同模板类型对应的第一候选列表,即排序后的块向量列表包括有不同模板类型对应的第一候选列表。
可以理解的是,在本申请的实施例中,第三语法标识信息用于指示不同模板类型对应的模板数量,这里可以用cu_tmp_idx表示。在一些实施例中,根据第三语法标识信息的取值,可以确定出不同模板类型对应的需要维护的搜索结果。例如,根据第三语法标识信息的取值确定需要分别维护L-型模板、
上模板和左模板对应的搜索结果,即确定出L-型模板、上模板和左模板对应的模板数量为M0、M1和M2,其中,M0、M1和M2均为大于或者等于0的整数。
示例性地,在一些实施例中,当前块使用MR-SAD计算模板误差,当第三语法标识信息cu_tmp_idx的取值大于阈值N(如N=13)时,需要分别维护L-型模板、上模板和左模板对应的搜索结果。相应地,对块向量列表的块向量使用MR-SAD计算模板误差,并分别得到L-型模板、上模板和左模板对应的模板误差值diff0、diff1和diff2。根据块向量的diff0、diff1和diff2得到L-型模板、上模板和左模板下最佳的M0、M1和M2个候选块向量,可以记为mrgList0,mrgList1和mrgList2;其中,mrgList0,mrgList1和mrgList2分别为L-型模板、上模板和左模板对应的第一候选列表。
进一步地,在本申请的实施例中,在基于排序后的块向量列表,确定当前块的预测块时,可以先分别按照至少一个模板类型进行稀疏搜索,获得至少一个模板类型对应的至少一个第二候选列表;然后再对至少一个第一候选列表和至少一个第二候选列表分别进行合并,获得至少一个模板类型对应的至少一个第三候选列表;接着可以基于至少一个第三候选列表,分别按照至少一个模板类型进行精细搜索,获得至少一个模板类型对应的至少一个第四候选列表;最终可以根据至少一个第四候选列表确定当前块对应的目标候选列表,并根据目标候选列表确定当前块的预测块。
示例性地,在一些实施例中,对于L-型模板、上模板和左模板,分别进行稀疏搜索,将搜索结果记为sparseList0,sparseList1和sparseList2,分别是L-型模板、上模板和左模板对应模板误差值下的搜索结果;其中,sparseList0,sparseList1和sparseList2分别为L-型模板、上模板和左模板对应的第二候选列表。
示例性地,在一些实施例中,将块向量列表和稀疏搜索结果进行合并,即将至少一个第一候选列表和至少一个第二候选列表分别进行合并。例如,将mrgList0和sprseList0合并,即保留L型模板对应的MR-SAD最小的前K个候选块向量,K可以是大于或等于sparseList0最大长度的整数,将合并后列表记为sparseList0’。相应地,可以将mrgList1和sprseList1合并,获得对应的sparseList1’,可以将mrgList2和sprseList2合并,获得对应的sparseList2’。其中,sparseList0’,sparseList1’和sparseList2’分别为L-型模板、上模板和左模板对应的第三候选列表。
示例性地,在一些实施例中,基于L-型模板、上模板和左模板对应的合并后的第三候选列表sparseList0’,sparseList1’和sparseList2’,可以分别进行精细搜索,获得的L-型模板、上模板和左模板对应的模板误差值下的搜索结果sparselist0’,sparselist1’和sparselist2’;其中,sparselist0’,sparselist1’和sparselist2’分别为L-型模板、上模板和左模板对应的第四候选列表。
示例性地,在一些实施例中,在根据至少一个第四候选列表确定当前块对应的目标候选列表时,可以对至少一个第四候选列表进行合并,例如,对sparselist0’,sparselist1’和sparselist2’进行合并后获得最终的目标候选列表。
进一步地,在本申请的实施例中,在进行稀疏搜索,获得至少一个第二候选列表之后,对于其中的任一个第二候选列表,可以选择基于第二候选列表进行AR-BVP构造。其中,可以先根据第二候选列表确定第三指引块向量,然后根据第三指引块向量确定当前块的第三候选块向量;接着可以确定第三候选块向量对应的模板误差值,并根据第三候选块向量对应的模板误差值更新第二候选列表。
示例性地,在一些实施例中,可以以稀疏搜索得到的候选列表sparseList中的块向量作为指引块向量(第三指引块向量)构造AR-BVP候选(第三候选块向量),然后可以计算这些AR-BVP候选的模板误差值并更新sparseList。其中,不同模板类型下的sparseList都可以构造AR-BVP候选,并根据AR-BVP候选的模板误差值更新该sparseList。
进一步地,在本申请的实施例中,在基于排序后的块向量列表,确定当前块的预测块时,可以先分别按照至少一个模板类型进行稀疏搜索,获得至少一个模板类型对应的至少一个第二候选列表;然后对预设模板类型对应的第一候选列表和至少一个第二候选列表分别进行合并,获得至少一个模板类型对应的至少一个第三候选列表;接着可以基于至少一个第三候选列表,分别按照至少一个模板类型进行精细搜索,获得至少一个模板类型对应的至少一个第四候选列表;最终可以根据至少一个第四候选列表确定当前块对应的目标候选列表,并根据目标候选列表确定当前块的预测块
需要说明的是,在本申请的实施例中,在将块向量列表和稀疏搜索结果进行合并时,可以选择使用预设模板类型对应的第一候选列表分别与至少一个第二候选列表进行合并,获得至少一个模板类型对应的至少一个第三候选列表。其中,预设模板类型可以为L-型模板、上模板和左模板中的任意一种。
示例性地,在一些实施例中,在将块向量列表和稀疏搜索结果进行合并时,可以将mrgList0分别和sprseList0,sprseList1以及sprseList2合并,然后将合并后列表记为sparseList0’,sparseList1’和sparseList2’,sparseList0’,sparseList1’和sparseList2’分别为L-型模板、上模板和左模板对应的第三候选列表。
也就是说,在本申请的实施例中,可以构造并根据预设模板类型(如L型模板)重排序得到块向量列表mrgList,根据稀疏搜索得到L-型模板、上模板和左模板下的候选列表sparseList0、sparseList1和sparseList2,后续可以只将mrgList分别与sparseList0、sparseList1和sparseList2合并。
进一步地,在本申请的实施例中,在基于至少一个第三候选列表进行精细搜索的过程中,第三候选列表中的全部块向量对应的全部模板搜索区域均是相同的;或者,在基于至少一个第三候选列表进行精细搜索的过程中,第三候选列表中的第四块向量对应的模板搜索区域均是相同的;其中,第四块向量为来源于第一候选列表中的块向量。
需要说明的是,在本申请的实施例中,在基于至少一个第三候选列表,分别按照至少一个模板类型进行精细搜索时,对于第三候选列表中的块向量对应的模板搜索区域,可以相同也可以不同。例如,第三候选列表中的任意两个块向量对应的两个模板搜索区域可以是相同的;或者,第三候选列表中的任意两个第四块向量对应的两个模板搜索区域可以是相同的。
可以理解的是,在本申请的实施例中,第四块向量可以为第三候选列表中的、来源于第一候选列表的块向量。即在第一候选列表与第二候选列表进行合并的过程中,第一候选列表中的第四块向量组成了第三候选列表。
进一步地,在本申请的实施例中,在根据当前块的块向量列表,确定当前块的预测块时,还可以在当前块的块向量列表中确定当前块的目标块向量;然后根据目标块向量确定当前块的预测块。相应地,还可以根据目标块向量确定当前块的块向量索引序号,并将块向量索引序号写入码流。
示例性地,在一些实施例中,如果预设帧内预测模式为IBC,可以根据目标块向量确定当前块的块向量索引序号。例如,在IBC merge模式下,根据目标块向量确定merge索引(块向量索引序号)。
进一步地,在本申请的实施例中,根据当前块的原始块和预测块确定当前块的残差块;将当前块的残差块写入码流。
可以理解的是,在本申请的实施例中,在确定当前块的预测块之后,可以将当前块的原始块与预测块的差值,确定为当前块的残差块。
综上所述,通过上述步骤1601至步骤1603所提出的编码方法,对帧内预测过程中的块向量列表的构造和/或使用过程进行了调整和改进,一方面,在构造块向量列表时,可以分次构造AR-BVP候选块向量,另一方面,也可以直接使用参考块的块向量作为候选块向量添加至块向量列表;再一方面,可以使用亚像素精度的块向量列表来进行帧内预测;又一方面,可以采用多种方式进行多种模板误差计算方式的确定,从而可以采用不同的模板误差计算方式对块向量列表重排序。
也就是说,本申请实施例提出的编码方法,是一种对块向量列表的构造和/或使用的改进方法,其中,块向量列表可以是IBC模式的AMVP/Merge列表、IntraTMP模式的Merge列表、或者其他帧内模式为得到基于块向量的预测而构建的块向量列表。在块向量列表的构造和/或使用过程中,可以通过分次构造AR-BVP候选块向量,和/或;直接将参考块的块向量添加至块向量列表,和/或;在帧内模式中使用亚像素精度的块向量列表和/或;使用不同的模板误差计算方式对块向量列表进行排序等方法的应用,提升了块向量列表的多样性以及对块向量列表的利用效率。
下面,以IBC模式,第一语法标识信息为cu_pred_mode对本申请实施例提出的编码方法进行示例性说明。其中,在构建块向量列表时,AR-BVP可以分多次构建,还可以直接将参考块的块向量作为块向量候选添加至块向量列表中。
编码过程:
1、编码当前块,确定当前块选择IBC模式编码;
2、构造块向量列表,顺序检查并添加候选块向量,其中分次添加AR-BVP候选。例如,可以按如下顺序构造:
a)继承相邻块的块向量
b)继承非相邻块的块向量
c)由已有块向量构造AR-BVP
d)继承历史块向量缓存列表中的块向量
e)由已有块向量构造AR-BVP
f)由已有块向量的平均得到块向量
g)默认块向量(与块大小相关)
在添加完相邻/非相邻的块向量后,进行构造AR-BVP的过程。此后在添加完历史块向量缓存列表中的块向量后,进行构造AR-BVP的过程;
3、确定构造AR-BVP的过程。构造AR-BVP的指引块向量可以包含:列表中已有的全部块向量、列表中部分(一个或以上)块向量、新构造的块向量(AR-BVP)。在确定某一指引块向量后,可以构
造一个或以上的AR-BVP。构造过程的结束条件可以包含:构造AR-BVP的迭代次数、以添加的AR-BVP数量、当前列表的数量;不同次构造AR-BVP的过程可以不同。例如,第一次构造AR-BVP时以列表中已有的全部块向量作为指引块向量,不根据已添加的AR-BVP继续构造。第二次构造AR-BVP时以列表中已有的全部块向量和新添加的AR-BVP作为指引块向量,且每个指引块向量构造多个AR-BVP;
4、对给定的一个指引块向量BV_0和参考块的块向量BV_ref,除了将其相加得到BV_arbvp=BV_0+BV_ref,可以直接将BV_ref作为候选块向量BV_ext=BV_ref检查并添加至块向量列表中。例如,在构造AR-BVP时,每次根据指引块向量得到参考块向量后,可以分别检查并添加BV_arbvp和BV_ext;
5、若当前块为IBC merge模式,确定merge索引值,从块向量列表中选中对应的块向量,得到参考块作为当前块的预测块;
6、若当前块为IBC AMVP模式,根据编码端搜索确定当前块的块向量,得到参考块作为当前块的预测块。确定BVP索引值,从块向量列表中选中对应的块向量。根据该块向量和当前块的块向量确定块向量残差BVD;
7、由当前块的预测块和当前块的原始值得到残差块,通过变换量化等步骤转换后通过熵编码方法编码。此外将cu_pred_mode、merge索引值、BVD等编码信息编码,完成当前块的编码。
需要说明的是,对本申请实施例提出的编码方法进行试验验证,将分次构造AR-BVP应用于IBC模式时在增强压缩的参考软件测试平台(Enhanced Compression Model,ECM)参考软件上可以取得约-0.01%的Y分量编码增益。
需要说明的是,对本申请实施例提出的编码方法进行试验验证,将直接利用参考块的块向量作为候选块向量的方法应用于IntraTMP模式时可以取得约-0.03%的Y分量编码增益。
下面,以DIMD模式,第一语法标识信息为cu_dimd_flag对本申请实施例提出的编码方法进行示例性说明。其中,在DIMD模式中可以构造亚像素精度的块向量列表,根据块向量列表中块向量得到基于亚像素插值的预测块,之后与由帧内预测得到的预测块组合,得到最终的预测块。例如,将得到基于亚像素差值的预测块与由梯度直方图HoG推导的帧内模式预测块组合。
编码过程:
1、编码当前块,确定当前块选择DIMD预测模式编码;
2、根据已重建区域(或已编码的信息)得到HoG并推导得到帧内角度模式,生成对应的预测块;
3、构建块向量列表,其中候选块向量的精度为亚像素精度。例如,块向量的精度为1/16个像素。候选块向量可以由相邻块、非相邻块、AR-BVP候选、历史块向量缓存等得到;
4、计算块向量列表中N个块向量的模板误差值。例如,模板的宽、高为Tw、Th。当前块宽、高为W、H。模板区域如图15。
候选块向量为BV,分别获取对上模板和左模板的预测。例如,获取上模板区域。根据模板高度Th对BV做调整,BV_top=BV+(Th<<mv_bits),mv_bits为亚像素比特数。以当前块左上角为基准,根据BV_top获取宽高为W、Th的参考块。若该参考块不可用,则调整BV_top等于BV并获取参考块。若BV包含亚像素部分,则基于亚像素插值得到参考块。其中插值滤波器可以为2-tap插值滤波器,可以与帧间预测、IBC预测中所使用的2-tap插值滤波器相同。将得到的参考块作为上模板区域的预测。同理得到左模板区域的预测。根据模板区域的预测值和模板区域的重建值,计算模板误差值,比如SAD值;
5、可以计算预定义的帧内非角度模式的模板误差值,例如,预定义1个模式Planar,根据参考像素计算Planar模式的模板误差值;
6、根据候选块向量和帧内非角度模式的模板误差值选择最佳的非角度预测方法。若最佳的预测方法为使用某一候选块向量,当该块向量为亚像素精度时,可以基于插值滤波获取当前块的参考块,其中插值滤波器可以使用n-tap滤波器,比如n为8,可以和IBC预测时的插值滤波器相同;
7、根据上述步骤,得到最佳的非角度预测方法,将其与HoG推导得到帧内角度模式生成的预测块组合,得到最终的预测块。由当前块的预测块和当前块的原始值得到残差块,通过变换量化等步骤转换后通过熵编码方法编码。此外将cu_dimd_flag等编码信息编码,完成当前块的编码。
需要说明的是,对本申请实施例提出的编码方法进行试验验证,将亚像素块向量列表应用于DIMD、SGPM模式时可以取得约-0.01%的Y分量编码增益。
下面,以IntraTMP模式,第一语法标识信息为cu_tmp_flag,第二语法标识信息为cu_tmp_lic_flag,第三语法标识信息为cu_tmp_idx对本申请实施例提出的编码方法进行示例性说明。其中,块向量列表可以根据模板误差重排序。模板误差的计算方式、模板区域的选择可以有多种方式。例如,可以为块向量列表预定义模板区域和误差计算方式,或是与当前的预测过程保持一致。以IntraTMP模式为例,当
前块可以使用SAD、MR-SAD等误差计算方法,模板区域可以分为L-型模板、上模板和左模板。对应的基于块向量列表的预测过程中的语法元素如下:
…
cu_tmp_flag
if(cu_tmp_flag)
{
…
cu_tmp_lic_flag
…
cu_tmp_idx
…
}
…
编码过程:
1、编码当前块,确定当前块选择IntraTMP预测模式;
2、构造块向量列表,候选块向量可以由相邻块、非相邻块、AR-BVP候选、历史块向量缓存等得到;
3、计算块向量列表中的候选块向量的模板误差值,并基于模板误差值重排序,保留前M个。可以分别计算SAD和MR-SAD计算方式下L-型模板、上模板和左模板对应的模板误差值,得到对应的排序后的块向量列表,记为mrgList0,mrgList1,mrgList2,mrgListMR0,mrgListMR1,mrgListMR2;
4、可以根据步骤3得到模板误差最大值pDiff,该值与块向量列表中候选的模板误差值相关。例如,pDiff可以等于mrgList候选中最大的diff加1。后续稀疏搜索、精细搜索时,搜索的候选块向量模板误差值需要小于pDiff。不同的模板误差计算方式和模板类型可以设置对应的pDiff;
5、进行稀疏搜索,得到SAD和MR-SAD计算方式下L-型模板、上模板和左模板对应的搜索结果,可以记为sparseList0,sparseList1、sparseList2、sparseListMR0,sparseListMR1、sparseListMR2。将对应的块向量列表和稀疏搜索结果进行合并。根据合并后列表进行精细搜索,分别得到SAD和MR-SAD计算方式下最终的IntraTMP块向量候选列表;
6、确定当前块是使用SAD对应的IntraTMP块向量候选列表还是MR-SAD对应的列表,设置相应的cu_tmp_lic_flag标志位取值。进一步确定当前块在列表中选择的块向量,由索引值cu_tmp_idx表示。根据块向量得到参考块作为当前块的预测块。由当前块的预测块和当前块的原始值得到残差块,通过变换量化等步骤转换后通过熵编码方法编码。此外将cu_tmp_flag、cu_tmp_idx、cu_tmp_lic_flag等编码信息编码,完成当前块的编码。
需要说明的是,在本申请的实施例中,IntraTMP模式可以使用SATD、MR-SATD作为模板误差的计算方式。一种实现方法是,在稀疏搜索阶段使用SAD,在精细搜索阶段使用SATD。如果当前块的cu_tmp_lic_flag标志位为真,则对应地分别使用MR-SAD和MR-SATD。可以在计算块向量列表的模板误差值时使用SATD或MR-SATD,与精细搜索阶段保持一致;另一种实现方式是,通过写入码流的标志位cu_tmp_satd_flag表示是否在搜索时使用SATD。例如,当cu_tmp_satd_flag为假时使用SAD,cu_tmp_satd_flag为真时使用SATD。可以由该cu_tmp_satd_flag标志位确定块向量列表的模板误差值计算方式,当cu_tmp_satd_flag为假时使用SAD,cu_tmp_satd_flag为真时使用SATD。还可以同时编码cu_tmp_satd_flag和cu_tmp_lic_flag标志位确定搜索及块向量列表的模板误差使用SAD、SATD、MR-SAD、MR-SATD中的哪种方式计算。
需要说明的是,在本申请的实施例中,可以以稀疏搜索得到的候选列表sparseList作为指引块向量构造AR-BVP候选,计算这些AR-BVP候选的模板误差值并更新sparseList(列表中保存模板误差值最小的n个候选)。不同模板类型下的sparseList都可以构造AR-BVP候选,并根据AR-BVP候选的模板误差值更新该sparseList。
需要说明的是,在本申请的实施例中,块向量列表用于IntraTMP模式的搜索过程时,可以只用于一种模板类型对应的搜索。例如,实施例三中构造并根据L型模板重排序得到块向量列表mrgList,根据稀疏搜索得到L-型模板、上模板和左模板下的候选列表sparseList0、sparseList1和sparseList2。可以只将mrgList与sparseList0(L型模板对应的候选列表)合并。
需要说明的是,对本申请实施例提出的编码方法进行试验验证,将分别使用SAD、MR-SAD对块向量列表重排序的方法应用于IntraTMP模式时可以取得约-0.02%的Y分量编码增益。
本申请实施例提供了一种编解码方法,在当前块使用预设帧内预测模式的情况下,构建当前块的块向量列表;根据当前块的块向量列表,确定当前块的预测块;其中,当前块的块向量列表满足以下至少
之一:块向量列表是通过执行至少两次AR-BVP构建的,且在执行至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。也就是说,在本申请的实施例中,可以对帧内预测过程中的块向量列表的构造和/或使用过程进行调整和改进,可以通过分次构造AR-BVP候选块向量,和/或,直接使用参考块的块向量作为候选块向量添加至块向量列表,和/或,使用亚像素精度的块向量列表来进行帧内预测,和/或,采用不同的模板误差计算方式对块向量列表重排序等方法,提升块向量列表的多样性,从而能够提高帧内预测效率,提升编解码性能。
基于上述实施例,在本申请的再一实施例中,基于前述实施例相同的发明构思,图17为本申请实施例提供的一种编码器的组成结构示意图。如图17所示,该编码器170可以包括第一确定单元1701,其中:
第一确定单元1701,配置为在确定当前块使用预设帧内预测模式的情况下,将第一语法标识信息写入码流;其中,所述第一语法标识信息指示所述当前块使用所述预设帧内预测模式;构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
可以理解地,在本申请的实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的组成部分可以集成在一个处理单元中,也可以是单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器170,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。
基于上述编码器170的组成以及计算机可读存储介质,图18为本申请实施例提供的一种编码器的具体硬件结构示意图。如图18所示,编码器170可以包括:第一通信接口1801、第一存储器1802和第一处理器1803;组件通过第一总线系统1804耦合在一起。可理解,第一总线系统1804用于实现这些组件之间的连接通信。第一总线系统1804除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都标为第一总线系统1804。其中,
第一通信接口1801,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第一存储器1802,用于存储能够在第一处理器1803上运行的计算机程序;
第一处理器1803,用于在运行所述计算机程序时,执行:在确定当前块使用预设帧内预测模式的情况下,将第一语法标识信息写入码流;其中,所述第一语法标识信息指示所述当前块使用所述预设帧内预测模式;构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
可以理解,本申请实施例中的第一存储器1802可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1802旨在包括但不限于这些和任意其它适合类型的存储器。
而第一处理器1803可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1803中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1803可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1802,第一处理器1803读取第一存储器1802中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,第一处理器1803还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
在本申请的再一实施例中,基于前述实施例相同的发明构思,图19为本申请实施例提供的一种解码器的组成结构示意图。如图19所示,该解码器190可以包括第二确定单元1901,其中:
第二确定单元1901,配置为解码码流,确定第一语法标识信息;在所述第一语法标识信息指示当前块使用预设帧内预测模式的情况下,构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的组成部分可以集成在一个处理单元中,也可以是单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器190,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。
基于上述解码器190的组成以及计算机可读存储介质,图20为本申请实施例提供的一种解码器的具体硬件结构示意图。如图20所示,解码器190可以包括:第二通信接口2001、第二存储器2002和第二处理器2003;组件通过第二总线系统2004耦合在一起。可理解,第二总线系统2004用于实现这些组件之间的连接通信。第二总线系统2004除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都标为第二总线系统2004。其中,
第二通信接口2001,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第二存储器2002,用于存储能够在第二处理器2003上运行的计算机程序;
第二处理器2003,用于在运行所述计算机程序时,执行:解码码流,确定第一语法标识信息;在所述第一语法标识信息指示当前块使用预设帧内预测模式的情况下,构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:
所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;
所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;
所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;
所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
可选地,作为另一个实施例,第二处理器2003还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
可以理解,第二存储器2002与第一存储器1802的硬件功能类似,第二处理器2003与第一处理器1803的硬件功能类似;这里不再详述。
在本申请的再一实施例中,图21为本申请实施例提供的一种编解码系统的组成结构示意图。如图21所示,编解码系统210可以包括编码器2101和解码器2102。
在本申请的实施例中,编码器2101可以为前述实施例中任一项所述的编码器,解码器2102可以为前述实施例中任一项所述的解码器。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在当前块使用预设帧内预测模式的情况下,构建当前块的块向量列表;根据当前块的块向量列表,确定当前块的预测块;其中,当前块的块向量列表满足以下至少之一:块向量列表是通过执行至少两次AR-BVP构建的,且在
执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;块向量列表中包括当前块的指引块向量对应的参考块的块向量;块向量列表中包括亚像素精度的块向量;其中,亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;块向量列表是通过块向量列表中的块向量对应的模板误差值进行排序获得的;其中,块向量的模板误差值是通过预设模板误差计算方式确定的,预设模板误差计算方式是根据当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。也就是说,在本申请的实施例中,可以对帧内预测过程中的块向量列表的构造和/或使用过程进行调整和改进,可以通过分次构造AR-BVP候选块向量,和/或,直接使用参考块的块向量作为候选块向量添加至块向量列表,和/或,使用亚像素精度的块向量列表来进行帧内预测,和/或,采用不同的模板误差计算方式对块向量列表重排序等方法,提升块向量列表的多样性,从而能够提高帧内预测效率,提升编解码性能。
Claims (48)
- 一种解码方法,应用于解码器,所述方法包括:解码码流,确定第一语法标识信息;在所述第一语法标识信息指示当前块使用预设帧内预测模式的情况下,构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:所述块向量列表是通过执行至少两次自动重定位的块向量预测AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于解码端帧内模式推导DIMD,或者基于模板的帧内模式推导TIMD,或者空域几何划分模式SGPM;所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
- 根据权利要求1所述的方法,其中,所述构建所述当前块的块向量列表,包括:将所述当前块的块向量列表中的第一块向量确定为所述当前块的第一指引块向量,并根据所述第一指引块向量确定所述当前块的第一候选块向量;其中,所述第一块向量包括以下至少之一:所述当前块的相邻块的块向量,所述当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量;将所述第一候选块向量和第二块向量添加至所述块向量列表;其中,所述第二块向量是非AR-BVP块向量;将所述块向量列表中的第三块向量确定为所述当前块的第二指引块向量,并根据所述第二指引块向量确定所述当前块的第二候选块向量;其中,第三块向量至少包括所述第一候选块向量;将所述第二候选块向量添加至所述块向量列表。
- 根据权利要求1所述的方法,其中,所述构建所述当前块的块向量列表,包括:将所述当前块的块向量列表中的第一块向量确定为所述当前块的第一指引块向量,并确定所述第一指引块向量对应的第一参考块;其中,所述第一块向量包括以下至少之一:所述当前块的相邻块的块向量,所述当前块的非相邻块的块向量,HMVP中的块向量;将所述第一参考块的块向量确定为所述当前块的第一候选块向量;和/或,对所述第一指引块向量和所述第一参考块的块向量进行求和,确定所述当前块的第一候选块向量;将所述第一候选块向量添加至所述块向量列表。
- 根据权利要求1中的任一项所述的方法,其中,所述构建所述当前块的块向量列表,包括:将所述当前块的块向量列表中的第一块向量确定为所述当前块的第一指引块向量,并确定所述第一指引块向量对应的第一参考块;其中,所述第一块向量包括以下至少之一:所述当前块的相邻块的块向量,所述当前块的非相邻块的块向量,HMVP中的块向量;将所述第一参考块的块向量确定为所述当前块的第一候选块向量;和/或,对所述第一指引块向量和所述第一参考块的块向量进行求和,确定所述当前块的第一候选块向量;将所述第一候选块向量和第二块向量添加至所述块向量列表;其中,所述第二块向量是非AR-BVP块向量;将所述块向量列表中的第三块向量确定为所述当前块的第二指引块向量,并确定所述第二指引块向量对应的第二参考块;其中,第三块向量至少包括所述第一候选块向量;将所述第二参考块的块向量确定为所述当前块的第二候选块向量;和/或,对所述第二指引块向量和所述第二参考块的块向量进行求和,确定所述当前块的第二候选块向量;将所述第二候选块向量添加至所述块向量列表。
- 根据权利要求4所述的方法,其中,所述方法还包括:根据所述当前块的指引块向量进行AR-BVP处理获得至少一个候选块向量,以构建所述当前块的所述块向量列表,直到满足预设结束条件;其中,所述预设结束条件包括以下至少之一:所述AR-BVP处理的次数大于或者等于预设阈值;通过所述AR-BVP处理确定的候选块向量的数量大于或者等于第一数量阈值;所述块向量列表中的块向量的数量大于或者等于第二数量阈值。
- 根据权利要求2或3所述的方法,其中,所述方法还包括:根据所述块向量列表中块向量的数量,确定添加至所述块向量列表的所述HMVP中的块向量的数量。
- 根据权利要求4所述的方法,其中,所述根据所述当前块的块向量列表,确定所述当前块的预测块,包括:根据所述块向量列表中的亚像素精度的块向量,确定所述块向量列表中的块向量的模板误差值;根据所述块向量列表中的块向量的模板误差值,确定所述当前块的预测块。
- 根据权利要求7所述的方法,其中,所述根据所述块向量列表中的亚像素精度的块向量,确定所述块向量列表中的块向量的模板误差值,包括:确定模板类型参数和所述模板类型参数对应的模板尺寸参数;根据所述模板类型参数,所述模板尺寸参数以及所述亚像素精度的块向量的亚像素比特参数,确定所述亚像素精度的块向量对应的调整后块向量;根据所述调整后块向量确定参考模板的预测值;根据所述参考模板的预测值和当前模板的重建值,确定所述块向量列表中的块向量的模板误差值。
- 根据权利要求8所述的方法,其中,所述根据所述调整后块向量确定参考模板的预测值,包括:在所述调整后块向量对应的候选参考模板可用的情况下,根据所述调整后块向量和亚像素差值算法确定所述参考模板的预测值;在所述调整后块向量对应的候选参考模板不可用的情况下,根据所述块向量列表中的块向量和亚像素差值算法确定所述参考模板的预测值。
- 根据权利要求4,7-9中的任一项所述的方法,其中,所述根据所述当前块的块向量列表,确定所述当前块的预测块,包括:对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值;根据所述块向量列表中的块向量的模板误差值对所述块向量列表进行排序,获得排序后的块向量列表;基于所述排序后的块向量列表,确定所述当前块的预测块。
- 根据权利要求10所述的方法,其中,所述对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值,包括:解码码流,确定所述第二语法标识信息;根据所述第二语法标识信息确定预设模板误差计算方式;其中,所述预设模板误差计算方式包括以下任意一种:绝对误差和SAD,MR-SAD,绝对变换误差和SATD,MR-SATD;基于所述预设模板误差计算方式,确定所述候选块向量列表中的块向量对应于所述至少一个模板类型的模板误差值。
- 根据权利要求11所述的方法,其中,所述根据所述第二语法标识信息确定预设模板误差计算方式,包括:根据所述第二语法标识信息确定第一模板误差计算方式和第二模板误差计算方式;其中,所述第一模板误差计算方式用于执行所述至少一个模板类型的稀疏搜索,所述第二模板误差计算方式用于执行所述至少一个模板类型的精细搜索和块向量模板误差计算。
- 根据权利要求11所述的方法,其中,所述根据所述第二语法标识信息确定预设模板误差计算方式,包括:根据所述第二语法标识信息确定第三模板误差计算方式和第四模板误差计算方式;其中,所述第三模板误差计算方式用于执行所述至少一个模板类型的稀疏搜索和块向量模板误差计算,所述第四模板误差计算方式用于执行所述至少一个模板类型的精细搜索。
- 根据权利要求11所述的方法,其中,所述根据所述第二语法标识信息确定预设模板误差计算方式,包括:根据所述第二语法标识信息确定第五模板误差计算方式;其中,所述第五模板误差计算方式用于执行所述至少一个模板类型的稀疏搜索,所述至少一个模板类型的精细搜索和块向量模板误差计算。
- 根据权利要求11所述的方法,其中,所述第二语法标识信息包括第一信息和第二信息,所述根据所述第二语法标识信息确定预设模板误差计算方式,包括:根据所述第一信息和所述第二信息,确定第六误差计算方式;其中,所述第六误差计算方式用于执行所述至少一个模板类型的稀疏搜索,所述至少一个模板类型的精细搜索和块向量模板误差计算。
- 根据权利要求10所述的方法,其中,所述对所述块向量列表中的块向量进行块向量模板误差 计算,确定所述块向量列表中的块向量的模板误差值,包括:根据所述当前块对应的模板搜索过程中的稀疏搜索的所述预设模板误差计算方式对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值;或者,根据所述当前块对应的模板搜索过程中的精细搜索的所述预设模板误差计算方式对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值。
- 根据权利要求10-15中的任一项所述的方法,其中,所述根据所述块向量列表中的块向量的模板误差值对所述块向量列表进行排序,获得排序后的块向量列表,包括:解码码流,确定第三语法标识信息;根据所述第三语法标识信息确定所述至少一个模板类型对应的至少一个模板数量;根据所述至少一个模板数量,分别对所述候选块向量列表中的块向量对应于所述至少一个模板类型的模板误差值进行排序,获得所述至少一个模板类型对应的至少一个第一候选列表。
- 根据权利要求17所述的方法,其中,所述基于所述排序后的块向量列表,确定所述当前块的预测块,包括:分别按照所述至少一个模板类型进行稀疏搜索,获得所述至少一个模板类型对应的至少一个第二候选列表;对所述至少一个第一候选列表和所述至少一个第二候选列表分别进行合并,获得所述至少一个模板类型对应的至少一个第三候选列表;基于所述至少一个第三候选列表,分别按照所述至少一个模板类型进行精细搜索,获得所述至少一个模板类型对应的至少一个第四候选列表;根据所述至少一个第四候选列表确定所述当前块对应的目标候选列表,并根据所述目标候选列表确定所述当前块的预测块。
- 根据权利要求18所述的方法,其中,所述方法还包括:对于任一个所述第二候选列表,根据所述第二候选列表确定第三指引块向量,根据所述第三指引块向量确定所述当前块的第三候选块向量;确定所述第三候选块向量对应的模板误差值,并根据所述第三候选块向量对应的模板误差值更新所述第二候选列表。
- 根据权利要求18所述的方法,其中,所述基于所述排序后的块向量列表,确定所述当前块的预测块,包括:分别按照所述至少一个模板类型进行稀疏搜索,获得所述至少一个模板类型对应的至少一个第二候选列表;对预设模板类型对应的所述第一候选列表和所述至少一个第二候选列表分别进行合并,获得所述至少一个模板类型对应的至少一个第三候选列表;基于所述至少一个第三候选列表,分别按照所述至少一个模板类型进行精细搜索,获得所述至少一个模板类型对应的至少一个第四候选列表;根据所述至少一个第四候选列表确定所述当前块对应的目标候选列表,并根据所述目标候选列表确定所述当前块的预测块。
- 根据权利要求18-20中的任一项所述的方法,其中,所述在基于所述至少一个第三候选列表进行所述精细搜索的过程中,所述第三候选列表中的全部块向量对应的全部模板搜索区域均是相同的;或者,在基于所述至少一个第三候选列表进行所述精细搜索的过程中,所述第三候选列表中的第四块向量对应的模板搜索区域均是相同的;其中,所述第四块向量为来源于所述第一候选列表中的块向量。
- 一种编码方法,应用于编码器,所述方法包括:在确定当前块使用预设帧内预测模式的情况下,将第一语法标识信息写入码流;其中,所述第一语法标识信息指示所述当前块使用所述预设帧内预测模式;构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
- 根据权利要求22所述的方法,其中,所述构建所述当前块的块向量列表,包括:将所述当前块的块向量列表中的第一块向量确定为所述当前块的第一指引块向量,并根据所述第一指引块向量确定所述当前块的第一候选块向量;其中,所述第一块向量包括以下至少之一:所述当前块的相邻块的块向量,所述当前块的非相邻块的块向量,历史块向量缓存列表HMVP中的块向量;将所述第一候选块向量和第二块向量添加至所述块向量列表;其中,所述第二块向量是非AR-BVP块向量;将所述块向量列表中的第三块向量确定为所述当前块的第二指引块向量,并根据所述第二指引块向量确定所述当前块的第二候选块向量;其中,第三块向量至少包括所述第一候选块向量;将所述第二候选块向量添加至所述块向量列表。
- 根据权利要求22所述的方法,其中,所述构建所述当前块的块向量列表,包括:将所述当前块的块向量列表中的第一块向量确定为所述当前块的第一指引块向量,并确定所述第一指引块向量对应的第一参考块;其中,所述第一块向量包括以下至少之一:所述当前块的相邻块的块向量,所述当前块的非相邻块的块向量,HMVP中的块向量;将所述第一参考块的块向量确定为所述当前块的第一候选块向量;和/或,对所述第一指引块向量和所述第一参考块的块向量进行求和,确定所述当前块的第一候选块向量;将所述第一候选块向量添加至所述块向量列表。
- 根据权利要求22中的任一项所述的方法,其中,所述构建所述当前块的块向量列表,包括:将所述当前块的块向量列表中的第一块向量确定为所述当前块的第一指引块向量,并确定所述第一指引块向量对应的第一参考块;其中,所述第一块向量包括以下至少之一:所述当前块的相邻块的块向量,所述当前块的非相邻块的块向量,HMVP中的块向量;将所述第一参考块的块向量确定为所述当前块的第一候选块向量;和/或,对所述第一指引块向量和所述第一参考块的块向量进行求和,确定所述当前块的第一候选块向量;将所述第一候选块向量和第二块向量添加至所述块向量列表;其中,所述第二块向量是非AR-BVP块向量;将所述块向量列表中的第三块向量确定为所述当前块的第二指引块向量,并确定所述第二指引块向量对应的第二参考块;其中,第三块向量至少包括所述第一候选块向量;将所述第二参考块的块向量确定为所述当前块的第二候选块向量;和/或,对所述第二指引块向量和所述第二参考块的块向量进行求和,确定所述当前块的第二候选块向量;将所述第二候选块向量添加至所述块向量列表。
- 根据权利要求25所述的方法,其中,所述方法还包括:根据所述当前块的指引块向量进行AR-BVP处理获得至少一个候选块向量,以构建所述当前块的所述块向量列表,直到满足预设结束条件;其中,所述预设结束条件包括以下至少之一:所述AR-BVP处理的次数大于或者等于预设阈值;通过所述AR-BVP处理确定的候选块向量的数量大于或者等于第一数量阈值;所述块向量列表中的块向量的数量大于或者等于第二数量阈值。
- 根据权利要求23或24所述的方法,其中,所述方法还包括:根据所述块向量列表中块向量的数量,确定添加至所述块向量列表的所述HMVP中的块向量的数量。
- 根据权利要求25所述的方法,其中,所述根据所述当前块的块向量列表,确定所述当前块的预测块,包括:根据所述块向量列表中的亚像素精度的块向量,确定所述块向量列表中的块向量的模板误差值;根据所述块向量列表中的块向量的模板误差值,确定所述当前块的预测块。
- 根据权利要求28所述的方法,其中,所述根据所述块向量列表中的亚像素精度的块向量,确定所述块向量列表中的块向量的模板误差值,包括:确定模板类型参数和所述模板类型参数对应的模板尺寸参数;根据所述模板类型参数,所述模板尺寸参数以及所述亚像素精度的块向量的亚像素比特参数,确定所述亚像素精度的块向量对应的调整后块向量;根据所述调整后块向量确定参考模板的预测值;根据所述参考模板的预测值和当前模板的重建值,确定所述块向量列表中的块向量的模板误差值。
- 根据权利要求29所述的方法,其中,所述根据所述调整后块向量确定参考模板的预测值,包括:在所述调整后块向量对应的候选参考模板可用的情况下,根据所述调整后块向量和亚像素差值算法确定所述参考模板的预测值;在所述调整后块向量对应的候选参考模板不可用的情况下,根据所述块向量列表中的块向量和亚像素差值算法确定所述参考模板的预测值。
- 根据权利要求25,28-30中的任一项所述的方法,其中,所述根据所述当前块的块向量列表,确定所述当前块的预测块,包括:对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值;根据所述块向量列表中的块向量的模板误差值对所述块向量列表进行排序,获得排序后的块向量列表;基于所述排序后的块向量列表,确定所述当前块的预测块。
- 根据权利要求31所述的方法,其中,所述对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值,包括:确定预设模板误差计算方式,并将所述第二语法标识信息写入码流;其中,所述第二语法标识信息用于确定所述预设模板误差计算方式;所述预设模板误差计算方式包括以下任意一种:绝对误差和SAD,MR-SAD,绝对变换误差和SATD,MR-SATD;基于所述预设模板误差计算方式,确定所述候选块向量列表中的块向量对应于所述至少一个模板类型的模板误差值。
- 根据权利要求32所述的方法,其中,所述确定预设模板误差计算方式,包括:确定第一模板误差计算方式和第二模板误差计算方式;其中,所述第一模板误差计算方式用于执行所述至少一个模板类型的稀疏搜索,所述第二模板误差计算方式用于执行所述至少一个模板类型的精细搜索和块向量模板误差计算。
- 根据权利要求32所述的方法,其中,所述确定预设模板误差计算方式,包括:确定第三模板误差计算方式和第四模板误差计算方式;其中,所述第三模板误差计算方式用于执行所述至少一个模板类型的稀疏搜索和块向量模板误差计算,所述第四模板误差计算方式用于执行所述至少一个模板类型的精细搜索。
- 根据权利要求32所述的方法,其中,所述确定预设模板误差计算方式,包括:确定第五模板误差计算方式;其中,所述第五模板误差计算方式用于执行所述至少一个模板类型的稀疏搜索,所述至少一个模板类型的精细搜索和块向量模板误差计算。
- 根据权利要求32所述的方法,其中,所述第二语法标识信息包括第一信息和第二信息,所述确定预设模板误差计算方式,包括:确定第六误差计算方式;其中,所述第六误差计算方式用于执行所述至少一个模板类型的稀疏搜索,所述至少一个模板类型的精细搜索和块向量模板误差计算;根据所述第六误差计算方式确定所述第一信息和所述第二信息。
- 根据权利要求31所述的方法,其中,所述对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值,包括:根据所述当前块对应的模板搜索过程中的稀疏搜索的所述预设模板误差计算方式对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值;或者,根据所述当前块对应的模板搜索过程中的精细搜索的所述预设模板误差计算方式对所述块向量列表中的块向量进行块向量模板误差计算,确定所述块向量列表中的块向量的模板误差值。
- 根据权利要求31-36中的任一项所述的方法,其中,所述根据所述块向量列表中的块向量的模板误差值对所述块向量列表进行排序,获得排序后的块向量列表,包括:确定所述至少一个模板类型对应的至少一个模板数量,并将第三语法标识信息写入码流;其中,所述第三语法标识信息用于确定所述至少一个模板类型对应的至少一个模板数量;根据所述至少一个模板数量,分别对所述候选块向量列表中的块向量对应于所述至少一个模板类型的模板误差值进行排序,获得所述至少一个模板类型对应的至少一个第一候选列表。
- 根据权利要求38所述的方法,其中,所述基于所述排序后的块向量列表,确定所述当前块的预测块,包括:分别按照所述至少一个模板类型进行稀疏搜索,获得所述至少一个模板类型对应的至少一个第二候选列表;对所述至少一个第一候选列表和所述至少一个第二候选列表分别进行合并,获得所述至少一个模板类型对应的至少一个第三候选列表;基于所述至少一个第三候选列表,分别按照所述至少一个模板类型进行精细搜索,获得所述至少一个模板类型对应的至少一个第四候选列表;根据所述至少一个第四候选列表确定所述当前块对应的目标候选列表,并根据所述目标候选列表确定所述当前块的预测块。
- 根据权利要求39所述的方法,其中,所述方法还包括:对于任一个所述第二候选列表,根据所述第二候选列表确定第三指引块向量,根据所述第三指引块向量确定所述当前块的第三候选块向量;确定所述第三候选块向量对应的模板误差值,并根据所述第三候选块向量对应的模板误差值更新所述第二候选列表。
- 根据权利要求39所述的方法,其中,所述基于所述排序后的块向量列表,确定所述当前块的预测块,包括:分别按照所述至少一个模板类型进行稀疏搜索,获得所述至少一个模板类型对应的至少一个第二候选列表;对预设模板类型对应的所述第一候选列表和所述至少一个第二候选列表分别进行合并,获得所述至少一个模板类型对应的至少一个第三候选列表;基于所述至少一个第三候选列表,分别按照所述至少一个模板类型进行精细搜索,获得所述至少一个模板类型对应的至少一个第四候选列表;根据所述至少一个第四候选列表确定所述当前块对应的目标候选列表,并根据所述目标候选列表确定所述当前块的预测块。
- 根据权利要求39-41中的任一项所述的方法,其中,所述在基于所述至少一个第三候选列表进行所述精细搜索的过程中,所述第三候选列表中的全部块向量对应的全部模板搜索区域均是相同的;或者,在基于所述至少一个第三候选列表进行所述精细搜索的过程中,所述第三候选列表中的第四块向量对应的模板搜索区域均是相同的;其中,所述第四块向量为来源于所述第一候选列表中的块向量。
- 一种码流,其中,所述码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:第一语法标识信息、第二语法标识信息、第三语法标识信息。
- 一种编码器,包括第一确定单元,其中:第一确定单元,配置为在确定当前块使用预设帧内预测模式的情况下,将第一语法标识信息写入码流;其中,所述第一语法标识信息指示所述当前块使用所述预设帧内预测模式;构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者TIMD,或者SGPM;所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
- 一种编码器,包括第一存储器和第一处理器,其中:第一存储器,用于存储能够在第一处理器上运行的计算机程序;第一处理器,用于在运行所述计算机程序时,执行如权利要求22至42中任一项所述的方法。
- 一种解码器,包括第二确定单元,其中:第二确定单元,配置为解码码流,确定第一语法标识信息;在所述第一语法标识信息指示当前块使用预设帧内预测模式的情况下,构建所述当前块的块向量列表;根据所述当前块的块向量列表,确定所述当前块的预测块;其中,所述当前块的块向量列表满足以下至少之一:所述块向量列表是通过执行至少两次AR-BVP构建的,且在执行所述至少两次AR-BVP之间,针对至少一个非AR-BVP块向量执行检查操作;所述块向量列表中包括所述当前块的指引块向量对应的参考块的块向量;所述块向量列表中包括亚像素精度的块向量;其中,所述亚像素精度的块向量用于DIMD,或者 TIMD,或者SGPM;所述块向量列表是通过所述块向量列表中的块向量对应的模板误差值进行排序获得的;其中,所述块向量的模板误差值是通过预设模板误差计算方式确定的,所述预设模板误差计算方式是根据所述当前块对应的模板搜索过程的误差计算方式或者码流中传输的第二语法标识信息确定的。
- 一种解码器,包括第二存储器和第二处理器,其中:第二存储器,用于存储能够在第二处理器上运行的计算机程序;第二处理器,用于在运行所述计算机程序时,执行如权利要求1至21中任一项所述的方法。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被至少一个处理器执行时实现如权利要求1至21中任一项所述的方法、或者如权利要求22至42中任一项所述的方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2024/083935 WO2025199773A1 (zh) | 2024-03-26 | 2024-03-26 | 编解码方法、码流、编码器、解码器以及存储介质 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2024/083935 WO2025199773A1 (zh) | 2024-03-26 | 2024-03-26 | 编解码方法、码流、编码器、解码器以及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025199773A1 true WO2025199773A1 (zh) | 2025-10-02 |
Family
ID=97219471
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/083935 Pending WO2025199773A1 (zh) | 2024-03-26 | 2024-03-26 | 编解码方法、码流、编码器、解码器以及存储介质 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2025199773A1 (zh) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2023046127A1 (en) * | 2021-09-25 | 2023-03-30 | Beijing Bytedance Network Technology Co., Ltd. | Method, apparatus, and medium for video processing |
| WO2024012460A1 (en) * | 2022-07-12 | 2024-01-18 | Beijing Bytedance Network Technology Co., Ltd. | Method, apparatus, and medium for video processing |
| US20240031558A1 (en) * | 2021-04-02 | 2024-01-25 | Hyundai Motor Company | Method and apparatus for video coding using block vector with adaptive spatial resolution |
| WO2024031691A1 (zh) * | 2022-08-12 | 2024-02-15 | Oppo广东移动通信有限公司 | 一种视频编解码方法、装置和系统 |
-
2024
- 2024-03-26 WO PCT/CN2024/083935 patent/WO2025199773A1/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20240031558A1 (en) * | 2021-04-02 | 2024-01-25 | Hyundai Motor Company | Method and apparatus for video coding using block vector with adaptive spatial resolution |
| WO2023046127A1 (en) * | 2021-09-25 | 2023-03-30 | Beijing Bytedance Network Technology Co., Ltd. | Method, apparatus, and medium for video processing |
| WO2024012460A1 (en) * | 2022-07-12 | 2024-01-18 | Beijing Bytedance Network Technology Co., Ltd. | Method, apparatus, and medium for video processing |
| WO2024031691A1 (zh) * | 2022-08-12 | 2024-02-15 | Oppo广东移动通信有限公司 | 一种视频编解码方法、装置和系统 |
Non-Patent Citations (2)
| Title |
|---|
| L. ZHANG (OPPO), Y. YU (OPPO), F. WANG (OPPO), H. YU (OPPO), D. WANG(OPPO): "EE2-1.2 related: AR-BVP for IntraTMP merge candidates", 33. JVET MEETING; 20240117 - 20240126; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 18 January 2024 (2024-01-18), pages 1 - 6, XP030313886 * |
| N. ZHANG (BYTEDANCE), K. ZHANG (BYTEDANCE), L. ZHANG (BYTEDANCE): "Non-EE2: Auto relocated block vector prediction", 32. JVET MEETING; 20231013 - 20231020; HANNOVER; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 12 October 2023 (2023-10-12), pages 1 - 6, XP030312217 * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11381839B2 (en) | Method and device for image motion compensation | |
| US11166040B2 (en) | Video signal processing method and apparatus using adaptive motion vector resolution | |
| US11805270B2 (en) | Limited memory access window for motion vector refinement | |
| KR102344430B1 (ko) | 다중 참조 예측을 위한 움직임 벡터 개선 | |
| RU2683495C1 (ru) | Нововведения в предсказание блочных векторов и оценку восстановленных значений отсчетов в области перекрытия | |
| US12483723B2 (en) | Method and apparatus for encoding or decoding video data with sub-pixel motion vector refinement | |
| CN114009033A (zh) | 用于用信号通知对称运动矢量差模式的方法和装置 | |
| KR102701434B1 (ko) | 디코더 측 모션 벡터 정제를 위한 에러 표면 기반 서브 픽셀 정밀 정제 방법 | |
| US20240236354A1 (en) | Coding/decoding method, code stream, coder, decoder, and storage medium | |
| WO2019154424A1 (zh) | 视频解码方法、视频解码器以及电子设备 | |
| WO2025199773A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| US20260032260A1 (en) | Encoding/decoding method, code stream, encoder, decoder and storage medium | |
| US20260025516A1 (en) | Method for decoding, method for encoding, decoder, and storage medium | |
| WO2025153064A1 (en) | Inheriting cross-component model based on cascaded vector derived according to a candidate list | |
| US20260039838A1 (en) | System and method for intra template matching | |
| WO2025213394A1 (zh) | 编解码方法、编码器、解码器以及存储介质 | |
| CA3287960A1 (en) | Encoding/decoding method, code stream, encoder, decoder and storage medium | |
| WO2025129626A9 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025065590A1 (zh) | 编解码方法、编解码器以及存储介质 | |
| WO2026007084A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025213467A1 (zh) | 编解码方法及装置、码流、解码器、编码器、存储介质 | |
| WO2026085791A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025065610A1 (zh) | 编解码方法、记录方法、编解码器以及存储介质 | |
| WO2024113311A1 (zh) | 编解码方法、编解码器、码流以及存储介质 | |
| TW202602117A (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: 24931903 Country of ref document: EP Kind code of ref document: A1 |