Image coding and decoding method and device for video sequence

文档序号:12621 发布日期:2021-09-17 浏览:24次 中文

阅读说明:本技术 视频序列的图像编解码方法和装置 (Image coding and decoding method and device for video sequence ) 是由 陈旭 郑建铧 于 2019-07-29 设计创作,主要内容包括:本申请提供一种视频序列的图像编解码方法和装置。本申请图像解码方法,包括:确定待解码块的运动信息;根据运动信息获取待解码块的第一解码预测块;在预测参考图像块内进行第一精度的运动搜索以获取至少两个第二解码预测块;对第一解码预测块进行下采样以获得第一采样像素点矩阵;对至少两个第二解码预测块进行下采样以获得至少两个第二采样像素点矩阵;分别计算第一采样像素点矩阵和每个第二采样像素点矩阵的差异,并将差异最小的第二采样像素点矩阵对应的运动矢量作为目标预测运动矢量;根据目标预测运动矢量获取待解码块的目标解码预测块,并根据目标解码预测块对待解码块进行解码。本申请降低了差异比较的计算量,提高图像编码效率。(The application provides a method and a device for coding and decoding images of a video sequence. The image decoding method comprises the following steps: determining motion information of a block to be decoded; acquiring a first decoding prediction block of a block to be decoded according to the motion information; performing a motion search of a first precision within the prediction reference picture block to obtain at least two second decoded prediction blocks; down-sampling the first decoded prediction block to obtain a first sampled pixel matrix; down-sampling the at least two second decoding prediction blocks to obtain at least two second sampling pixel point matrixes; calculating the difference between the first sampling pixel matrix and each second sampling pixel matrix respectively, and taking the motion vector corresponding to the second sampling pixel matrix with the minimum difference as a target prediction motion vector; and acquiring a target decoding prediction block of the block to be decoded according to the target prediction motion vector, and decoding the block to be decoded according to the target decoding prediction block. The method and the device reduce the calculated amount of difference comparison and improve the image coding efficiency.)

A method for decoding pictures of a video sequence, comprising:

determining motion information of a block to be decoded, wherein the motion information comprises a prediction motion vector and reference image information, and the reference image information is used for identifying a prediction reference image block;

acquiring a first decoding prediction block of the block to be decoded according to the motion information;

performing a motion search of a first precision within the prediction reference picture block to obtain at least two second decoded prediction blocks, the search location of the motion search being determined by the prediction motion vector and the first precision;

down-sampling the first decoded prediction block to obtain a first sampled pixel matrix;

down-sampling the at least two second decoding prediction blocks to obtain at least two second sampling pixel point matrixes;

calculating the difference between the first sampling pixel matrix and each second sampling pixel matrix respectively, and taking a motion vector between a second decoding prediction block corresponding to the second sampling pixel matrix with the minimum difference and the block to be decoded as a target prediction motion vector of the block to be decoded;

and acquiring a target decoding prediction block of the block to be decoded according to the target prediction motion vector, and decoding the block to be decoded according to the target decoding prediction block.

The method of claim 1, wherein said separately computing a difference between said first sampled pixel matrix and each of said second sampled pixel matrices comprises:

respectively calculating the sum of the absolute values of the pixel differences of the pixel points at the corresponding positions of the first sampling pixel point matrix and each second sampling pixel point matrix, and taking the sum of the absolute values of the pixel differences as the difference; alternatively, the first and second electrodes may be,

and respectively calculating the square sum of the pixel differences of the pixel points at the corresponding positions of the first sampling pixel point matrix and each second sampling pixel point matrix, and taking the square sum of the pixel differences as the difference.

The method according to claim 1 or 2, wherein said at least two second decoded prediction blocks comprise a base block, an upper block, a lower block, a left block, and a right block, and wherein said performing a motion search of a first precision within said prediction reference picture block to obtain at least two second decoded prediction blocks comprises:

excluding the lower block from the at least two second decoded prediction blocks when the difference corresponding to the upper block is smaller than the difference corresponding to the base block, wherein the base block is obtained from the predicted motion vector within the predicted reference image block, the upper block is obtained from a first predicted vector within the predicted reference image block, a position pointed to by the first predicted vector is obtained by shifting a position pointed to by the predicted motion vector upwards by a target offset, the lower block is obtained from a second predicted vector within the predicted reference image block, a position pointed to by the second predicted vector is obtained by shifting a position pointed to by the predicted motion vector downwards by the target offset, and the target offset is determined by the first precision; alternatively, the first and second electrodes may be,

excluding the upper block from the at least two second decoded prediction blocks when the difference corresponding to the lower block is less than the difference corresponding to the base block; alternatively, the first and second electrodes may be,

excluding the right block from the at least two second decoded prediction blocks when the difference corresponding to the left block is smaller than the difference corresponding to the base block, wherein the left block is obtained from a third prediction vector within the prediction reference image block, a position pointed to by the third prediction vector is obtained by shifting a position pointed to by the prediction motion vector to the left by a target offset, the right block is obtained from a fourth prediction vector within the prediction reference image block, and a position pointed to by the fourth prediction vector is obtained by shifting a position pointed to by the prediction motion vector to the right by the target offset; alternatively, the first and second electrodes may be,

excluding the left block from the at least two second decoded prediction blocks when the difference corresponding to the right block is less than the difference corresponding to the base block.

The method of claim 3, wherein performing a motion search of a first precision within the prediction reference picture block to obtain at least two second decoded prediction blocks further comprises:

obtaining, within the prediction reference picture block, an upper-left block according to a fifth prediction vector obtained by shifting a position pointed to by the prediction motion vector leftward by the target offset and upward by the target offset when the lower block and the right block are excluded, the upper-left block being one of the at least two second decoded prediction blocks;

obtaining, within the prediction reference picture block, an upper-right block according to a sixth prediction vector obtained by shifting a position pointed to by the prediction motion vector rightward by the target offset and upward by the target offset when the lower block and the left block are excluded, the upper-right block being one of the at least two second decoded prediction blocks;

obtaining a lower-right block within the prediction reference image block according to a seventh prediction vector obtained by shifting a position pointed to by the prediction motion vector rightward by the target offset and downward by the target offset when the upper block and the left block are excluded, the lower-right block being one of the at least two second decoded prediction blocks;

obtaining a lower left block within the prediction reference picture block according to an eighth prediction vector obtained by shifting a position pointed to by the prediction motion vector leftward by the target offset and downward by the target offset when the upper block and the right block are excluded, the lower left block being one of the at least two second decoded prediction blocks.

The method according to claim 1 or 2, wherein said at least two second decoded prediction blocks comprise an upper block, a lower block, a left block, and a right block, and wherein said performing a motion search of a first precision within said prediction reference picture block to obtain at least two second decoded prediction blocks comprises:

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, an upper left block is obtained in the prediction reference image block according to a fifth prediction vector, wherein the position pointed by the fifth prediction vector is obtained by shifting the position pointed by the prediction motion vector to the left by the target offset and shifting the position pointed by the target offset upwards, the upper left block is one of the at least two second decoded prediction blocks, the upper block is obtained in the prediction reference image block according to a first prediction vector, the position pointed by the first prediction vector is obtained by shifting the position pointed by the prediction motion vector upwards by the target offset, the lower block is obtained in the prediction reference image block according to a second prediction vector, and the position pointed by the second prediction vector is obtained by shifting the position pointed by the prediction motion vector downwards by the target offset Obtaining that the left block is obtained in the prediction reference image block according to a third prediction vector, the position pointed by the third prediction vector is obtained by shifting the position pointed by the prediction motion vector to the left by a target offset, the right block is obtained in the prediction reference image block according to a fourth prediction vector, the position pointed by the fourth prediction vector is obtained by shifting the position pointed by the prediction motion vector to the right by the target offset, and the target offset is determined by the first precision; alternatively, the first and second electrodes may be,

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 prediction reference image block according to a sixth prediction vector, wherein a position pointed by the sixth prediction vector is obtained by shifting a position pointed by the prediction motion vector to the right by the target offset and shifting the position pointed by the prediction motion vector to the upper right by the target offset, and the upper right block is one of the at least two second decoded prediction blocks; alternatively, the first and second electrodes may be,

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 prediction reference image block according to a seventh prediction vector, wherein a position pointed by the seventh prediction vector is obtained by shifting a position pointed by the prediction motion vector to the right by the target offset and shifting the position pointed by the prediction motion vector to the down by the target offset, and the lower right block is one of the at least two second decoded prediction blocks; alternatively, the first and second electrodes may be,

and 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 prediction reference image block according to an eighth prediction vector, wherein the position pointed by the eighth prediction vector is obtained by shifting the position pointed by the prediction motion vector leftwards by the target offset and downwards by the target offset, and the lower left block is one of the at least two second decoded prediction blocks.

The method of any of claims 1-5, wherein after determining motion information for the block to be decoded, further comprising:

rounding the motion vector down or rounding up.

The method according to any of claims 1-6, wherein said performing a motion search of a first precision within said prediction reference picture block to obtain at least two second decoded prediction blocks, further comprises:

and rounding the prediction motion vectors corresponding to the at least two second decoding prediction blocks downwards or upwards respectively.

An apparatus for decoding a video sequence, comprising:

the device comprises a determining module, a decoding module and a decoding module, wherein the determining module is used for determining motion information of a block to be decoded, the motion information comprises a prediction motion vector and reference image information, and the reference image information is used for identifying a prediction reference image block;

a processing module, configured to obtain a first decoded prediction block of the block to be decoded according to the motion information; performing a motion search of a first precision within the prediction reference picture block to obtain at least two second decoded prediction blocks, the search location of the motion search being determined by the prediction motion vector and the first precision; down-sampling the first decoded prediction block to obtain a first sampled pixel matrix; down-sampling the at least two second decoding prediction blocks to obtain at least two second sampling pixel point matrixes; calculating the difference between the first sampling pixel matrix and each second sampling pixel matrix respectively, and taking a motion vector between a second decoding prediction block corresponding to the second sampling pixel matrix with the minimum difference and the block to be decoded as a target prediction motion vector of the block to be decoded;

and the decoding module is used for acquiring a target decoding prediction block of the block to be decoded according to the target prediction motion vector and decoding the block to be decoded according to the target decoding prediction block.

The apparatus according to claim 8, wherein the processing module is specifically configured to calculate a sum of absolute values of pixel differences of pixels at corresponding positions of the first sampled-pixel-point matrix and each of the second sampled-pixel-point matrices, respectively, and use the sum of absolute values of pixel differences as the difference; or, respectively calculating the square sum of the pixel differences of the pixel points at the corresponding positions of the first sampling pixel point matrix and each second sampling pixel point matrix, and taking the square sum of the pixel differences as the difference.

The apparatus according to claim 8 or 9, wherein the at least two second decoded prediction blocks comprise a base block, an upper block, a lower block, a left block, and a right block, and wherein the processing module is specifically configured to exclude the lower block from the at least two second decoded prediction blocks when the difference corresponding to the upper block is smaller than the difference corresponding to the base block, wherein the base block is obtained from the predicted motion vector within the predicted reference picture block, wherein the upper block is obtained from a first prediction vector within the predicted reference picture block, wherein the first prediction vector points to a position that is offset upward by a target offset from a position to which the predicted motion vector points, wherein the lower block is obtained from a second prediction vector within the predicted reference picture block, wherein the second prediction vector points to a position that is offset downward by the target offset from the position to which the predicted motion vector points, the target offset is determined by the first precision; or, when the difference corresponding to the lower block is smaller than the difference corresponding to the base block, excluding the upper block from the at least two second decoded prediction blocks; or, when the difference corresponding to the left block is smaller than the difference corresponding to the base block, excluding the right block from the at least two second decoded prediction blocks, wherein the left block is obtained from a third prediction vector within the prediction reference image block, a position pointed to by the third prediction vector is obtained by shifting a position pointed to by the prediction motion vector to the left by a target offset, the right block is obtained from a fourth prediction vector within the prediction reference image block, and a position pointed to by the fourth prediction vector is obtained by shifting a position pointed to by the prediction motion vector to the right by the target offset; or, excluding the left block from the at least two second decoded prediction blocks when the difference corresponding to the right block is less than the difference corresponding to the base block.

The apparatus according to claim 10, wherein said processing module is further configured to, when said lower block and said right block are excluded, obtain an upper left block within said prediction reference picture block according to a fifth prediction vector, a position pointed to by said fifth prediction vector being obtained by shifting a position pointed to by said predicted motion vector to the left by said target offset and shifting said target offset upwards, said upper left block being one of said at least two second decoded prediction blocks; obtaining, within the prediction reference picture block, an upper-right block according to a sixth prediction vector obtained by shifting a position pointed to by the prediction motion vector rightward by the target offset and upward by the target offset when the lower block and the left block are excluded, the upper-right block being one of the at least two second decoded prediction blocks; obtaining a lower-right block within the prediction reference image block according to a seventh prediction vector obtained by shifting a position pointed to by the prediction motion vector rightward by the target offset and downward by the target offset when the upper block and the left block are excluded, the lower-right block being one of the at least two second decoded prediction blocks; obtaining a lower left block within the prediction reference picture block according to an eighth prediction vector obtained by shifting a position pointed to by the prediction motion vector leftward by the target offset and downward by the target offset when the upper block and the right block are excluded, the lower left block being one of the at least two second decoded prediction blocks.

The apparatus according to claim 8 or 9, wherein the at least two second decoded prediction blocks comprise an upper block, a lower block, a left block, and a right block, and wherein the processing module is specifically configured to obtain an upper left block within the prediction reference image block according to a fifth prediction vector obtained by shifting a position pointed to by the prediction motion vector leftward by the target offset and upward by the target offset 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 being one of the at least two second decoded prediction blocks, the upper block being obtained according to a first prediction vector within the prediction reference image block, the position pointed to by the first prediction vector being obtained by shifting a position pointed to by the prediction motion vector upward by the target offset, the lower block is obtained in the prediction reference image block according to a second prediction vector, the position pointed by the second prediction vector is obtained by downwards offsetting the target offset from the position pointed by the prediction motion vector, the left block is obtained in the prediction reference image block according to a third prediction vector, the position pointed by the third prediction vector is obtained by leftwards offsetting the target offset from the position pointed by the prediction motion vector, the right block is obtained in the prediction reference image block according to a fourth prediction vector, the position pointed by the fourth prediction vector is obtained by rightwards offsetting the target offset from the position pointed by the prediction motion vector, and the target offset is determined by the 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 within the prediction reference image block according to a sixth prediction vector, wherein a position pointed by the sixth prediction vector is obtained by shifting a position pointed by the predicted motion vector to the right by the target offset and shifting the position pointed by the target offset upwards, and the upper right block is one of the at least two second decoded 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 within the prediction reference image block according to a seventh prediction vector, wherein a position pointed by the seventh prediction vector is obtained by shifting a position pointed by the predicted motion vector to the right by the target offset and shifting the position pointed by the target offset downwards, and the lower right block is one of the at least two second decoded 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 prediction reference image block according to an eighth prediction vector, wherein a position pointed by the eighth prediction vector is obtained by shifting a position pointed by the predicted motion vector to the left by the target offset and shifting the position pointed by the eighth prediction vector to the down by the target offset, and the lower left block is one of the at least two second decoded prediction blocks.

The apparatus according to any of claims 8-12, wherein the processing module is further configured to round the motion vector down or round it up.

The apparatus according to any of claims 8-13, wherein the processing module is further configured to round down or round up the predicted motion vectors corresponding to the at least two second decoded prediction blocks, respectively.

46页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频译码中的参考图像管理

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类