CN115567714A - Block division method, inter-frame prediction method, video coding method and related device - Google Patents

Block division method, inter-frame prediction method, video coding method and related device Download PDF

Info

Publication number
CN115567714A
CN115567714A CN202211086018.9A CN202211086018A CN115567714A CN 115567714 A CN115567714 A CN 115567714A CN 202211086018 A CN202211086018 A CN 202211086018A CN 115567714 A CN115567714 A CN 115567714A
Authority
CN
China
Prior art keywords
motion information
block
division
mode
current block
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
CN202211086018.9A
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 CN202211086018.9A priority Critical patent/CN115567714A/en
Publication of CN115567714A publication Critical patent/CN115567714A/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/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/186Methods 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 a colour or a chrominance component
    • 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
    • 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

Landscapes

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

Abstract

The application provides a block division method, an inter-frame prediction method, a video coding method and a related device. The block division method comprises the following steps: determining a partition line corresponding to the current partition mode of the current block according to preset partition interval data; and dividing the current block along the dividing line to obtain a first rectangular sub-block and a second rectangular sub-block. The method and the device can improve the accuracy of prediction.

Description

Block division method, inter-frame prediction method, video coding method and related device
Technical Field
The present application relates to the field of inter-frame prediction technologies, and in particular, to a block partitioning method, an inter-frame prediction method, a video encoding method, and a related apparatus.
Background
Because the video image data volume is large, it is usually necessary to encode and compress the video image data, the compressed data is called video code stream, and the video code stream is transmitted to the user end through a wired or wireless network and then decoded and viewed.
The whole video coding flow comprises the processes of prediction, transformation, quantization, entropy coding and the like. The prediction is divided into an intra-frame prediction part and an inter-frame prediction part. In a long-term research and development process, the inventor of the application finds that the current prediction method has certain limitation and influences the prediction accuracy to a certain extent.
Disclosure of Invention
The application provides a block division method, an inter-frame prediction method, a video coding method and a related device, which are used for solving the problem of low prediction accuracy.
To solve the above object, the present application provides a block division method, including:
determining a partition line corresponding to the current partition mode of the current block according to preset partition interval data;
and dividing the current block along the dividing line to obtain a first rectangular sub-block and a second rectangular sub-block.
When the division mode is a horizontal division mode, the preset division interval data is horizontal interval data, and the horizontal interval data comprises a line spacing between a division line of a first horizontal division mode and the upper edge of the current block and a line spacing between division lines of two adjacent horizontal division modes;
when the division mode is a vertical division mode, the preset division interval data is vertical interval data including a column interval between a division line of a first vertical division mode and a left edge of the current block, and a column interval between division lines of two adjacent vertical division modes.
Wherein the preset division interval data is equal to a preset value,
determining a partition line corresponding to a current partition mode of a current block according to preset partition interval data, including:
when the current division mode is a first horizontal division mode, the line spacing between the division line of the current division mode and the upper edge of the current block is a preset value; and/or the presence of a gas in the atmosphere,
when the current division mode is the horizontal division mode but not the first horizontal division mode, the line spacing between the division line of the current division mode and the division line of the last horizontal division mode of the current division mode is a preset value; and/or the presence of a gas in the atmosphere,
when the current division mode is a first vertical division mode, the column spacing between the division line of the current division mode and the left edge of the current block is a preset value; and/or the presence of a gas in the atmosphere,
when the current division mode is the vertical division mode but not the first vertical division mode, the column spacing between the division line of the current division mode and the division line of the last vertical division mode of the current division mode is a preset value.
To solve the above problem, the present application provides an inter-frame prediction method, including:
constructing a motion information candidate list of the current block;
sequentially traversing all the division modes, and determining the cost values of all the motion information combinations of at least part of the division modes, wherein the motion information combinations comprise the motion information of two rectangular sub-blocks obtained by dividing the current block according to each available division mode by using the block division method, and the motion information of all the rectangular sub-blocks is from the motion information candidate list of the current block;
and determining the optimal division mode and the optimal motion information combination based on the cost value.
Wherein, sequentially traversing all the division modes, and determining the cost values of all the motion information combinations of at least part of the division modes, comprises:
determining motion information of the first rectangular sub-block and the second rectangular sub-block based on the motion information candidate list;
and performing motion compensation on the first rectangular sub-block based on the motion information of the first rectangular sub-block, and performing motion compensation on the second rectangular sub-block based on the motion information of the second rectangular sub-block to obtain a predicted value of the current block.
Wherein the current block is a luminance block, the method further comprising:
and when the width and/or height of the first rectangular sub-block or the second rectangular sub-block is less than 8, performing motion compensation on the chroma block corresponding to the current block according to the whole block to obtain a predicted value of the chroma block.
Wherein, sequentially traversing all the division modes, and determining the cost values of all the motion information combinations of at least part of the division modes, comprises:
when the width and the height of the first rectangular sub-block and the second rectangular sub-block are both even numbers and are more than or equal to 4, the division mode is an available division mode, and the cost value of all motion information combinations in the available division mode is calculated; otherwise, the division mode is an unavailable division mode;
determining the optimal division mode and the optimal motion information combination based on the cost value, comprising the following steps: and comparing the magnitude of the cost values of all the motion information combinations under all the available division modes, and taking the available division mode and the motion information combination corresponding to the minimum cost value as the optimal division mode and the optimal motion information combination of the current block.
Wherein, the method further comprises:
in response to the partitioning mode being an unavailable partitioning mode, increasing an index value of the partitioning mode to decrease an index value of at least one available partitioning mode.
Determining the optimal division mode and the optimal motion information combination based on the cost value, and then:
storing motion information of each unit block of the current block;
if the unit block is located in one of the sub-blocks, the motion information of the unit block is the motion information of the sub-block in which the unit block is located;
if at least two parts of the unit block are located in at least two sub-blocks, respectively, the motion information of the unit block is the motion information of one of the sub-blocks.
Determining an optimal partitioning mode and an optimal motion information combination based on the cost value, and then:
storing motion information of each unit block of the current block;
wherein, the motion information of each unit block is the motion information of the subblock with the largest area in all subblocks.
Wherein, the motion information of all sub-blocks in the same available partition mode is different from each other.
Wherein the width and/or height of the current block is greater than or equal to 8 and less than or equal to 128.
Wherein, constructing a motion information candidate list of the current block comprises:
adding the time domain motion information and the spatial domain motion information of the current block to a motion information candidate list according to the sequence until the motion information candidate list is filled;
if the motion information candidate list is not filled, adding preset motion information into the motion information candidate list; and/or adding the zooming motion information obtained by zooming the motion information in the motion information candidate list to the motion information candidate list; and/or adding an average value of at least two pieces of motion information in the motion information candidate list to the motion information candidate list.
Wherein, adding the zoom motion information obtained by zooming the motion information in the motion information candidate list to the motion information candidate list comprises:
substituting the absolute value of the zoomed motion information in the x-axis direction into an amplification formula or a reduction formula corresponding to the range of the absolute value of the x-axis direction to obtain the value of the zoomed motion information in the x-axis direction;
and substituting the absolute value of the zoomed motion information in the y-axis direction into an amplification formula or a reduction formula corresponding to the range of the absolute value of the y-axis direction to obtain the value of the zoomed motion information in the y-axis direction.
Wherein, the amplification formula is:
Figure BDA0003835104000000041
the reduction formula is:
Figure BDA0003835104000000042
wherein temp is the absolute value of the scaled motion information in the x-axis direction or the absolute value of the scaled motion information in the y-axis direction, and result is the value of the scaled motion information in the x-axis direction or the y-axis direction; a is a positive or negative attribute of the value of the scaled motion information in the x-axis direction or the value in the y-axis direction.
To solve the above problem, the present application provides a video encoding method, including:
determining the optimal division mode and the optimal motion information combination of the current block based on the method;
and encoding the index value of the optimal division mode and the index value of the motion information of each sub-block in the optimal motion information combination.
In order to solve the above problems, the present application provides a coding and decoding system, which includes a processor; the processor is used for executing instructions to realize the steps of the method.
To solve the above problems, the present application provides a computer storage medium having stored thereon instructions/program data which, when executed, implement the steps of the above-described method.
The method comprises the following steps: determining a partition line corresponding to the current partition mode of the current block according to preset partition interval data; the current block is divided along the dividing line to obtain a first rectangular sub-block and a second rectangular sub-block, the current block is divided by using the dividing line determined according to the preset dividing interval data, the dividing mode can be enriched so as to adapt to more image textures, the inaccuracy of the predicted value of the coding block with incompletely equally divided textures caused by using a unified dividing method for all the coding blocks can be avoided, the textures can be well predicted, and the prediction accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for inter-frame prediction according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an embodiment of obtaining temporal motion information in the inter-frame prediction method according to the present application;
FIG. 3 is a diagram illustrating another embodiment of obtaining temporal motion information in the inter-frame prediction method according to the present application;
FIG. 4 is a schematic diagram of obtaining spatial motion information in the inter-frame prediction method of the present application;
FIG. 5 is a diagram illustrating an embodiment of a horizontal partition mode determining method in an inter-frame prediction method according to the present application;
FIG. 6 is a diagram illustrating an embodiment of a method for determining a vertical partition mode in an inter-frame prediction method according to the present application;
FIG. 7 is a diagram illustrating another embodiment of a horizontal division mode determination method in an inter-frame prediction method according to the present application;
FIG. 8 is a diagram illustrating another embodiment of a method for determining a vertical partition mode in an inter-frame prediction method according to the present application;
FIG. 9 is a diagram illustrating a unit block storing motion information in the inter prediction method of the present application;
FIG. 10 is a schematic structural diagram of a codec system of the present application;
FIG. 11 is a schematic structural diagram of an embodiment of a computer storage medium according to the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present application, the inter-frame prediction method, the video coding method and the related apparatus provided in the present application are described in further detail below with reference to the accompanying drawings and the detailed description.
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 as implying a number of indicated technical features. 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 present 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. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments without conflict.
The inter-frame prediction method can construct a motion information candidate list of the current block, and then sequentially traverse all the division modes to determine the cost values of all motion information combinations of at least part of the division modes based on the motion information candidate list of the current block; and then, the optimal division mode and the optimal motion information combination of the current block are determined based on the cost value, so that the optimal division mode and the optimal motion information combination of each block are determined, the inaccuracy of the predicted value of the coding block with incompletely equally divided textures caused by a unified division method used by all the coding blocks is avoided, the textures can be predicted better, and the prediction accuracy is improved.
As shown in fig. 1, fig. 1 is a flowchart illustrating an embodiment of an inter prediction method according to the present application.
S11: a motion information candidate list of the current block is constructed.
A motion information candidate list of the current block may be first constructed so as to determine a cost value of all motion information combinations of at least a part of the division modes based on the motion information candidate list of the current block, and then an optimal division mode and an optimal motion information combination of the current block may be determined.
The motion information may be composed of three elements, i.e., a motion vector, a reference frame index, and a motion direction.
The motion information candidate list may include at least one of temporal motion information, spatial motion information, angular motion information, history-based motion information, and motion information expressed by advanced motion information.
For example, in step S11, temporal motion information and spatial motion information of the current block may be added to the motion information candidate list in a designated order to construct the motion information candidate list of the current block. The designated sequence may be temporal motion information-spatial motion information and spatial motion information-temporal motion information.
The following details how temporal motion information and spatial motion information are added to the motion information candidate list.
(1) Temporal motion information
The method for acquiring the time domain motion information mainly comprises the following steps: firstly, determining a time domain reference frame of a current block; then finding a co-located block of the current block on the time domain reference frame based on the position of the current block; and then, the motion information of the same-position block is scaled according to the distance relation to obtain the time domain motion information of the current block. After the time domain motion information of the current block is acquired by the acquiring method, the acquired time domain motion information can be added to a motion information candidate list.
Specifically, a first predetermined number of temporal motion information may be added to the motion information candidate list by the above method. The first predetermined number may be greater than or equal to 1, such as 1, 2, 3, or 5, etc. It is understood that the first predetermined number of temporal motion information in the motion information candidate list may not be repeated, that is, the reference frame index or the motion information of any two temporal motion information in the first predetermined number of temporal motion information are not the same.
In an application scenario, as shown in fig. 2, if an image frame to which a current block belongs is a unidirectional predictive coding frame, for example, a P frame, the current block has only one reference frame list, i.e., a forward reference frame list (list 0). A reference frame in the forward reference frame list of the current block may be taken as the temporal reference frame of the current block. Preferably, the reference frame with the smallest index in the forward reference frame list of the current block may be used as the temporal reference frame of the current block.
After determining the temporal reference frame of the current block, a co-located block T on the temporal reference frame may be determined by calculation based on the pixel position of the upper left corner of the current block. And then, the motion information of the co-located block is scaled according to the distance relation to obtain the time domain motion information of the current block.
During scaling, assuming that the difference between the image sequence numbers of the image frame to which the current block belongs and the image frame to which the co-located block belongs is t1, the difference between the image sequence numbers of the image frame to which the co-located block belongs and the reference frame of the co-located block is t2, and the motion information of the co-located block is marked as mv _ col _ f, the scaled motion information is scalemv = mv _ col _ f _ t1/t2, that is, the temporal motion information of the current block is mv _ col _ f _ t1/t2.
In another application scenario, as shown in fig. 3, if the image frame to which the current block belongs is a bidirectional predictive coding frame, for example, a B frame, the current block has two reference frame lists, namely a forward reference frame list (list 0) and a backward reference frame list (list 1).
A reference frame in the forward reference frame list of the current block may be used as the forward reference frame of the current block. Preferably, the reference frame with the smallest index in the forward reference frame list of the current block may be used as the forward reference frame of the current block. After confirming the forward reference frame of the current block, a co-located block T1 on the forward reference frame may be determined by calculation based on the pixel position of the upper left corner of the current block. And then scaling the motion information of the co-located block T1 according to a scalemv = mv _ col _ f T1/T2 calculation formula to obtain the forward motion information of the current block. Where t1 is the distance between the current frame and its forward reference frame (e.g., the first frame in list 0).
A reference frame in the backward reference frame list of the current block may be used as the backward reference frame of the current block. Preferably, the reference frame with the smallest index in the backward reference frame list of the current block may be used as the backward reference frame of the current block. After confirming the backward reference frame of the current block, the co-located block T2 on the backward reference frame may be determined by calculation based on the pixel position of the upper left corner of the current block. And then scaling the motion information of the co-located block T2 according to a scalemv = mv _ col _ f × T1/T2 calculation formula to obtain the backward motion information of the current block. Where t1 is the distance between the current frame and its backward reference frame (e.g., the first frame in list 1).
(2) Airspace motion information (SMVP)
When spatial motion information is added, as shown in fig. 4, neighboring blocks of the current block shown in fig. 3 may be scanned in the order of F, G, C, a, B, and D, and motion information of the available and satisfactory neighboring blocks may be added to the motion information candidate list. The conditions where the neighboring blocks are "available" include: is not intra coded and the block is already coded.
Specifically, the "availability" of F, G, C, A, B and D may be determined as shown in the following steps:
i) F is "available" if F exists and inter prediction mode is employed; otherwise, F is "unavailable.
j) G is "available" if it exists and inter prediction mode is employed; otherwise, G is "unavailable".
k) C is "available" if C exists and inter prediction mode is employed; otherwise, C is "unavailable".
l) if A is present and inter prediction mode is employed, then A is "available"; otherwise, a is "unavailable".
m) if B is present and inter prediction mode is employed, then B is "available"; otherwise, B is "unavailable.
n) if D is present and inter prediction mode is employed, D is "available"; otherwise, D is "not available".
The number of spatial motion information in the motion information candidate list is not limited, and may be 0, 1, 2, or 3, or may be greater than or equal to 4.
If the current frame is a bidirectional predictive coding frame, spatial motion information is obtained according to the sequence of F, G, C, A, B and D, if both list0 and list1 exist, both MV0 and MV1 are filled in the list, otherwise, only MV0 or MV1 is filled. If the current frame is a unidirectional predictive coding frame, the MV0 of the forward reference frame list0 is taken and filled in the motion information candidate list until the motion information candidate list is filled.
Alternatively, the length of the motion information candidate list may assume 5, but is not limited thereto, and may also be 10, for example. In addition, the maximum candidate number of the motion information candidate list of the current block may be reduced to reduce the amount of calculation and bit overhead in the prediction process, for example, the maximum candidate data of the motion information candidate list of the current block may be up to 4, and even the maximum candidate number of the motion information candidate list of the current block may be 3 or 2.
Considering that, in the process of constructing the motion information candidate list of the current block, if the temporal motion information and the spatial motion information of the current block are added to the motion information candidate list, there may be a case where the number of motion information in the motion information candidate list is less than the maximum candidate number, i.e., a phenomenon of not being filled, preset motion information [ e.g., zero motion information or (1,1), etc. ] may be added to the motion information candidate list; and/or adding the zooming motion information obtained by zooming the motion information in the motion information candidate list to the motion information candidate list; and/or adding the average value of at least two pieces of motion information in the motion information candidate list to the motion information candidate list so as to improve the richness of the motion information and improve the accuracy of prediction.
The reference frame index of the default motion information may be a frame order number (POC) closest to a current block, or a frame order number of any neighboring block.
Further, the step of adding scaled motion information obtained by scaling the motion information in the motion information candidate list to the motion information candidate list may be adding motion information obtained by scaling spatial motion information or temporal motion information corresponding to a reference frame index closest to the frame number of the current block to the motion information candidate list.
Specifically, the motion information added to the motion information candidate list may be scaled through an amplification method and a reduction formula to obtain scaled motion information, and an absolute value of the scaled motion information in the x-axis direction is substituted into an amplification formula or a reduction formula corresponding to a range in which the absolute value of the x-axis direction is located to obtain a value of the scaled motion information in the x-axis direction; and substituting the absolute value of the scaled motion information in the y-axis direction into an amplification formula or a reduction formula corresponding to the range of the absolute value of the y-axis direction to obtain the value of the scaled motion information in the y-axis direction.
Here, the enlargement formula and the reduction formula may be as follows, and of course, the enlargement formula and the reduction formula are not limited thereto.
Recording the absolute value of the zoomed motion information in the x-axis direction or the absolute value of the zoomed motion information in the y-axis direction as temp, and recording the value of the zoomed motion information in the x-axis direction or the zoomed motion information in the y-axis direction as result;
the amplification formula is:
Figure BDA0003835104000000101
the reduction formula is:
Figure BDA0003835104000000102
wherein, a is a positive-negative property of the value of the scaled motion information in the x-axis direction or the value of the scaled motion information in the y-axis direction, that is, if the value of the scaled motion information in the x-axis direction is negative, a is "-", and if the value of the scaled motion information in the x-axis direction is an integer, a is "+".
Wherein, the width and/or height of the current block of the present application may be greater than or equal to N and less than or equal to M. N and M are preset values, which are not limited herein, and N is smaller than M. For example, N may be 8 or 16, etc., and M may be 128 or 64, etc.
S12: and sequentially traversing all the division modes, and determining the cost value of all the motion information combinations of at least part of the division modes.
After the motion information candidate list of the current block is established, all the division modes can be traversed in sequence, and the cost values of all the motion information combinations of at least part of the division modes are determined so as to determine the optimal division mode and the optimal motion information combination of the current block.
It is understood that, in step S12, the current block may be divided into at least two sub-blocks according to each division mode, and then the cost value of all motion information combinations of each division mode may be determined from the motion information candidate list of the current block.
The motion information combination comprises the motion information of at least two sub-blocks obtained by dividing the current block according to each available division mode, and the motion information of all the sub-blocks is from the motion information candidate list of the current block. For example, assuming that the current block is divided into the first sub-block S1 and the second sub-block S2 according to a division mode, the motion information candidate list includes 3 pieces of motion information of MV0, MV1, and MV2, and the motion information of the first sub-block and the second sub-block are not identical, all the motion information combinations of the at least two sub-blocks may include 6 cases of (S1-MV 0, S2-MV 1), (S1-MV 0, S2-MV 2), (S1-MV 1, S2-MV 0), (S1-MV 1, S2-MV 2), (S1-MV 2, S2-MV 0), (S1-MV 2, S2-MV 1). That is, the current block is divided into a sub-blocks according to a division pattern, the motion information candidate list includes b pieces of motion information, where b > a, and the motion information of all sub-blocks are different from each other, and the division pattern has b (b-1) … (b-a + 1) and (b-a) motion information combinations. It will be appreciated that a current block is divided into a sub-blocks according to a division mode, a motion information candidate list includes b motion information, and the motion information of all sub-blocks may be the same, such a division mode has b a And combining the motion information.
Optionally, the step of determining a cost value of a motion information combination may include: performing motion compensation on each subblock according to the motion information of each subblock in the motion information combination to obtain a predicted value of each subblock; after motion compensation is carried out on all the sub-blocks, the predicted values of all the sub-blocks can be obtained, and the predicted value of the current block is obtained; the cost value of the motion information combination can be calculated based on the prediction value of the current block.
Optionally, step S12 includes: the current block is divided into at least two sub-blocks according to each division mode.
Preferably, the current block can be divided into a first rectangular sub-block and a second rectangular sub-block according to each division mode, so that the current block is regularly divided, and the prediction value of each rectangular sub-block can be obtained only by performing motion compensation once for each rectangular sub-block, so that the problem that compensation is performed at least twice and weighting processing is performed to obtain the prediction value of each sub-block when irregular division is performed can be avoided.
Wherein the current block may be divided into a first rectangular sub-block and a second rectangular sub-block in the following manner.
In an implementation, the partition modes include a horizontal partition mode and a vertical partition mode. Dividing the current block into a first rectangular sub-block and a second rectangular sub-block according to each division mode, including:
when the division mode is a horizontal division mode, calculating a first weight matrix of the current block by using a reference weight configuration value corresponding to the division mode based on the height of the current block, wherein all weight values of each row in the first weight matrix are the same; and taking a part of the current block corresponding to an area with the weight value smaller than a first threshold value in the first weight matrix as a first rectangular sub-block, and taking a part of the current block corresponding to an area with the weight value larger than or equal to the first threshold value in the first weight matrix as a second rectangular sub-block.
When the partition mode is a vertical partition mode, calculating a second weight matrix of the current block by using a reference weight configuration value corresponding to the partition mode based on the width of the current block, wherein all weight values of each column in the second weight matrix are the same; and taking a part of the current block corresponding to an area with the weight value smaller than a second threshold value in the second weight matrix as a first rectangular sub-block, and taking a part of the current block corresponding to an area with the weight value larger than or equal to the second threshold value in the second weight matrix as a second rectangular sub-block. Wherein the second threshold may be equal to the first threshold.
Illustratively, note that the block size of the current block is MxN, where M is wide and N is high. The calculation formula of the first weight matrix may be as follows:
(a) Calculating the effective length ValidLen of the reference weight
ValidLen=N<<1
(b) Setting a reference weight value ReferenceWeights [ x ], wherein the value range of x is 0-ValidLen-1
FirstPos=(ValidLen>>1)-4+Y*(ValidLen>>3)
ReferenceWeights[x]=Clip3(0,8,x-FirstPos)
Here Y represents different reference weight configuration values, with a range of [ -3,3].
(c) Deriving the weights SampleWeight [ x ] [ y ] pixel by pixel to obtain a first weight matrix
SampleWeight[x][y]=ReferenceWeights[(y<<1)]
Where x, y represent the coordinates of the pixel location within the current block.
The calculation formula of the second weight matrix may be as follows:
(a) Calculating the effective length ValidLen of the reference weight
ValidLen=M<<1
(b) Setting a reference weight value ReferenceWeights [ x ], wherein the value range of x is 0-ValidLen-1
FirstPos=(ValidLen>>1)-4+Y*(ValidLen>>3)
ReferenceWeights[x]=Clip3(0,8,x-FirstPos)
Here, Y represents different reference weight configuration values, and the value range is [ -3,3].
(c) Deriving the weights SampleWeight [ x ] [ y ] pixel by pixel to obtain a second weight matrix
SampleWeight[x][y]=ReferenceWeights[(x<<1)]
Where x, y represent the coordinates of the pixel location within the current block.
Of course, the first weight matrix and the second weight matrix may be calculated by other calculation formulas. Specifically, the calculation formula can be changed by modifying the formula FirstPos = (ValidLen > > 1) -6+Y ((ValidLen-1) > > 3).
For example, the derivation of Firstpos in horizontal or vertical direction at some larger size (e.g., 32, 64, 128, etc. width or height of the current block) can be modified to change the starting position of block division, enrich the way of division, and adapt to more image textures. For example, a new Firstpos derivation formula can be as follows:
FirstPos=(ValidLen>>1)-6+Y*((ValidLen-1)>>3)。
for example, the division mode in the horizontal or vertical case may be expanded, and the range of the parameter Y and the latter half of the above formula are changed to increase the kinds of division modes:
FirstPos=(ValidLen>>1)-6+Y*((ValidLen-1)>>4)。
when the range of Y is [ -7,7], it can be ensured that the division manner in the horizontal or vertical direction is changed to 14.
For another example, the step interval during division may be changed to change the way the blocks are divided:
FirstPos=(ValidLen>>1)-6+Y*((ValidLen-1)/10)。
the modification modes can be freely combined to achieve the aim of changing the division mode of the current block so as to adapt to more image textures.
In another implementation manner, the current block may be divided along a dividing line corresponding to a preset mode to obtain a first rectangular sub-block and a second rectangular sub-block, wherein all the dividing lines of the current block are determined according to preset dividing interval data. The division mode may include a horizontal division mode and a vertical division mode.
Illustratively, the preset division interval data (equivalent to the above-mentioned "horizontal interval data") of the horizontal division pattern may include: a line interval between a dividing line of a first horizontal dividing mode and an upper edge of the current block, and a line interval between dividing lines of two adjacent horizontal dividing modes. The preset division interval data (equivalent to the above-mentioned "vertical interval data") of the vertical division pattern may include: a column interval between a dividing line of a first vertical dividing mode and a left edge of the current block, and a column interval between dividing lines of adjacent two vertical dividing modes. Wherein the preset partition interval data may vary according to a size variation of the coding block. For example, as shown in fig. 5 and 6, when the current block size is 16 × 16, the preset division interval data of the horizontal division mode may include steps 0 to 2 and steps 1 to 4; the preset division interval data of the vertical division pattern may include steps 2 to 8.
In other embodiments, the preset division interval data may have only one value, and then the division lines of the at least one horizontal division pattern and the at least one vertical division pattern are determined according to the value, where the line spacing between the division lines of two adjacent horizontal division patterns is the same, and the line spacing between the division lines of two adjacent horizontal division patterns is the same as the column spacing between the division lines of two adjacent vertical division patterns. For example, when the current block is a block 8*8 and the preset partition interval data is 4, 1 partition mode exists in the horizontal direction, 1 partition mode exists in the vertical direction, and 2 partition modes exist in total; similarly, 8 × 16 blocks have 4 division modes, 3 in the horizontal direction, 1 in the vertical direction, and so on. Specifically, as shown in fig. 7 and 8, the current block is a 32 × 32 block, and when the preset partition interval data is 4, there are 7 horizontal partition modes and 7 vertical partition modes.
In addition, according to each division mode, after the current block is divided into a first rectangular sub-block and a second rectangular sub-block, whether the current division mode is available can be judged; if not, the cost value of all motion information combinations in the current division mode can not be calculated; and if the motion information combination is available, calculating the cost value of all motion information combinations in the current division mode.
When the width and height of the first rectangular sub-block obtained by the current division mode are larger than or equal to 4 and are even numbers, and the width and height of the second rectangular sub-block are larger than or equal to 4 and are even numbers, the current division mode is an available division mode; otherwise, the current division mode is an unavailable division mode.
In addition, the index value of the unavailable partition mode may be increased to decrease the index value of at least one available partition mode to reduce the bit overhead caused by transmitting the partition mode index value.
For example, when it is determined that the current division mode is the unavailable division mode, the current division mode may be put to the last of the division mode list, that is, the index value of the current division mode is increased to the maximum, and the division modes that are originally ranked after the current division mode are ranked forward.
For another example, after confirming whether all the division modes are available, the order may be reordered to rank all the unavailable division modes behind all the available division modes, wherein the order between the unavailable division modes may also be the same as the order before the reordering, and the order between the available division modes may also be the same as the order before the reordering.
S13: and determining the optimal division mode and the optimal motion information combination based on the cost value.
After traversing all the division modes and calculating the cost values of all the motion information combinations of all the available division modes, the cost values of all the motion information combinations of all the available division modes can be compared to determine the optimal division mode and the optimal motion information combination.
Preferably, the available partition mode and motion information corresponding to the smallest cost value may be combined as the optimal partition mode and optimal motion information combination for the current block.
In the embodiment, a motion information candidate list of the current block is constructed, and then all the division modes are traversed in sequence, so that the cost value of all motion information combinations of at least part of the division modes is determined based on the motion information candidate list of the current block; and then, the optimal division mode and the optimal motion information combination of the current block are determined based on the cost value, so that the optimal division mode and the optimal motion information combination of each block are determined, the inaccuracy of the predicted value of the coding block with incompletely equally divided textures caused by a unified division method used by all the coding blocks is avoided, the textures can be predicted better, and the prediction accuracy is improved.
In addition, after the combination of the optimal partition mode and the optimal motion information of the current block is determined, the motion information of each unit block of the current block can be stored to be used as a reference MV of a coding block or a coding frame to be coded subsequently. The unit block may be 4*4 block.
In one implementation, in which sub-block the unit block is located completely, the motion information of the sub-block in which the unit block is located is stored as the motion information of the unit block; if at least two portions of the unit block are located in at least two sub-blocks, respectively, the motion information of one of the sub-blocks in which the unit block is located may be stored as the motion information of the unit block. For example, as shown in fig. 9, motion information of unit blocks in the first and second columns are stored as motion information of the sub-block 0, motion information of unit blocks in the third column is stored as motion information of the sub-block 0, and motion information of unit blocks in the fourth column is stored as motion information of the sub-block 1. In other implementations, the motion information of the unit block of the third column shown in fig. 9 may be stored as the motion information of the sub-block 1.
When the division mode for dividing the current block into two rectangular sub-blocks is determined by the first weight matrix or the second weight matrix in step S12, it is possible to calculate which sub-block motion information is stored for each unit block in the current block by a formula.
Specifically, the central position of the cell block is (x, y);
if the optimal division mode is the horizontal division mode, the formula is as follows:
FirstPos=(ValidLen>>1)+Y*(ValidLen>>3);
if (y < < 1) is greater than or equal to FirstPos, storing the motion information of the sub-block 1 shown in fig. 9; otherwise, the motion information of the sub-block 0 shown in fig. 9 is stored.
If the optimal division mode is a vertical division mode, the formula is as follows:
FirstPos=(ValidLen>>1)+Y*(ValidLen>>3);
if (x < < 1) is greater than or equal to FirstPos, storing the motion information of the sub-block 1 shown in fig. 9; otherwise, the motion information of the sub-block 0 shown in fig. 9 is stored.
It is to be understood that, when the calculation formula of the first weight matrix or the second weight matrix is changed, the calculation formula of the motion information stored in the confirmation unit block may be changed.
In another implementation, if the optimal partition mode is not the equal-sized partition mode, motion information of all unit blocks in the current block may be stored as motion information of a subblock having a largest area.
In addition, the current block is a luminance block, and in a certain division mode, the current block is divided into two rectangular sub-blocks, a first rectangular sub-block and a second rectangular sub-block, and the width or height of at least one rectangular sub-block is less than 8. In view of hardware implementation, the width or height of the sub-block cannot be less than 4, and since the chroma block is half smaller than the corresponding luma block, when performing motion compensation on the chroma block corresponding to the current block, the chroma block corresponding to the current block may be motion compensated in whole blocks to obtain a prediction value of the chroma block. However, the luminance component of the current block is motion compensated for each sub-block, specifically, the first rectangular sub-block is motion compensated based on the motion information of the first rectangular sub-block, and the second rectangular sub-block is motion compensated based on the motion information of the second rectangular sub-block, so as to obtain the prediction value of the current block. That is, when the width or height of at least one rectangular sub-block obtained by dividing the luminance block is less than 8, the luminance block and the chrominance block corresponding to the luminance block may use different strategies for motion compensation. When the width and height of all the rectangular sub-blocks obtained by dividing the luminance block are greater than or equal to 8, the chrominance block can also be divided according to the dividing mode corresponding to the luminance block to obtain chrominance sub-blocks, and each chrominance sub-block is compensated to obtain the predicted value of the chrominance block.
It will be appreciated that the above inter-prediction encoding may be applied in different scenarios. The estimation formulas of the first weight matrix and the second weight matrix in step S12 described above and the estimation formula of the motion information stored in the unit block in step S13 may be changed corresponding to different scenes.
For example, the above-mentioned inter-frame prediction coding can be applied to screen content obtained by screen recording, for example, in this case, in the calculation formula of the first weight matrix and the second weight matrix, the calculation formula of the reference weight value ReferenceWeights [ x ] can be changed to ReferenceWeights [ x ] = Clip3[0,8, (x-FirstPos-3)/4 ]. When the motion information stored in the cell block is confirmed, the derivation formula of FirstPos may be changed to FirstPos = (ValidLen > > 1) +3+Y (ValidLen > > 3).
After the optimal division mode and the optimal motion information combination of the current block are determined using the above inter prediction method, the current block may be encoded. Specifically, the index value of the optimal division mode and the index value of the motion information of each sub-block in the optimal motion information combination may be encoded.
In addition, a first syntax element may also be added to the sequence header to indicate whether all image frames of the sequence are inter-predicted using the inter-prediction method of the present application.
Optionally, a second syntax element may be added to the encoding result of the current block to indicate whether the current block is inter-predicted by the inter-prediction method of the present application.
TABLE 1 sequence header definitions
Sequence header definition Descriptor(s)
if(profile_id==0x32){
reg_enable_flag u(1)
}
For example, as shown in table 1, the first syntax element may be reg _ enable _ flag, which may be a binary variable, a value of 1 indicates that all image frames of the sequence are inter-predicted using the inter-prediction method of the present application, and a value of 0 indicates that all image frames of the sequence are not inter-predicted using the inter-prediction method of the present application.
TABLE 2 coding Unit definition
Coding unit definition Descriptor(s)
if((SkipFlag||DirectFlag)&&RegFlag){
reg_idx ae(v)
reg_cand_idx0 ae(v)
reg_cand_idx1 ae(v)
}
As shown in table 2, the second syntax element is reg _ flag, which is a CU-level regular geometric prediction mode flag, a value of 1 indicates that the current block performs inter prediction by using the inter prediction method of the present application, a value of 0 indicates that the current block does not perform inter prediction by using the inter prediction method of the present application, and a value of RegFlag is equal to reg _ flag.
The coding syntax of the optimal partition mode may be reg _ idx, which may adopt a truncated binary code binarization mode, and the value range is 0 to 13. Reg _ idx is equal to 0 if reg _ idx is not present in the bitstream; truncated binary encoding (Truncated binary encoding) is a type of entropy encoding suitable for symbols with uniformly distributed characteristics. When the number of symbols is not an integer power of 2, the average code length can be shortened by using truncated binary coding compared with the use of ordinary binary coding with fixed length.
The coding syntax of the motion information index value of the first sub-block in the optimal motion information combination can be reg _ cand _ idx0, which can indicate the sequence of the motion information in the motion information candidate list, and a truncated unary code binarization mode is adopted, so that the value range is 0-b; if reg _ cand _ idx0 is not present in the bitstream, the value of reg _ cand _ idx0 is equal to 0.
The coding syntax of the motion information index value of the second sub-block in the optimal motion information combination may be reg _ cand _ idx1: the method can indicate the sequence of motion information in a candidate list, and adopts a truncated unary code binarization mode to obtain a value range of 0-b-1; if reg _ cand _ idx1 is not present in the bitstream, the value of reg _ cand _ idx1 is equal to 0.
The coding syntax of the motion information index value of the a-1 st sub-block in the optimal motion information combination may be reg _ cand _ idx a-1: the method can indicate the sequence of motion information in a candidate list, and adopts a truncated unary code binarization mode to obtain a value range of 0-b-a +1; if reg _ cand _ idx a-1 is not present in the bitstream, the value of reg _cand _ idx a-1 equals 0.
Among them, unary code is a very simple binarization method. For a non-negative integer N, its element code is represented as N1 plus 10. For example, N =5, the unary code is denoted as 111110 (5 1 plus 1 0), N =0, and the unary code is 0.
And truncated unary codes are a variant of unary codes. Under the condition that the maximum value Nmax of the symbols to be coded is known, the current symbols to be coded are assumed to be non-negative integers N, if N is less than Nmax, the truncated unary code is the unary code, and if N = Nmax, the truncated unary code is N1. For example: given Nmax =5,n =3, the truncated unary code is 1110,n =5, and the truncated unary code is 11111.
Please refer to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of the encoding and decoding system of the present application. The present electronic device 10 includes a processor 12, the processor 12 being configured to execute instructions to implement the inter prediction method and the video coding method described above. For a specific implementation process, please refer to the description of the foregoing embodiment, which is not repeated herein.
The processor 12 may also be referred to as a CPU (Central Processing Unit). The processor 12 may be an integrated circuit chip having signal processing capabilities. The processor 12 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 12 may be any conventional processor or the like.
Codec system 10 may further include a memory 11 for storing instructions and data required for operation of processor 12.
The processor 12 is configured to execute instructions to implement the methods provided by any of the embodiments of the inter prediction method and video coding method of the present application and any non-conflicting combinations thereof.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure. The computer readable storage medium 20 of the embodiments of the present application stores instructions/program data 21 that when executed enable the methods provided by any of the embodiments of the inter prediction method and video coding method of the present application, as well as any non-conflicting combinations. The instructions/program data 21 may form a program file stored in the storage medium 20 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 20 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 terminal devices, such as a computer, a server, a mobile phone, and a tablet.
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 may be implemented in the form of hardware, or may also be implemented in the 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 (18)

1. A method of block partitioning, the method comprising:
determining a division line corresponding to the current division mode of the current block according to preset division interval data;
and dividing the current block along the dividing line to obtain a first rectangular sub-block and a second rectangular sub-block.
2. The block division method according to claim 1,
when the division mode is a horizontal division mode, the preset division interval data comprises a line spacing between a division line of a first horizontal division mode and the upper edge of the current block and a line spacing between division lines of two adjacent horizontal division modes;
when the division mode is a vertical division mode, the preset division interval data includes a column interval between a division line of a first vertical division mode and a left edge of the current block, and a column interval between division lines of two adjacent vertical division modes.
3. The block division method according to claim 1, wherein said preset division interval data is equal to a preset value,
the determining a partition line corresponding to a current partition mode of a current block according to preset partition interval data includes:
when the current division mode is a first horizontal division mode, the line spacing between the division line of the current division mode and the upper edge of the current block is a preset value; and/or the presence of a gas in the atmosphere,
when the current division mode is a horizontal division mode but not a first horizontal division mode, the line spacing between the division line of the current division mode and the division line of the last horizontal division mode of the current division mode is a preset value; and/or the presence of a gas in the gas,
when the current division mode is a first vertical division mode, the column spacing between the division line of the current division mode and the left edge of the current block is a preset value; and/or the presence of a gas in the gas,
and when the current division mode is the vertical division mode but not the first vertical division mode, the column spacing between the division line of the current division mode and the division line of the last vertical division mode of the current division mode is a preset value.
4. A method of inter-prediction, the method comprising:
constructing a motion information candidate list of the current block;
sequentially traversing all the division modes, and determining the cost value of all the motion information combinations of at least partial division modes, wherein the motion information combinations comprise the motion information of two sub-blocks obtained by dividing the current block according to each division mode by using the block division method of any one of claims 1 to 3, and the motion information of all the sub-blocks is from the motion information candidate list of the current block;
and determining the optimal partitioning mode and the optimal motion information combination of the current block based on the cost value.
5. The method of claim 4, wherein sequentially traversing all the partition modes and determining the cost values of all motion information combinations of at least some of the partition modes comprises:
determining motion information for the first rectangular sub-block and the second rectangular sub-block based on the motion information candidate list;
and performing motion compensation on the first rectangular sub-block based on the motion information of the first rectangular sub-block, and performing motion compensation on the second rectangular sub-block based on the motion information of the second rectangular sub-block to obtain a prediction value of the current block.
6. The inter-prediction method of claim 5, wherein the current block is a luma block, the method further comprising:
and when the width and/or height of the rectangular sub-block or the second rectangular sub-block is less than 8, performing motion compensation on the chroma block corresponding to the current block according to an entire block to obtain a predicted value of the chroma block.
7. The inter-frame prediction method of claim 4, wherein sequentially traversing all the partition modes to determine the cost values of all the motion information combinations of at least some of the partition modes comprises:
when the width and the height of the first rectangular sub-block and the second rectangular sub-block are both even numbers and are greater than or equal to 4, the division mode is an available division mode, and the cost value of all motion information combinations of the available division mode is calculated; otherwise, the division mode is an unavailable division mode;
the determining the optimal partition mode and the optimal motion information combination of the current block based on the cost value includes: and comparing the cost values of all the motion information combinations under all the available partition modes, and taking the available partition mode and the motion information combination corresponding to the minimum cost value as the optimal partition mode and the optimal motion information combination of the current block.
8. The inter-prediction method of claim 7, further comprising:
in response to the partition mode being an unavailable partition mode, increasing an index value of the partition mode to decrease an index value of at least one available partition mode.
9. The inter-prediction method of claim 4, wherein the determining the optimal partition mode and the optimal motion information combination for the current block based on the cost value comprises:
storing motion information of each unit block of the current block;
if the unit block is located in one of the sub-blocks, the motion information of the unit block is the motion information of the sub-block in which the unit block is located;
if at least two parts of the unit block are respectively located in at least two sub-blocks, the motion information of the unit block is the motion information of one of the sub-blocks.
10. The inter-prediction method of claim 4, wherein the determining the optimal partition mode and the optimal motion information combination for the current block based on the cost value comprises:
storing motion information of each unit block of the current block;
wherein, the motion information of each unit block is the motion information of the subblock with the largest area in all subblocks.
11. The inter-prediction method of claim 4, wherein the motion information of all sub-blocks in the same available partition mode is different from each other.
12. The inter-prediction method of claim 4, wherein the width and/or height of the current block is greater than or equal to 8 and less than or equal to 128.
13. The inter-prediction method of claim 4, wherein the constructing the motion information candidate list of the current block comprises:
adding the temporal motion information and the spatial motion information of the current block to a motion information candidate list in sequence until the motion information candidate list is filled;
if the motion information candidate list is not filled, adding preset motion information to the motion information candidate list; and/or adding the zooming motion information obtained by zooming the motion information in the motion information candidate list to the motion information candidate list; and/or adding an average value of at least two pieces of motion information in the motion information candidate list to the motion information candidate list.
14. The inter-frame prediction method according to claim 13, wherein adding scaled motion information obtained by scaling the motion information in the motion information candidate list to the motion information candidate list comprises:
substituting the absolute value of the zoomed motion information in the x-axis direction into an amplification formula or a reduction formula corresponding to the range of the absolute value of the x-axis direction to obtain the value of the zoomed motion information in the x-axis direction;
and substituting the absolute value of the zoomed motion information in the y-axis direction into an amplification formula or a reduction formula corresponding to the range of the absolute value of the y-axis direction to obtain the value of the zoomed motion information in the y-axis direction.
15. The inter-prediction method of claim 14, wherein the amplification formula is:
Figure FDA0003835103990000041
the reduction formula is:
Figure FDA0003835103990000042
wherein temp is the absolute value of the scaled motion information in the x-axis direction or the absolute value of the scaled motion information in the y-axis direction, and result is the value of the scaled motion information in the x-axis direction or the y-axis direction; the A is the positive and negative attribute of the value of the scaled motion information in the x-axis direction or the value of the scaled motion information in the y-axis direction.
16. A method of video encoding, the method comprising:
determining an optimal partition mode and optimal motion information combination for the current block based on the method of any of claims 4-15;
and encoding the index value of the optimal division mode and the index value of the motion information of each sub-block in the optimal motion information combination.
17. A codec system, comprising a processor; the processor is configured to execute instructions to implement the steps of the method according to any of claims 1-16.
18. A computer readable storage medium on which a program and/or instructions are stored, characterized in that said program and/or instructions, when executed, implement the steps of the method of any one of claims 1-16.
CN202211086018.9A 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device Pending CN115567714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211086018.9A CN115567714A (en) 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211086018.9A CN115567714A (en) 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device
CN202011406071.3A CN112565769B (en) 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202011406071.3A Division CN112565769B (en) 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device

Publications (1)

Publication Number Publication Date
CN115567714A true CN115567714A (en) 2023-01-03

Family

ID=75047981

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202211086018.9A Pending CN115567714A (en) 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device
CN202011406071.3A Active CN112565769B (en) 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202011406071.3A Active CN112565769B (en) 2020-12-02 2020-12-02 Block division method, inter-frame prediction method, video coding method and related device

Country Status (1)

Country Link
CN (2) CN115567714A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4183132A4 (en) * 2020-12-02 2023-09-13 Zhejiang Dahua Technology Co., Ltd. Systems and method for inter prediction based on a merge mode

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100584552B1 (en) * 2003-01-14 2006-05-30 삼성전자주식회사 Method for encoding and decoding video and apparatus thereof
KR101408698B1 (en) * 2007-07-31 2014-06-18 삼성전자주식회사 Method and apparatus for encoding/decoding image using weighted prediction
US8879632B2 (en) * 2010-02-18 2014-11-04 Qualcomm Incorporated Fixed point implementation for geometric motion partitioning
CN102215396A (en) * 2010-04-09 2011-10-12 华为技术有限公司 Video coding and decoding methods and systems
CN103281527B (en) * 2010-04-15 2015-12-23 华为技术有限公司 Image coding/decoding method and relevant apparatus
CN102223528B (en) * 2010-04-15 2014-04-30 华为技术有限公司 Method for obtaining reference motion vector
CN111355959B (en) * 2018-12-22 2024-04-09 华为技术有限公司 Image block dividing method and device

Also Published As

Publication number Publication date
CN112565769B (en) 2022-10-28
CN112565769A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN111279695B (en) Method and apparatus for asymmetric subblock-based image encoding/decoding
US11800140B2 (en) Methods and apparatus of motion vector rounding, clipping and storage for inter prediction based on mantissa-exponent representations
KR20190038371A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
CN110677658B (en) Non-adjacent Merge design based on priority
CN114128261A (en) Combined inter and intra prediction modes for video coding
US20190335197A1 (en) Image encoding/decoding method and device, and recording medium having bitstream stored thereon
CN117221532B (en) Method, apparatus and storage medium for video decoding
US11134261B2 (en) Methods and apparatus of video coding for triangle prediction
TW202025779A (en) Overlapped block motion compensation using temporal neighbors
CN113892264A (en) Using non-rectangular prediction modes to reduce motion field storage for video data prediction
US20240073448A1 (en) Image encoding/decoding method and device, and recording medium in which bitstream is stored
CN117041595B (en) Method, apparatus, storage medium, and program product for decoding video
CN113099229B (en) Block division method, inter-frame prediction method, video coding method and related device
CN112565769B (en) Block division method, inter-frame prediction method, video coding method and related device
US20220014780A1 (en) Methods and apparatus of video coding for triangle prediction
CN115623206B (en) Video encoding and decoding method and device using triangle partition
CN114009019A (en) Method and apparatus for signaling merge mode in video coding
TW202007146A (en) Complexity reduction of non-adjacent Merge design
CN113994672A (en) Method and apparatus for video encoding and decoding using triangle prediction
CN116684578A (en) Affine model optimization based on control point motion vectors

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