CN-122003858-A - Encoding and decoding method, encoder and decoder, and storage medium
Abstract
The embodiment of the application provides a coding and decoding method, a coder and decoder and a storage medium. The decoding method comprises the steps of analyzing a code stream, determining first identification information, determining a plurality of search positions around a current block according to the first identification information, determining gradient information to be fused according to the plurality of search positions, and determining a predicted value of the current block according to the gradient information to be fused, wherein the first identification information is used for indicating a current block to use DIMiD fusion modes.
Inventors
- HUO JUNYAN
- MA YANZHUO
- YANG FUZHENG
- FAN JIAWEI
- LI MING
Assignees
- OPPO广东移动通信有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20231005
Claims (20)
- A decoding method, applied to a decoder, comprising: Analyzing the code stream, and determining first identification information, wherein the first identification information is used for indicating that a current block uses a decoding end intra-frame mode to deduce DIMD fusion modes; determining a plurality of search positions around a current block according to the first identification information, wherein the plurality of search positions comprise airspace non-adjacent positions of the current block; Determining gradient information to be fused according to the plurality of search positions; And determining the predicted value of the current block according to the gradient information to be fused.
- The method of claim 1, wherein the spatial non-adjacent locations are determined based on predefined locations.
- The method of claim 2, wherein the predefined location is determined based on at least one of: the size of the current block; a predefined horizontal dimension; Predefined vertical dimensions.
- A method according to claim 3, wherein the predefined horizontal size and/or the predefined vertical size is determined based on the size of the current block.
- The method of claim 1, wherein the number of the plurality of search locations is greater than 13.
- The method of claim 1, wherein the number of the plurality of search locations is greater than or equal to 31.
- The method of claim 1, wherein the spatial non-adjacent locations satisfy at least one of: The absolute value of the horizontal offset of the spatial non-adjacent position and the upper left corner position of the current block is equal to iDistHor +1; the absolute value of the vertical offset of the spatial non-adjacent position and the upper left corner position of the current block is equal to iDistVer +1; wherein iDistHor is equal to a predefined horizontal dimension and iDistVer is equal to a predefined vertical dimension.
- The method of claim 7, wherein: The predefined horizontal dimension is equal to N times the width of the current block, and/or The predefined vertical dimension is equal to N times the height of the current block.
- The method of claim 8, wherein N has a value of less than or equal to 4.
- The method of claim 8, wherein the value of N comprises 1,2,3,4.
- The method of any one of claims 7 to 10, wherein the spatial non-adjacent locations satisfy: xnb= xTL + offsetX, and yNb = yTL + offsetY; Wherein offsetX and offsetY satisfy at least one of: offsetX = uiWidth + iDistHor-1 and offsetY = -iDistVer-1; offsetX = uiWidth > >1, and offsetY = -iDistVer-1; offsetX = -iDistHor-1, and offsetY = -iDistVer-1; offsetX = -iDistHor-1, and offsetY = uiHeigth > >1; offsetX = -iDistHor-1 and offsetY = uiHeigth + iDistVer-1; Wherein xNb represents the horizontal coordinate of the spatial non-adjacent position, yNb represents the vertical coordinate of the spatial non-adjacent position, xTL represents the horizontal coordinate of the upper left corner position of the current block, yTL represents the vertical coordinate of the upper left corner position of the current block, uiWidth represents the width of the current block, and uiHeigth represents the height of the current block.
- The method of claim 11, wherein, with n=1, offsetX and offsetY satisfy at least one of: offsetX = uiWidth + iDistHor-1 and offsetY = -iDistVer-1; offsetX = -iDistHor-1, and offsetY = -iDistVer-1; offsetX = -iDistHor-1 and offsetY = uiHeigth + iDistVer-1.
- The method of any one of claims 1 to 12, wherein the spatial non-adjacent locations satisfy at least one of: Is positioned at the upper right of the current block; Is positioned right above the current block; is positioned at the left upper part of the current block; is positioned right and left of the current block; is positioned at the left lower part of the current block.
- The method of claim 1, wherein the gradient information to be fused is gradient information corresponding to K candidate blocks, the K candidate blocks being determined based on the plurality of search locations, K being a positive integer greater than 3.
- The method of claim 14, wherein K has a value greater than or equal to 5.
- The method of claim 1, wherein the gradient information to be fused is determined based on a set of candidate blocks determined from the plurality of search locations, and the set of candidate blocks does not include duplicate candidate blocks.
- The method of claim 1, wherein the predicted value is determined based on target gradient information determined based on arithmetic or weighted average of the gradient information to be fused.
- The method of claim 17, wherein the gradient information to be fused is gradient information corresponding to at least one candidate block, the weight of the gradient information corresponding to the at least one candidate block being determined based on at least one of: a distance between the at least one candidate block and the current block; and the number of target pixels corresponding to the at least one candidate block, wherein the target pixels are pixels required for determining gradient information in DIMD modes.
- The method of claim 18, wherein the number of target pixels corresponding to the at least one candidate block is used to determine an initial weight of gradient information corresponding to the at least one candidate block, and a distance between the at least one candidate block and the current block is used to adjust the initial weight to determine a target weight of gradient information corresponding to the at least one candidate block.
- The method according to claim 18 or 19, wherein the gradient information corresponding to each of the at least one candidate block includes an amplitude corresponding to an intra prediction mode IPM, and the amplitude corresponding to IPM is an amplitude normalized based on a size of the each candidate block.
Description
Encoding and decoding method, encoder and decoder, and storage medium Technical Field The present application relates to the field of video encoding and decoding in the technical field, and in particular, to a coding and decoding method, a codec, and a storage medium. Background The decoding-side intra mode derivation fusion (decoder-SIDE INTRA mode derivation merge, DIMD MERGE) mode is an efficient intra prediction mode. DIMD the fusion mode derives a dominant intra prediction mode (or prediction direction) using gradient information of neighboring encoded blocks of the current block, and generates a prediction value according to the derived intra prediction mode. However, in the related art, the intra-frame prediction mode derived from the DIMD fusion mode is not accurate enough, and the accuracy of prediction is reduced. Disclosure of Invention The embodiment of the application provides a coding and decoding method, a coder and decoder and a storage medium so as to improve the accuracy of prediction. Various aspects of the application are described below. The decoding method is applied to a decoder and comprises the steps of analyzing a code stream, determining first identification information, determining a plurality of search positions around a current block according to the first identification information, determining gradient information to be fused according to the plurality of search positions, and determining a predicted value of the current block according to the gradient information to be fused, wherein the first identification information is used for indicating that the current block uses a DIMD fusion mode. In a second aspect, an encoding method is provided, which is applied to an encoder, and comprises the steps of determining a plurality of search positions around a current block, wherein the plurality of search positions comprise spatial non-adjacent positions of the current block, determining gradient information to be fused according to the plurality of search positions, and determining a predicted value of the current block according to the gradient information to be fused. In a third aspect, a decoder is provided, which includes an parsing unit configured to parse a code stream and determine first identification information, where the first identification information is used to indicate that a current block uses a DIMD fusion mode, a first determining unit configured to determine a plurality of search positions around the current block according to the first identification information, where the plurality of search positions include spatial non-adjacent positions of the current block, a second determining unit configured to determine gradient information to be fused according to the plurality of search positions, and a third determining unit configured to determine a predicted value of the current block according to the gradient information to be fused. In a fourth aspect, there is provided a decoder comprising a memory for storing a computer program, and a processor for performing the method according to the first aspect when the computer program is run. In a fifth aspect, an encoder is provided, which includes a first determining unit configured to determine a plurality of search positions around a current block, where the plurality of search positions include spatial non-adjacent positions of the current block, a second determining unit configured to determine gradient information to be fused according to the plurality of search positions, and a third determining unit configured to determine a predicted value of the current block according to the gradient information to be fused. In a sixth aspect, there is provided an encoder comprising a memory for storing a computer program, and a processor for performing the method according to the second aspect when the computer program is run. In a seventh aspect, there is provided a computer readable storage medium storing a computer program which when executed performs the method of the first or second aspect. In an eighth aspect, there is provided a computer program product comprising a computer program which when executed implements the method of the first or second aspect. A ninth aspect provides a non-transitory computer readable storage medium storing a bitstream, the bitstream being generated by an encoding method using an encoder, or the bitstream being decoded by a decoding method using a decoder, wherein the decoding method is the method of the first aspect and the encoding method is the method of the second aspect. The embodiment of the application searches gradient information to be fused in more search positions or larger search areas, and is beneficial to improving the accuracy of the intra-frame prediction mode deduced by DIMD fusion modes, thereby improving the accuracy of prediction. Drawings Fig. 1 is a schematic diagram of a video encoder to which an embodiment of the present application is applicable. Fig. 2 is a schematic