[go: up one dir, main page]

CN119031144A - Angle mode inter-frame prediction method, encoder and storage medium - Google Patents

Angle mode inter-frame prediction method, encoder and storage medium Download PDF

Info

Publication number
CN119031144A
CN119031144A CN202410968886.2A CN202410968886A CN119031144A CN 119031144 A CN119031144 A CN 119031144A CN 202410968886 A CN202410968886 A CN 202410968886A CN 119031144 A CN119031144 A CN 119031144A
Authority
CN
China
Prior art keywords
block
motion information
blocks
neighbor
neighboring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410968886.2A
Other languages
Chinese (zh)
Inventor
粘春湄
方瑞东
江东
林聚财
殷俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202410968886.2A priority Critical patent/CN119031144A/en
Publication of CN119031144A publication Critical patent/CN119031144A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请公开了一种角度模式帧间预测方法及相关装置。该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;利用有效角度方向上的不可用邻块的参考块的运动信息,对有效角度方向上的不可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。通过上述方式,本申请能够减小编码过程中的计算开销。

The present application discloses an angle mode inter-frame prediction method and related devices. The method includes: constructing a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for unavailable neighbor blocks; checking for duplicate motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the effective angle direction; using the motion information of the reference block of the unavailable neighbor block in the effective angle direction to modify the motion information of the unavailable neighbor block in the effective angle direction; using the motion information of the available neighbor block and/or the unavailable neighbor block in each effective angle direction to calculate the prediction value of the current block. In the above manner, the present application can reduce the computational overhead in the encoding process.

Description

角度模式帧间预测方法、编码器及存储介质Angle mode inter-frame prediction method, encoder and storage medium

技术领域Technical Field

本申请涉及视频编码技术领域,特别是涉及一种角度模式帧间预测方法、编码器及存储介质。The present application relates to the field of video coding technology, and in particular to an angle mode inter-frame prediction method, an encoder and a storage medium.

背景技术Background Art

通过视频编码技术可以对视频进行压缩,以降低视频的数据量,降低视频传输过程中的网络带宽、减少存储空间。其中,视频编码模式可以包括帧间预测模式和帧内预测模式预测。Video encoding technology can be used to compress videos to reduce the amount of video data, reduce network bandwidth during video transmission, and reduce storage space. Among them, video encoding modes can include inter-frame prediction mode and intra-frame prediction mode prediction.

以帧间预测模式为例,帧间预测是利用参考帧存在的许多相关性很强的冗余信息,预测当前帧的信息。其中,帧间预测模式可以分为很多种,例如帧间运动矢量角度预测模式(MVAP,MotionVectorAngle Prediction)、时域运动矢量预测模式、空域运动矢量预测模式、历史运动矢量运动模式等。Taking the inter-frame prediction mode as an example, the inter-frame prediction uses a lot of highly correlated redundant information in the reference frame to predict the information of the current frame. Among them, the inter-frame prediction mode can be divided into many types, such as the inter-frame motion vector angle prediction mode (MVAP, Motion Vector Angle Prediction), the temporal motion vector prediction mode, the spatial motion vector prediction mode, the historical motion vector motion mode, etc.

以帧间运动矢量角度预测模式为例,帧间运动矢量角度预测模式也可以被称为角度模式帧间预测,所谓帧间运动矢量角度预测,即分别将当前块(当前帧中待预测的块)的多个角度方向的邻块的运动信息作为当前块的运动信息,并且分别计算以不同角度方向邻块的运动信息作为当前块的运动信息时当前块的率失真代价,最终将对应率失真代价最小的角度方向的邻块的运动信息作为当前块的运动信息,进而通过当前块的运动信息来得到当前块的预测值。Taking the inter-frame motion vector angle prediction mode as an example, the inter-frame motion vector angle prediction mode can also be called angle mode inter-frame prediction. The so-called inter-frame motion vector angle prediction is to use the motion information of the neighboring blocks in multiple angle directions of the current block (the block to be predicted in the current frame) as the motion information of the current block, and calculate the rate-distortion cost of the current block when the motion information of the neighboring blocks in different angle directions is used as the motion information of the current block, and finally use the motion information of the neighboring blocks in the angle direction with the smallest rate-distortion cost as the motion information of the current block, and then obtain the prediction value of the current block through the motion information of the current block.

然而,现有的角度模式帧间预测需要的计算开销大。However, the existing angle mode inter-frame prediction requires high computational overhead.

发明内容Summary of the invention

本申请提供一种角度模式帧间预测方法、编码器及存储介质,能够解决现有的角度模式帧间预测需要的计算开销大的问题。The present application provides an angle mode inter-frame prediction method, an encoder and a storage medium, which can solve the problem of high computational overhead required for existing angle mode inter-frame prediction.

为解决上述技术问题,本申请采用的一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;利用有效角度方向上的不可用邻块的参考块的运动信息,对有效角度方向上的不可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, a technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for a current block, the candidate neighbor block list comprising neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for unavailable neighbor blocks; performing motion information duplication check on neighbor blocks in each angle direction, and the angle direction through which the duplication is checked is the valid angle direction; using the motion information of the reference block of the unavailable neighbor block in the valid angle direction to modify the motion information of the unavailable neighbor block in the valid angle direction; and respectively using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;修改模块,用于利用有效角度方向上的不可用邻块的参考块的运动信息,对有效角度方向上的不可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the unavailable neighbor blocks in the effective angle direction by using the motion information of the reference block of the unavailable neighbor blocks in the effective angle direction; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and/or unavailable neighbor blocks in each effective angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;若不可用邻块的时域同位块可用,则利用时域同位块的运动信息为不可用邻块设置运动信息,否则设置初始值为不可用邻块的运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;利用运动信息为初始值的不可用邻块的参考块的运动信息,对运动信息为初始值的可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; if the time domain co-located block of the unavailable neighbor block is available, the motion information of the unavailable neighbor block is set using the motion information of the time domain co-located block, otherwise the initial value is set to the motion information of the unavailable neighbor block; the neighbor blocks in each angle direction are checked for duplication of motion information, and the angle direction through duplication checking is the valid angle direction; the motion information of the available neighbor block whose motion information is the initial value is modified using the motion information of the reference block of the unavailable neighbor block whose motion information is the initial value; and the prediction value of the current block is calculated using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于在不可用邻块的时域同位块可用的情况下,利用时域同位块的运动信息为不可用邻块设置运动信息,以及用于在不可用邻块的时域同位块不可用的情况下,设置初始值为不可用邻块的运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;修改模块,用于利用运动信息为初始值的不可用邻块的参考块的运动信息,对运动信息为初始值的可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算所述当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for the unavailable neighbor block using the motion information of the time domain co-located block when the time domain co-located block of the unavailable neighbor block is available, and used to set the initial value to the motion information of the unavailable neighbor block when the time domain co-located block of the unavailable neighbor block is unavailable; a duplicate checking module, used to check the motion information of the neighbor blocks in each angle direction for duplicate checking, and the angle direction through which the duplicate checking is performed is the valid angle direction; a modification module, used to modify the motion information of the available neighbor block whose motion information is the initial value using the motion information of the reference block of the unavailable neighbor block whose motion information is the initial value; a calculation module, used to calculate the prediction value of the current block using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;根据当前块的尺寸在各角度方向上选择至少一对邻块进行运动信息查重,通过查重的角度方向为有效角度方向;利用不可用邻块的参考块的运动信息,对可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; selecting at least one pair of neighbor blocks in each angle direction according to the size of the current block to perform motion information duplication check, and the angle direction through duplication check is the valid angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the available neighbor block; and respectively using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括所述当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的所述邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于根据当前块的尺寸在各角度方向上选择至少一对邻块进行运动信息查重,通过查重的角度方向为有效角度方向;修改模块,用于利用不可用邻块的参考块的运动信息,对可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes the neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to select at least one pair of neighbor blocks in each angle direction according to the size of the current block to check the motion information for duplicate checking, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the available neighbor blocks by using the motion information of the reference block of the unavailable neighbor blocks; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each effective angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,其中若角度方向满足第一条件,则增加至少一次查重;利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction through which the duplication check is performed is a valid angle direction, wherein if the angle direction satisfies the first condition, at least one duplication check is added; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and respectively using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,其中若角度方向满足第一条件,则增加至少一次查重;修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, the angle direction through which the duplicate checking is performed is a valid angle direction, wherein if the angle direction satisfies the first condition, at least one duplicate checking is added; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括所述当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,其中若水平、垂直和水平向上的查重结果中的至少两个满足第二条件,则减少至少一次对水平向上的查重;利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including the neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction through which the duplication check is performed is the valid angle direction, wherein if at least two of the horizontal, vertical and horizontal upward duplication check results meet the second condition, then at least one horizontal upward duplication check is reduced; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的所述邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,其中若水平、垂直和水平向上的查重结果中的至少两个满足第二条件,则减少至少一次对所述水平向上的查重;修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, the angle direction through which the duplicate checking is performed is a valid angle direction, wherein if at least two of the horizontal, vertical and horizontal upward duplicate checking results meet the second condition, at least one horizontal upward duplicate checking is reduced; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,查重包括判断选择的至少一对邻块的参考帧的图像顺序索引是否相同以及运动是否相同;利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list comprising neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction for duplication check being a valid angle direction, the duplication check comprising determining whether the image sequence index of the reference frame of at least one pair of selected neighbor blocks is the same and whether the motion is the same; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and calculating the prediction value of the current block using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,查重包括判断选择的至少一对邻块的参考帧的图像顺序索引是否相同以及运动是否相同;修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, the angle direction of the duplicate checking is a valid angle direction, and the duplicate checking includes determining whether the image sequence index of the reference frame of at least one pair of selected neighbor blocks is the same and whether the motion is the same; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的所述邻块进行运动信息查重,通过查重的角度方向为有效角度方向;利用不可用邻块的参考块的运动信息,对所述不可用邻块的运动信息进行修改;当前块被划分为多个子块,分别利用每个子块在所述有效角度方向上的对应邻块的运动信息进行运动补偿,得到每个子块的预测值,所有子块的预测值组成当前块的预测值,其中至少一个有效角度方向上所述子块进行运动补偿时使用了至少两个对应邻块的运动信息。To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, and the angle direction through which the duplication check is performed is the effective angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; the current block is divided into multiple sub-blocks, and motion compensation is performed using the motion information of the corresponding neighbor block of each sub-block in the effective angle direction to obtain a prediction value of each sub-block, and the prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two corresponding neighbor blocks is used when performing motion compensation on the sub-block in at least one effective angle direction.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;计算模块,用于在当前块被划分为多个子块的情况下,分别利用每个子块在有效角度方向上的对应邻块的运动信息进行运动补偿,得到每个子块的预测值,所有子块的预测值组成当前块的预测值,其中至少一个有效角度方向上子块进行运动补偿时使用了至少两个所述对应邻块的运动信息。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to perform motion compensation by using the motion information of the corresponding neighbor blocks of each sub-block in the effective angle direction when the current block is divided into multiple sub-blocks, to obtain the prediction value of each sub-block, the prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two of the corresponding neighbor blocks is used when the sub-block is motion compensated in at least one effective angle direction.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余所述邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;将有效角度方向填入角度模式列表,得到有效角度方向的角度模式索引;利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; checking for duplicate motion information of the neighbor blocks in each angle direction, and the angle direction through the duplicate checking is the valid angle direction; filling the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and using the motion information of the available and/or unavailable neighbor blocks in each valid angle direction to calculate the prediction value of the current block.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;填入模块,用于将有效角度方向填入角度模式列表,得到有效角度方向的角度模式索引;修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted in the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction checked for duplicates is the valid angle direction; a filling module, used to fill the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block by using the motion information of the available and/or unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;利用当前块的纹理方向确定各有效角度方向的顺序;按顺序将有效角度方向填入模式列表;利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; checking for duplicate motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the valid angle direction; determining the order of each valid angle direction using the texture direction of the current block; filling the valid angle directions into the mode list in order; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; and calculating the prediction value of the current block using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的所述邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;确定模块,用于利用当前块的纹理方向确定各有效角度方向的顺序;填入模块,用于按顺序将有效角度方向填入模式列表;修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;计算模块,用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。To solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, the device comprising: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through the duplicate checking is the valid angle direction; a determination module, used to determine the order of each valid angle direction using the texture direction of the current block; a filling module, used to fill the valid angle directions into the mode list in order; a modification module, used to modify the motion information of the unavailable neighbor block using the motion information of the reference block of the unavailable neighbor block; a calculation module, used to calculate the prediction value of the current block using the motion information of the available neighbor blocks and/or the unavailable neighbor blocks in each valid angle direction respectively.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测方法,该方法包括:为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;为不可用邻块设置运动信息;对各角度方向上的邻块进行运动信息查重,查重的角度方向为有效角度方向;利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;当前块被划分为多个子块,分别利用每个子块在有效角度方向上的对应邻块的运动信息,得到每个子块的运动信息,运动信息包括运动矢量;分别利用多个修正运动矢量对每个子块的第一预测值进行修正,得到每个子块的多个第二预测值,第一预测值是利用运动信息进行运动补偿得到的;分别为每个子块选择评价指标最小的第二预测值对应的修正运动矢量,作为子块的最终修正运动矢量;利用所有子块的最终修正运动矢量进行修正,得到修正后的运动矢量;利用包含修正后的运动矢量的运动信息,得到每个子块的预测值,所有子块的预测值组成当前块的预测值。In order to solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction method, the method comprising: constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; setting motion information for the unavailable neighbor blocks; performing motion information duplication check on the neighbor blocks in each angle direction, the angle direction of the duplication check is the effective angle direction; using the motion information of the reference block of the unavailable neighbor block to modify the motion information of the unavailable neighbor block; the current block is divided into multiple sub-blocks, and each sub-block is used in the effective angle direction to modify the motion information of the unavailable neighbor block; The motion information of the corresponding neighboring block is obtained to obtain the motion information of each sub-block, where the motion information includes a motion vector; the first prediction value of each sub-block is corrected by using multiple corrected motion vectors to obtain multiple second prediction values of each sub-block, where the first prediction value is obtained by motion compensation using the motion information; the corrected motion vector corresponding to the second prediction value with the smallest evaluation index is selected for each sub-block as the final corrected motion vector of the sub-block; the final corrected motion vectors of all sub-blocks are used for correction to obtain the corrected motion vector; the prediction value of each sub-block is obtained by using the motion information including the corrected motion vector, and the prediction values of all sub-blocks constitute the prediction value of the current block.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种角度模式帧间预测装置,该装置包括:构建模块,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;设置模块,用于为不可用邻块设置运动信息;查重模块,用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向;修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;第一计算模块,用于在当前块被划分为多个子块的情况下,分别利用每个子块在有效角度方向上的对应邻块的运动信息,得到每个子块的运动信息,运动信息包括运动矢量;第一修正模块,用于分别利用多个修正运动矢量对每个子块的第一预测值进行修正,得到每个子块的多个第二预测值,第一预测值是利用运动信息进行运动补偿得到的;选择模块,用于分别为每个子块选择评价指标最小的第二预测值对应的修正运动矢量,作为子块的最终修正运动矢量;第二修正模块,用于利用所有子块的最终修正运动矢量进行修正,得到修正后的运动矢量;第二计算模块,用于利用包含修正后的运动矢量的运动信息,得到每个子块的预测值,所有子块的预测值组成所述当前块的预测值。In order to solve the above technical problems, another technical solution adopted by the present application is: to provide an angle mode inter-frame prediction device, which includes: a construction module, used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks; a setting module, used to set motion information for unavailable neighbor blocks; a duplicate checking module, used to check the motion information of neighbor blocks in each angle direction, and the angle direction through which the duplicate checking is performed is the effective angle direction; a modification module, used to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block; a first calculation module, used to, when the current block is divided into multiple sub-blocks, respectively use each sub-block in the effective angle direction to calculate the motion information of the unavailable neighbor block; The invention relates to a method for obtaining the motion information of each sub-block by using the motion information of the corresponding neighboring block in the degree direction, wherein the motion information includes a motion vector; a first correction module, which is used to respectively correct the first prediction value of each sub-block by using multiple corrected motion vectors to obtain multiple second prediction values of each sub-block, wherein the first prediction value is obtained by motion compensation using the motion information; a selection module, which is used to respectively select the corrected motion vector corresponding to the second prediction value with the smallest evaluation index for each sub-block as the final corrected motion vector of the sub-block; a second correction module, which is used to perform correction using the final corrected motion vectors of all sub-blocks to obtain the corrected motion vector; and a second calculation module, which is used to obtain the prediction value of each sub-block by using the motion information including the corrected motion vector, wherein the prediction values of all sub-blocks constitute the prediction value of the current block.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种编码器,该编码器包括处理器、与处理器连接的存储器,其中,存储器存储有程序指令;处理器用于执行存储器存储的程序指令以实现上述方法。To solve the above technical problems, another technical solution adopted in the present application is: to provide an encoder, which includes a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.

为解决上述技术问题,本申请采用的再一个技术方案是:提供一种存储介质,存储有程序指令,该程序指令被执行时能够实现上述方法。In order to solve the above technical problem, another technical solution adopted by the present application is: providing a storage medium storing program instructions, which can implement the above method when executed.

通过上述方式,本申请能够在查重得到有效角度方向之后,仅修改有效角度方向上的不可用邻块运动信息,相较于修改每个角度方向上的不可用邻块填充运动信息的方式,能够减小计算开销。Through the above method, the present application can only modify the motion information of the unavailable neighboring blocks in the valid angle direction after obtaining the valid angle direction through duplication checking. Compared with the method of modifying the unavailable neighboring blocks in each angle direction to fill the motion information, the computational overhead can be reduced.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请角度模式帧间预测方法第一实施例的流程示意图;FIG1 is a schematic flow chart of a first embodiment of an angle mode inter-frame prediction method of the present invention;

图2为当前块在5个角度方向上的邻块示意图;FIG2 is a schematic diagram of neighboring blocks of the current block in five angular directions;

图3是本申请角度模式帧间预测方法第二实施例的流程示意图;FIG3 is a schematic diagram of a flow chart of a second embodiment of the angle mode inter-frame prediction method of the present application;

图4是本申请角度模式帧间预测方法第三实施例的流程示意图;FIG4 is a schematic flow chart of a third embodiment of the angle mode inter-frame prediction method of the present application;

图5是本申请角度模式帧间预测方法第四实施例的流程示意图;FIG5 is a schematic flow chart of a fourth embodiment of the angle mode inter-frame prediction method of the present application;

图6是本申请角度模式帧间预测方法第五实施例的流程示意图;FIG6 is a flowchart of a fifth embodiment of the angle mode inter-frame prediction method of the present application;

图7是本申请角度模式帧间预测方法第六实施例的流程示意图;FIG7 is a flowchart of a sixth embodiment of the angle mode inter-frame prediction method of the present application;

图8是图7中S630的具体流程示意图;FIG8 is a schematic diagram of a specific process of S630 in FIG7 ;

图9是本申请在宽和高对应的方向上选择第一数量个邻块进行查重的示意图;FIG9 is a schematic diagram of selecting a first number of neighboring blocks for duplication checking in the direction corresponding to width and height of the present application;

图10是本申请在宽和高对应的方向上选择第二数量个邻块进行查重的示意图;FIG10 is a schematic diagram of selecting a second number of neighboring blocks for duplicate checking in the direction corresponding to the width and height of the present application;

图11是本申请角度模式帧间预测方法第七实施例的流程示意图;FIG11 is a flow chart of a seventh embodiment of the angle mode inter-frame prediction method of the present application;

图12是本申请第一条件下增加一次查重的一示意图;FIG12 is a schematic diagram of adding a duplicate check under the first condition of the present application;

图13是本申请第一条件下增加一次查重的另一示意图;FIG13 is another schematic diagram of adding a duplicate check under the first condition of the present application;

图14是本申请第一条件下增加一次查重的又一示意图;FIG14 is another schematic diagram of adding a duplicate check under the first condition of the present application;

图15是本申请第一条件下增加一次查重的再一示意图;FIG15 is another schematic diagram of adding a duplicate check under the first condition of the present application;

图16是本申请角度模式帧间预测方法第八实施例的流程示意图;FIG16 is a schematic flow chart of an eighth embodiment of the angle mode inter-frame prediction method of the present application;

图17是本申请第二条件下减少一次查重的一示意图;FIG17 is a schematic diagram showing a reduction in one duplication check under the second condition of the present application;

图18是本申请第二条件下减少一次查重的另一示意图;FIG18 is another schematic diagram of reducing one duplicate check under the second condition of the present application;

图19是本申请第二条件下减少一次查重的再一示意图;FIG19 is another schematic diagram of reducing one duplicate check under the second condition of the present application;

图20是本申请角度模式帧间预测方法第九实施例的流程示意图;FIG20 is a flowchart of a ninth embodiment of the angle mode inter-frame prediction method of the present application;

图21是本申请角度模式帧间预测方法第十实施例的流程示意图;FIG21 is a flowchart of a tenth embodiment of the angle mode inter-frame prediction method of the present application;

图22是本申请水平和垂直方向上分别利用两个邻块计算第一子块的运动矢量示意图;FIG22 is a schematic diagram of calculating the motion vector of the first sub-block using two neighboring blocks in the horizontal and vertical directions respectively according to the present application;

图23是本申请角度模式帧间预测方法第十一实施例的流程示意图;FIG23 is a schematic flow chart of an eleventh embodiment of the angle mode inter-frame prediction method of the present application;

图24是本申请角度模式帧间预测方法第十二实施例的流程示意图;FIG24 is a schematic flow chart of a twelfth embodiment of the angle mode inter-frame prediction method of the present application;

图25是图24中S1240的具体流程示意图;FIG25 is a schematic diagram of a specific process of S1240 in FIG24 ;

图26是本申请角度模式帧间预测方法第十三实施例的流程示意图;FIG26 is a schematic diagram of a flow chart of a thirteenth embodiment of the angle mode inter-frame prediction method of the present application;

图27是图26中S1306的具体流程示意图;FIG27 is a schematic diagram of a specific flow chart of S1306 in FIG26 ;

图28是本申请在前向第一预测块的搜索范围内搜索前向修正运动矢量的示意图;FIG28 is a schematic diagram of searching for a forward corrected motion vector within a search range of a forward first prediction block according to the present application;

图29是本申请一种角度模式帧间预测装置第一实施例的结构示意图;FIG29 is a schematic structural diagram of a first embodiment of an angle mode inter-frame prediction device of the present application;

图30是本申请一种角度模式帧间预测装置第二实施例的结构示意图;FIG30 is a schematic diagram of the structure of a second embodiment of an angle mode inter-frame prediction device of the present application;

图31是本申请一种角度模式帧间预测装置第三实施例的结构示意图;FIG31 is a schematic structural diagram of a third embodiment of an angle mode inter-frame prediction device of the present application;

图32是本申请一种角度模式帧间预测装置第四实施例的结构示意图;FIG32 is a schematic structural diagram of a fourth embodiment of an angle mode inter-frame prediction device of the present application;

图33是本申请一种角度模式帧间预测装置第五实施例的结构示意图;FIG33 is a schematic structural diagram of a fifth embodiment of an angle mode inter-frame prediction device of the present application;

图34是本申请一种角度模式帧间预测装置第六实施例的结构示意图;FIG34 is a schematic structural diagram of a sixth embodiment of an angle mode inter-frame prediction device of the present application;

图35是本申请一种角度模式帧间预测装置第七实施例的结构示意图;FIG35 is a schematic diagram of the structure of a seventh embodiment of an angle mode inter-frame prediction device of the present application;

图36是本申请一种角度模式帧间预测装置第八实施例的结构示意图;FIG36 is a schematic structural diagram of an eighth embodiment of an angle mode inter-frame prediction device of the present application;

图37是本申请一种角度模式帧间预测装置第九实施例的结构示意图;FIG37 is a schematic diagram of the structure of a ninth embodiment of an angle mode inter-frame prediction device of the present application;

图38是本申请一种角度模式帧间预测装置第十实施例的结构示意图;FIG38 is a schematic structural diagram of a tenth embodiment of an angle mode inter-frame prediction device of the present application;

图39是本申请编码器一实施例的结构示意图;FIG39 is a schematic diagram of the structure of an encoder according to an embodiment of the present application;

图40是本申请存储介质一实施例的结构示意图;FIG40 is a schematic diagram of the structure of a storage medium according to an embodiment of the present application;

图41是本申请电子设备一实施例的结构示意图。FIG. 41 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

本申请中的术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、“第三”的特征可以明示或者隐含地包括至少一个该特征。本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。The terms "first", "second", and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first", "second", and "third" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,在不冲突的情况下,本文所描述的实施例可以与其它实施例相结合。Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments without conflict.

图1是本申请角度模式帧间预测方法第一实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图1所示的流程顺序为限。如图1所示,本实施例可以包括:FIG1 is a flowchart of the first embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, the present embodiment is not limited to the flow sequence shown in FIG1. As shown in FIG1, the present embodiment may include:

S110:为当前块构建候选邻块列表。S110: Construct a candidate neighbor block list for the current block.

当前块也可以被称为当前编码块,即当前要进行编码的块,在某些场合,编码块可以被称为编码单元(codingunit,CU)。当前块所在的视频帧可以被称为当前帧。The current block may also be referred to as the current coding block, that is, the block currently to be coded. In some cases, the coding block may be referred to as a coding unit (CU). The video frame in which the current block is located may be referred to as the current frame.

候选邻块列表包括当前块在多个角度方向上的邻块。当前块与邻块均属于当前帧,邻块位于当前块的已编码侧,例如编码方向为从左向右从上向下时,邻块位于当前块的左侧和上侧。参考帧内预测中角度模式的概念,可以将当前块按各角度方向向已编码侧进行投影来确定邻块。不同角度方向上的邻块可能有重复。所有邻块的尺寸可以相同且小于当前块的尺寸。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions. The current block and the neighbor block both belong to the current frame, and the neighbor block is located on the encoded side of the current block. For example, when the encoding direction is from left to right and from top to bottom, the neighbor block is located on the left and top of the current block. Referring to the concept of angle mode in intra-frame prediction, the current block can be projected to the encoded side at each angle direction to determine the neighbor block. Neighbor blocks in different angular directions may be repeated. The size of all neighbor blocks can be the same and smaller than the size of the current block.

根据当前块的位置,邻块可能为当前帧中真实存在的块,也可能为超出当前帧边界不存在的块;对于真实存在的邻块,可能为已编码的块,也可能为未编码的块;已编码的邻块所采用的预测模式可以为帧间预测、帧内预测或帧内块复制(Intra Block Copy,IBC)等等。本申请中可以将已编码的帧间预测的邻块称为可用邻块,剩余邻块(例如不存在的块、未编码块、帧内块等)称为不可用邻块。According to the position of the current block, the neighboring block may be a real block in the current frame, or a non-existent block beyond the boundary of the current frame; for the real neighboring block, it may be a coded block or an uncoded block; the prediction mode adopted by the coded neighboring block may be inter-frame prediction, intra-frame prediction or intra-frame block copy (IBC), etc. In this application, the coded inter-frame predicted neighboring blocks may be referred to as available neighboring blocks, and the remaining neighboring blocks (such as non-existent blocks, uncoded blocks, intra-frame blocks, etc.) may be referred to as unavailable neighboring blocks.

可选地,多个角度方向包括水平,垂直,水平向上,水平向下和垂直向右中的至少两种。下面结合图2对包括5个方向(水平,垂直,水平向上,水平向下和垂直向右)的情况进行说明:Optionally, the multiple angle directions include at least two of horizontal, vertical, horizontal upward, horizontal downward, and vertical right. The following is an explanation of the situation including five directions (horizontal, vertical, horizontal upward, horizontal downward, and vertical right) in conjunction with FIG. 2:

图2为当前块在5个角度方向上的邻块示意图。其中,根据邻块与当前块之间的相对位置关系,A1~AN为在当前块水平方向上的邻块,可以被称为水平邻块;B1~BN为在当前块垂直方向上的邻块,可以被称为垂直邻块;E为在当前块水平向上方向上的邻块,可以被称为水平向上邻块;C1~CN为在当前块水平向下方向上的邻块,可以被称为水平向下邻块;D1~DN为在当前块垂直向右方向上的邻块,可以被称为垂直向右邻块。根据当前块按各角度方向的投影结果,当前块在水平角度方向0上的邻块包括至少部分水平邻块,在垂直方向1上的邻块包括至少部分垂直邻块,在水平向上方向2上的邻块包括水平向上邻块、至少部分水平邻块和至少部分垂直邻块,在水平向下方向3上的邻块包括至少部分水平邻块和至少部分水平向下邻块,在垂直向右方向4上的邻块包括至少部分垂直邻块和至少部分垂直向右邻块。此种情况下,为当前块构建的候选邻块列表可以为{C1~CN,A1~AN,E,B1~BN,D1~DN},当前块的候选邻块列表中,除了记录各邻块的编号/标识之外,还记录邻块的运动信息。其中,运动信息可以包括运动矢量和参考帧索引信息(前向参考帧索引信息和/或后向参考帧索引信息)。Figure 2 is a schematic diagram of neighboring blocks of the current block in five angular directions. According to the relative position relationship between the neighboring blocks and the current block, A 1 to A N are neighboring blocks in the horizontal direction of the current block, which can be called horizontal neighboring blocks; B 1 to B N are neighboring blocks in the vertical direction of the current block, which can be called vertical neighboring blocks; E is a neighboring block in the horizontal upward direction of the current block, which can be called horizontal upward neighboring blocks; C 1 to C N are neighboring blocks in the horizontal downward direction of the current block, which can be called horizontal downward neighboring blocks; D 1 to D N are neighboring blocks in the vertical right direction of the current block, which can be called vertical right neighboring blocks. According to the projection results of the current block in each angle direction, the neighboring blocks of the current block in the horizontal angle direction 0 include at least part of the horizontal neighboring blocks, the neighboring blocks in the vertical direction 1 include at least part of the vertical neighboring blocks, the neighboring blocks in the horizontal upward direction 2 include horizontal upward neighboring blocks, at least part of the horizontal neighboring blocks and at least part of the vertical neighboring blocks, the neighboring blocks in the horizontal downward direction 3 include at least part of the horizontal neighboring blocks and at least part of the horizontal downward neighboring blocks, and the neighboring blocks in the vertical right direction 4 include at least part of the vertical neighboring blocks and at least part of the vertical right neighboring blocks. In this case, the candidate neighboring block list constructed for the current block can be {C 1 ~C N , A 1 ~A N , E, B 1 ~B N , D 1 ~D N }. In addition to recording the number/identification of each neighboring block, the candidate neighboring block list of the current block also records the motion information of the neighboring block. The motion information may include a motion vector and reference frame index information (forward reference frame index information and/or backward reference frame index information).

S120:为不可用邻块设置运动信息。S120: Setting motion information for the unavailable neighboring blocks.

由于可用邻块具有运动信息,不可用邻块没有运动信息,因此需要为不可用邻块设置运动信息。Since the available neighboring blocks have motion information and the unavailable neighboring blocks do not have motion information, it is necessary to set motion information for the unavailable neighboring blocks.

在一具体实施方式中,可以直接设置初始值(运动矢量为0,前/后向参考帧索引为-1)为不可用邻块的运动信息,其中,若邻块的参考帧索引为-1,则代表该邻块的参考帧不存在。In a specific implementation, the initial value (motion vector is 0, forward/backward reference frame index is -1) can be directly set as the motion information of the unavailable neighboring block, wherein, if the reference frame index of the neighboring block is -1, it means that the reference frame of the neighboring block does not exist.

在另一具体实施方式中,可以基于当前不可用邻块的时域同位块的运动信息,为不可用邻块设置运动信息,具体实现过程请参见后面的实施例。其中,时域同位块为当前不可用邻块在当前帧的参考帧列表的一个参考帧中的同位块,例如,第一个参考帧(参考帧索引为0)中的同位块。In another specific implementation, motion information may be set for the unavailable neighboring block based on motion information of the temporal co-located block of the current unavailable neighboring block. For the specific implementation process, please refer to the following embodiments. The temporal co-located block is a co-located block of the current unavailable neighboring block in a reference frame of the reference frame list of the current frame, for example, a co-located block in the first reference frame (reference frame index is 0).

S130:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S130: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.

具体查重的方法请参见后面的实施例。For specific methods of checking for duplicate content, please refer to the following examples.

S140:利用有效角度方向上的不可用邻块的参考块的运动信息,对有效角度方向上的不可用邻块的运动信息进行修改。S140: Using the motion information of the reference block of the unavailable neighboring block in the effective angle direction, modify the motion information of the unavailable neighboring block in the effective angle direction.

参考块可以为不可用邻块的前一邻块,也可以为不可用邻块的后一邻块,或者可以为不可用邻块的时域同位块等。The reference block may be a previous neighboring block of the unavailable neighboring block, or a subsequent neighboring block of the unavailable neighboring block, or a time-domain co-located block of the unavailable neighboring block, etc.

S150:分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。S150: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and/or the unavailable neighboring blocks in each valid angle direction respectively.

当前块可以被划分为多个子块。参考帧内预测的概念,对于每个有效角度方向,可以分别根据每个子块在该方向上的对应邻块的运动信息确定该子块的运动信息,然后使用该运动信息对子块进行运动补偿得到子块的预测值,所有子块的预测值组成当前块的预测值,在得到当前块的预测值之后,还可以根据当前块的预测值和原始值计算率失真代价。为每个有效角度方向执行上述过程可以得到所有有效角度方向的预测值及率失真代价。The current block can be divided into multiple sub-blocks. Referring to the concept of intra-frame prediction, for each valid angle direction, the motion information of each sub-block can be determined according to the motion information of the corresponding neighboring block in the direction, and then the motion information is used to perform motion compensation on the sub-block to obtain the prediction value of the sub-block. The prediction values of all sub-blocks constitute the prediction value of the current block. After obtaining the prediction value of the current block, the rate-distortion cost can also be calculated based on the prediction value and the original value of the current block. Performing the above process for each valid angle direction can obtain the prediction values and rate-distortion costs of all valid angle directions.

一个子块在一个有效角度方向上的对应邻块是指,将该子块按照该有效角度方向向当前块的已编码侧进行投影而确定的邻块。The corresponding neighboring block of a sub-block in an effective angle direction refers to the neighboring block determined by projecting the sub-block onto the encoded side of the current block according to the effective angle direction.

若当前有效角度方向上包含可用邻块和不可用邻块,则邻块的运动信息包括可用邻块的运动信息和不可用邻块的运动信息;若当前有效角度方向上仅包含可用邻块,则邻块的运动信息包括可用邻块的运动信息;若当前有效角度方向上仅包含不可用邻块,则邻块的运动信息包括不可用邻块的运动信息。If the current valid angle direction includes available neighboring blocks and unavailable neighboring blocks, the motion information of the neighboring blocks includes the motion information of the available neighboring blocks and the motion information of the unavailable neighboring blocks; if the current valid angle direction only includes available neighboring blocks, the motion information of the neighboring blocks includes the motion information of the available neighboring blocks; if the current valid angle direction only includes unavailable neighboring blocks, the motion information of the neighboring blocks includes the motion information of the unavailable neighboring blocks.

本实施例中,在查重得到有效角度方向之后,仅修改有效角度方向上的不可用邻块的运动信息,相较于修改每个角度方向上的不可用邻块运动信息的方式,能够减小计算开销。In this embodiment, after the valid angle direction is obtained through duplication checking, only the motion information of the unavailable neighboring blocks in the valid angle direction is modified. Compared with the method of modifying the motion information of the unavailable neighboring blocks in each angle direction, the computational overhead can be reduced.

图3是本申请角度模式帧间预测方法第二实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图3所示的流程顺序为限。本实施例是对上述S140的进一步扩展。如图3所示,本实施例可以包括:FIG3 is a flow chart of the second embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG3. This embodiment is a further extension of the above S140. As shown in FIG3, this embodiment may include:

S210:将有效角度方向上的邻块按照修改顺序进行排序。S210: Sort the neighboring blocks in the effective angle direction according to the modification order.

不同角度方向上的邻块可能有重复,在排序时不是按照各有效角度方向独立排序,而且将所有有效角度方向上的邻块集合后去除重复的部分,按照与当前块之间的相对位置进行排序。修改顺序可以为顺时针顺序、逆时针顺序等。Neighboring blocks in different angles may be repeated. When sorting, they are not sorted independently according to each valid angle direction, but all neighboring blocks in valid angle directions are collected, the repeated parts are removed, and sorted according to their relative positions to the current block. The modification order can be clockwise, counterclockwise, etc.

需要说明的是,对有效角度方向上的邻块的排序顺序与候选邻块列表中邻块的排序顺序相同。It should be noted that the sorting order of the neighboring blocks in the effective angle direction is the same as the sorting order of the neighboring blocks in the candidate neighboring block list.

S220:判断排序后的第一个邻块是否为不可用邻块。S220: Determine whether the first neighboring block after sorting is an unavailable neighboring block.

对有效角度方向上的邻块进行排序后的第一个邻块与候选列表中第一个邻块可能不相同。The first neighbor block after sorting the neighbor blocks in the effective angle direction may be different from the first neighbor block in the candidate list.

若是,则执行S230。If yes, execute S230.

S230:利用排序后的第一个邻块在候选邻块列表中的前一邻块和/或后一邻块的运动信息修改第一个邻块的运动信息。S230: Modify the motion information of the first neighboring block by using the motion information of the previous neighboring block and/or the next neighboring block of the sorted first neighboring block in the candidate neighboring block list.

在一具体实施方式中,若第一个邻块的前一邻块为可用邻块,则利用第一个邻块的前一邻块的运动信息修改第一个邻块的运动信息,否则将第一个邻块的运动信息设置为初始值。In a specific implementation, if the previous neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified using the motion information of the previous neighboring block of the first neighboring block; otherwise, the motion information of the first neighboring block is set to an initial value.

在另一具体实施方式中,若第一个邻块的后一邻块为可用邻块,则利用第一个邻块的后一邻块的运动信息修改第一个邻块的运动信息,否则将第一个邻块的运动信息设置为初始值。In another specific implementation, if the next neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified using the motion information of the next neighboring block of the first neighboring block, otherwise the motion information of the first neighboring block is set to an initial value.

在又一具体实施方式中,若第一个邻块的前一邻块为可用邻块,则利用第一个邻块的前一邻块的运动信息修改第一个邻块的运动信息,否则判断第一个邻块的后一邻块是否为可用邻块,若是,则利用第一个邻块的后一邻块的运动信息修改第一个邻块的运动信息,否则将第一个邻块的运动信息设置为初始值;或In another specific implementation, if the previous neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified by using the motion information of the previous neighboring block of the first neighboring block, otherwise, it is determined whether the next neighboring block of the first neighboring block is an available neighboring block, and if so, the motion information of the first neighboring block is modified by using the motion information of the next neighboring block of the first neighboring block, otherwise, the motion information of the first neighboring block is set to an initial value; or

在又一具体实施方式中,若第一个邻块的前一邻块和后一邻块均为可用邻块,则利用第一个邻块的前一邻块和后一邻块的运动信息的加权平均值修改第一个邻块的运动信息;若第一个邻块的前一邻块和后一邻块中的一个为可用邻块,则利用前一邻块和后一邻块中的可用邻块的运动信息修改第一个邻块的运动信息,若第一个邻块的前一邻块和后一邻块均为不可用邻块,则将第一个邻块的运动信息设置为初始值。In another specific implementation, if the previous neighboring block and the next neighboring block of the first neighboring block are both available neighboring blocks, the motion information of the first neighboring block is modified using the weighted average of the motion information of the previous neighboring block and the next neighboring block of the first neighboring block; if one of the previous neighboring block and the next neighboring block of the first neighboring block is an available neighboring block, the motion information of the first neighboring block is modified using the motion information of the available neighboring block in the previous neighboring block and the next neighboring block; if the previous neighboring block and the next neighboring block of the first neighboring block are both unavailable neighboring blocks, the motion information of the first neighboring block is set to an initial value.

本实施例中,根据对有效角度方向上的邻块排序后的第一个邻块是否为不可用邻块,来对该第一个邻块采用不同的运动信息修改策略,可以提高编码的准确度。In this embodiment, different motion information modification strategies are adopted for the first neighboring block according to whether the first neighboring block after sorting the neighboring blocks in the effective angle direction is an unavailable neighboring block, thereby improving the encoding accuracy.

图4是本申请角度模式帧间预测方法第三实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图4所示的流程顺序为限。本实施例是对上述S140的进一步扩展。如图4所示,本实施例可以包括:FIG4 is a flow chart of the third embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG4. This embodiment is a further extension of the above S140. As shown in FIG4, this embodiment may include:

S310:将有效角度方向上的邻块按照修改顺序进行排序。S310: Sort the neighboring blocks in the effective angle direction according to the modification order.

S320:判断排序后的第一个邻块是否为不可用邻块。S320: Determine whether the first neighboring block after sorting is an unavailable neighboring block.

若是,则执行S330。If yes, execute S330.

S330:判断第一个邻块的时域同位块是否可用。S330: Determine whether the time-domain co-located block of the first neighboring block is available.

可选地,第一个邻块的时域同位块所在的帧为当前块的参考帧列表中的参考帧,并且该时域同位块在该参考帧中的位置和尺寸,与第一个邻块在当前帧中的位置和尺寸完全相同。Optionally, the frame where the time-domain co-located block of the first neighboring block is located is a reference frame in the reference frame list of the current block, and the position and size of the time-domain co-located block in the reference frame are exactly the same as the position and size of the first neighboring block in the current frame.

时域同位块是否可用,可以理解为时域同位块是否具有运动信息,或者可以理解为时域同位块是否是采用帧间预测编码。Whether the time-domain co-located block is available can be understood as whether the time-domain co-located block has motion information, or can be understood as whether the time-domain co-located block adopts inter-frame prediction coding.

若是,则执行S340。If yes, execute S340.

S340:利用第一个邻块的时域同位块的运动信息修改第一个邻块的运动信息。S340: Modify the motion information of the first neighboring block using the motion information of the time-domain co-located block of the first neighboring block.

本实施例的步骤其他详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

本实施例中,根据对有效角度方向上的邻块排序后的第一个邻块是否为不可用邻块,来对该第一个邻块采用不同的运动信息修改策略,可以提高编码的准确度。In this embodiment, different motion information modification strategies are adopted for the first neighboring block according to whether the first neighboring block after sorting the neighboring blocks in the effective angle direction is an unavailable neighboring block, thereby improving the encoding accuracy.

图5是本申请角度模式帧间预测方法第四实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图5所示的流程顺序为限。本实施例是对上述S120的进一步扩展,如图5所示,本实施例可以包括:FIG5 is a flowchart of a fourth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG5. This embodiment is a further extension of the above S120. As shown in FIG5, this embodiment may include:

S410:判断不可用邻块的时域同位块是否可用。S410: Determine whether the time-domain co-located block of the unavailable neighboring block is available.

若是,则执行S420;若否,则执行S430。If yes, execute S420; if no, execute S430.

S420:利用时域同位块的运动信息为不可用邻块设置运动信息。S420: Using the motion information of the time-domain co-located block to set motion information for the unavailable neighboring block.

在一具体实施方式中,可以将时域同位块的运动信息作为不可用邻块的运动信息。In a specific implementation, the motion information of the time-domain co-located block may be used as the motion information of the unavailable neighboring block.

在另一具体实施方式中,可以将不可用邻块的前向运动信息设置为前向同位块的前向运动信息或后向运动信息,将不可用邻块的后向运动信息设置为后向同位块的后向运动信息或前向运动信息,前向同位块所在的帧为当前块的前向参考帧列表中的参考帧,后向同位块所在的帧为当前块的后向参考帧列表中的参考帧。In another specific implementation, the forward motion information of the unavailable neighboring block may be set to the forward motion information or backward motion information of the forward co-located block, and the backward motion information of the unavailable neighboring block may be set to the backward motion information or forward motion information of the backward co-located block. The frame where the forward co-located block is located is the reference frame in the forward reference frame list of the current block, and the frame where the backward co-located block is located is the reference frame in the backward reference frame list of the current block.

在前向同位块的前向参考帧存在的情况下,可以将不可用邻块的前向运动信息设置为前向同位块的前向运动信息;或者,在前向同位块的后向参考帧存在的情况下,可以将不可用邻块的前向运动信息设置为前向同位块的后向运动信息。When a forward reference frame of the forward co-located block exists, the forward motion information of the unavailable neighboring block can be set as the forward motion information of the forward co-located block; or, when a backward reference frame of the forward co-located block exists, the forward motion information of the unavailable neighboring block can be set as the backward motion information of the forward co-located block.

在后向同位块的后向参考帧存在的情况下,可以将不可用邻块的后向运动信息设置为后向同位块的后向运动信息;或者,在后向同位块的前向参考帧存在的情况下,可以将不可用邻块的后向运动信息设置为后向同位块的前向运动信息。When a backward reference frame of a backward co-located block exists, the backward motion information of the unavailable neighboring block can be set as the backward motion information of the backward co-located block; or, when a forward reference frame of the backward co-located block exists, the backward motion information of the unavailable neighboring block can be set as the forward motion information of the backward co-located block.

在又一具体实施方式中,可以将时域同位块的前向运动信息或后向运动信息按照图像顺序索引差进行缩放后作为不可用邻块的前向运动信息和后向运动信息。In yet another specific implementation, the forward motion information or the backward motion information of the temporal co-located block may be scaled according to the image sequence index difference and used as the forward motion information and the backward motion information of the unavailable neighboring block.

可以理解的是,每一帧图像具有对应的图像顺序索引(POC,Picture OrderCount),其可以代表图像被播放的顺序。按照图像顺序索引差进行缩放的公式可以如下:It is understandable that each frame of image has a corresponding picture order index (POC, Picture Order Count), which can represent the order in which the images are played. The formula for scaling according to the difference in the picture order index can be as follows:

scale_MV=MV/t0*t1,scale_MV=MV/t0*t1,

t1=POC0-POC1,t1=POC0-POC1,

t0=POC2-POC3,t0=POC2-POC3,

其中,scale_MV为当前不可用邻块的前/后向运动信息,MV为时域同位块的前/后向运动信息。Among them, scale_MV is the forward/backward motion information of the currently unavailable neighboring block, and MV is the forward/backward motion information of the co-located block in the time domain.

在当前帧为B帧(双向差别帧)的情况下,需要计算当前不可用邻块的前向运动信息和后向运动信息。When the current frame is a B frame (bidirectional difference frame), it is necessary to calculate the forward motion information and backward motion information of the currently unavailable neighboring blocks.

若scale_MV为当前不可用邻块的前向运动信息,则t1为当前帧的POC1和当前帧的前向参考帧的POC0之间的差(距离),t0为时域同位块所在的帧的POC2和时域同位块的前/后向参考帧的POC3之间的差。If scale_MV is the forward motion information of the currently unavailable neighboring block, t1 is the difference (distance) between POC1 of the current frame and POC0 of the forward reference frame of the current frame, and t0 is the difference between POC2 of the frame where the temporal co-located block is located and POC3 of the forward/backward reference frame of the temporal co-located block.

若scale_MV为当前不可用邻块的后向运动信息,则t1为当前帧的POC1和当前帧的后向参考帧的POC0之间的差,t0为时域同位块所在的帧的POC2和时域同位块的前/后向参考帧的POC3之间的差。If scale_MV is the backward motion information of the currently unavailable neighboring block, t1 is the difference between POC1 of the current frame and POC0 of the backward reference frame of the current frame, and t0 is the difference between POC2 of the frame where the temporal co-located block is located and POC3 of the forward/backward reference frame of the temporal co-located block.

在当前帧为P帧(单向差别帧)的情况下,只需要计算当前不可用邻块的前向运动信息。t1为当前帧的POC1和当前帧的参考帧的POC0之间的差,t0为时域同位块所在的帧的POC2和时域同位块的前/后向参考帧的POC3之间的差。When the current frame is a P frame (one-way difference frame), only the forward motion information of the currently unavailable neighboring block needs to be calculated. t1 is the difference between POC1 of the current frame and POC0 of the reference frame of the current frame, and t0 is the difference between POC2 of the frame where the temporal co-located block is located and POC3 of the forward/backward reference frame of the temporal co-located block.

S430:设置初始值为不可用邻块的运动信息。S430: Setting the initial value to the motion information of the unavailable neighboring block.

可参考前面提及的,将运动矢量的初始值设为0,将参考帧索引的运动信息设置为-1。As mentioned above, the initial value of the motion vector is set to 0, and the motion information of the reference frame index is set to -1.

通过本实施例的实施,可以在不可用邻块的时域同位块可用的情况下,基于该时域同位块来为不可用邻块设置运动信息,在不可用邻块的时域同位块不可用的情况下,才考虑将不可用邻块的运动信息设置为初始值。相较于直接将不可用邻块的运动信息设置为初始值的方式,能够减小为不可用邻块设置的运动信息所带来的误差,提高编码的准确度。Through the implementation of this embodiment, when the time domain co-located block of the unavailable neighboring block is available, the motion information of the unavailable neighboring block can be set based on the time domain co-located block, and when the time domain co-located block of the unavailable neighboring block is unavailable, the motion information of the unavailable neighboring block is considered to be set to the initial value. Compared with the method of directly setting the motion information of the unavailable neighboring block to the initial value, the error caused by the motion information set for the unavailable neighboring block can be reduced, and the accuracy of encoding can be improved.

图6是本申请角度模式帧间预测方法第五实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图6所示的流程顺序为限。如图6所示,本实施例可以包括:FIG6 is a flowchart of the fifth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG6. As shown in FIG6, this embodiment may include:

S510:为当前块构建候选邻块列表。S510: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S520:判断不可用邻块的时域同位块是否可用。S520: Determine whether the time-domain co-located block of the unavailable neighboring block is available.

时域同位块所在的帧为当前块的参考帧列表中的第一个参考帧。The frame where the temporal co-located block is located is the first reference frame in the reference frame list of the current block.

若是,则执行S530;若否,则执行S540。If yes, execute S530; if no, execute S540.

S530:利用时域同位块的运动信息为不可用邻块设置运动信息。S530: Use the motion information of the time-domain co-located block to set motion information for the unavailable neighboring block.

在一具体实施方式中,可以将时域同位块的运动信息作为不可用邻块的运动信息。In a specific implementation, the motion information of the time-domain co-located block may be used as the motion information of the unavailable neighboring block.

在另一具体实施方式中,可以将不可用邻块的前向运动信息设置为前向同位块的前向运动信息或后向运动信息,将不可用邻块的后向运动信息设置为后向同位块的后向运动信息或前向运动信息,前向同位块所在的帧为当前块的前向参考帧列表中的参考帧,后向同位块所在的帧为当前块的后向参考帧列表中的参考帧。In another specific implementation, the forward motion information of the unavailable neighboring block may be set to the forward motion information or backward motion information of the forward co-located block, and the backward motion information of the unavailable neighboring block may be set to the backward motion information or forward motion information of the backward co-located block. The frame where the forward co-located block is located is the reference frame in the forward reference frame list of the current block, and the frame where the backward co-located block is located is the reference frame in the backward reference frame list of the current block.

在又一具体实施方式中,将时域同位块的前向运动信息或后向运动信息按照图像顺序索引差进行缩放后作为不可用邻块的前向运动信息和后向运动信息。In yet another specific implementation, the forward motion information or the backward motion information of the temporal co-located block is scaled according to the image sequence index difference and used as the forward motion information and the backward motion information of the unavailable neighboring block.

执行完S530之后跳转至S550。After executing S530, jump to S550.

S540:设置初始值为不可用邻块的运动信息。S540: Setting the initial value to the motion information of the unavailable neighboring block.

执行完S540之后跳转至S550。After executing S540, jump to S550.

S550:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S550: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

S560:利用运动信息为初始值的不可用邻块的参考块的运动信息,对所述运动信息为初始值的可用邻块的运动信息进行修改。S560: Using the motion information of the reference block of the unavailable neighboring block whose motion information is the initial value, modify the motion information of the available neighboring block whose motion information is the initial value.

具体修改的方式可参见本申请中其它实施例。For specific modification methods, please refer to other embodiments in this application.

S570:分别利用每个有效角度方向上的可用邻块和不可用邻块的运动信息计算当前块的预测值。S570: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and the unavailable neighboring blocks in each valid angle direction respectively.

本实施例的步骤其他详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

本实施例中,在判断出不可用邻块的时域同位块可用时,利用时域同位块的运动信息配置不可用邻块的运动信息,在判断出不可用邻块的时域同位块不可用时,才将不可用邻块的运动信息设置为初始值,相较于直接将不可用邻块的运动信息设置为初始值的方式,能够减小为不可用邻块配在运动信息引起的误差;进一步地,在对各角度方向上的邻块进行运动信息查重得到有效角度方向之后,仅修改运动信息为初始值的不可用邻块的运动信息,相较于直接修改每个不可用邻块运动信息的方式,能够降低修改不可用邻块的运动信息需要的计算开销。In the present embodiment, when it is determined that the time-domain co-located block of the unavailable neighboring block is available, the motion information of the unavailable neighboring block is configured using the motion information of the time-domain co-located block. When it is determined that the time-domain co-located block of the unavailable neighboring block is unavailable, the motion information of the unavailable neighboring block is set to the initial value. Compared with the method of directly setting the motion information of the unavailable neighboring block to the initial value, the error caused by the motion information configuration for the unavailable neighboring block can be reduced. Furthermore, after the motion information of the neighboring blocks in each angular direction is checked for duplication to obtain the valid angular direction, only the motion information of the unavailable neighboring block whose motion information is the initial value is modified. Compared with the method of directly modifying the motion information of each unavailable neighboring block, the computational overhead required to modify the motion information of the unavailable neighboring block can be reduced.

图7是本申请角度模式帧间预测方法第六实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图7所示的流程顺序为限。如图7所示,本实施例可以包括:FIG7 is a flowchart of the sixth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG7. As shown in FIG7, this embodiment may include:

S610:为当前块构建候选邻块列表。S610: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S620:为不可用邻块设置运动信息。S620: Set motion information for the unavailable neighboring block.

S630:根据当前块的尺寸在各角度方向上选择至少一对邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S630: Select at least one pair of neighboring blocks in each angular direction according to the size of the current block to perform motion information duplication check, and the angular direction that passes the duplication check is a valid angular direction.

可选地,同一角度方向上被选中的邻块等距排列。当然,在其他实施方式中,也可以依据其他方式(如随机等)选中同一角度方向上的邻块。Optionally, the selected neighboring blocks in the same angular direction are arranged at equal distances. Of course, in other implementations, the neighboring blocks in the same angular direction may also be selected in other ways (such as randomly).

一般来说,根据查重得到的有效角度方向准确度取决于查重次数、当前块的尺寸等。其中,尺寸一致的情况下,在当前块的各角度方向上查重次数越多,根据查重结果得到的有效角度方向越准确。查重次数一致的情况下,相对于尺寸偏大的当前块,得到的尺寸偏小的当前块的有效角度方向更准确。Generally speaking, the accuracy of the effective angle direction obtained from the duplicate check depends on the number of duplicate checks, the size of the current block, etc. Among them, when the size is consistent, the more duplicate checks are performed in each angle direction of the current block, the more accurate the effective angle direction obtained from the duplicate check result. When the number of duplicate checks is consistent, the effective angle direction of the current block with a smaller size is more accurate than that of the current block with a larger size.

为此,对于尺寸偏大的当前块,可以增加在各角度方向上选择的邻块对数,即增加查重次数。结合参阅图8,具体实现过程可以包括:Therefore, for a current block with a relatively large size, the number of neighboring blocks selected in each angle direction can be increased, that is, the number of duplicate checking times can be increased. Referring to FIG8 , the specific implementation process may include:

S631:判断当前块的宽/高是否大于第一阈值。S631: Determine whether the width/height of the current block is greater than a first threshold.

可以将宽/高大于第一阈值的当前块,看作尺寸偏大的当前块;将宽/高均小于或等于第一阈值的当前块,看作尺寸偏小的当前块。例如,可以将第一阈值设置为32。A current block whose width/height is greater than the first threshold may be regarded as a current block of relatively large size, and a current block whose width/height is less than or equal to the first threshold may be regarded as a current block of relatively small size. For example, the first threshold may be set to 32.

若是,则执行S632;若否,则执行S633。If yes, execute S632; if no, execute S633.

S632:在宽/高对应的方向上选择第一数量个邻块进行查重。S632: Select a first number of neighboring blocks in the direction corresponding to the width/height to check for duplication.

若宽大于第一阈值,则在宽对应的方向上选择第一数量个邻块进行查重;若高大于第一阈值,则在高对应的方向上选择第一数量个邻块进行查重。其中,宽对应的方向包括垂直和/或垂直向右,高对应的方向包括水平和/或水平向下。If the width is greater than the first threshold, a first number of neighboring blocks are selected in the direction corresponding to the width for duplication checking; if the height is greater than the first threshold, a first number of neighboring blocks are selected in the direction corresponding to the height for duplication checking. The direction corresponding to the width includes vertical and/or vertical to the right, and the direction corresponding to the height includes horizontal and/or horizontal downward.

结合图9对宽和高均大于第一阈值(32)的情况(当前块大小为64×64)进行举例说明。In conjunction with FIG9 , an example is given of a case where both the width and the height are greater than the first threshold (32) (the current block size is 64×64).

如图9所示,在宽对应的方向(垂直和垂直向右)上各选择4个等距的邻块进行查重。其中,在垂直方向上的邻块B1~B2N中选择B1、BK、B2K和B3K,N=64,K=N/4,在垂直向右方向上的邻块D1~DN中选择D1、DK、D2K和D3K,从而在宽对应的方向上需要查重的邻块对包括(B1,BK)、(BK,B2K)、(B2K,B3K)、(B3K,D1)、(D1,DK)和(DK,D2K)。As shown in Fig. 9, four equidistant neighboring blocks are selected in the direction corresponding to the width (vertical and vertical to the right) for duplicate checking. Among them, B1, BK , B2K and B3K are selected from the neighboring blocks B1 to B2N in the vertical direction, N=64, K=N/4, and D1 , DK , D2K and D3K are selected from the neighboring blocks D1 to DN in the vertical right direction, so that the neighboring block pairs that need to be checked for duplicates in the direction corresponding to the width include ( B1 , BK ), ( BK , B2K ), ( B2K , B3K ), ( B3K , D1 ), ( D1 , DK ) and ( DK , D2K ).

在高对应的方向(水平和水平向下)上各选择4个等距的邻块进行查重。其中,在水平方向上的邻块A1~AN中选择A1、AK、A2K和A3K,在水平向下方向上的邻块C1~CN中选择C1、CK、C2K和C3K,从而在高对应的方向上需要查重的邻块对包括(A1,AK)、(AK,A2K)、(A2K,A3K)、(A3K,C1)、(C1,CK)、(CK,C2K)和(C2K,C3K)。In the high corresponding direction (horizontally and horizontally downward), four equidistant neighboring blocks are selected for duplication checking. Among them, A1 , AK , A2K and A3K are selected from the neighboring blocks A1 to AN in the horizontal direction, and C1 , CK , C2K and C3K are selected from the neighboring blocks C1 to CN in the horizontal downward direction. Therefore, the neighboring block pairs that need to be checked for duplication in the high corresponding direction include ( A1 , AK ), ( AK , A2K ), ( A2K , A3K ), ( A3K , C1 ), ( C1 , CK ), ( CK , C2K ) and ( C2K , C3K ).

此外,在水平向上方向上需要查重的邻块对包括(A1,E)和(E,B1)。In addition, the neighboring block pairs that need to be checked for duplication in the horizontal upward direction include (A 1 , E) and (E, B 1 ).

S633:在宽/高对应的方向上选择第二数量个邻块进行查重。S633: Select a second number of neighboring blocks in the direction corresponding to the width/height to check for duplication.

第一数量大于第二数量,第二数量大于1。The first number is greater than the second number, and the second number is greater than 1.

结合图10对宽和高均等于第一阈值(32)的情况(当前块大小为32×32)进行举例说明。In conjunction with FIG10 , an example is given of the case where both the width and the height are equal to the first threshold (32) (the current block size is 32×32).

如图10所示,在宽对应的方向(垂直和垂直向右)上各选择2个等距的邻块进行查重。其中,在垂直方向上的邻块B1~BN中选择B1和BK,N=32,K=N/2,在垂直向右方向上的邻块D1~DN中选择D1和DK,从而在宽对应的方向上需要查重的邻块对包括(B1,BK)、(BK,D1)和(D1,DK)。As shown in Fig. 10, two equidistant neighboring blocks are selected in the direction corresponding to the width (vertical and vertical to the right) for duplication checking. Among them, B1 and BK are selected from the neighboring blocks B1 to BN in the vertical direction, N=32, K=N/2, and D1 and DK are selected from the neighboring blocks D1 to DN in the vertical right direction, so that the neighboring block pairs that need to be checked for duplication in the direction corresponding to the width include ( B1 , BK ), ( BK , D1 ) and ( D1 , DK ).

在高对应的方向(水平和水平向下)上各选择2个邻块进行查重。其中,在水平方向上的邻块A1~AN中选择A1和AK,在水平向下方向上的邻块C1~CN中选择C1和CK,从而在高对应的方向上需要查重的邻块对包括(A1,AK)、(AK,C1)和(C1,CK)。Two neighboring blocks are selected in the high corresponding direction (horizontally and horizontally downward) for duplication checking. Among them, A1 and AK are selected from the neighboring blocks A1 to AN in the horizontal direction, and C1 and CK are selected from the neighboring blocks C1 to CN in the horizontal downward direction. Therefore, the neighboring block pairs that need to be checked for duplication in the high corresponding direction include ( A1 , AK ), ( AK , C1 ) and ( C1 , CK ).

此外,在水平向上方向上需要查重的邻块对包括(A1,E)和(E,B1)。In addition, the neighboring block pairs that need to be checked for duplication in the horizontal upward direction include (A 1 , E) and (E, B 1 ).

S640:利用不可用邻块的参考块的运动信息,对所述可用邻块的运动信息进行修改。S640: Modify the motion information of the available neighboring block by using the motion information of the reference block of the unavailable neighboring block.

其中,可以仅对有效方向上的不可用邻块的运动信息进行修改,也可以对所有方向上的不可用邻块的运动信息进行修改。The motion information of the unavailable neighboring blocks in the valid direction may be modified only, or the motion information of the unavailable neighboring blocks in all directions may be modified.

S650:分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。S650: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and/or the unavailable neighboring blocks in each valid angle direction respectively.

本实施例的步骤其他详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

本实施例中,基于当前块的尺寸决定在各角度方向上选择的进行查重的邻块数量,相较于为所有尺寸的当前块在各角度方向上选择的进行查重的邻块数量相同的方式,能够使得最终选择出的有效角度方向更加准确。In this embodiment, the number of neighboring blocks selected for duplication checking in each angular direction is determined based on the size of the current block. Compared with the method of selecting the same number of neighboring blocks for duplication checking in each angular direction for current blocks of all sizes, the final selected effective angular direction can be more accurate.

图11是本申请角度模式帧间预测方法第七实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图11所示的流程顺序为限。如图11所示,本实施例可以包括:FIG11 is a flowchart of the seventh embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG11. As shown in FIG11, this embodiment may include:

S710:为当前块构建候选邻块列表。S710: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S720:为不可用邻块设置运动信息。S720: Set motion information for the unavailable neighboring block.

S730:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S730: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.

其中若角度方向满足第一条件,则增加至少一次查重。If the angle direction meets the first condition, at least one duplicate check is added.

在一具体实施方式中,第一条件可以为水平和/或垂直方向未通过查重。若水平和/或垂直方向未通过查重,则增加至少一次查重。In a specific implementation, the first condition may be that the horizontal and/or vertical directions fail to pass the plagiarism check. If the horizontal and/or vertical directions fail to pass the plagiarism check, at least one additional plagiarism check is performed.

以增加一次查重为例,邻块包括N个位于当前块水平方向上的水平邻块以及N个位于当前块垂直方向上的垂直邻块,水平方向增加的查重为按照从上向下排序的第K个与第N个水平邻块之间的查重,垂直方向增加的查重为按照从左向右排序的第K个与第N个垂直邻块之间的查重,K=N/i,i为已经完成的查重中选择的水平邻块或垂直邻块的数量。Taking adding a duplicate check as an example, the neighboring blocks include N horizontal neighboring blocks located in the horizontal direction of the current block and N vertical neighboring blocks located in the vertical direction of the current block. The duplicate check added in the horizontal direction is the duplicate check between the Kth and Nth horizontal neighboring blocks sorted from top to bottom, and the duplicate check added in the vertical direction is the duplicate check between the Kth and Nth vertical neighboring blocks sorted from left to right. K=N/i, i is the number of horizontal neighboring blocks or vertical neighboring blocks selected in the completed duplicate check.

在一具体实施方式中,i可以为2。In one specific embodiment, i can be 2.

结合图12对水平和垂直方向未通过查重的情况进行举例说明。如图12所示,水平方向上的邻块对(A1,AK)未通过查重,则在水平方向上增加一次对邻块对(AK,AN)的查重;垂直方向上的邻块对(B1,BK)未通过查重,这在垂直方向上增加一次对邻块对(BK,BN)的查重。The case where the horizontal and vertical directions fail to pass the plagiarism check is illustrated in combination with FIG12. As shown in FIG12, if the neighboring block pair ( A1 , AK ) in the horizontal direction fails to pass the plagiarism check, then the neighboring block pair ( AK , AN ) is additionally checked in the horizontal direction; if the neighboring block pair ( B1 , BK ) in the vertical direction fails to pass the plagiarism check, then the neighboring block pair ( BK , BN ) is additionally checked in the vertical direction.

其中,在水平和/或垂直方向未通过查重,则增加至少一次查重,从而能够根据多次查重结果来选出有效角度方向,能够提高查重精度,进而能够提高最终选出的有效角度方向的准确性。If the duplicate check fails in the horizontal and/or vertical directions, at least one additional duplicate check is performed, so that a valid angle direction can be selected based on the results of multiple duplicate checks, thereby improving the accuracy of the duplicate check and further improving the accuracy of the valid angle direction finally selected.

在另一具体实施方式中,第一条件可以为角度方向为水平向下或垂直向右。若角度方向为水平向下或垂直向右,则增加至少一次查重。In another specific embodiment, the first condition may be that the angle direction is horizontally downward or vertically rightward. If the angle direction is horizontally downward or vertically rightward, at least one duplicate check is added.

由于在查重过程中,水平向下和垂直向右方向的邻块并没有被完全查重,因此,为提高查重精度,可以在水平向下和垂直向右方向增加至少一次查重。Since the neighboring blocks in the horizontal downward and vertical right directions are not completely checked for plagiarism during the plagiarism checking process, in order to improve the accuracy of the plagiarism checking, at least one plagiarism check can be added in the horizontal downward and vertical right directions.

可选地,邻块包括N个位于当前块水平方向上的水平邻块以及N个位于当前块垂直方向上的垂直邻块,水平向下方向增加的查重为两个水平邻块之间的查重,垂直向右方向增加的查重为两个垂直邻块之间的查重。Optionally, the neighboring blocks include N horizontal neighboring blocks located in the horizontal direction of the current block and N vertical neighboring blocks located in the vertical direction of the current block. The plagiarism check increased in the horizontal downward direction is the plagiarism check between two horizontal neighboring blocks, and the plagiarism check increased in the vertical rightward direction is the plagiarism check between two vertical neighboring blocks.

以增加一次查重为例,水平向下方向增加的查重为按照从上向下排序的第3个与第K个水平邻块之间的查重,垂直向右方向增加的查重为按照从左向右排序的第3个与第K个垂直邻块之间的查重,K=N/i,i为水平/垂直方向查重中选择的水平/垂直邻块的数量。Taking adding a plagiarism check as an example, the plagiarism check added in the horizontal downward direction is the plagiarism check between the 3rd and Kth horizontal neighboring blocks sorted from top to bottom, and the plagiarism check added in the vertical rightward direction is the plagiarism check between the 3rd and Kth vertical neighboring blocks sorted from left to right. K=N/i, i is the number of horizontal/vertical neighboring blocks selected in the horizontal/vertical direction plagiarism check.

结合图13进行举例说明,如图13所示,在水平向下方向增加对邻块对(A3,AK)的查重,在垂直向右方向增加对邻块对(B3,BK)的查重。An example is given in conjunction with FIG13 . As shown in FIG13 , the duplication check for the adjacent block pair (A 3 , AK ) is increased in the horizontal downward direction, and the duplication check for the adjacent block pair (B 3 , BK ) is increased in the vertical rightward direction.

在又一具体实施方式中,第一条件可以为未通过查重的角度方向的查重结果包括一对邻块的参考帧均不存在。若未通过查重的角度方向的查重结果包括一对邻块的参考帧均不存在,则为未通过查重的角度方向增加至少一次查重。In another specific implementation, the first condition may be that the duplicate checking result of the angle direction that failed the duplicate checking includes that the reference frames of a pair of adjacent blocks do not exist. If the duplicate checking result of the angle direction that failed the duplicate checking includes that the reference frames of a pair of adjacent blocks do not exist, at least one duplicate checking is added for the angle direction that failed the duplicate checking.

其中,可以将参考帧均不存在的至少一对邻块的序号进行平移,每一对平移后邻块仍属于未通过查重的角度方向,与参考帧均不存在的一对邻块的序号不同,对至少一对平移后邻块进行运动信息查重。Among them, the serial numbers of at least one pair of neighboring blocks that do not exist in any reference frame can be shifted, and each pair of neighboring blocks after the shift still belongs to an angle direction that has not passed the duplication check, which is different from the serial numbers of a pair of neighboring blocks that do not exist in any reference frame. The motion information of at least one pair of neighboring blocks after the shift is checked for duplication.

结合图14进行举例说明,如图14所示,邻块对(A1,AK)中两个邻块的参考帧均不存在,将邻块对中的两个邻块的序号向同一方向平移一位,得到邻块对(A2,AK+1),然后对(A2,AK+1)进行运动信息查重。An example is given in conjunction with FIG14 . As shown in FIG14 , the reference frames of the two neighboring blocks in the neighboring block pair (A 1 , AK ) do not exist. The serial numbers of the two neighboring blocks in the neighboring block pair are shifted one position in the same direction to obtain the neighboring block pair (A 2 , AK+1 ). Then, motion information duplication is checked for (A 2 , AK+1 ).

和/或,可以选择参考帧均不存在的一对邻块在远离当前块的方向上的相邻块进行运动信息查重。And/or, a pair of neighboring blocks in which no reference frame exists and which are located in a direction away from the current block may be selected for motion information duplication checking.

结合图15进行举例说明,如图15所示,邻块对(A1,AK)中两个邻块的参考帧均不存在,将该邻块对中两个邻块在远离当前块的方向上的相邻块组成的邻块对(a1,aK)进行运动信息查重。An example is given in conjunction with FIG. 15 . As shown in FIG. 15 , the reference frames of the two neighboring blocks in the neighboring block pair (A 1 , AK ) do not exist, and the neighboring block pair (a 1 , a K ) consisting of the two neighboring blocks in the direction away from the current block is subjected to motion information duplication check.

S740:利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。S740: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

S750:分别利用每个所述有效角度方向上的可用邻块和/或不可用邻块的运动信息计算所述当前块的预测值。S750: Calculate the prediction value of the current block by using the motion information of the available neighboring blocks and/or unavailable neighboring blocks in each of the effective angle directions respectively.

本实施例的步骤其他详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

本实施例中,在对邻块进行运动信息查重,在角度方向满足第一条件的情况下,增加至少一次查重的方式,能够使得查重结果更加准确,进而得到的有效角度方向更加准确。In this embodiment, when checking for duplicate motion information of neighboring blocks, if the angle direction satisfies the first condition, adding at least one duplication check can make the duplication check result more accurate, and thus the obtained effective angle direction more accurate.

图16是本申请角度模式帧间预测方法第八实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图16所示的流程顺序为限。如图16所示,本实施例可以包括:FIG16 is a flowchart of the eighth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG16. As shown in FIG16, this embodiment may include:

S810:为当前块构建候选邻块列表。S810: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S820:为不可用邻块设置运动信息。S820: Set motion information for the unavailable neighboring block.

S830:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S830: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.

其中若水平、垂直和水平向上的查重结果中的至少两个满足第二条件,则减少至少一次对水平向上的查重。If at least two of the horizontal, vertical and horizontal upward plagiarism checking results meet the second condition, then at least one horizontal upward plagiarism check is reduced.

可选地,水平向上的查重包括第一查重和第二查重,第一查重为对水平向上邻块与第一水平邻块之间的运动信息查重,第二查重为对水平向上邻块与第一垂直邻块之间的运动信息查重,水平向上邻块位于当前块的水平向上方向,第一水平邻块位于当前块的水平方向且与水平向上邻块相邻,第一垂直邻块位于当前块的垂直方向且与水平向上邻块相邻。Optionally, the horizontal upward plagiarism check includes a first plagiarism check and a second plagiarism check, the first plagiarism check is to check the motion information between the horizontal upward neighboring block and the first horizontal neighboring block, and the second plagiarism check is to check the motion information between the horizontal upward neighboring block and the first vertical neighboring block. The horizontal upward neighboring block is located in the horizontal upward direction of the current block, the first horizontal neighboring block is located in the horizontal direction of the current block and adjacent to the horizontal upward neighboring block, and the first vertical neighboring block is located in the vertical direction of the current block and adjacent to the horizontal upward neighboring block.

若水平、垂直和水平向上的查重结果中的至少两个满足第二条件,则减少至少一次对水平向上的查重包括:If at least two of the horizontal, vertical, and horizontal-upward duplicate checking results meet the second condition, reducing at least one horizontal-upward duplicate checking includes:

在一具体实施方式中,第二条件可以为:水平和垂直均为有效角度方向。In a specific implementation, the second condition may be: both horizontal and vertical are valid angle directions.

若水平和垂直均为有效角度方向,则无需对水平向上进行查重而判定水平向上为有效角度方向。If both horizontal and vertical are valid angle directions, there is no need to check for duplication in horizontal upward direction and horizontal upward direction can be determined as a valid angle direction.

结合图17进行举例说明,如图17所示,(A1,AK)为通过运动信息查重的水平方向上的邻块对,(B1,BK)为通过运动信息查重的垂直平方向上的邻块对,即水平和垂直均为有效角度方向,则无需对水平向上的邻块对(A1,E)和(E,B1)进行运动信息查重。Take Figure 17 for example. As shown in Figure 17, (A 1 , AK ) is a pair of neighboring blocks in the horizontal direction that pass the motion information duplication check, and (B 1 , BK ) is a pair of neighboring blocks in the vertical direction that pass the motion information duplication check, that is, both horizontal and vertical are valid angle directions, so there is no need to perform motion information duplication check on the horizontal neighboring block pairs (A 1 , E) and (E, B 1 ).

在另一具体实施方式中,第二条件可以为:水平为有效角度方向且第一查重和第二查重中的一个查重结果为有效。In another specific implementation, the second condition may be: horizontal is a valid angle direction and one of the first and second plagiarism checks is valid.

若水平为有效角度方向且第一查重和第二查重中的一个查重结果为有效,则无需进行第一查重和第二查重中的另一个而判定水平向上为有效角度方向。If horizontal is a valid angle direction and one of the first and second plagiarism checks is valid, there is no need to perform the other of the first and second plagiarism checks and it is determined that horizontal upward is a valid angle direction.

结合图18进行举例说明,如图18所示,水平方向上的邻块对(A1,AK)通过运动信息查重,即水平方向有效,并且,水平向上方向上的邻块对(E,B1)通过运动信息查重,即第二查重的查重结果为有效,则无需对水平向上方向上的邻块对(A1,E)进行运动信息查重,也即无需进行第一查重,就可判定水平向上为有效角度方向。An example is given in conjunction with Figure 18. As shown in Figure 18, the neighboring block pair ( A1 , AK ) in the horizontal direction passes the motion information duplication check, that is, the horizontal direction is valid, and the neighboring block pair (E, B1 ) in the horizontal upward direction passes the motion information duplication check, that is, the second duplication check result is valid, then there is no need to perform motion information duplication check on the neighboring block pair ( A1 , E) in the horizontal upward direction, that is, there is no need to perform the first duplication check, and it can be determined that the horizontal upward direction is a valid angle direction.

在又一具体实施方式中,第二条件可以为:垂直为有效角度方向且第一查重和第二查重中的一个查重结果为有效。In another specific implementation, the second condition may be: vertical is a valid angle direction and one of the first and second plagiarism checks is valid.

若垂直为有效角度方向且第一查重和第二查重中的一个查重结果为有效,则无需进行第一查重和第二查重中的另一个而判定水平向上为有效角度方向。If vertical is a valid angle direction and one of the first and second plagiarism checks is valid, there is no need to perform the other of the first and second plagiarism checks and it is determined that horizontal upward is a valid angle direction.

结合图19进行举例说明,如图19所示,垂直方向上的邻块对(B1,BK)通过运动信息查重,即垂直方向有效,并且,水平向上方向上的邻块对(A1,E)通过运动信息查重,即第一查重的查重结果为有效,则无需对水平向上方向上的邻块对(E,B1)进行运动信息查重,也即无需进行第二查重,就可判定水平向上为有效角度方向。An example is given in conjunction with Figure 19. As shown in Figure 19, the neighboring block pair (B 1 , B K ) in the vertical direction passes the motion information duplication check, that is, the vertical direction is valid, and the neighboring block pair (A 1 , E) in the horizontal upward direction passes the motion information duplication check, that is, the result of the first duplication check is valid, then there is no need to perform motion information duplication check on the neighboring block pair (E, B 1 ) in the horizontal upward direction, that is, there is no need to perform the second duplication check, and it can be determined that the horizontal upward direction is a valid angle direction.

S840:利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。S840: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

S850:分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。S850: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and/or unavailable neighboring blocks in each valid angle direction respectively.

本实施例的步骤其他详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

本实施例中,在对邻块进行查重时,若水平、垂直和水平向上的查重结果中的至少两个满足第二条件,则减少至少一次对水平向上的查重。相较于对每个水平向上进行两次查重的方式,能够减小查重过程中需要用到的计算开销。In this embodiment, when checking for plagiarism on neighboring blocks, if at least two of the horizontal, vertical and horizontal upward plagiarism checking results meet the second condition, at least one horizontal upward plagiarism check is reduced. Compared with the method of checking for plagiarism twice for each horizontal upward, the computational overhead required in the plagiarism checking process can be reduced.

图20是本申请角度模式帧间预测方法第九实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图20所示的流程顺序为限。如图20所示,本实施例可以包括:FIG20 is a flowchart of the ninth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG20. As shown in FIG20, this embodiment may include:

S910:为当前块构建候选邻块列表。S910: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S920:为不可用邻块设置运动信息。S920: Set motion information for the unavailable neighboring block.

S930:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,查重包括判断选择的至少一对邻块的参考帧的图像顺序索引是否相同以及运动矢量是否相同。S930: Check the motion information of neighboring blocks in each angular direction for duplication, and the angular direction for duplication checking is a valid angular direction. The duplication checking includes determining whether the image sequence indexes of the reference frames of at least one pair of selected neighboring blocks are the same and whether the motion vectors are the same.

当一个角度方向上的邻块对的参考帧的图像顺序索引以及运动矢量均相同的情况下,才判定该角度方向无效。When the image sequence index and motion vector of the reference frame of the neighboring block pair in an angle direction are the same, the angle direction is determined to be invalid.

此外,查重还可以包括判断选择的至少一对邻块的参考帧索引是否相同。其中,当查重包括判断参考帧索引、运动矢量和参考帧的图像顺序索引三者是否相同时,三者的判断顺序可以不受限定。In addition, the duplicate checking may also include determining whether the reference frame index of at least one pair of selected neighboring blocks is the same. When the duplicate checking includes determining whether the reference frame index, the motion vector and the image order index of the reference frame are the same, the determination order of the three may not be limited.

下面以先判断参考帧索引和运动矢量,再判断参考帧的图像顺序索引是否相同为例,对一个角度方向上的Nei_b1和Nei_b2两个邻块进行查重的过程进行说明:The following takes the example of first determining the reference frame index and motion vector, and then determining whether the image order index of the reference frame is the same, to illustrate the process of checking for duplicates of two neighboring blocks Nei_b1 and Nei_b2 in an angle direction:

(i)判断Nei_b1的前向参考帧和后向参考帧是否存在(参考帧索引是否大于或等于0),若其中一个存在则进行(ii);否则判定此角度方向无效。(i) Determine whether the forward reference frame and the backward reference frame of Nei_b1 exist (whether the reference frame index is greater than or equal to 0). If one of them exists, proceed to (ii); otherwise, determine that the angle direction is invalid.

(ii)判断Nei_b2的前向参考帧和后向参考帧是否存在,若其中一个存在则进行(iii);否则判定此角度方向无效。(ii) Determine whether the forward reference frame and backward reference frame of Nei_b2 exist. If one of them exists, proceed to (iii); otherwise, determine that the angle direction is invalid.

(iii)判断Nei_b1和Nei_b2的前向参考帧索引是否相同,若相同,则进行(iv);否则判定此角度方向无效。(iii) Determine whether the forward reference frame indexes of Nei_b1 and Nei_b2 are the same. If they are the same, proceed to (iv); otherwise, determine that the angle direction is invalid.

(iv)判断Nei_b1的前向参考帧是否存在,并且Nei_b1和Nei_b2的前向参考运动矢量是否相同,若存在并且不相同,则判定此角度方向为有效,否则进行(v)。(iv) Determine whether the forward reference frame of Nei_b1 exists and whether the forward reference motion vectors of Nei_b1 and Nei_b2 are the same. If they exist and are not the same, determine that this angle direction is valid, otherwise proceed to (v).

(v)判断Nei_b1和Nei_b2的后向参考帧索引是否相同,若相同,则进行(vi),否则,判定此角度方向为有效。(v) Determine whether the backward reference frame indexes of Nei_b1 and Nei_b2 are the same. If they are the same, proceed to (vi). Otherwise, determine that this angle direction is valid.

(vi)判断Nei_b1的后向参考帧是否存在,并且Nei_b1和Nei_b2的后向参考运动矢量是否相同,若存在并且不相同,则判定此角度方向为有效,否则进行(vii)。(vi) Determine whether the backward reference frame of Nei_b1 exists and whether the backward reference motion vectors of Nei_b1 and Nei_b2 are the same. If they exist and are not the same, determine that this angle direction is valid, otherwise proceed to (vii).

(vii)判断Nei_b1和Nei_b2的参考帧的图像顺序索引是否相同,若相同,则判定此角度方向无效;否则判定此角度方向有效。(vii) Determine whether the image order indexes of the reference frames of Nei_b1 and Nei_b2 are the same. If they are the same, determine that the angle direction is invalid; otherwise, determine that the angle direction is valid.

对于同一图像顺序索引的参考帧而言,其在不同的邻块的前向参考帧索引列表和/或后向参考帧索引列表中的参考帧索引可能不同。因此,若只根据参考帧索引和运动矢量来进行判断,可能会存在两个邻块的运动信息中参考帧索引不同使得对应的角度方向被判定为有效,然而这两个邻块的参考帧的图像顺序索引相同,运动矢量也相同,实质上这两个邻块的运动信息相同,对应的角度方向应该是无效的情况。因此,可以在查重过程中增加判断参考帧的图像顺序索引是否相同,可以提高判断结果的准确度。For reference frames with the same image sequence index, their reference frame indexes in the forward reference frame index list and/or backward reference frame index list of different neighboring blocks may be different. Therefore, if the judgment is only based on the reference frame index and the motion vector, there may be a situation where the reference frame indexes in the motion information of two neighboring blocks are different, so that the corresponding angle direction is judged to be valid. However, the image sequence indexes of the reference frames of the two neighboring blocks are the same, and the motion vectors are also the same. In fact, the motion information of the two neighboring blocks is the same, and the corresponding angle direction should be invalid. Therefore, it is possible to increase the judgment of whether the image sequence indexes of the reference frames are the same during the duplicate checking process, which can improve the accuracy of the judgment result.

S940:利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。S940: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

S950:分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。S950: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and/or unavailable neighboring blocks in each valid angle direction respectively.

本实施例的步骤其他详细描述请参见本申请中其他实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to other embodiments in this application and will not be repeated here.

本实施例中,在邻块进行运动信息查重过程包括判断选择的至少一对邻块的参考帧的图像顺序索引是否相同以及运动矢量是否相同,在参考帧的图像顺序索引是否相同以及运动矢量均相同的情况下,才判断对于角度方向无效,从而能够使得判断结果更加准确。In this embodiment, the process of checking for duplicate motion information in neighboring blocks includes determining whether the image sequence indexes of the reference frames of at least one pair of selected neighboring blocks are the same and whether the motion vectors are the same. Only when the image sequence indexes of the reference frames are the same and the motion vectors are the same, is it determined that the angle direction is invalid, thereby making the determination result more accurate.

图21是本申请角度模式帧间预测方法第十实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图21所示的流程顺序为限。如图21所示,本实施例可以包括:FIG21 is a flowchart of the tenth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG21. As shown in FIG21, this embodiment may include:

S1010:为当前块构建候选邻块列表。S1010: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S1020:为不可用邻块设置运动信息。S1020: Set motion information for the unavailable neighboring block.

S1030:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S1030: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.

S1040:利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。S1040: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

S1050:当前块被划分为多个子块,分别利用每个子块在有效角度方向上的对应邻块的运动信息进行运动补偿,得到每个子块的预测值。S1050: The current block is divided into a plurality of sub-blocks, and motion compensation is performed using motion information of a corresponding neighboring block of each sub-block in a valid angle direction to obtain a prediction value of each sub-block.

所有子块的预测值组成当前块的预测值,其中至少一个有效角度方向上子块进行运动补偿时使用了至少两个对应邻块的运动信息。The prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two corresponding neighboring blocks is used when performing motion compensation on the sub-blocks in at least one valid angular direction.

在一具体实施方式中,当前块被划分为多个第一尺寸的第一子块,每个第一子块由多个第二尺寸的第二子块组成,在至少一个有效角度方向上,至少一个第一子块的运动矢量为至少两个对应邻块的运动矢量的加权平均值。In a specific embodiment, the current block is divided into multiple first sub-blocks of a first size, each first sub-block is composed of multiple second sub-blocks of a second size, and in at least one effective angle direction, the motion vector of at least one first sub-block is a weighted average of motion vectors of at least two corresponding neighboring blocks.

可选地,第一尺寸为8*8,第二尺寸为4*4。Optionally, the first size is 8*8 and the second size is 4*4.

结合图22对一第一子块(尺寸为8*8)在水平和垂直方向上的运动矢量计算方法进行说明。The method for calculating the motion vector of a first sub-block (with a size of 8*8) in the horizontal and vertical directions is described in conjunction with FIG. 22 .

可以将两个对应水平邻块(AK-1和AK)的运动矢量的加权平均值,作为该第一子块在水平方向上的运动矢量,具体计算公式可以如下:The weighted average of the motion vectors of the two corresponding horizontal neighboring blocks ( AK-1 and AK ) may be used as the motion vector of the first sub-block in the horizontal direction. The specific calculation formula may be as follows:

其中,MV_Hor为第一子块在水平方向上的运动矢量,MV(Ak)为AK的运动矢量,MV(Ak-1)为Ak-1的运动矢量。Wherein, MV_Hor is the motion vector of the first sub-block in the horizontal direction, MV(A k ) is the motion vector of A K , and MV(A k-1 ) is the motion vector of A k-1 .

可以将两个对应垂直邻块(BK-1和BK)的运动矢量的加权平均值,作为该第一子块在垂直方向上的运动矢量,具体计算公式可以如下:The weighted average of the motion vectors of the two corresponding vertical neighboring blocks (B K-1 and B K ) may be used as the motion vector of the first sub-block in the vertical direction. The specific calculation formula may be as follows:

其中,MV_Ver为第一子块在水平方向上的运动矢量,MV(Bk)为Bk的运动矢量,MV(Bk-1)为Bk-1的运动矢量。Wherein, MV_Ver is the motion vector of the first sub-block in the horizontal direction, MV(B k ) is the motion vector of B k , and MV(B k-1 ) is the motion vector of B k-1 .

在计算第一子块的运动矢量时,以上计算第一子块在垂直和水平方向上的运动矢量的方式,在计算第一子块在其他方向上的运动矢量时同样适用。When calculating the motion vector of the first sub-block, the above manner of calculating the motion vector of the first sub-block in the vertical and horizontal directions is also applicable when calculating the motion vector of the first sub-block in other directions.

本实施例的步骤其它详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

本实施例中,在为有效角度方向上第一子块进行运动补偿时使用了至少两个对应邻块的运动信息,相较于仅使用一个对应邻块的运动信息对第一子块进行运动补偿的方式,能够得到更加准确的第一子块的预测值,提高编码的准确度。In this embodiment, motion information of at least two corresponding neighboring blocks is used when performing motion compensation for the first sub-block in the effective angle direction. Compared with the method of performing motion compensation for the first sub-block using only the motion information of one corresponding neighboring block, a more accurate prediction value of the first sub-block can be obtained, thereby improving the encoding accuracy.

图23是本申请角度模式帧间预测方法第十一实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图23所示的流程顺序为限。如图23所示,本实施例可以包括:FIG23 is a flow chart of the eleventh embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG23. As shown in FIG23, this embodiment may include:

S1110:为当前块构建候选邻块列表。S1110: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S1120:为不可用邻块设置运动信息。S1120: Set motion information for the unavailable neighboring block.

S1130:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S1130: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is the valid angular direction.

S1140:将有效角度方向填入角度模式列表,得到有效角度方向的角度模式索引。S1140: Fill the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction.

由于将角度模式帧间预测和其他帧间预测模式共同一个模式索引列表时,角度模式索引在模式索引列表中对应的索引取值范围为4~8。When the angle mode inter prediction and other inter prediction modes are put into one mode index list, the index value range of the angle mode index in the mode index list is 4-8.

可以为角度模式帧间预测选出的有效角度单独设置一个模式列表(即角度模式列表),则将角度模式帧间预测选出的有效角度方向填入角度模式列表后,得到的角度模式索引的取值范围为0~4。相较于与其他模式共用一模式索引列表的方向,在后续编码过程中需要更少的比特数开销。并且,将角度模式索引独立出来之后,可以缩减共用的模式列表中的索引数量。A separate mode list (i.e., angle mode list) can be set for the valid angles selected by the angle mode inter-frame prediction. After the valid angle direction selected by the angle mode inter-frame prediction is filled into the angle mode list, the value range of the obtained angle mode index is 0 to 4. Compared with the direction sharing a mode index list with other modes, less bit overhead is required in the subsequent encoding process. In addition, after the angle mode index is separated, the number of indexes in the shared mode list can be reduced.

S1150:利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。S1150: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

此外,在得到当前块的预测值之后,还可以包括:In addition, after obtaining the prediction value of the current block, it can also include:

S1160:分别利用每个有效角度方向上的邻块的运动信息计算当前块的预测值以及率失真代价。S1160: Calculate the prediction value and rate-distortion cost of the current block using the motion information of the neighboring blocks in each valid angle direction.

在计算出当前块的预测值以及率失真代价之后,可以与其他帧间模式一起进行率失真代价优化,以选出最佳的帧间预测模式来对当前块进行编码。因此,在本实施例的基础上,还可以包括步骤:After calculating the prediction value and rate distortion cost of the current block, the rate distortion cost can be optimized together with other inter-frame modes to select the best inter-frame prediction mode to encode the current block. Therefore, based on this embodiment, the following steps can also be included:

S1170:对当前块进行编码得到当前块的码流。S1170: Encode the current block to obtain a code stream of the current block.

当前块的码流中包括角度模式标记,角度模式标记用于表示当前块是否采用角度模式帧间预测。The bitstream of the current block includes an angle mode flag, and the angle mode flag is used to indicate whether the current block adopts angle mode inter-frame prediction.

本实施例的步骤其他详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

由于在编码过程中需要对选择的帧间预测模式对应的模式列表进行编码,因此本实施例中,为角度模式帧间预测设置一独立的角度模式列表,能够缩减原始的模式列表中索引列表数量,从而能够减小编码过程中需要进行编码的模式列表长度,降低编码过程中所需要的比特数开销(码率)。Since the mode list corresponding to the selected inter-frame prediction mode needs to be encoded during the encoding process, in this embodiment, an independent angle mode list is set for angle mode inter-frame prediction, which can reduce the number of index lists in the original mode list, thereby reducing the length of the mode list that needs to be encoded during the encoding process and reducing the bit overhead (code rate) required during the encoding process.

图24是本申请角度模式帧间预测方法第十二实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图24所示的流程顺序为限。如图24所示,本实施例可以包括:FIG24 is a flowchart of the twelfth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG24. As shown in FIG24, this embodiment may include:

S1210:为当前块构建候选邻块列表。S1210: Construct a candidate neighbor block list for the current block.

候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

S1220:为不可用邻块设置运动信息。S1220: Set motion information for the unavailable neighboring block.

S1230:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S1230: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

S1240:利用当前块的纹理方向确定各有效角度方向的顺序。S1240: Determine the order of each valid angle direction using the texture direction of the current block.

其中,可以基于当前块从参考像素的梯度方向来确定各有效角度方向的顺序。参阅图25,S1240具体可以包括:The order of the effective angle directions may be determined based on the gradient direction of the current block from the reference pixel. Referring to FIG. 25 , S1240 may specifically include:

S1241:利用梯度算子计算当前块的参考像素的梯度方向。S1241: Calculate the gradient direction of the reference pixel of the current block using a gradient operator.

参考像素可以是帧内预测模式下当前块的参考像素。参考像素位于当前块的已编码侧(例如左侧和上侧)。梯度算子可以但不限于为Roberts、Prewitt、Sobel、拉普拉斯、Canny算子等。下面以Sobel算子和拉普拉斯算子为例进行说明:The reference pixel may be a reference pixel of the current block in the intra prediction mode. The reference pixel is located on the coded side (e.g., left and top) of the current block. The gradient operator may be, but is not limited to, Roberts, Prewitt, Sobel, Laplace, Canny operator, etc. The Sobel operator and Laplace operator are used as examples for explanation below:

(1)利用Sobel算子计算当前块的参考像素的梯度方向的公式可以如下:(1) The formula for calculating the gradient direction of the reference pixel of the current block using the Sobel operator can be as follows:

Sx=-a1f(x-1,y-1)-a2f(x-1,y)-a3f(x-1,y+1)+a1f(x+1,y-1)+a2f(x+1,y)+a3f(x+1,y+1)S x =-a 1 f(x-1,y-1)-a 2 f(x-1,y)-a 3 f(x-1,y+1)+a 1 f(x+1,y -1)+a 2 f(x+1,y)+a 3 f(x+1,y+1)

Sy=-a1f(x-1,y+1)-a2f(x,y+1)-a3f(x+1,y+1)+a1f(x-1,y-1)+a2f(x,y-1)+a3f(x+1,y-1)S y =-a 1 f(x-1,y+1)-a 2 f(x,y+1)-a 3 f(x+1,y+1)+a 1 f(x-1,y -1)+a 2 f(x,y-1)+a 3 f(x+1,y-1)

(2)利用拉普拉斯算子计算当前块的参考像素的梯度方向的公式可以如下:(2) The formula for calculating the gradient direction of the reference pixel of the current block using the Laplacian operator can be as follows:

Sx=a1(f(x-1,y)+f(x+1,y))-a2f(x,y)S x =a 1 (f(x-1,y)+f(x+1,y))-a 2 f(x,y)

Sy=a1(f(x,y-1)+f(x,y+1))-a2f(x,y)S y =a 1 (f(x,y-1)+f(x,y+1))-a 2 f(x,y)

其中,a1、a2和a3为常量,f(x,y)为参考像素的像素值,Sx为参考像素的水平梯度,Sy为参考像素的垂直梯度,Angle为参考像素的梯度方向。Wherein, a 1 , a 2 and a 3 are constants, f(x, y) is the pixel value of the reference pixel, S x is the horizontal gradient of the reference pixel, Sy is the vertical gradient of the reference pixel, and Angle is the gradient direction of the reference pixel.

S1242:统计梯度方向落入以各有效角度方向为中心的角度范围内的参考像素的数量。S1242: Count the number of reference pixels whose gradient directions fall within the angle range centered on each valid angle direction.

其中,角度范围大小可以根据实际需要而定。例如,以水平方向为中心的角度范围可以为0°±15°,以垂直方向为中心的角度范围可以为90°±15°,以水平向上方向为中心的角度范围可以为135°±15°,以水平向下方向为中心的角度范围可以为-135°±15°,以垂直向右方向为中心的角度范围可以为45°±15°。The angle range may be determined according to actual needs. For example, the angle range centered on the horizontal direction may be 0°±15°, the angle range centered on the vertical direction may be 90°±15°, the angle range centered on the horizontal upward direction may be 135°±15°, the angle range centered on the horizontal downward direction may be -135°±15°, and the angle range centered on the vertical right direction may be 45°±15°.

S1243:按照参考像素的数量从大到小的顺序对有效角度方向进行排序。S1243: Sort the valid angle directions in descending order of the number of reference pixels.

按照落入角度范围的参考像素的数量从大到小的顺序对有效角度方向进行排序。The valid angle directions are sorted in descending order according to the number of reference pixels falling within the angle range.

S1250:按顺序将有效角度方向填入模式列表。S1250: Fill the valid angle directions into the mode list in order.

S1260:利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。S1260: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

S1270:分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。S1270: Calculate the prediction value of the current block using the motion information of the available neighboring blocks and/or unavailable neighboring blocks in each valid angle direction respectively.

本实施例的步骤其他详细描述请参见前面的实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to the previous embodiments and will not be repeated here.

本实施例中,在通过查重过程从多个角度方向选出有效角度方向的基础上,进一步根据纹理方向确定各有效角度方向的顺序,即统计当前块中,梯度方向落入以各有效角度方向为中心的角度范围内的参考像素的数量,按照落入的参考像素数量从大到小的顺序对有效角度方向进行排序。由于对应参考像素数量越大的有效角度方向越接近当前块的纹理方向,因此,按顺序将有效角度方向填入模式列表,能够使得接近当前块的纹理方向的有效角度方向在模式列表中的排序靠前,在编码过程中越容易被选择到,从而能够提高编码的准确性,并且能够降低编码过程所需码率。In this embodiment, on the basis of selecting effective angle directions from multiple angle directions through the duplication checking process, the order of each effective angle direction is further determined according to the texture direction, that is, the number of reference pixels in the current block whose gradient direction falls within the angle range centered on each effective angle direction is counted, and the effective angle directions are sorted in descending order according to the number of reference pixels that fall within. Since the effective angle direction with a larger number of corresponding reference pixels is closer to the texture direction of the current block, the effective angle directions are filled into the pattern list in order, so that the effective angle direction close to the texture direction of the current block is ranked higher in the pattern list, and is easier to be selected during the encoding process, thereby improving the accuracy of the encoding and reducing the bit rate required for the encoding process.

图26是本申请角度模式帧间预测方法第十三实施例的流程示意图。需注意的是,若有实质上相同的结果,本实施例并不以图25所示的流程顺序为限。如图26所示,本实施例可以包括:FIG26 is a flowchart of the thirteenth embodiment of the angle mode inter-frame prediction method of the present application. It should be noted that if there is substantially the same result, this embodiment is not limited to the flow sequence shown in FIG25. As shown in FIG26, this embodiment may include:

S1301:为当前块构建候选邻块列表。S1301: Construct a candidate neighbor block list for the current block.

候选邻块列表包括所述当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块;The candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;

S1302:为不可用邻块设置运动信息。S1302: Set motion information for unavailable neighboring blocks.

S1303:对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。S1303: Check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

S1304:利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。S1304: Modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

S1305:当前块被划分为多个子块,分别利用每个子块在有效角度方向上的对应邻块的运动信息,得到每个子块的运动信息。S1305: The current block is divided into a plurality of sub-blocks, and the motion information of each sub-block is obtained by using the motion information of the corresponding neighboring block of each sub-block in the effective angle direction.

运动信息包括运动矢量。其中,运行信息可以包括前向运动信息和后向运动信息,前向运动信息可以包括前向运动矢量和前向参考帧索引,后向运动信息可以包括后向运动矢量和后向参考帧索引。The motion information includes a motion vector. The motion information may include forward motion information and backward motion information, the forward motion information may include a forward motion vector and a forward reference frame index, and the backward motion information may include a backward motion vector and a backward reference frame index.

可以分别利用当前子块在每个有效角度方向上的对应邻块的运动信息,得到当前子块的每个运动信息。Each piece of motion information of the current sub-block may be obtained by using the motion information of the corresponding neighboring block of the current sub-block in each effective angle direction.

S1306:分别利用多个修正运动矢量对每个子块的第一预测值进行修正,得到每个子块的多个第二预测值。S1306: Correct the first prediction value of each sub-block using the multiple corrected motion vectors respectively to obtain multiple second prediction values of each sub-block.

第一预测值是利用运动信息进行运动补偿得到的。The first prediction value is obtained by performing motion compensation using the motion information.

在当前块的前向参考帧的图像顺序索引和后向参考帧的图像顺序索引相同的情况下,可用利用解码端运动矢量细化(DMVR)技术对每个子块的第一预测值进行修正,得到每个子块的多个第二预测值。具体如下:When the image order index of the forward reference frame of the current block is the same as the image order index of the backward reference frame, the first prediction value of each sub-block can be modified by using the decoding end motion vector refinement (DMVR) technology to obtain multiple second prediction values of each sub-block. The details are as follows:

参考图27,S1306可以包括以下子步骤:Referring to FIG. 27 , S1306 may include the following sub-steps:

S13061:分别利用多个修正运动矢量对每个子块的运动矢量进行修正,得到每个子块的多个修正后的运动矢量。S13061: Use the multiple corrected motion vectors to correct the motion vector of each sub-block respectively, to obtain multiple corrected motion vectors of each sub-block.

第一预测值也可以被称为第一预测像素值,可以分别利用当前子块的每个运动信息进行补偿得到对应的第一预测值。第一预测值可以包括前向第一预测值和后向第一预测值,前向第一预测值可以利用前向运动信息进行运动补偿得到,后向第一预测值可以利用后向运动信息进行运动补偿得到。The first prediction value may also be referred to as a first prediction pixel value, and each motion information of the current sub-block may be used to perform compensation to obtain the corresponding first prediction value. The first prediction value may include a forward first prediction value and a backward first prediction value, the forward first prediction value may be obtained by performing motion compensation using the forward motion information, and the backward first prediction value may be obtained by performing motion compensation using the backward motion information.

可以将当前子块的前向第一预测值对应的块称为前向第一预测块,可以将当前子块的后向第一预测值对应的块称为后向第一预测块。换句话说,可以将当前子块的前向运动信息指向的块称为前向第一预测块,可以将当前子块的后向运动信息指向的块称为后向第一预测块。The block corresponding to the forward first prediction value of the current sub-block may be called the forward first prediction block, and the block corresponding to the backward first prediction value of the current sub-block may be called the backward first prediction block. In other words, the block pointed to by the forward motion information of the current sub-block may be called the forward first prediction block, and the block pointed to by the backward motion information of the current sub-block may be called the backward first prediction block.

每个子块的多个修正运动矢量可以在前/后向第一预测块的搜索范围内搜索得到。Multiple modified motion vectors of each sub-block can be searched within the search range of the forward/backward first prediction block.

前向第一预测块的搜索范围可以为以前向第一预测块的顶点(左上角像素所在的点)为中心的N*N像素范围,搜索时,可以按照预定顺序遍历搜索范围内的所有像素点,例如按照从左到右,从上到下的光栅扫描顺序遍历所有像素点,获取N2个前向修正运动矢量ΔMV1,ΔMV1为顶点指向搜索像素点的运动矢量,或者说,ΔMV1为前向第一预测块指向前向第二预测块(参考后面的说明)的运动矢量。The search range of the forward first prediction block can be an N*N pixel range centered on the vertex of the forward first prediction block (the point where the upper left corner pixel is located). During the search, all pixel points within the search range can be traversed in a predetermined order, for example, all pixel points are traversed in a raster scanning order from left to right and from top to bottom to obtain N 2 forward corrected motion vectors ΔMV1, where ΔMV1 is the motion vector from the vertex pointing to the search pixel point, or in other words, ΔMV1 is the motion vector from the forward first prediction block to the forward second prediction block (refer to the following description).

后向第一预测块的搜索范围可以为以后向第一预测块的顶点(右下角像素所在的点)为中心的N*N像素范围,搜索时,可以按照预定顺序遍历搜索范围内的所有像素点,获取N2个后向修正运动矢量,例如按照从右到左,从下到上的光栅扫描顺序遍历所有像素点,获取多个后向修正运动矢量ΔMV2,ΔMV2为顶点指向搜索像素点的运动矢量,或者说,ΔMV1为后向第一预测块指向后向第二预测块的运动矢量。The search range of the backward first prediction block can be an N*N pixel range centered on the vertex of the backward first prediction block (the point where the lower right corner pixel is located). During the search, all pixel points within the search range can be traversed in a predetermined order to obtain N 2 backward corrected motion vectors. For example, all pixel points are traversed in a raster scanning order from right to left and from bottom to top to obtain multiple backward corrected motion vectors ΔMV2, where ΔMV2 is the motion vector from the vertex pointing to the search pixel point, or in other words, ΔMV1 is the motion vector from the backward first prediction block to the backward second prediction block.

为简化描述,结合图28对在前向第一预测块的搜索范围内搜索得到前向修正运动矢量ΔMV1为例进行说明:To simplify the description, an example of obtaining a forward modified motion vector ΔMV1 by searching within the search range of the forward first prediction block is used as an example to illustrate:

找到搜索点C后,将前向第一预测块进行平移,使顶点A与搜索点C重合,得到前向第二预测块,或者说,在遍历到C点时,形成一个以C点为顶点的与子块尺寸相同的前向第二预测块,计算获取前向第二预测块的预测值。ΔMV1为顶点A指向搜索点C的运动矢量,或者说,ΔMV1为顶点A所在前向第一预测块指向搜索点C所在前向第二预测块的运动矢量。After finding the search point C, the forward first prediction block is translated so that the vertex A coincides with the search point C to obtain the forward second prediction block. In other words, when traversing to point C, a forward second prediction block with the same size as the sub-block is formed with point C as the vertex, and the prediction value of the forward second prediction block is calculated. ΔMV1 is the motion vector from vertex A to search point C, or ΔMV1 is the motion vector from the forward first prediction block where vertex A is located to the forward second prediction block where search point C is located.

每组对应的前向修正运动矢量和后向修正运动矢量大小相等,方向相反。Each group of corresponding forward correction motion vectors and backward correction motion vectors are equal in magnitude and opposite in direction.

可以利用前向修正运动矢量对子块的前向运动矢量进行修正,得到修正后的前向运动矢量,可以利用后向修正运动矢量对子块的后向运动矢量进行修正,得到修正后的后向运动矢量。The forward corrected motion vector may be used to correct the forward motion vector of the sub-block to obtain a corrected forward motion vector, and the backward corrected motion vector may be used to correct the backward motion vector of the sub-block to obtain a corrected backward motion vector.

例如,子块的运动矢量为(MV1,MV2),则子块修正后的运动矢量为(MV1+ΔMV1,MV2+ΔMV2)。For example, the motion vector of the sub-block is (MV1, MV2), and the corrected motion vector of the sub-block is (MV1+ΔMV1, MV2+ΔMV2).

S13062:分别利用多个包含修正后的运动矢量的运动信息对每个子块进行运动补偿,得到每个子块的多个第二预测值。S13062: Perform motion compensation on each sub-block using multiple pieces of motion information including the corrected motion vector to obtain multiple second prediction values for each sub-block.

第二预测值可以为包含修正后的运动矢量的运动信息指向的第二预测块的像素值。The second prediction value may be a pixel value of the second prediction block pointed to by the motion information including the modified motion vector.

S1307:分别为每个子块选择评价指标最小的第二预测值对应的修正运动矢量作为子块的最终修正运动矢量。S1307: Select, for each sub-block, a corrected motion vector corresponding to the second prediction value with the smallest evaluation index as the final corrected motion vector of the sub-block.

可以基于绝对误差和(Sum of Absolute Difference,SAD)算法,获取子块的N2对前向第二预测值和后向第二预测值之间的评价指标(SAD),选择SAD最小的一对前向第二预测值和后向第二预测值对应的修正运动矢量,作为子块的最终修正运动矢量。Based on the Sum of Absolute Difference (SAD) algorithm, an evaluation index (SAD) between N 2 pairs of forward second prediction values and backward second prediction values of the sub-block can be obtained, and a corrected motion vector corresponding to a pair of forward second prediction values and backward second prediction values with the smallest SAD is selected as the final corrected motion vector of the sub-block.

S1308:利用所有子块的最终修正运动矢量进行修正,得到修正后的运动矢量。S1308: Perform correction using the final corrected motion vectors of all sub-blocks to obtain corrected motion vectors.

S1309:利用修正后的运动矢量获取每个子块的预测值,所有子块的预测值组成当前块的预测值。S1309: Obtain the prediction value of each sub-block using the corrected motion vector, and the prediction values of all sub-blocks constitute the prediction value of the current block.

利用修正后的运动矢量计算子块的预测值,子块的预测值可以为前向预第二测值和后向预测值的均值。The predicted value of the sub-block is calculated using the modified motion vector, and the predicted value of the sub-block may be an average of the forward predicted value and the backward predicted value.

本实施例步骤的其他详细说明请参见其他实施例,在此不再重复。For other detailed descriptions of the steps of this embodiment, please refer to other embodiments and will not be repeated here.

本实施例中,在对当前块的运动信息进行运动补偿得到预测值之前,先利用DMWR技术对当前块的运动矢量进行修正,能够提高预测的准确度。In this embodiment, before performing motion compensation on the motion information of the current block to obtain a prediction value, the motion vector of the current block is first corrected using the DMWR technology, which can improve the accuracy of the prediction.

需要说明的是,在互相不冲突的前提下,本申请实施例可以进行组合。It should be noted that the embodiments of the present application can be combined under the premise of not conflicting with each other.

图29是本申请一种角度模式帧间预测装置第一实施例的结构示意图。如图29所示,该装置可以包括:构建模块11、设置模块12、查重模块13、修改模块14和计算模块15。Fig. 29 is a schematic diagram of the structure of a first embodiment of an angle mode inter-frame prediction device of the present application. As shown in Fig. 29, the device may include: a construction module 11, a setting module 12, a duplicate checking module 13, a modification module 14 and a calculation module 15.

其中,构建模块11可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。Among them, the construction module 11 can be used to construct a candidate neighbor block list for the current block, and the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块12可以用于为不可用邻块设置运动信息。The setting module 12 may be configured to set motion information for unavailable neighboring blocks.

查重模块13可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。The duplication checking module 13 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

修改模块14,用于利用有效角度方向上的不可用邻块的参考块的运动信息,对有效角度方向上的不可用邻块的运动信息进行修改。The modification module 14 is used to modify the motion information of the unavailable neighboring block in the effective angle direction by using the motion information of the reference block of the unavailable neighboring block in the effective angle direction.

计算模块15可以用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 15 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in each effective angle direction.

图30是本申请一种角度模式帧间预测装置第二实施例的结构示意图。如图30所示,该装置可以包括:构建模块21、设置模块22、查重模块23、修改模块24和计算模块25。构建模块21可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。Figure 30 is a schematic diagram of the structure of the second embodiment of an angle mode inter-frame prediction device of the present application. As shown in Figure 30, the device may include: a construction module 21, a setting module 22, a duplicate checking module 23, a modification module 24 and a calculation module 25. The construction module 21 can be used to construct a candidate neighbor block list for the current block, and the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块22可以用于在不可用邻块的时域同位块可用的情况下,利用时域同位块的运动信息为不可用邻块设置运动信息,以及用于在不可用邻块的时域同位块不可用的情况下,设置初始值为不可用邻块的运动信息。The setting module 22 can be used to set motion information for the unavailable neighboring block using the motion information of the time domain co-located block when the time domain co-located block of the unavailable neighboring block is available, and to set an initial value to the motion information of the unavailable neighboring block when the time domain co-located block of the unavailable neighboring block is unavailable.

查重模块23可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。The duplication checking module 23 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

修改模块24可以用于利用所述运动信息为初始值的不可用邻块的参考块的运动信息,对运动信息为所述初始值的可用邻块的运动信息进行修改。The modification module 24 may be configured to modify the motion information of the available neighboring block whose motion information is the initial value by using the motion information of the reference block of the unavailable neighboring block whose motion information is the initial value.

计算模块25可以用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 25 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in each effective angle direction.

图31是本申请一种角度模式帧间预测装置第三实施例的结构示意图。如图31所示,该装置可以包括:构建模块31、设置模块32、查重模块33、修改模块34和计算模块35。Fig. 31 is a schematic diagram of the structure of a third embodiment of an angle mode inter-frame prediction device of the present application. As shown in Fig. 31, the device may include: a construction module 31, a setting module 32, a duplicate checking module 33, a modification module 34 and a calculation module 35.

构建模块31可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The construction module 31 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块32可以用于为不可用邻块设置运动信息。The setting module 32 may be configured to set motion information for unavailable neighboring blocks.

查重模块33,用于根据当前块的尺寸在各角度方向上选择至少一对邻块进行运动信息查重,通过查重的角度方向为有效角度方向。The duplication checking module 33 is used to select at least one pair of neighboring blocks in each angular direction according to the size of the current block to perform motion information duplication checking, and the angular direction that passes the duplication checking is a valid angular direction.

修改模块34可以用于利用不可用邻块的参考块的运动信息,对可用邻块的运动信息进行修改。The modification module 34 may be configured to modify the motion information of the available neighboring block by using the motion information of the reference block of the unavailable neighboring block.

计算模块35可以用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 35 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in each effective angle direction.

图32是本申请一种角度模式帧间预测装置第四实施例的结构示意图。如图32所示,该装置可以包括:构建模块41、设置模块42、查重模块43、修改模块44和计算模块45。Fig. 32 is a schematic diagram of the structure of a fourth embodiment of an angle mode inter-frame prediction device of the present application. As shown in Fig. 32, the device may include: a construction module 41, a setting module 42, a duplicate checking module 43, a modification module 44 and a calculation module 45.

构建模块41可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的所述邻块为可用邻块,剩余邻块为不可用邻块。The construction module 41 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块42可以用于为不可用邻块设置运动信息。The setting module 42 may be configured to set motion information for unavailable neighboring blocks.

查重模块43可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,其中若角度方向满足第一条件,则增加至少一次查重。The duplication checking module 43 can be used to check the motion information duplication of neighboring blocks in each angular direction. The angular direction that passes the duplication check is a valid angular direction. If the angular direction satisfies the first condition, at least one duplication check is added.

修改模块44可以用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改;The modification module 44 may be used to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;

计算模块45可以用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 45 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in each effective angle direction.

图33是本申请一种角度模式帧间预测装置第五实施例的结构示意图。如图33所示,该装置可以包括:构建模块51、设置模块52、查重模块53、修改模块54和计算模块55。Fig. 33 is a schematic diagram of the structure of a fifth embodiment of an angle mode inter-frame prediction device of the present application. As shown in Fig. 33, the device may include: a construction module 51, a setting module 52, a duplicate checking module 53, a modification module 54 and a calculation module 55.

构建模块51可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The construction module 51 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块52可以用于为不可用邻块设置运动信息。The setting module 52 may be configured to set motion information for unavailable neighboring blocks.

查重模块53可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,其中若水平、垂直和水平向上的查重结果中的至少两个满足第二条件,则减少至少一次对水平向上的查重。The duplication checking module 53 can be used to check the motion information of neighboring blocks in each angular direction. The angular direction of the duplication check is the valid angular direction. If at least two of the horizontal, vertical and horizontal upward duplication checking results meet the second condition, at least one horizontal upward duplication check is reduced.

修改模块54可以用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。The modification module 54 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

计算模块55可以用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 55 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in each effective angle direction.

图34是本申请一种角度模式帧间预测装置第六实施例的结构示意图。如图34所示,该装置可以包括:构建模块61、设置模块62、查重模块63、修改模块64和计算模块65。Fig. 34 is a schematic diagram of the structure of a sixth embodiment of an angle mode inter-frame prediction device of the present application. As shown in Fig. 34, the device may include: a construction module 61, a setting module 62, a duplicate checking module 63, a modification module 64 and a calculation module 65.

构建模块61,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The construction module 61 is used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块62可以用于为不可用邻块设置运动信息。The setting module 62 may be configured to set motion information for unavailable neighboring blocks.

查重模块63可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向,查重包括判断选择的至少一对邻块的参考帧的图像顺序索引是否相同以及运动是否相同。The duplication checking module 63 can be used to check the motion information of neighboring blocks in each angular direction. The angular direction of the duplication check is a valid angular direction. The duplication check includes determining whether the image sequence index of the reference frame of at least one pair of selected neighboring blocks is the same and whether the motion is the same.

修改模块64可以用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。The modification module 64 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

计算模块65可以用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 65 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in each effective angle direction.

图35是本申请一种角度模式帧间预测装置第七实施例的结构示意图。如图35所示,该装置可以包括:构建模块71、设置模块72、查重模块73、修改模块74和计算模块75。Fig. 35 is a schematic diagram of the structure of the seventh embodiment of an angle mode inter-frame prediction device of the present application. As shown in Fig. 35, the device may include: a construction module 71, a setting module 72, a duplicate checking module 73, a modification module 74 and a calculation module 75.

构建模块71,用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The construction module 71 is used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块72可以用于为不可用邻块设置运动信息。The setting module 72 may be configured to set motion information for unavailable neighboring blocks.

查重模块73可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。The duplication checking module 73 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

修改模块74可以用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。The modification module 74 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

计算模块75可以用于在当前块被划分为多个子块的情况下,分别利用每个子块在所述有效角度方向上的对应邻块的运动信息进行运动补偿,得到每个子块的预测值,所有子块的预测值组成当前块的预测值,其中至少一个有效角度方向上子块进行运动补偿时使用了至少两个对应邻块的运动信息。The calculation module 75 can be used to perform motion compensation using the motion information of the corresponding neighboring blocks of each sub-block in the effective angle direction when the current block is divided into multiple sub-blocks, so as to obtain a prediction value of each sub-block, and the prediction values of all sub-blocks constitute the prediction value of the current block, wherein the motion information of at least two corresponding neighboring blocks is used when performing motion compensation for the sub-block in at least one effective angle direction.

图36是本申请一种角度模式帧间预测装置第八实施例的结构示意图。如图36所示,该装置可以包括:构建模块81、设置模块82、查重模块83、填入模块84、修改模块85和计算模块86。Fig. 36 is a schematic diagram of the structure of the eighth embodiment of an angle mode inter-frame prediction device of the present application. As shown in Fig. 36, the device may include: a construction module 81, a setting module 82, a duplicate checking module 83, a filling module 84, a modification module 85 and a calculation module 86.

构建模块81可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The construction module 81 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块82可以用于为不可用邻块设置运动信息。The setting module 82 may be configured to set motion information for unavailable neighboring blocks.

查重模块83可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。The duplication checking module 83 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

填入模块84可以用于将有效角度方向填入角度模式列表,得到有效角度方向的角度模式索引。The filling module 84 can be used to fill the valid angle direction into the angle mode list to obtain the angle mode index of the valid angle direction.

修改模块85可以用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。The modification module 85 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

计算模块86可以用于分别利用每个有效角度方向上的可用和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 86 may be configured to calculate a prediction value of the current block using motion information of available and/or unavailable neighboring blocks in each valid angular direction.

图37是本申请一种角度模式帧间预测装置第九实施例的结构示意图。如图37所示,该装置可以包括:构建模块91、设置模块92、查重模块93、确定模块94、填入模块95、修改模块96和计算模块97。FIG37 is a schematic diagram of the structure of a ninth embodiment of an angle mode inter-frame prediction device of the present application. As shown in FIG37 , the device may include: a construction module 91, a setting module 92, a duplicate checking module 93, a determination module 94, a filling module 95, a modification module 96 and a calculation module 97.

构建模块91可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The construction module 91 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块92可以用于为不可用邻块设置运动信息。The setting module 92 may be configured to set motion information for unavailable neighboring blocks.

查重模块93可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。The duplication checking module 93 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

确定模块94可以用于利用当前块的纹理方向确定各有效角度方向的顺序。The determination module 94 may be configured to determine the order of the valid angular directions using the texture direction of the current block.

填入模块95可以用于按顺序将有效角度方向填入模式列表。The filling module 95 can be used to fill the valid angular directions into the mode list in sequence.

修改模块96可以用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。The modification module 96 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

计算模块97可以用于分别利用每个有效角度方向上的可用邻块和/或不可用邻块的运动信息计算当前块的预测值。The calculation module 97 may be configured to calculate a prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in each effective angle direction.

图38是本申请一种角度模式帧间预测装置第十实施例的结构示意图。如图38所示,该装置可以包括:构建模块101、设置模块102、查重模块103、修改模块104、第一计算模块105、第一修正模块106、选择模块107、第二修正模块108和第二计算模块109。FIG38 is a schematic diagram of the structure of the tenth embodiment of an angle mode inter-frame prediction device of the present application. As shown in FIG38 , the device may include: a construction module 101, a setting module 102, a duplicate checking module 103, a modification module 104, a first calculation module 105, a first correction module 106, a selection module 107, a second correction module 108, and a second calculation module 109.

构建模块101可以用于为当前块构建候选邻块列表,候选邻块列表包括当前块在多个角度方向上的邻块,其中已编码的采用帧间预测的邻块为可用邻块,剩余邻块为不可用邻块。The construction module 101 can be used to construct a candidate neighbor block list for the current block, the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, among which the encoded neighbor blocks using inter-frame prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.

设置模块102可以用于为不可用邻块设置运动信息。The setting module 102 may be configured to set motion information for unavailable neighboring blocks.

查重模块103可以用于对各角度方向上的邻块进行运动信息查重,通过查重的角度方向为有效角度方向。The duplication checking module 103 can be used to check the motion information duplication of neighboring blocks in each angular direction, and the angular direction that passes the duplication check is a valid angular direction.

修改模块104可以用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行修改。The modification module 104 may be configured to modify the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block.

第一计算模块105可以用于在当前块被划分为多个子块的情况下,分别利用每个子块在有效角度方向上的对应邻块的运动信息,得到每个子块的运动信息,运动信息包括运动矢量。The first calculation module 105 can be used to obtain motion information of each sub-block by using motion information of a corresponding neighboring block of each sub-block in a valid angle direction when the current block is divided into multiple sub-blocks, where the motion information includes a motion vector.

第一修正模块106可以用于分别利用多个修正运动矢量对每个子块的第一预测值进行修正,得到每个子块的多个第二预测值,第一预测值是利用运动信息进行运动补偿得到的。The first correction module 106 can be used to correct the first prediction value of each sub-block using multiple correction motion vectors to obtain multiple second prediction values of each sub-block, where the first prediction value is obtained by performing motion compensation using motion information.

选择模块107可以用于分别为每个子块选择评价指标最小的第二预测值对应的修正运动矢量,作为子块的最终修正运动矢量;The selection module 107 may be used to select, for each sub-block, a modified motion vector corresponding to the second prediction value with the smallest evaluation index as the final modified motion vector of the sub-block;

第二修正模块108可以用于利用所有子块的最终修正运动矢量进行修正,得到修正后的运动矢量。The second correction module 108 may be used to perform correction using the final corrected motion vectors of all sub-blocks to obtain corrected motion vectors.

第二计算模块109可以用于利用包含修正后的运动矢量的运动信息,得到每个子块的预测值,所有所述子块的预测值组成当前块的预测值。The second calculation module 109 may be configured to obtain a prediction value of each sub-block using the motion information including the modified motion vector, and the prediction values of all the sub-blocks constitute a prediction value of the current block.

图39是本申请编码器一实施例的结构示意图。如图39所示,该编码器包括处理器111、与处理器耦接的存储器112。Fig. 39 is a schematic diagram of the structure of an embodiment of an encoder of the present application. As shown in Fig. 39, the encoder includes a processor 111 and a memory 112 coupled to the processor.

其中,存储器112存储有用于实现上述任一实施例的方法的程序指令;处理器111用于执行存储器112存储的程序指令以实现上述方法实施例的步骤。其中,处理器111还可以称为CPU(CeNtralProcessiNgUNit,中央处理单元)。处理器111可能是一种集成电路芯片,具有信号的处理能力。处理器111还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The memory 112 stores program instructions for implementing the method of any of the above embodiments; the processor 111 is used to execute the program instructions stored in the memory 112 to implement the steps of the above method embodiments. The processor 111 may also be called a CPU (Central Processing Unit). The processor 111 may be an integrated circuit chip with signal processing capabilities. The processor 111 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

图40是本申请存储介质一实施例的结构示意图。如图40所示,本申请实施例的存储介质120存储有程序指令121,该程序指令121被执行时实现本申请上述实施例提供的方法。其中,该程序指令121可以形成程序文件以软件产品的形式存储在上述存储介质120中,以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式方法的全部或部分步骤。而前述的存储介质1400包括:U盘、移动硬盘、只读存储器(ROM,Read-ONly Memory)、随机存取存储器(RAM,RaNdomAccess Memory)、磁碟或者光盘等各种可以存储程序代码的介质,或者是计算机、服务器、手机、平板等终端设备。Figure 40 is a schematic diagram of the structure of an embodiment of the storage medium of the present application. As shown in Figure 40, the storage medium 120 of the embodiment of the present application stores a program instruction 121, and the program instruction 121 is executed to implement the method provided by the above embodiment of the present application. Among them, the program instruction 121 can form a program file and be stored in the above storage medium 120 in the form of a software product, so that a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) performs all or part of the steps of each implementation method of the present application. The aforementioned storage medium 1400 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-ONly Memory), a random access memory (RAM, RandomAccess Memory), a disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, and a tablet.

图41本申请电子设备一实施例的结构示意图。如图41所示,该电子设备130可以但不限于包括编码器131(前面涉及的编码器121),也可以为其他能够实现上述方法步骤的其他编码器,在此不作具体限定。Figure 41 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. As shown in Figure 41, the electronic device 130 may include, but is not limited to, an encoder 131 (the encoder 121 mentioned above), or other encoders capable of implementing the above method steps, which are not specifically limited here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。以上仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.

Claims (17)

1.一种角度模式帧间预测方法,其特征在于,包括:1. An angle mode inter-frame prediction method, comprising: 为当前块构建候选邻块列表,所述候选邻块列表包括所述当前块在多个角度方向上的邻块,其中可用邻块为已编码的采用帧间预测的所述邻块,剩余所述邻块为不可用邻块;Constructing a candidate neighbor block list for the current block, the candidate neighbor block list including neighbor blocks of the current block in multiple angle directions, wherein available neighbor blocks are the encoded neighbor blocks using inter-frame prediction, and the remaining neighbor blocks are unavailable neighbor blocks; 对各角度方向上的所述邻块进行运动信息查重,已查重通过的角度方向为有效角度方向;Performing motion information duplication check on the neighboring blocks in each angular direction, and the angular directions that have passed the duplication check are valid angular directions; 利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行设置;Using the motion information of the reference block of the unavailable neighboring block, the motion information of the unavailable neighboring block is set; 利用所述有效角度方向上的可用邻块和/或不可用邻块的运动信息计算所述当前块的预测值。The prediction value of the current block is calculated using motion information of available neighboring blocks and/or unavailable neighboring blocks in the effective angle direction. 2.根据权利要求1所述的方法,其特征在于,2. The method according to claim 1, characterized in that 所述对各角度方向上的所述邻块进行运动信息查重包括:The checking for duplicate motion information of the neighboring blocks in each angular direction comprises: 根据所述当前块的尺寸在各角度方向上选择至少一对所述邻块进行运动信息查重。At least one pair of the neighboring blocks is selected in each angular direction according to the size of the current block to perform motion information duplication checking. 3.根据权利要求1所述的方法,其特征在于,所述对各角度方向上的所述邻块进行运动信息查重之后进一步包括:3. The method according to claim 1, characterized in that after checking the motion information duplication of the neighboring blocks in each angle direction, further comprising: 将所述有效角度方向填入角度模式列表,得到所述有效角度方向的角度模式索引。Fill the effective angle direction into the angle mode list to obtain the angle mode index of the effective angle direction. 4.根据权利要求3所述的方法,其特征在于,4. The method according to claim 3, characterized in that 所述角度模式索引的取值范围为0~4。The angle mode index ranges from 0 to 4. 5.根据权利要求3所述的方法,其特征在于,所述当前块的码流中包括角度模式标记,所述角度模式标记用于表示所述当前块是否采用所述角度模式帧间预测。5. The method according to claim 3 is characterized in that the code stream of the current block includes an angle mode flag, and the angle mode flag is used to indicate whether the current block adopts the angle mode inter-frame prediction. 6.根据权利要求1所述的方法,其特征在于,利用所述有效角度方向上的可用邻块和/或不可用邻块的运动信息计算所述当前块的预测值,包括:6. The method according to claim 1, characterized in that calculating the prediction value of the current block using motion information of available neighboring blocks and/or unavailable neighboring blocks in the effective angle direction comprises: 所述当前块被划分为多个子块,利用每个子块在有效角度方向上的对应邻块的运动信息进行运动补偿,得到每个子块的预测值,所述当前块的所有子块的预测值组成所述当前块的预测值。The current block is divided into multiple sub-blocks, and motion compensation is performed using motion information of a corresponding neighboring block of each sub-block in a valid angle direction to obtain a prediction value of each sub-block. The prediction values of all sub-blocks of the current block constitute the prediction value of the current block. 7.根据权利要求6所述的方法,其特征在于,所述利用每个子块在有效角度方向上的对应邻块的运动信息进行运动补偿,得到每个子块的预测值,包括:7. The method according to claim 6, characterized in that the step of performing motion compensation using motion information of a corresponding neighboring block of each sub-block in a valid angle direction to obtain a prediction value of each sub-block comprises: 利用多个修正运动矢量对每个子块的第一预测值进行修正,得到每个子块的多个第二预测值;每个子块的第一预测值是利用每个子块的运动信息进行运动补偿得到的,每个子块的运动信息是利用每个子块在有效角度方向上的对应邻块的运动信息得到的;The first prediction value of each sub-block is corrected by using multiple corrected motion vectors to obtain multiple second prediction values of each sub-block; the first prediction value of each sub-block is obtained by performing motion compensation using motion information of each sub-block, and the motion information of each sub-block is obtained by using motion information of a corresponding neighboring block of each sub-block in a valid angle direction; 基于每个子块的评价指标最小的第二预测值对应的修正运动矢量,确定每个子块的最终修正运动矢量;Determine a final corrected motion vector for each sub-block based on the corrected motion vector corresponding to the second prediction value with the smallest evaluation index of each sub-block; 利用每个子块的最终修正运动矢量进行修正,得到修正后的运动矢量;Using the final corrected motion vector of each sub-block for correction, a corrected motion vector is obtained; 利用修正后的运动矢量确定每个子块的预测值。The predicted value of each sub-block is determined using the modified motion vector. 8.根据权利要求7所述的方法,其特征在于,所述修正运动矢量包括前向修正运动矢量和后向修正运动矢量,所述第二预测值包括前向第二预测值和后向第二预测值,所述前向第二预测值为包含修正后的前向运动矢量的运动信息指向的第二预测块的像素值,所述修正后的前向运动矢量是利用所述前向修正运动矢量对子块的前向运动矢量修正得到的,所述后向第二预测值为包含修正后的后向运动矢量的运动信息指向的第二预测块的像素值,所述修正后的后向运动矢量是利用所述后向修正运动矢量对子块的后向运动矢量修正得到的;8. The method according to claim 7, characterized in that the corrected motion vector includes a forward corrected motion vector and a backward corrected motion vector, the second prediction value includes a forward second prediction value and a backward second prediction value, the forward second prediction value is a pixel value of a second prediction block pointed to by motion information containing the corrected forward motion vector, the corrected forward motion vector is obtained by correcting a forward motion vector of a sub-block using the forward corrected motion vector, the backward second prediction value is a pixel value of a second prediction block pointed to by motion information containing the corrected backward motion vector, and the corrected backward motion vector is obtained by correcting a backward motion vector of a sub-block using the backward corrected motion vector; 所述将每个子块的评价指标最小的第二预测值对应的修正运动矢量作为每个子块的最终修正运动矢量,包括:The method of taking the modified motion vector corresponding to the second prediction value having the smallest evaluation index of each sub-block as the final modified motion vector of each sub-block includes: 基于绝对误差和算法,获取每个子块的各个修正运动矢量的前向第二预测值和后向第二预测值之间的评价指标;Based on the absolute error sum algorithm, obtaining an evaluation index between the forward second prediction value and the backward second prediction value of each modified motion vector of each sub-block; 基于评价指标最小的一对前向第二预测值和后向第二预测值对应的修正运动矢量,确定子块的最终修正运动矢量。Based on the modified motion vectors corresponding to a pair of forward second prediction values and backward second prediction values with the smallest evaluation index, a final modified motion vector of the sub-block is determined. 9.根据权利要求8所述的方法,其特征在于,每组对应的前向修正运动矢量和后向修正运动矢量大小相等,方向相反;和/或,9. The method according to claim 8, characterized in that each group of corresponding forward correction motion vectors and backward correction motion vectors are equal in magnitude and opposite in direction; and/or, 所述子块的预测值为所述子块的前向预测值和后向预测值的均值。The prediction value of the sub-block is the average of the forward prediction value and the backward prediction value of the sub-block. 10.根据权利要求1所述的方法,其特征在于,所述不可用邻块的参考块包括所述不可用邻块的前一邻块、后一邻块或时域同位块。10. The method according to claim 1, characterized in that the reference block of the unavailable neighboring block includes a previous neighboring block, a next neighboring block or a time-domain co-located block of the unavailable neighboring block. 11.根据权利要求1所述的方法,其特征在于,11. The method according to claim 1, characterized in that: 所述查重包括判断选择的至少一对所述邻块的参考帧索引是否相同。The duplication check includes determining whether the reference frame indexes of at least one pair of selected neighboring blocks are the same. 12.根据权利要求1所述的方法,其特征在于,所有所述邻块的尺寸相同且小于所述当前块的尺寸;和/或,所述邻块位于所述当前块的左侧或上侧。12. The method according to claim 1, characterized in that the sizes of all the neighboring blocks are the same and smaller than the size of the current block; and/or the neighboring blocks are located on the left side or above the current block. 13.根据权利要求1-12中任一项所述的方法,其特征在于,所述多个角度方向包括水平,垂直,水平向上,水平向下和垂直向右中的至少两种。13. The method according to any one of claims 1-12, characterized in that the multiple angle directions include at least two of horizontal, vertical, horizontal upward, horizontal downward and vertical rightward. 14.一种角度模式帧间预测装置,其特征在于,包括:14. An angle mode inter-frame prediction device, comprising: 构建模块,用于为当前块构建候选邻块列表,所述候选邻块列表包括所述当前块在多个角度方向上的邻块,其中可用邻块为已编码的采用帧间预测的所述邻块,剩余所述邻块为不可用邻块;A construction module, configured to construct a candidate neighbor block list for the current block, wherein the candidate neighbor block list includes neighbor blocks of the current block in multiple angle directions, wherein available neighbor blocks are the encoded neighbor blocks using inter-frame prediction, and the remaining neighbor blocks are unavailable neighbor blocks; 查重模块,用于对各角度方向上的所述邻块进行运动信息查重,已查重通过的角度方向为有效角度方向;A duplication checking module, used for checking the motion information of the neighboring blocks in each angular direction, and the angular directions that have passed the duplication check are valid angular directions; 修改模块,用于利用不可用邻块的参考块的运动信息,对不可用邻块的运动信息进行设置;A modification module, used for setting the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; 计算模块,用于利用所述有效角度方向上的可用邻块和/或不可用邻块的运动信息计算所述当前块的预测值。A calculation module is used to calculate the prediction value of the current block by using the motion information of the available neighboring blocks and/or the unavailable neighboring blocks in the effective angle direction. 15.一种编码器,其特征在于,所述编码器包括处理器、与所述处理器连接的存储器,其中,15. An encoder, characterized in that the encoder comprises a processor and a memory connected to the processor, wherein: 所述存储器存储有程序指令;The memory stores program instructions; 所述处理器用于执行所述存储器存储的程序指令以实现如权利要求1-13中任一项所述的方法。The processor is configured to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 13. 16.一种存储介质,其特征在于,所述存储介质存储有程序指令,所述程序指令被执行时实现如权利要求1-13中任一项所述的方法。16. A storage medium, characterized in that the storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 13 is implemented. 17.一种电子设备,其特征在于,包括如权利要求15所述的编码器。17. An electronic device, comprising the encoder according to claim 15.
CN202410968886.2A 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium Pending CN119031144A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410968886.2A CN119031144A (en) 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410968886.2A CN119031144A (en) 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium
CN202010701045.7A CN112004096B (en) 2020-07-20 2020-07-20 Angular mode inter prediction method, encoder, and storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202010701045.7A Division CN112004096B (en) 2020-07-20 2020-07-20 Angular mode inter prediction method, encoder, and storage medium

Publications (1)

Publication Number Publication Date
CN119031144A true CN119031144A (en) 2024-11-26

Family

ID=73467018

Family Applications (4)

Application Number Title Priority Date Filing Date
CN202010701045.7A Active CN112004096B (en) 2020-07-20 2020-07-20 Angular mode inter prediction method, encoder, and storage medium
CN202410966139.5A Pending CN119031143A (en) 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium
CN202410968886.2A Pending CN119031144A (en) 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium
CN202410965637.8A Pending CN119031142A (en) 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN202010701045.7A Active CN112004096B (en) 2020-07-20 2020-07-20 Angular mode inter prediction method, encoder, and storage medium
CN202410966139.5A Pending CN119031143A (en) 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202410965637.8A Pending CN119031142A (en) 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium

Country Status (1)

Country Link
CN (4) CN112004096B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3174300A1 (en) * 2011-10-17 2017-05-31 Kabushiki Kaisha Toshiba Decoding device and decoding method
CN103024378B (en) * 2012-12-06 2016-04-13 浙江大学 Movable information deriving method and device in a kind of coding and decoding video
US10462457B2 (en) * 2016-01-29 2019-10-29 Google Llc Dynamic reference motion vector coding mode
CN116915980A (en) * 2016-11-29 2023-10-20 韩国电子通信研究院 Image encoding/decoding method and apparatus, and recording medium storing bit stream
JP2018182435A (en) * 2017-04-06 2018-11-15 日本電信電話株式会社 Motion vector prediction device and computer program
EP3646587A1 (en) * 2017-07-04 2020-05-06 Huawei Technologies Co., Ltd. Decoder side intra mode derivation tool line memory harmonization with deblocking filter
CN115348443B (en) * 2018-11-30 2024-09-24 杭州海康威视数字技术股份有限公司 Motion information determining method, device and equipment thereof
CN112584162B (en) * 2018-12-28 2022-05-31 杭州海康威视数字技术股份有限公司 A coding and decoding method and device thereof

Also Published As

Publication number Publication date
CN119031143A (en) 2024-11-26
CN112004096A (en) 2020-11-27
CN112004096B (en) 2024-07-12
CN119031142A (en) 2024-11-26

Similar Documents

Publication Publication Date Title
TWI736906B (en) Mv precision refine
KR102770381B1 (en) Video processing method and device
CN103891290B (en) Motion vector processing
CN111586415B (en) Video coding method, video coding device, video coder and storage device
CN110213588B (en) Spatial domain candidate motion information acquisition method and device, coder-decoder and storage device
WO2021052477A1 (en) Method for acquiring motion vectors, prediction method and device
CN116800960B (en) Method, apparatus and storage medium for video decoding
US20230362401A1 (en) Image encoding/decoding method and apparatus
US12126792B2 (en) Displacement vector prediction method and apparatus in video encoding and decoding and device
KR20220066166A (en) Current block prediction method and prediction apparatus, device, and storage medium
BR122021006509A2 (en) Image decoding method based on affine motion prediction and device using affine fusion candidate list in image encoding system
WO2022257674A1 (en) Encoding method and apparatus using inter-frame prediction, device, and readable storage medium
CN112004096B (en) Angular mode inter prediction method, encoder, and storage medium
US20240267546A1 (en) Candidate derivation for affine merge mode in video coding
CN100396102C (en) Method and apparatus for predicting DC coefficients of video data units
CN112565769B (en) Block division method, inter-frame prediction method, video coding method and related device
CN113099269B (en) String matching prediction method, encoding and decoding method, related equipment and device
CN112040242A (en) Inter-frame prediction method, device and equipment based on advanced motion vector expression
CN118435590A (en) Method, device and medium for video processing
CN118369919A (en) Method, device and medium for video processing
WO2022033325A1 (en) Video decoding method and apparatus, video encoding method and apparatus, and device and storage medium
US20230319288A1 (en) Systems and methods for video processing
WO2024212443A1 (en) Image encoding method, image decoding method, image processing apparatus, and storage medium
CN118339830A (en) Method and apparatus for picture encoding and decoding
CN114845105A (en) Encoding method, apparatus, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination