CN111901593B - Image dividing method, device and equipment - Google Patents

Image dividing method, device and equipment Download PDF

Info

Publication number
CN111901593B
CN111901593B CN201910377382.2A CN201910377382A CN111901593B CN 111901593 B CN111901593 B CN 111901593B CN 201910377382 A CN201910377382 A CN 201910377382A CN 111901593 B CN111901593 B CN 111901593B
Authority
CN
China
Prior art keywords
current image
image block
height
width
maxeqtsize
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.)
Active
Application number
CN201910377382.2A
Other languages
Chinese (zh)
Other versions
CN111901593A (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910377382.2A priority Critical patent/CN111901593B/en
Priority to PCT/CN2020/087289 priority patent/WO2020224476A1/en
Publication of CN111901593A publication Critical patent/CN111901593A/en
Application granted granted Critical
Publication of CN111901593B publication Critical patent/CN111901593B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/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/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Abstract

The application provides an image dividing method, device and equipment, so as to avoid the problem that when boundary image blocks are divided, the image blocks which are not available in a single division mode are necessarily divided, and the coding performance is influenced. The method comprises the following steps: acquiring block information of a current image block; determining available division modes from the candidate division mode set according to the acquired block information; determining the dividing mode of the current image block from the determined available dividing modes; and obtaining one CU or a plurality of CUs from the current image block according to the dividing mode of the current image block, wherein the aspect ratio of each CU meets the set maximum height ratio of the CUs.

Description

Image dividing method, device and equipment
Technical Field
The present disclosure relates to the field of video coding, and in particular, to a method, an apparatus, and a device for dividing images.
Background
Video coding (including video coding (video decoding) and video coding (video encoding)) is widely used in digital video applications such as broadcast digital television, video distribution over the internet and mobile networks, real-time conversational applications such as video chat and video conferencing, DVD and blu-ray discs, video content acquisition and editing systems, and security applications for camcorders.
When encoding a frame of image in a video, it is first required to divide the image into image blocks of equal size, called maximum coding units (largest coding unit, LCU), and then recursively divide one LCU to obtain one or more Coding Units (CUs). The existing coding standard adds a Binary Tree (BT) dividing mode (comprising a horizontal bipartite tree (horizontal binary tree, HBT) and a vertical bipartite tree (vertical binary tree, VBT)) and an extended quadtree (extended quad tree, EQT) dividing mode (comprising a horizontal extended quadtree (horizontal extended quad tree, HEQT) and a vertical extended quadtree (vertical extended quad tree, VEQT)) on the basis of a Quadtree (QT) dividing mode.
In the configuration of the existing maximum BT size (MaxBTSize) and/or maximum EQT size (MaxEqtSize), when dividing the boundary LCU, it may occur that an image block of a division mode that is not available only has to be divided, according to the coding tree definition syntax in the related art, for some Coding Units (CUs). For example, when the maximum aspect ratio (MaxPartRatio) of the coding unit is 4, dividing the boundary LCU may occur for an image block with an aspect ratio of 1:8 or 8:1, such as an 8×64 image block or a 64×8 image block, and in order to satisfy the constraint that the maximum aspect ratio of the coding unit is 4, an image block with an aspect ratio of 1:8 or 8:1 must be divided, since the division process is affected by the maximum division depth, when the image block can be divided only once, there may be the following cases: 1) The image block is continuously divided by using EQT, but the image block or CU with the aspect ratio of 1:8 or 8:1 is generated after the EQT is used for dividing, and the EQT dividing mode is not available; 2) When MaxBTSize is configured to be smaller than 64, an 8×64 or 64×8 image block cannot be divided using BT. That is, the 8x64 or 64x8 image block cannot be divided using EQT, BT, QT, and cannot be divided, thereby affecting the encoding performance.
Disclosure of Invention
The application provides an image dividing method, device and equipment, so as to avoid the problem that when boundary image blocks are divided, the image blocks which are not available in a single division mode are necessarily divided, and the coding performance is influenced.
In a first aspect, the present application provides an image division method applied to a video encoding (including encoding and decoding) process, the method comprising: acquiring block information of a current image block; determining available division modes from the candidate division mode set according to the acquired block information; determining the dividing mode of the current image block from the determined available dividing modes; and obtaining one CU or a plurality of CUs from the current image block according to the dividing mode of the current image block, wherein the aspect ratio of each CU meets the set maximum height ratio of the CUs.
By the method, when dividing the current image block in the video coding process, the image block can be divided into one or more CUs meeting the set CU maximum aspect ratio, the problem that the image block which is required to be divided but cannot be divided occurs due to the limitation of the set CU maximum aspect ratio in the image dividing process in the prior art can be solved, and the coding performance can be improved.
In one possible embodiment, the block information of the current image block may include size information of the current image block, such as a width of the current image block, a height of the current image block, or an area obtained based on the width and the height of the current image block. The block information of the current image block may further include coordinates of a pixel point in the current image block, for example, coordinates of a pixel point in the current image block in an image coordinate system, where an origin of the image coordinate system is a pixel point of an upper left vertex of an image in which the current image block is located, a horizontal axis of the image coordinate system is a width direction (x-axis) of the image in which the current image block is located, and a vertical axis of the image coordinate system is a height direction (y-axis) of the image in which the current image block is located. Further, the block information of the current image may further include other image related information corresponding to the current image block, for example, whether the current image block exceeds the boundary of the current image, and for the video decoding end device, the block information may be parsed or derived from the code stream of the current image.
Further, it may be determined whether the current image block exceeds the boundary of the image in which the current image block is located by: obtaining coordinates (x, y) of a pixel point in the current image block according to the block information of the image block; judging whether coordinates (x, y) of the pixel points meet preset conditions, if the coordinates (x, y) of the pixel points meet the first preset conditions, indicating that the current image block exceeds the right boundary of the image where the current image block is located, if the coordinates (x, y) of the pixel points meet the second preset conditions, indicating that the image block exceeds the lower boundary of the image where the current image block is located, if the coordinates (x, y) of the pixel points meet the third preset conditions, indicating that the current image block exceeds the right boundary of the image where the current image block is located and exceeds the lower boundary of the current image (right lower boundary for short), and if the coordinates (x, y) of the pixel points meet the fourth preset conditions, indicating that the current image block exceeds the boundary of the image where the current image block is located, namely, the picture possibly exceeds the lower boundary of the image, or exceeds the right lower boundary of the image. In addition, if the coordinates (x, y) of the pixel point meet the fourth preset condition, but do not meet the first preset condition and the second preset condition, the current image block is indicated to exceed the lower right boundary of the image where the current image block is located.
The selected pixel points are used for representing the current image block, and specific pixel points in the current image block can be selected to represent the current image block, for example, a pixel point of a vertex of the current image block, such as a pixel point of an upper left vertex, a pixel point of an upper right vertex, a pixel point of a lower left vertex or a pixel point of a lower right vertex, and of course, a pixel point of a central position of the current image block can be selected, and any pixel point except the above pixel points in the current image block can be selected. The first preset condition, the second preset condition, the third preset condition and the fourth preset condition can be determined according to the position of the selected pixel point and the size of the image where the current image block is located.
In one possible implementation, the maximum aspect ratio of the set CU may be 4 or 8.
In one possible implementation, the candidate set of partitioning modes includes, but is not limited to, one or more of a non-partitioning mode, a horizontal binary tree HBT partitioning mode, a vertical binary tree VBT partitioning mode, a horizontal extended quadtree HEQT partitioning mode, a vertical extended quadtree VEQT partitioning mode, and a quadtree QT partitioning mode.
In one possible implementation manner, according to the block information, determining the available partitioning manner from the candidate partitioning manner set specifically includes the following steps: and judging whether the current image block meets the first condition according to the block information, and determining the VBT dividing mode as an available dividing mode when the current image block meets the first condition. The first condition is that width > height is MaxPartRatio, width is the width of the current image block, height is the height of the current image block, and MaxPartRatio is the maximum height ratio of the set CU.
Through the scheme, compared with the prior art, the method and the device for processing the video blocks by the VBT have the advantages that the condition of using the VBT dividing mode is relaxed, when the ratio of the width to the height of the current video block is larger than the maximum height ratio of the set CU, the VBT dividing mode can be adopted, so that video blocks (video blocks which are required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio are avoided as much as possible, and the coding performance is improved.
In one possible implementation manner, according to the block information, determining the available partitioning manner from the candidate partitioning manner set specifically includes the following steps: according to the block information, determining the available division mode from the candidate division mode set specifically comprises the following steps: judging whether the current image block meets a second condition according to the block information; and when the current image block meets the second condition, determining the HBT division mode as an available division mode. The second condition is height > width MaxPartRatio, width is width of the current image block, height is height of the current image block, maxPartRatio is maximum height ratio of the set CU.
Through the scheme, compared with the prior art, the condition of using the HBT division mode is relaxed, when the ratio of the height to the width of the current image block is larger than the maximum height ratio of the set CU, the HBT division mode can be adopted, so that the image block (the image block which is required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio is avoided as much as possible, and the coding performance is improved.
In one possible implementation manner, according to the block information, determining the available partitioning manner from the candidate partitioning manner set specifically includes the following steps: judging whether the current image block meets the condition in the first condition set according to the block information; when the current image block meets all conditions in the first condition set, the VEQT partitioning mode is determined to be an available partitioning mode. Wherein the first set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) height ≡ MinEqtSize ≡ 2; (4) width is greater than or equal to MinEqtSize 4; (5) height 4 +.maxpartratio with; (6) height MaxPartRatio is not less than width; where width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the set maximum EQT, minEqtSize is the size of the set minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
Compared with the prior art, the method and the device have the advantages that the condition of using the VEQT division mode is contracted, so that image blocks (image blocks which are required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio are avoided as much as possible, and the coding performance is improved.
In one possible implementation manner, according to the block information, determining the available partitioning manner from the candidate partitioning manner set specifically includes the following steps: judging whether the current image block meets the conditions in the second condition set according to the block information; and when the current image block meets all conditions in the second condition set, determining that the HEQT dividing mode is an available dividing mode. Wherein the second set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) width is greater than or equal to MinEqtSize 2; (4) height ≡ MinEqtSize 4; (5) width 4 +.maxpartratio height; (6) width maxpartrio ≡height; where width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the maximum EQT, minEqtSize is the size of the minimum EQT, maxPartRatio is the maximum aspect ratio of the CU.
Compared with the prior art, the method and the device have the advantages that the condition of using the HEQT division mode is contracted, so that image blocks (image blocks which are required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio are avoided as much as possible, and the coding performance is improved.
In one possible embodiment, the method further includes determining that the current image block is within a boundary of an image in which the current image block is located based on the block information of the current image block.
In one possible implementation, the current image block may be determined to be within the boundary of the current image block by: judging whether the current image block meets a third condition according to the block information of the current image block; and when the current image block meets the third condition, determining that the current image block is in the boundary of the current image block. Wherein the third condition is: (x0+width) is less than or equal to PicWidth, and (y0+height) is less than or equal to PicHeight, x0 is the abscissa of the pixel point of the top left vertex of the current image block in the image coordinate system, y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the abscissa of the image coordinate system is the width direction of the image where the current image block is located, the ordinate of the image coordinate system is the height direction of the image where the current image block is located, picWidth is the width of the image where the current image block is located, and PicHeight is the height of the image where the current image block is located.
In one possible implementation manner, the method further includes determining, according to the block information of the current image block, that the current image block exceeds the boundary of the image where the current image block is located, and determining whether the QT partition is an available partition according to the block information of the current image block, the set maximum BT size, and the set maximum EQT size.
In one possible implementation, the current image block may be determined to exceed the boundary of the image in which the current image block is located by: judging whether the current image block meets a fourth condition according to the block information of the current image block; and when the current image block meets the fourth condition, determining that the current image block exceeds the boundary of the current image block. Wherein the fourth condition is: (x0+width) > PicWidth, and (y0+height) > PicHeight, wherein x0 is the abscissa of the pixel point of the top left vertex of the current image block in the image coordinate system, y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, the vertical axis of the image coordinate system is the height direction of the image where the current image block is located, picWidth is the width of the image where the current image block is located, and PicHeight is the height of the image where the current image block is located.
In one possible implementation, when the current image block exceeds the boundary of the image where the current image block is located, it may be determined whether the QT partition mode is a usable partition mode by: judging whether the current image block meets the conditions in the third condition set according to the block information of the image block; and if the current image block meets at least one condition in the third condition set, the QT partitioning mode is an available partitioning mode.
Wherein the third set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of the set maximum BT, maxEqtSize is the size of the set maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
In one possible implementation, when the current image block exceeds the boundary of the image where the current image block is located, it may be determined whether the QT partition mode is a usable partition mode by: judging whether the current image block meets the conditions in the fourth condition set according to the block information of the image block; and if the current image block meets at least one condition in the fourth condition set, the QT partitioning mode is an available partitioning mode.
Wherein the fourth set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the image block is located and does not exceed the lower boundary of the image where the image block is located; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
Through the scheme, in the image dividing process, when the current image block exceeds the boundary of the image where the image block is located, a QT dividing mode is adopted, so that the problem that the boundary image block is divided into N multiplied by 64 or 64 multiplied by N (N < 64) image blocks, and when MaxBTSize and MaxEqtSize are smaller than 64, the problem that the N multiplied by 64 or 64 multiplied by N (N < 64) image blocks cannot be continuously divided is avoided.
In one possible embodiment, maxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
In one possible implementation manner, for the decoding end device, the dividing manner of the current image block may be determined from the determined available dividing manners by: when the available division mode is one, determining the available division mode as the division mode of the current image block; when the available dividing modes are multiple, analyzing the code stream comprising the current image block according to the determined available dividing modes, and determining the dividing modes of the current image block according to the analysis result.
In one possible implementation manner, for the encoding end device, the dividing manner of the current image block may be determined from the determined available dividing manners by: when the available division mode is one, determining the available division mode as the division mode of the current image block; when the available division modes are multiple, the rate distortion cost of each available division mode is determined respectively, and the available division mode with the minimum rate distortion cost in the available division modes is determined as the division mode of the current image block.
In a second aspect, the present application also provides another image division method applied to a video encoding process, the method including: acquiring block information of a current image block; determining available division modes from the candidate division mode set according to the acquired block information, wherein when the current image block exceeds the boundary of the image where the current image block is located, whether the QT division mode in the candidate division mode set is the available division mode is judged according to the block information of the current image block, the set maximum BT size and the set maximum EQT size; determining the dividing mode of the current image block from the determined available dividing modes; and obtaining one CU or a plurality of CUs from the current image block according to the dividing mode of the current image block.
Through the scheme, when the current image block is divided in the video coding process, the QT division mode is adopted as much as possible when the current image block exceeds the boundary of the image where the image block is located, so that the image block of N multiplied by 64 or 64 multiplied by N (N < 64) is avoided from being obtained by dividing the boundary image block, and further, the problem that the image block of N multiplied by 64 or 64 multiplied by N (N < 64) cannot be continuously divided when MaxBTSize and MaxEqtSize are set to be smaller than 64 is avoided, and further, the coding performance can be improved.
In one possible embodiment, the block information of the current image block may include size information of the current image block, such as a width of the current image block, a height of the current image block, or an area obtained based on the width and the height of the current image block. The block information of the current image block may further include coordinates of a pixel point in the current image block, for example, coordinates of a pixel point in the current image block in an image coordinate system, where an origin of the image coordinate system is a pixel point of an upper left vertex of an image in which the current image block is located, a horizontal axis of the image coordinate system is a width direction (x-axis) of the image in which the current image block is located, and a vertical axis of the image coordinate system is a height direction (y-axis) of the image in which the current image block is located. Further, the block information of the current image may further include other image related information corresponding to the current image block, for example, whether the current image block exceeds the boundary of the current image, and for the video decoding end device, the block information may be parsed or derived from the code stream of the current image.
In one possible implementation, the candidate partition set may further include one or more of, but is not limited to, a non-partition, a horizontal binary tree HBT partition, a vertical binary tree VBT partition, a horizontal extended quadtree HEQT partition, and a vertical extended quadtree VEQT partition.
In one possible implementation, the current image block may be determined to exceed the boundary of the image in which the current image block is located by: judging whether the current image block meets a fourth condition according to the block information of the current image block; and when the current image block meets the fourth condition, determining that the current image block exceeds the boundary of the current image block. Wherein the fourth condition is: (x0+width) > PicWidth, and (y0+height) > PicHeight, wherein x0 is the abscissa of the pixel point of the top left vertex of the current image block in the image coordinate system, y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, the vertical axis of the image coordinate system is the height direction of the image where the current image block is located, picWidth is the width of the image where the current image block is located, and PicHeight is the height of the image where the current image block is located.
In one possible implementation, when the current image block exceeds the boundary of the image where the current image block is located, it may be determined whether the QT partition mode is a usable partition mode by: judging whether the current image block meets the condition in the first condition set according to the block information of the image block; if the current image block meets at least one condition in the first condition set, the QT partitioning mode is an available partitioning mode.
Wherein the first set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of the set maximum BT, maxEqtSize is the size of the set maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
In one possible implementation, when the current image block exceeds the boundary of the image where the current image block is located, it may be determined whether the QT partition mode is a usable partition mode by: judging whether the current image block meets the conditions in the second condition set according to the block information of the image block; and if the current image block meets at least one condition in the second condition set, the QT partitioning mode is an available partitioning mode.
Wherein the second set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the image block is located and does not exceed the lower boundary of the image where the image block is located; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
Through the scheme, in the image dividing process, when the current image block exceeds the boundary of the image where the image block is located, a QT dividing mode is adopted, so that the problem that the boundary image block is divided into N multiplied by 64 or 64 multiplied by N (N < 64) image blocks, and when MaxBTSize and MaxEqtSize are smaller than 64, the problem that the N multiplied by 64 or 64 multiplied by N (N < 64) image blocks cannot be continuously divided is avoided.
In one possible embodiment, maxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
In one possible implementation manner, for the decoding end device, the dividing manner of the current image block may be determined from the determined available dividing manners by: when the available division mode is one, determining the available division mode as the division mode of the current image block; when the available dividing modes are multiple, analyzing the code stream comprising the current image block according to the determined available dividing modes, and determining the dividing modes of the current image block according to the analysis result.
In one possible implementation manner, for the encoding end device, the dividing manner of the current image block may be determined from the determined available dividing manners by: when the available division mode is one, determining the available division mode as the division mode of the current image block; when the available division modes are multiple, the rate distortion cost of each available division mode is determined respectively, and the available division mode with the minimum rate distortion cost in the available division modes is determined as the division mode of the current image block.
In a third aspect, the present application further provides an image dividing apparatus having a function of implementing the image dividing method described in any one of possible embodiments described in the first aspect. The image dividing apparatus includes an acquiring unit, a determining unit, and a dividing unit, where the units may perform corresponding functions in the method example described in the first aspect, and detailed descriptions in the method example are specifically referred to, and are not repeated herein.
In a fourth aspect, the present application further provides a video encoding apparatus having a function of implementing the image dividing method described in any one of possible implementation manners of the first aspect. The video encoding device comprises a memory and a processor configured to support the video encoding device to perform the corresponding functions of the method described in any one of the possible embodiments of the first aspect. The memory is coupled to the processor and holds the program instructions and data necessary for the video encoding device.
In a fifth aspect, the present application further provides another image dividing apparatus having a function of implementing the image dividing method described in any one of possible embodiments described in the second aspect. The image dividing apparatus includes an acquiring unit, a determining unit, and a dividing unit, where the units may perform corresponding functions in the method example described in the second aspect, and detailed descriptions in the method example are specifically referred to, and are not repeated herein.
In a sixth aspect, the present application further provides another video encoding apparatus having a function of implementing the image dividing method described in any one of possible embodiments of the second aspect. The video encoding device comprises a memory and a processor configured to support the video encoding device to perform the corresponding functions of the method described in any one of the possible embodiments of the second aspect. The memory is coupled to the processor and holds the program instructions and data necessary for the video encoding device.
In a seventh aspect, the present application also provides a computer storage medium having stored therein a software program which, when read and executed by one or more processors, performs the method provided by any one of the embodiments of any one of the aspects.
In an eighth aspect, the present application also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the methods of any of the above aspects.
Drawings
Fig. 1A is a schematic structural diagram of a video encoding and decoding system according to an embodiment of the present application;
fig. 1B is a schematic structural diagram of a video decoding system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an encoder according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a decoder according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a video decoding apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another video decoding apparatus according to an embodiment of the present application;
fig. 6 is a schematic diagram of a division manner of a binary tree, a quadtree and an extended quadtree according to an embodiment of the present application;
FIG. 7 is a schematic diagram of QT-MTT partitioning provided in an embodiment of the present application;
Fig. 8 is a flowchart of an image dividing method according to an embodiment of the present application;
FIG. 9 is a schematic diagram of an image coordinate system provided in an embodiment of the present application;
fig. 10 is a flowchart of another image dividing method according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an image dividing apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present application.
Detailed Description
In the video coding process, each frame of image needs to be divided into LCUs with equal sizes, and the LCUs are recursively divided into one or more CUs. In the digital audio and video coding and decoding (audio video coding standard workgroup of China, AVS) technical standard, the size of the LCU is 128x128 or 64x64, and a QT cascade BT/EQT dividing mode is used, that is, nodes on a first-stage coding tree can only be divided into child nodes by QT, and leaf nodes of the first-stage coding tree are root nodes of a second-stage coding tree; nodes on the second level encoding tree may be partitioned into child nodes using one of BT or EQT partitioning; leaf nodes of the second-level coding tree are coding units. It should be noted that when the leaf node is in BT or EQT partition mode, the leaf node can only use BT or EQT partition mode, but not QT mode.
The partial syntax of the coding tree definition of the conventional AVS3 is shown in table 1, and according to the coding tree definition syntax shown in table 1, when dividing a boundary LCU, a maximum height ratio (MaxPartRatio) of some Coding Units (CUs) may occur, in which a picture block having a division pattern that is not available may have to be divided. For example, when the maximum aspect ratio (MaxPartRatio) of the coding unit is 4, dividing the boundary LCU may occur for an image block with an aspect ratio of 1:8 or 8:1, such as an 8x64 image block or a 64x8 image block, in order to satisfy the constraint that the maximum aspect ratio of the coding unit is 4, an image block with an aspect ratio of 1:8 or 8:1 must be divided, and since the division process is affected by the maximum division depth, when the image block can be divided only once, there are the following cases: 1) The image block is continuously divided by using EQT, but the image block or CU with the aspect ratio of 1:8 or 8:1 is generated after the EQT is used for dividing, and the EQT dividing mode is not available; 2) When MaxBTSize is configured to be smaller than 64, 8×64 or 64×8 image blocks cannot be divided using BT. That is, the 8x64 or 64x8 image block cannot be divided using EQT, BT, QT, and cannot be divided, thereby affecting the encoding performance.
TABLE 1 coding tree definition syntax
/>
In order to solve the above problems in the existing video coding technology, the present application provides an image dividing method, device and equipment. The method and the apparatus according to the embodiments of the present application are based on the same concept, and since the principles of solving the problems by the method and the apparatus are similar, the implementation of the apparatus and the method may refer to each other, and the repetition is not repeated.
Embodiments of the present application are described below with reference to the accompanying drawings in the embodiments of the present application. In the following description, reference is made to the accompanying drawings which form a part hereof and which show by way of illustration specific aspects in which embodiments of the application may be practiced. It is to be understood that the embodiments of the present application may be used in other respects and may include structural or logical changes not depicted in the drawings. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present application is defined by the appended claims. For example, it should be understood that the disclosure in connection with the described methods may be equally applicable to a corresponding apparatus or system for performing the methods, and vice versa. For example, if one or more specific method steps are described, the corresponding apparatus may comprise one or more units, such as functional units, to perform the one or more described method steps (e.g., one unit performing one or more steps, or multiple units each performing one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the figures. On the other hand, if a specific apparatus is described based on one or more units such as a functional unit, for example, the corresponding method may include one step to perform the functionality of the one or more units (e.g., one step to perform the functionality of the one or more units, or multiple steps each to perform the functionality of one or more units, even if such one or more steps are not explicitly described or illustrated in the figures). Further, it is to be understood that features of the various exemplary embodiments and/or aspects described herein may be combined with each other, unless explicitly stated otherwise.
The technical scheme related to the embodiment of the application not only can be applied to the existing video coding standards (such as H.264, high-performance video coding (High Efficiency Video Coding, HEVC) and other standards), but also can be applied to future video coding standards (such as H.266 standard) or AVS technical standards such as AVS 3. The terminology used in the description section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application. Some concepts that may be related to embodiments of the present application are briefly described below.
Video coding generally refers to processing a sequence of pictures that form a video or video sequence. In the field of video coding, the terms "picture", "frame" or "image" may be used as synonyms. Video encoding as used herein refers to video encoding or video decoding. Video encoding is performed on the source side, typically including processing (e.g., by compression) the original video picture to reduce the amount of data required to represent the video picture, thereby more efficiently storing and/or transmitting. Video decoding is performed on the destination side, typically involving inverse processing with respect to the encoder to reconstruct the video pictures. The embodiment relates to video picture "encoding" is understood to relate to "encoding" or "decoding" of a video sequence. The combination of the encoding portion and the decoding portion is also called codec (encoding and decoding).
A video sequence comprises a series of pictures (pictures) which are further divided into slices (slices) which are further divided into blocks (blocks). Video coding performs coding processing in units of blocks, and in some new video coding standards, the concept of blocks is further extended. For example, in the h.264 standard, there are Macro Blocks (MBs), which can be further divided into a plurality of prediction blocks (partition) that can be used for predictive coding. In the HEVC standard, basic concepts such as a coding unit, a Prediction Unit (PU), a Transform Unit (TU) and the like are adopted, and various block units are functionally divided and described by adopting a brand-new tree-based structure. For example, the video coding standard divides a frame of image into Coding Tree Units (CTUs) that do not overlap with each other, and divides a CTU into a plurality of sub-nodes, where the sub-nodes may be divided into smaller sub-nodes according to Quadtrees (QT), and the smaller sub-nodes may be further divided, so as to form a quadtree structure. If the nodes are no longer partitioned, they are called CUs. A CU is a basic unit that divides and encodes an encoded image. Similar tree structures exist for PUs and TUs, which may correspond to prediction blocks, being the basic unit of predictive coding. The CU is further divided into a plurality of PUs according to a division pattern. The TU may correspond to a transform block, which is a basic unit for transforming a prediction residual. However, whether CU, PU or TU, essentially belongs to the concept of blocks (or picture blocks).
In HEVC, for example, CTUs are split into multiple CUs by using a quadtree structure denoted as coding tree. A decision is made at the CU level whether to encode a picture region using inter-picture (temporal) or intra-picture (spatial) prediction. Each CU may be further split into one, two, or four PUs depending on the PU split type. The same prediction process is applied within one PU and the relevant information is transmitted to the decoder on a PU basis. After the residual block is obtained by applying the prediction process based on the PU split type, the CU may be partitioned into TUs according to other quadtree structures similar to the coding tree for the CU. In a recent development of video compression technology, a quadtree and binary tree (QTBT) partition frame is used to partition the encoded blocks. In QTBT block structures, a CU may be square or rectangular in shape.
Herein, for convenience of description and understanding, an image block to be encoded in a current encoded image may be referred to as a current block, for example, in encoding, a block currently being encoded; in decoding, a block currently being decoded is referred to. A decoded image block in a reference image used for predicting a current block is referred to as a reference block, i.e. a reference block is a block providing a reference signal for the current block, wherein the reference signal represents pixel values within the image block. A block in the reference picture that provides a prediction signal for the current block may be referred to as a prediction block, where the prediction signal represents pixel values or sample signals within the prediction block. For example, after traversing multiple reference blocks, the best reference block is found, which will provide prediction for the current block, which is referred to as the prediction block.
In the case of lossless video coding, the original video picture may be reconstructed, i.e., the reconstructed video picture has the same quality as the original video picture (assuming no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, the amount of data needed to represent a video picture is reduced by performing further compression, e.g. quantization, whereas the decoder side cannot reconstruct the video picture completely, i.e. the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.
Several video coding standards of h.261 belong to the "lossy hybrid video codec" (i.e. spatial and temporal prediction in the sample domain is combined with 2D transform coding in the transform domain for applying quantization). Each picture of a video sequence is typically partitioned into non-overlapping sets of blocks, typically encoded at the block level. In other words, the encoder side typically processes, i.e. encodes, video at the block (video block) level, e.g. generates a prediction block by spatial (intra-picture) prediction and temporal (inter-picture) prediction, subtracts the prediction block from the current block (currently processed or to-be-processed block) to obtain a residual block, transforms the residual block in the transform domain and quantizes the residual block to reduce the amount of data to be transmitted (compressed), while the decoder side applies the inverse processing part of the relative encoder to the encoded or compressed block to reconstruct the current block for representation. In addition, the encoder replicates the decoder processing loop so that the encoder and decoder generate the same predictions (e.g., intra-prediction and inter-prediction) and/or reconstructions for processing, i.e., encoding, the subsequent blocks.
Referring to fig. 1A, fig. 1A schematically illustrates a block diagram of a video encoding and decoding system 10 as applied by an embodiment of the present application, the video encoding and decoding system 10 may include a source device 12 and a destination device 14, wherein the source device 12 generates encoded video data, and thus, the source device 12 may be referred to as a video encoding apparatus; destination device 14 may decode encoded video data generated by source device 12, and thus destination device 14 may be referred to as a video decoding apparatus. Various implementations of source apparatus 12, destination apparatus 14, or both may include one or more processors and memory coupled to the one or more processors. The memory may include, but is not limited to, random access memory (random access memory, RAM), read-only memory (ROM), charged erasable programmable read-only memory (electrically erasable programmable read only memory, EEPROM), flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures that can be accessed by a computer, as described herein. The source device 12 and the destination device 14 may include a variety of devices including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, vehicle mount computers, wireless communication devices, or the like.
Although fig. 1A depicts source device 12 and destination device 14 as separate devices, device embodiments may also include the functionality of both source device 12 and destination device 14, or both, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such embodiments, the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality may be implemented using the same hardware and/or software, or using separate hardware and/or software, or any combination thereof.
A communication connection may be made between source device 12 and destination device 14 via link 13, and destination device 14 may receive encoded video data from source device 12 via link 13. Link 13 may include one or more media or devices capable of moving encoded video data from source device 12 to destination device 14. In one example, link 13 may include one or more communication media that enable source device 12 to transmit encoded video data directly to destination device 14 in real-time. In this example, source apparatus 12 may modulate the encoded video data according to a communication standard, such as a wireless communication protocol, and may transmit the modulated video data to destination apparatus 14. The one or more communication media may include wireless and/or wired communication media such as a Radio Frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the internet). The one or more communication media may include routers, switches, base stations, or other equipment that facilitate communication from source apparatus 12 to destination apparatus 14.
Source device 12 includes an encoder 20 and, alternatively, source device 12 may also include a picture source 16, a picture preprocessor 18, and a communication interface 22. In a specific implementation, the encoder 20, the picture source 16, the picture preprocessor 18, and the communication interface 22 may be hardware components in the source device 12 or may be software programs in the source device 12. The descriptions are as follows:
the picture source 16 may include or be any type of picture capture device for capturing, for example, real world pictures, and/or any type of picture or comment (for screen content encoding, some text on the screen is also considered part of the picture or image to be encoded), for example, a computer graphics processor for generating computer animated pictures, or any type of device for capturing and/or providing real world pictures, computer animated pictures (e.g., screen content, virtual Reality (VR) pictures), and/or any combination thereof (e.g., live (augmented reality, AR) pictures). Picture source 16 may be a camera for capturing pictures or a memory for storing pictures, picture source 16 may also include any type of (internal or external) interface for storing previously captured or generated pictures and/or for capturing or receiving pictures. When picture source 16 is a camera, picture source 16 may be, for example, an integrated camera, either local or integrated in the source device; when picture source 16 is memory, picture source 16 may be local or integrated memory integrated in the source device, for example. When the picture source 16 comprises an interface, the interface may for example be an external interface receiving pictures from an external video source, for example an external picture capturing device, such as a camera, an external memory or an external picture generating device, for example an external computer graphics processor, a computer or a server. The interface may be any kind of interface according to any proprietary or standardized interface protocol, e.g. a wired or wireless interface, an optical interface.
Wherein a picture can be regarded as a two-dimensional array or matrix of pixel elements. The pixels in the array may also be referred to as sampling points. The number of sampling points of the array or picture in the horizontal and vertical directions (or axes) defines the size and/or resolution of the picture. To represent color, three color components are typically employed, i.e., a picture may be represented as or contain three sample arrays. For example, in RBG format or color space, the picture includes corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance/chrominance format or color space, e.g., for a picture in YUV format, comprising a luminance component indicated by Y (which may sometimes also be indicated by L) and two chrominance components indicated by U and V. The luminance (luma) component Y represents the luminance or grayscale level intensity (e.g., the same in a grayscale picture), while the two chrominance (chroma) components U and V represent the chrominance or color information components. Accordingly, a picture in YUV format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (U and V). Pictures in RGB format may be converted or transformed into YUV format and vice versa, a process also known as color transformation or conversion. If the picture is black and white, the picture may include only an array of luma samples. In the present embodiment, the picture transmitted by the picture source 16 to the picture processor may also be referred to as the original picture data 17.
A picture preprocessor 18 for receiving the original picture data 17 and performing preprocessing on the original picture data 17 to obtain a preprocessed picture 19 or preprocessed picture data 19. For example, the preprocessing performed by the picture preprocessor 18 may include truing, color format conversion (e.g., from RGB format to YUV format), toning, or denoising.
Encoder 20 (or video encoder 20) receives pre-processed picture data 19, and processes pre-processed picture data 19 using an associated prediction mode (e.g., a prediction mode in various embodiments herein) to provide encoded picture data 21 (details of the structure of encoder 20 will be described further below based on fig. 2 or fig. 4 or fig. 5). Communication interface 22 may be used to receive encoded picture data 21 and may transmit encoded picture data 21 over link 13 to destination device 14 or any other device (e.g., memory) for storage or direct reconstruction, which may be any device for decoding or storage. Communication interface 22 may be used, for example, to encapsulate encoded picture data 21 into a suitable format, such as a data packet, for transmission over link 13.
Destination device 14 includes a decoder 30, and alternatively destination device 14 may also include a communication interface 28, a picture post-processor 32, and a display device 34. The descriptions are as follows:
Communication interface 28 may be used to receive encoded picture data 21 from source device 12 or any other source, such as a storage device, such as an encoded picture data storage device. The communication interface 28 may be used to transmit or receive encoded picture data 21 via a link 13 between the source device 12 and the destination device 14, such as a direct wired or wireless connection, or via any type of network, such as a wired or wireless network or any combination thereof, or any type of private and public networks, or any combination thereof. Communication interface 28 may, for example, be used to decapsulate data packets transmitted by communication interface 22 to obtain encoded picture data 21.
Both communication interface 28 and communication interface 22 may be configured as unidirectional communication interfaces or bidirectional communication interfaces and may be used, for example, to send and receive messages to establish connections, to acknowledge and to exchange any other information related to the communication link and/or to the transmission of data, for example, encoded picture data transmissions.
Decoder 30 (or referred to as decoder 30) for receiving encoded picture data 21 and providing decoded picture data 31 or decoded picture 31 (details of the structure of decoder 30 will be described below further based on fig. 3 or fig. 4 or fig. 5). In some embodiments, decoder 30 may be used to perform various embodiments described below to enable application of the video decoding methods described herein on the decoding side.
A picture post-processor 32 for performing post-processing on the decoded picture data 31 (also referred to as reconstructed slice data) to obtain post-processed picture data 33. The post-processing performed by the picture post-processor 32 may include: color format conversion (e.g., from YUV format to RGB format), toning, truing, or resampling, or any other process, may also be used to transmit post-processed picture data 33 to display device 34.
A display device 34 for receiving the post-processed picture data 33 for displaying pictures to, for example, a user or viewer. The display device 34 may be or include any type of display for presenting reconstructed pictures, for example, an integrated or external display or monitor. For example, the display may include a liquid crystal display (liquid crystal display, LCD), an organic light emitting diode (organic light emitting diode, OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (liquid crystal on silicon, LCoS), a digital light processor (digital light processor, DLP), or any other type of display.
Although fig. 1A depicts source device 12 and destination device 14 as separate devices, device embodiments may also include the functionality of both source device 12 and destination device 14, or both, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such embodiments, the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality may be implemented using the same hardware and/or software, or using separate hardware and/or software, or any combination thereof.
It will be apparent to those skilled in the art from this description that the functionality of the different units or the existence and (exact) division of the functionality of the source device 12 and/or destination device 14 shown in fig. 1A may vary depending on the actual device and application. Source device 12 and destination device 14 may comprise any of a variety of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, mobile phone, smart phone, tablet or tablet computer, video camera, desktop computer, set-top box, television, camera, in-vehicle device, display device, digital media player, video game console, video streaming device (e.g., content service server or content distribution server), broadcast receiver device, broadcast transmitter device, etc., and may not use or use any type of operating system.
Encoder 20 and decoder 30 may each be implemented as any of a variety of suitable circuits, such as, for example, one or more microprocessors, digital signal processors (digital signal processor, DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware or any combinations thereof. If the techniques are implemented in part in software, an apparatus may store instructions of the software in a suitable non-transitory computer-readable storage medium and may execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors.
In some cases, the video encoding and decoding system 10 shown in fig. 1A is merely an example, and the techniques of this disclosure may be applicable to video encoding settings (e.g., video encoding or video decoding) that do not necessarily involve any data communication between encoding and decoding devices. In other examples, the data may be retrieved from local memory, streamed over a network, and the like. The video encoding device may encode and store data to the memory and/or the video decoding device may retrieve and decode data from the memory. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but instead only encode data to memory and/or retrieve data from memory and decode data.
Referring to fig. 1B, fig. 1B is an illustration of an example of a video coding system 40 including encoder 20 of fig. 2 and/or decoder 30 of fig. 3, according to an example embodiment, video coding system 40 may implement a combination of the various techniques of the embodiments of the present application. In the illustrated embodiment, video coding system 40 may include an imaging device 41, an encoder 20, a decoder 30 (and/or a video codec implemented via logic 47), an antenna 42, one or more processors 43, one or more memories 44, and/or a display device 45.
As shown in fig. 1B, the imaging device 41, the antenna 42, the logic circuit 47, the encoder 20, the decoder 30, the processor 43, the memory 44, and/or the display device 45 can communicate with each other. As discussed, although video coding system 40 is depicted with encoder 20 and decoder 30, in different examples, video coding system 40 may include only encoder 20 or only decoder 30.
In some examples, antenna 42 may be used to transmit or receive an encoded bitstream of video data. Additionally, in some examples, display device 45 may be used to present video data. In some examples, logic circuitry 47 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like. Video coding system 40 may also include an optional processor 43, which optional processor 43 may similarly include ASIC logic, a graphics processor, a general purpose processor, and the like. In some examples, logic 47 may be implemented in hardware, such as video encoding dedicated hardware, processor 43 may be implemented in general purpose software, an operating system, or the like. In addition, the memory 44 may be any type of memory, such as volatile memory (e.g., static random access memory (static random access memory, SRAM), dynamic random access memory (dynamic random access memory, DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.), and the like. In a non-limiting example, the memory 44 may be implemented by an overspeed cache. In some examples, logic circuitry 47 may access memory 44 (e.g., for implementing an image buffer). In other examples, logic 47 may include memory (e.g., a buffer, etc.) for implementing an image buffer, etc.
In some examples, encoder 20 implemented by logic circuitry may include an image buffer (e.g., implemented by memory 44) and a graphics processing unit. The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include encoder 20 implemented by logic circuitry 47 to implement the various modules discussed with reference to fig. 2 and/or any other encoder system or subsystem described herein. Logic circuitry may be used to perform various operations discussed herein.
In some examples, decoder 30 may be implemented in a similar manner by logic circuit 47 to implement the various modules discussed with reference to decoder 30 of fig. 3 and/or any other decoder system or subsystem described herein. In some examples, decoder 30 implemented by logic circuitry may include an image buffer (implemented by processing unit 2820 or memory 44) and a graphics processing unit. The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include decoder 30 implemented by logic circuit 47 to implement the various modules discussed with reference to fig. 3 and/or any other decoder system or subsystem described herein.
In some examples, antenna 42 may be used to receive an encoded bitstream of video data. As discussed, the encoded bitstream may include data related to the encoded video frame, indicators, index values, mode selection data, etc., discussed herein, such as data related to the encoded partitions (e.g., transform coefficients or quantized transform coefficients, optional indicators (as discussed), and/or data defining the encoded partitions). Video coding system 40 may also include a decoder 30 coupled to antenna 42 and used to decode the encoded bitstream. The display device 45 is used to present video frames.
It should be understood that for the example described with reference to encoder 20 in the embodiments of the present application, decoder 30 may be used to perform the reverse process. Regarding signaling syntax elements, decoder 30 may be configured to receive and parse such syntax elements and decode the associated video data accordingly. In some examples, encoder 20 may entropy encode the syntax elements into an encoded video bitstream. In such examples, decoder 30 may parse such syntax elements and decode the relevant video data accordingly.
It should be noted that, the method described in the embodiment of the present application is mainly used in the image dividing process in video coding, where the process exists in both the encoder 20 and the decoder 30, and the encoder 20 and the decoder 30 in the embodiment of the present application may be, for example, corresponding to video standard protocols such as h.263, h.264, HEVV, MPEG-2, MPEG-4, VP8, VP9, or next-generation video standard protocols (such as h.266, etc.).
Referring to fig. 2, fig. 2 shows a schematic/conceptual block diagram of an example of an encoder 20 for implementing an embodiment of the present application, the encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (decoded picture buffer, DPB) 230, a prediction processing unit 260, and an entropy encoding unit 270. The prediction processing unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a mode selection unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The encoder 20 shown in fig. 2 may also be referred to as a hybrid video encoder or a video encoder according to a hybrid video codec.
For example, the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, the prediction processing unit 260 and the entropy encoding unit 270 form a forward signal path of the encoder 20, whereas for example the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (decoded picture buffer, DPB) 230, the prediction processing unit 260 form a backward signal path of the encoder, wherein the backward signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in fig. 3).
Encoder 20 receives picture 201 or an image block 203 of picture 201, e.g., a picture in a sequence of pictures forming a video or video sequence, through, e.g., input 202. Image block 203 may also be referred to as a current picture block or a picture block to be encoded, and picture 201 may be referred to as a current picture or a picture to be encoded (especially when distinguishing the current picture from other pictures in video encoding, such as previously encoded and/or decoded pictures in the same video sequence, i.e., a video sequence that also includes the current picture).
An embodiment of encoder 20 may comprise a partitioning unit (not shown in fig. 2) for partitioning picture 201 into a plurality of blocks, e.g. image blocks 203, typically into a plurality of non-overlapping blocks. The segmentation unit may be used to use the same block size for all pictures in the video sequence and a corresponding grid defining the block size, or to alter the block size between pictures or subsets or groups of pictures and to segment each picture into corresponding blocks.
In one example, prediction processing unit 260 of encoder 20 may be used to perform any combination of the above-described partitioning techniques.
Like picture 201, image block 203 is also or may be considered as a two-dimensional array or matrix of sampling points having sampling values, albeit of smaller size than picture 201. In other words, the image block 203 may comprise, for example, one sampling array (e.g., a luminance array in the case of a black-and-white picture 201) or three sampling arrays (e.g., one luminance array and two chrominance arrays in the case of a color picture) or any other number and/or class of arrays depending on the color format applied. The number of sampling points in the horizontal and vertical directions (or axes) of the image block 203 defines the size of the image block 203.
The encoder 20 as shown in fig. 2 is used for encoding a picture 201 block by block, for example, performing encoding and prediction for each image block 203.
The residual calculation unit 204 is configured to calculate a residual block 205 based on the picture image block 203 and the prediction block 265 (further details of the prediction block 265 are provided below), for example, by subtracting sample values of the prediction block 265 from sample values of the picture image block 203 on a sample-by-sample (pixel-by-pixel) basis to obtain the residual block 205 in a sample domain.
The transform processing unit 206 is configured to apply a transform, such as a discrete cosine transform (discrete cosine transform, DCT) or a discrete sine transform (discrete sine transform, DST), on the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and represent the residual block 205 in the transform domain.
The transform processing unit 206 may be used to apply integer approximations of DCT/DST, such as the transforms specified for HEVC/H.265. Such integer approximations are typically scaled by some factor compared to the orthogonal DCT transform. To maintain the norms of the forward and inverse transformed processed residual blocks, an additional scaling factor is applied as part of the transformation process. The scaling factor is typically selected based on certain constraints, e.g., the scaling factor is a tradeoff between power of 2, bit depth of transform coefficients, accuracy, and implementation cost for shift operations, etc. For example, a specific scaling factor is specified for inverse transformation by, for example, the inverse transformation processing unit 212 on the decoder 30 side (and for corresponding inverse transformation by, for example, the inverse transformation processing unit 212 on the encoder 20 side), and accordingly, a corresponding scaling factor may be specified for positive transformation by the transformation processing unit 206 on the encoder 20 side.
The quantization unit 208 is for quantizing the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized transform coefficients 209. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, n-bit transform coefficients may be rounded down to m-bit transform coefficients during quantization, where n is greater than m. The quantization level may be modified by adjusting quantization parameters (quantization parameter, QP). For example, for scalar quantization, different scales may be applied to achieve finer or coarser quantization. Smaller quantization step sizes correspond to finer quantization, while larger quantization step sizes correspond to coarser quantization. The appropriate quantization step size may be indicated by QP. For example, the quantization parameter may be an index of a predefined set of suitable quantization steps. For example, smaller quantization parameters may correspond to fine quantization (smaller quantization step size) and larger quantization parameters may correspond to coarse quantization (larger quantization step size) and vice versa. Quantization may involve division by a quantization step size and corresponding quantization or inverse quantization, e.g., performed by inverse quantization 210, or may involve multiplication by a quantization step size. Embodiments according to some standards, such as HEVC, may use quantization parameters to determine quantization step sizes. In general, the quantization step size may be calculated based on quantization parameters using a fixed-point approximation of an equation that includes division. Additional scaling factors may be introduced for quantization and inverse quantization to recover norms of residual blocks that may be modified due to the scale used in the fixed point approximation of the equation for quantization step size and quantization parameters. In one example embodiment, the inverse transformed and inverse quantized scales may be combined. Alternatively, a custom quantization table may be used and signaled from the encoder to the decoder, e.g., in a bitstream. Quantization is a lossy operation, where the larger the quantization step size, the larger the loss.
The inverse quantization unit 210 is configured to apply inverse quantization of the quantization unit 208 on the quantized coefficients to obtain inverse quantized coefficients 211, e.g., apply an inverse quantization scheme of the quantization scheme applied by the quantization unit 208 based on or using the same quantization step size as the quantization unit 208. The dequantized coefficients 211 may also be referred to as dequantized residual coefficients 211, correspond to the transform coefficients 207, although the losses due to quantization are typically different from the transform coefficients.
The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, for example, DCT or DST, to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transformed inverse quantized block 213 or an inverse transformed residual block 213.
A reconstruction unit 214 (e.g., a summer 214) is used to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, e.g., to add sample values of the reconstructed residual block 213 to sample values of the prediction block 265.
Optionally, a buffer unit 216, e.g. a line buffer 216 (or simply "buffer" 216), is used to buffer or store the reconstructed block 215 and the corresponding sample values for e.g. intra prediction. In other embodiments, the encoder may be configured to use the unfiltered reconstructed block and/or the corresponding sample values stored in the buffer unit 216 for any kind of estimation and/or prediction, such as intra prediction.
For example, embodiments of encoder 20 may be configured such that buffer unit 216 is used not only to store reconstructed blocks 215 for intra prediction 254, but also for loop filter unit 220 (not shown in fig. 2), and/or such that buffer unit 216 and decoded picture buffer unit 230 form one buffer, for example. Other embodiments may be used to use the filtered block 221 and/or blocks or samples (neither shown in fig. 2) from the decoded picture buffer 230 as an input or basis for the intra prediction 254.
The loop filter unit 220 (or simply "loop filter" 220) is used to filter the reconstructed block 215 to obtain a filtered block 221, which facilitates pixel transitions or improves video quality. Loop filter unit 220 is intended to represent one or more loop filters, such as deblocking filters, sample-adaptive offset (SAO) filters, or other filters, such as bilateral filters, adaptive loop filters (adaptive loop filter, ALF), or sharpening or smoothing filters, or collaborative filters. Although loop filter unit 220 is shown in fig. 2 as an in-loop filter, in other configurations loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221. Decoded picture buffer 230 may store the reconstructed encoded block after loop filter unit 220 performs a filtering operation on the reconstructed encoded block.
Embodiments of encoder 20 (and correspondingly loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), e.g., directly or after entropy encoding by entropy encoding unit 270 or any other entropy encoding unit, e.g., such that decoder 30 may receive and apply the same loop filter parameters for decoding.
DPB 230 may be a reference picture memory that stores reference picture data for use by encoder 20 in encoding video data. DPB 230 may be formed of any of a variety of memory devices, such as DRAM (including Synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM)), or other types of memory devices. DPB 230 and buffer 216 may be provided by the same memory device or separate memory devices. In a certain example, DPB 230 is used to store filtered block 221. The decoded picture buffer 230 may further be used to store the same current picture or other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221, of different pictures, e.g., previously reconstructed pictures, and may provide complete previously reconstructed, i.e., decoded pictures (and corresponding reference blocks and samples) and/or partially reconstructed current pictures (and corresponding reference blocks and samples), e.g., for inter prediction. In a certain example, if reconstructed block 215 is reconstructed without in-loop filtering, then DPB 230 is used to store reconstructed block 215.
The prediction processing unit 260, also referred to as block prediction processing unit 260, is adapted to receive or obtain image blocks 203 (current image blocks 203 of a current picture 201) and reconstructed slice data, e.g. reference samples of the same (current) picture from the buffer 216 and/or reference picture data 231 of one or more previously decoded pictures from the decoded picture buffer 230, and to process such data for prediction, i.e. to provide a prediction block 265, which may be an inter-predicted block 245 or an intra-predicted block 255.
The mode selection unit 262 may be used to select a prediction mode (e.g., intra or inter prediction mode) and/or a corresponding prediction block 245 or 255 used as the prediction block 265 to calculate the residual block 205 and reconstruct the reconstructed block 215.
Embodiments of mode selection unit 262 may be used to select the prediction mode (e.g., from those supported by prediction processing unit 260) that provides the best match or minimum residual (minimum residual meaning better compression in transmission or storage), or that provides the minimum signaling overhead (minimum signaling overhead meaning better compression in transmission or storage), or both. The mode selection unit 262 may be adapted to determine a prediction mode based on a rate-distortion optimization (rate distortion optimization, RDO), i.e. to select the prediction mode that provides the least rate-distortion optimization, or to select a prediction mode for which the associated rate-distortion at least meets a prediction mode selection criterion.
The prediction processing performed by an instance of encoder 20 (e.g., by prediction processing unit 260) and the mode selection performed (e.g., by mode selection unit 262) will be explained in detail below.
As described above, the encoder 20 is configured to determine or select the best or optimal prediction mode from a (predetermined) set of prediction modes. The set of prediction modes may include, for example, intra prediction modes and/or inter prediction modes.
The set of intra prediction modes may include 35 different intra prediction modes, for example, a non-directional mode such as a DC (or mean) mode and a planar mode, or a directional mode as defined in h.265, or 67 different intra prediction modes, for example, a non-directional mode such as a DC (or mean) mode and a planar mode, or a directional mode as defined in h.266 under development.
In a possible implementation, the set of inter prediction modes depends on the available reference pictures (i.e. at least part of the decoded pictures stored in the DBP 230 as described above, for example) and other inter prediction parameters, e.g. on whether the entire reference picture is used or only a part of the reference picture is used, e.g. a search window area surrounding an area of the current block, to search for the best matching reference block, and/or on whether pixel interpolation like half-pixel and/or quarter-pixel interpolation is applied, e.g. the set of inter prediction modes may comprise advanced motion vector (advanced motion vector prediction, AMVP) mode and fusion (merge) mode, for example. In particular implementations, the set of inter prediction modes may include an improved control point-based AMVP mode of an embodiment of the present application, and an improved control point-based merge mode. In one example, intra-prediction unit 254 may be used to perform any combination of the inter-prediction techniques described below.
In addition to the above prediction modes, the present embodiments may also apply skip mode and/or direct mode.
The prediction processing unit 260 may be further operative to partition the image block 203 into smaller block partitions or sub-blocks, for example, by iteratively using a quadtree partition, a binary tree partition, or a Trigeminal Tree (TT) partition, or any combination thereof, and to perform prediction for each of the block partitions or sub-blocks, for example, wherein the mode selection includes selecting a tree structure of the partitioned image block 203 and selecting a prediction mode to be applied to each of the block partitions or sub-blocks.
The inter prediction unit 244 may include a motion estimation (motion estimation, ME) unit (not shown in fig. 2) and a motion compensation (motion compensation, MC) unit (not shown in fig. 2). The motion estimation unit is used to receive or obtain a picture image block 203 (current picture image block 203 of current picture 201) and a decoded picture 231, or at least one or more previously reconstructed blocks, e.g. reconstructed blocks of one or more other/different previously decoded pictures 231, for motion estimation. For example, the video sequence may include a current picture and a previously decoded picture 31, or in other words, the current picture and the previously decoded picture 31 may be part of, or form, a sequence of pictures that form the video sequence.
For example, encoder 20 may be configured to select a reference block from a plurality of reference blocks of the same or different pictures of a plurality of other pictures, and provide the reference picture and/or an offset (spatial offset) between a position (X, Y coordinates) of the reference block and a position of a current block to a motion estimation unit (not shown in fig. 2) as an inter prediction parameter. This offset is also called Motion Vector (MV).
The motion compensation unit is used to acquire inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to acquire the inter prediction block 245. The motion compensation performed by the motion compensation unit (not shown in fig. 2) may involve fetching or generating a prediction block based on motion/block vectors determined by motion estimation (possibly performing interpolation of sub-pixel accuracy). Interpolation filtering may generate additional pixel samples from known pixel samples, potentially increasing the number of candidate prediction blocks available for encoding a picture block. Upon receiving the motion vector for the PU of the current picture block, motion compensation unit 246 may locate the prediction block to which the motion vector points in a reference picture list. Motion compensation unit 246 may also generate syntax elements associated with the blocks and video slices for use by decoder 30 in decoding the picture blocks of the video slices.
Specifically, the inter prediction unit 244 may transmit a syntax element including inter prediction parameters (e.g., indication information of an inter prediction mode selected for current block prediction after traversing a plurality of inter prediction modes) to the entropy encoding unit 270. In a possible application scenario, if the inter prediction mode is only one, the inter prediction parameter may not be carried in the syntax element, and the decoding end 30 may directly use the default prediction mode for decoding. It is appreciated that the inter prediction unit 244 may be used to perform any combination of inter prediction techniques.
The intra prediction unit 254 is used to obtain, for example, a picture block 203 (current picture block) that receives the same picture and one or more previously reconstructed blocks, for example, reconstructed neighboring blocks, for intra estimation. For example, encoder 20 may be configured to select an intra-prediction mode from a plurality of (predetermined) intra-prediction modes.
Embodiments of encoder 20 may be used to select an intra-prediction mode based on optimization criteria, such as based on a minimum residual (e.g., the intra-prediction mode that provides a prediction block 255 most similar to current picture block 203) or minimum rate distortion.
The intra prediction unit 254 is further adapted to determine an intra prediction block 255 based on intra prediction parameters like the selected intra prediction mode. In any case, after the intra-prediction mode for the block is selected, the intra-prediction unit 254 is also configured to provide the intra-prediction parameters, i.e., information indicating the selected intra-prediction mode for the block, to the entropy encoding unit 270. In one example, intra-prediction unit 254 may be used to perform any combination of intra-prediction techniques.
Specifically, the intra-prediction unit 254 may transmit a syntax element including an intra-prediction parameter (such as indication information of an intra-prediction mode selected for the current block prediction after traversing a plurality of intra-prediction modes) to the entropy encoding unit 270. In a possible application scenario, if there is only one intra prediction mode, the intra prediction parameter may not be carried in the syntax element, and the decoding end 30 may directly use the default prediction mode for decoding.
The entropy encoding unit 270 is configured to apply an entropy encoding algorithm or scheme (e.g., a variable length coding (variable length coding, VLC) scheme, a Context Adaptive VLC (CAVLC) scheme, an arithmetic coding scheme, a context adaptive binary arithmetic coding (context adaptive binary arithmetic coding, CABAC), a syntax-based context-based binary arithmetic coding (SBAC), a probability interval partitioning entropy (probability interval partitioning entropy, PIPE) coding, or other entropy encoding methods or techniques) to one or all of the quantized residual coefficients 209, inter-prediction parameters, intra-prediction parameters, and/or loop filter parameters (or not) to obtain encoded picture data 21 that may be output by the output 272 in the form of, for example, an encoded bitstream 21. The encoded bitstream may be transmitted to video decoder 30 or archived for later transmission or retrieval by video decoder 30. Entropy encoding unit 270 may also be used to entropy encode other syntax elements of the current video slice being encoded.
Other structural variations of video encoder 20 may be used to encode the video stream. For example, the non-transform based encoder 20 may directly quantize the residual signal without a transform processing unit 206 for certain blocks or frames. In another embodiment, encoder 20 may have quantization unit 208 and inverse quantization unit 210 combined into a single unit.
It should be appreciated that other structural variations of video encoder 20 may be used to encode the video stream. For example, for some image blocks or image frames, video encoder 20 may directly quantize the residual signal without processing by transform processing unit 206, and accordingly without processing by inverse transform processing unit 212; alternatively, for some image blocks or image frames, video encoder 20 does not generate residual data and accordingly does not need to be processed by transform processing unit 206, quantization unit 208, inverse quantization unit 210, and inverse transform processing unit 212; alternatively, video encoder 20 may store the reconstructed image block directly as a reference block without processing via filter 220; alternatively, quantization unit 208 and inverse quantization unit 210 in video encoder 20 may be combined together. The loop filter 220 is optional, and in the case of lossless compression encoding, the transform processing unit 206, quantization unit 208, inverse quantization unit 210, and inverse transform processing unit 212 are optional. It should be appreciated that inter-prediction unit 244 and intra-prediction unit 254 may be selectively enabled depending on the different application scenarios.
Referring to fig. 3, fig. 3 shows a schematic/conceptual block diagram of an example of a decoder 30 for implementing an embodiment of the present application. Video decoder 30 is operative to receive encoded picture data (e.g., encoded bitstream) 21, e.g., encoded by encoder 20, to obtain decoded picture 231. During the decoding process, video decoder 30 receives video data, such as an encoded video bitstream representing picture blocks of an encoded video slice and associated syntax elements, from video encoder 20.
In the example of fig. 3, decoder 30 includes entropy decoding unit 304, inverse quantization unit 310, inverse transform processing unit 312, reconstruction unit 314 (e.g., summer 314), buffer 316, loop filter 320, decoded picture buffer 330, and prediction processing unit 360. The prediction processing unit 360 may include an inter prediction unit 344, an intra prediction unit 354, and a mode selection unit 362. In some examples, video decoder 30 may perform a decoding pass that is substantially reciprocal to the encoding pass described with reference to video encoder 20 of fig. 2.
Entropy decoding unit 304 is used to perform entropy decoding on encoded picture data 21 to obtain, for example, quantized coefficients 309 and/or decoded encoding parameters (not shown in fig. 3), e.g., any or all of inter-prediction, intra-prediction parameters, loop filter parameters, and/or other syntax elements (decoded). Entropy decoding unit 304 is further configured to forward inter-prediction parameters, intra-prediction parameters, and/or other syntax elements to prediction processing unit 360. Video decoder 30 may receive syntax elements at the video stripe level and/or the video block level.
Inverse quantization unit 310 may be functionally identical to inverse quantization unit 110, inverse transform processing unit 312 may be functionally identical to inverse transform processing unit 212, reconstruction unit 314 may be functionally identical to reconstruction unit 214, buffer 316 may be functionally identical to buffer 216, loop filter 320 may be functionally identical to loop filter 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230.
The prediction processing unit 360 may include an inter prediction unit 344 and an intra prediction unit 354, where the inter prediction unit 344 may be similar in function to the inter prediction unit 244 and the intra prediction unit 354 may be similar in function to the intra prediction unit 254. The prediction processing unit 360 is typically used to perform block prediction and/or to obtain a prediction block 365 from the encoded data 21, as well as to receive or obtain prediction related parameters and/or information about the selected prediction mode (explicitly or implicitly) from, for example, the entropy decoding unit 304.
When a video slice is encoded as an intra-coded (I) slice, the intra-prediction unit 354 of the prediction processing unit 360 is used to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra-prediction mode and data from a previously decoded block of the current frame or picture. When a video frame is encoded as an inter-coded (i.e., B or P) slice, an inter-prediction unit 344 (e.g., a motion compensation unit) of prediction processing unit 360 is used to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from entropy decoding unit 304. For inter prediction, a prediction block may be generated from one reference picture within one reference picture list. Video decoder 30 may construct a reference frame list based on the reference pictures stored in DPB 330 using default construction techniques: list 0 and list 1.
The prediction processing unit 360 is configured to determine prediction information for a video block of a current video slice by parsing the motion vector and other syntax elements, and generate a prediction block for the current video block being decoded using the prediction information. In an example of the present application, prediction processing unit 360 uses some syntax elements received to determine a prediction mode (e.g., intra or inter prediction) for encoding video blocks of a video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), construction information for one or more of the reference picture lists of the slice, motion vectors for each inter-encoded video block of the slice, inter prediction state for each inter-encoded video block of the slice, and other information to decode video blocks of the current video slice. In another example of the present disclosure, the syntax elements received by video decoder 30 from the bitstream include syntax elements received in one or more of an adaptive parameter set (adaptive parameter set, APS), a sequence parameter set (sequence parameter set, SPS), a picture parameter set (picture parameter set, PPS), or a slice header.
Inverse quantization unit 310 may be used to inverse quantize (i.e., inverse quantize) the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304. The inverse quantization process may include using quantization parameters calculated by video encoder 20 for each video block in a video stripe to determine the degree of quantization that should be applied and likewise the degree of inverse quantization that should be applied.
The inverse transform processing unit 312 is configured to apply an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients in order to generate a residual block in the pixel domain.
A reconstruction unit 314 (e.g., a summer 314) is used to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365 to obtain a reconstructed block 315 in the sample domain, e.g., by adding sample values of the reconstructed residual block 313 to sample values of the prediction block 365.
Loop filter unit 320 is used (during or after the encoding cycle) to filter reconstructed block 315 to obtain filtered block 321, to smooth pixel transitions or improve video quality. In one example, loop filter unit 320 may be used to perform any combination of the filtering techniques described below. Loop filter unit 320 is intended to represent one or more loop filters, such as deblocking filters, SAO filters, or other filters, such as bilateral filters, ALF, or sharpening or smoothing filters, or collaborative filters. Although loop filter unit 320 is shown in fig. 3 as an in-loop filter, in other configurations loop filter unit 320 may be implemented as a post-loop filter.
The decoded video blocks 321 in a given frame or picture are then stored in a decoded picture buffer 330 that stores reference pictures for subsequent motion compensation.
Decoder 30 is for outputting decoded picture 31, e.g., via output 332, for presentation to a user or for viewing by a user.
Other variations of video decoder 30 may be used to decode the compressed bitstream. For example, decoder 30 may generate the output video stream without loop filter unit 320. For example, the non-transform based decoder 30 may directly inverse quantize the residual signal without an inverse transform processing unit 312 for certain blocks or frames. In another embodiment, the video decoder 30 may have an inverse quantization unit 310 and an inverse transform processing unit 312 combined into a single unit.
Specifically, in the present embodiment, the decoder 30 is used to implement the video decoding method described in the later embodiments.
It should be appreciated that other structural variations of video decoder 30 may be used to decode the encoded video bitstream. For example, video decoder 30 may generate an output video stream without processing by filter 320; alternatively, for some image blocks or image frames, the entropy decoding unit 304 of the video decoder 30 does not decode quantized coefficients, and accordingly does not need to be processed by the inverse quantization unit 310 and the inverse transform processing unit 312. Loop filter 320 is optional; and for the case of lossless compression, the inverse quantization unit 310 and the inverse transform processing unit 312 are optional. It should be appreciated that the inter prediction unit and the intra prediction unit may be selectively enabled according to different application scenarios.
It should be understood that, in the encoder 20 and the decoder 30 of the present application, the processing result for a certain link may be further processed and then output to a next link, for example, after the links such as interpolation filtering, motion vector derivation or loop filtering, the processing result for the corresponding link is further processed by performing operations such as Clip or shift.
For example, the motion vector of the control point of the current image block derived from the motion vector of the neighboring affine encoded block, or the motion vector of the sub-block of the current image block derived therefrom, may be further processed, which is not limited in this application. For example, the range of motion vectors is constrained to be within a certain bit width. Assuming that the bit width of the allowed motion vector is bitDepth, the range of motion vectors is-2 bitDepth-1 ~2 bitDepth-1 -1. If the bitDepth is 16, the value range is-32768-32767. If the bitDepth is 18, the value range is-131072 ~ 131071. For another example, the values of the motion vectors (e.g., motion vectors MV of four 4 x 4 sub-blocks within one 8 x 8 image block) are constrained such that the maximum difference between the integer parts of the four 4 x 4 sub-blocks MV does not exceed N pixels, e.g., does not exceed one pixel.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a video coding apparatus 400 (e.g., a video encoding apparatus 400 or a video decoding apparatus 400) provided in an embodiment of the present application, the video coding apparatus 400 being adapted to implement the embodiments described herein. In one embodiment, video coding device 400 may be a video decoder (e.g., decoder 30 of fig. 1A) or a video encoder (e.g., encoder 20 of fig. 1A). In another embodiment, video coding apparatus 400 may be one or more of the components described above in decoder 30 of fig. 1A or encoder 20 of fig. 1A.
The video coding apparatus 400 includes: an ingress port 410 and a receiving unit (Rx) 420 for receiving data, a processor, logic unit or Central Processing Unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an egress port 450 for transmitting data, and a memory 460 for storing data. The video decoding apparatus 400 may further include a photoelectric conversion component and an electro-optical (EO) component coupled to the inlet port 410, the receiver unit 420, the transmitter unit 440, and the outlet port 450 for the outlet or inlet of optical or electrical signals.
The processor 430 is implemented in hardware and software. Processor 430 may be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. Processor 430 is in communication with inlet port 410, receiver unit 420, transmitter unit 440, outlet port 450, and memory 460. The processor 430 includes a coding module 470 (e.g., an encoding module 470 or a decoding module 470). The encoding/decoding module 470 implements embodiments disclosed herein to implement the video decoding methods provided by embodiments of the present application. For example, the encoding/decoding module 470 implements, processes, or provides various encoding operations. Thus, substantial improvements are provided to the functionality of the video coding device 400 by the encoding/decoding module 470 and affect the transition of the video coding device 400 to different states. Alternatively, the encoding/decoding module 470 is implemented in instructions stored in the memory 460 and executed by the processor 430.
Memory 460 includes one or more disks, tape drives, and solid state drives, and may be used as an overflow data storage device for storing programs when selectively executing such programs, as well as storing instructions and data read during program execution. Memory 460 may be volatile and/or nonvolatile and may be ROM, RAM, random access memory (TCAM) and/or SRAM.
Referring to fig. 5, fig. 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 in fig. 1A, according to an example embodiment. The apparatus 500 may implement the techniques of this application. In other words, fig. 5 is a schematic block diagram of one implementation of an encoding device or decoding device (simply referred to as decoding device 500) of an embodiment of the present application. The decoding device 500 may include, among other things, a processor 510, a memory 530, and a bus system 550. The processor is connected with the memory through the bus system, the memory is used for storing instructions, and the processor is used for executing the instructions stored by the memory. The memory of the decoding device stores program code, and the processor may invoke the program code stored in the memory to perform the various video encoding or decoding methods described herein. To avoid repetition, a detailed description is not provided herein.
In the present embodiment, the processor 510 may be a central processing unit (central processing unit, CPU), and the processor 510 may also be other general purpose processors, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 530 may include a ROM device or a RAM device. Any other suitable type of storage device may also be used as memory 530. Memory 530 may include code and data 531 accessed by processor 510 using bus 550. The memory 530 may further include an operating system 533 and an application 535, the application 535 including at least one program that allows the processor 510 to perform the video encoding or decoding methods described herein (particularly the video decoding methods described herein). For example, applications 535 may include applications 1 through N, which further include video encoding or decoding applications (simply video coding applications) that perform the video encoding or decoding methods described herein.
The bus system 550 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. For clarity of illustration, the various buses are labeled in the figure as bus system 550.
Optionally, the decoding device 500 may also include one or more output devices, such as a display 570. In one example, the display 570 may be a touch sensitive display that incorporates a display with a touch sensitive unit operable to sense touch input. A display 570 may be connected to processor 510 via bus 550.
The source device 12 and the destination device 14 shown in fig. 1A, the video encoding system 40 shown in fig. 1B, and any one of the video decoding devices described in fig. 4 and 5 may adopt a QT division method, a BT division method, an EQT division method, and the like in the video encoding process.
Wherein QT is a tree structure, meaning that a node may be divided into four sub-nodes. The existing video coding standard adopts a CTU division mode based on a quadtree: the CTU is used as a root node, and each node corresponds to a square area; a node may be divided no longer (where the area it corresponds to is a CU), or divided into four next-level nodes, i.e., the square area is divided into four square areas of the same size (each of which is half the length and width of the area before division), each area corresponding to a node, as shown in fig. 6 (a).
BT is a tree structure, meaning that a node can be divided into two children. In the existing coding method adopting the binary tree, the node on one binary tree structure can be not divided, or the node is divided into two nodes of the next level. There are two ways to divide into two nodes: 1) The HBT divides the area corresponding to the node into an upper area and a lower area of the same size, each area corresponding to one node, as shown in (b) of fig. 6; or 2) VBT, divide the area corresponding to the node into two areas with the same size, namely left and right, each area corresponds to a node, as shown in (c) of FIG. 6.
EQT is an I-shaped partition structure in which a node is divided into four sub-nodes. There are two ways to divide into four nodes: 1) HEQT divides the area corresponding to the node into an upper area, a middle area and a lower area, each area corresponds to one node, wherein the heights of the upper area, the middle area, the left area, the middle area and the right area are respectively 1/4, 1/2 and 1/4 of the height of the node, and the widths of the middle area, the middle area and the middle area are respectively 1/2 and 1/2 of the height of the node, as shown in (d) of fig. 6; or 2) VEQT divides the area corresponding to the node into three areas of left, middle, upper, middle and lower and right, wherein each area corresponds to one node, the widths of the left, middle, upper, middle and lower and right areas are respectively 1/4, 1/2 and 1/4 of the height of the node, and the widths of the middle, middle and lower areas are respectively 1/2 and 1/2 of the height of the node, as shown in (e) of fig. 6. In the existing coding method adopting the extended quadtree, a node on the extended quadtree structure can be not divided, or the node can be continuously divided into nodes of the next level according to the BT or EQT mode.
The h.265 video coding standard partitions a frame of pictures into Coding Tree Units (CTUs) that do not overlap with each other, and the size of the CTUs can be set to 64×64 (the size of the CTU can also be set to other values, such as 128×128 or 256×256 CTU size increase in jfet reference software JEM). A 64 x 64 CTU comprises a rectangular matrix of pixels consisting of 64 columns of 64 pixels each, each pixel comprising a luminance component or/and a chrominance component. The CTU dividing method using QT recursively divides the CTU into a plurality of leaf nodes (root) according to the division of the quadtree with the CTU as the root node of the quadtree. A node corresponds to an image region, and if the node is not divided, the node is called a leaf node, and the image region corresponding to the node forms a CU; if the nodes continue to divide, the image area corresponding to the nodes is divided into four areas with the same size (the length and the width of the image area are half of the divided areas respectively), each area corresponds to one node, and whether the nodes are still divided needs to be determined respectively. At the decoding end, whether a node is divided is indicated by a division flag bit split_cu_flag corresponding to the node in the code stream. One node a is divided into 4 nodes Bi at a time, i=0, 1,2,3, bi is called child node of a, and a is called parent node of Bi. The quadtree level (qtDepth) of the root node is 0, and the quadtree level of the node is the quadtree level of the parent node of the node plus 1. For simplicity of description, the size and shape of the node hereinafter refers to the size and shape of the image area to which the node corresponds.
For example, for a 64×64 CTU node (quadtree level 0), it may be selected to be undivided, 1 64×64 CU, or 4 32 nodes (quadtree level 1) according to its corresponding split_cu_flag. Each of the four 32×32 nodes may further select to continue dividing or not dividing according to the split_cu_flag corresponding to the node; if a 32×32 node continues to divide, four 16×16 nodes are generated (quadtree level 2). And so on until all nodes are no longer partitioned, such that a CTU is partitioned into a set of CUs. The smallest size (size) of a CU is identified in the sequence parameter set (Sequence Parameter Set, SPS), e.g. 8 x 8 is the smallest CU. In the recursive partitioning described above, if a node is equal to the minimum CU size (minimum CU size), the node defaults to no longer partitioning and does not need to include its partition flag in the code stream. When it is resolved that a node is a leaf node, the leaf node is a CU, and the decoding end device further parses coding information (including information such as a prediction mode and a transform coefficient of the CU, for example, a coding_unit () syntax structure in h.265) corresponding to the CU, and then performs decoding processing such as prediction, dequantization, inverse transform, loop filtering, and the like on the CU according to the coding information, to generate a reconstructed image corresponding to the CU. The quadtree structure enables CTUs to be partitioned into a set of CUs of suitable size based on image locality characteristics, e.g., smooth regions partitioned into larger CUs and texture rich regions partitioned into smaller CUs.
The multipurpose video coding test model (versatile video coding test model, VTM) reference software adds a Binary Tree (BT) dividing mode and a Ternary Tree (TT) dividing mode on the basis of quadtree dividing. Among these, VTM is a new codec reference software developed by the jfet organization. Fig. 7 gives an example of dividing one CTU into 16 CUs of a to p, etc. using QT-MTT. Each endpoint in the right diagram of fig. 7 represents a node, 4 lines from a node represent a quadtree partition, 2 lines from a node represent a binary tree partition, and 3 lines from a node represent a trigeminal tree partition. The solid line represents QT division, the dotted line represents a first layer division of Multi-Type Tree (MTT), and the dash-dot line represents a second layer division of MTT. a to p are 16 MTT leaf nodes, each MTT leaf node being 1 CU. One CTU obtains a CU partition map as shown in the left diagram of fig. 7 according to the partition manner of the right diagram of fig. 7.
In the QT-MTT partitioning scheme, each CU has a QT level (QT depth, also called QT depth) and an MTT level (multi-type tree depth, also called MTT depth). The QT level represents the QT level of the QT leaf node to which the CU belongs, and the MTT level represents the MTT level of the MTT leaf node to which the CU belongs. The QT level of the root node of the coding tree is 0 and the mtt level is 0. If one node on the coding tree uses QT division, the QT level of the sub-node obtained by division adds 1 to the QT level of the node, and the MTT level is unchanged; similarly, if a node on the coding tree uses MTT partitioning (i.e., one of BT or TT partitioning), the MTT level of the sub-node obtained by the partitioning adds 1 to the MTT level of the node, and the qt level is unchanged. For example, the QT level of a, b, c, d, e, f, g, i, j in fig. 7 is 1 and the mtt level is 2; the QT level of h is 1 and the mtt level is 1; the QT level of n, o and p is 2, and the MTT level is 0; the QT level for l, m is 2 and the mtt level is 1. If the CTU is divided into only one CU, then the QT level of this CU is 0 and the mtt level is 0.
In the AVS3, a QT cascading BT/EQT dividing mode is used, namely, nodes on a first-stage coding tree can only be divided into child nodes by QT, and leaf nodes of the first-stage coding tree are root nodes of a second-stage coding tree; nodes on the second level encoding tree may be partitioned into child nodes using one of BT or EQT partitioning; leaf nodes of the second-level coding tree are coding units. It should be noted that when the leaf node is in BT or EQT partition mode, the leaf node can only use BT or EQT partition mode, but not QT mode.
After the above-mentioned various divisions, the image blocks at leaf node positions under the coding tree are used as coding units, and video coding mainly includes links such as Intra Prediction (Intra Prediction), inter Prediction (Inter Prediction), transformation (Transform), quantization (Quantization), entropy coding (Entropy encoding), in-loop filtering (mainly deblocking filtering, de-blocking filtering), and the like. The image is divided into encoded blocks, then intra-frame prediction or inter-frame prediction is performed, and after residual errors are obtained, transformation quantization is performed, and finally entropy encoding is performed and a code stream is output. Here, the code block is an array of m×n size (M may or may not be equal to N) composed of pixels, and the pixel values of the respective pixel positions are known.
Intra prediction refers to predicting pixel values of pixels in a current coding block using pixel values of pixels in a reconstructed region in a current image.
Inter prediction is to find a matching reference block for a current coding block in a current image in a reconstructed image, thereby obtaining motion information of the current coding block, and then calculate prediction information or prediction values (hereinafter, no more distinguishing information and values) of pixel values of pixel points in the current coding block according to the motion information. Among them, the process of calculating motion information is called motion estimation (Motion estimation, ME), and the process of calculating a predicted value of a pixel point in the current coding block is called motion compensation (Motion compensation, MC).
It should be noted that the motion information of the current coding block includes indication information of a prediction direction (usually, forward prediction, backward prediction or bi-prediction), one or two Motion Vectors (MVs) pointing to the Reference block, and indication information of an image where the Reference block is located (usually, reference frame index).
Forward prediction refers to the selection of a reference picture from a set of forward reference pictures for the current coding block to obtain a reference block. Backward prediction refers to the selection of a reference picture from a set of backward reference pictures by the current coding block to obtain a reference block. Bi-prediction refers to the selection of one reference picture from each of the forward and backward reference picture sets to obtain a reference block. When the bi-prediction method is used, the current coding block has two reference blocks, each of which needs a motion vector and a reference frame index to indicate, and then a predicted value of a pixel point in the current block is determined according to the pixel values of the pixel points in the two reference blocks.
The motion estimation process requires that multiple reference blocks be tried in a reference picture for the current coding block, and which reference block or blocks to use as prediction is determined ultimately using Rate-distortion optimization (Rate-distortion optimization, RDO) or other methods.
After obtaining prediction information by intra-frame prediction or inter-frame prediction, subtracting the corresponding prediction information from the pixel value of the pixel point in the current coding block to obtain residual information, transforming the residual information by using methods such as discrete cosine transform (Discrete Cosine Transformation, DCT) and the like, and obtaining a code stream by using quantization entropy coding. The prediction signal is further filtered after being added with the reconstructed residual signal, so as to obtain a reconstructed signal, and the reconstructed signal is used as a reference signal for subsequent coding.
Decoding then corresponds to the inverse of encoding. For example, the residual information is first inverse quantized using entropy decoding, and the code stream is decoded to determine whether intra-or inter-prediction is used for the current encoded block. If the prediction is intra-frame prediction, the pixel values of the pixel points in the surrounding reconstructed area are utilized to construct prediction information according to the used intra-frame prediction method. If inter prediction, motion information needs to be resolved, and a reference block is determined in the reconstructed image using the resolved motion information, and the pixel value of the pixel point in the block is used as prediction information, which is called motion compensation (Motion compensation, MC). The reconstruction information can be obtained by filtering the prediction information plus the residual information.
Referring to fig. 8, the present application provides an image division method applied to a video encoding (including encoding and decoding) process, which may be performed by the source device 12, the destination device 14, the video encoder 20, the video decoder 30, the video decoding device 400, or the video decoding device 500. The method mainly comprises the following steps:
s801: and acquiring block information of the current image block.
The current image block may be an image block divided by the current image and corresponds to a node on a coding tree of the current image, and the current image block may also be an LCU (for example, a CTU in the HEVC standard) of the current image, may also be a sub-block divided by taking the LCU as a root node, or may also be a sub-block of a next level divided by taking a sub-block of a certain level as a root node.
The block information of the current image block may include size information of the current image block, such as a width of the current image block, a height of the current image block, or an area obtained based on the width and the height of the current image block. The block information of the current image block may further include coordinates of a pixel point in the current image block, for example, coordinates of a pixel point in the current image block in an image coordinate system, where an origin of the image coordinate system is a pixel point of an upper left vertex of an image in which the current image block is located, a horizontal axis of the image coordinate system is a width direction (x-axis) of the image in which the current image block is located, and a vertical axis of the image coordinate system is a height direction (y-axis) of the image in which the current image block is located. Further, the block information of the current image may further include other image related information corresponding to the current image block, for example, whether the current image block exceeds the boundary of the current image, and for the video decoding end device, the block information may be parsed or derived from the code stream of the current image.
Specifically, whether the current image block exceeds the boundary of the image where the current image block is located can be determined by the following method: obtaining coordinates (x, y) of a pixel point in the current image block according to the block information of the image block; judging whether coordinates (x, y) of the pixel points meet preset conditions, if the coordinates (x, y) of the pixel points meet the first preset conditions, indicating that the current image block exceeds the right boundary of the image where the current image block is located, if the coordinates (x, y) of the pixel points meet the second preset conditions, indicating that the image block exceeds the lower boundary of the image where the current image block is located, if the coordinates (x, y) of the pixel points meet the third preset conditions, indicating that the current image block exceeds the right boundary of the image where the current image block is located and exceeds the lower boundary of the current image (right lower boundary for short), and if the coordinates (x, y) of the pixel points meet the fourth preset conditions, indicating that the current image block exceeds the boundary of the image where the current image block is located, namely, the picture possibly exceeds the lower boundary of the image, or exceeds the right lower boundary of the image. In addition, if the coordinates (x, y) of the pixel point meet the fourth preset condition, but do not meet the first preset condition and the second preset condition, the current image block is indicated to exceed the lower right boundary of the image where the current image block is located.
The selected pixel points are used for representing the current image block, and specific pixel points in the current image block can be selected to represent the current image block, for example, a pixel point of a vertex of the current image block, such as a pixel point of an upper left vertex, a pixel point of an upper right vertex, a pixel point of a lower left vertex or a pixel point of a lower right vertex, and of course, a pixel point of a central position of the current image block can be selected, and any pixel point except the above pixel points in the current image block can be selected. The first preset condition, the second preset condition, the third preset condition and the fourth preset condition can be determined according to the position of the selected pixel point and the size of the image where the current image block is located.
Further, when the coordinates (x, y) of the selected pixel point are the coordinates of the pixel point of the top left vertex in the current image block relative to the pixel position of the top left vertex of the image where the current image block is located, the first preset condition is: coordinates (x, y) of the pixel point meet that x+width > PicWidth, and y+height is less than or equal to PicHeight; the second preset condition is: coordinates (x, y) of the pixel point meet that x+width is less than or equal to PicWidth, and y+height is greater than PicHeight; the third preset condition is: coordinates (x, y) of the pixel point satisfy x+width > PicWidth, and y+height > PicHeight; the fourth preset condition is: the coordinates (x, y) of the pixel point satisfy x+width > PicWidth, or y+height > PicHeight. Where width is the width of the current image block, height is the height of the current image block, picWidth is the width of the image where the current image block is located, and PicHeight is the height of the image where the current image block is located.
S802: and determining available division modes from the candidate division mode set according to the acquired block information.
The candidate partition mode set includes, but is not limited to, one or more of a non-partition mode, a horizontal binary tree HBT partition mode, a vertical binary tree VBT partition mode, a horizontal expansion quadtree HEQT partition mode, a vertical expansion quadtree VEQT partition mode and a quadtree QT partition mode.
S803: and determining the dividing mode of the current image block from the determined available dividing modes.
For the decoding end device, the dividing mode of the current image block can be determined from the determined available dividing modes in the following modes: when the available division mode is one, determining the available division mode as the division mode of the current image block; when the available dividing modes are multiple, analyzing the code stream comprising the current image block according to the determined available dividing modes, and determining the dividing modes of the current image block according to the analysis result.
Specifically, the available division modes are determined by comparing the size of the current image block with the division constraint conditions corresponding to the candidate division modes, and if the size of the current image block meets the division constraint conditions corresponding to the candidate division modes, the candidate division modes are available. If the QT partition mode is available and all the partition modes except the QT partition mode in the candidate partition mode set are not available, the partition mode of the current image block is the QT partition mode. If the QT partitioning mode is available and at least one partitioning mode other than the QT partitioning mode in the candidate partitioning mode set is available, the code stream is analyzed to determine the partitioning mode of the current image block. If the non-division mode is available and all the division modes except the non-division mode and the QT division mode in the candidate division mode set are not available, the division mode of the current image block is the non-division mode. If the non-partitioning mode is available and at least one partitioning mode other than the non-partitioning mode and the QT partitioning mode in the candidate partitioning mode set is available, analyzing the code stream to determine the partitioning mode of the current image block.
For example, the decoding end device parses a binary tree extension quadtree flag from the code stream, where a value of 1 for the bet_split_flag indicates that binary tree extension quadtree division should be used for image division, and a value of 0 indicates that binary tree extension quadtree row division should not be performed. If the value of the bet_split_flag is 1, continuing to analyze the identification bet_split_type_flag for indicating the division type of the current image block, wherein the value of the bet_split_type_flag is 0, which indicates that a BT division mode should be used when binary tree expansion quadtree division is performed, and the value of the bet_split_type_flag is 1, which indicates that an EQT division mode should be used when binary tree expansion quadtree division is performed; the reparse flag for indicating the partition direction of the current image block, where the value of the flag bet_split_dir_flag is 1 indicates that vertical partition should be used when binary tree expansion quadtree partitioning is performed, and the value of the flag bet_split_dir_flag is 0 indicates that horizontal partition should be used when binary tree expansion quadtree partitioning is performed.
For the encoding end device, the dividing mode of the current image block can be determined from the determined available dividing modes in the following modes: when the available division mode is one, determining the available division mode as the division mode of the current image block; when the available division modes are multiple, determining the rate distortion cost (ratio distortion cost) of each available division mode respectively, and determining the available division mode with the minimum rate distortion cost in the available division modes as the division mode of the current image block.
S804: and obtaining one CU or a plurality of CUs from the current image block according to the dividing mode of the current image block. Wherein the aspect ratio of each CU satisfies the maximum height ratio of the set CU.
When the dividing mode of the current image block is a non-dividing mode, the current image block is a CU; when the dividing mode of the current image block is any dividing mode except the non-dividing mode, dividing the current image block according to the dividing mode of the current image block, if at least one side length of the sub-block obtained by dividing is T, T is 4 or 8, the sub-block is a CU, otherwise, repeating the steps S802 and S803 for the sub-block, continuing to determine the dividing mode, and recursively dividing the current image block into a plurality of CUs. Further, the maximum aspect ratio of the set CU may be 4 or 8.
In step S802, based on the block information, an available partitioning method is determined from the candidate partitioning method set, including, but not limited to, one or more of the following:
according to the first mode, whether the current image block meets the first condition is judged according to the block information, and when the current image block meets the first condition, the VBT dividing mode is determined to be an available dividing mode. The first condition is that width > height is MaxPartRatio, width is the width of the current image block, height is the height of the current image block, and MaxPartRatio is the maximum height ratio of the set CU. In the embodiments of the present application, "x" means multiplication.
Through the scheme, compared with the prior art, the method and the device for processing the video blocks by the VBT have the advantages that the condition of using the VBT dividing mode is relaxed, when the ratio of the width to the height of the current video block is larger than the maximum height ratio of the set CU, the VBT dividing mode can be adopted, so that video blocks (video blocks which are required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio are avoided as much as possible, and the coding performance is improved.
Judging whether the current image block meets a second condition according to the block information; and when the current image block meets the second condition, determining the HBT division mode as an available division mode. The second condition is height > width MaxPartRatio, width is width of the current image block, height is height of the current image block, maxPartRatio is maximum height ratio of the set CU.
Through the scheme, compared with the prior art, the condition of using the HBT division mode is relaxed, when the ratio of the height to the width of the current image block is larger than the maximum height ratio of the set CU, the HBT division mode can be adopted, so that the image block (the image block which is required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio is avoided as much as possible, and the coding performance is improved.
Judging whether the current image block meets the condition in the first condition set according to the block information; when the current image block meets all conditions in the first condition set, the VEQT partitioning mode is determined to be an available partitioning mode. Wherein the first set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) height ≡ MinEqtSize ≡ 2; (4) width is greater than or equal to MinEqtSize 4; (5) height 4 +.maxpartratio with; (6) height MaxPartRatio is not less than width; where width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the set maximum EQT, minEqtSize is the size of the set minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
Compared with the prior art, the method and the device have the advantages that the condition of using the VEQT division mode is contracted, so that image blocks (image blocks which are required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio are avoided as much as possible, and the coding performance is improved.
Judging whether the current image block meets the condition in the second condition set according to the block information; and when the current image block meets all conditions in the second condition set, determining that the HEQT dividing mode is an available dividing mode. Wherein the second set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) width is greater than or equal to MinEqtSize 2; (4) height ≡ MinEqtSize 4; (5) width 4 +.maxpartratio height; (6) width maxpartrio ≡height; where width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the maximum EQT, minEqtSize is the size of the minimum EQT, maxPartRatio is the maximum aspect ratio of the CU.
Compared with the prior art, the method and the device have the advantages that the condition of using the HEQT division mode is contracted, so that image blocks (image blocks which are required to be divided but cannot be divided) with the aspect ratio which does not meet the set maximum CU aspect ratio are avoided as much as possible, and the coding performance is improved.
Further, in the first to fifth modes, before determining whether the current image block satisfies the corresponding condition (or the condition set), it is further determined that the current image block is within the boundary of the image in which the current image block is located according to the block information of the current image block. Wherein, the current image block is determined to be within the boundary of the current image block by the following steps: judging whether the current image block meets a third condition according to the block information of the current image block; and when the current image block meets the third condition, determining that the current image block is in the boundary of the current image block. Wherein the third condition is: (x0+width). Ltoreq.PicWidth, and (y0+height). Ltoreq.PicHeight, x0 is the abscissa of the pixel point of the top left vertex of the current image block in the image coordinate system, y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the abscissa of the image coordinate system is the width direction of the image where the current image block is located, the ordinate of the image coordinate system is the height direction of the image where the current image block is located, picWidth is the width of the image where the current image block is located, picHeight is the height of the image where the current image block is located, as shown in FIG. 9.
In a specific implementation, the first to fifth modes may be implemented by the coding tree definition syntax shown in table 2, where a part different from the coding tree definition adopted in the prior art is mainly shown in table 2, and the other part may refer to the coding tree definition syntax shown in table 1.
Table 2 one of the coding tree definition syntax provided herein
When the current image block exceeds the boundary of the image where the current image block is located, the available division modes in the candidate partitionable mode set can be determined by adopting a mode in the prior art, for example, when the current image block exceeds the boundary of the image where the current image block is located, whether the available division modes in the candidate partitionable mode set are available or not can be determined by adopting a coding tree definition grammar as shown in table 1.
When MaxBTSize and MaxEqtSize are set to be less than 64, the n×64 or 64×n (N < 64) images obtained by dividing the boundary LCU cannot be divided continuously according to the existing coding tree definition syntax, and coding performance is greatly affected. For example, when MaxBTSize and MaxEqtSize are both set to 8, the 16×64 block generated by division in the boundary CTU cannot be divided further, and for example, the 64×64 block generated by BT division in the boundary LCU cannot be divided further. In order to solve the problem, the image dividing method further includes determining that the current image block exceeds the boundary of the image where the current image block is located according to the block information of the current image block, and judging whether the QT dividing mode is an available dividing mode according to the block information of the current image block, the set maximum BT size and the set maximum EQT size.
The method specifically can determine that the current image block exceeds the boundary of the image where the current image block is located by the following steps: judging whether the current image block meets a fourth condition according to the block information of the current image block; and when the current image block meets the fourth condition, determining that the current image block exceeds the boundary of the current image block. Wherein the fourth condition is: (x0+width) > PicWidth, and (y0+height) > PicHeight, wherein x0 is the abscissa of the pixel point of the top left vertex of the current image block in the image coordinate system, y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, the vertical axis of the image coordinate system is the height direction of the image where the current image block is located, picWidth is the width of the image where the current image block is located, and PicHeight is the height of the image where the current image block is located.
Specifically, when the current image block exceeds the boundary of the image in which the current image block is located, whether the QT division manner is an available division manner may be determined by any one of the following manners:
The method A comprises the steps of judging whether a current image block meets the condition in a third condition set according to block information of the image block; and if the current image block meets at least one condition in the third condition set, the QT partitioning mode is an available partitioning mode.
Wherein the third set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of the set maximum BT, maxEqtSize is the size of the set maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
The mode B is used for judging whether the current image block meets the conditions in the fourth condition set according to the block information of the image block; and if the current image block meets at least one condition in the fourth condition set, the QT partitioning mode is an available partitioning mode.
Wherein the fourth set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the image block is located and does not exceed the lower boundary of the image where the image block is located, namely the current image block exceeds the right lower boundary of the image where the current image block is located; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
In the above manner a or manner B, in the image dividing process, when the current image block exceeds the boundary of the image where the image block is located, the QT dividing manner is adopted, so as to avoid that the boundary image block is divided into the image blocks of n×64 or 64×n (N < 64), and further avoid the problem that when MaxBTSize and MaxEqtSize are set to be less than 64, the image blocks of n×64 or 64×n (N < 64) cannot be continuously divided. That is, in the image division process, when the current image block exceeds the boundary of the image where the image block is located, when the current image block satisfies any one of the above-mentioned third condition set or fourth condition set, no other division manner than the QT division manner in the candidate division manner set is available, and when the current image can only be divided by the QT division manner, it is possible to avoid the problem that the boundary image block is divided into n×64 or 64×n (N < 64) image blocks, and further, when MaxBTSize and MaxEqtSize are set to be less than 64, the n×64 or 64×n (N < 64) image blocks cannot be continuously divided.
Specifically, when the condition included in the third condition set is (1) or the conditions included in the fourth condition set are (1) and (11), it may be implemented using the coding tree definition syntax as shown in table 3; when the condition included in the third condition set is (6) or the condition included in the fourth condition set is (6) and (11), the implementation may be performed using the coding tree definition syntax as shown in table 4; when the condition included in the third condition set is (7), or the condition included in the fourth condition set is (7) and (11), the implementation may be performed using the coding tree definition syntax as shown in table 5; when the condition included in the third condition set is (9) or the condition included in the fourth condition set is (9) and (11), the implementation may be performed using the coding tree definition syntax as shown in table 6. In tables 3 to 6, mainly, portions different from the code tree definition used in the related art are shown, and other portions may refer to the code tree definition syntax shown in table 1 or the code tree definition syntax shown in table 2.
TABLE 3 coding Tree definition syntax two provided herein
/>
TABLE 4 three coding tree definition grammars provided herein
TABLE 5 coding tree definition syntax provided herein
/>
TABLE 6 five coding tree definition syntax provided herein
Further, maxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
For the decoding end device, after executing step S804, the code stream including the current image block may also be parsed to obtain decoding information of each CU, and the CU may be decoded according to the decoding information to obtain a reconstructed block. Specifically, the decoding end device analyzes the syntax element of each CU from the code stream of the image where the current image block is located, obtains the prediction information and residual information of each CU, and performs inter-frame prediction processing or intra-frame prediction processing on the CU according to the prediction mode of the CU, to obtain the inter-frame prediction image or intra-frame prediction image of the CU. And then, according to residual information of the CU, performing inverse quantization and inverse transformation on the transformation coefficient to obtain a residual image, and overlapping the residual image on a predicted image of the CU to obtain a reconstruction block of the CU.
By means of the scheme, when the current image block is divided in the video coding process, the image block can be divided into one or more CUs meeting the set CU maximum aspect ratio, the problem that the image block which is required to be divided but cannot be divided is caused due to limitation of the set CU maximum aspect ratio in the image dividing process in the prior art can be solved, and coding performance can be improved.
When MaxBTSize and MaxEqtSize are set to be less than 64, the n×64 or 64×n (N < 64) images obtained by dividing the boundary LCU cannot be divided continuously according to the existing coding tree definition syntax, and coding performance is greatly affected. For example, when MaxBTSize and MaxEqtSize are both set to 8, the 16×64 block generated by division in the boundary CTU cannot be divided further, and for example, the 64×64 block generated by BT division in the boundary LCU cannot be divided further. In order to solve this problem, referring to fig. 10, the present application also provides another image division method applied to a video encoding (including encoding and decoding) process, which may be performed by the source device 12, the destination device 14, the video encoder 20, the video decoder 30, the video decoding device 400, or the video decoding device 500. The method mainly comprises the following steps:
s1001: and acquiring block information of the current image block.
The current image block may be an image block divided by the current image and corresponds to a node on a coding tree of the current image, and the current image block may also be an LCU (for example, a CTU in the HEVC standard) of the current image, may also be a sub-block divided by taking the LCU as a root node, or may also be a sub-block of a next level divided by taking a sub-block of a certain level as a root node.
The block information of the current image block may include size information of the current image block, such as a width of the current image block, a height of the current image block, or an area obtained based on the width and the height of the current image block. The block information of the current image block may further include coordinates of a pixel point in the current image block, for example, coordinates of a pixel point in the current image block in an image coordinate system, where an origin of the image coordinate system is a pixel point of an upper left vertex of an image in which the current image block is located, a horizontal axis of the image coordinate system is a width direction (x-axis) of the image in which the current image block is located, and a vertical axis of the image coordinate system is a height direction (y-axis) of the image in which the current image block is located. Furthermore, the block information of the current image may also be other image related information corresponding to the current image block, for example, whether the current image block exceeds the boundary of the current image, and for the video decoding end device, the block information may be parsed or derived from the code stream of the current image.
The specific method for determining whether the current image block exceeds the boundary of the image in which the current image block is located may refer to the description in step S801, which is not repeated here.
S1002: and determining available division modes from the candidate division mode set according to the acquired block information. When the current image block exceeds the boundary of the image where the current image block is located, judging whether the QT partition mode in the candidate partition mode set is an available partition mode according to the block information of the current image block, the set maximum BT size and the set maximum EQT size.
The candidate partition mode set may further include, but is not limited to, one or more of a partition mode, a horizontal binary tree HBT partition mode, a vertical binary tree VBT partition mode, a horizontal extended quadtree HEQT partition mode, and a vertical extended quadtree VEQT partition mode.
When the current image block exceeds the boundary of the image where the current image block is located, a specific way of judging whether the QT division mode is an available division mode is referred to the description related to the mode a and the mode B in the first image division method, which is not repeated here.
S1003: and determining the dividing mode of the current image block from the determined available dividing modes.
Among the determined available division modes, a specific method for determining the division mode of the current image block may refer to the related description in step S803, which is not described herein.
S1004: and obtaining one CU or a plurality of CUs from the current image block according to the dividing mode of the current image block.
When the dividing mode of the current image block is a non-dividing mode, the current image block is a CU; when the dividing mode of the current image block is any dividing mode other than the non-dividing mode, dividing the current image block according to the dividing mode of the current image block, if at least one side length of the sub-block obtained by dividing is T, T is 4 or 8, the sub-block is a CU, otherwise, repeating the steps S1002 and S1003 for the sub-block, continuing to determine the dividing mode, and recursively dividing the current image block into a plurality of CUs.
For the decoding end device, after executing step S1004, the code stream including the current image block may also be parsed to obtain decoding information of each CU, and the CU may be decoded according to the decoding information to obtain a reconstructed block. Specifically, the decoding end device analyzes the syntax element of each CU from the code stream of the image where the current image block is located, obtains the prediction information and residual information of each CU, and performs inter-frame prediction processing or intra-frame prediction processing on the CU according to the prediction mode of the CU, to obtain the inter-frame prediction image or intra-frame prediction image of the CU. And then, according to residual information of the CU, performing inverse quantization and inverse transformation on the transformation coefficient to obtain a residual image, and overlapping the residual image on a predicted image of the CU to obtain a reconstruction block of the CU.
Through the scheme, when the current image block is divided in the video coding process, the QT division mode is adopted as much as possible when the current image block exceeds the boundary of the image where the image block is located, so that the image block of N multiplied by 64 or 64 multiplied by N (N < 64) is avoided from being obtained by dividing the boundary image block, and further, the problem that the image block of N multiplied by 64 or 64 multiplied by N (N < 64) cannot be continuously divided when MaxBTSize and MaxEqtSize are set to be smaller than 64 is avoided, and further, the coding performance can be improved.
Referring to fig. 11, an embodiment of the present application further provides a video encoding apparatus 1100, where the video encoding apparatus 1100 includes: an acquisition unit 1101, a determination unit 1102, and a division unit 1103.
In one possible implementation, the video encoding apparatus 1100 is used to implement an image division method as shown in fig. 8, in which,
an obtaining unit 1101 is configured to obtain block information of a current image block.
A determining unit 1102, configured to determine an available partitioning manner from the candidate partitioning manner set according to the block information acquired by the acquiring unit 1101; and determining the dividing mode of the current image block from the determined available dividing modes.
A dividing unit 1103, configured to obtain one coding unit CU or a plurality of CUs from the current image block according to the dividing manner of the current image block determined by the determining unit 1102; wherein the aspect ratio of each CU satisfies the maximum height ratio of the set CU.
Wherein the set maximum aspect ratio of the CU may be 4 or 8.
Further, the candidate partition set may include one or more of a non-partition, a horizontal binary tree HBT partition, a vertical binary tree VBT partition, a horizontal extended quadtree HEQT partition, a vertical extended quadtree VEQT partition, and a quadtree QT partition.
The determining unit 1102 is specifically configured to: judging whether the current image block meets a first condition according to the block information of the current image block; and when the current image block meets the first condition, determining the VBT dividing mode as an available dividing mode. The first condition is that width > height is MaxPartRatio, width is the width of the current image block, height is the height of the current image block, and MaxPartRatio is the maximum height ratio of the set CU.
The determining unit 1102 is specifically configured to: judging whether the current image block meets a second condition according to the block information of the current image block; when the current image block meets a second condition, determining that the HBT division mode is an available division mode; the second condition is height > width MaxPartRatio, width is width of the current image block, height is height of the current image block, maxPartRatio is maximum height ratio of the set CU.
The determining unit 1102 is specifically configured to: judging whether the current image block meets the conditions in the first condition set or not according to the block information of the current image block; when the current image block meets all conditions in the first condition set, the VEQT partitioning mode is determined to be an available partitioning mode. Wherein the first set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) height ≡ MinEqtSize ≡ 2; (4) width is greater than or equal to MinEqtSize 4; (5) height 4 +.maxpartratio with; (6) height MaxPartRatio is not less than width; where width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the set maximum EQT, minEqtSize is the size of the set minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
The determining unit 1102 is specifically configured to: judging whether the current image block meets the conditions in the second condition set according to the block information of the current image block; and when the current image block meets all conditions in the second condition set, determining that the HEQT dividing mode is an available dividing mode. Wherein the second set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) width is greater than or equal to MinEqtSize 2; (4) height ≡ MinEqtSize 4; (5) width 4 +.maxpartratio height; (6) width maxpartrio ≡height; where width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the maximum EQT, minEqtSize is the size of the minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
Further, the determining unit 1102 is further configured to: and determining that the current image block is in the boundary of the current image block according to the block information of the current image block.
The determining unit 1102 is specifically configured to: judging whether the current image block meets a third condition according to the block information of the current previous image block; and when the current image block meets a third condition, determining that the current image block is in the boundary of the current image block. Wherein the third condition is: (x0+width) is less than or equal to PicWidth, and (y0+height) is less than or equal to PicHeight; the x0 is the abscissa of the pixel point of the top left vertex of the current image block in the image coordinate system, the y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, and the vertical axis of the image coordinate system is the height direction of the image where the current image block is located; picWidth is the width of the image where the current image block is located, and PicHeight is the height of the image where the current image block is located.
Further, the determining unit 1102 is further configured to: determining that the current image block exceeds the boundary of the image where the current image block is located according to the block information of the current image block; and judging whether the QT division mode is an available division mode according to the block information, the set maximum BT size and the set maximum EQT size.
The determining unit 1102 is specifically configured to: judging whether the current image block meets the conditions in the third condition set according to the block information of the current image block; and if the current image block meets at least one condition in the third condition set, determining that the QT partitioning mode is an available partitioning mode.
Wherein the third set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of the set maximum BT, maxEqtSize is the size of the set maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
The determining unit 1102 is specifically configured to: judging whether the current image block meets the conditions in the fourth condition set according to the block information of the previous image block; and if the current image block meets at least one condition in the fourth condition set, determining that the QT partitioning mode is an available partitioning mode.
Wherein the fourth set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the image block is located and does not exceed the lower boundary of the image where the image block is located; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
Exemplary, maxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
The determining unit 1102 is specifically configured to: when the available division is one, the available division is determined as the division of the current image block.
The determining unit 1102 is specifically configured to: when the available dividing modes are multiple, analyzing the code stream comprising the current image block according to the determined available dividing modes, and determining the dividing modes of the current image block according to the analysis result.
The determining unit 1102 is specifically configured to: when the available division modes are multiple, the rate distortion cost of each available division mode is determined respectively, and the available division mode with the minimum rate distortion cost in the available division modes is determined as the division mode of the current image block.
In another possible implementation, the video encoding apparatus 1100 is used to implement an image division method as shown in fig. 9, in which,
an obtaining unit 1101 is configured to obtain block information of a current image block.
A determining unit 1102, configured to determine an available partitioning manner from the candidate partitioning manner set according to the block information acquired by the acquiring unit 1101; when the current image block exceeds the boundary of the image where the current image block is located, judging whether the QT partitioning mode is an available partitioning mode according to the block information, the set maximum BT size and the set maximum EQT size; and determining the dividing mode of the current image block from the determined available dividing modes.
The dividing unit 1103 is configured to obtain one coding unit CU or a plurality of CUs from the current image block according to the division manner of the current image block.
The determining unit 1102 is specifically configured to: judging whether the current image block meets the conditions in the first condition set or not according to the block information of the current image block; and if the current image block meets at least one condition in the first condition set, determining that the QT partitioning mode is an available partitioning mode.
Wherein the first set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of the set maximum BT, maxEqtSize is the size of the set maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
The determining unit 1102 is specifically configured to: judging whether the current image block meets the conditions in the second condition set according to the block information of the previous image block; and if the current image block meets at least one condition in the second condition set, determining that the QT partitioning mode is an available partitioning mode.
Wherein the second set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the image block is located and does not exceed the lower boundary of the image where the image block is located; width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
Exemplary, maxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
The determining unit 1102 is specifically configured to: when the available division is one, the available division is determined as the division of the current image block.
The determining unit 1102 is specifically configured to: when the available dividing modes are multiple, analyzing the code stream comprising the current image block according to the determined available dividing modes, and determining the dividing modes of the current image block according to the analysis result.
The determining unit 1102 is specifically configured to: when the available division modes are multiple, the rate distortion cost of each available division mode is determined respectively, and the available division mode with the minimum rate distortion cost in the available division modes is determined as the division mode of the current image block.
It should be noted that, each unit in the image dividing apparatus provided in the embodiment of the present application is a functional main body for implementing various execution steps included in the image dividing method of the present application, that is, a functional main body for implementing each step and expansion and deformation of each step in the image dividing method provided in the present application, specifically please refer to the description of the image dividing method herein, and for brevity, no further description is provided herein.
The division of the units in the embodiment of the application is schematic, which is merely a logic function division, and other division manners may be adopted in actual implementation. The functional modules in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc.
Referring to fig. 12, an embodiment of the present application further provides a video encoding apparatus 1200, where the video encoding apparatus 1200 includes: memory 1201 and processor 1202, memory 1201 and processor 1202 are interconnected.
In one possible embodiment, the processor 1202 is configured to invoke program code stored in the memory 1201 to perform any one of the possible embodiments of the first image segmentation method provided herein.
In another possible embodiment, the processor 1202 is configured to invoke program code stored in the memory 1201 to perform any of the possible embodiments of the second image segmentation method provided herein.
Those of skill in the art will appreciate that the functions described in connection with the various illustrative logical blocks, modules, and algorithm steps described in connection with the disclosure herein may be implemented as hardware, software, firmware, or any combination thereof. If implemented in software, the functions described by the various illustrative logical blocks, modules, and steps may be stored on a computer readable medium or transmitted as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media corresponding to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol). In this manner, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementing the techniques described herein. The computer program product may include a computer-readable medium.
By way of example, and not limitation, such computer-readable storage media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that the computer-readable storage medium and data storage medium do not include connections, carrier waves, signals, or other transitory media, but are actually directed to non-transitory tangible storage media. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The instructions may be executed by one or more processors, such as one or more Digital Signal Processors (DSPs), general purpose microprocessors, application Specific Integrated Circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor" as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logical blocks, modules, and steps described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combination codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.
The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses including a wireless handset, an Integrated Circuit (IC), or a set of ICs (e.g., a chipset). The various components, modules, or units are described in this application to emphasize functional aspects of the devices for performing the disclosed techniques but do not necessarily require realization by different hardware units. Indeed, as described above, the various units may be combined in a codec hardware unit in combination with suitable software and/or firmware, or provided by an interoperable hardware unit (including one or more processors as described above).
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (40)

1. An image dividing method applied to a video encoding process, comprising:
acquiring block information of a current image block;
determining available division modes from the candidate division mode set according to the block information; the candidate division mode set comprises one or more of a horizontal binary tree HBT division mode, a vertical binary tree VBT division mode, a horizontal expansion quadtree HEQT division mode, a vertical expansion quadtree VEQT division mode and a quadtree QT division mode;
when the current image block is in the boundary of the image where the current image block is located, determining whether the available division modes comprise one or more of a VBT division mode, an HBT division mode, a VEQT division mode and an HEQT division mode according to the block information; when the current image block is determined to exceed the boundary of the image where the current image block is located according to the block information, judging whether the QT division mode is an available division mode according to the block information, the set maximum BT size and the set maximum EQT size;
Determining the dividing mode of the current image block from the determined available dividing modes;
and obtaining one coding unit CU or a plurality of CUs from the current image block according to the dividing mode of the current image block.
2. The method of claim 1, wherein determining available partitioning from a set of candidate partitioning based on the block information comprises:
judging whether the current image block meets a first condition according to the block information;
when the current image block meets the first condition, determining that the VBT dividing mode is an available dividing mode;
the first condition is width > height > MaxPartRatio, width is the width of the current image block, height is the height of the current image block, and MaxPartRatio is the maximum height ratio of the set CU.
3. The method of claim 1, wherein determining available partitioning from a set of candidate partitioning based on the block information comprises:
judging whether the current image block meets a second condition according to the block information;
when the current image block meets the second condition, determining that the HBT division mode is an available division mode;
The second condition is height > width MaxPartRatio, width is the width of the current image block, height is the height of the current image block, and MaxPartRatio is the maximum height ratio of the set CU.
4. The method of claim 1, wherein determining available partitioning from a set of candidate partitioning based on the block information comprises:
judging whether the current image block meets the condition in a first condition set according to the block information;
when the current image block meets all conditions in the first condition set, determining that the VEQT dividing mode is an available dividing mode;
wherein the first set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) height ≡ MinEqtSize ≡ 2; (4) width is greater than or equal to MinEqtSize 4; (5) height 4 +.maxpartratio with; (6) height MaxPartRatio is not less than width; wherein width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the set maximum EQT, minEqtSize is the size of the set minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
5. The method of claim 1, wherein determining available partitioning from a set of candidate partitioning based on the block information comprises:
Judging whether the current image block meets the conditions in a second condition set according to the block information;
when the current image block meets all conditions in the second condition set, determining that the HEQT dividing mode is an available dividing mode;
wherein the second set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) width is greater than or equal to MinEqtSize 2; (4) height ≡ MinEqtSize 4; (5) width 4 +.maxpartratio height; (6) width maxpartrio ≡height; wherein width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the maximum EQT, minEqtSize is the size of the minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
6. The method of any of claims 2-5, wherein the set maximum aspect ratio of the CU is 4 or 8.
7. The method of claim 1, wherein determining that the current image block is within a boundary of an image in which the current image block is located comprises:
when the current image block meets a third condition, determining that the current image block is within the boundary of the current image block;
Wherein the third condition is: (x0+width) is less than or equal to PicWidth, and (y0+height) is less than or equal to PicHeight; the x0 is the abscissa of the pixel point of the top left vertex of the current image block in an image coordinate system, the y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, and the vertical axis of the image coordinate system is the height direction of the image where the current image block is located; width is the width of the current image block, height is the height of the current image block, picWidth is the width of the image where the current image block is located, picHeight is the height of the image where the current image block is located.
8. The method of claim 1, wherein determining whether the QT split is an available split based on the block information, a size of a maximum BT, and a size of a maximum EQT comprises:
judging whether the current image block meets the condition in a third condition set according to the block information;
If the current image block meets at least one condition in the third condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the third set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the set maximum BT size, maxEqtSize is the set maximum EQT size, and max (MaxBTSize, maxEqtSize) is the maximum of the MaxBTSize and MaxEqtSize.
9. The method of claim 1, wherein determining whether the QT split is an available split based on the block information, a size of a maximum BT, and a size of a maximum EQT comprises:
Judging whether the current image block meets the condition in a fourth condition set according to the block information;
if the current image block meets at least one condition in the fourth condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the fourth set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the current image block is located and does not exceed the lower boundary of the image where the current image block is located;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
10. The method of claim 4, 5, 8 or 9, wherein the MaxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
11. The method according to any of claims 1-5, 7-9, wherein determining the partitioning of the current image block from the determined available partitioning comprises:
and when the available division mode is one, determining the available division mode as the division mode of the current image block.
12. The method according to any of claims 1-5, 7-9, wherein determining the partitioning of the current image block from the determined available partitioning comprises:
when the available division modes are multiple, determining the rate distortion cost of the available division modes respectively, and determining the available division mode with the minimum rate distortion cost in the available division modes as the division mode of the current image block.
13. An image dividing method applied to a video encoding process, comprising:
acquiring block information of a current image block;
determining available division modes from the candidate division mode set according to the block information; wherein the candidate partition mode set comprises a quadtree QT partition mode; when the current image block exceeds the boundary of the image where the current image block is located, judging whether the QT dividing mode is an available dividing mode according to the block information, the set maximum BT size and the set maximum EQT size;
Determining the dividing mode of the current image block from the determined available dividing modes;
and obtaining one coding unit CU or a plurality of CUs from the current image block according to the dividing mode of the current image block.
14. The method of claim 13, wherein determining that the current image block exceeds a boundary of an image in which the current image block is located comprises:
when the current image block does not meet a third condition, determining that the current image block exceeds the boundary of the current image block;
wherein the third condition is: (x0+width) is less than or equal to PicWidth, and (y0+height) is less than or equal to PicHeight; the x0 is the abscissa of the pixel point of the top left vertex of the current image block in an image coordinate system, the y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, and the vertical axis of the image coordinate system is the height direction of the image where the current image block is located; width is the width of the current image block, height is the height of the current image block, picWidth is the width of the image where the current image block is located, picHeight is the height of the image where the current image block is located.
15. The method of claim 13, wherein determining whether the QT split is an available split based on the block information, a size of a maximum BT, and a size of a maximum EQT comprises:
judging whether the current image block meets the condition in a first condition set according to the block information;
if the current image block meets at least one condition in the first condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the first set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the set maximum BT size, maxEqtSize is the set maximum EQT size, and max (MaxBTSize, maxEqtSize) is the maximum of the MaxBTSize and MaxEqtSize.
16. The method of claim 13, wherein determining whether the QT split is an available split based on the block information, a size of a maximum BT, and a size of a maximum EQT comprises:
judging whether the current image block meets the conditions in a second condition set according to the block information;
if the current image block meets at least one condition in the second condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the second set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the current image block is located and does not exceed the lower boundary of the image where the current image block is located;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
17. A method according to claim 15 or 16, wherein the MaxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
18. The method according to any of claims 13-15, wherein determining the partitioning of the current image block from the determined available partitioning comprises:
and when the available division mode is one, determining the available division mode as the division mode of the current image block.
19. The method according to any of claims 13-16, wherein determining the partitioning of the current image block from the determined available partitioning comprises:
when the available division modes are multiple, determining the rate distortion cost of the available division modes respectively, and determining the available division mode with the minimum rate distortion cost in the available division modes as the division mode of the current image block.
20. An image dividing apparatus applied to video encoding, comprising:
An acquisition unit configured to acquire block information of a current image block;
a determining unit, configured to determine an available division manner from the candidate division manner set according to the block information; and determining the dividing mode of the current image block from the determined available dividing modes; the candidate division mode set comprises one or more of a horizontal binary tree HBT division mode, a vertical binary tree VBT division mode, a horizontal expansion quadtree HEQT division mode, a vertical expansion quadtree VEQT division mode and a quadtree QT division mode; when the current image block is in the boundary of the image where the current image block is located, the determining unit determines whether the available dividing mode comprises one or more of a VBT dividing mode, an HBT dividing mode, an HEQT dividing mode and a VEQT dividing mode according to the block information; when the current image block is determined to exceed the boundary of the image where the current image block is located according to the block information, judging whether the QT division mode is an available division mode according to the block information, the set maximum BT size and the set maximum EQT size;
and the dividing unit is used for obtaining one coding unit CU or a plurality of CUs from the current image block according to the dividing mode of the current image block.
21. The apparatus of claim 20, wherein the determining unit is specifically configured to:
judging whether the current image block meets a first condition according to the block information;
when the current image block meets the first condition, determining that the VBT dividing mode is an available dividing mode;
the first condition is width > height > MaxPartRatio, width is the width of the current image block, height is the height of the current image block, and MaxPartRatio is the maximum height ratio of the set CU.
22. The apparatus of claim 20, wherein the determining unit is specifically configured to:
judging whether the current image block meets a second condition according to the block information;
when the current image block meets the second condition, determining that the HBT division mode is an available division mode;
the second condition is height > width MaxPartRatio, width is the width of the current image block, height is the height of the current image block, and MaxPartRatio is the maximum height ratio of the set CU.
23. The apparatus of claim 20, wherein the determining unit is specifically configured to:
judging whether the current image block meets the condition in a first condition set according to the block information;
When the current image block meets all conditions in the first condition set, determining that the VEQT dividing mode is an available dividing mode;
wherein the first set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) height ≡ MinEqtSize ≡ 2; (4) width is greater than or equal to MinEqtSize 4; (5) height 4 +.maxpartratio with; (6) height MaxPartRatio is not less than width; wherein width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the set maximum EQT, minEqtSize is the size of the set minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
24. The apparatus of claim 20, wherein the determining unit is specifically configured to:
judging whether the current image block meets the conditions in a second condition set according to the block information;
when the current image block meets all conditions in the second condition set, determining that the HEQT dividing mode is an available dividing mode;
wherein the second set of conditions includes the following conditions: (1) width is less than or equal to MaxEqtSize; (2) height is less than or equal to MaxEqtSize; (3) width is greater than or equal to MinEqtSize 2; (4) height ≡ MinEqtSize 4; (5) width 4 +.maxpartratio height; (6) width maxpartrio ≡height; wherein width is the width of the current image block, height is the height of the current image block, maxEqtSize is the size of the maximum EQT, minEqtSize is the size of the minimum EQT, maxPartRatio is the maximum height ratio of the set CU.
25. The apparatus of any of claims 21-24, wherein the set maximum aspect ratio of the CU is 4 or 8.
26. The apparatus according to claim 20, wherein the determining unit is specifically configured to determine that the current image block is within a boundary of the current image block when it is determined that the current image block satisfies a third condition;
wherein the third condition is: (x0+width) is less than or equal to PicWidth, and (y0+height) is less than or equal to PicHeight; the x0 is the abscissa of the pixel point of the top left vertex of the current image block in an image coordinate system, the y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, and the vertical axis of the image coordinate system is the height direction of the image where the current image block is located; width is the width of the current image block, height is the height of the current image block, picWidth is the width of the image where the current image block is located, picHeight is the height of the image where the current image block is located.
27. The apparatus of claim 20, wherein the determining unit is specifically configured to:
judging whether the current image block meets the condition in a third condition set according to the block information;
if the current image block meets at least one condition in the third condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the third set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the set maximum BT size, maxEqtSize is the set maximum EQT size, and max (MaxBTSize, maxEqtSize) is the maximum of the MaxBTSize and MaxEqtSize.
28. The apparatus of claim 20, wherein the determining unit is specifically configured to:
judging whether the current image block meets the condition in a fourth condition set according to the block information;
if the current image block meets at least one condition in the fourth condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the fourth set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the current image block is located and does not exceed the lower boundary of the image where the current image block is located;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
29. The apparatus of claim 23, 24, 27 or 28, wherein the MaxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
30. The apparatus according to any of the claims 20-24, 26-28, wherein the determining unit is specifically configured to:
and when the available division mode is one, determining the available division mode as the division mode of the current image block.
31. The apparatus according to any of the claims 20-24, 26-28, wherein the determining unit is specifically configured to:
when the available division modes are multiple, determining the rate distortion cost of the available division modes respectively, and determining the available division mode with the minimum rate distortion cost in the available division modes as the division mode of the current image block.
32. An image dividing apparatus applied to a video encoding process, comprising:
an acquisition unit configured to acquire block information of a current image block;
a determining unit, configured to determine an available partition manner from a candidate partition manner set according to the block information, where the candidate partition manner set includes a quadtree QT partition manner, and when the current image block exceeds a boundary of an image where the current image block is located, determine whether the QT partition manner is the available partition manner according to the block information, a set size of a maximum BT, and a set size of a maximum EQT; and determining the dividing mode of the current image block from the determined available dividing modes;
And the dividing unit is used for obtaining one coding unit CU or a plurality of CUs from the current image block according to the dividing mode of the current image block.
33. The apparatus according to claim 32, wherein the determining unit is specifically configured to determine that the current image block exceeds a boundary where the current image block is located when it is determined that the current image block does not satisfy a third condition;
wherein the third condition is: (x0+width) is less than or equal to PicWidth, and (y0+height) is less than or equal to PicHeight; the x0 is the abscissa of the pixel point of the top left vertex of the current image block in an image coordinate system, the y0 is the ordinate of the pixel point of the top left vertex of the current image block in the image coordinate system, the origin of the image coordinate system is the pixel point of the top left vertex of the image where the current image block is located, the horizontal axis of the image coordinate system is the width direction of the image where the current image block is located, and the vertical axis of the image coordinate system is the height direction of the image where the current image block is located; width is the width of the current image block, height is the height of the current image block, picWidth is the width of the image where the current image block is located, picHeight is the height of the image where the current image block is located.
34. The apparatus of claim 32, wherein the determining unit is specifically configured to:
judging whether the current image block meets the condition in a first condition set according to the block information;
if the current image block meets at least one condition in the first condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the first set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the set maximum BT size, maxEqtSize is the set maximum EQT size, and max (MaxBTSize, maxEqtSize) is the maximum of the MaxBTSize and MaxEqtSize.
35. The apparatus of claim 32, wherein determining whether the QT split is an available split based on the block information, a size of a maximum BT, and a size of a maximum EQT comprises:
judging whether the current image block meets the conditions in a second condition set according to the block information;
if the current image block meets at least one condition in the second condition set, determining that the QT partitioning mode is an available partitioning mode;
wherein the second set of conditions includes one or more of the following conditions: (1) width > MaxBTSize, and width > MaxEqtSize; (2) height > MaxBTSize, and height > MaxEqtSize; (3) width > MaxBTSize, width > MaxEqtSize, height > MaxBTSize, and height > MaxEqtSize; (4) width > max (MaxBTSize, maxEqtSize); (5) height > max (MaxBTSize, maxEqtSize); (6) width > max (MaxBTSize, maxEqtSize), and height > max (MaxBTSize, maxEqtSize); (7) width > MaxBTSize; (8) height > MaxBTSize; (9) width > MaxEqtSize; (10) height > MaxEqtSize; (11) The current image block does not exceed the right boundary of the image where the current image block is located and does not exceed the lower boundary of the image where the current image block is located;
width is the width of the current image block, height is the height of the current image block, maxBTSize is the size of maximum BT, maxEqtSize is the size of maximum EQT, and max (MaxBTSize, maxEqtSize) is the maximum of MaxBTSize and MaxEqtSize.
36. The apparatus of claim 34 or 35, wherein the MaxEqtSize is 2 M Wherein, the value of M is 3, 4, 5 or 6.
37. The apparatus according to any of the claims 32-35, wherein the determining unit is specifically configured to:
and when the available division mode is one, determining the available division mode as the division mode of the current image block.
38. The apparatus according to any of the claims 32-35, wherein the determining unit is specifically configured to:
when the available division modes are multiple, determining the rate distortion cost of the available division modes respectively, and determining the available division mode with the minimum rate distortion cost in the available division modes as the division mode of the current image block.
39. A video encoding apparatus, comprising: a memory and a processor coupled to each other;
the processor invokes program code stored in the memory to perform the method as described in any one of claims 1-12.
40. A video encoding apparatus, comprising: a memory and a processor coupled to each other;
the processor invokes program code stored in the memory to perform the method as described in any one of claims 13-19.
CN201910377382.2A 2019-05-04 2019-05-04 Image dividing method, device and equipment Active CN111901593B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910377382.2A CN111901593B (en) 2019-05-04 2019-05-04 Image dividing method, device and equipment
PCT/CN2020/087289 WO2020224476A1 (en) 2019-05-04 2020-04-27 Image division method, apparatus and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910377382.2A CN111901593B (en) 2019-05-04 2019-05-04 Image dividing method, device and equipment

Publications (2)

Publication Number Publication Date
CN111901593A CN111901593A (en) 2020-11-06
CN111901593B true CN111901593B (en) 2024-01-02

Family

ID=73050985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910377382.2A Active CN111901593B (en) 2019-05-04 2019-05-04 Image dividing method, device and equipment

Country Status (2)

Country Link
CN (1) CN111901593B (en)
WO (1) WO2020224476A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116389763B (en) * 2023-06-05 2023-08-11 瀚博半导体(上海)有限公司 Video coding method and device based on multiple encoders

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938657A (en) * 2010-10-07 2011-01-05 西安电子科技大学 Self-adaptively dividing method for code units in high-efficiency video coding
CN108009563A (en) * 2017-10-25 2018-05-08 北京达佳互联信息技术有限公司 Image processing method, device and terminal
CN108353166A (en) * 2015-11-19 2018-07-31 韩国电子通信研究院 Method and apparatus for encoding/decoding image
CN109151468A (en) * 2017-06-28 2019-01-04 华为技术有限公司 A kind of coding of image data, coding/decoding method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101452713B1 (en) * 2009-10-30 2014-10-21 삼성전자주식회사 Method and apparatus for encoding and decoding coding unit of picture boundary
BR112015015575A2 (en) * 2013-01-30 2020-02-04 Intel Corp adaptive content partitioning for next-generation video prediction and coding
CN103702122B (en) * 2013-12-18 2017-07-21 华为技术有限公司 Coding mode selection method, device and encoder
WO2015190839A1 (en) * 2014-06-11 2015-12-17 엘지전자(주) Method and device for encodng and decoding video signal by using embedded block partitioning
CN116527945A (en) * 2017-07-17 2023-08-01 汉阳大学校产学协力团 Image encoding/decoding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938657A (en) * 2010-10-07 2011-01-05 西安电子科技大学 Self-adaptively dividing method for code units in high-efficiency video coding
CN108353166A (en) * 2015-11-19 2018-07-31 韩国电子通信研究院 Method and apparatus for encoding/decoding image
CN109151468A (en) * 2017-06-28 2019-01-04 华为技术有限公司 A kind of coding of image data, coding/decoding method and device
CN108009563A (en) * 2017-10-25 2018-05-08 北京达佳互联信息技术有限公司 Image processing method, device and terminal

Also Published As

Publication number Publication date
CN111901593A (en) 2020-11-06
WO2020224476A1 (en) 2020-11-12

Similar Documents

Publication Publication Date Title
CN111355951B (en) Video decoding method, device and decoding equipment
WO2020125595A1 (en) Video coder-decoder and corresponding method
US11924438B2 (en) Picture reconstruction method and apparatus
US11849109B2 (en) Image prediction method, apparatus, and system, device, and storage medium
CN111385572B (en) Prediction mode determining method and device, encoding device and decoding device
WO2020114394A1 (en) Video encoding/decoding method, video encoder, and video decoder
CN117241014A (en) MPM list construction method, intra-frame prediction mode acquisition method and device of chroma block
CN111355959B (en) Image block dividing method and device
CN111416981B (en) Video image decoding and encoding method and device
US11516470B2 (en) Video coder and corresponding method
WO2020253681A1 (en) Method and device for constructing merge candidate motion information list, and codec
US11902506B2 (en) Video encoder, video decoder, and corresponding methods
CN111901593B (en) Image dividing method, device and equipment
WO2020259353A1 (en) Entropy coding/decoding method for syntactic element, device, and codec
CN111726617B (en) Optimization method, device and coder-decoder for fusing motion vector difference technology
WO2020134817A1 (en) Method and device for determining prediction mode, coding device, and decoding device
CN111327894A (en) Block division method, video encoding and decoding method and video encoder and decoder
CN111294603B (en) Video encoding and decoding method and device
CN111770337B (en) Video encoding method, video decoding method and related equipment
WO2020125761A1 (en) Image block division method and device
WO2020135409A1 (en) Video decoding method and apparatus, and decoding device

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
GR01 Patent grant
GR01 Patent grant