Picture encoding and decoding method and apparatus for video sequences - Patents.com

By employing motion search with precision and downsampling in video encoding and decoding, the method reduces computational complexity and enhances efficiency in video sequence processing.

JP7593541B2Active Publication Date: 2024-12-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023072944
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-11-30
Filing Date
2023-04-27
Publication Date
2024-12-03
Estimated Expiration
2039-07-29

AI Technical Summary

Technical Problem

The computational complexity of motion vector refinement (DMVR) in video encoding and decoding frameworks is high, affecting the efficiency of picture coding.

Method used

A method and apparatus for video sequences that reduce computational complexity by performing motion search with a first precision, downsampling blocks, and calculating differences using sampled pixel arrays to determine target motion vectors, thereby reducing the number of search points and pixel comparisons.

Benefits of technology

This approach decreases the computational complexity and improves picture coding efficiency by minimizing the number of search points and pixel calculations, enhancing decoding and encoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007593541000001
    Figure 0007593541000001
  • Figure 0007593541000002
    Figure 0007593541000002
  • Figure 0007593541000003
    Figure 0007593541000003
Patent Text Reader

Abstract

To provide a picture encoding and decoding method and device for a video sequence.SOLUTION: A picture decoding method determines motion information of a block to be decoded, acquires a first decoding prediction block of the block to be decoded on the basis of the motion information, and executes motion search with first accuracy within a prediction preference picture block to acquire at least two second decoding prediction blocks. It executes downsampling, calculates difference between each first sampling pixel array and each second sampling pixel array, uses a motion vector corresponding to a second sampling pixel array having minimum difference as an object prediction vector, acquires an object decoding prediction block of the block to be decoded on the basis of an object prediction motion vector, and decodes the block to be decoded on the basis of the object decoding prediction block.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 201811458677.4, entitled “PICTURE ENCODING AND DECODING METHOD AND APPARATUS FOR VIDEO SEQUENCE,” filed on November 30, 2018 with the State Intellectual Property Office of the People’s Republic of China. This is a divisional application of Japanese Patent Application No. JP2021-530828 filed on July 29, 2019. , applicable China Patent The application is incorporated herein by reference in its entirety.

[0002] [Technical field] The present application relates to video picture technology, and in particular to a picture encoding and decoding method and apparatus for a video sequence. [Background technology]

[0003] In the video encoding and decoding framework, a hybrid coding structure is usually used for encoding and decoding a video sequence. The encoder side of the hybrid coding structure generally includes a prediction module, a transform module, a quantization module, and an entropy encoding module. The decoder side of the hybrid coding structure generally includes an entropy decoding module, an inverse quantization module, an inverse transform module, and a prediction compensation module. The combination of these encoding and decoding modules can effectively remove redundant information from the video sequence and ensure that the coded picture of the video sequence is obtained at the decoder side. In the video encoding and decoding framework, a picture in a video sequence is usually divided into picture blocks for encoding, i.e., a frame of a picture is divided into several picture blocks, and encoding and decoding are performed based on these picture blocks by using the aforementioned modules.

[0004] In the above-mentioned module, the prediction module and the prediction compensation module can use two techniques, namely intra prediction and inter prediction. In the inter prediction technique, the decoder-side motion vector refinement (DMVR) technique is used to effectively remove the redundant information of the current picture block in the picture to be predicted.

[0005] However, the computational complexity of the DMVR technique is relatively high. Summary of the Invention

[0006] The present application provides a picture encoding and decoding method and apparatus for video sequences, to reduce the computational complexity of difference comparison and improve picture coding efficiency.

[0007] According to a first aspect, the present application provides a picture decoding method for a video sequence, the method comprising: the motion information of the block to be decoded includes: determining motion information of the block to be decoded, the motion information including a predicted motion vector and reference picture information, the reference picture information being used to identify a predicted reference picture block; obtaining a first decoding prediction block of the block to be decoded based on the motion information; performing a motion search with a first accuracy in the predicted reference picture block to obtain at least two second decoding prediction blocks, the search position of the motion search being determined based on the predicted motion vector and the first accuracy; performing downsampling on the first decoding prediction block to obtain a first sampling pixel array; performing downsampling on the at least two second decoding prediction blocks to obtain at least two second sampling pixel arrays; calculating a difference between each of the first sampling pixel array and the second sampling pixel array, and using the motion vector between the block to be decoded and the second decoding prediction block corresponding to the second sampling pixel array having the smallest difference as a target predicted motion vector of the block to be decoded; obtaining a target decoding prediction block of the block to be decoded based on the target predicted motion vector, and decoding the block to be decoded based on the target decoding prediction block.

[0008] In the present application, the number of second decoding prediction blocks obtained by performing motion search on the predicted reference picture block is reduced, and pixels in the picture block are sampled, thereby reducing the calculation amount of difference comparison and improving picture decoding efficiency.

[0009] In one possible implementation, calculating the difference between each of the first sampling pixel array and the second sampling pixel array includes: calculating a sum of absolute pixel differences of pixels at corresponding locations in each of the first sampling pixel array and the second sampling pixel array, and using the sum of absolute pixel differences as the difference; or Calculating a sum of squared pixel differences for pixels at corresponding locations in each of the first sampling pixel array and the second sampling pixel array, and using the sum of squared pixel differences as the difference.

[0010] A beneficial effect of this implementation is that different methods are used to determine the difference, providing multiple solutions with different levels of complexity.

[0011] In one possible implementation, the at least two second decoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block, and performing motion estimation with a first accuracy in the prediction reference picture block to obtain the at least two second decoding prediction blocks includes: excluding the lower block from the at least two second decoding prediction blocks when the difference corresponding to the upper block is smaller than the difference corresponding to the base block, in which the base block is obtained in the predicted reference picture block based on the predicted motion vector, the upper block is obtained in the predicted reference picture block based on the first predicted vector, and the position indicated by the first predicted vector is obtained by shifting the position indicated by the predicted motion vector up by a target offset, and the lower block is obtained in the predicted reference picture block based on the second predicted vector, and the position indicated by the second predicted vector is obtained by shifting the position indicated by the predicted motion vector down by a target offset, and the target offset is determined based on a first accuracy; or excluding the upper block from the at least two second decoding prediction blocks when the difference corresponding to the lower block is smaller than the difference corresponding to the base block; or excluding a right block from the at least two second decoding prediction blocks when the difference corresponding to the left block is smaller than the difference corresponding to the base block, in which the left block is obtained in the predicted reference picture block based on a third prediction vector, and the position indicated by the third prediction vector is obtained by shifting the position indicated by the predicted motion vector left by a target offset; and the right block is obtained in the predicted reference picture block based on a fourth prediction vector, and the position indicated by the fourth prediction vector is obtained by shifting the position indicated by the predicted motion vector right by a target offset; or and excluding the left block from the at least two second decoding prediction blocks when the difference corresponding to the right block is smaller than the difference corresponding to the base block.

[0012] In one possible implementation, performing a motion search with a first accuracy on the predicted reference picture block to obtain at least two second decoding prediction blocks includes: When the lower block and the right block are excluded, obtaining an upper-left block in the predicted reference picture block according to a fifth predicted vector, where the position indicated by the fifth predicted vector is obtained by shifting the position indicated by the predicted motion vector left by a target offset and up by a target offset, and the upper-left block is one of the at least two second decoding predicted blocks; When the lower block and the left block are excluded, obtaining an upper right block in the predicted reference picture block based on a sixth prediction vector, where the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the prediction motion vector right by a target offset and up by a target offset, and the upper right block is one of the at least two second decoding prediction blocks; When the upper block and the left block are excluded, obtaining a lower-right block in the predicted reference picture block according to a seventh prediction vector, where the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predicted motion vector to the right by a target offset and to the down by a target offset, and the lower-right block is one of the at least two second decoding prediction blocks; or When the upper block and the right block are excluded, obtaining a bottom-left block in the predicted reference picture block based on an eighth prediction vector, where the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by a target offset and down by a target offset, and the bottom-left block is one of the at least two second decoding prediction blocks.

[0013] A beneficial effect of this implementation is that the number of search points is reduced, reducing the implementation complexity.

[0014] In one possible implementation, the at least two second decoding prediction blocks include an upper block, a lower block, a left block, and a right block; performing motion search with a first accuracy in the predicted reference picture block to obtain the at least two second decoding prediction blocks is to obtain an upper-left block in the predicted reference picture block based on a fifth prediction vector when a difference corresponding to the upper block is smaller than a difference corresponding to the lower block and a difference corresponding to the left block is smaller than a difference corresponding to the right block; the position indicated by the fifth prediction vector is obtained by shifting a position indicated by the predicted motion vector left by a target offset and up by a target offset; the upper-left block is one of the at least two second decoding prediction blocks, the upper block is obtained in the predicted reference picture block based on the first prediction vector, and the first prediction vector is obtained by shifting a position indicated by the predicted motion vector left by a target offset and up by a target offset; the position indicated by the predicted motion vector is obtained by shifting the position indicated by the predicted motion vector up by the target offset, the bottom block is obtained in the predicted reference picture block based on the second predicted vector, and the position indicated by the second predicted vector is obtained by shifting the position indicated by the predicted motion vector down by the target offset, the left block is obtained in the predicted reference picture block based on the third predicted vector, and the position indicated by the third predicted vector is obtained by shifting the position indicated by the predicted motion vector left by the target offset, the right block is obtained in the predicted reference picture block based on the fourth predicted vector, and the position indicated by the fourth predicted vector is obtained by shifting the position indicated by the predicted motion vector right by the target offset, the target offset being determined based on the first accuracy; or When the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, obtaining an upper right block in the predicted reference picture block based on the sixth prediction vector, and the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the prediction motion vector right by a target offset and up by a target offset, and the upper right block is one of the at least two second decoding prediction blocks; or When the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, obtaining a lower-right block in the predicted reference picture block according to the seventh predicted vector, and the position indicated by the seventh predicted vector is obtained by shifting the position indicated by the predicted motion vector right by a target offset and down by a target offset, and the lower-right block is one of the at least two second decoding predicted blocks; or When the difference corresponding to the lower block is smaller than the difference corresponding to the upper block and the difference corresponding to the left block is smaller than the difference corresponding to the right block, obtaining a lower-left block in the predicted reference picture block based on the eighth prediction vector, where the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by a target offset and down by the target offset, and the lower-left block is one of the at least two second decoding prediction blocks.

[0015] A beneficial effect of this implementation is that the number of search points is reduced, reducing the implementation complexity.

[0016] In one possible implementation, after determining the motion information of the block to be decoded, the method comprises: Rounding the motion vectors upward or downward.

[0017] A beneficial effect of this implementation is that the reference picture interpolation process required because motion vectors are not integers is not required, reducing implementation complexity.

[0018] In one possible implementation, after performing a motion search with a first accuracy in the predicted reference picture block to obtain at least two second decoding predicted blocks, the method includes: The method further includes rounding upward or downward the predicted motion vectors respectively corresponding to the at least two second decoding prediction blocks.

[0019] A beneficial effect of this implementation is that the reference picture interpolation process required because motion vectors are not integers is not required, reducing implementation complexity.

[0020] According to a second aspect, the present application provides a picture encoding method for a video sequence. The method includes the steps of: determining motion information of a block to be encoded, the motion information including a predicted motion vector and reference picture information, the reference picture information being used to identify a predicted reference picture block; obtaining a first encoding predictive block of the block to be encoded based on the motion information; performing a motion search with a first accuracy in the predicted reference picture block to obtain at least two second encoding predictive blocks, where a search position of the motion search is determined based on the predicted motion vector and the first accuracy; performing downsampling on the first encoding predictive block to obtain a first sampling pixel array; performing downsampling on the at least two second encoding predictive blocks to obtain at least two second sampling pixel arrays; calculating a difference between each of the first sampling pixel array and the second sampling pixel array, and using the motion vector between the block to be encoded and the second encoding predictive block corresponding to the second sampling pixel array having the smallest difference as a target predictive motion vector of the block to be encoded; obtaining a target encoding predictive block of the block to be encoded based on the target predictive motion vector, and encoding the block to be encoded based on the target encoding predictive block.

[0021] In the present application, the number of second encoding prediction blocks obtained by performing motion search on the predicted reference picture block is reduced, and pixels in the picture block are sampled, thereby reducing the calculation amount of difference comparison and improving picture encoding efficiency.

[0022] In one possible implementation, calculating the difference between each of the first sampling pixel array and the second sampling pixel array includes: calculating a sum of absolute pixel differences of pixels at corresponding locations in each of the first sampling pixel array and the second sampling pixel array, and using the sum of absolute pixel differences as the difference; or Calculating a sum of squared pixel differences for pixels at corresponding locations in each of the first sampling pixel array and the second sampling pixel array, and using the sum of squared pixel differences as the difference.

[0023] In one possible implementation, the at least two second encoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block, and performing a motion search with a first accuracy on the predicted reference picture block to obtain the at least two second encoding prediction blocks includes: excluding the lower block from the at least two second encoding prediction blocks when the difference corresponding to the upper block is smaller than the difference corresponding to the base block, in which the base block is obtained in the predicted reference picture block based on the predicted motion vector, the upper block is obtained in the predicted reference picture block based on the first predicted vector, and the position indicated by the first predicted vector is obtained by shifting the position indicated by the predicted motion vector up by a target offset, and the lower block is obtained in the predicted reference picture block based on the second predicted vector, and the position indicated by the second predicted vector is obtained by shifting the position indicated by the predicted motion vector down by a target offset, and the target offset is determined based on a first accuracy; or excluding the top block from the at least two second encoding prediction blocks when the difference corresponding to the bottom block is smaller than the difference corresponding to the base block; or excluding a right block from the at least two second encoding prediction blocks when the difference corresponding to the left block is smaller than the difference corresponding to the base block, in which the left block is obtained in the predicted reference picture block based on a third prediction vector, and the position indicated by the third prediction vector is obtained by shifting the position indicated by the predictive motion vector to the left by a target offset, and the right block is obtained in the predicted reference picture block based on a fourth prediction vector, and the position indicated by the fourth prediction vector is obtained by shifting the position indicated by the predictive motion vector to the right by a target offset; or and excluding the left block from the at least two second encoding prediction blocks when the difference corresponding to the right block is smaller than the difference corresponding to the base block.

[0024] In one possible implementation, performing a motion search with a first accuracy on the predicted reference picture block to obtain at least two second encoding prediction blocks includes: When the lower block and the right block are excluded, obtaining an upper-left block in the predicted reference picture block based on a fifth prediction vector, where the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the prediction motion vector left by a target offset and up by a target offset, and the upper-left block is one of the at least two second encoding prediction blocks; When the lower block and the left block are excluded, obtaining an upper right block in the predicted reference picture block based on a sixth predictive vector, where the position indicated by the sixth predictive vector is obtained by shifting the position indicated by the predictive motion vector right by a target offset and up by a target offset, and the upper right block is one of the at least two second encoding predictive blocks; When the upper block and the left block are excluded, obtaining a bottom-right block in the predicted reference picture block according to a seventh prediction vector, where the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predicted motion vector right by a target offset and down by a target offset, and the bottom-right block is one of the at least two second encoding prediction blocks; or When the upper block and the right block are excluded, obtaining a bottom-left block in the predicted reference picture block based on an eighth predictive vector, where the position indicated by the eighth predictive vector is obtained by shifting the position indicated by the predictive motion vector to the left by a target offset and down by a target offset, and the bottom-left block is one of the at least two second encoding predictive blocks.

[0025] In one possible implementation, the at least two second encoding prediction blocks include an upper block, a lower block, a left block, and a right block; performing motion search with a first accuracy in the predicted reference picture block to obtain the at least two second encoding prediction blocks is to obtain an upper-left block in the predicted reference picture block based on a fifth prediction vector when a difference corresponding to the upper block is smaller than a difference corresponding to the lower block and a difference corresponding to the left block is smaller than a difference corresponding to the right block; the position indicated by the fifth prediction vector is obtained by shifting a position indicated by the predicted motion vector left by a target offset and up by a target offset; the upper-left block is one of the at least two second encoding prediction blocks, the upper block is obtained in the predicted reference picture block based on the first prediction vector; the position indicated by the predictive vector is obtained by shifting the position indicated by the predictive motion vector up by the target offset, the bottom block is obtained in the predicted reference picture block based on a second predictive vector, and the position indicated by the second predictive vector is obtained by shifting the position indicated by the predictive motion vector down by the target offset, the left block is obtained in the predicted reference picture block based on a third predictive vector, and the position indicated by the third predictive vector is obtained by shifting the position indicated by the predictive motion vector left by the target offset, the right block is obtained in the predicted reference picture block based on a fourth predictive vector, and the position indicated by the fourth predictive vector is obtained by shifting the position indicated by the predictive motion vector right by the target offset, and the target offset is determined based on a first precision; or When the difference corresponding to the upper block is smaller than the difference corresponding to the lower block and the difference corresponding to the right block is smaller than the difference corresponding to the left block, obtaining an upper right block in the predicted reference picture block based on the sixth prediction vector, where the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the prediction motion vector right by a target offset and up by a target offset, and the upper right block is one of the at least two second encoding prediction blocks; or When the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, obtaining a lower-right block in the predicted reference picture block based on the seventh predicted vector, and the position indicated by the seventh predicted vector is obtained by shifting the position indicated by the predicted motion vector right by a target offset and down by a target offset, and the lower-right block is one of the at least two second encoding predicted blocks; or When the difference corresponding to the lower block is smaller than the difference corresponding to the upper block and the difference corresponding to the left block is smaller than the difference corresponding to the right block, obtaining a lower-left block in the predicted reference picture block based on an eighth prediction vector, where the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by a target offset and down by the target offset, and the lower-left block is one of the at least two second encoding prediction blocks.

[0026] In one possible implementation, after determining the motion information of the block to be encoded, the method comprises: Rounding the motion vectors upward or downward.

[0027] In one possible implementation, after performing a motion search with a first accuracy on the predicted reference picture block to obtain at least two second encoding prediction blocks, the method includes: The method further includes rounding upward or downward the predicted motion vectors respectively corresponding to the at least two second encoding predictive blocks.

[0028] According to a third aspect, the present application provides a picture decoding device for a video sequence, the device comprising: a determining module configured to determine motion information of a block to be decoded, the motion information including a predicted motion vector and reference picture information, the reference picture information being used to identify a predicted reference picture block; a processing module configured to: obtain a first decoding prediction block of a block to be decoded based on the motion information; perform a motion search with a first accuracy in the predicted reference picture block to obtain at least two second decoding prediction blocks, a search position of the motion search being determined based on the predicted motion vector and the first accuracy; perform downsampling on the first decoding prediction block to obtain a first sampling pixel array; perform downsampling on the at least two second decoding prediction blocks to obtain at least two second sampling pixel arrays; calculate a difference between each of the first sampling pixel array and the second sampling pixel array, and use the motion vector between the block to be decoded and the second decoding prediction block corresponding to the second sampling pixel array having the smallest difference as a target predicted motion vector of the block to be decoded; and a decoding module configured to obtain a current decoding prediction block of the block to be decoded based on the current predicted motion vector, and decode the block to be decoded based on the current decoding prediction block.

[0029] In the present application, the number of second decoding prediction blocks obtained by performing motion search on the predicted reference picture block is reduced, and pixels in the picture block are sampled, thereby reducing the calculation amount of difference comparison and improving picture decoding efficiency.

[0030] In one possible implementation, the processing module is configured to calculate a sum of absolute pixel differences for pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array and use the sum of absolute pixel differences as the difference; or to calculate a sum of squared pixel differences for pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array and use the sum of squared pixel differences as the difference.

[0031] In one possible implementation, the at least two second decoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block. The processing module specifically excludes the lower block from the at least two second decoding prediction blocks when a difference corresponding to the upper block is smaller than a difference corresponding to the base block, the base block is obtained in the prediction reference picture block according to the prediction motion vector, the upper block is obtained in the prediction reference picture block according to the first prediction vector, and the position indicated by the first prediction vector is obtained by shifting the position indicated by the prediction motion vector up by a target offset, the lower block is obtained in the prediction reference picture block according to the second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset, and the target offset is determined based on a first accuracy; or, when a difference corresponding to the lower block is smaller than a difference corresponding to the base block, excludes the lower block from the at least two second decoding prediction blocks; or excluding a right block from at least two second decoding prediction blocks when a difference corresponding to the left block is smaller than a difference corresponding to the base block, the left block being obtained in the predicted reference picture block based on a third prediction vector, and the position indicated by the third prediction vector being obtained by shifting a position indicated by the predicted motion vector to the left by a target offset, and the right block being obtained in the predicted reference picture block based on a fourth prediction vector, and the position indicated by the fourth prediction vector being obtained by shifting a position indicated by the predicted motion vector to the right by a target offset; or excluding a left block from at least two second decoding prediction blocks when a difference corresponding to the right block is smaller than a difference corresponding to the base block.

[0032] In one possible implementation, the processing module further includes: when the lower block and the right block are excluded, obtain an upper-left block in the predicted reference picture block based on a fifth prediction vector, and the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the predicted motion vector left by the target offset and up by the target offset, and the upper-left block is one of the at least two second decoding prediction blocks; when the lower block and the left block are excluded, obtain an upper-right block in the predicted reference picture block based on a sixth prediction vector, and the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the predicted motion vector right by the target offset and up by the target offset, and the upper-right block is one of the at least two second decoding prediction blocks. when the top block and the left block are excluded, a bottom-right block in the predicted reference picture block is obtained based on a seventh prediction vector, and the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predicted motion vector to the right by the target offset and down by the target offset, and the bottom-right block is one of the at least two second decoding prediction blocks; or when the top block and the right block are excluded, a bottom-left block in the predicted reference picture block is obtained based on an eighth prediction vector, and the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by the target offset and down by the target offset, and the bottom-left block is one of the at least two second decoding prediction blocks.

[0033] In one possible implementation, the at least two second decoding prediction blocks include an upper block, a lower block, a left block, and a right block. The processing module specifically obtains an upper left block in the prediction reference picture block based on a fifth prediction vector when the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, and the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the prediction motion vector left by a target offset and up by a target offset, the upper left block is one of the at least two second decoding prediction blocks, the upper block is obtained in the prediction reference picture block based on a first prediction vector, and the position indicated by the first prediction vector is obtained by shifting the position indicated by the prediction motion vector up by a target offset, the lower block is obtained in the prediction reference picture block based on a second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset, and the left block is a right block is obtained in the predicted reference picture block based on a third prediction vector, and the position indicated by the third prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by the target offset, and a right block is obtained in the predicted reference picture block based on a fourth prediction vector, and the position indicated by the fourth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the right by the target offset, and the target offset is determined based on the first accuracy; or when the difference corresponding to the top block is smaller than the difference corresponding to the bottom block and the difference corresponding to the right block is smaller than the difference corresponding to the left block, a top right block is obtained in the predicted reference picture block based on a sixth prediction vector, and the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the right by the target offset and up by the target offset, and the top right block is one of the at least two second decoding prediction blocks;Alternatively, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, a lower-right block in the predicted reference picture block is obtained based on the seventh prediction vector, and the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predicted motion vector to the right by the target offset and down by the target offset, and the lower-right block is one of the at least two second decoding prediction blocks; or, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, a lower-left block in the predicted reference picture block is obtained based on the eighth prediction vector, and the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by the target offset and down by the target offset, and the lower-left block is one of the at least two second decoding prediction blocks;

[0034] In one possible implementation, the processing module is further configured to round the motion vectors upwards or downwards.

[0035] In one possible implementation, the processing module is further configured to round upwards or downwards the predicted motion vectors corresponding respectively to the at least two second decoding predictive blocks.

[0036] According to a fourth aspect, the present application provides a picture encoding device for a video sequence, the device comprising: a determining module configured to determine motion information of a block to be encoded, the motion information including a predicted motion vector and reference picture information, the reference picture information being used to identify a predicted reference picture block; a processing module configured to: obtain a first encoding predictive block of a block to be encoded based on the motion information; perform a motion search with a first accuracy in the predicted reference picture block to obtain at least two second encoding predictive blocks, a search position of the motion search being determined based on the predicted motion vector and the first accuracy; perform downsampling on the first encoding predictive block to obtain a first sampled pixel array; perform downsampling on the at least two second encoding predictive blocks to obtain at least two second sampled pixel arrays; calculate a difference between each of the first sampled pixel array and the second sampled pixel array, and use the motion vector between the block to be encoded and the second encoding predictive block corresponding to the second sampled pixel array having the smallest difference as a target predicted motion vector of the block to be encoded; and an encoding module configured to obtain a target encoding predictive block of the block to be encoded based on the target predicted motion vector, and encode the block to be encoded based on the target encoding predictive block.

[0037] In the present application, the number of second encoding prediction blocks obtained by performing motion search on the predicted reference picture block is reduced, and pixels in the picture block are sampled, thereby reducing the calculation amount of difference comparison and improving picture encoding efficiency.

[0038] In one possible implementation, the processing module is configured to calculate a sum of absolute pixel differences for pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array and use the sum of absolute pixel differences as the difference; or to calculate a sum of squared pixel differences for pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array and use the sum of squared pixel differences as the difference.

[0039] In one possible implementation, the at least two second encoding predictive blocks include a base block, an upper block, a lower block, a left block, and a right block. The processing module specifically excludes the lower block from the at least two second encoding predictive blocks when a difference corresponding to the upper block is smaller than a difference corresponding to the base block, the base block is obtained in the predictive reference picture block according to the predictive motion vector, the upper block is obtained in the predictive reference picture block according to the first predictive vector, and the position indicated by the first predictive vector is obtained by shifting the position indicated by the predictive motion vector up by a target offset, the lower block is obtained in the predictive reference picture block according to the second predictive vector, and the position indicated by the second predictive vector is obtained by shifting the position indicated by the predictive motion vector down by a target offset, and the target offset is determined based on a first accuracy; or when a difference corresponding to the lower block is smaller than a difference corresponding to the base block, the at least or excluding a right block from the at least two second encoding predictive blocks when a difference corresponding to the left block is smaller than a difference corresponding to the base block, the left block being obtained within the predicted reference picture block based on a third prediction vector, and a position indicated by the third prediction vector being obtained by shifting a position indicated by the predictive motion vector to the left by a target offset, and the right block being obtained within the predicted reference picture block based on a fourth prediction vector, and a position indicated by the fourth prediction vector being obtained by shifting a position indicated by the predictive motion vector to the right by a target offset; or excluding a left block from the at least two second encoding predictive blocks when a difference corresponding to the right block is smaller than a difference corresponding to the base block.

[0040] In one possible implementation, the processing module further includes: when the lower block and the right block are excluded, obtain an upper-left block in the predicted reference picture block based on a fifth prediction vector, where the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the predicted motion vector left by the target offset and up by the target offset, and the upper-left block is one of the at least two second encoding prediction blocks; when the lower block and the left block are excluded, obtain an upper-right block in the predicted reference picture block based on a sixth prediction vector, where the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the predicted motion vector right by the target offset and up by the target offset, and the upper-right block is one of the at least two second encoding prediction blocks. when the top block and the left block are excluded, a bottom-right block in the predicted reference picture block is obtained based on a seventh prediction vector, and the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predicted motion vector to the right by the target offset and down by the target offset, and the bottom-right block is one of the at least two second encoding prediction blocks; or when the top block and the right block are excluded, a bottom-left block in the predicted reference picture block is obtained based on an eighth prediction vector, and the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by the target offset and down by the target offset, and the bottom-left block is one of the at least two second encoding prediction blocks.

[0041] In one possible implementation, the at least two second encoding prediction blocks include an upper block, a lower block, a left block, and a right block. The processing module specifically obtains an upper-left block in the predicted reference picture block based on a fifth prediction vector when the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, and the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the predicted motion vector left by a target offset and up by a target offset, the upper-left block is one of the at least two second encoding prediction blocks, the upper block is obtained in the predicted reference picture block based on a first prediction vector, and the position indicated by the first prediction vector is obtained by shifting the position indicated by the predicted motion vector up by a target offset, the lower block is obtained in the predicted reference picture block based on a second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the predicted motion vector down by a target offset, and the left block is a right block is obtained in the predicted reference picture block based on a third prediction vector, where the position indicated by the third prediction vector is obtained by shifting the position indicated by the predicted motion vector left by the target offset, and a right block is obtained in the predicted reference picture block based on a fourth prediction vector, where the position indicated by the fourth prediction vector is obtained by shifting the position indicated by the predicted motion vector right by the target offset, and the target offset is determined based on the first accuracy; or when the difference corresponding to the top block is smaller than the difference corresponding to the bottom block and the difference corresponding to the right block is smaller than the difference corresponding to the left block, a top right block is obtained in the predicted reference picture block based on a sixth prediction vector, where the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the predicted motion vector right by the target offset and up by the target offset, and the top right block is one of the at least two second encoding prediction blocks;Alternatively, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, a lower-right block in the predicted reference picture block is obtained based on the seventh prediction vector, and the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predictive motion vector to the right by the target offset and down by the target offset, and the lower-right block is one of the at least two second encoding prediction blocks; or, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, a lower-left block in the predicted reference picture block is obtained based on the eighth prediction vector, and the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predictive motion vector to the left by the target offset and down by the target offset, and the lower-left block is one of the at least two second encoding prediction blocks;

[0042] In one possible implementation, the processing module is further configured to round the motion vectors upwards or downwards.

[0043] In one possible implementation, the processing module is further configured to round upwards or downwards the predicted motion vectors corresponding respectively to the at least two second decoding predictive blocks.

[0044] According to a fifth aspect, the present application provides a codec device, comprising: One or more controllers; a memory configured to store one or more programs; A codec device, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to perform a method according to the first aspect or the second aspect.

[0045] According to a sixth aspect, the present application provides a computer readable storage medium storing instructions which, when executed on a computer, configure the computer to perform a method according to the first or second aspect.

[0046] According to a seventh aspect, the present application provides a computer program, which when executed by a computer configures the computer to perform a method according to the first or second aspect. [Brief description of the drawings]

[0047] In order to more clearly describe the embodiments of the present invention or the technical solutions in the prior art, the following briefly describes the accompanying drawings necessary to describe the embodiments or the prior art. Obviously, the accompanying drawings in the following description merely show some embodiments of the present invention, and those skilled in the art may derive other drawings from these accompanying drawings without creative efforts. [Figure 1] 1 is a flowchart of a first embodiment of a picture decoding method for a video sequence according to the present application; [Diagram 2] 4 is a flowchart of embodiment 2 of a picture decoding method for a video sequence according to the present application; [Diagram 3] 1 is a flowchart of a first embodiment of a picture encoding method for a video sequence according to the present application; [Figure 4] 4 is a flowchart of a second embodiment of a picture encoding method for a video sequence according to the present application; [Diagram 5] 1 is a schematic structural diagram of an embodiment of a picture decoding apparatus for a video sequence according to the present application; [Figure 6] FIG. 1 is a schematic structural diagram of an embodiment of a picture encoding apparatus for a video sequence according to the present application; [Figure 7] FIG. 2 is a schematic structural diagram of an embodiment of a codec device according to the present application; [Figure 8] FIG. 2 is a schematic structural diagram of an embodiment of a codec system according to the present application; [Figure 9] FIG. 2 is a schematic diagram of an example of determining a location of a search point according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0048] In the following, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention. It is clear that the described embodiments are only a part and not all of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0049] The procedure of the inter-prediction picture encoding method in the DMVR technology is as follows.

[0050] 1. Determine motion information of a block to be encoded, where the motion information includes a predicted motion vector and reference picture information, where the reference picture information is used to identify a predicted reference picture block.

[0051] The block to be encoded is a current picture block to be encoded. The predicted motion vector in the motion information includes a forward predicted motion vector and a backward predicted motion vector. The reference picture information includes reference frame index information of the forward predicted reference picture block and the backward predicted reference picture block (i.e., Picture Order Count (POC) of the forward and backward predicted reference picture blocks). The predicted reference picture block of the block to be encoded can be obtained based on the predicted motion vector or the reference picture information of the block to be encoded.

[0052] 2. Perform bidirectional prediction on the block to be encoded based on the motion information to obtain an initial encoding predicted block of the block to be encoded, and obtain a first encoding predicted block of the block to be encoded based on the initial encoding predicted block.

[0053] When the POC corresponding to the predicted reference picture block is not equal to the POC of the block to be encoded, bidirectional prediction, including forward prediction and backward prediction, is performed on the block to be encoded based on the motion information. Performing forward prediction on the block to be encoded based on the motion information, i.e. performing forward prediction on the block to be encoded based on the forward motion information to obtain a forward initial encoding prediction block of the block to be encoded, includes performing forward prediction on the block to be encoded based on the forward predicted reference picture block in the motion information to obtain a forward initial encoding prediction block of the block to be encoded, or performing forward prediction on the block to be encoded based on the forward predicted motion vector in the motion information to obtain a forward initial encoding prediction block of the block to be encoded. Performing backward prediction on a block to be encoded based on motion information, i.e., performing backward prediction on a block to be encoded based on backward motion information to obtain a backward initial encoding prediction block of the block to be encoded, includes performing backward prediction on a block to be encoded based on a backward predicted reference picture block in the motion information to obtain a backward initial encoding prediction block of the block to be encoded, or performing backward prediction on a block to be encoded based on a backward predicted motion vector in the motion information to obtain a backward initial encoding prediction block of the block to be encoded.

[0054] Obtaining the first encoding prediction block of the block to be encoded based on the initial encoding prediction block includes the following three implementations: One implementation is to perform a weighted summation on the forward initial encoding prediction block and the backward initial encoding prediction block to obtain the first encoding prediction block of the block to be encoded; Another implementation is to use the forward initial encoding prediction block as the first encoding prediction block of the block to be encoded; The last implementation is to use the backward initial encoding prediction block as the first encoding prediction block of the block to be encoded.

[0055] 3. Perform a motion search with a first accuracy on the predicted reference picture block to obtain at least one second encoding predicted block.

[0056] The search position of the motion search is determined based on the predicted motion vector and the first precision. In one possible implementation, the position of the motion search is a position at the first precision around the position identified by the predicted motion vector. For example, the position identified by the predicted motion vector is (1, 1), and the first precision is 1 / 2 pixel precision. In this case, the positions of the motion search include a total of nine positions, namely (1, 1), (1, 1.5) above (1, 1), (1, 0.5) below (1, 1), (0.5, 1) on the left, (1.5, 1) on the right, (1.5, 1.5) on the top right, (1.5, 0.5) on the bottom right, (0.5, 1.5) on the top left, and (0.5, 0.5) on the bottom left.

[0057] A motion search with a first precision may be performed on a forward prediction reference picture block based on a forward prediction motion vector, and a forward encoding prediction block obtained in each search is used as a second forward encoding prediction block to obtain at least one second encoding prediction block. Then, a motion search with a first precision is performed on a backward prediction reference picture block based on a backward prediction motion vector, and a backward encoding prediction block obtained in each search is used as a second backward encoding prediction block to obtain at least one second encoding prediction block. The second encoding prediction block includes a second forward encoding prediction block and a second backward encoding prediction block. The first precision includes, but is not limited to, integer pixel precision, 1 / 2 pixel precision, 1 / 4 pixel precision, or 1 / 8 pixel precision.

[0058] 4. Calculate the difference between the first encoding predictive block and each second encoding predictive block, and use the motion vector between the block to be encoded and the second encoding predictive block having the smallest difference as the target predictive motion vector for the block to be encoded.

[0059] A difference comparison is performed between each second forward encoding predictive block and the first encoding predictive block, and a forward motion vector between the block to be encoded and the second forward encoding predictive block having the smallest difference is used as a target forward predictive motion vector. A difference comparison is performed between each second backward encoding predictive block and the first encoding predictive block, and a backward motion vector between the block to be encoded and the second backward encoding predictive block having the smallest difference is used as a target backward predictive motion vector. The target predictive motion vectors include a target forward predictive motion vector and a target backward predictive motion vector. During the difference comparison, the sum of the absolute values ​​of all pixel differences in the two picture blocks may be used as the difference between the second encoding predictive block and the first encoding predictive block, or the sum of the squares of all pixel differences in the two picture blocks may be used as the difference between the second encoding predictive block and the first encoding predictive block.

[0060] 5. Perform bidirectional prediction on the block to be encoded based on the target predicted motion vector to obtain a third encoding predicted block of the block to be encoded.

[0061] Forward prediction is performed on the block to be encoded based on the target forward prediction motion vector to obtain a third forward encoding prediction block of the block to be encoded, and then backward prediction is performed on the block to be encoded based on the target backward prediction motion vector to obtain a third backward encoding prediction block of the block to be encoded.

[0062] 6. Obtain a target encoding predictive block of the block to be encoded based on the third encoding predictive block, and encode the block to be encoded based on the target encoding predictive block.

[0063] A weighted summation may be performed on the third forward encoding predictive block and the third backward encoding predictive block to obtain a target encoding predictive block of the block to be encoded, or the third forward encoding predictive block may be used as the target encoding predictive block of the block to be encoded, or the third backward encoding predictive block may be used as the target encoding predictive block of the block to be encoded.

[0064] The procedure of the inter-prediction picture decoding method in the DMVR technology is as follows.

[0065] 1. Determine motion information of a block to be decoded, where the motion information includes a predicted motion vector and reference picture information, where the reference picture information is used to identify a predicted reference picture block.

[0066] The block to be decoded is the current picture block to be decoded. The predicted motion vector in the motion information includes a forward predicted motion vector and a backward predicted motion vector. The reference picture information includes reference frame index information of the forward predicted reference picture block and the backward predicted reference picture block (i.e., Picture Order Count (POC) of the forward and backward predicted reference picture blocks). The predicted reference picture block of the block to be decoded can be obtained based on the predicted motion vector or the reference picture information of the block to be decoded.

[0067] 2. Perform bidirectional prediction on the block to be decoded based on the motion information to obtain an initial decoding prediction block of the block to be decoded, and obtain a first decoding prediction block of the block to be decoded based on the initial decoding prediction block.

[0068] When the POC corresponding to the predicted reference picture block is not equal to the POC of the block to be decoded, bidirectional prediction, including forward prediction and backward prediction, is performed on the block to be decoded based on the motion information. Performing forward prediction on the block to be decoded based on the motion information, i.e. performing forward prediction on the block to be decoded based on the forward motion information to obtain a forward initial decoding prediction block of the block to be decoded, includes performing forward prediction on the block to be decoded based on the forward prediction reference picture block in the motion information to obtain a forward initial decoding prediction block of the block to be decoded, or performing forward prediction on the block to be decoded based on the forward prediction motion vector in the motion information to obtain a forward initial decoding prediction block of the block to be decoded. Performing backward prediction on a block to be decoded based on motion information, i.e., performing backward prediction on a block to be decoded based on backward motion information to obtain a backward initial decoding prediction block of the block to be decoded, includes performing backward prediction on a block to be decoded based on a backward predicted reference picture block in the motion information to obtain a backward initial decoding prediction block of the block to be decoded, or performing backward prediction on a block to be decoded based on a backward predicted motion vector in the motion information to obtain a backward initial decoding prediction block of the block to be decoded.

[0069] Obtaining the first decoding prediction block of the block to be decoded based on the initial decoding prediction block includes the following three implementations: One implementation is to perform weighted summation on the forward initial decoding prediction block and the backward initial decoding prediction block to obtain the first decoding prediction block of the block to be decoded; Another implementation is to use the forward initial decoding prediction block as the first decoding prediction block of the block to be decoded; The last implementation is to use the backward initial decoding prediction block as the first decoding prediction block of the block to be decoded.

[0070] 3. Perform a motion search with a first accuracy on the predicted reference picture block to obtain at least one second decoding predicted block.

[0071] The search position of the motion search is determined based on the predicted motion vector and the first precision. In one possible implementation, the position of the motion search is a position at the first precision around the position identified by the predicted motion vector. For example, the position identified by the predicted motion vector is (1, 1), and the first precision is 1 / 2 pixel precision. In this case, the positions of the motion search include a total of nine positions, namely (1, 1), (1, 1.5) above (1, 1), (1, 0.5) below (1, 1), (0.5, 1) on the left, (1.5, 1) on the right, (1.5, 1.5) on the top right, (1.5, 0.5) on the bottom right, (0.5, 1.5) on the top left, and (0.5, 0.5) on the bottom left.

[0072] A motion search with a first precision may be performed on a forward prediction reference picture block based on a forward prediction motion vector, and a forward decoding prediction block obtained in each search is used as a second forward decoding prediction block to obtain at least one second decoding prediction block. Then, a motion search with a first precision is performed on a backward prediction reference picture block based on a backward prediction motion vector, and a backward decoding prediction block obtained in each search is used as a second backward decoding prediction block to obtain at least one second decoding prediction block. The second decoding prediction block includes a second forward decoding prediction block and a second backward decoding prediction block. The first precision includes, but is not limited to, integer pixel precision, 1 / 2 pixel precision, 1 / 4 pixel precision, or 1 / 8 pixel precision.

[0073] 4. Calculate the difference between the first decoding prediction block and each second decoding prediction block, and use the motion vector between the block to be decoded and the second decoding prediction block having the smallest difference as the target prediction motion vector of the block to be decoded.

[0074] A difference comparison is performed between each second forward decoding prediction block and the first decoding prediction block, and a forward motion vector between the block to be decoded and the second forward decoding prediction block having the smallest difference is used as a target forward prediction motion vector. A difference comparison is performed between each second backward decoding prediction block and the first decoding prediction block, and a backward motion vector between the block to be decoded and the second backward decoding prediction block having the smallest difference is used as a target backward prediction motion vector. The target prediction motion vector includes a target forward prediction motion vector and a target backward prediction motion vector. During the difference comparison, the sum of the absolute values ​​of all pixel differences in the two picture blocks may be used as the difference between the second decoding prediction block and the first decoding prediction block, or the sum of the squares of all pixel differences in the two picture blocks may be used as the difference between the second decoding prediction block and the first decoding prediction block.

[0075] 5. Perform bidirectional prediction on the block to be decoded according to the target predicted motion vector to obtain a third decoding predicted block of the block to be decoded.

[0076] Forward prediction is performed on the block to be decoded based on the target forward prediction motion vector to obtain a third forward decoding prediction block of the block to be decoded, and then backward prediction is performed on the block to be decoded based on the target backward prediction motion vector to obtain a third backward decoding prediction block of the block to be decoded.

[0077] 6. Obtain a target decoding prediction block of the block to be decoded according to the third decoding prediction block, and decode the block to be decoded according to the target decoding prediction block.

[0078] A weighted summation may be performed on the third forward decoding prediction block and the third backward decoding prediction block to obtain a target decoding prediction block of the block to be decoded, or the third forward decoding prediction block may be used as the target decoding prediction block of the block to be decoded, or the third backward decoding prediction block may be used as the target decoding prediction block of the block to be decoded.

[0079] However, the computational complexity of the DMVR technology is relatively high. This application provides a picture encoding and decoding method for a video sequence. The following provides a detailed description by using a specific embodiment.

[0080] 1 is a flowchart of an embodiment 1 of a picture decoding method for a video sequence according to the present application. As shown in FIG. 1, the method in this embodiment may include the following steps:

[0081] Step 101: Determine motion information of a block to be decoded, where the motion information includes a predicted motion vector and reference picture information, and the reference picture information is used to identify a predicted reference picture block.

[0082] As mentioned above, the predicted motion vector obtained in step 1 of the inter-prediction picture decoding method in the existing DMVR technology is coordinate information, and the coordinate information may indicate a non-pixel point (located between two pixels). In this case, the non-pixel point can only be obtained by interpolation based on two neighboring pixels.

[0083] In this application, the predicted motion vector is directly rounded up or down, so that the predicted motion vector obtained after rounding corresponds to the position of the pixel.In this way, the interpolation calculation is omitted, and the calculation amount and complexity are reduced.

[0084] Step 102: Obtain a first decoding prediction block of the block to be decoded according to the motion information.

[0085] The principle of step 102 in this application is similar to the principle of step 2 in the aforementioned inter-prediction picture decoding method in DMVR technology, and the details will not be described again here.

[0086] Step 103: Perform a motion search with a first precision in the predicted reference picture block to obtain at least two second decoding prediction blocks, and a search position of the motion search is determined according to the predicted motion vector and the first precision.

[0087] As mentioned above, in step 3 of the inter-prediction picture decoding method in the existing DMVR technology, a motion search is performed with a first precision around a base block in a predicted reference picture block to obtain at least nine second decoding prediction blocks, the nine second decoding prediction blocks including a base block, an upper block, a lower block, a left block, a right block, an upper left block, an upper right block, a lower right block, and a lower left block. The base block is obtained in the predicted reference picture block based on the predicted motion vector, the top block is obtained in the predicted reference picture block based on the first predicted vector, the bottom block is obtained in the predicted reference picture block based on the second predicted vector, the left block is obtained in the predicted reference picture block based on the third predicted vector, the right block is obtained in the predicted reference picture block based on the fourth predicted vector, the top left block is obtained in the predicted reference picture block based on the fifth predicted vector, the top right block is obtained in the predicted reference picture block based on the sixth predicted vector, the bottom right block is obtained in the predicted reference picture block based on the seventh predicted vector, and the bottom left block is obtained in the predicted reference picture block based on the eighth predicted vector. The position indicated by the first predicted vector is obtained by shifting the position indicated by the predicted motion vector up by the target offset. The position indicated by the second predicted vector is obtained by shifting the position indicated by the predicted motion vector down by the target offset. The position indicated by the third predictor vector is obtained by shifting the position indicated by the predictor motion vector to the left by the target offset. The position indicated by the fourth predictor vector is obtained by shifting the position indicated by the predictor motion vector to the right by the target offset. The position indicated by the fifth predictor vector is obtained by shifting the position indicated by the predictor motion vector to the left by the target offset and up by the target offset. The position indicated by the sixth predictor vector is obtained by shifting the position indicated by the predictor motion vector to the right by the target offset and up by the target offset.The position indicated by the seventh predicted vector is obtained by shifting the position indicated by the predicted motion vector to the right by the target offset and down by the target offset. The position indicated by the eighth predicted vector is obtained by shifting the position indicated by the predicted motion vector to the left by the target offset and down by the target offset. The target offset is determined based on the first accuracy.

[0088] Step 103 in this application may be implemented using the following implementation methods.

[0089] The first method is based on the assumption that the at least two second decoding prediction blocks include a base block, an upper block, a lower block, a left block and a right block. The lower block is excluded from the at least two second decoding prediction blocks when the difference corresponding to the upper block is smaller than the difference corresponding to the base block. Alternatively, the upper block is excluded from the at least two second decoding prediction blocks when the difference corresponding to the lower block is smaller than the difference corresponding to the base block.

[0090] The right block is excluded from the at least two second decoding prediction blocks when the difference corresponding to the left block is smaller than the difference corresponding to the base block, or the left block is excluded from the at least two second decoding prediction blocks when the difference corresponding to the right block is smaller than the difference corresponding to the base block.

[0091] That is, one of the upper block and the lower block is selected, and one of the left block and the right block is selected. If the difference corresponding to the block is smaller than the difference corresponding to the base block, the block in the opposite direction does not need to be obtained. In this way, only the second decoding prediction block in the three positions needs to be obtained. The difference in this step refers to the difference between the second decoding prediction block and the first decoding prediction block. Once it is found that the difference corresponding to one of the upper block and the lower block and the difference corresponding to one of the left block and the right block is smaller than the difference corresponding to the base block, it indicates that the two blocks are closer to the block to be decoded than the base block. Therefore, the block in the opposite offset direction may no longer need to be obtained.

[0092] Furthermore, when the lower block and the right block are excluded, a top left block is obtained in the predicted reference picture block. The top left block is one of at least two second decoding prediction blocks. When the lower block and the left block are excluded, a top right block is obtained in the predicted reference picture block. The top right block is one of at least two second decoding prediction blocks. When the upper block and the left block are excluded, a bottom right block is obtained in the predicted reference picture block. The bottom right block is one of at least two second decoding prediction blocks. When the upper block and the right block are excluded, a bottom left block is obtained in the predicted reference picture block. The bottom left block is one of at least two second decoding prediction blocks.

[0093] That is, according to the second decoding prediction block at the above two positions, one of the upper left block, the upper right block, the lower right block and the lower left block may be further obtained. In this case, only the second decoding prediction block at four positions needs to be obtained in total.

[0094] The second method is based on the assumption that the at least two second decoding prediction blocks include an upper block, a lower block, a left block, and a right block. When the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, the upper left block is obtained in the prediction reference picture block. The upper left block is one of the at least two second decoding prediction blocks. Alternatively, when the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, the upper right block is obtained in the prediction reference picture block. The upper right block is one of the at least two second decoding prediction blocks. Alternatively, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, the lower right block is obtained in the prediction reference picture block. The lower right block is one of the at least two second decoding prediction blocks. Alternatively, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, the lower left block is obtained in the predicted reference picture block. The lower left block is one of at least two second decoding prediction blocks.

[0095] That is, the second decoding prediction blocks at four positions are first obtained, and then one of the upper left block, the upper right block, the lower right block and the lower left block is obtained according to the four second decoding prediction blocks.In this case, only the second decoding prediction blocks at five positions need to be obtained in total.

[0096] Both two methods in this application are based on the difference corresponding to the base block and the difference corresponding to the blocks around the base block. Once it is found that the difference corresponding to the block in one direction is smaller than the difference corresponding to the block in the other direction in two opposite directions, or the difference corresponding to the block in one direction is smaller than the difference corresponding to the base block, the second decoding prediction block in the other direction, or even the corner direction, may not need to be obtained. In this way, the quantity of the second decoding prediction block obtained is certainly less than the nine second decoding prediction blocks in the prior art. Moreover, the reduction in the quantity of the second decoding prediction block means that the calculation amount and complexity of the subsequent pixel sampling and difference calculation are reduced.

[0097] In one possible implementation, according to the above-mentioned second method, it is set that the difference corresponding to a total of 5 second decoding prediction blocks in upper direction, lower direction, left direction, right direction and diagonal direction is compared with the difference corresponding to base block.The second decoding prediction block corresponding to the smallest difference is selected as a candidate prediction block, and a total of 8 new second decoding prediction blocks in upper, lower, left and right direction and 4 diagonal directions of the candidate prediction block are selected. Since some of the eight new second decoding prediction blocks are the original second decoding prediction blocks and base blocks, and difference calculations have been performed on these second decoding prediction blocks (as shown in FIG. 9, the new second decoding prediction block in the right direction and the new second decoding prediction block in the downward direction are the original second decoding prediction blocks, and the new second decoding prediction block in the lower right diagonal direction is the original base block), the difference calculations are only performed on the new second decoding prediction blocks that are not undergone with the difference calculations, and only the differences corresponding to these new second decoding prediction blocks are compared with the differences corresponding to the candidate prediction blocks.

[0098] In one possible implementation, the differences corresponding to the four second decoding prediction blocks in the above, below, left, and right directions are compared with the differences corresponding to the base block, and when they are all greater than or equal to the differences corresponding to the base block, the base block is selected as the prediction block, and the motion vector corresponding to the base block is used as the target motion vector.

[0099] Furthermore, as described above, in the existing DMVR technology, after at least one second decoding prediction block is obtained in step 3 of the inter-prediction picture decoding method, even if the predicted motion vector corresponding to the base block represents a pixel, if the motion search precision is not integer pixel, for example, 1 / 2 pixel precision, 1 / 4 pixel precision, or 1 / 8 pixel precision, the predicted motion vector corresponding to the second decoding prediction block after shifting may indicate a non-pixel point.

[0100] In this application, the predicted motion vectors that correspond to at least two second decoding prediction blocks are rounded up or down to correspond to the pixel position.In this way, the interpolation calculation is omitted, and the calculation amount and complexity are reduced.

[0101] Step 104: perform down-sampling on the first decoding prediction block to obtain a first sampling pixel array, and perform down-sampling on at least two second decoding prediction blocks to obtain at least two second sampling pixel arrays.

[0102] As mentioned above, in step 4 of the inter-prediction picture decoding method in the existing DMVR technology, the sum of the absolute value of the pixel difference between all pixels in the first decoding prediction block and all pixels in each second decoding prediction block can be used as the difference between two picture blocks, or the sum of the squares of the pixel difference between all pixels in the first decoding prediction block and all pixels in each second decoding prediction block can be used as the difference between two picture blocks. In this case, the amount of calculation required is quite large.

[0103] Due to the image association contained in a picture, the pixel values ​​of two adjacent pixels in a picture are not significantly different, and in particular, sudden changes in pixel values ​​rarely occur.Therefore, in this application, all pixels in a picture block are sampled, that is, only some pixels are selected from all pixels, for example, pixels in every other row are obtained, or pixels in every other column are obtained, or pixels in every other row and every other column are obtained.This is not specifically limited.It is only required that the same sampling rule is used for the first decoding prediction block and each second decoding prediction block.In this way, the number of pixels to be calculated is reduced, and the corresponding amount of calculation is greatly reduced.

[0104] Step 105: Calculate the difference between each of the first sampling pixel array and the second sampling pixel array, and use the motion vector between the block to be decoded and the second decoding prediction block corresponding to the second sampling pixel array having the smallest difference as the target prediction motion vector of the block to be decoded.

[0105] Since the pixels in the first decoding prediction block and each second decoding prediction block are sampled, to calculate the difference between two picture blocks, the sum of the absolute value of pixel difference of pixels at corresponding positions in the first sampling pixel array and each second sampling pixel array may be calculated, and the sum of the absolute value of pixel difference is used as the difference between the first decoding prediction block and each second decoding prediction block; or the sum of the square of pixel difference of pixels at corresponding positions in the first sampling pixel array and each second sampling pixel array may be calculated, and the sum of the square of pixel difference is used as the difference between the first decoding prediction block and each second decoding prediction block. That is, the calculation for all pixels in two picture blocks is changed to the calculation for some pixels in two picture blocks, and the amount of calculation is greatly reduced.

[0106] Step 106: obtain a current decoding prediction block of the block to be decoded according to the current predicted motion vector, and decode the block to be decoded according to the current decoding prediction block.

[0107] As mentioned above, in step 5 and step 6 of the inter-prediction picture decoding method in the existing DMVR technology, motion search is performed in two main directions, i.e., forward direction and backward direction, and two target prediction motion vectors are obtained in forward direction and backward direction respectively. The same calculation process needs to be performed twice, and the amount of calculation is certainly large.

[0108] In this application, after forward motion search is completed, a symmetric backward target prediction motion vector can be obtained based on the forward target prediction motion vector obtained through forward motion search, that is, the backward target decoding prediction block is obtained in the backward direction by using the same value as the forward target prediction motion vector.In this way, the existing target prediction motion vector is directly used in the backward direction, so that a large amount of repeated calculation is not required, and the amount of calculation is reduced.

[0109] In the present application, the number of second decoding prediction blocks obtained by performing motion search on the predicted reference picture block is reduced, and pixels in the picture block are sampled, thereby reducing the calculation amount of difference comparison and improving picture decoding efficiency.

[0110] 2 is a flowchart of an embodiment 2 of a picture decoding method for a video sequence according to the present application. As shown in FIG. 2, the method in this embodiment may include the following steps:

[0111] Step 201: Determine motion information of a block to be decoded, where the motion information includes a predicted motion vector and reference picture information, where the reference picture information is used to identify a predicted reference picture block.

[0112] The principle of step 201 in this application is similar to that of step 101, and the details will not be described again here.

[0113] Step 202: Obtain a base block, an upper block, a lower block, a left block, and a right block in a prediction reference picture block.

[0114] Step 203: If the differences corresponding to the top block, the bottom block, the left block and the right block are all greater than the difference corresponding to the base block, only the base block is retained.

[0115] Step 204: Use the motion vector between the base block and the block to be decoded as the target predicted motion vector of the block to be decoded.

[0116] This application is based on the assumption that at least two second decoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block. The base block, the upper block, the lower block, the left block, and the right block are first obtained, and then the difference corresponding to other blocks is compared with the difference corresponding to the base block. When the difference corresponding to the upper block, the lower block, the left block, and the right block, respectively, is all larger than the difference corresponding to the base block, only the base block is kept. That is, the target predicted motion vector finally used for the block to be decoded can be directly determined by only obtaining the second decoding prediction blocks at five positions. Once it is found that the difference corresponding to the upper block, the lower block, the left block, and the right block, respectively, is all larger than the difference corresponding to the base block, it indicates that none of the second decoding prediction blocks at the offset position is closer to the block to be decoded than the base block. Therefore, the motion vector between the base block and the block to be decoded is directly used as the target predicted motion vector of the block to be decoded.

[0117] Step 205: obtain a current decoding prediction block of the block to be decoded according to the current predicted motion vector, and decode the block to be decoded according to the current decoding prediction block.

[0118] The principle of step 205 in this application is similar to that of step 106, and the details will not be described again here.

[0119] In the present application, the number of second decoding prediction blocks obtained by performing motion search on the predicted reference picture block is reduced, thereby reducing the calculation amount of difference comparison and improving picture decoding efficiency.

[0120] 3 is a flowchart of an embodiment 1 of a picture encoding method for a video sequence according to the present application. As shown in FIG. 3, the method of this embodiment may include the following steps:

[0121] Step 301: Determine motion information of a block to be encoded, where the motion information includes a predicted motion vector and reference picture information, where the reference picture information is used to identify a predicted reference picture block.

[0122] As mentioned above, the predicted motion vector obtained in step 1 of the inter-prediction picture encoding method in the existing DMVR technology is coordinate information, which may indicate a non-pixel point (located between two pixels). In this case, the non-pixel point can only be obtained by interpolation based on two neighboring pixels.

[0123] In this application, the predicted motion vector is rounded up or down to directly correspond to the pixel position, thus omitting the interpolation calculation, and reducing the amount of calculation and complexity.

[0124] Step 302: Obtain a first encoding prediction block of a block to be encoded based on motion information.

[0125] The principle of step 302 in this application is similar to that of step 2 in the aforementioned inter-prediction picture encoding method in DMVR technology, and the details will not be described again here.

[0126] Step 303: Perform a motion search with a first precision on the predicted reference picture block to obtain at least two second encoding prediction blocks, and a search position of the motion search is determined based on the predicted motion vector and the first precision.

[0127] As mentioned above, in step 3 of the inter-prediction picture encoding method in the existing DMVR technology, a motion search is performed with a first precision around a base block in a predicted reference picture block to obtain at least nine second encoding prediction blocks, the nine second encoding prediction blocks including a base block, an upper block, a lower block, a left block, a right block, an upper left block, an upper right block, a lower right block, and a lower left block. The base block is obtained in the predicted reference picture block based on the predicted motion vector, the top block is obtained in the predicted reference picture block based on the first predicted vector, the bottom block is obtained in the predicted reference picture block based on the second predicted vector, the left block is obtained in the predicted reference picture block based on the third predicted vector, the right block is obtained in the predicted reference picture block based on the fourth predicted vector, the top left block is obtained in the predicted reference picture block based on the fifth predicted vector, the top right block is obtained in the predicted reference picture block based on the sixth predicted vector, the bottom right block is obtained in the predicted reference picture block based on the seventh predicted vector, and the bottom left block is obtained in the predicted reference picture block based on the eighth predicted vector. The position indicated by the first predicted vector is obtained by shifting the position indicated by the predicted motion vector up by the target offset. The position indicated by the second predicted vector is obtained by shifting the position indicated by the predicted motion vector down by the target offset. The position indicated by the third predictor vector is obtained by shifting the position indicated by the predictor motion vector to the left by the target offset. The position indicated by the fourth predictor vector is obtained by shifting the position indicated by the predictor motion vector to the right by the target offset. The position indicated by the fifth predictor vector is obtained by shifting the position indicated by the predictor motion vector to the left by the target offset and up by the target offset. The position indicated by the sixth predictor vector is obtained by shifting the position indicated by the predictor motion vector to the right by the target offset and up by the target offset.The position indicated by the seventh predicted vector is obtained by shifting the position indicated by the predicted motion vector to the right by the target offset and down by the target offset. The position indicated by the eighth predicted vector is obtained by shifting the position indicated by the predicted motion vector to the left by the target offset and down by the target offset. The target offset is determined based on the first accuracy.

[0128] Step 303 in the present application may be implemented using the following implementation methods.

[0129] The first method is based on the assumption that the at least two second encoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block. The lower block is excluded from the at least two second encoding prediction blocks when the difference corresponding to the upper block is smaller than the difference corresponding to the base block. Alternatively, the upper block is excluded from the at least two second encoding prediction blocks when the difference corresponding to the lower block is smaller than the difference corresponding to the base block.

[0130] The right block is excluded from the at least two second encoding prediction blocks when the difference corresponding to the left block is smaller than the difference corresponding to the base block, or the left block is excluded from the at least two second encoding prediction blocks when the difference corresponding to the right block is smaller than the difference corresponding to the base block.

[0131] That is, one of the upper block and the lower block is selected, and one of the left block and the right block is selected. If the difference corresponding to the block is smaller than the difference corresponding to the base block, the block in the opposite direction does not need to be obtained. In this way, only the second encoding prediction block in the three positions needs to be obtained. The difference in this step refers to the difference between the second encoding prediction block and the first encoding prediction block. Once it is found that the difference corresponding to one of the upper block and the lower block and the difference corresponding to one of the left block and the right block are smaller than the difference corresponding to the base block, it indicates that the two blocks are closer to the block to be encoded than the base block. Therefore, the block in the opposite offset direction may no longer need to be obtained.

[0132] Further, when the lower block and the right block are excluded, a top left block is obtained within the predicted reference picture block. The top left block is one of at least two second encoding prediction blocks. When the lower block and the left block are excluded, a top right block is obtained within the predicted reference picture block. The top right block is one of at least two second encoding prediction blocks. When the upper block and the left block are excluded, a bottom right block is obtained within the predicted reference picture block. The bottom right block is one of at least two second encoding prediction blocks. When the upper block and the right block are excluded, a bottom left block is obtained within the predicted reference picture block. The bottom left block is one of at least two second encoding prediction blocks.

[0133] That is, according to the second encoding prediction blocks at the above two positions, one of the upper left block, the upper right block, the lower right block, and the lower left block may be further obtained, in this case, only the second encoding prediction blocks at four positions need to be obtained in total.

[0134] The second method is based on the assumption that the at least two second encoding prediction blocks include an upper block, a lower block, a left block, and a right block. When the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, the upper left block is obtained in the predicted reference picture block. The upper left block is one of the at least two second encoding prediction blocks. Alternatively, when the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, the upper right block is obtained in the predicted reference picture block. The upper right block is one of the at least two second encoding prediction blocks. Alternatively, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the right block is smaller than the difference corresponding to the left block, the lower right block is obtained in the predicted reference picture block. The lower right block is one of the at least two second encoding prediction blocks. Alternatively, when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, a lower left block is obtained within the predicted reference picture block. The lower left block is one of the at least two second encoding prediction blocks.

[0135] That is, the second encoding prediction blocks at four positions are first obtained, and then one of the upper left block, the upper right block, the lower right block, and the lower left block is obtained based on the four second encoding prediction blocks. In this case, only the second encoding prediction blocks at five positions need to be obtained in total.

[0136] Both two methods in this application are based on the difference corresponding to the base block and the difference corresponding to the blocks around the base block. Once it is found that the difference corresponding to the block in one direction is smaller than the difference corresponding to the block in the other direction, or the difference corresponding to the block in one direction is smaller than the difference corresponding to the base block in two opposite directions, the second encoding prediction block in the other direction, or even in the corner direction, may not need to be obtained. In this way, the quantity of the second encoding prediction block obtained is certainly less than the nine second encoding prediction blocks in the prior art. Moreover, the reduction in the quantity of the second encoding prediction block means that the calculation amount and complexity of the subsequent pixel sampling and difference calculation are reduced.

[0137] In one possible implementation, based on the above-mentioned second method, it is set that the difference corresponding to a total of five second encoding prediction blocks in the upper direction, the lower direction, the left direction, the right direction and the diagonal direction is compared with the difference corresponding to the base block. The second encoding prediction block corresponding to the smallest difference is selected as a candidate prediction block, and a total of eight new second encoding prediction blocks in the upper, lower, left and right directions and four diagonal directions of the candidate prediction block are selected. Since some of the eight new second encoding prediction blocks are the original second encoding prediction blocks and the base block, and difference calculation is performed for these second encoding prediction blocks (as shown in FIG. 9, the new second encoding prediction block in the right direction and the new second encoding prediction block in the lower direction are the original second encoding prediction block, and the new second encoding prediction block in the lower right diagonal direction is the original base block), difference calculation is only performed for the new second encoding prediction blocks that have not undergone difference calculation, and only the difference corresponding to these new second encoding prediction blocks is compared with the difference corresponding to the candidate prediction block.

[0138] In one possible implementation, the differences corresponding to the four second encoding prediction blocks in the above, below, left, and right directions are compared with the differences corresponding to the base block, and when they are all greater than or equal to the differences corresponding to the base block, the base block is selected as the prediction block, and the motion vector corresponding to the base block is used as the target motion vector.

[0139] Furthermore, as described above, in existing DMVR technology, after at least one second encoding predictive block is obtained in step 3 of the inter-prediction picture encoding method, even if the predictive motion vector corresponding to the base block represents a pixel, if the motion search precision is not integer pixel, for example, 1 / 2 pixel precision, 1 / 4 pixel precision, or 1 / 8 pixel precision, the predictive motion vector corresponding to the second encoding predictive block after shifting may indicate a non-pixel point.

[0140] In this application, the predicted motion vectors that correspond to at least two second decoding prediction blocks are rounded up or down to correspond to the pixel position.In this way, the interpolation calculation is omitted, and the calculation amount and complexity are reduced.

[0141] Step 304: Perform down-sampling on the first encoding predictive block to obtain a first sampled pixel array, and perform down-sampling on at least two second encoding predictive blocks to obtain at least two second sampled pixel arrays.

[0142] As mentioned above, in step 4 of the inter-prediction picture encoding method in the existing DMVR technology, the sum of the absolute value of the pixel difference between all pixels in the first encoding predictive block and all pixels in each second encoding predictive block can be used as the difference between two picture blocks, or the sum of the squares of the pixel difference between all pixels in the first encoding predictive block and all pixels in each second encoding predictive block can be used as the difference between two picture blocks. In this case, the amount of calculation required is quite large.

[0143] Due to the image association contained in a picture, the pixel values ​​of two adjacent pixels in a picture are not significantly different, and in particular, sudden changes in pixel values ​​rarely occur.Therefore, in this application, all pixels in a picture block are sampled, that is, only some pixels are selected from all pixels, for example, pixels in every other row are obtained, or pixels in every other column are obtained, or pixels in every other row and every other column are obtained.This is not specifically limited.It is only required that the same sampling rule is used for the first encoding prediction block and each second encoding prediction block.In this way, the number of pixels to be calculated is reduced, and the corresponding amount of calculation is greatly reduced.

[0144] Step 305: Calculate the difference between each of the first sampling pixel array and the second sampling pixel array, and use the motion vector between the block to be encoded and the second encoding prediction block corresponding to the second sampling pixel array having the smallest difference as the target prediction motion vector of the block to be encoded.

[0145] Since the pixels in the first encoding prediction block and each second encoding prediction block are sampled, to calculate the difference between two picture blocks, the sum of absolute values ​​of pixel differences of pixels at corresponding positions in the first sampling pixel array and each second sampling pixel array may be calculated, and the sum of absolute values ​​of pixel differences is used as the difference between the first encoding prediction block and each second encoding prediction block; alternatively, the sum of squares of pixel differences of pixels at corresponding positions in the first sampling pixel array and each second sampling pixel array may be calculated, and the sum of squares of pixel differences is used as the difference between the first encoding prediction block and each second encoding prediction block. That is, the calculation for all pixels in the two picture blocks is changed to the calculation for some pixels in the two picture blocks, and the amount of calculation is greatly reduced.

[0146] Step 306: obtain a current encoding prediction block of the block to be encoded according to the current predicted motion vector, and encode the block to be encoded according to the current encoding prediction block.

[0147] As mentioned above, in step 5 and step 6 of the inter-prediction picture encoding method in the existing DMVR technology, motion search is performed in two main directions, i.e., forward direction and backward direction, and two target prediction motion vectors are obtained in forward direction and backward direction respectively. The same calculation process needs to be performed twice, and the amount of calculation is certainly large.

[0148] In the present application, after forward motion search is completed, a symmetric backward target prediction motion vector can be obtained based on the forward target prediction motion vector obtained through forward motion search, that is, the backward target encoding prediction block is obtained in the backward direction by using the same value as the forward target prediction motion vector.In this way, the existing target prediction motion vector is directly used in the backward direction, so that a large amount of repeated calculation is not required, and the amount of calculation is reduced.

[0149] In the present application, the number of second encoding prediction blocks obtained by performing motion search on the predicted reference picture block is reduced, and pixels in the picture block are sampled, thereby reducing the calculation amount of difference comparison and improving picture encoding efficiency.

[0150] 4 is a flowchart of an embodiment 2 of a picture encoding method for a video sequence according to the present application. As shown in FIG. 4, the method in this embodiment may include the following steps:

[0151] Step 401: Determine motion information of a block to be encoded, where the motion information includes a predicted motion vector and reference picture information, where the reference picture information is used to identify a predicted reference picture block.

[0152] The principle of step 401 in this application is similar to that of step 301, and the details will not be described again here.

[0153] Step 402: Obtain a base block, an upper block, a lower block, a left block, and a right block in a prediction reference picture block.

[0154] Step 403: If the differences corresponding to the top block, the bottom block, the left block and the right block are all greater than the difference corresponding to the base block, only the base block is retained.

[0155] Step 404: Use the motion vector between the base block and the block to be encoded as the target predicted motion vector of the block to be encoded.

[0156] This application is based on the assumption that at least two second encoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block. The base block, the upper block, the lower block, the left block, and the right block are first obtained, and then the difference corresponding to the other blocks is compared with the difference corresponding to the base block. When the difference corresponding to the upper block, the lower block, the left block, and the right block, respectively, are all larger than the difference corresponding to the base block, only the base block is kept. That is, the target predicted motion vector finally used for the block to be encoded can be directly determined by only obtaining the second encoding prediction blocks at five positions. Once it is found that the difference corresponding to the upper block, the lower block, the left block, and the right block, respectively, are all larger than the difference corresponding to the base block, it indicates that none of the second encoding prediction blocks at the offset position is closer to the block to be encoded than the base block. Therefore, the motion vector between the base block and the block to be encoded is directly used as the target predicted motion vector of the block to be encoded.

[0157] Step 405: obtain a current encoding prediction block of the block to be encoded according to the current predicted motion vector, and encode the block to be encoded according to the current encoding prediction block.

[0158] The principle of step 405 in this application is similar to that of step 306, and the details will not be described again here.

[0159] In the present application, the number of second encoding prediction blocks obtained by performing motion search on the predicted reference picture blocks is reduced, thereby reducing the calculation amount of difference comparison and improving picture encoding efficiency.

[0160] Figure 5 is a schematic structural diagram of an embodiment of a picture decoding device for video sequence according to the present application. As shown in Figure 5, the device in this embodiment may include a determination module 11, a processing module 12 and a decoding module 13. The determination module 11 is configured to determine the motion information of the block to be decoded, the motion information includes a predicted motion vector and reference picture information, and the reference picture information is used to identify a predicted reference picture block. The processing module 12 is configured to obtain a first decoding prediction block of the block to be decoded based on the motion information, perform a motion search with a first accuracy in the predicted reference picture block to obtain at least two second decoding prediction blocks, where a search position of the motion search is determined based on the predicted motion vector and the first accuracy, perform downsampling on the first decoding prediction block to obtain a first sampling pixel array, perform downsampling on the at least two second decoding prediction blocks to obtain at least two second sampling pixel arrays, calculate a difference between each of the first sampling pixel array and the second sampling pixel array, and use the motion vector between the block to be decoded and the second decoding prediction block corresponding to the second sampling pixel array having the smallest difference as a target predicted motion vector of the block to be decoded. The decoding module 13 is configured to obtain a target decoding prediction block of the block to be decoded based on the target predicted motion vector, and decode the block to be decoded based on the target decoding prediction block.

[0161] Based on the aforementioned technical solution, the processing module 12 is specifically configured to calculate a sum of absolute values ​​of pixel differences of pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array, and use the sum of absolute values ​​of pixel differences as the difference, or calculate a sum of squares of pixel differences of pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array, and use the sum of squares of pixel differences as the difference.

[0162] Based on the above technical solution, the at least two second decoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block; and the processing module 12 specifically excludes the lower block from the at least two second decoding prediction blocks when a difference corresponding to the upper block is smaller than a difference corresponding to the base block, where the base block is obtained in the prediction reference picture block according to a prediction motion vector, the upper block is obtained in the prediction reference picture block according to a first prediction vector, and the position indicated by the first prediction vector is obtained by shifting the position indicated by the prediction motion vector up by a target offset, and the lower block is obtained in the prediction reference picture block according to a second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset, and the target offset is determined according to a first accuracy; or excluding the top block from the at least two second decoding prediction blocks when a difference corresponding to the bottom block is smaller than a difference corresponding to the base block; or excluding the right block from the at least two second decoding prediction blocks when a difference corresponding to the left block is smaller than a difference corresponding to the base block, wherein the left block is obtained within the predicted reference picture block based on a third prediction vector, and a position indicated by the third prediction vector is obtained by shifting a position indicated by the predicted motion vector to the left by a target offset, and the right block is obtained within the predicted reference picture block based on a fourth prediction vector, and a position indicated by the fourth prediction vector is obtained by shifting a position indicated by the predicted motion vector to the right by a target offset; or excluding the left block from the at least two second decoding prediction blocks when a difference corresponding to the right block is smaller than a difference corresponding to the base block.

[0163] Based on the above technical solution, the processing module 12 further includes: when the lower block and the right block are excluded, obtain an upper-left block in the predicted reference picture block according to a fifth prediction vector, where the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the predicted motion vector left by a target offset and up by a target offset, and the upper-left block is one of the at least two second decoding prediction blocks; when the lower block and the left block are excluded, obtain an upper-right block in the predicted reference picture block according to a sixth prediction vector, where the position indicated by the sixth prediction vector is obtained by shifting the position indicated by the predicted motion vector right by a target offset and up by a target offset, and the upper-right block is one of the at least two second decoding prediction blocks. and when the top block and the left block are excluded, obtaining a bottom-right block in the predicted reference picture block based on a seventh prediction vector, where the position indicated by the seventh prediction vector is obtained by shifting a position indicated by the predicted motion vector to the right by a target offset and down by the target offset, and the bottom-right block is one of the at least two second decoding prediction blocks; or, when the top block and the right block are excluded, obtaining a bottom-left block in the predicted reference picture block based on an eighth prediction vector, where the position indicated by the eighth prediction vector is obtained by shifting a position indicated by the predicted motion vector to the left by a target offset and down by the target offset, and the bottom-left block is one of the at least two second decoding prediction blocks.

[0164] Based on the above technical solution, the at least two second decoding prediction blocks include an upper block, a lower block, a left block, and a right block. The processing module 12 specifically: when the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, obtain an upper-left block in the prediction reference picture block according to a fifth prediction vector, and the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the prediction motion vector left by a target offset and up by a target offset, the upper-left block is one of the at least two second decoding prediction blocks, the upper block is obtained in the prediction reference picture block according to a first prediction vector, and the position indicated by the first prediction vector is obtained by shifting the position indicated by the prediction motion vector up by a target offset, the lower block is obtained in the prediction reference picture block according to a second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset, and the left block is obtained in the prediction reference picture block according to a second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset, and the left block is obtained in the prediction reference picture block according to a third prediction vector. a third prediction vector in the predicted reference picture block, the position indicated by the third prediction vector being obtained by shifting the position indicated by the predicted motion vector to the left by a target offset; a right block in the predicted reference picture block, the position indicated by the fourth prediction vector being obtained by shifting the position indicated by the predicted motion vector to the right by a target offset, the target offset being determined based on the first accuracy; or a sixth prediction vector in the predicted reference picture block, when the difference corresponding to the top block is smaller than the difference corresponding to the bottom block and the difference corresponding to the right block is smaller than the difference corresponding to the left block, the sixth prediction vector being obtained by shifting the position indicated by the sixth prediction vector to the right by a target offset and to the up by a target offset, the top right block being one of the at least two second decoding prediction blocks; orWhen the difference corresponding to the lower block is smaller than the difference corresponding to the upper block and the difference corresponding to the right block is smaller than the difference corresponding to the left block, obtain a lower-right block in the predicted reference picture block based on a seventh prediction vector, where the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predicted motion vector to the right by a target offset and down by a target offset, and the lower-right block is one of at least two second decoding prediction blocks; or when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block and the difference corresponding to the left block is smaller than the difference corresponding to the right block, obtain a lower-left block in the predicted reference picture block based on an eighth prediction vector, where the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predicted motion vector to the left by a target offset and down by a target offset, and the lower-left block is one of at least two second decoding prediction blocks.

[0165] Based on the foregoing technical solutions, the processing module 12 is further configured to round the motion vector upwards or downwards.

[0166] Based on the foregoing technical solution, the processing module 12 is further configured to round up or down the predicted motion vectors respectively corresponding to the at least two second decoding prediction blocks.

[0167] The device in this embodiment can be configured to implement the technical solutions in the method embodiments shown in Fig. 1 or Fig. 2. The implementation principles and their technical effects are similar. The details are not described again here.

[0168] Figure 6 is a schematic structural diagram of an embodiment of a picture encoding device for video sequence according to the present application. As shown in Figure 6, the device in this embodiment may include a determination module 21, a processing module 22, and an encoding module 23. The determination module 21 is configured to determine motion information of a block to be encoded, the motion information including a predicted motion vector and reference picture information, and the reference picture information is used to identify a predicted reference picture block. The processing module 22 is configured to obtain a first encoding prediction block of the block to be encoded based on the motion information, perform a motion search with a first accuracy in the predicted reference picture block to obtain at least two second encoding prediction blocks, where a search position of the motion search is determined based on the predicted motion vector and the first accuracy, perform downsampling on the first encoding prediction block to obtain a first sampling pixel array, perform downsampling on the at least two second encoding prediction blocks to obtain at least two second sampling pixel arrays, calculate a difference between each of the first sampling pixel array and the second sampling pixel array, and use the motion vector between the block to be encoded and the second encoding prediction block corresponding to the second sampling pixel array having the smallest difference as a target predicted motion vector of the block to be encoded. The encoding module 23 is configured to obtain a target encoding prediction block of the block to be encoded based on the target predicted motion vector, and encode the block to be encoded based on the target encoding prediction block.

[0169] Based on the aforementioned technical solution, the processing module 22 is specifically configured to calculate a sum of absolute values ​​of pixel differences of pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array, and use the sum of absolute values ​​of pixel differences as the difference, or calculate a sum of squares of pixel differences of pixels at corresponding positions in each of the first sampling pixel array and the second sampling pixel array, and use the sum of squares of pixel differences as the difference.

[0170] Based on the above technical solution, the at least two second encoding prediction blocks include a base block, an upper block, a lower block, a left block, and a right block; and the processing module 22 specifically excludes the lower block from the at least two second encoding prediction blocks when a difference corresponding to the upper block is smaller than a difference corresponding to the base block, where the base block is obtained in the predicted reference picture block according to a predicted motion vector, the upper block is obtained in the predicted reference picture block according to a first predicted vector, and the position indicated by the first predicted vector is obtained by shifting the position indicated by the predicted motion vector up by a target offset, and the lower block is obtained in the predicted reference picture block according to a second predicted vector, and the position indicated by the second predicted vector is obtained by shifting the position indicated by the predicted motion vector down by a target offset, and the target offset is determined based on a first accuracy; or excluding the top block from the at least two second encoding predictive blocks when a difference corresponding to the bottom block is smaller than a difference corresponding to the base block; or excluding the right block from the at least two second encoding predictive blocks when a difference corresponding to the left block is smaller than a difference corresponding to the base block, wherein the left block is obtained within the predicted reference picture block based on a third prediction vector, and a position indicated by the third prediction vector is obtained by shifting a position indicated by the predictive motion vector to the left by a target offset, and the right block is obtained within the predicted reference picture block based on a fourth prediction vector, and a position indicated by the fourth prediction vector is obtained by shifting a position indicated by the predictive motion vector to the right by a target offset; or excluding the left block from the at least two second encoding predictive blocks when a difference corresponding to the right block is smaller than a difference corresponding to the base block.

[0171] Based on the above technical solution, the processing module 22 further includes: when the lower block and the right block are excluded, obtain an upper-left block in the predicted reference picture block according to a fifth prediction vector, where the position indicated by the fifth prediction vector is obtained by shifting a position indicated by the predicted motion vector left by a target offset and up by a target offset, and the upper-left block is one of the at least two second encoding prediction blocks; when the lower block and the left block are excluded, obtain an upper-right block in the predicted reference picture block according to a sixth prediction vector, where the position indicated by the sixth prediction vector is obtained by shifting a position indicated by the predicted motion vector right by a target offset and up by a target offset, and the upper-right block is one of the at least two second encoding prediction blocks. and when the top block and the left block are excluded, obtaining a bottom-right block in the predicted reference picture block based on a seventh prediction vector, where the position indicated by the seventh prediction vector is obtained by shifting a position indicated by the predicted motion vector to the right by a target offset and down by the target offset, and the bottom-right block is one of the at least two second encoding prediction blocks; or, when the top block and the right block are excluded, obtaining a bottom-left block in the predicted reference picture block based on an eighth prediction vector, where the position indicated by the eighth prediction vector is obtained by shifting a position indicated by the predicted motion vector to the left by a target offset and down by the target offset, and the bottom-left block is one of the at least two second encoding prediction blocks.

[0172] Based on the above technical solution, the at least two second encoding prediction blocks include an upper block, a lower block, a left block, and a right block. The processing module 22 specifically: when the difference corresponding to the upper block is smaller than the difference corresponding to the lower block, and the difference corresponding to the left block is smaller than the difference corresponding to the right block, obtain an upper-left block in the prediction reference picture block according to a fifth prediction vector, and the position indicated by the fifth prediction vector is obtained by shifting the position indicated by the prediction motion vector left by a target offset and up by a target offset, the upper-left block is one of the at least two second encoding prediction blocks, the upper block is obtained in the prediction reference picture block according to a first prediction vector, and the position indicated by the first prediction vector is obtained by shifting the position indicated by the prediction motion vector up by a target offset, the lower block is obtained in the prediction reference picture block according to a second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset, and the left block is obtained in the prediction reference picture block according to a second prediction vector, and the position indicated by the second prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset, and the left block is obtained in the prediction reference picture block according to a third prediction vector, and the position indicated by the third prediction vector is obtained by shifting the position indicated by the prediction motion vector down by a target offset. a third prediction vector in the predicted reference picture block, the position indicated by the third prediction vector being obtained by shifting the position indicated by the predicted motion vector to the left by a target offset; and a right block in the predicted reference picture block, the position indicated by the fourth prediction vector being obtained by shifting the position indicated by the predicted motion vector to the right by a target offset, the target offset being determined based on the first precision; or, when the difference corresponding to the top block is smaller than the difference corresponding to the bottom block and the difference corresponding to the right block is smaller than the difference corresponding to the left block, obtaining a top right block in the predicted reference picture block based on a sixth prediction vector, the position indicated by the sixth prediction vector being obtained by shifting the position indicated in the predicted motion vector to the right by a target offset and up by a target offset, the top right block being one of the at least two second encoding prediction blocks; orWhen the difference corresponding to the lower block is smaller than the difference corresponding to the upper block and the difference corresponding to the right block is smaller than the difference corresponding to the left block, obtaining a lower-right block in the predicted reference picture block based on a seventh prediction vector, where the position indicated by the seventh prediction vector is obtained by shifting the position indicated by the predictive motion vector to the right by a target offset and down by the target offset, and the lower-right block is one of the at least two second encoding prediction blocks; or when the difference corresponding to the lower block is smaller than the difference corresponding to the upper block and the difference corresponding to the left block is smaller than the difference corresponding to the right block, obtaining a lower-left block in the predicted reference picture block based on an eighth prediction vector, where the position indicated by the eighth prediction vector is obtained by shifting the position indicated by the predictive motion vector to the left by a target offset and down by the target offset, and the lower-left block is one of the at least two second encoding prediction blocks.

[0173] Based on the foregoing technical solutions, the processing module 22 is further configured to round the motion vector upwards or downwards.

[0174] Based on the foregoing technical solution, the processing module 22 is further configured to round up or down the predicted motion vectors respectively corresponding to the at least two second encoding predictive blocks.

[0175] The device in this embodiment can be configured to implement the technical solutions in the method embodiments shown in Fig. 3 or Fig. 4. The implementation principles and their technical effects are similar. The details are not described again here.

[0176] Fig. 7 is a schematic structural diagram of an embodiment of a codec device according to the present application. Fig. 8 is a schematic structural diagram of an embodiment of a codec system according to the present application. The units in Fig. 7 and Fig. 8 are described below.

[0177] Codec device 30 may be, for example, a mobile terminal or user equipment in a wireless communication system. It should be understood that embodiments of the present application may be implemented in any electronic device or apparatus that may need to encode and decode or encode video pictures.

[0178] The codec device 30 may include a housing that contains and protects the device. The codec device 30 may further include a display 31 in the form of a liquid crystal display. In another embodiment of the present application, the display 31 may use any suitable display technology suitable for displaying pictures or video. The codec device 30 may further include a keypad 32. In another embodiment of the present application, any suitable data or user interface mechanism may be used. For example, the user interface may be implemented as a virtual keyboard, or a data recording system may be implemented as part of a touch-sensitive display. The codec device 30 may further include a microphone 33 or any suitable audio input, which may be a digital or analog signal input. The codec device 30 may further include the following audio output devices, which in this embodiment of the present application may be any one of an earphone 34, a loudspeaker, an analog audio output connection, or a digital audio output connection. The codec device 30 may further include a battery. In another embodiment of the present application, the codec device 30 may be powered by any suitable mobile energy device, such as a solar cell, a fuel cell, or a clock mechanism generator. The codec device 30 may further include an infrared port 35 used for short-range line-of-sight communication with another device. In other embodiments, the codec device 30 may further include any suitable short-range communication solution, such as a Bluetooth wireless connection or a USB / live line wired connection.

[0179] The codec device 30 may include a controller 36, or a controller configured to control the codec device 30. The controller 36 may be connected to a memory 37. In this embodiment of the application, the memory 37 may store data in the form of images and data in the form of audio and / or may store instructions to be performed by the controller 36. The controller 36 may further be connected to a codec 38 suitable for performing encoding and decoding of audio and / or video data or for assisted encoding and decoding performed by the controller 36.

[0180] The codec device 30 may further include a card reader 39 and a smart card 40 configured to provide user information and suitable for providing information used for network authentication and authorized user authentication.

[0181] The codec device 30 may further include a wireless interface 41. The wireless interface 41 is connected to the controller and is suitable for generating wireless communication signals used for communication with, for example, a cellular communication network, a wireless communication system, or a wireless local area network. The codec device 30 may further include an antenna 42. The antenna is connected to the wireless interface 41 and configured to transmit radio frequency signals generated in the wireless interface 41 to another device (or devices) and to receive radio frequency signals from the other device (or devices).

[0182] In some embodiments of the present application, codec device 30 includes a camera that can record or detect single frames, and codec 38 or a controller receives and processes these single frames. In some embodiments of the present application, the apparatus may receive video picture data to be processed from another device before transmission and / or storage. In some embodiments of the present application, codec device 30 may receive pictures to be encoded / decoded over a wireless or wired connection.

[0183] The codec system 50 includes a picture encoding device 51 and a picture decoding device 52. The picture encoding device 51 generates encoded video data. Thus, the picture encoding device 51 may be referred to as an encoding device. The picture decoding device 52 can decode the encoded video data generated by the picture encoding device 51. Thus, the picture decoding device 52 may be referred to as a decoding device. The picture encoding device 51 and the picture decoding device 52 may be examples of codec devices. The picture encoding device 51 and the picture decoding device 52 may include a wide range of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld phones such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or other similar devices.

[0184] Picture decoding device 52 may receive encoded video data from picture encoding device 51 through channel 53. Channel 53 may include one or more media and / or devices capable of moving encoded video data from picture encoding device 51 to picture decoding device 52. In one example, channel 53 may include one or more communication media capable of enabling picture encoding device 51 to transmit encoded video data directly to picture decoding device 52 in real time. In this example, picture encoding device 51 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to picture decoding device 52. The one or more communication media may include wireless and / or wired communication media, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network (e.g., a local area network, a wide area network, or a global network (e.g., the Internet)). The one or more communication mediums may include routers, switches, base stations, or other devices that facilitate communication from picture encoding device 51 to picture decoding device 52.

[0185] In another example, channel 53 may include a storage medium that stores the encoded video data generated by picture encoding device 51. In this example, picture decoding device 52 may access the storage medium through disk access or card access. The storage medium may include multiple locally accessible data storage media, such as Blu-ray, DVD, CD-ROM, flash memory, or other suitable digital storage media configured to store encoded video data.

[0186] In another example, the channel 53 may include a file server or other intermediate storage device that stores the encoded video data generated by the picture encoding device 51. In this example, the picture decoding device 52 may access the encoded video data stored in the file server or other intermediate storage device through streaming transmission or download. The file server may be a type of server that stores the encoded video data and can transmit the encoded video data to the picture decoding device 52. For example, file servers include web servers (e.g., used for websites), file transfer protocol (FTP) servers, network attached storage (NAS) devices, and local disk drives.

[0187] The picture decoding device 52 can access the encoded video data through a standard data connection (e.g., an Internet connection). Exemplary types of data connections include wireless channels (e.g., a Wi-Fi connection), wired connections (e.g., DSL or cable modem), or combinations thereof suitable for accessing encoded video data stored on a file server. The transmission of the encoded video data from the file server may be a streaming transmission, a download transmission, or a combination thereof.

[0188] The technology of the present application is not limited to wireless application scenarios. For example, the technology may be applied to video encoding and decoding in multiple multimedia applications supporting the following applications: over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming transmission video transmission (e.g., over the Internet), encoding of video data stored on a data storage medium, decoding of video data stored on a data storage medium, or other applications. In some examples, the codec system 50 may be configured to support unidirectional or bidirectional video transmission to support applications such as streaming video transmission, video playback, video broadcasting, and / or video telephony.

[0189] 8, picture encoding device 51 includes a video source 54, a video encoder 55, and an output interface 56. In some examples, output interface 56 may include a modulator / demodulator (modem) and / or a transmitter. Video source 54 may include a video capture device (e.g., a video camera), a video archive containing pre-captured video data, a video input interface configured to receive video data from a video content provider, and / or a computer graphics system configured to generate video data, or a combination of the aforementioned video data sources.

[0190] Video encoder 55 may encode video data from video source 54. In some examples, picture encoding device 51 transmits the encoded video data directly to picture decoding device 52 through output interface 56. The encoded video data may further be stored in a storage medium or a file server, so that picture decoding device 52 can later access the encoded video data for decoding and / or playback.

[0191] In the example of FIG. 8, picture decoding device 52 includes an input interface 57, a video decoder 58, and a display device 59. In some examples, input interface 57 includes a receiver and / or a modem. Input interface 57 can receive encoded video data over channel 53. Display device 59 may be integrated with picture decoding device 52 or may be external to picture decoding device 52. Typically, display device 59 displays the decoded video data. Display device 59 may include multiple types of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.

[0192] Video encoder 55 and video decoder 58 may operate according to a video compression standard (e.g., the High Efficiency Video Coding H.265 standard) and may follow the HEVC Test Model (HM). The text description of the H.265 standard ITU-TH.265(V3)(04 / 2015) was released on April 29, 2015 and is available for download at http: / / handle.itu.int / 11.1002 / 1000 / 12455. This file is incorporated by reference in its entirety.

[0193] Alternatively, the video encoder 55 and the video decoder 59 may perform operations in accordance with other proprietary or industry standards, including ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual, ITU-T H.264 (also referred to as ISO / IEC MPEG-4 AVC), including scalable video coding (SVC) extensions and multi-view video coding (MVC). It should be understood that the technology of the present application is not limited to any particular encoding / decoding standard or technology.

[0194] Furthermore, FIG. 8 is merely an example, and the techniques of the present application may be applied to video encoding / decoding applications (e.g., one-sided video encoding or one-sided video decoding) that do not necessarily include any data communication between the encoding device and the decoding device. In another example, data is retrieved from a local memory, data is transmitted through streaming by using a network, or data is manipulated in a similar manner. An encoding device may encode data and store the data in a memory, and / or a decoding device may retrieve data from a memory and decode the data. In many examples, encoding and decoding are performed by multiple devices that do not communicate with each other and only encode data to a memory and / or retrieve data from a memory and decode the data.

[0195] The video encoder 55 and the video decoder 59 may each be implemented as any one of a number of suitable circuits, such as one or more microcontroller units, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the techniques are implemented partially or fully using software, the device may store instructions of the software in a suitable non-transitory computer-readable storage medium, and one or more processors may be used to execute the instructions in the hardware to perform the techniques of the present application. Any one of the aforementioned items (including hardware, software, a combination of hardware and software, etc.) may be considered as one or more controllers. The video encoder 55 and the video decoder 59 may each be included in one or more encoders or decoders, and each may be integrated as part of a combined encoder / decoder (CODEC) of another device.

[0196] The application may generally refer to certain information being "signaled" by video encoder 55 to another device (e.g., video decoder 59). The term "signaled" may generally refer to syntax elements and / or to the transfer of encoded video data. The transfer may occur in real-time or near real-time. Alternatively, the communication may occur over a time span, such as when the syntax elements are stored on a computer-readable storage medium during encoding or by using binary data obtained after encoding. A decoding device may retrieve the syntax elements at any time after they are stored on the medium.

[0197] In one possible implementation, the present application provides a computer-readable storage medium that stores instructions that, when executed on a computer, configure the computer to perform the method in any of the embodiments shown in Figures 1-4.

[0198] In one possible implementation, the present application provides a computer program, which, when executed by a computer, configures the computer to perform the method in any of the embodiments shown in Figures 1 to 4.

[0199] Those skilled in the art may understand that all or part of the steps in the above-mentioned method embodiments may be implemented by program instructions to relevant hardware. The program may be stored in a computer-readable storage medium. When the program is executed, the steps in the above-mentioned method embodiments are performed. The above-mentioned storage medium includes any medium that can store program code, such as a ROM, a RAM, a magnetic disk, or an optical disk.

[0200] Finally, it should be noted that the above embodiments are only intended to describe the technical solutions of the present application, rather than limiting the present application. Although the present application has been described in detail with reference to the above embodiments, it should be understood that those skilled in the art may still make modifications to the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features thereof, without departing from the scope of the technical solutions of the embodiments of the present application.

Claims

1. 1. A picture decoding method for a video sequence, comprising: determining motion information of a block to be decoded, the motion information comprising a predictive motion vector and a predictive reference picture, the predictive motion vector comprising a first base predictive motion vector and a second base predictive motion vector, and the predictive reference picture comprising a first predictive reference picture and a second predictive reference picture; obtaining at least two first decoding prediction blocks of the block to be decoded by searching blocks around a block pointed to by the first base prediction motion vector in the first prediction reference picture; obtaining at least two second decoding prediction blocks of the block to be decoded in the second predicted reference picture, the at least two first decoding prediction blocks having a one-to-one correspondence with the at least two second decoding prediction blocks; performing downsampling on the at least two first decoding prediction blocks; performing downsampling on the at least two second decoding prediction blocks; calculating at least two differences between the at least two downsampled first decoding prediction blocks and the corresponding at least two downsampled second decoding prediction blocks; determining a first candidate motion vector predictor based on a minimum difference of the at least two differences; deriving a second target predictor motion vector based on the first target predictor motion vector; obtaining a first target decoding prediction block of the block to be decoded according to the first target prediction motion vector; obtaining a second target decoding prediction block of the block to be decoded according to the second target prediction motion vector; decoding the block to be decoded based on the first target decoding prediction block and the second target decoding prediction block; The method includes:

2. the first target predictor motion vector is a forward target predictor motion vector and the second target predictor motion vector is a backward target predictor motion vector; or The method of claim 1 , wherein the first target predictor motion vector is a backward target predictor motion vector and the second target predictor motion vector is a forward target predictor motion vector.

3. determining the first target motion vector predictor based on a minimum difference of the at least two differences, determining a first offset motion vector for the first target motion vector predictor based on the minimum difference; determining the first target motion vector predictor based on the first offset motion vector and the first base motion vector predictor; The method of claim 1 or 2, comprising:

4. Deriving a second target motion vector predictor based on the first target motion vector predictor includes: deriving a second offset motion vector of the second target predicted motion vector based on the first offset motion vector; determining the second target motion vector predictor based on the second offset motion vector and the second base motion vector predictor; The method of claim 3 , comprising:

5. The difference between the downsampled first decoding prediction block and the downsampled second decoding prediction block comprises a sum of absolute pixel differences of pixels at corresponding positions in the downsampled first decoding prediction block and the downsampled second decoding prediction block, or 5. The method according to claim 1, wherein the difference between the downsampled first decoding prediction block and the downsampled second decoding prediction block comprises a sum of squared pixel differences of pixels at corresponding positions in the downsampled first decoding prediction block and the downsampled second decoding prediction block.

6. After determining the motion information of the block to be decoded, the method comprises: rounding the predicted motion vector upwards or downwards. The method of any one of claims 1 to 5, further comprising:

7. The method comprises: rounding upward or downward the predicted motion vectors corresponding to the at least two second decoded predicted blocks; The method of any one of claims 1 to 6, further comprising:

8. A picture decoding apparatus for a video sequence, comprising: a determining module configured to determine motion information of a block to be decoded, the motion information including a predictive motion vector and a predictive reference picture, the predictive motion vector including a first base predictive motion vector and a second base predictive motion vector, and the predictive reference picture including a first predictive reference picture and a second predictive reference picture; a processing module configured to: obtain at least two first decoding prediction blocks of the block to be decoded by searching blocks around a block pointed to by the first base predictive motion vector in the first predictive reference picture; obtain at least two second decoding prediction blocks of the block to be decoded in the second predictive reference picture, the at least two first decoding prediction blocks being in one-to-one correspondence with the at least two second decoding prediction blocks; perform downsampling on the at least two first decoding prediction blocks; perform downsampling on the at least two second decoding prediction blocks; calculate at least two differences between the at least two downsampled first decoding prediction blocks and the corresponding at least two downsampled second decoding prediction blocks, determine a first target predictive motion vector based on a minimum difference of the at least two differences, and derive a second target predictive motion vector based on the first target predictive motion vector; a decoding module configured to obtain a first target decoding prediction block of the block to be decoded based on the first target prediction motion vector, obtain a second target decoding prediction block of the block to be decoded based on the second target prediction motion vector, and decode the block to be decoded based on the first target decoding prediction block and the second target decoding prediction block; An apparatus comprising:

9. the first target predictor motion vector is a forward target predictor motion vector and the second target predictor motion vector is a backward target predictor motion vector; or The apparatus of claim 8 , wherein the first target predictor motion vector is a backward target predictor motion vector and the second target predictor motion vector is a forward target predictor motion vector.

10. The processing module further comprises: determining a first offset motion vector for the first target predicted motion vector based on the minimum difference; determining the first target predicted motion vector based on the first offset motion vector and the first base predicted motion vector; 10. The apparatus according to claim 8 or 9, configured to:

11. The processing module further comprises: deriving a second offset motion vector of the second target predicted motion vector based on the first offset motion vector; determining the second target predicted motion vector based on the second offset motion vector and the second base predicted motion vector; The apparatus of claim 10 configured to:

12. The difference between the downsampled first decoding prediction block and the downsampled second decoding prediction block comprises a sum of absolute pixel differences of pixels at corresponding positions in the downsampled first decoding prediction block and the downsampled second decoding prediction block, or 12. The apparatus of claim 8, wherein the difference between the downsampled first decoding prediction block and the downsampled second decoding prediction block comprises a sum of squared pixel differences of pixels at corresponding positions in the downsampled first decoding prediction block and the downsampled second decoding prediction block.

13. The apparatus of claim 8 , wherein the processing module is further configured to round the predicted motion vector upwards or downwards.

14. The apparatus of claim 8 , wherein the processing module is further configured to round upwards or downwards predicted motion vectors corresponding respectively to the at least two second decoding prediction blocks.

15. A non-transitory computer readable recording medium having a computer program recorded thereon, the computer program causing a processor to perform a method according to any one of claims 1 to 7 when executed by the processor.

16. 1. A picture encoding method for a video sequence, comprising: determining motion information of a block to be encoded, the motion information comprising a predictive motion vector and a predictive reference picture, the predictive motion vector comprising a first base predictive motion vector and a second base predictive motion vector, and the predictive reference picture comprising a first predictive reference picture and a second predictive reference picture; obtaining at least two first encoding prediction blocks of the block to be encoded by searching in the first prediction reference picture around a block pointed to by the first base prediction motion vector; obtaining at least two second encoding predictive blocks of the block to be encoded in the second predicted reference picture, the at least two first encoding predictive blocks having a one-to-one correspondence with the at least two second encoding predictive blocks; performing downsampling on the at least two first encoding prediction blocks; performing downsampling on the at least two second encoding prediction blocks; calculating at least two differences between the at least two downsampled first encoding prediction blocks and the corresponding at least two downsampled second encoding prediction blocks; determining a first candidate motion vector predictor based on a minimum difference of the at least two differences; deriving a second target predictor motion vector based on the first target predictor motion vector; obtaining a first target encoding predictive block of the block to be encoded according to the first target predictive motion vector, and obtaining a second target encoding predictive block of the block to be encoded according to the second target predictive motion vector; encoding the block to be encoded based on the first target encoding predictive block and the second target encoding predictive block; The method includes:

17. the first target predictor motion vector is a forward target predictor motion vector and the second target predictor motion vector is a backward target predictor motion vector; or The method of claim 16 , wherein the first target predictor motion vector is a backward target predictor motion vector and the second target predictor motion vector is a forward target predictor motion vector.

18. determining the first target motion vector predictor based on a minimum difference of the at least two differences, determining a first offset motion vector for the first target motion vector predictor based on the minimum difference; determining the first target motion vector predictor based on the first offset motion vector and the first base motion vector predictor; 18. The method of claim 16 or 17, comprising:

19. Deriving a second target motion vector predictor based on the first target motion vector predictor includes: deriving a second offset motion vector of the second target predicted motion vector based on the first offset motion vector; determining the second target motion vector predictor based on the second offset motion vector and the second base motion vector predictor; 20. The method of claim 18, comprising:

20. The difference between the downsampled first encoding predictive block and the downsampled second encoding predictive block comprises a sum of absolute pixel differences of pixels at corresponding positions in the downsampled first encoding predictive block and the downsampled second encoding predictive block; or 20. The method of claim 16, wherein the difference between the downsampled first encoding predictive block and the downsampled second encoding predictive block comprises a sum of squared pixel differences of pixels at corresponding positions in the downsampled first encoding predictive block and the downsampled second encoding predictive block.

21. After determining the motion information of the block to be encoded, the method comprises: rounding the predicted motion vector upwards or downwards.

21. The method of any one of claims 16 to 20, further comprising:

22. 1. A picture encoding apparatus for a video sequence, comprising: a determining module configured to determine motion information of a block to be encoded, the motion information comprising a predictive motion vector and a predictive reference picture, the predictive motion vector comprising a first base predictive motion vector and a second base predictive motion vector, and the predictive reference picture comprising a first predictive reference picture and a second predictive reference picture; a processing module configured to obtain at least two first encoding predictive blocks of the block to be encoded by searching blocks around a block pointed to by the first base predictive motion vector in the first predictive reference picture; obtain at least two second encoding predictive blocks of the block to be encoded in the second predictive reference picture, the at least two first encoding predictive blocks being in one-to-one correspondence with the at least two second encoding predictive blocks; perform downsampling on the at least two first encoding predictive blocks; perform downsampling on the at least two second encoding predictive blocks; calculate at least two differences between the at least two downsampled first encoding predictive blocks and the corresponding at least two downsampled second encoding predictive blocks, determine a first target predictive motion vector based on a minimum difference of the at least two differences, and derive a second target predictive motion vector based on the first target predictive motion vector; an encoding module configured to obtain a first target encoding predictive block of the block to be encoded based on the first target predictive motion vector, obtain a second target encoding predictive block of the block to be encoded based on the second target predictive motion vector, and encode the block to be encoded based on the first target encoding predictive block and the second target encoding predictive block; An apparatus comprising:

23. the first target predictor motion vector is a forward target predictor motion vector and the second target predictor motion vector is a backward target predictor motion vector; or 23. The apparatus of claim 22, wherein the first target predictor motion vector is a backward target predictor motion vector and the second target predictor motion vector is a forward target predictor motion vector.

24. The processing module further comprises: determining a first offset motion vector for the first target predicted motion vector based on the minimum difference; determining the first target predicted motion vector based on the first offset motion vector and the first base predicted motion vector; 24. Apparatus according to claim 22 or 23, configured to:

25. The processing module further comprises: deriving a second offset motion vector of the second target predicted motion vector based on the first offset motion vector; determining the second target predicted motion vector based on the second offset motion vector and the second base predicted motion vector; 25. The apparatus of claim 24 configured to:

26. The difference between the downsampled first encoding predictive block and the downsampled second encoding predictive block comprises a sum of absolute pixel differences of pixels at corresponding positions in the downsampled first encoding predictive block and the downsampled second encoding predictive block; or 26. The apparatus of claim 22, wherein the difference between the downsampled first encoding predictive block and the downsampled second encoding predictive block comprises a sum of squared pixel differences of pixels at corresponding positions in the downsampled first encoding predictive block and the downsampled second encoding predictive block.

27. 27. The apparatus of claim 22, wherein the processing module is further configured to round the predicted motion vector upwards or downwards.

28. 22. A non-transitory computer readable recording medium having a computer program recorded thereon, the computer program causing a processor to perform a method according to any one of claims 16 to 21 when executed by the processor.

29. A computer program product causing a processor to carry out a method according to any one of claims 1 to 7 or any one of claims 16 to 21.