CN112004096A - 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
CN112004096A
CN112004096A CN202010701045.7A CN202010701045A CN112004096A CN 112004096 A CN112004096 A CN 112004096A CN 202010701045 A CN202010701045 A CN 202010701045A CN 112004096 A CN112004096 A CN 112004096A
Authority
CN
China
Prior art keywords
block
motion information
blocks
adjacent
unavailable
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
CN202010701045.7A
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 CN202010701045.7A priority Critical patent/CN112004096A/en
Publication of CN112004096A publication Critical patent/CN112004096A/en
Pending legal-status Critical Current

Links

Images

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

Abstract

The application discloses an angle mode inter-frame prediction method and a related device. The method comprises the following steps: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; carrying out motion information duplicate checking on adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction; modifying the motion information of the unavailable adjacent block in the effective angular direction by utilizing the motion information of the reference block of the unavailable adjacent block in the effective angular direction; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction. By the method, the calculation cost in the encoding process can be reduced.

Description

Angle mode inter-frame prediction method, encoder and storage medium
Technical Field
The present application relates to the field of video coding technologies, and in particular, to an angle mode inter-frame prediction method, an encoder, and a storage medium.
Background
The video can be compressed by a video coding technology so as to reduce the data volume of the video, reduce the network bandwidth in the video transmission process and reduce the storage space. The video coding modes may include inter prediction modes and intra prediction modes, among others.
Taking the inter-frame prediction mode as an example, inter-frame prediction is to predict information of a current frame by using a lot of redundant information with strong correlation existing in a reference frame. Inter Prediction modes can be classified into various modes, such as an inter Motion Vector Angle Prediction (MVAP) mode, a temporal motion vector Prediction mode, a spatial motion vector Prediction mode, and a historical motion vector motion mode.
Taking an inter-frame motion vector angle prediction mode as an example, the inter-frame motion vector angle prediction mode may also be referred to as angle mode inter-frame prediction, so-called inter-frame motion vector angle prediction, that is, motion information of neighboring blocks in multiple angle directions of a current block (a block to be predicted in the current frame) is respectively used as motion information of the current block, rate distortion costs 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 are respectively calculated, and finally, the motion information of the neighboring block in the angle direction with the smallest corresponding rate distortion cost is used as the motion information of the current block, so as to obtain a prediction value of the current block through the motion information of the current block.
However, the conventional angular mode inter prediction requires a large computational overhead.
Disclosure of Invention
The application provides an angle mode inter-frame prediction method, an encoder and a storage medium, which can solve the problem of high calculation cost required by the conventional angle mode inter-frame prediction.
In order to solve the technical problem, the application adopts a technical scheme that: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; carrying out motion information duplicate checking on adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction; modifying the motion information of the unavailable adjacent block in the effective angular direction by utilizing the motion information of the reference block of the unavailable adjacent block in the effective angular direction; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: the device comprises a construction module, a prediction module and a prediction module, wherein the construction module is used for constructing a candidate adjacent block list for a current block, the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction; the modification module is used for modifying the motion information of the unavailable adjacent block in the effective angular direction by utilizing the motion information of the reference block of the unavailable adjacent block in the effective angular direction; and the calculation module is used for calculating the predicted value of the current block by respectively utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; if the time domain co-located block of the unavailable adjacent block is available, setting motion information for the unavailable adjacent block by using the motion information of the time domain co-located block, otherwise setting an initial value as the motion information of the unavailable adjacent block; carrying out motion information duplicate checking on adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction; modifying the motion information of the available adjacent block with the motion information as the initial value by utilizing the motion information of the reference block of the unavailable adjacent block with the motion information as the initial value; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: the device comprises a construction module, a prediction module and a prediction module, wherein the construction module is used for constructing a candidate adjacent block list for a current block, the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; a setting module, configured to set motion information for an unavailable neighbor block using motion information of a time domain co-located block when the time domain co-located block of the unavailable neighbor block is available, and set an initial value as the motion information of the unavailable neighbor block when the time domain co-located block of the unavailable neighbor block is unavailable; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction; the modification module is used for modifying the motion information of the available adjacent block with the motion information as the initial value by utilizing the motion information of the reference block of the unavailable adjacent block with the motion information as the initial value; a calculating module, configured to calculate a prediction value of the current block by using motion information of an available neighboring block and/or an unavailable neighboring block in each effective angular direction, respectively.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; selecting at least one pair of adjacent blocks in each angle direction according to the size of the current block to carry out motion information duplicate checking, wherein the angle direction of duplicate checking is an effective angle direction; modifying the motion information of the available neighboring blocks by using the motion information of the reference block of the unavailable neighboring blocks; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and remaining neighbor blocks are unavailable neighbor blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for selecting at least one pair of adjacent blocks in each angle direction according to the size of the current block to check the duplication of the motion information, and the angle direction of the duplication checking is an effective angle direction; the modification module is used for modifying the motion information of the available adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; and the calculation module is used for calculating the predicted value of the current block by respectively utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; carrying out motion information duplicate checking on adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction, and if the angle direction meets a first condition, adding at least one duplicate checking; modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: the device comprises a construction module, a prediction module and a prediction module, wherein the construction module is used for constructing a candidate adjacent block list for a current block, the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and the duplication checking angle direction is an effective angle direction, wherein if the angle direction meets a first condition, at least one duplication checking is added; the modification module is used for modifying the motion information of the unavailable adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; and the calculation module is used for calculating the predicted value of the current block by respectively utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; performing motion information duplicate checking on adjacent blocks in each angle direction, wherein the duplicate checking angle direction is an effective angle direction, and if at least two of the duplicate checking results in the horizontal direction, the vertical direction and the horizontal direction meet a second condition, at least one duplicate checking in the horizontal direction is reduced; modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and remaining neighbor blocks are unavailable neighbor blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the duplication checking angle direction is an effective angle direction, wherein if at least two of duplication checking results in the horizontal direction, the vertical direction and the horizontal direction meet a second condition, at least one duplication checking in the horizontal direction is reduced; the modification module is used for modifying the motion information of the unavailable adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; and the calculation module is used for calculating the predicted value of the current block by respectively utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; performing motion information duplicate checking on adjacent blocks in each angle direction, wherein the duplicate checking comprises judging whether the image sequence indexes of the reference frames of at least one pair of selected adjacent blocks are the same and whether the motion is the same by taking the angle direction of the duplicate checking as an effective angle direction; modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: the device comprises a construction module, a prediction module and a prediction module, wherein the construction module is used for constructing a candidate adjacent block list for a current block, the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and judging whether the image sequence indexes of the reference frames of at least one pair of selected adjacent blocks are the same and whether the motion is the same or not by taking the duplication checking angle direction as an effective angle direction; the modification module is used for modifying the motion information of the unavailable adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; and the calculation module is used for calculating the predicted value of the current block by respectively utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction; modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; the current block is divided into a plurality of sub-blocks, motion compensation is carried out by respectively utilizing motion information of corresponding adjacent blocks of each sub-block in the effective angle direction to obtain a predicted value of each sub-block, the predicted values of all sub-blocks form the predicted value of the current block, and the motion information of at least two corresponding adjacent blocks is used when motion compensation is carried out on the sub-blocks in at least one effective angle direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: the device comprises a construction module, a prediction module and a prediction module, wherein the construction module is used for constructing a candidate adjacent block list for a current block, the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction; the modification module is used for modifying the motion information of the unavailable adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; and the computing module is used for respectively utilizing the motion information of the corresponding adjacent blocks of each subblock in the effective angle direction to perform motion compensation under the condition that the current block is divided into a plurality of subblocks so as to obtain the predicted value of each subblock, the predicted values of all subblocks form the predicted value of the current block, and the motion information of at least two corresponding adjacent blocks is used when the subblock in at least one effective angle direction is subjected to motion compensation.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; carrying out motion information duplicate checking on adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction; filling the effective angle direction into an angle mode list to obtain an angle mode index of the effective angle direction; modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; the prediction value of the current block is calculated using motion information of available and/or unavailable neighbors in each valid angular direction, respectively.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: the device comprises a construction module, a prediction module and a prediction module, wherein the construction module is used for constructing a candidate adjacent block list for a current block, the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction; the filling module is used for filling the effective angle direction into the angle mode list to obtain an angle mode index of the effective angle direction; the modification module is used for modifying the motion information of the unavailable adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; and the computing module is used for respectively utilizing the motion information of the available and/or unavailable adjacent blocks in each effective angular direction to compute the predicted value of the current block.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; carrying out motion information duplicate checking on adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction; determining the sequence of each effective angle direction by using the texture direction of the current block; filling the effective angle directions into a mode list in sequence; modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and remaining neighbor blocks are unavailable neighbor blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction; the determining module is used for determining the sequence of each effective angle direction by using the texture direction of the current block; the filling module is used for filling the effective angle directions into the mode list in sequence; the modification module is used for modifying the motion information of the unavailable adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; and the calculation module is used for calculating the predicted value of the current block by respectively utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angle mode inter prediction method, the method including: constructing a candidate adjacent block list for the current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; setting motion information for the unavailable neighbor block; carrying out motion information duplicate checking on adjacent blocks in each angle direction, wherein the duplicate checking angle direction is an effective angle direction; modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block; dividing a current block into a plurality of sub-blocks, and respectively obtaining motion information of each sub-block by using motion information of a corresponding adjacent block of each sub-block in the effective angle direction, wherein the motion information comprises a motion vector; correcting the first predicted value of each sub-block by using a plurality of correction motion vectors respectively to obtain a plurality of second predicted values of each sub-block, wherein the first predicted value is obtained by performing motion compensation by using motion information; respectively selecting a correction motion vector corresponding to a second predicted value with the minimum evaluation index for each subblock as a final correction motion vector of the subblock; correcting by using the final correction motion vectors of all the sub-blocks to obtain corrected motion vectors; and obtaining the predicted value of each sub-block by using the motion information containing the corrected motion vector, wherein the predicted values of all the sub-blocks form the predicted value of the current block.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided an angular mode inter prediction apparatus, including: the device comprises a construction module, a prediction module and a prediction module, wherein the construction module is used for constructing a candidate adjacent block list for a current block, the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the encoded adjacent blocks adopting inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks; the setting module is used for setting motion information for the unavailable adjacent blocks; the duplication checking module is used for carrying out duplication checking on the motion information of the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction; the modification module is used for modifying the motion information of the unavailable adjacent block by utilizing the motion information of the reference block of the unavailable adjacent block; the first calculation module is used for respectively utilizing the motion information of the corresponding adjacent block of each subblock in the effective angle direction to obtain the motion information of each subblock under the condition that the current block is divided into a plurality of subblocks, wherein the motion information comprises a motion vector; the first correction module is used for correcting the first predicted value of each sub-block by using a plurality of correction motion vectors respectively to obtain a plurality of second predicted values of each sub-block, and the first predicted value is obtained by performing motion compensation by using motion information; the selection module is used for selecting the correction motion vector corresponding to the second predicted value with the minimum evaluation index for each subblock as the final correction motion vector of the subblock; the second correction module is used for correcting by using the final correction motion vectors of all the sub-blocks to obtain corrected motion vectors; and the second calculation module is used for obtaining the predicted value of each sub-block by utilizing the motion information containing the corrected motion vector, and the predicted values of all the sub-blocks form the predicted value of the current block.
In order to solve the above technical problem, another technical solution adopted by the present application is: an encoder is provided, which comprises a processor, a memory connected with the processor, wherein the memory stores program instructions; the processor is configured to execute the program instructions stored by the memory to implement the above-described method.
In order to solve the above technical problem, the present application adopts another technical solution that: there is provided a storage medium storing program instructions that when executed enable the above method to be implemented.
Through the mode, after the effective angle direction is obtained through duplication checking, only the motion information of the unavailable adjacent blocks in the effective angle direction is modified, and compared with a mode of modifying the motion information of the unavailable adjacent blocks in each angle direction, the calculation cost can be reduced.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of an inter-frame prediction method for angle mode according to the present application;
FIG. 2 is a diagram of neighboring blocks of a current block in 5 angular directions;
FIG. 3 is a flowchart illustrating a second embodiment of the angular mode inter prediction method of the present application;
FIG. 4 is a flowchart illustrating a third embodiment of the inter-frame prediction method for angle mode according to the present application;
FIG. 5 is a flowchart illustrating a fourth embodiment of the angular mode inter prediction method of the present application;
FIG. 6 is a flowchart illustrating a fifth embodiment of the angular mode inter prediction method of the present application;
FIG. 7 is a flowchart illustrating a sixth embodiment of an inter-frame prediction method for angle mode according to the present application;
fig. 8 is a detailed flowchart of S630 in fig. 7;
FIG. 9 is a diagram illustrating the selection of a first number of neighboring blocks for duplicate checking in directions corresponding to width and height according to the present application;
FIG. 10 is a diagram illustrating the selection of a second number of neighboring blocks for duplicate checking in the directions corresponding to the width and height according to the present application;
FIG. 11 is a flowchart illustrating a seventh embodiment of the inter-frame prediction method for angle mode according to the present application;
FIG. 12 is a schematic diagram of the first condition of the present application with one additional duplication checking;
FIG. 13 is another schematic diagram of adding a duplicate lookup under the first condition of the present application;
FIG. 14 is a further schematic illustration of the addition of a duplicate check under the first conditions of the present application;
FIG. 15 is a further schematic illustration of the addition of a duplicate check under the first conditions of the present application;
FIG. 16 is a flowchart illustrating an eighth embodiment of the angular mode inter prediction method of the present application;
FIG. 17 is a schematic view of a second condition of the present application for reducing duplicate checking;
FIG. 18 is another schematic diagram of a reduction in duplicate checking under the second condition of the present application;
FIG. 19 is a further schematic illustration of a reduction in duplicate checking under the second conditions of the present application;
FIG. 20 is a flowchart illustrating a ninth embodiment of the angular mode inter prediction method of the present application;
FIG. 21 is a flowchart illustrating a tenth embodiment of an inter-frame prediction method according to the present application;
FIG. 22 is a diagram illustrating motion vectors for a first sub-block calculated by two neighboring blocks in horizontal and vertical directions, respectively;
FIG. 23 is a flowchart illustrating an eleventh embodiment of an angular mode inter prediction method according to the present application;
FIG. 24 is a flowchart illustrating a twelfth embodiment of the angular mode inter prediction method of the present application;
FIG. 25 is a detailed flowchart of S1240 in FIG. 24;
FIG. 26 is a flowchart illustrating a thirteenth embodiment of an angular mode inter prediction method according to the present application;
fig. 27 is a detailed flowchart of S1306 in fig. 26;
FIG. 28 is a schematic diagram of the present application searching for a forward modified motion vector within the search range of the forward first prediction block;
FIG. 29 is a block diagram illustrating a first embodiment of an inter prediction apparatus for angle mode according to the present application;
FIG. 30 is a block diagram illustrating a second embodiment of an angular mode inter prediction apparatus according to the present application;
FIG. 31 is a block diagram illustrating a third exemplary embodiment of an angular mode inter prediction apparatus according to the present application;
FIG. 32 is a diagram illustrating a fourth exemplary embodiment of an inter-frame prediction apparatus according to the present application;
FIG. 33 is a block diagram illustrating a fifth embodiment of an angular mode inter prediction apparatus according to the present application;
FIG. 34 is a schematic structural diagram of a sixth embodiment of an angular mode inter-frame prediction apparatus according to the present application;
FIG. 35 is a schematic structural diagram of a seventh embodiment of an angular mode inter-frame prediction apparatus according to the present application;
FIG. 36 is a schematic structural diagram of an eighth embodiment of an angular mode inter-frame prediction apparatus according to the present application;
FIG. 37 is a block diagram illustrating a ninth embodiment of an angular mode inter prediction apparatus according to the present application;
FIG. 38 is a schematic structural diagram of a tenth embodiment of an inter prediction apparatus for angle mode according to the present application;
FIG. 39 is a schematic diagram of an embodiment of an encoder of the present application;
FIG. 40 is a schematic structural diagram of an embodiment of a storage medium according to the present application;
fig. 41 is a schematic structural diagram of an embodiment of an electronic device according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first", "second" and "third" in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any indication of the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Fig. 1 is a flowchart illustrating a first embodiment of an angular mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 1 is not limited in this embodiment. As shown in fig. 1, the present embodiment may include:
s110: a candidate neighbor list is constructed for the current block.
The current block may also be referred to as a current coding block, i.e., a block to be currently coded, and in some cases, a 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 neighbors of the current block in a plurality of angular directions. The current block and the adjacent blocks both belong to the current frame, and the adjacent blocks are 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 adjacent blocks are located on the left side and the top side of the current block. Referring to the concept of angular mode in intra prediction, a current block may be projected to an encoded side in each angular direction to determine a neighboring block. There may be repetitions of neighbors in different angular directions. The sizes of all neighboring blocks may be the same and smaller than the size of the current block.
According to the position of the current block, the adjacent block may be a block which really exists in the current frame, and may also be a block which does not exist beyond the boundary of the current frame; for the real existing neighboring blocks, it may be coded blocks or uncoded blocks; the prediction mode used by the encoded neighboring Block may be inter prediction, Intra prediction, or Intra Block Copy (IBC), and so on. Coded inter-predicted neighbors may be referred to herein as usable neighbors, and remaining neighbors (e.g., non-existent blocks, non-coded blocks, intra blocks, etc.) as unusable neighbors.
Optionally, the plurality of angular orientations include at least two of horizontal, vertical, horizontal up, horizontal down, and vertical right. The following describes a case including 5 directions (horizontal, vertical, horizontal upward, horizontal downward and vertical rightward) with reference to fig. 2:
fig. 2 is a schematic diagram of neighboring blocks of a current block in 5 angular directions. Wherein, according to the relative position relationship between the adjacent block and the current block, A1~ANIn order to be at the current blockA neighbor block in the horizontal direction, which may be referred to as a horizontal neighbor block; b is1~BNA neighboring block in a vertical direction of the current block, which may be referred to as a vertical neighboring block; e is a neighbor block in the horizontal upward direction of the current block, which may be referred to as a horizontal upward neighbor block; c1~CNA neighbor block in a horizontal downward direction of the current block, which may be referred to as a horizontal downward neighbor block; d1~DNA neighbor block that is in the vertical right direction of the current block may be referred to as a vertical right neighbor block. According to the projection result of the current block according to each angle direction, the adjacent blocks of the current block in the horizontal angle direction 0 comprise at least part of horizontal adjacent blocks, the adjacent blocks in the vertical direction 1 comprise at least part of vertical adjacent blocks, the adjacent blocks in the horizontal upward direction 2 comprise horizontally upward adjacent blocks, at least part of horizontally adjacent blocks and at least part of vertically adjacent blocks, the adjacent blocks in the horizontal downward direction 3 comprise at least part of horizontally adjacent blocks and at least part of horizontally downward adjacent blocks, and the adjacent blocks in the vertical rightward direction 4 comprise at least part of vertically adjacent blocks and at least part of vertically rightward adjacent blocks. In this case, the candidate neighbor block list constructed for the current block may be { C1~CN,A1~AN,E,B1~BN,D1~DNAnd recording the motion information of the adjacent blocks in addition to the number/identification of each adjacent block in the candidate adjacent block list of the current block. The motion information may include motion vectors and reference frame index information (forward reference frame index information and/or backward reference frame index information), among others.
S120: motion information is set for the unavailable neighbor blocks.
Since the available neighbor block has motion information and the unavailable neighbor block has no motion information, it is necessary to set motion information for the unavailable neighbor block.
In one embodiment, the initial value (motion vector is 0, and the forward/backward reference frame index is-1) may be directly set as the motion information of the unavailable neighboring block, wherein if the reference frame index of the neighboring block is-1, the reference frame representing the neighboring block does not exist.
In another specific embodiment, the motion information may be set for the unavailable neighbor block based on the motion information of the time-domain co-located block of the currently unavailable neighbor block, and please refer to the following embodiment for a specific implementation process. The temporal co-located block is a co-located block of a currently unavailable neighboring block in a reference frame of a reference frame list of the current frame, for example, a co-located block in a first reference frame (reference frame index is 0).
S130: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
For a detailed method of duplicate checking, please refer to the following examples.
S140: and modifying the motion information of the unavailable adjacent block in the effective angular direction by utilizing the motion information of the reference block of the unavailable adjacent block in the effective angular direction.
The reference block may be a previous neighbor block of the unavailable neighbor block, may also be a next neighbor block of the unavailable neighbor block, or may be a time-domain co-located block of the unavailable neighbor block, etc.
S150: and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
The current block may be divided into a plurality of sub-blocks. Referring to the concept of intra-frame prediction, for each effective angle direction, motion information of each sub-block can be determined according to motion information of a corresponding adjacent block of each sub-block in the direction, then motion compensation is performed on the sub-blocks by using the motion information to obtain a predicted value of each sub-block, the predicted values of all the sub-blocks form a predicted value of the current block, and after the predicted value of the current block is obtained, rate distortion cost can be calculated according to the predicted value and an original value of the current block. The above process is performed for each effective angle direction, so that the predicted values and the rate distortion cost of all effective angle directions can be obtained.
The corresponding neighboring block of a sub-block in an effective angular direction refers to a neighboring block determined by projecting the sub-block to the encoded side of the current block according to the effective angular direction.
If the current effective angle direction contains an available adjacent block and an unavailable adjacent block, the motion information of the adjacent block comprises the motion information of the available adjacent block and the motion information of the unavailable adjacent block; if the current effective angle direction only contains the available adjacent blocks, the motion information of the adjacent blocks comprises the motion information of the available adjacent blocks; if the current valid angular direction only contains the unavailable neighboring block, the motion information of the neighboring block includes the motion information of the unavailable neighboring block.
In this embodiment, after the effective angular direction is obtained by duplicate checking, only the motion information of the unavailable neighboring block in the effective angular direction is modified, which can reduce the calculation overhead compared with a method of modifying the motion information of the unavailable neighboring block in each angular direction.
FIG. 3 is a flowchart illustrating a second embodiment of the angular mode inter prediction method of the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 3 is not limited in this embodiment. The present embodiment is a further extension of S140 described above. As shown in fig. 3, the present embodiment may include:
s210: and sequencing the adjacent blocks in the effective angle direction according to the modification sequence.
The adjacent blocks in different angle directions may have repetition, and are not independently sorted according to each effective angle direction during sorting, and all the adjacent blocks in the effective angle directions are gathered, then the repeated parts are removed, and are sorted according to the relative position with the current block. The modification order may be clockwise, counterclockwise, etc.
It should be noted that the ordering order of the neighbors in the valid angular direction is the same as the ordering order of the neighbors in the candidate neighbor list.
S220: and judging whether the sorted first adjacent block is an unavailable adjacent block.
The first neighbor block after ordering the neighbors in the valid angular direction may not be the same as the first neighbor block in the candidate list.
If yes, go to S230.
S230: and modifying the motion information of the first neighbor block by utilizing the motion information of the first neighbor block after sorting in the candidate neighbor block list.
In a specific embodiment, 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, the motion information of the first neighboring block is set to an initial value.
In another specific embodiment, 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 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.
In another embodiment, if the previous neighboring block of the first neighboring block is an available neighboring block, modifying the motion information of the first neighboring block by using the motion information of the previous neighboring block of the first neighboring block, otherwise, determining whether the next neighboring block of the first neighboring block is an available neighboring block, if so, modifying the motion information of the first neighboring block by using the motion information of the next neighboring block of the first neighboring block, otherwise, setting the motion information of the first neighboring block as an initial value; or
In another embodiment, if both the previous neighboring block and the next neighboring block of the first neighboring block are available neighboring blocks, modifying the motion information of the first neighboring block by using a weighted average of the motion information of the previous neighboring block and the next neighboring block of the first neighboring block; and if one of the previous adjacent block and the next adjacent block of the first adjacent block is an available adjacent block, modifying the motion information of the first adjacent block by using the motion information of the available adjacent block in the previous adjacent block and the next adjacent block, and if the previous adjacent block and the next adjacent block of the first adjacent block are both unavailable adjacent blocks, setting the motion information of the first adjacent block as 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 the sorting of the neighboring blocks in the effective angle direction is an unavailable neighboring block, so that the accuracy of coding can be improved.
Fig. 4 is a flowchart illustrating a third embodiment of the angular mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 4 is not limited in this embodiment. The present embodiment is a further extension of S140 described above. As shown in fig. 4, the present embodiment may include:
s310: and sequencing the adjacent blocks in the effective angle direction according to the modification sequence.
S320: and judging whether the sorted first adjacent block is an unavailable adjacent block.
If yes, go to S330.
S330: and judging whether the time domain co-located block of the first adjacent block is available.
Optionally, the frame in which 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 identical to the position and size of the first neighboring block in the current frame.
Whether the temporal co-located block is available may be understood as whether the temporal co-located block has motion information or whether the temporal co-located block is coded using inter prediction.
If yes, go to S340.
S340: and modifying the motion information of the first neighboring block by using the motion information of the time domain co-located block of the first neighboring block.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not 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 the sorting of the neighboring blocks in the effective angle direction is an unavailable neighboring block, so that the accuracy of coding can be improved.
FIG. 5 is a flowchart illustrating a fourth embodiment of an angular mode inter prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 5 is not limited in this embodiment. The present embodiment is a further extension of the above S120, and as shown in fig. 5, the present embodiment may include:
s410: and judging whether the time domain co-located block of the unavailable adjacent block is available.
If yes, go to S420; if not, go to S430.
S420: and setting motion information for the unavailable adjacent blocks by utilizing the motion information of the time domain co-located blocks.
In a specific embodiment, the motion information of the time-domain co-located block may be used as the motion information of the unavailable neighboring block.
In another embodiment, the forward motion information of the unavailable neighboring block may be set as the forward motion information or the backward motion information of the forward collocated block, and the backward motion information of the unavailable neighboring block may be set as the backward motion information or the forward motion information of the backward collocated block, where the frame where the forward collocated block is located is a reference frame in the forward reference frame list of the current block, and the frame where the backward collocated block is located is a reference frame in the backward reference frame list of the current block.
In the presence of a forward reference frame of a forward collocated block, the forward motion information of an unavailable neighbor block may be set as the forward motion information of the forward collocated block; alternatively, in the case where a backward reference frame of the forward collocated block exists, the forward motion information of the unavailable neighbor block may be set as the backward motion information of the forward collocated block.
In the presence of a backward reference frame of a backward collocated block, backward motion information of an unavailable neighbor block may be set as backward motion information of the backward collocated block; alternatively, in the case where a forward reference frame of a backward collocated block exists, backward motion information of an unavailable neighbor block may be set as forward motion information of the backward collocated block.
In yet another embodiment, the forward motion information or the backward motion information of the temporal co-located block may be scaled according to the image order index difference to be used as the forward motion information and the backward motion information of the unavailable neighbor block.
It is understood that each frame of images has a corresponding Picture Order index (POC), which may represent the Order in which the images are played. The formula for scaling by the image order index difference may be as follows:
scale_MV=MV/t0*t1,
t1=POC0-POC1,
t0=POC2-POC3,
wherein, scale _ MV is the forward/backward motion information of the current unavailable neighboring block, and MV is the forward/backward motion information of the time domain co-located block.
In the case where the current frame is a B frame (bidirectional difference frame), it is necessary to calculate forward motion information and backward motion information of currently unavailable neighbors.
If scale _ MV is the forward motion information of the currently unavailable neighbor 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 temporally co-located block is located and POC3 of the forward/backward reference frame of the temporally co-located block.
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 temporally co-located block is located and POC3 of the forward/backward reference frame of the temporally co-located block.
In case the current frame is a P frame (unidirectional differential frame), only the forward motion information of the currently unavailable neighbor 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: the initial value is set to the motion information of the unavailable neighbor block.
As mentioned earlier, the initial value of the motion vector is set to 0, and the motion information of the reference frame index is set to-1.
By implementing the embodiment, the motion information of the unavailable neighbor block can be set based on the time domain co-located block when the time domain co-located block of the unavailable neighbor block is available, and the motion information of the unavailable neighbor block is considered to be set as the initial value when the time domain co-located block of the unavailable neighbor block is unavailable. Compared with a mode of directly setting the motion information of the unavailable adjacent block as an initial value, the method can reduce the error caused by the motion information set for the unavailable adjacent block and improve the accuracy of coding.
Fig. 6 is a flowchart illustrating a fifth embodiment of an angular mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 6 is not limited in this embodiment. As shown in fig. 6, the present embodiment may include:
s510: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S520: and judging whether the time domain co-located block of the unavailable adjacent block is available.
The frame where the time domain collocated block is located is the first reference frame in the reference frame list of the current block.
If yes, go to S530; if not, go to S540.
S530: and setting motion information for the unavailable adjacent blocks by utilizing the motion information of the time domain co-located blocks.
In a specific embodiment, the motion information of the time-domain co-located block may be used as the motion information of the unavailable neighboring block.
In another embodiment, the forward motion information of the unavailable neighboring block may be set as the forward motion information or the backward motion information of the forward collocated block, and the backward motion information of the unavailable neighboring block may be set as the backward motion information or the forward motion information of the backward collocated block, where the frame where the forward collocated block is located is a reference frame in the forward reference frame list of the current block, and the frame where the backward collocated block is located is a reference frame in the backward reference frame list of the current block.
In yet another embodiment, the forward motion information or the backward motion information of the temporal co-located block is scaled according to the image order index difference to be used as the forward motion information and the backward motion information of the unavailable neighboring block.
After S530 is executed, the process jumps to S550.
S540: the initial value is set to the motion information of the unavailable neighbor block.
After S540 is executed, the process jumps to S550.
S550: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
S560: and modifying the motion information of the available adjacent block with the motion information as the initial value by utilizing the motion information of the reference block of the unavailable adjacent block with the motion information as the initial value.
Specific modifications may be made to other embodiments of the present application.
S570: and respectively calculating the predicted value of the current block by using the motion information of the available adjacent block and the unavailable adjacent block in each effective angular direction.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not repeated here.
In this embodiment, when the time domain co-located block of the unavailable neighboring block is determined to be available, the motion information of the unavailable neighboring block is configured by using the motion information of the time domain co-located block, and when the time domain co-located block of the unavailable neighboring block is determined to be unavailable, the motion information of the unavailable neighboring block is set as an initial value, so that an error caused by the fact that the unavailable neighboring block is configured with the motion information can be reduced compared with a mode that the motion information of the unavailable neighboring block is directly set as the initial value; furthermore, after the motion information of the neighboring blocks in each angular direction is searched for the repetition to obtain the effective angular direction, only the motion information of the unavailable neighboring blocks with the motion information as the initial value is modified, and compared with a mode of directly modifying the motion information of each unavailable neighboring block, the method can reduce the calculation overhead required by modifying the motion information of the unavailable neighboring blocks.
Fig. 7 is a flowchart illustrating a sixth embodiment of an angular mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 7 is not limited in this embodiment. As shown in fig. 7, the present embodiment may include:
s610: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S620: motion information is set for the unavailable neighbor blocks.
S630: and selecting at least one pair of adjacent blocks in each angle direction according to the size of the current block to carry out motion information duplicate checking, wherein the angle direction of duplicate checking is an effective angle direction.
Optionally, the selected neighbors in the same angular direction are arranged equidistantly. Of course, in other embodiments, the neighbors in the same angular direction may be selected in other manners (e.g., randomly, etc.).
In general, the effective angular direction accuracy obtained from the duplication checking depends on the number of times of duplication checking, the size of the current block, and the like. Under the condition of consistent size, the more the duplication checking times are in each angle direction of the current block, the more accurate the effective angle direction is obtained according to the duplication checking result. Under the condition that the duplicate checking times are consistent, the obtained effective angle direction of the current block with smaller size is more accurate relative to the current block with larger size.
For this reason, for a current block having a larger size, the number of pairs of neighboring blocks selected in each angular direction may be increased, i.e., the number of repetition checks may be increased. Referring to fig. 8 in combination, the specific implementation process may include:
s631: it is determined whether the width/height of the current block is greater than a first threshold.
A current block having a width/height greater than a first threshold may be regarded as a current block having a larger size; and regarding the current block with the width/height smaller than or equal to the first threshold as the current block with smaller size. For example, the first threshold may be set to 32.
If yes, go to S632; if not, S633 is executed.
S632: and selecting a first number of adjacent blocks in the direction corresponding to the width/height for duplicate checking.
If the width is larger than the first threshold value, selecting a first number of adjacent blocks in the direction corresponding to the width for duplicate checking; and if the height is larger than the first threshold, selecting a first number of adjacent blocks in the direction corresponding to the height for duplicate checking. Wherein the width corresponding direction comprises vertical and/or vertical to the right, and the height corresponding direction comprises horizontal and/or horizontal to the down.
A case where both the width and the height are greater than the first threshold (32) (the current block size is 64 × 64) is exemplified in connection with fig. 9.
As shown in fig. 9, 4 equidistant neighbors are selected for duplicate checking in each of the width-corresponding directions (vertical and vertical right). Wherein the adjacent block B in the vertical direction1~B2NIn selection B1、BK、B2KAnd B3KN64, K N/4, adjacent block D in the vertical right direction1~DNMiddle selection D1、DK、D2KAnd D3KSo that the pair of adjacent blocks requiring the duplication check in the direction of the wide correspondence includes (B)1,BK)、(BK,B2K)、(B2K,B3K)、(B3K,D1)、(D1,DK) And (D)K,D2K)。
Each of 4 equidistant neighbors in the high corresponding direction (horizontal and horizontal down) are selected for duplicate checking. Wherein the adjacent block A in the horizontal direction1~ANOf (1) selection A1、AK、A2KAnd A3KNeighbor block C in the horizontal downward direction1~CNMiddle selection C1、CK、C2KAnd C3KSo that the pair of adjacent blocks which need to be repeated in the direction of high correspondence includes (A)1,AK)、(AK,A2K)、(A2K,A3K)、(A3K,C1)、(C1,CK)、(CK,C2K) And (C)2K,C3K)。
In addition, the pair of adjacent blocks that need to be duplicated in the horizontal upward direction includes (a)1E) and (E, B)1)。
S633: and selecting a second number of adjacent blocks in the direction corresponding to the width/height for duplication checking.
The first number is greater than the second number, which is greater than 1.
A case where the width and height are both equal to the first threshold (32) (the current block size is 32 × 32) is exemplified in connection with fig. 10.
As shown in fig. 10, 2 equidistant neighbors are selected for duplicate checking in each of the width-corresponding directions (vertical and vertical right). Wherein the adjacent block B in the vertical direction1~BNIn selection B1And BKN32, K N/2, adjacent block D in the vertical right direction1~DNMiddle selection D1And DKSo that the pair of adjacent blocks requiring the duplication check in the direction of the wide correspondence includes (B)1,BK)、(BK,D1) And (D)1,DK)。
Each of 2 neighbors in the high corresponding direction (horizontal and horizontal down) are selected for duplicate checking. Wherein the adjacent block A in the horizontal direction1~ANOf (1) selection A1And AKNeighbor block C in the horizontal downward direction1~CNMiddle selection C1And CKSo that the pair of adjacent blocks which need to be repeated in the direction of high correspondence includes (A)1,AK)、(AK,C1) And (C)1,CK)。
In addition, the pair of adjacent blocks that need to be duplicated in the horizontal upward direction includes (a)1E) and (E, B)1)。
S640: modifying motion information of an available neighbor block using motion information of a reference block of the unavailable neighbor block.
The motion information of the unavailable neighboring block in the valid direction may be modified, or the motion information of the unavailable neighboring block in all directions may be modified.
S650: and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not repeated here.
In this embodiment, the number of the selected duplicate checking neighboring blocks in each angle direction is determined based on the size of the current block, and compared with a method in which the number of the selected duplicate checking neighboring blocks in each angle direction is the same for the current blocks of all sizes, the finally selected effective angle direction can be more accurate.
Fig. 11 is a flowchart illustrating a seventh embodiment of an angular mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 11 is not limited in this embodiment. As shown in fig. 11, the present embodiment may include:
s710: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S720: motion information is set for the unavailable neighbor blocks.
S730: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
If the angle direction meets the first condition, at least one weight checking is added.
In a specific embodiment, the first condition may be that the horizontal and/or vertical direction fails to pass the weight check. If the horizontal and/or vertical direction does not pass the duplication checking, at least one duplication checking is added.
Taking one-time repetition increasing as an example, the adjacent blocks include N horizontal adjacent blocks located in the horizontal direction of the current block and N vertical adjacent blocks located in the vertical direction of the current block, the repetition increasing in the horizontal direction is the repetition between the kth and nth horizontal adjacent blocks in the order from top to bottom, the repetition increasing in the vertical direction is the repetition between the kth and nth vertical adjacent blocks in the order from left to right, and K is N/i, i is the number of horizontal adjacent blocks or vertical adjacent blocks selected from the completed repetition.
In one embodiment, i may be 2.
The case where the horizontal and vertical directions do not pass the duplication checking is exemplified with reference to fig. 12. As shown in fig. 12, the pair of adjacent blocks (a) in the horizontal direction1,AK) If the duplicate checking is not passed, adding one pair of adjacent blocks (A) in the horizontal directionK,AN) Checking the duplicate; pair of vertically adjacent blocks (B)1,BK) The duplicate checking is not passed, and the pair of adjacent blocks (B) is added once in the vertical directionK,BN) And (4) checking the duplicate.
The weight checking is not carried out in the horizontal direction and/or the vertical direction, at least one time of weight checking is added, so that the effective angle direction can be selected according to the multiple weight checking results, the weight checking precision can be improved, and the accuracy of the finally selected effective angle direction can be improved.
In another embodiment, the first condition may be that the angular direction is horizontally downward or vertically rightward. If the angle direction is horizontal downward or vertical rightward, at least one weight checking is added.
Because the adjacent blocks in the horizontal downward direction and the vertical rightward direction are not completely duplicated in the duplication checking process, in order to improve duplication checking precision, duplication checking can be added at least once in the horizontal downward direction and the vertical rightward direction.
Optionally, the neighbor blocks include N horizontal neighbor blocks located in the horizontal direction of the current block and N vertical neighbor blocks located in the vertical direction of the current block, the repetition check increasing in the horizontal downward direction is the repetition check between two horizontal neighbor blocks, and the repetition check increasing in the vertical rightward direction is the repetition check between two vertical neighbor blocks.
Taking one-time repetition increasing as an example, the repetition increasing in the horizontal downward direction is the repetition between the 3 rd and the kth horizontal neighboring blocks in the sequence from top to bottom, the repetition increasing in the vertical rightward direction is the repetition between the 3 rd and the kth vertical neighboring blocks in the sequence from left to right, and K is N/i, i is the number of the horizontal/vertical neighboring blocks selected in the horizontal/vertical direction repetition.
As exemplified in connection with fig. 13, as shown in fig. 13, pairs of adjacent blocks (a) are added in a horizontal downward direction3,AK) For duplicate checking, pairs of neighbors are added in the vertical right direction (B)3,BK) And (4) checking the duplicate.
In yet another embodiment, the first condition may be that the duplicate checking result of the angular direction failing to pass the duplicate checking includes that no reference frame of a pair of neighboring blocks exists. And if the duplicate checking result of the angular direction which does not pass the duplicate checking comprises that the reference frames of the pair of adjacent blocks do not exist, adding at least one duplicate checking for the angular direction which does not pass the duplicate checking.
The motion information duplicate checking method includes performing translation on sequence numbers of at least one pair of adjacent blocks where no reference frame exists, wherein each pair of translated adjacent blocks still belongs to an angular direction which does not pass the duplicate checking, and performing motion information duplicate checking on the at least one pair of translated adjacent blocks, which is different from the sequence numbers of the pair of adjacent blocks where no reference frame exists.
As illustrated in connection with fig. 14, the pair of adjacent blocks (a) shown in fig. 141,AK) If the reference frame of two adjacent blocks does not exist, the serial numbers of two adjacent blocks in the adjacent block pair are translated by one bit in the same direction to obtain an adjacent block pair (A)2,AK+1) Then pair (A)2,AK+1) And (6) carrying out motion information duplicate checking.
And/or, a pair of neighboring blocks of which no reference frame exists in a direction away from the current block may be selected for motion information repetition.
As illustrated in connection with fig. 15, the pair of adjacent blocks (a) shown in fig. 151,AK) The reference frames of the two adjacent blocks do not exist, and the adjacent block pair (a) formed by the adjacent blocks of the two adjacent blocks in the adjacent block pair in the direction far away from the current block1,aK) And (6) carrying out motion information duplicate checking.
S740: the motion information of the unavailable neighbor block is modified using the motion information of the reference block of the unavailable neighbor block.
S750: and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not repeated here.
In the embodiment, the motion information of the adjacent block is checked for duplication, and at least one duplication checking mode is added under the condition that the angle direction meets the first condition, so that the duplication checking result is more accurate, and the obtained effective angle direction is more accurate.
Fig. 16 is a flowchart illustrating an eighth embodiment of an angular mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 16 is not limited in this embodiment. As shown in fig. 16, the present embodiment may include:
s810: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S820: motion information is set for the unavailable neighbor blocks.
S830: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
Wherein if at least two of the horizontal, vertical and horizontal upward duplicate checking results satisfy the second condition, at least one horizontal upward duplicate checking is reduced.
Optionally, the duplicate checking in the horizontal direction includes a first duplicate checking for motion information between a horizontally upward neighboring block and a first horizontally neighboring block, and a second duplicate checking for motion information between a horizontally upward neighboring block and a first vertically neighboring block, where the horizontally upward neighboring block is located in the horizontally upward direction of the current block, the first horizontally neighboring block is located in the horizontal direction of the current block and adjacent to the horizontally upward neighboring block, and the first vertically neighboring block is located in the vertical direction of the current block and adjacent to the horizontally upward neighboring block.
If at least two of the horizontal, vertical, and horizontal upward duplicate checking results satisfy the second condition, reducing at least one horizontal upward duplicate checking comprises:
in one embodiment, the second condition may be: both horizontal and vertical are effective angular directions.
If the horizontal direction and the vertical direction are both effective angle directions, the horizontal direction is judged to be the effective angle direction without checking the weight of the horizontal direction.
Exemplified with reference to FIG. 17, as shown in FIG. 17, (A)1,AK) For the pair of horizontally adjacent blocks to be duplicated by motion information, (B)1,BK) For the pair of neighbors in the vertical direction that are duplicated by motion information, i.e. both horizontal and vertical are valid angular directions, there is no need to align the pair of neighbors (A) in the horizontal direction1E) and (E, B)1) And (6) carrying out motion information duplicate checking.
In another embodiment, the second condition may be: the horizontal is the valid angular direction and one of the first and second weight checks results in being valid.
If the horizontal direction is the effective angle direction and the duplicate checking result of one of the first duplicate checking and the second duplicate checking is effective, the horizontal direction is determined to be the effective angle direction without performing the other one of the first duplicate checking and the second duplicate checking.
As illustrated in fig. 18, the pair of adjacent blocks (a) in the horizontal direction is shown in fig. 181,AK) Duplicate checking by motion information, i.e. valid horizontally, and pair of neighbors (E, B) in the horizontally upward direction1) By motion information duplication checking, i.e. the duplication checking result of the second duplication checking is valid, there is no need to pair the adjacent blocks (a) in the horizontal upward direction1And E) carrying out motion information duplication checking, namely judging that the horizontal direction is the effective angle direction without carrying out first duplication checking.
In yet another embodiment, the second condition may be: the vertical is the valid angular direction and one of the first and second weight checks results in being valid.
And if the vertical direction is the effective angle direction and one of the first weight checking result and the second weight checking result is effective, judging that the horizontal direction is the effective angle direction without performing the other one of the first weight checking result and the second weight checking result.
As exemplified in connection with fig. 19, as shown in fig. 19, the pair of adjacent blocks (B) in the vertical direction1,BK) Duplicate checking by motion information, i.e. valid in vertical direction, and pair of neighbors in horizontal upward direction (A)1And E) duplicate checking is carried out through the motion information, namely the duplicate checking result of the first duplicate checking is effective, and the pair of adjacent blocks (E, B) in the horizontal upward direction is not required1) And (4) carrying out motion information duplicate checking, namely judging that the horizontal direction is the effective angle direction without carrying out second duplicate checking.
S840: the motion information of the unavailable neighbor block is modified using the motion information of the reference block of the unavailable neighbor block.
S850: and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not repeated here.
In this embodiment, when duplicate checking is performed on the neighboring block, if at least two of the duplicate checking results in the horizontal direction, the vertical direction, and the horizontal direction satisfy the second condition, at least one duplicate checking for the horizontal direction is reduced. Compared with a mode of performing duplicate checking twice on each horizontal direction, the method can reduce the calculation overhead required in the duplicate checking process.
Fig. 20 is a flowchart illustrating a ninth embodiment of the angular mode inter prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 20 is not limited in this embodiment. As shown in fig. 20, the present embodiment may include:
s910: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S920: motion information is set for the unavailable neighbor blocks.
S930: and carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the duplicate checking comprises judging whether the image sequence indexes of the reference frames of at least one pair of selected adjacent blocks are the same and whether the motion vectors are the same by taking the angle direction of the duplicate checking as an effective angle direction.
When the picture order index and the motion vector of the reference frame of the adjacent block pair in an angular direction are the same, the angular direction is determined to be invalid.
Further, the duplication checking may further include determining whether reference frame indexes of the selected at least one pair of neighboring blocks are the same. When the duplication checking includes determining whether the reference frame index, the motion vector, and the image sequence index of the reference frame are the same, the determination sequence of the three may not be limited.
The following describes a process of duplicate checking two neighboring blocks, Nei _ b1 and Nei _ b2, in one angular direction, by taking an example of determining a reference frame index and a motion vector first and then determining whether the image sequence indexes of the reference frames are the same:
(i) (iii) determining whether a forward reference frame and a backward reference frame of Nei _ b1 are present (whether the reference frame index is greater than or equal to 0), and if one is present, (ii) performing; otherwise, the angular direction is judged to be invalid.
(ii) (iv) determining whether a forward reference frame and a backward reference frame of Nei _ b2 exist, and if one exists, performing (iii); otherwise, the angular direction is judged to be invalid.
(iii) Judging whether the forward reference frame indexes of the Nei _ b1 and the Nei _ b2 are the same, if so, performing (iv); otherwise, the angular direction is judged to be invalid.
(iv) And (f) judging whether a forward reference frame of the Nei _ b1 exists and whether forward reference motion vectors of the Nei _ b1 and the Nei _ b2 are the same, if so, judging that the angle direction is effective, and if not, carrying out (v).
(v) And (5) judging whether the backward reference frame indexes of the Nei _ b1 and the Nei _ b2 are the same, if so, performing (vi), otherwise, judging that the angle direction is effective.
(vi) And (vii) judging whether a backward reference frame of the Nei _ b1 exists and whether backward reference motion vectors of the Nei _ b1 and the Nei _ b2 are the same, if so, judging that the angle direction is effective, and if not, carrying out (vii).
(vii) Judging whether the image sequence indexes of the reference frames of the Nei _ b1 and the Nei _ b2 are the same, if so, judging that the angle direction is invalid; otherwise, the angular direction is determined to be valid.
For reference frames of the same picture order index, their reference frame indices in the forward reference frame index list and/or the backward reference frame index list of different neighbors may be different. Therefore, if the determination is made only based on the reference frame index and the motion vector, there may be a case where the reference frame indexes in the motion information of the two neighboring blocks are different, so that the corresponding angular direction is determined to be valid, but the image sequence indexes of the reference frames of the two neighboring blocks are the same, the motion vectors are also the same, the motion information of the two neighboring blocks is substantially the same, and the corresponding angular direction should be invalid. Therefore, whether the image sequence indexes of the reference frames are the same or not can be judged in the duplication checking process, and the accuracy of the judgment result can be improved.
S940: the motion information of the unavailable neighbor block is modified using the motion information of the reference block of the unavailable neighbor block.
S950: and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
For further detailed description of the steps of this embodiment, please refer to other embodiments in this application, which are not repeated here.
In this embodiment, the process of performing motion information duplication checking on the neighboring blocks includes determining whether the image sequence indexes of the reference frames of the at least one pair of selected neighboring blocks are the same and whether the motion vectors are the same, and determining that the reference frames are invalid in the angular direction only when the image sequence indexes of the reference frames are the same and the motion vectors are the same, so that the determination result can be more accurate.
Fig. 21 is a flowchart illustrating a tenth embodiment of an angle mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 21 is not limited in this embodiment. As shown in fig. 21, the present embodiment may include:
s1010: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S1020: motion information is set for the unavailable neighbor blocks.
S1030: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
S1040: the motion information of the unavailable neighbor block is modified using the motion information of the reference block of the unavailable neighbor block.
S1050: the current block is divided into a plurality of sub-blocks, and motion compensation is performed by using motion information of corresponding adjacent blocks of each sub-block in the effective angle direction to obtain a predicted value of each sub-block.
The prediction values of all sub-blocks form the prediction value of the current block, wherein the motion information of at least two corresponding adjacent blocks is used when the sub-blocks in at least one effective angular direction are subjected to motion compensation.
In a specific embodiment, the current block is divided into a plurality of first sub-blocks of a first size, each of the first sub-blocks is composed of a plurality of second sub-blocks of a second size, and the motion vector of at least one of the first sub-blocks is a weighted average of the motion vectors of at least two corresponding neighboring blocks in at least one effective angular direction.
Optionally, the first dimension is 8 x 8 and the second dimension is 4 x 4.
The method for calculating the motion vector of a first sub-block (size 8 x 8) in the horizontal and vertical directions will be described with reference to fig. 22.
Two corresponding horizontal neighbors (A)K-1And AK) The weighted average of the motion vectors of the first sub-block as the motion vector of the first sub-block in the horizontal direction may be as follows:
Figure BDA0002593050390000291
wherein MV _ Hor is the motion vector of the first sub-block in the horizontal direction, MV (A)k) Is AKMotion vector of (A), MV (A)k-1) Is Ak-1The motion vector of (2).
Two corresponding vertical neighbors (B)K-1And BK) The weighted average of the motion vectors of the first sub-block as the motion vector of the first sub-block in the vertical direction may be as follows:
Figure BDA0002593050390000292
where MV _ Ver is the motion vector of the first sub-block in the horizontal direction, MV (B)k) Is BkMotion vector of (1), MV (B)k-1) Is Bk-1The motion vector of (2).
The above way of calculating the motion vectors of the first sub-block in the vertical and horizontal directions is also applicable when calculating the motion vectors of the first sub-block in other directions.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not repeated here.
In this embodiment, when performing motion compensation on the first sub-block in the effective angular direction, the motion information of at least two corresponding neighboring blocks is used, and compared with a mode in which motion compensation is performed on the first sub-block only using the motion information of one corresponding neighboring block, a more accurate predicted value of the first sub-block can be obtained, and the accuracy of encoding is improved.
Fig. 23 is a flowchart illustrating an eleventh embodiment of an angular mode inter prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 23 is not limited in this embodiment. As shown in fig. 23, the present embodiment may include:
s1110: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S1120: motion information is set for the unavailable neighbor blocks.
S1130: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
S1140: and filling the effective angle direction into an angle mode list to obtain the angle mode index of the effective angle direction.
When the angle mode inter-frame prediction mode and other inter-frame prediction modes share one mode index list, the corresponding index value range of the angle mode index in the mode index list is 4-8.
A mode list (namely an angle mode list) can be independently set for the effective angle selected by the angle mode inter-frame prediction, and the value range of the obtained angle mode index is 0-4 after the effective angle direction selected by the angle mode inter-frame prediction is filled into the angle mode list. Less bit overhead is required in the subsequent encoding process compared to the direction in which a mode index list is shared with other modes. And, after the angle mode indexes are separated, the number of indexes in the shared mode list can be reduced.
S1150: the motion information of the unavailable neighbor block is modified using the motion information of the reference block of the unavailable neighbor block.
In addition, after obtaining the prediction value of the current block, the method may further include:
s1160: and respectively calculating the prediction value and the rate distortion cost of the current block by utilizing the motion information of the adjacent blocks in each effective angular direction.
After the prediction value and the rate distortion cost of the current block are calculated, rate distortion cost optimization can be performed together with other inter modes to select the best inter prediction mode to encode the current block. Therefore, on the basis of the present embodiment, the method may further include the steps of:
s1170: and coding the current block to obtain the code stream of the current block.
The code stream of the current block comprises an angle mode mark, and the angle mode mark is used for indicating whether the current block adopts angle mode inter-frame prediction or not.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not repeated here.
Since the mode list corresponding to the selected inter-frame prediction mode needs to be encoded in the encoding process, in this embodiment, an independent angle mode list is set for angle mode inter-frame prediction, and the number of index lists in the original mode list can be reduced, so that the length of the mode list needing to be encoded in the encoding process can be reduced, and the bit number overhead (code rate) needed in the encoding process can be reduced.
Fig. 24 is a flowchart illustrating a twelfth embodiment of the angular mode inter-frame prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 24 is not limited in this embodiment. As shown in fig. 24, the present embodiment may include:
s1210: a candidate neighbor list is constructed for the current block.
The candidate neighbor block list includes neighbors of the current block in a plurality of angular directions, wherein the encoded neighbors using inter prediction are available neighbors, and the remaining neighbors are unavailable neighbors.
S1220: motion information is set for the unavailable neighbor blocks.
S1230: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
S1240: the order of the effective angle directions is determined by the texture direction of the current block.
Wherein the order of the respective effective angular 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: and calculating the gradient direction of the reference pixel of the current block by using a gradient operator.
The reference pixel may be a reference pixel of the current block in an intra prediction mode. The reference pixels are located on the encoded side (e.g., left and upper sides) of the current block. Gradient operators can be, but are not limited to, Roberts, Prewitt, Sobel, Laplacian, Canny operators, and the like. The following description takes Sobel operator and laplace operator as examples:
(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)
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)
Figure BDA0002593050390000311
(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)
Sy=a1(f(x,y-1)+f(x,y+1))-a2f(x,y)
Figure BDA0002593050390000312
wherein, a1、a2And a3Is a constant, f (x, y) is the pixel value of the reference pixel, SxFor the horizontal gradient of the reference pixel, SyIs the vertical gradient of the reference pixel, and Angle is the gradient direction of the reference pixel.
S1242: the number of reference pixels whose gradient directions fall within an angular range centered on each effective angular direction is counted.
The size of the angle range can 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: the effective angular directions are sorted in order of the number of reference pixels from large to small.
The effective angular directions are sorted in order of the number of reference pixels falling within the angular range from large to small.
S1250: the effective angular directions are filled into the pattern list in order.
S1260: the motion information of the unavailable neighbor block is modified using the motion information of the reference block of the unavailable neighbor block.
S1270: and respectively calculating the predicted value of the current block by utilizing the motion information of the available adjacent block and/or the unavailable adjacent block in each effective angular direction.
For further details of the steps of this embodiment, reference is made to the previous embodiment, which is not repeated here.
In this embodiment, on the basis of selecting the effective angle directions from the plurality of 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, the gradient direction of which falls within the angle range with each effective angle direction as the center, is counted, and the effective angle directions are sorted according to the order of the number of the falling reference pixels from large to small. Because the larger the number of the corresponding reference pixels, the closer the effective angle direction is to the texture direction of the current block, the effective angle direction is filled into the mode list in sequence, so that the effective angle direction close to the texture direction of the current block is ranked in the mode list in front, and is easier to select in the encoding process, thereby improving the encoding accuracy and reducing the code rate required by the encoding process.
Fig. 26 is a flowchart illustrating a thirteenth embodiment of the angular mode inter prediction method according to the present application. It should be noted that, if the result is substantially the same, the flow sequence shown in fig. 25 is not limited in this embodiment. As shown in fig. 26, the present embodiment may include:
s1301: a candidate neighbor list is constructed for the current block.
The candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, wherein the encoded adjacent blocks adopting inter-frame prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
s1302: motion information is set for the unavailable neighbor blocks.
S1303: and (4) carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is the effective angle direction.
S1304: the motion information of the unavailable neighbor block is modified using the motion information of the reference block of the unavailable neighbor block.
S1305: the current block is divided into a plurality of sub-blocks, and the motion information of each sub-block is obtained by respectively utilizing the motion information of the corresponding adjacent block of each sub-block in the effective angle direction.
The motion information includes motion vectors. The operation 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 motion information of the current sub-block can be obtained by respectively using the motion information of the corresponding adjacent block of the current sub-block in each effective angle direction.
S1306: and correcting the first predicted value of each sub-block by using the plurality of corrected motion vectors respectively to obtain a plurality of second predicted values of each sub-block.
The first prediction value is obtained by performing motion compensation using motion information.
Under the condition that the image sequence index of the forward reference frame of the current block is the same as the image sequence index of the backward reference frame, the first predicted value of each sub-block can be corrected by utilizing a decoding-end motion vector refinement (DMVR) technology to obtain a plurality of second predicted values of each sub-block. The method comprises the following specific steps:
referring to fig. 27, S1306 may include the following sub-steps:
s13061: and correcting the motion vector of each sub-block by using the plurality of corrected motion vectors respectively to obtain a plurality of corrected motion vectors of each sub-block.
The first prediction value may also be referred to as a first prediction pixel value, and may be compensated by using each motion information of the current sub-block to obtain the corresponding first prediction value. The first predictor may include a forward first predictor and a backward first predictor, the forward first predictor may be motion-compensated using forward motion information, and the backward first predictor may be motion-compensated using backward motion information.
A block corresponding to the forward first predictor of the current sub-block may be referred to as a forward first prediction block, and a block corresponding to the backward first predictor of the current sub-block may be referred to as a backward first prediction block. In other words, a block to which forward motion information of the current sub-block points may be referred to as a forward first prediction block, and a block to which backward motion information of the current sub-block points may be referred to as a backward first prediction block.
The plurality of modified motion vectors for each sub-block may be searched within a search range of the forward/backward first prediction block.
The search range of the forward first prediction block mayFor the N × N pixel range centered on the vertex of the forward first prediction block (the point where the top left pixel is located), during searching, all the pixels in the search range may be traversed in a predetermined order, for example, from left to right, from top to bottom, to obtain N pixels2The forward modified motion vectors Δ MV1 and Δ MV1 are motion vectors whose vertices point to the search pixels, or Δ MV1 is a motion vector of the forward first prediction block pointing to the forward second prediction block (refer to the following description).
The search range of the backward first prediction block may be an N × N pixel range centered on a vertex (a point where a lower right corner pixel is located) of the backward first prediction block, and during the search, all pixel points in the search range may be traversed according to a predetermined order to obtain N2The backward modified motion vectors are, for example, obtained by traversing all the pixels in a raster scanning order from right to left and from bottom to top, and a plurality of backward modified motion vectors Δ MV2 are obtained, where Δ MV2 is a motion vector pointing to the search pixel at the vertex, or Δ MV1 is a motion vector pointing to the backward second prediction block from the backward first prediction block.
For simplicity of description, the forward modified motion vector Δ MV1 searched in the search range of the forward first prediction block will be described with reference to fig. 28 as an example:
and after finding the search point C, translating the forward first prediction block to ensure that the vertex A is superposed with the search point C to obtain a forward second prediction block, or forming a forward second prediction block which takes the point C as the vertex and has the same size with the sub-block when traversing to the point C, and calculating to obtain a prediction value of the forward second prediction block. Δ MV1 is the motion vector pointing from vertex a to search point C, or Δ MV1 is the motion vector pointing from the first prediction block forward of vertex a to the second prediction block forward of search point C.
The forward correction motion vector and the backward correction motion vector corresponding to each group are equal in size and opposite in direction.
The forward motion vector of the sub-block may be corrected by using the forward correction motion vector to obtain a corrected forward motion vector, and the backward motion vector of the sub-block may be corrected by using the backward correction motion vector to obtain a corrected backward motion vector.
For example, if the motion vectors of the sub-blocks are (MV1, MV2), the motion vectors after sub-block modification are (MV1+ Δ MV1, MV2+ Δ MV 2).
S13062: and respectively carrying out motion compensation on each sub-block by using a plurality of pieces of motion information containing the corrected motion vectors to obtain a plurality of second predicted values of each sub-block.
The second predictor may be a pixel value of a second prediction block to which motion information including the modified motion vector points.
S1307: and respectively selecting the corrected motion vector corresponding to the second predicted value with the minimum evaluation index for each sub-block as the final corrected motion vector of the sub-block.
The N of the sub-block may be obtained based on Sum of Absolute Difference (SAD) algorithm2And selecting a corrected motion vector corresponding to the pair of the forward second predicted value and the backward second predicted value with the minimum SAD as a final corrected motion vector of the sub-block for the evaluation index (SAD) between the forward second predicted value and the backward second predicted value.
S1308: and correcting by using the final corrected motion vectors of all the sub-blocks to obtain the corrected motion vector.
S1309: and obtaining the predicted value of each sub-block by using the corrected motion vector, wherein the predicted values of all the sub-blocks form the predicted value of the current block.
And calculating the predicted value of the sub-block by using the modified motion vector, wherein the predicted value of the sub-block can be the average value of the forward pre-second measured value and the backward predicted value.
For further details of the steps of this embodiment, please refer to other embodiments, which are not repeated here.
In this embodiment, before motion compensation is performed on the motion information of the current block to obtain the prediction value, the DMWR technology is used to correct the motion vector of the current block, so that the accuracy of prediction can be improved.
It should be noted that the embodiments of the present application may be combined without conflict with each other.
Fig. 29 is a schematic structural diagram of a first embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 29, the apparatus may include: a building module 11, a setting module 12, a duplication checking module 13, a modification module 14 and a calculation module 15.
The constructing module 11 may be configured to construct a candidate neighboring block list for the current block, where the candidate neighboring block list includes neighboring blocks of the current block in multiple angular directions, where the encoded neighboring blocks using inter prediction are available neighboring blocks, and the remaining neighboring blocks are unavailable neighboring blocks.
The setting module 12 may be used to set motion information for the unavailable neighbors.
The duplicate checking module 13 may be configured to perform duplicate checking on the motion information of the neighboring blocks in each angle direction, where the angle direction of the duplicate checking is an effective angle direction.
And a modification module 14, configured to modify the motion information of the unavailable neighboring block in the effective angular direction by using the motion information of the reference block of the unavailable neighboring block in the effective angular direction.
The calculation module 15 may be configured to 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 angular direction, respectively.
Fig. 30 is a schematic structural diagram of an angular mode inter-frame prediction apparatus according to a second embodiment of the present application. As shown in fig. 30, the apparatus may include: a building module 21, a setting module 22, a duplication checking module 23, a modification module 24 and a calculation module 25. The constructing module 21 may be configured to construct a candidate neighbor block list for the current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks using inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
The setting module 22 may be configured to set motion information for the unavailable neighbor block using motion information of the temporal co-located block if the temporal co-located block of the unavailable neighbor block is available, and to set motion information of the unavailable neighbor block as an initial value if the temporal co-located block of the unavailable neighbor block is unavailable.
The duplicate checking module 23 may be configured to perform duplicate checking on the motion information of the neighboring blocks in each angle direction, where the angle direction of the duplicate checking is an effective angle direction.
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.
The calculation module 25 may be configured to 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 angular direction, respectively.
Fig. 31 is a schematic structural diagram of a third embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 31, the apparatus may include: a construction module 31, a setting module 32, a duplication checking module 33, a modification module 34 and a calculation module 35.
The constructing module 31 may be configured to construct a candidate neighboring block list for the current block, where the candidate neighboring block list includes neighboring blocks of the current block in multiple angular directions, where the encoded neighboring blocks using inter prediction are available neighboring blocks, and the remaining neighboring blocks are unavailable neighboring blocks.
The setting module 32 may be used to set motion information for the unavailable neighbors.
And a duplicate checking module 33, configured to select at least one pair of adjacent blocks in each angle direction according to the size of the current block to perform motion information duplicate checking, where the angle direction of duplicate checking is an effective angle direction.
Modification module 34 may be configured to modify the motion information of the available neighbor blocks using the motion information of the reference blocks of the unavailable neighbor blocks.
The calculation module 35 may be configured to 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 angular direction, respectively.
Fig. 32 is a schematic structural diagram of a fourth embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 32, the apparatus may include: a construction module 41, a setting module 42, a duplication checking module 43, a modification module 44 and a calculation module 45.
The constructing module 41 may be configured to construct a candidate neighbor block list for the current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks using inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
The setting module 42 may be used to set motion information for the unavailable neighbor blocks.
The duplicate checking module 43 may be configured to perform duplicate checking on the motion information of the neighboring blocks in each angular direction, where the angular direction of the duplicate checking is an effective angular direction, and if the angular direction meets the first condition, at least one duplicate checking is added.
The modification module 44 may be configured to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block;
the calculation module 45 may be configured to 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 angular direction, respectively.
Fig. 33 is a schematic structural diagram of a fifth embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 33, the apparatus may include: a construction module 51, a setting module 52, a duplication checking module 53, a modification module 54 and a calculation module 55.
The constructing module 51 may be configured to construct a candidate neighbor block list for the current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks using inter prediction are usable neighbor blocks, and the remaining neighbor blocks are unusable neighbor blocks.
The setting module 52 may be configured to set motion information for the unavailable neighbor blocks.
The duplicate checking module 53 may be configured to perform duplicate checking on the motion information of the neighboring blocks in each angular direction, where the angular direction of the duplicate checking is an effective angular direction, and if at least two of the duplicate checking results in the horizontal direction, the vertical direction, and the horizontal direction satisfy a second condition, the duplicate checking in the horizontal direction at least once is reduced.
The modification module 54 may be configured to modify the motion information of the unavailable neighbor block using the motion information of the reference block of the unavailable neighbor block.
The calculation module 55 may be configured to 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 angular direction, respectively.
Fig. 34 is a schematic structural diagram of a sixth embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 34, the apparatus may include: a construction module 61, a setting module 62, a duplication checking module 63, a modification module 64 and a calculation module 65.
A constructing module 61, configured to construct a candidate neighbor block list for the current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks using inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
The setting module 62 may be used to set motion information for the unavailable neighbors.
The duplicate checking module 63 may be configured to perform duplicate checking on the motion information of the neighboring blocks in each angular direction, where the angular direction of the duplicate checking is an effective angular direction, and the duplicate checking includes determining whether the image sequence indexes of the reference frames of the at least one pair of selected neighboring blocks are the same and whether the motion is the same.
The modification module 64 may be configured to modify the motion information of the unavailable neighbor block using the motion information of the reference block of the unavailable neighbor block.
The calculation module 65 may be configured to 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 angular direction, respectively.
Fig. 35 is a schematic structural diagram of a seventh embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 35, the apparatus may include: a building module 71, a setting module 72, a duplication checking module 73, a modification module 74 and a calculation module 75.
A constructing module 71, configured to construct a candidate neighboring block list for the current block, where the candidate neighboring block list includes neighboring blocks of the current block in multiple angular directions, where the encoded neighboring blocks using inter prediction are available neighboring blocks, and the remaining neighboring blocks are unavailable neighboring blocks.
The setting module 72 may be used to set motion information for the unavailable neighbors.
The duplication checking module 73 may be configured to perform duplication checking on the motion information of the neighboring blocks in each angular direction, where the angular direction of duplication checking is an effective angular direction.
The modification module 74 may be configured to modify the motion information of the unavailable neighbor block using the motion information of the reference block of the unavailable neighbor block.
The calculating module 75 may be configured to, when the current block is divided into a plurality of sub blocks, perform motion compensation by using motion information of corresponding neighboring blocks of each sub block in the effective angular direction, respectively, to obtain a prediction value of each sub block, where the prediction values of all sub blocks form the prediction value of the current block, and motion information of at least two corresponding neighboring blocks is used when motion compensation is performed on the sub block in at least one effective angular direction.
Fig. 36 is a schematic structural diagram of an eighth embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 36, the apparatus may include: a building module 81, a setting module 82, a duplication checking module 83, a population module 84, a modification module 85, and a calculation module 86.
The constructing module 81 may be configured to construct a candidate neighboring block list for the current block, where the candidate neighboring block list includes neighboring blocks of the current block in multiple angular directions, where the encoded neighboring blocks using inter prediction are available neighboring blocks, and the remaining neighboring blocks are unavailable neighboring blocks.
The setting module 82 may be used to set motion information for the unavailable neighbor blocks.
The duplication checking module 83 may be configured to perform duplication checking on the motion information of the neighboring blocks in each angular direction, where the angular direction of the duplication checking is an effective angular direction.
The padding module 84 may be configured to pad the effective angular direction into the angle mode list to obtain an angle mode index of the effective angular direction.
The modification module 85 may be configured to modify the motion information of the unavailable neighbor block by using the motion information of the reference block of the unavailable neighbor block.
The calculation module 86 may be configured to calculate the prediction value of the current block using the motion information of the available and/or unavailable neighboring blocks in each valid angular direction, respectively.
Fig. 37 is a schematic structural diagram of a ninth embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 37, the apparatus may include: a construction module 91, a setup module 92, a duplication checking module 93, a determination module 94, a fill-in module 95, a modification module 96 and a calculation module 97.
The constructing module 91 may be configured to construct a candidate neighbor block list for the current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks using inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
The setting module 92 may be used to set motion information for the unavailable neighbor blocks.
The duplicate checking module 93 may be configured to perform motion information duplicate checking on neighboring blocks in each angle direction, where the angle direction of the duplicate checking is an effective angle direction.
The determination module 94 may be configured to determine the order of the effective angular directions using the texture direction of the current block.
The filling module 95 may be used to sequentially fill the effective angular directions into the pattern list.
The modification module 96 may be configured to modify the motion information of the unavailable neighbor block using the motion information of the reference block of the unavailable neighbor block.
The calculation module 97 may be configured to calculate the prediction value of the current block using the motion information of the available neighboring block and/or the unavailable neighboring block in each effective angular direction, respectively.
Fig. 38 is a schematic structural diagram of a tenth embodiment of an angular mode inter-frame prediction apparatus according to the present application. As shown in fig. 38, the apparatus may include: the system comprises a construction module 101, a setting module 102, a duplication 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.
The constructing module 101 may be configured to construct a candidate neighbor block list for the current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks using inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks.
The setting module 102 may be configured to set motion information for the unavailable neighbor blocks.
The duplicate checking module 103 may be configured to perform duplicate checking on the motion information of the neighboring blocks in each angular direction, where the angular direction of the duplicate checking is an effective angular direction.
The modification module 104 may be configured to modify the motion information of the unavailable neighbor block using the motion information of the reference block of the unavailable neighbor block.
The first calculating module 105 may be configured to, in a case that the current block is divided into a plurality of sub-blocks, respectively obtain motion information of each sub-block by using motion information of a corresponding neighboring block of each sub-block in the effective angular direction, where the motion information includes a motion vector.
The first modification module 106 may be configured to modify the first prediction value of each sub-block by using a plurality of modified motion vectors, respectively, to obtain a plurality of second prediction values of each sub-block, where the first prediction value is obtained by performing motion compensation using motion information.
The selecting module 107 may be configured to select, for each sub-block, a modified motion vector corresponding to the second prediction value with the smallest evaluation index as a final modified motion vector of the sub-block;
the second modification module 108 may be configured to modify the final modified motion vectors of all the sub-blocks to obtain modified motion vectors.
The second calculation module 109 may be configured to obtain a predictor of each sub-block by using motion information including the modified motion vector, where the predictors of all the sub-blocks constitute a predictor of the current block.
FIG. 39 is a schematic structural diagram of an embodiment of an encoder of the present application. As shown in fig. 39, the encoder includes a processor 111, a memory 112 coupled to the processor.
Wherein the memory 112 stores program instructions for implementing the method of any of the above embodiments; processor 111 is operative to execute program instructions stored in memory 112 to implement the steps of the above-described method embodiments. The processor 111 may also be referred to as a CPU (central processing unit), among others. The processor 111 may be an integrated circuit chip having signal processing capabilities. 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 device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
FIG. 40 is a schematic structural diagram of an embodiment of a storage medium according to the present application. As shown in fig. 40, the storage medium 120 of the embodiment of the present application stores program instructions 121, and the program instructions 121 implement the methods provided by the above-mentioned embodiments of the present application when executed. The program instructions 121 may form a program file stored in the storage medium 120 in the form of a software product, so as to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium 1400 includes: various media capable of storing program codes, such as a usb disk, a mobile hard disk, a Read-ONly Memory (ROM), a RaNdom Access Memory (RAM), a magnetic disk or an optical disk, or a terminal device, such as a computer, a server, a mobile phone, or a tablet.
Fig. 41 is a schematic structural diagram of an embodiment of an electronic device according to the present application. As shown in fig. 41, the electronic device 130 may include, but is not limited to, an encoder 131 (the encoder 121 mentioned above), and may also be other encoders capable of implementing the above method steps, and is not limited in particular herein.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.

Claims (68)

1. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction;
modifying the motion information of the unavailable neighboring block in the effective angular direction by using the motion information of the reference block of the unavailable neighboring block in the effective angular direction;
and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
2. The method of claim 1,
the modifying the motion information of the unavailable neighboring block in the effective angular direction by using the motion information of the reference block of the unavailable neighboring block in the effective angular direction includes:
sorting the adjacent blocks in the effective angle direction according to a modification sequence;
and if the sorted first neighbor block is an unavailable neighbor block, modifying the motion information of the first neighbor block by using the motion information of the first neighbor block and/or the next neighbor block in the candidate neighbor block list.
3. The method of claim 2,
the modifying the motion information of the first neighbor block by using the motion information of the previous neighbor block and/or the next neighbor block of the sorted first neighbor block in the candidate neighbor block list comprises:
if the previous adjacent block of the first adjacent block is an available adjacent block, modifying the motion information of the first adjacent block by using the motion information of the previous adjacent block of the first adjacent block, otherwise, setting the motion information of the first adjacent block as an initial value; or
If the next adjacent block of the first adjacent block is an available adjacent block, modifying the motion information of the first adjacent block by using the motion information of the next adjacent block of the first adjacent block, otherwise, setting the motion information of the first adjacent block as an initial value; or
If the previous adjacent block of the first adjacent block is an available adjacent block, modifying the motion information of the first adjacent block by using the motion information of the previous adjacent block of the first adjacent block, otherwise, judging whether the next adjacent block of the first adjacent block is the available adjacent block, if so, modifying the motion information of the first adjacent block by using the motion information of the next adjacent block of the first adjacent block, otherwise, setting the motion information of the first adjacent block as an initial value; or
If the previous adjacent block and the next adjacent block of the first adjacent block are both available adjacent blocks, modifying the motion information of the first adjacent block by using a weighted average value of the motion information of the previous adjacent block and the next adjacent block of the first adjacent block, if one of the previous adjacent block and the next adjacent block of the first adjacent block is an available adjacent block, modifying the motion information of the first adjacent block by using the motion information of the available adjacent block in the previous adjacent block and the next adjacent block, and if the previous adjacent block and the next adjacent block of the first adjacent block are both unavailable adjacent blocks, setting the motion information of the first adjacent block as an initial value.
4. The method of claim 1,
the modifying the motion information of the unavailable neighboring block in the effective angular direction by using the motion information of the reference block of the unavailable neighboring block in the effective angular direction includes:
sorting the adjacent blocks in the effective angle direction according to a modification sequence;
if the sorted first adjacent block is an unavailable adjacent block, judging whether the time domain co-located block of the first adjacent block is available, if so, modifying the motion information of the first adjacent block by utilizing the motion information of the time domain co-located block of the first adjacent block, wherein the frame where the time domain co-located block of the first adjacent block is located is a reference frame in the reference frame list of the current block.
5. The method of claim 1,
the setting of motion information for the unavailable neighbor block includes:
and if the time domain co-location block of the unavailable adjacent block is available, setting motion information for the unavailable adjacent block by utilizing the motion information of the time domain co-location block, otherwise, setting an initial value as the motion information of the unavailable adjacent block.
6. The method of claim 5,
the setting motion information for the unavailable neighbor block using the motion information of the time domain co-located block includes:
taking the motion information of the time domain co-located block as the motion information of the unavailable adjacent block; or
Setting the forward motion information of the unavailable adjacent block as the forward motion information or the backward motion information of a forward collocated block, and setting the backward motion information of the unavailable adjacent block as the backward motion information or the forward motion information of a backward collocated block, wherein the frame of the forward collocated block is a reference frame in a forward reference frame list of the current block, and the frame of the backward collocated block is a reference frame in the backward reference frame list of the current block; or
And scaling the forward motion information or the backward motion information of the time domain co-location block according to the image sequence index difference to obtain the forward motion information and the backward motion information of the unavailable neighbor block.
7. The method of claim 1,
the motion information duplication checking of the neighboring blocks in each angular direction includes:
and selecting at least one pair of the adjacent blocks in each angle direction according to the size of the current block to carry out motion information duplication checking.
8. The method of claim 7,
the selecting at least one pair of the neighboring blocks for motion information duplication checking in each angular direction according to the size of the current block includes:
if the width/height of the current block is larger than a first threshold value, selecting a first number of the adjacent blocks for duplicate checking in the direction corresponding to the width/height, otherwise selecting a second number of the adjacent blocks for duplicate checking in the direction corresponding to the width/height, wherein the first number is larger than the second number, the second number is larger than 1, the direction corresponding to the width comprises vertical and/or vertical right, and the direction corresponding to the height comprises horizontal and/or horizontal downward.
9. The method of claim 8,
and the adjacent blocks selected in the same angle direction are arranged at equal intervals.
10. The method of claim 1,
the motion information duplication checking of the neighboring blocks in each angular direction includes:
and if the angle direction meets the first condition, adding at least one weight checking.
11. The method of claim 10,
if the angular direction meets a first condition, adding at least one duplicate checking step comprises:
if the horizontal direction and/or the vertical direction do not pass the weight checking, adding at least one weight checking.
12. The method of claim 11,
the adjacent blocks comprise N horizontal adjacent blocks which are positioned on the current block in the horizontal direction and N vertical adjacent blocks which are positioned on the current block in the vertical direction, the duplication checking increased in the horizontal direction is the duplication checking between the Kth and the Nth horizontal adjacent blocks which are ordered from top to bottom, the duplication checking increased in the vertical direction is the duplication checking between the Kth and the Nth vertical adjacent blocks which are ordered from left to right, and K is N/i, i is the number of the selected horizontal adjacent blocks or the selected vertical adjacent blocks in the completed duplication checking.
13. The method of claim 10,
if the angular direction meets a first condition, adding at least one duplicate checking step comprises:
if the angle direction is horizontal downward or vertical rightward, at least one duplication checking is added, the adjacent blocks comprise N horizontal adjacent blocks located in the horizontal direction of the current block and N vertical adjacent blocks located in the vertical direction of the current block, the duplication checking added in the horizontal downward direction is the duplication checking between the two horizontal adjacent blocks, and the duplication checking added in the vertical rightward direction is the duplication checking between the two vertical adjacent blocks.
14. The method of claim 13,
the duplication checking increasing in the horizontal downward direction is the duplication checking between the 3 rd and the Kth horizontal adjacent blocks which are sorted from top to bottom, the duplication checking increasing in the vertical rightward direction is the duplication checking between the 3 rd and the Kth vertical adjacent blocks which are sorted from left to right, and K is N/i, wherein i is the number of the horizontal/vertical adjacent blocks selected from the horizontal/vertical direction duplication checking.
15. The method of claim 10,
if the angular direction meets a first condition, adding at least one duplicate checking step comprises:
and if the duplicate checking result of the angle direction which does not pass the duplicate checking comprises that the reference frames of the pair of adjacent blocks do not exist, adding at least one duplicate checking for the angle direction which does not pass the duplicate checking.
16. The method of claim 15,
the adding at least one weight check for the angular direction which fails to pass the weight check comprises:
translating the serial numbers of a pair of the adjacent blocks which do not exist in the reference frame to obtain the serial numbers, wherein each pair of the translated adjacent blocks still belongs to the angle direction which does not pass the duplicate checking and are different from the serial numbers of the pair of the adjacent blocks which do not exist in the reference frame, and performing motion information duplicate checking on at least one pair of the translated adjacent blocks; and/or
And selecting a pair of adjacent blocks of the adjacent blocks, which do not exist in the reference frame, in a direction far away from the current block for motion information duplication checking.
17. The method of claim 1,
the motion information duplication checking of the neighboring blocks in each angular direction includes:
if at least two of the horizontal, vertical and horizontal upward duplicate checking results meet a second condition, reducing at least one duplicate checking for the horizontal upward duplicate checking.
18. The method of claim 17,
the horizontal upward duplicate checking comprises a first duplicate checking and a second duplicate checking, wherein the first duplicate checking is used for checking motion information between a horizontal upward adjacent block and a first horizontal adjacent block, the second duplicate checking is used for checking motion information between the horizontal upward adjacent block and a first vertical adjacent block, the horizontal upward adjacent block is positioned in the horizontal upward direction of the current block, the first horizontal adjacent block is positioned in the horizontal direction of the current block and is adjacent to the horizontal upward adjacent block, and the first vertical adjacent block is positioned in the vertical direction of the current block and is adjacent to the horizontal upward adjacent block;
if at least two of the horizontal, vertical and horizontal upward duplicate checking results satisfy a second condition, reducing at least one duplicate checking for the horizontal upward comprises:
if the horizontal direction and the vertical direction are both the effective angle directions, the horizontal direction is judged to be the effective angle direction without checking the weight of the horizontal direction; or
If the horizontal direction is the effective angle direction and one of the first weight checking and the second weight checking is effective, judging that the horizontal direction is the effective angle direction without performing the other one of the first weight checking and the second weight checking; or
And if the vertical direction is the effective angular direction and one of the first weight checking and the second weight checking is effective, judging that the horizontal direction is the effective angular direction without performing the other one of the first weight checking and the second weight checking.
19. The method of claim 1,
the duplication checking includes judging whether picture order indexes of reference frames of the selected at least one pair of the neighboring blocks are the same and whether motion vectors are the same.
20. The method of claim 1,
the calculating the prediction value of the current block by using the motion information of the available neighboring block and/or the unavailable neighboring block in each effective angular direction respectively comprises:
the current block is divided into a plurality of sub-blocks, motion compensation is carried out by respectively utilizing motion information of corresponding adjacent blocks of each sub-block in the effective angular direction to obtain a predicted value of each sub-block, the predicted values of all the sub-blocks form the predicted value of the current block, and the motion information of at least two corresponding adjacent blocks is used when the sub-block in at least one effective angular direction is subjected to motion compensation;
and respectively calculating the rate distortion cost in the effective angular direction by using the predicted value of the current block in each effective angular direction.
21. The method of claim 20,
the performing motion compensation by using motion information of corresponding neighboring blocks of each sub-block in the effective angular direction respectively includes:
the current block is divided into a plurality of first sub-blocks of a first size, each of the first sub-blocks is composed of a plurality of second sub-blocks of a second size, and a motion vector of at least one of the first sub-blocks is a weighted average of motion vectors of at least two of the corresponding neighboring blocks in at least one of the effective angular directions.
22. The method of claim 1,
after the motion information duplication checking is performed on the neighboring blocks in each angular direction, the method further includes:
and filling the effective angle direction into an angle mode list to obtain an angle mode index of the effective angle direction.
23. The method of claim 22,
the value range of the angle mode index is 0-4.
24. The method of claim 22, further comprising:
and encoding the current block to obtain a code stream of the current block, wherein the code stream of the current block comprises an angle mode mark, and the angle mode mark is used for indicating whether the current block adopts the angle mode inter-frame prediction.
25. The method of claim 1,
after the motion information duplication checking is performed on the neighboring blocks in each angular direction, the method further includes:
determining the sequence of the effective angle directions by using the texture direction of the current block;
and filling the effective angle directions into a mode list in sequence.
26. The method of claim 25,
the determining an order of the effective angular directions using the texture direction of the current block includes:
calculating a gradient direction of a reference pixel of the current block by using a gradient operator;
counting the number of the reference pixels of which the gradient directions fall within an angle range centered on each effective angle direction;
and sequencing the effective angle directions according to the sequence of the number of the reference pixels from large to small.
27. The method according to claim 1,
before the calculating the prediction value of the current block by using the motion information of the available neighboring block and/or the unavailable neighboring block in each effective angular direction, respectively, the method further comprises:
dividing the current block into a plurality of sub-blocks, and respectively utilizing motion information of corresponding adjacent blocks of each sub-block in the effective angle direction to obtain motion information of each sub-block, wherein the motion information comprises a motion vector;
respectively correcting a first predicted value of each sub-block by using a plurality of corrected motion vectors to obtain a plurality of second predicted values of each sub-block, wherein the first predicted values are obtained by performing motion compensation by using the motion information;
selecting a correction motion vector corresponding to the second predicted value with the minimum evaluation index for each sub-block as a final correction motion vector of the sub-block;
correcting by using the final correction motion vectors of all the sub-blocks to obtain corrected motion vectors;
and obtaining the predicted value of each sub-block by utilizing the motion information containing the modified motion vector, wherein the predicted values of all the sub-blocks form the predicted value of the current block.
28. The method of any one of claim 27,
the modifying the first predicted value of each sub-block by using the plurality of modified motion vectors respectively to obtain a plurality of second predicted values of each sub-block comprises:
correcting the motion vector of each sub-block by using the plurality of corrected motion vectors respectively to obtain a plurality of corrected motion vectors of each sub-block;
and respectively carrying out motion compensation on each sub-block by using a plurality of pieces of motion information containing the corrected motion vector to obtain a plurality of second predicted values of each sub-block.
29. The method of any one of claims 1-28,
the plurality of angular orientations include at least two of horizontal, vertical, horizontal up, horizontal down, and vertical right.
30. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction;
a modification module, configured to modify motion information of an unavailable neighboring block in the effective angular direction by using motion information of a reference block of the unavailable neighboring block in the effective angular direction;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available neighboring block and/or unavailable neighboring block in the effective angular direction, respectively.
31. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
if the time domain co-location block of the unavailable neighboring block is available, setting motion information for the unavailable neighboring block by using the motion information of the time domain co-location block, otherwise setting an initial value as the motion information of the unavailable neighboring block;
carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction;
modifying the motion information of the available neighboring block of which the motion information is the initial value by using the motion information of the reference block of the unavailable neighboring block of which the motion information is the initial value;
and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
32. The method of claim 31,
the setting motion information for the unavailable neighbor block using the motion information of the time domain co-located block includes:
taking the motion information of the time domain co-located block as the motion information of the unavailable adjacent block; or
Setting the forward motion information of the unavailable adjacent block as the forward motion information or the backward motion information of a forward collocated block, and setting the backward motion information of the unavailable adjacent block as the backward motion information or the forward motion information of a backward collocated block, wherein the frame of the forward collocated block is a reference frame in a forward reference frame list of the current block, and the frame of the backward collocated block is a reference frame in the backward reference frame list of the current block; or
And scaling the forward motion information or the backward motion information of the time domain co-location block according to the image sequence index difference to obtain the forward motion information and the backward motion information of the unavailable neighbor block.
33. The method of claim 31,
and the frame where the time domain collocated block is located is the first reference frame in the reference frame list of the current block.
34. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block by using motion information of the time domain co-located block when the time domain co-located block of the unavailable neighboring block is available, and set an initial value as the motion information of the unavailable neighboring block when the time domain co-located block of the unavailable neighboring block is unavailable;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction;
a modification module, configured to modify motion information of an available neighboring block whose motion information is the initial value, by using motion information of a reference block of an unavailable neighboring block whose motion information is the initial value;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available neighboring block and/or unavailable neighboring block in the effective angular direction, respectively.
35. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
selecting at least one pair of adjacent blocks in each angle direction according to the size of the current block to carry out motion information duplicate checking, wherein the angle direction passing the duplicate checking is an effective angle direction;
modifying the motion information of the available neighboring block by using the motion information of the reference block of the unavailable neighboring block;
and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
36. The method of claim 35,
the selecting at least one pair of the neighboring blocks for motion information duplication checking in each angular direction according to the size of the current block includes:
if the width/height of the current block is larger than a first threshold value, selecting a first number of the adjacent blocks for duplicate checking in the direction corresponding to the width/height, otherwise selecting a second number of the adjacent blocks for duplicate checking in the direction corresponding to the width/height, wherein the first number is larger than the second number, the second number is larger than 1, the direction corresponding to the width comprises vertical and/or vertical right, and the direction corresponding to the height comprises horizontal and/or horizontal downward.
37. The method of claim 36,
and the adjacent blocks selected in the same angle direction are arranged at equal intervals.
38. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for selecting at least one pair of adjacent blocks in each angle direction according to the size of the current block to check the duplication of the motion information, and the duplication checking angle direction is an effective angle direction;
a modification module, configured to modify motion information of the available neighboring block by using motion information of a reference block of the unavailable neighboring block;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available neighboring block and/or unavailable neighboring block in the effective angular direction, respectively.
39. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
performing motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction passing the duplicate checking is an effective angle direction, and if the angle direction meets a first condition, adding at least one duplicate checking;
modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
40. The method of claim 39,
if the angular direction meets a first condition, adding at least one duplicate checking step comprises:
if the horizontal direction and/or the vertical direction do not pass the weight checking, adding at least one weight checking.
41. The method of claim 40,
the adjacent blocks comprise N horizontal adjacent blocks which are positioned on the current block in the horizontal direction and N vertical adjacent blocks which are positioned on the current block in the vertical direction, the duplication checking increased in the horizontal direction is the duplication checking between the Kth and the Nth horizontal adjacent blocks which are ordered from top to bottom, the duplication checking increased in the vertical direction is the duplication checking between the Kth and the Nth vertical adjacent blocks which are ordered from left to right, and K is N/i, i is the number of the selected horizontal adjacent blocks or the selected vertical adjacent blocks in the completed duplication checking.
42. The method of claim 41,
if the angular direction meets a first condition, adding at least one duplicate checking step comprises:
if the angle direction is horizontal downward or vertical rightward, at least one duplication checking is added, the adjacent blocks comprise N horizontal adjacent blocks located in the horizontal direction of the current block and N vertical adjacent blocks located in the vertical direction of the current block, the duplication checking added in the horizontal downward direction is the duplication checking between the two horizontal adjacent blocks, and the duplication checking added in the vertical rightward direction is the duplication checking between the two vertical adjacent blocks.
43. The method of claim 42,
the duplication checking increasing in the horizontal downward direction is the duplication checking between the 3 rd and the Kth horizontal adjacent blocks which are sorted from top to bottom, the duplication checking increasing in the vertical rightward direction is the duplication checking between the 3 rd and the Kth vertical adjacent blocks which are sorted from left to right, and K is N/i, wherein i is the number of the horizontal/vertical adjacent blocks selected from the horizontal/vertical direction duplication checking.
44. The method of claim 39,
if the angular direction meets a first condition, adding at least one duplicate checking step comprises:
and if the duplicate checking result of the angle direction which does not pass the duplicate checking comprises that the reference frames of the pair of adjacent blocks do not exist, adding at least one duplicate checking for the angle direction which does not pass the duplicate checking.
45. The method of claim 44,
the adding at least one weight check for the angular direction which fails to pass the weight check comprises:
translating the serial numbers of at least one pair of the adjacent blocks without the reference frame, wherein each pair of the translated adjacent blocks still belongs to the angular direction which does not pass the duplicate checking, and the serial numbers of the adjacent blocks are different from the serial numbers of the adjacent blocks without the reference frame, and performing the motion information duplicate checking on the at least one pair of the translated adjacent blocks; and/or
And selecting a pair of adjacent blocks of the adjacent blocks, which do not exist in the reference frame, in a direction far away from the current block for motion information duplication checking.
46. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction, wherein if the angle direction meets a first condition, at least one duplication checking is added;
a modification module, configured to modify motion information of the unavailable neighboring block by using motion information of a reference block of the unavailable neighboring block;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available neighboring block and/or unavailable neighboring block in the effective angular direction, respectively.
47. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
performing motion information duplicate checking on the adjacent blocks in each angle direction, wherein the duplicate checking angle direction is an effective angle direction, and if at least two of the duplicate checking results in the horizontal direction, the vertical direction and the horizontal direction meet a second condition, at least one time of duplicate checking in the horizontal direction is reduced;
modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
48. The method of claim 47,
the horizontal upward duplicate checking comprises a first duplicate checking and a second duplicate checking, wherein the first duplicate checking is used for checking motion information between a horizontal upward adjacent block and a first horizontal adjacent block, the second duplicate checking is used for checking motion information between the horizontal upward adjacent block and a first vertical adjacent block, the horizontal upward adjacent block is positioned in the horizontal upward direction of the current block, the first horizontal adjacent block is positioned in the horizontal direction of the current block and is adjacent to the horizontal upward adjacent block, and the first vertical adjacent block is positioned in the vertical direction of the current block and is adjacent to the horizontal upward adjacent block;
if at least two of the horizontal, vertical and horizontal upward duplicate checking results satisfy a second condition, reducing at least one duplicate checking for the horizontal upward comprises:
if the horizontal direction and the vertical direction are both the effective angle directions, the horizontal direction is judged to be the effective angle direction without checking the weight of the horizontal direction; or
If the horizontal direction is the effective angle direction and one of the first weight checking and the second weight checking is effective, judging that the horizontal direction is the effective angle direction without performing the other one of the first weight checking and the second weight checking; or
And if the vertical direction is the effective angular direction and one of the first weight checking and the second weight checking is effective, judging that the horizontal direction is the effective angular direction without performing the other one of the first weight checking and the second weight checking.
49. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the duplication checking angle direction is an effective angle direction, wherein if at least two of duplication checking results in the horizontal direction, the vertical direction and the horizontal direction meet a second condition, at least one duplication checking in the horizontal direction is reduced;
a modification module, configured to modify motion information of the unavailable neighboring block by using motion information of a reference block of the unavailable neighboring block;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available neighboring block and/or unavailable neighboring block in the effective angular direction, respectively.
50. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
performing motion information duplicate checking on the adjacent blocks in each angle direction, wherein the duplicate checking comprises judging whether the image sequence indexes of the reference frames of at least one pair of selected adjacent blocks are the same and whether the motion is the same by taking the duplicate checking angle direction as an effective angle direction;
modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
51. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and judging whether the image sequence indexes of the selected reference frames of at least one pair of adjacent blocks are the same and whether the motion is the same according to the fact that the angle direction of duplication checking is an effective angle direction;
a modification module, configured to modify motion information of the unavailable neighboring block by using motion information of a reference block of the unavailable neighboring block;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available neighboring block and/or unavailable neighboring block in the effective angular direction, respectively.
52. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction;
modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
the current block is divided into a plurality of sub-blocks, motion compensation is performed by respectively using motion information of corresponding adjacent blocks of each sub-block in the effective angle direction to obtain a predicted value of each sub-block, the predicted values of all sub-blocks form the predicted value of the current block, and the motion information of at least two corresponding adjacent blocks is used when motion compensation is performed on the sub-block in at least one effective angle direction.
53. The method of claim 52,
the performing motion compensation by using motion information of corresponding neighboring blocks of each sub-block in the effective angular direction respectively includes:
the current block is divided into a plurality of first sub-blocks of a first size, each of the first sub-blocks is composed of a plurality of second sub-blocks of a second size, and a motion vector of at least one of the first sub-blocks is a weighted average of motion vectors of at least two of the corresponding neighboring blocks in at least one of the effective angular directions.
54. The method of claim 53,
the first dimension is 8 x 8 and the second dimension is 4 x 4.
55. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction;
a modification module, configured to modify motion information of the unavailable neighboring block by using motion information of a reference block of the unavailable neighboring block;
a calculating module, configured to perform motion compensation by using motion information of corresponding neighboring blocks of each sub-block in the effective angular direction respectively when the current block is divided into multiple sub-blocks, to obtain a prediction value of each sub-block, where the prediction values of all sub-blocks form the prediction value of the current block, and at least one of the sub-blocks in the effective angular direction uses the motion information of at least two corresponding neighboring blocks when performing motion compensation.
56. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction;
filling the effective angle direction into an angle mode list to obtain an angle mode index of the effective angle direction;
modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
calculating a prediction value of the current block using motion information of available and/or unavailable neighboring blocks in each of the effective angular directions, respectively.
57. The method of claim 56,
the value range of the angle mode index is 0-4.
58. The method of claim 56, further comprising:
and encoding the current block to obtain a code stream of the current block, wherein the code stream of the current block comprises an angle mode mark, and the angle mode mark is used for indicating whether the current block adopts the angle mode inter-frame prediction.
59. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction;
the filling module is used for filling the effective angle direction into an angle mode list to obtain an angle mode index of the effective angle direction;
a modification module, configured to modify motion information of the unavailable neighboring block by using motion information of a reference block of the unavailable neighboring block;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available and/or unavailable neighboring block in the effective angular direction, respectively.
60. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction;
determining the sequence of the effective angle directions by using the texture direction of the current block;
filling the effective angle directions into a mode list in sequence;
modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
and respectively utilizing the motion information of the available adjacent blocks and/or the unavailable adjacent blocks in each effective angular direction to calculate the predicted value of the current block.
61. The method of claim 60,
the determining an order of the effective angular directions using the texture direction of the current block includes:
calculating a gradient direction of a reference pixel of the current block by using a gradient operator;
counting the number of the reference pixels of which the gradient directions fall within an angle range centered on each effective angle direction;
and sequencing the effective angle directions according to the sequence of the number of the reference pixels from large to small.
62. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction;
a determining module, configured to determine an order of the effective angular directions by using a texture direction of the current block;
the filling module is used for filling the effective angle directions into a mode list in sequence;
a modification module, configured to modify motion information of the unavailable neighboring block by using motion information of a reference block of the unavailable neighboring block;
a calculating module, configured to calculate a prediction value of the current block by using motion information of each available neighboring block and/or unavailable neighboring block in the effective angular direction, respectively.
63. An angular mode inter prediction method, comprising:
constructing a candidate adjacent block list for a current block, wherein the candidate adjacent block list comprises adjacent blocks of the current block in a plurality of angle directions, the adjacent blocks which are coded and adopt inter prediction are available adjacent blocks, and the rest adjacent blocks are unavailable adjacent blocks;
setting motion information for the unavailable neighbor block;
carrying out motion information duplicate checking on the adjacent blocks in each angle direction, wherein the angle direction of the duplicate checking is an effective angle direction;
modifying the motion information of the unavailable neighboring block by using the motion information of the reference block of the unavailable neighboring block;
dividing the current block into a plurality of sub-blocks, and respectively utilizing motion information of corresponding adjacent blocks of each sub-block in the effective angle direction to obtain motion information of each sub-block, wherein the motion information comprises a motion vector;
respectively correcting a first predicted value of each sub-block by using a plurality of corrected motion vectors to obtain a plurality of second predicted values of each sub-block, wherein the first predicted values are obtained by performing motion compensation by using the motion information;
selecting a correction motion vector corresponding to the second predicted value with the minimum evaluation index for each sub-block as a final correction motion vector of the sub-block;
correcting by using the final correction motion vectors of all the sub-blocks to obtain corrected motion vectors;
and obtaining the predicted value of each sub-block by utilizing the motion information containing the modified motion vector, wherein the predicted values of all the sub-blocks form the predicted value of the current block.
64. The method of claim 63, wherein the modifying the first predictor of each of the sub-blocks using the plurality of modified motion vectors to obtain a plurality of second predictors for each of the sub-blocks comprises:
correcting the motion vector of each sub-block by using the plurality of corrected motion vectors respectively to obtain a plurality of corrected motion vectors of each sub-block;
and respectively carrying out motion compensation on each sub-block by using a plurality of pieces of motion information containing the corrected motion vector to obtain a plurality of second predicted values of each sub-block.
65. An angular mode inter prediction apparatus, comprising:
a constructing module, configured to construct a candidate neighbor block list for a current block, where the candidate neighbor block list includes neighbor blocks of the current block in multiple angular directions, where the encoded neighbor blocks that use inter prediction are available neighbor blocks, and the remaining neighbor blocks are unavailable neighbor blocks;
a setting module, configured to set motion information for the unavailable neighboring block;
the duplication checking module is used for carrying out motion information duplication checking on the adjacent blocks in each angle direction, and the angle direction of the duplication checking is an effective angle direction;
a modification module, configured to modify motion information of the unavailable neighboring block by using motion information of a reference block of the unavailable neighboring block;
a first calculating module, configured to, when the current block is divided into a plurality of sub-blocks, obtain motion information of each sub-block by using motion information of a corresponding neighboring block of each sub-block in the effective angular direction, where the motion information includes a motion vector;
a first correction module, configured to correct the first prediction value of each sub-block by using the plurality of corrected motion vectors, respectively, to obtain a plurality of second prediction values of each sub-block, where the first prediction value is obtained by performing motion compensation using the motion information;
a selection module, configured to select, for each sub-block, a modified motion vector corresponding to the second prediction value with the smallest evaluation index as a final modified motion vector of the sub-block;
the second correction module is used for correcting by using the final correction motion vectors of all the sub-blocks to obtain corrected motion vectors;
and the second calculation module is used for obtaining the predicted value of each sub-block by utilizing the motion information containing the corrected motion vector, and the predicted values of all the sub-blocks form the predicted value of the current block.
66. An encoder, comprising a processor, a memory coupled to the processor, wherein,
the memory stores program instructions;
the processor is configured to execute the memory-stored program instructions to implement the method of any of claims 1-65.
67. A storage medium storing program instructions which, when executed, implement the method of any one of claims 1-65.
68. An electronic device comprising the encoder of claim 66.
CN202010701045.7A 2020-07-20 2020-07-20 Angle mode inter-frame prediction method, encoder and storage medium Pending CN112004096A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN112004096A true CN112004096A (en) 2020-11-27

Family

ID=73467018

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112004096A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024378A (en) * 2012-12-06 2013-04-03 浙江大学 Motion information exporting method and device in video coding and decoding
CN103782599A (en) * 2011-10-17 2014-05-07 株式会社东芝 Encoding method and decoding method
US20170223350A1 (en) * 2016-01-29 2017-08-03 Google Inc. Dynamic reference motion vector coding mode
JP2018182435A (en) * 2017-04-06 2018-11-15 日本電信電話株式会社 Motion vector prediction device and computer program
CN109819255A (en) * 2018-12-28 2019-05-28 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment
CN110024402A (en) * 2016-11-29 2019-07-16 韩国电子通信研究院 Image coding/decoding method and device and the recording medium for being stored with bit stream
US20200145659A1 (en) * 2017-07-04 2020-05-07 Huawei Technologies Co., Ltd. Decoder side intra mode derivation tool line memory harmonization with deblocking filter
CN111263144A (en) * 2018-11-30 2020-06-09 杭州海康威视数字技术股份有限公司 Motion information determination method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103782599A (en) * 2011-10-17 2014-05-07 株式会社东芝 Encoding method and decoding method
CN103024378A (en) * 2012-12-06 2013-04-03 浙江大学 Motion information exporting method and device in video coding and decoding
US20170223350A1 (en) * 2016-01-29 2017-08-03 Google Inc. Dynamic reference motion vector coding mode
CN110024402A (en) * 2016-11-29 2019-07-16 韩国电子通信研究院 Image coding/decoding method and device and the recording medium for being stored with bit stream
JP2018182435A (en) * 2017-04-06 2018-11-15 日本電信電話株式会社 Motion vector prediction device and computer program
US20200145659A1 (en) * 2017-07-04 2020-05-07 Huawei Technologies Co., Ltd. Decoder side intra mode derivation tool line memory harmonization with deblocking filter
CN111263144A (en) * 2018-11-30 2020-06-09 杭州海康威视数字技术股份有限公司 Motion information determination method and device
CN109819255A (en) * 2018-12-28 2019-05-28 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SUHONG WANG, ET AL: "Enhanced Motion Vector Prediction for Video Coding", 《2018 IEEE FOURTH INTERNATIONAL CONFERENCE ON MULTIMEDIA BIG DATA (BIGMM)》 *
李子星: "HEVC帧间模式的快速编码算法", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Similar Documents

Publication Publication Date Title
US11019355B2 (en) Inter-prediction method and apparatus using reference frame generated based on deep learning
CN110419217B (en) Method for image processing and image processing apparatus
CN110545424B (en) Inter-frame prediction method based on MMVD (multimedia MediaVision video) mode, video coding method, related device and equipment
CN103891290B (en) Motion vector processing
CN110213590B (en) Method and equipment for acquiring time domain motion vector, inter-frame prediction and video coding
US9106924B2 (en) Method and apparatus for encoding and decoding motion vector by predicting motion vector according to mode
TW202005389A (en) Weighted interweaved prediction
CN110636311B (en) Motion vector acquisition method and related prediction method and device
CN110312130B (en) Inter-frame prediction and video coding method and device based on triangular mode
CN110213588B (en) Spatial domain candidate motion information acquisition method and device, coder-decoder and storage device
CN112866720B (en) Motion vector prediction method and device and coder-decoder
CN111818342B (en) Inter-frame prediction method and prediction device
CN113965753B (en) Inter-frame image motion estimation method and system based on code rate control
CN109905702A (en) The method, apparatus and storage medium that reference information determines in a kind of Video coding
CN102572424A (en) Image processing apparatus, method and program
Fu et al. Efficient depth intra frame coding in 3D-HEVC by corner points
CN112004096A (en) Angle mode inter-frame prediction method, encoder and storage medium
CN112565769B (en) Block division method, inter-frame prediction method, video coding method and related device
CN113678455B (en) Video or image coding for deriving weight index information for bi-prediction
CN111586415B (en) Video coding method, video coding device, video coder and storage device
CN112055221B (en) Inter-frame prediction method, video coding method, electronic device and storage medium
CN112055202B (en) Inter-frame prediction method, video coding method, electronic device and storage medium
WO2022257674A1 (en) Encoding method and apparatus using inter-frame prediction, device, and readable storage medium
CN112040242A (en) Inter-frame prediction method, device and equipment based on advanced motion vector expression
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