WO2019001015A1 - Method and device for encoding and decoding image data - Google Patents

Method and device for encoding and decoding image data Download PDF

Info

Publication number
WO2019001015A1
WO2019001015A1 PCT/CN2018/078837 CN2018078837W WO2019001015A1 WO 2019001015 A1 WO2019001015 A1 WO 2019001015A1 CN 2018078837 W CN2018078837 W CN 2018078837W WO 2019001015 A1 WO2019001015 A1 WO 2019001015A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
coding tree
level coding
tree
division
Prior art date
Application number
PCT/CN2018/078837
Other languages
French (fr)
Chinese (zh)
Inventor
赵寅
杨海涛
刘杉
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019001015A1 publication Critical patent/WO2019001015A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • 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

Definitions

  • the embodiments of the present invention relate to the field of image processing, and in particular, to a method and an apparatus for encoding and decoding image data.
  • the video codec standard H.265 divides a frame of image into Coding Tree Units (CTUs) that do not overlap each other, and uses each CTU as the root node of a Quad-Tree (QT) according to QT.
  • the structure recursively divides each CTU into several leaf nodes. Each node in the QT structure corresponds to an image area. If a node is no longer divided, the node is called a leaf node, and its corresponding image area forms a coding unit (CU). Therefore, H.265 can be considered as a process of dividing a CTU into a group of CUs.
  • the division of the CTU into a group of CUs corresponds to a coding tree.
  • the Joint Exploration Team on Future Video Coding (JVET) reference software Joint Exploration Model (JEM) proposed the QTBT division method, that is, the nodes in the first-level coding tree adopt the QT division method.
  • the nodes in the second-level coding tree adopt the Binary Tree (BT) division method (the BT division method includes "horizontal dichotomy” and "vertical dichotomy”).
  • BT Binary Tree
  • the CTU is first divided according to the QT division manner to obtain a plurality of QT leaf nodes; the leaf nodes of the QT may be divided according to the BT division manner.
  • the CU shape is more diverse and can better adapt to the content of the partial image.
  • the encoding end device usually needs to calculate the Rate Distortion Cost (RD cost) for each partitioning method that the node can use, compare the calculated RD cost, and the smallest RD cost.
  • the corresponding division mode is determined as the division manner of the node. Therefore, for each node, the coding end device needs to calculate the RD cost of multiple division modes, so that the coding complexity is high.
  • the embodiment of the present application provides a method and an apparatus for encoding and decoding image data, which can solve the problem of high coding complexity.
  • a method for decoding image data After obtaining a code stream including image data, the decoding end device obtains node partitioning mode information of the first-level coding tree and a second-level coding tree by parsing the code stream.
  • the node division mode information if the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition, the decoding end device obtains the first node by parsing the code stream.
  • the coding information of the three child nodes, one child node of the first node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three child nodes of the first node, and obtain corresponding image data.
  • the root node of the first-level coding tree corresponds to one CTU
  • the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree.
  • the root node of the second level coding tree is a leaf node of the first level coding tree.
  • the decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to the first node is a tri-tree partition, and the encoding information of the three child nodes of the first node can be directly obtained, and the three child nodes of the first node need not be sequentially performed. Decoding is performed to speed up the decoding and reduce the complexity of decoding.
  • the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  • the node division manner corresponding to the first-level coding tree includes a quad-tree division
  • the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division .
  • a decoding end device in a second aspect, includes an obtaining module, a parsing module, and a decoding rebuilding module.
  • the obtaining module is configured to obtain a code stream that includes image data.
  • the parsing module is configured to parse the code stream acquired by the acquiring module, and obtain node partitioning mode information of the first-level coding tree, where the root node of the first-level coding tree corresponds to a coding tree unit CTU, and the first-level coding tree
  • the leaf node is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree, and is used for parsing the code stream to obtain the node division manner of the second-level coding tree.
  • a root node of the second-level coding tree is a leaf node of the first-level coding tree
  • information for the node division mode of the second-level coding tree indicates that the first node in the second-level coding tree corresponds to
  • the division mode is a tri-tree division
  • the code stream is parsed to obtain coding information of three child nodes of the first node, wherein one child node of the first node corresponds to one coding unit CU.
  • the decoding reconstruction module is configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
  • the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  • the node division manner corresponding to the first-level coding tree includes a quad-tree division
  • the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division .
  • a method for decoding image data After obtaining a code stream containing image data, the decoding end device obtains node partitioning mode information of the first-level coding tree and the second-level coding tree by parsing the code stream.
  • the node division mode information if the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is not continued to be divided according to the division manner of the second-level coding tree, the decoding end device
  • the node division mode information of the third-level coding tree is obtained by parsing the code stream; if the node division mode information of the third-level coding tree indicates that the division manner corresponding to the first node is a tri-tree division, the decoding end device parses the code stream,
  • the coding information of the three child nodes of the first node is obtained, and one child node of the first node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three child nodes of the first node.
  • the root node of the first-level coding tree corresponds to one CTU
  • the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree.
  • the root node of the second-level coding tree is a leaf node of the first-level coding tree
  • the first node is a root node of the third-level coding tree.
  • the decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to the first node is a tri-tree partition, and the encoding information of the three child nodes of the first node can be directly obtained, and the three child nodes of the first node need not be sequentially performed. Decoding is performed to speed up the decoding and reduce the complexity of decoding.
  • the node division manner corresponding to the first-level coding tree includes a quad-tree division
  • the node division manner corresponding to the second-level coding tree includes a binary tree division
  • the third-level coding The corresponding node division manner includes a tri-tree division.
  • a decoding end device in a fourth aspect, includes an obtaining module, a parsing module, and a decoding rebuilding module.
  • the obtaining module is configured to obtain a code stream that includes image data.
  • the parsing module is configured to parse the code stream acquired by the acquiring module, and obtain node partitioning mode information of the first-level coding tree, where the root node of the first-level coding tree corresponds to a coding tree unit CTU, and the first-level coding tree
  • the leaf node is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree, and is used for parsing the code stream to obtain the node division manner of the second-level coding tree.
  • a root node of the second-level coding tree is a leaf node of the first-level coding tree
  • information for the node division mode of the second-level coding tree indicates that the first node in the second-level coding tree corresponds to
  • the division mode is not to continue to divide according to the division manner of the second-level coding tree, and the code stream is parsed to obtain the node division manner information of the third-level coding tree, wherein the root node of the third-level coding tree is the first node, and If the node division mode information of the third-level coding tree indicates that the division manner corresponding to the first node is a tri-tree partition, the code stream is parsed, and the first node is obtained.
  • Coding information child nodes wherein a first node of the child node corresponding to one coding unit CU.
  • the decoding reconstruction module is configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
  • the node division manner corresponding to the first-level coding tree includes a quad-tree division
  • the node division manner corresponding to the second-level coding tree includes a binary tree division
  • the third-level coding The corresponding node division manner includes a tri-tree division.
  • a decoding method for image data After obtaining a code stream including image data, the decoding end device parses the code stream to obtain a trigeminal leaf for indicating whether to limit the division of the trigeminal tree to continue dividing.
  • the division mode is a tri-tree division, and the tri-tree leaf node pattern identifier indicates that the node obtained by limiting the tri-tree division continues to be divided, and the decoding end device obtains the coding information of the three child nodes of the first node by parsing the code stream, and the first node One sub-node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three sub-nodes of the first node, and obtain an image corresponding to the image data.
  • the root node of the first-level coding tree corresponds to one CTU
  • the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree.
  • the root node of the second level coding tree is a leaf node of the first level coding tree.
  • the embodiment of the present application adds a condition for restricting node division: if the division manner corresponding to the parent node of a node is a tri-tree division, the node does not continue to divide.
  • the decoding end device only needs to determine that the corresponding division manner of a certain node is a tri-tree division, and the coding information of the child node of the node can be directly obtained, and the decoding of all the child nodes of the node is not required, thereby speeding up the decoding rate. Reduced the complexity of decoding.
  • the decoding end device may determine the limitation of the node division according to the tri-tree leaf node mode identifier, thereby adaptively acquiring the node division information of each level coding tree.
  • the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  • a decoding end device in a sixth aspect, includes an obtaining module, a parsing module, and a decoding rebuilding module.
  • the obtaining module is configured to obtain a code stream that includes image data.
  • the parsing module is configured to parse the code stream acquired by the acquiring module to obtain a tri-tree leaf node mode identifier, where the tri-tree leaf node mode identifier is used to indicate whether the node obtained by limiting the tri-tree partitioning is further divided, and is used for parsing the code stream.
  • node partitioning mode information of the first-level coding tree where the root node of the first-level coding tree corresponds to one coding tree unit CTU, and the leaf node of the first-level coding tree is corresponding to the node division mode information of the first-level coding tree
  • the node division manner is indicated by the root node of the first-level coding tree, and is used for parsing the code stream to obtain node division manner information of the second-level coding tree, wherein the root node of the second-level coding tree is the first level a leaf node of the coding tree, and a node division mode information for if the second level coding tree indicates that the first node corresponding to the second level coding tree corresponds to a trinomial division, and the trigeminal leaf node mode identifier indicates a restricted trigeminal
  • the nodes obtained by the tree division continue to divide, parsing the code stream, and obtaining the coded letters of the three child nodes of the first node.
  • the decoding reconstruction module is configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
  • the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  • a method for encoding image data After determining a CTU corresponding to an image block to be encoded, the encoding end device divides the CTU according to a node division manner corresponding to the first-level coding tree, to obtain a first-level coding.
  • the coding end device determines, according to the preset condition, a division manner that the first node in the second-level coding tree can use, and the second-level coding tree
  • the root node is a leaf node of the first-level coding tree
  • the preset condition includes: if the division mode corresponding to the parent node of the first node is a tri-tree division, determining that the first node is not divided; if the first node can use the division manner
  • the encoding end device encodes the coding unit corresponding to the first node to obtain a coding unit code stream corresponding to the coding unit.
  • the preset condition in the embodiment of the present application limits the division of nodes in the second-level coding tree, and the corresponding division manner of a node in the second-level coding tree is a tri-tree division, and the child nodes of the node are no longer Continue to divide, thus greatly reducing the complexity of dividing the nodes in the second-level coding tree and reducing the coding complexity.
  • mapping manner of a node in the second-level coding tree is tri-tree partitioning, the child nodes of the node will not continue to be divided, so that the code stream sent by the encoding end device after encoding is no longer
  • the division information including the child nodes of the node saves transmission bits and reduces the length of the code stream.
  • the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  • the encoding end device calculates, for each of the partitioning manners that the first node can use.
  • the rate distortion cost is determined, and the division mode corresponding to the minimum rate distortion cost is determined as the target division mode corresponding to the first node, so that the coding end device can divide the first node by using the target division manner corresponding to the first node.
  • the node division manner corresponding to the first-level coding tree includes a quad-tree division
  • the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division .
  • an encoding end device comprising a determining module, a dividing module and an encoding module.
  • the determining module is configured to determine a coding tree unit CTU corresponding to the image block to be encoded.
  • the dividing module is configured to divide the CTU determined by the determining module according to a node partitioning manner corresponding to the first-level coding tree, to obtain a leaf node of the first-level coding tree, where the root node of the first-level coding tree corresponds to the CTU.
  • the determining module is further configured to determine, according to a preset condition, a division manner that can be used by the first node in the second-level coding tree, where the preset condition includes: if the division manner corresponding to the parent node of the first node is a tri-tree division, It is determined that the first node is not divided, and the root node of the second-level coding tree is a leaf node of the first-level coding tree.
  • the coding module is configured to: if the division manner that is determined by the determining module is not to be divided, the coding unit CU corresponding to the first node is encoded to obtain a coding unit code stream corresponding to the coding unit.
  • the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  • the encoding end device provided by the embodiment of the present application further includes a computing module, where the calculating module is configured to: if the determining module determines that the first node is usable, the dividing manner is not included. Without division, the rate distortion cost of each of the division modes that the first node can use is calculated.
  • the determining module is further configured to determine a partitioning manner corresponding to a minimum rate distortion cost as a target partitioning manner corresponding to the first node.
  • the dividing module is specifically configured to divide the first node by using a target dividing manner corresponding to the first node determined by the determining module.
  • the node division manner corresponding to the first-level coding tree includes a quad-tree division
  • the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division.
  • a decoding end device comprising: one or more processors, a memory, and a communication interface.
  • the memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, the computer program code comprising instructions, when the one or more processors execute the instructions, the decoding device performs the first aspect, The method for decoding image data according to the third aspect, the fourth aspect, the sixth aspect, and any one of the possible implementation manners.
  • a tenth aspect provides an encoding end device, wherein the encoding end device comprises: one or more processors, a memory, and a communication interface.
  • the memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, the computer program code comprising instructions, and when the one or more processors execute the instructions, the encoding end device performs the eighth aspect as described above
  • An encoding method of image data as described in any of the possible implementations.
  • a computer readable storage medium stores instructions, wherein when the instructions are run on a decoding end device, the decoding end device is configured to perform The method for decoding image data according to the first aspect, the third aspect, the fourth aspect, the sixth aspect, and any one of the possible implementation manners.
  • a computer readable storage medium stores instructions, wherein when the instructions are run on an encoding device, the encoding device is configured to perform The encoding method of the image data described in the above eighth aspect and any one of the possible implementation manners.
  • a thirteenth aspect a computer program product comprising instructions for causing a decoding end device to perform the first aspect, the third aspect, the fourth aspect, and the sixth aspect as described above when the computer program product is run on the decoding end device And a decoding method of the image data as described in any of the possible implementations.
  • a fourteenth aspect a computer program product comprising instructions for causing an encoding end device to perform the apparatus as described in the eighth aspect above and any one of the possible implementations as described above, when the computer program product is run on the encoding end device
  • the encoding method of image data
  • the names of the above-mentioned decoding end device and the encoding end device are not limited to the device or the functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of the respective devices or functional modules are similar to the present application, they are within the scope of the claims and their equivalents.
  • FIG. 1 is a schematic structural diagram of different division manners provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a quadtree hierarchy according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a combined division of a quadtree partition and a binary tree partition according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of an image processing system according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of hardware of a mobile phone according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart 1 of a method for decoding image data according to an embodiment of the present application.
  • FIG. 7 is a second schematic flowchart of a method for decoding image data according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic flowchart 3 of a method for decoding image data according to an embodiment of the present disclosure
  • FIG. 9 is a schematic flowchart of a method for encoding image data according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a decoding end device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of an apparatus of an encoding end according to an embodiment of the present disclosure.
  • the words “exemplary” or “such as” are used to mean an example, illustration, or illustration. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words “exemplary” or “such as” is intended to present the concepts in a particular manner.
  • Coding Tree Unit An image consists of multiple CTUs. One CTU usually corresponds to a square image area. As shown in Figure 1(a), image 10 consists of multiple CTUs (including CTU A). , CTU B, CTU C, etc.).
  • the coding information corresponding to a certain CTU includes luminance values and/or chrominance values of pixels in a square image region corresponding to the CTU. Furthermore, the coding information corresponding to a certain CTU may further include syntax elements indicating how to divide the CTU into at least one CU, and a method of decoding each CU to obtain a reconstructed image.
  • An image area corresponding to one CTU may include 64 ⁇ 64, 128 ⁇ 128, or 256 ⁇ 256 pixels.
  • a CTU of 64x64 pixels contains a rectangular pixel lattice of 64 columns of 64 pixels per column, each pixel containing a luminance component and/or a chrominance component.
  • the CTU can also correspond to a rectangular image area or an image area of other shapes.
  • the image area corresponding to one CTU may also be an image area in which the number of pixels in the horizontal direction is different from the number of pixels in the vertical direction, for example, including 64 ⁇ 128 pixels.
  • CU Coding Unit
  • A is the width of the rectangle
  • B is the height of the rectangle.
  • the width referred to in the embodiment of the present application refers to the width shown in FIG. 1 .
  • the length in the X-axis direction (horizontal direction) in the two-dimensional Cartesian coordinate system XoY, the height refers to the length in the Y-axis direction (vertical direction) in the two-dimensional Cartesian coordinate system XoY shown in FIG.
  • the values of A and B may be the same or different.
  • the values of A and B are usually an integer power of 2, for example: 256, 128, 64, 32, 16, 8, or 4.
  • a CU can obtain a reconstructed image block of an A ⁇ B rectangular region by decoding processing, and the decoding process usually includes processing such as prediction, dequantization, and inverse transform to generate a predicted image and a residual.
  • the reconstructed image block is obtained by superimposing the predicted image and the residual.
  • a plurality of reconstructed image blocks can be used to obtain a final reconstructed image.
  • Quad-Tree A tree structure in which one node can be divided into four sub-nodes.
  • the video codec standard H.265 adopts a quadtree-based CTU partitioning method: a CTU is used as a root node, and each node corresponds to a square image area; for a node, the node can no longer be divided ( At this time, the square image area corresponding to the node is a CU), and the node may be divided into four lower level nodes, that is, the square image area corresponding to the node is divided into four square areas of the same size (the width thereof) The height is half of the width and height of the front area, and each area corresponds to one node.
  • CTU A is the root node, and CTU A is divided into four nodes a, b, c, and d. If the node a is not divided, the square image area corresponding to node a corresponds to one CU.
  • Binary Tree A tree structure in which a node can be divided into two sub-nodes. For a node on the binary tree structure, the node may not be divided, or the node may be divided into two nodes of the next level.
  • the binary tree division method can include:
  • the image area corresponding to the node is divided into upper and lower areas of the same size, that is, the width of the divided image area remains unchanged, and the height becomes half of the divided image area, and each divided image area corresponds to A child node.
  • the node b is divided by a horizontal binary division method to generate a node e and a node f.
  • the area corresponding to the node is divided into left and right areas of the same size, that is, the height of the divided image area remains unchanged, the width becomes half of the divided image area, and each divided image area corresponds to one Child node.
  • the node d is divided by a vertical binary division method to generate a node g and a node h.
  • horizontal dichotomy and vertical dichotomy are an example of the manner in which the binary tree is divided.
  • the image area corresponding to the node may be divided into two sub-areas in another manner.
  • two high unequal sub-regions are horizontally divided, or vertically divided into two unequal regions.
  • Triple Tree A tree structure in which one node can be divided into three child nodes.
  • the node may not be divided, or the node may be divided into three lower-level nodes.
  • the trigeminal division can include:
  • the image area corresponding to the node is divided into upper, middle and lower regions, and each region corresponds to one child node.
  • the heights of the upper, middle, and lower regions are respectively 1/4, 1/2, and 1/4 of the height of the image region before division.
  • the node c is divided by a horizontal three-division method to generate a node j, a node k, and a node m.
  • the height of the image region corresponding to the node j is the height 1/4 of the image region corresponding to the node c.
  • the height of the image area corresponding to the node k is 1/2 of the height of the image area corresponding to the node c
  • the height of the image area corresponding to the node m is 1/4 of the height of the image area corresponding to the node c.
  • the heights of the upper, middle, and lower regions are respectively 1/3, 1/3, and 1/3 of the height of the image region before the division, that is, the image region corresponding to the node is as shown in FIG.
  • the direction of the X-axis in the two-dimensional Cartesian coordinate system XoY is equally divided into three regions. As shown in Fig.
  • the node c is divided by a horizontal three-division method to generate a node j, a node k, and a node m.
  • the height of the image region corresponding to the node j and the height of the image region corresponding to the node k correspond to the node m.
  • the height of the image area is 1/3 of the height of the image area corresponding to the node c.
  • the image area corresponding to the node is divided into three areas of left, middle and right, each area corresponding to one child node.
  • the widths of the left, middle, and right image regions are respectively 1/4, 1/2, and 1/4 of the width of the image region before division.
  • the node c is divided by a vertical three-division method to generate a node p, a node q, and a node x.
  • the width of the image region corresponding to the node p is the width of the image region corresponding to the node c. 4.
  • the width of the image area corresponding to the node q is 1/2 of the width of the image area corresponding to the node c
  • the width of the image area corresponding to the node x is 1/4 of the width of the image area corresponding to the node c.
  • the heights of the left, middle, and right image regions are respectively 1/3, 1/3, and 1/3 of the height of the image region before the division, that is, the image region corresponding to the node is shown in FIG.
  • the direction of the X-axis in the two-dimensional Cartesian coordinate system XoY is equally divided into three regions. As shown in FIG.
  • the node c is divided by a vertical three-division method to generate a node p, a node q, and a node x, the width of the image region corresponding to the node p, the width of the image region corresponding to the node q, and the node x.
  • the width of the corresponding image area is 1/3 of the width of the image area corresponding to the node c.
  • Image encoding The process of compressing a sequence of images into a stream of code.
  • Image decoding The process of restoring a code stream into a reconstructed image according to specific grammar rules and processing methods.
  • the video codec standard H.265 uses the QT partitioning method to divide the CTU. Specifically, the CTU is used as the root node (root) of the QT structure, and the CTU is recursively divided into a plurality of leaf nodes according to the QT division manner. If a node is no longer split, the node is called a leaf node.
  • an image is composed of a plurality of CTUs, and one CTU corresponds to one square image area, that is, one CTU corresponds to one image block.
  • Each leaf node corresponds to one CU, and each CU is equivalent to a certain sub-image block in the image block corresponding to the CTU, and the sub-image block can no longer be divided by using the QT division manner. If it is necessary to continue to divide a certain node, the image area corresponding to the node is divided into four image areas of the same size. Referring to FIG. 1(b), after the image area corresponding to the node is divided, each generated after the division is generated. Each image area corresponds to a node, and it is also necessary to determine whether these nodes will continue to be divided. Whether a node is divided is indicated by a partition flag bit (such as split_cu_flag) corresponding to the node in the code stream.
  • the level of the root node in the QT structure (referred to as the QT level) is 0, and the QT level of the child node generated by the QT partitioning method is 1 for the QT level of the parent node of the child node.
  • split_cu_flag indicates that the node is no longer divided
  • the CTU node is divided into four 32 ⁇ 32 nodes (QT level is 1), and the fourth The 32 ⁇ 32 nodes are node A1, node A2, node A3, and node A4, respectively.
  • Each of the four 32 ⁇ 32 nodes can be further divided or not divided according to its corresponding split_cu_flag.
  • the node A1 is further divided, and the node A1 is divided into four 16 ⁇ 16 nodes (the QT level is 2), and the four 16 ⁇ 16 nodes are the node B1 and the node B2, respectively. , node B3, and node B4. And so on, until all nodes are no longer divided, so that a CTU is divided into a group of CUs.
  • the minimum size of each CU ie, the minimum size of the CU
  • the minimum size of the CU is identified in the Sequence Parameter Set (SPS) of the code stream, for example, 8 ⁇ 8.
  • the CU is the smallest CU.
  • FIG. 3(a) is an example of a coding tree.
  • a coding tree may correspond to only one division, such as a quadtree; or it may correspond to multiple divisions, such as the aforementioned QTBT structure and the QT-BT/TT structure described below.
  • the first level coding tree, the second level coding tree, the third level coding tree, ..., the Nth coding tree respectively correspond to a set of different division modes, and N is a positive integer greater than 3.
  • the set of different division manners may be a type of a certain tree, such as a trigeminal tree, a binary tree, or a quadtree; or a collection of division manners in the same tree type, such as horizontal dichotomy, vertical dichotomy, etc.; It can also be a combination of the two. It can be understood that a coding tree does not need to include multiple different levels of coding trees at the same time.
  • a coding tree may only include a first-level coding tree; or a coding tree may include first-level and second-level coding trees; or a coding tree may include a first-level coding tree, a second-level coding tree, and a A three-level coding tree.
  • the first level coding tree may include a quadtree partition
  • the second level coding tree may include a binary tree partition and a triblock tree partition.
  • the first level coding tree may include quadtree partitioning
  • the second level coding tree may include binary tree partitioning, triblock tree partitioning, and quadtree partitioning.
  • the first level coding tree may include quadtree partitioning and binary tree partitioning
  • the second level coding tree includes triblock tree partitioning
  • the first level coding tree may comprise a quadtree partition
  • the second level coding tree may comprise a binary tree partition
  • the third level coding tree may comprise a triblock tree partition.
  • the first level coding tree may include a horizontal binary
  • the second level coding tree may include vertical binary and quadtree partitioning
  • the third level coding tree may include vertical three and horizontal three.
  • the second level coding tree may also include other division manners, which is not specifically limited in this embodiment of the present application.
  • the coding end device usually adopts Rate Distortion Optimization (RDO) technology to determine which coding tree coding is used by the CTU. Specifically, for each node, the encoding end device calculates a Rate Distortion Cost (RD cost) for each of the partitioning modes that the node can use, compares the calculated RD cost, and corresponds to the minimum RD cost. The division method is determined as the division mode of the node.
  • RDO Rate Distortion Optimization
  • the level of a node in the BT structure is called the BT level, and the BT level of the child node generated by the BT partitioning method is 1 for the BT level of the parent node of the child node. If the BT level of a node is equal to the maximum BT level, it is determined that the node is no longer divided. In general, the largest BT level in the BT structure is identified in the SPS.
  • the BT division mode is introduced on the basis of the QT division mode, wherein the QT division manner and the BT division manner are cascaded, and the division manner is called a QTBT division manner.
  • the CTU is divided according to the QT division manner, and the leaf nodes of the QT can continue to be divided by the BT division manner, that is, the first-level coding tree is QT, and the second-level coding tree is BT.
  • each endpoint represents a node
  • the solid line indicates that the node is divided by QT division
  • the dotted line indicates that the node is divided by BT division
  • a to M are 13 leaf nodes, and each leaf node corresponds to 1 CU.
  • 10 represents a vertical dichotomy
  • 11 represents a horizontal dichotomy.
  • Fig. 3(b) shows an image area corresponding to the CTU divided according to the division manner shown in Fig. 3(a).
  • each CU has a QT level and a BT level.
  • the QT level of the CU is the QT level of the QT leaf node to which the CU belongs
  • the BT level of the CU is the BT level of the BT leaf node to which the CU belongs. If the CTU is not divided, that is, there is only one CU, the QT level of the CU is 0, and the BT level is 0.
  • the QT level of A and B is 1, and the BT level is 2; the QT level of C, D, and E is 1, and the BT level is 1; the QT level of F, K, and L is 2, the BT level is 1; the QT level of I and J is 2, the BT level is 0; the QT level of G and H is 2, the BT level is 2; the QT level of M is 1, and the BT level is 0.
  • the CU shape is more diverse and can better adapt to the content of the partial image.
  • All CUs generated by the QT partitioning method in the H.265 standard can only be square, that is, the width of the CU is equal to the height of the CU.
  • the width and height of the CU may be different.
  • the aspect ratio (the value is equal to the width divided by the height) is 2, 4, 8, 16, 1/2, 1/4. 1/8 or 1/16.
  • the width and height of all CUs cannot be smaller than the side length of the minimum CU (for example, the minimum CU can be set to 4 ⁇ 4).
  • the SPS of a video stream contains the size information of the smallest CU.
  • a QT-BT/TT division mode may also be included, that is, nodes in the first-level coding tree use QT division mode, and nodes in the second-level coding tree may use BT division mode or TT division.
  • the CTU is a root node of the first-level coding tree, and the CTU is divided into QT division manners to generate a plurality of leaf nodes of the first-level coding tree; and the leaf node of the first-level coding tree is used as the second-level coding tree.
  • the root node divides the nodes in the second-level coding tree by BT partitioning (including horizontal binary and vertical binary) or TT partitioning (including horizontal three-point and vertical three-point) to generate several second-level coding trees.
  • Leaf node is a root node of the first-level coding tree, and the CTU is divided into QT division manners to generate a plurality of leaf nodes of the first-level coding tree; and the leaf node of the first-level coding tree
  • the encoding end device usually needs to calculate the RD cost of each partitioning mode that the node can use, compare the calculated RD cost, and determine the partitioning mode corresponding to the minimum RD cost as the node's The way of division.
  • the TT division mode can also be used. Therefore, for each node in the second-level coding tree, the coding end devices are used. It is necessary to calculate the RD cost of the four division methods (horizontal, vertical, horizontal, and vertical) to determine the actual division of each node in the second-level coding tree.
  • the coding complexity is high.
  • the embodiment of the present application provides a method for decoding image data.
  • the decoding end device After obtaining a code stream including image data, the decoding end device obtains information about node partitioning manner of the first-level coding tree and second by analyzing the code stream.
  • the node division mode information of the level coding tree if the node division mode information of the second level coding tree indicates that the division manner corresponding to the first node in the second level coding tree is a trinomial division, the decoding end device obtains the parsing code stream to obtain
  • the coding information of the three sub-nodes of the first node, one sub-node of the first node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three sub-nodes of the first node, An image corresponding to the image data is obtained.
  • the root node of the first-level coding tree corresponds to one CTU
  • the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree.
  • the root node of the second level coding tree is a leaf node of the first level coding tree.
  • the decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to the first node is a tri-tree partition, and the encoding information of the three child nodes of the first node can be directly obtained, and the three child nodes of the first node need not be sequentially performed. Decoding is performed to speed up the decoding and reduce the complexity of decoding.
  • the embodiment of the present application further provides an encoding method of image data, after the encoding end device determines the CTU corresponding to the image block to be encoded, the CTU is divided according to the node division manner corresponding to the first-level coding tree, a leaf node of the first level coding tree, wherein a root node of the first level coding tree corresponds to a CTU; the coding end device determines, according to a preset condition, a division manner that the first node in the second level coding tree can use, and second The root node of the level coding tree is a leaf node of the first level coding tree.
  • the preset condition includes: if the division method corresponding to the parent node of the first node is a trinomial division, it is determined that the first node is not divided; if the first node can The coding mode used is not divided, and the coding end device encodes the coding unit corresponding to the first node to obtain a coding unit code stream corresponding to the coding unit.
  • the preset condition in the embodiment of the present application limits the division of nodes in the second-level coding tree, and the corresponding division manner of a node in the second-level coding tree is a tri-tree division, and the child nodes of the node are no longer Continue to divide, thus greatly reducing the complexity of dividing the nodes in the second-level coding tree and reducing the coding complexity.
  • mapping manner of a node in the second-level coding tree is tri-tree partitioning, the child nodes of the node will not continue to be divided, so that the code stream sent by the encoding end device after encoding is no longer
  • the division information including the child nodes of the node saves transmission bits and reduces the length of the code stream.
  • FIG. 4 is a schematic structural diagram of an image processing system according to an embodiment of the present application.
  • the image processing system includes an encoding end device 40 and a decoding end device 41.
  • the encoding end device 40 and the decoding end device 41 may be independently configured or integrated in the same device, which is not specifically limited in this embodiment of the present application.
  • the encoding end device 40 and the decoding end device 41 are independently set as an example. For the convenience of description, the following description will be made by taking the independent setting of the encoding end device and the decoding end device as an example.
  • the encoding end device 40 processes the CTU corresponding to each image in the image according to the division manner of the first-level coding tree and the division manner of the second-level coding tree, where If the partitioning mode of a node in the second-level coding tree is a tri-tree partition, the child nodes of the node are no longer divided.
  • the encoding end device 40 acquires the CTU code stream, and sends the CTU code stream to the decoding end device 41.
  • the CTU code stream is sent; the decoding end device 41 parses the acquired CTU code stream according to the split information of the node, and acquires a reconstructed image.
  • Both the encoding end device 40 and the decoding end device 41 may be various devices configured with a camera (such as a front camera or a rear camera), for example, the encoding end device and the decoding end device are wearable electronic devices (such as smart watches, etc.) ), Polaroid, can also be the mobile phone shown in Figure 5, but also can be a tablet, desktop computer, virtual reality device, laptop, ultra-mobile personal computer (UMPC), personal digital assistant ( Personal Digital Assistant (PDA), etc., the specific form of the encoding end device 40 and the decoding end device 41 is not particularly limited in the embodiment of the present application.
  • UMPC ultra-mobile personal computer
  • PDA Personal Digital Assistant
  • both the encoding end device 40 and the decoding end device 41 in this embodiment may be mobile phones.
  • the embodiment will be specifically described below by taking a mobile phone as an example.
  • the illustrated mobile phone is only one example of the encoding end device 40 and the decoding end device 41, and the mobile phone may have more or fewer components than those shown in the figure, and two or more may be combined. Parts, or can have different part configurations.
  • the various components shown in FIG. 5 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the mobile phone includes an RF (Radio Frequency) circuit 50, a memory 51, an input unit 52, a display unit 53, a sensor 54, an audio circuit 55, and a Wireless Fidelity (Wi-Fi) module 56.
  • the processor 57, the Bluetooth module 58, and the power source 59 and the like It will be understood by those skilled in the art that the structure of the handset shown in FIG. 5 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
  • the RF circuit 50 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals.
  • the downlink information of the base station can be received and processed by the processor 57.
  • the data related to the uplink is sent to the base station.
  • RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • RF circuitry 50 can also communicate with the network and other mobile devices via wireless communication.
  • the wireless communication can use any communication standard or protocol, including but not limited to global mobile communication systems, general packet radio services, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
  • the memory 51 can be used to store software programs and data.
  • the processor 57 executes various functions and data processing of the mobile phone by running software programs and data stored in the memory 51.
  • the memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, video, etc.).
  • the memory 51 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the memory 51 stores an operating system that enables the mobile phone to operate, such as developed by Apple. Operating system, developed by Google Inc. Open source operating system, developed by Microsoft Corporation Operating system, etc.
  • An input unit 52 such as a touch screen, can be used to receive input numeric or character information and to generate signal inputs related to user settings and function controls of the handset.
  • the input unit 52 can include a touch screen 521 and other input devices 522.
  • the touch screen 521 also referred to as a touch panel, can collect touch operations on or near the user (eg, the user operates on the touch screen 521 or near the touch screen 521 using any suitable object or accessory such as a finger, a stylus, or the like. ), and drive the corresponding connection device according to a preset program.
  • the touch screen 521 may include two parts (not shown in FIG. 5) of the touch detecting device and the touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 57 is provided and can receive instructions from the processor 57 and execute them.
  • the touch screen 521 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the display unit 53 (ie, the display screen) can be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the mobile phone.
  • the display unit 53 may include a display panel 531 disposed on the front of the mobile phone.
  • the display panel 531 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch screen 521 can cover the display panel 531. When the touch screen 521 detects a touch operation on or near it, the touch screen 521 transmits to the processor 57 to determine the type of the touch event, and then the processor 57 displays the panel according to the type of the touch event.
  • a corresponding visual output is provided on the 531.
  • the touch screen 521 and the display panel 531 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch screen 521 and the display panel 531 may be integrated to implement the mobile phone. Input and output functions.
  • the touch screen 521 can also be provided with a pressure sensing sensor, so that when the user performs a touch operation on the touch panel, the touch panel can also detect the pressure of the touch operation, and the mobile phone can be more accurate. The touch operation is detected.
  • the handset may also include at least one type of sensor 54, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, and the ambient light sensor may adjust the brightness of the display panel 531 according to the brightness of the ambient light, and the proximity light sensor is disposed on the front side of the mobile phone, when the mobile phone moves to the ear, according to Close to the detection of the light sensor, the mobile phone turns off the power of the display panel 531, so that the mobile phone can further save power.
  • the accelerometer sensor can detect the acceleration of each direction (usually three axes). When it is still, it can detect the magnitude and direction of gravity.
  • Other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that can be configured on the mobile phone are not described here.
  • An audio circuit 55, a speaker 551, and a microphone 552 provide an audio interface between the user and the handset.
  • the audio circuit 55 can transmit the converted electrical data of the received audio data to the speaker 551, and is converted into a sound signal output by the speaker 551.
  • the microphone 552 converts the collected sound signal into an electrical signal, and the audio circuit 55 is used by the audio circuit 55. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 50 for transmission to, for example, another mobile phone, or the audio data is output to the memory 51 for further processing.
  • Wi-Fi is a short-range wireless transmission technology.
  • the mobile phone can help users to send and receive emails, browse web pages and access streaming media through the Wi-Fi module 56, which provides users with wireless broadband Internet access.
  • the processor 57 is a control center of the mobile phone, and connects various parts of the entire mobile phone by using various interfaces and lines, and executes various kinds of mobile phones by running or executing a software program stored in the memory 51 and calling data stored in the memory 51. Function and process data to monitor the phone as a whole.
  • processor 57 may include one or more processing units; processor 57 may also integrate an application processor and a modem processor, where the application processor primarily processes operating systems, user interfaces, applications, etc.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor can also be independently set.
  • the Bluetooth module 58 is configured to exchange information with other devices through a short-range communication protocol such as Bluetooth.
  • the mobile phone can establish a Bluetooth connection through the Bluetooth module 58 and a wearable electronic device (such as a smart watch) that also has a Bluetooth module, thereby performing data interaction.
  • the handset also includes a power source 59 (such as a battery) that powers the various components.
  • the power supply can be logically coupled to the processor 57 through the power management system to manage functions such as charging, discharging, and power consumption through the power management system.
  • FIG. 6 is a schematic flowchart diagram of a method for decoding image data according to an embodiment of the present application, and the decoding method can be applied to the image processing system shown in FIG. 4.
  • the decoding method of the image data includes:
  • the decoding end device obtains a code stream that includes image data.
  • the code stream that includes the image data obtained by the decoding device includes a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), a slice header, or a slice header ( A slice segment header), and a CTU code stream, the CTU code stream carries image data.
  • SPS Sequence Parameter Set
  • PPS Picture Parameter Set
  • slice header or a slice header ( A slice segment header)
  • CTU code stream the CTU code stream carries image data.
  • the decoding end device decodes the obtained code stream to obtain node division manner information of the first-level coding tree.
  • the root node of the first-level coding tree corresponds to a CTU, and the leaf node of the first-level coding tree is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree.
  • the node division manner corresponding to the first-level coding tree includes quadtree partitioning.
  • the decoding end device After obtaining the code stream, the decoding end device parses the CTU code stream in the code stream to obtain node partitioning information of the first level coding tree.
  • the method for the decoding end device to parse the CTU code stream to obtain the node partitioning information of the first level coding tree may be: the decoding end device uses the CTU as the root node of the first level coding tree, parses the CTU code stream, and obtains the CTU.
  • the first identifier (such as SplitFlag) included in the syntax element of the code stream is used to indicate how to divide the CTU into at least one CU, that is, the first identifier indicates node division manner information of the first-level coding tree.
  • the node corresponding to the SplitFlag is a leaf node of the first-level coding tree; if the value of a SplitFlag is 1, the node corresponding to the SplitFlag is continuously obtained. SplitFlag of the four child nodes until the information of all leaf nodes of the first level coding tree is determined.
  • the width of the image region corresponding to a certain node is equal to the first threshold (for example, the first threshold is 8 or 16)
  • the node is a leaf node of the first-level coding tree
  • the SplitFlag corresponding to the node is The value is 0.
  • the method for the decoding end device to parse the CTU code stream to obtain the node partitioning information of the first level coding tree may also be: the decoding end device uses the CTU as the root node of the first level coding tree, parses the CTU code stream, and obtains the a second identifier (such as NSFlag) included in the syntax element of the CTU code stream for indicating whether to divide the node of the first level coding tree; if the value of the second identifier is the first value (for example, 1), The node corresponding to the second identifier is a leaf node of the first-level coding tree, and is also a second-level coding leaf node; if the value of the second identifier is a second value (for example, 0), acquiring the third identifier included in the syntax element (such as QTSplitFlag); if the value of the third identifier is a third value (for example, 0), it indicates that the node corresponding to the third identifier is
  • the node is a leaf node of the first-level coding tree, and the third node corresponding to the node
  • the value of the identification is the third value.
  • the width or height of the image area corresponding to a certain node is greater than the second threshold, and the value of the second identifier corresponding to the node is the second value, the value of the third identifier is the third value. If the mapping mode of the node is QT, the value of the second identifier corresponding to the node is the second value, and the value of the third identifier corresponding to the node is the third value.
  • the decoding end device parses the obtained code stream to obtain node division mode information of the second-level coding tree.
  • the root node of the second-level coding tree is a leaf node of the first-level coding tree.
  • the node division manner corresponding to the second-level coding tree is different from the node division manner corresponding to the first-level coding tree.
  • the node division manner corresponding to the second-level coding tree includes binary tree division and tri-tree division.
  • the decoding end device After obtaining the node partitioning mode information of the first-level coding tree, the decoding end device performs the first-level coding tree indicating the node partitioning manner corresponding to the node partitioning mode information of the first-level coding tree and the root node of the first-level coding tree.
  • the leaf node is used as the root node of the second-level coding tree, and the CTU code stream is parsed to obtain the division mode information of the nodes of the second-level coding tree.
  • the method for the decoding end device to parse the CTU code stream to obtain the partitioning mode information of the node of the second level coding tree may be: the decoding end device parses the CTU code stream, and obtains a method for indicating how to divide the second level coding tree.
  • the fourth identifier of a node (such as STSplitMode), that is, the fourth identifier indicates the node division manner information of the second-level coding tree.
  • the fourth identifier is determined until information about all leaf nodes of the second level coding tree is determined.
  • the QT level of the CU is the QT level of the QT leaf node to which the CU belongs
  • the BT level of the CU is the BT level of the BT leaf node to which the CU belongs. That is, the second level coding tree level represents the level of a node relative to the root node of the second level coding tree in which the node is located. The second level coding tree level of the root node of the second level coding tree is 0. If a node of the second level coding tree is divided, the second level coding tree level of the child node of the node is the second of the node. Level coding tree level plus 1.
  • the division manner corresponding to the second-level coding tree in this embodiment may further include other division manners except the binary tree division and the tri-tree division, which are not specifically limited in this embodiment of the present application.
  • the division manner corresponding to the second-level coding tree in the embodiment further includes a quad-tree division; when the second-level coding tree level of a node is greater than the preset level and the height and width of the image region corresponding to the node When the ratio (the height of the image region corresponding to the node divided by the width of the image region corresponding to the node) is less than or equal to the third threshold, the division manner corresponding to the node further includes quadtree partitioning.
  • the method for the decoding end device to parse the CTU code stream to obtain the partitioning mode information of the node of the second level coding tree may further be: the decoding end device determines that the first information of a node of the second level coding tree satisfies certain conditions. , indicating that the node is a leaf node of the second-level coding tree.
  • the first information of the node refers to at least one of a width of an image area corresponding to the node, a height of an image area corresponding to the node, and a second level coding tree level of the node.
  • the CTU code stream may not carry the fourth identifier corresponding to the node.
  • the node is a leaf node of the second-level coding tree:
  • the second level coding tree level of a node is equal to the preset maximum second level coding tree level (for example, the preset maximum second level coding tree level is 3, 4 or 2).
  • the height and width of the image area corresponding to a certain node are equal to the height and width of the preset minimum CU.
  • the height (or width) of the image area corresponding to a certain node is greater than the height (or width) of the preset maximum CU.
  • the aspect ratio (or aspect ratio) of the image area corresponding to a certain node is greater than or equal to the preset ratio.
  • the image area corresponding to a certain node includes a pixel value that is less than or equal to a preset pixel value.
  • the above conditions (1) to (5) are merely examples of the conditions for determining that a certain node is a leaf node of the second-level coding tree, and this condition is not limited.
  • the encoding end device may obtain the preset maximum second level coding tree level, the preset minimum CU height (or width) from the SPS, the PPS, or the strip header in the code stream that includes the image data,
  • the preset maximum CU height (or width), preset ratio, preset pixel value of course, the preset maximum second-level coding tree level, the preset minimum CU height (or width), preset The height (or width) of the maximum CU, the preset ratio, and the preset pixel value may also be preset by the image processing system.
  • the fourth identifier in the embodiment of the present application is used to indicate how to divide a node in the second level coding tree.
  • the fourth identifier may include a node division identifier for indicating whether to continue to divide the node, a division direction identifier for indicating which direction to divide the node, and a division mode for indicating which manner the node is divided according to which manner logo.
  • the node division identifier is STSplitFlag. If the value of STSplitFlag is equal to 0, it indicates that the node corresponding to the STSplitFlag is not divided. If the value of STSplitFlag is equal to 1, it indicates that the node corresponding to the STSplitFlag is continued to be divided.
  • the division direction identifier is STSplitDir. If the value of STSplitDir is equal to 0, it indicates that the node corresponding to the STSplitDir is divided according to the horizontal direction; if the value of STSplitDir is equal to 1, it indicates that the node divides the node corresponding to the STSplitDir in the vertical direction.
  • the division mode identifier is STSplitType. If the value of the STSplitType is equal to 0, the division method corresponding to the node corresponding to the STSplitType is a binary tree division; if the value of the STSplitDir is equal to 1, the division corresponding to the node corresponding to the STSplitType is trifurcation. Tree division.
  • the fourth identifier in the embodiment of the present application may further include a binary tree partition identifier that is used to indicate whether the node corresponding to the fourth identifier is divided according to a binary tree partitioning manner, and is used to indicate whether the fourth partition is divided according to a tri-tree partition manner.
  • the tri-tree partition identifier and the division direction identifier of the corresponding node are identified (the division direction identifier is the same as the division direction identifier in the previous example).
  • the binary tree partitioning identifier is BTFlag. If the value of the BTFlag is equal to 0, the mapping manner corresponding to the node corresponding to the fourth identifier is not the BT partition. If the value of the BTFlag is equal to 1, it indicates that the node corresponding to the fourth identifier corresponds to The division method is BT division.
  • the tribtree partition identifier is TTFlag. If the value of the TTFlag is equal to 0, the partitioning mode corresponding to the node corresponding to the fourth identifier is not the TT partition. If the value of the TTFlag is equal to 1, the partition corresponding to the node corresponding to the fourth identifier is TT division.
  • the fourth identifier in the embodiment of the present application may also include any combination of the foregoing node division identifier, the foregoing division direction identifier, and the foregoing division mode identifier, which is not specifically limited in this embodiment of the present application.
  • the fourth identifier may include more identifiers, and details are not described herein again.
  • the decoding device in the embodiment of the present application may perform S602 after executing S601, or may acquire information about a leaf node of the first-level coding tree for the first time in the process of executing S601.
  • the leaf node of the first level coding tree immediately executes S602 until the last leaf node of the first level coding tree is obtained.
  • the decoding end device parses the code stream to obtain the coding of the three sub-nodes of the first node. information.
  • the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition
  • the child node of the first node is the second-level The leaf node of the coding tree.
  • the division manner corresponding to the first node is a tri-tree division, and therefore, the first node corresponds to three child nodes. That is to say, if the division manner corresponding to the first node is a tri-tree division, it is indicated that the three sub-nodes of the first node are all leaf nodes of the second-level coding tree.
  • the decoding device may further determine the information of the first node in combination with the conditions (1) to (5) of the leaf node described in S602 for describing that the node is the second-level coding tree.
  • decoding The end device acquires the partition mode information corresponding to the first node from the CTU code stream; otherwise, the decoding end device determines that the first node is a leaf node of the second level coding tree.
  • nodes that are no longer divided correspond to one CU.
  • each child node of the first node corresponds to one CU.
  • the decoding end device parses the coding unit syntax structure in the code stream (for example, the coding_unit() syntax structure in H.265, the explanation of the coding_unit() syntax structure is described below, and obtains the coding of each CU.
  • Information, the coding information of each CU includes information such as a prediction mode and a transform coefficient of the CU.
  • the decoding end device acquiring the encoding information of each CU means that the decoding end device obtains the encoding information of each leaf node of the second-level coding tree.
  • the decoding end device in the embodiment of the present application may obtain the information of one leaf node of the second-level coding tree in the process of performing S602, parse the code stream, and obtain the coding information of the leaf node; After the coding information of the leaf node is obtained, the leaf information of the next second-level coding tree is obtained, and the coding information of the leaf node of the next second-level coding tree is obtained, and so on, until the last second-level second-level coding The leaf node of the tree.
  • the syntax table of the second level coding tree in the embodiment of the present application is as shown in Table 1.
  • the coding_second_tree() is a grammatical structure of the second-level coding tree, and describes information of a node of the second-level coding tree.
  • x0 and y0 respectively represent the horizontal coordinate offset and the vertical coordinate offset of the upper left corner of the image region corresponding to the node with respect to the upper left corner of the image region corresponding to the CTU; log2CuWidth and log2CuHeight respectively represent the image region corresponding to the node The base-valued logarithm of width and height; stDepth represents the second-level coding tree hierarchy of the node, qtDepth represents the level of the first-level coded leaf node corresponding to the node on the first-level coding tree; parentMode represents the parent node of the node The way of dividing. "X>>Y” means that X is shifted right by Y bits; "X ⁇ Y” means that X is shifted left by Y bits; ae(v) means that syntax elements are parsed using CABAC.
  • STSplitMode ranges from 0, 1, 2, 3, and 4.
  • the node is a leaf node of the second-level coding tree, and the node corresponds to one CU.
  • the coding unit information is parsed according to the CU syntax structure coding_unit().
  • the embodiment of the present application does not limit the manner in which the syntax elements of the coding unit information are organized.
  • the value of STSplitMode is 1 to 4
  • the node is divided into 2 or 3 sub-nodes by using horizontal dichotomy, vertical dichotomy, horizontal triad, and vertical three-point respectively, and for each sub-node, an image corresponding to each sub-node is determined.
  • the width, height, coordinates, and second-level coding tree hierarchy of the region and then parse these child nodes according to coding_second_tree().
  • the decoding end device acquires the node division mode information STSplitMode of the second-level coding tree from the code stream; otherwise , STSplitMode does not appear in the code stream, so the value of STSplitMode is set to 0 by default.
  • the input variable of the coding_second_tree() may further include a restriction division manner of the node, and the restriction division manner of the node means that the node cannot be divided according to the division manner. It can be understood that the STSplitMode that the decoding end device resolves cannot be the division manner indicated by the above limitation division manner.
  • the syntax table of the second level coding tree in the embodiment of the present application is as shown in Table 2.
  • Table 2 if the partitioning mode of the node is tri-tree partitioning, that is, STSplitMode is 3 or 4, the three child nodes of the node are leaf nodes of the second-level coding tree, and the encoding end device can obtain the three child nodes in turn. Encoding information.
  • the decoding end device performs decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node, to obtain an image corresponding to the image data.
  • the process of decoding and reconstructing a coding unit includes processing such as prediction, inverse quantization, inverse transform, loop filtering, and the like.
  • the process of performing decoding reconstruction for each coding unit includes:
  • the transform coefficient of the CU is inverse quantized and inverse transformed according to the quantization parameter and the transform mode, and the reconstructed residual of the CU is obtained. If the CU does not have a transform coefficient, the reconstructed residual of the CU is 0, that is, the reconstructed residual value of each pixel in the CU is 0.
  • the encoding end device performs decoding reconstruction on each coding unit according to the above method, and acquires a reconstructed image block of each CU. After acquiring the reconstructed image block of each CU, the encoding end device obtains the final reconstructed image according to all the reconstructed image blocks obtained, that is, obtains an image corresponding to the image data.
  • the decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to a certain node is a tri-tree partition, and the encoding information of the child node of the node can be directly obtained, and it is not necessary to sequentially decode all the child nodes of the node. Speed up the decoding and reduce the complexity of decoding.
  • the decoding method provided by the embodiment of the present application speeds up the decoding rate and reduces the complexity of decoding.
  • This condition may be preset for the image processing system, or may be determined according to actual needs, which is not specifically limited in the embodiment of the present application.
  • the decoding end device in the embodiment of the present application may further determine whether to limit the node obtained by the tri-tree to continue dividing after obtaining the code stream containing the image data, and then The image data is further analyzed based on the judgment result.
  • the decoding method provided by the embodiment of the present application includes:
  • the decoding end device obtains a code stream that includes image data.
  • the decoding end device parses the obtained code stream to obtain a tri-tree leaf node mode identifier.
  • the tri-tree leaf node mode identifier is used to indicate whether the node obtained by limiting the tri-tree partitioning continues to divide.
  • the tri-tree leaf node mode identifier is represented by tt_leaf_mode_enabled_flag, and the value of tt_leaf_mode_enabled_flag is a first value (for example, 1), and the node after the tri-tree partitioning in the CTU associated with the tt_leaf_mode_enabled_flag is a coded leaf node, that is, if a node corresponds to The division mode is a tri-tree partition, and the child node of the node is a leaf node of the coding tree; the tt_leaf_mode_enabled_flag is a second value (for example, 0), and the node after the tri-tree division in the CTU associated with the tt_leaf_mode_enabled_flag can continue to be divided, that is, if If the partitioning mode of a node is a tri-tree partition, the child nodes of the node
  • At least one of the SPS, the PPS, and the strip header in the code stream including the image data includes the tri-tree leaf node pattern identifier.
  • both the SPS and the PPS include the tri-tree leaf node pattern identifier, and the value of the tri-tree leaf node pattern identifier included in the SPS is different from the value of the tri-tree leaf node pattern identifier included in the PPS, the tri-tree leaf node pattern identifier included in the PPS is effective.
  • the trigeminal leaf node pattern identifier included in the SPS is invalid.
  • both the SPS and the strip header include a tri-tree leaf node pattern identifier, and the value of the tri-tree leaf node pattern identifier included in the SPS is different from the value of the tri-tree leaf node pattern identifier included in the strip header, the tri-tree leaf node pattern identifier included in the strip header is valid.
  • the trigeminal leaf node pattern identifier included in the SPS is invalid.
  • both the PPS and the strip header include the tri-tree leaf node pattern identifier, and the value of the tri-tree leaf node pattern identifier included in the PPS is different from the value of the tri-tree leaf node pattern identifier included in the strip header, the tri-tree leaf node pattern identifier included in the strip header is valid. However, the trigeminal leaf node pattern identifier included in the PPS is invalid. That is, if the trigeminal leaf node pattern identifiers appear simultaneously in the multi-layer syntax structure and the values of the trigeminal leaf node pattern identifiers in the different syntax structures are different, the trigeminal leaf node pattern identifier in the lowermost syntax structure is effective. The trigeminal leaf node pattern identifier in the upper grammatical structure is invalid.
  • the decoding end device parses the code stream, and obtains an effective trigeminal leaf node pattern identifier from the code stream.
  • the decoding end device acquires the tt_leaf_mode_enabled_flag corresponding to the CTU from the SPS while decoding the CTU.
  • the decoding end device decodes the obtained code stream to obtain node division manner information of the first-level coding tree.
  • S702 can refer to the description of S601 above, and details are not described herein again.
  • the decoding end device parses the obtained code stream to obtain node division mode information of the second-level coding tree.
  • S703 can refer to the description of sending S602 above, and details are not described herein again.
  • the decoding end device parses the code stream to obtain coding information of the three child nodes of the first node.
  • S704 is similar to the foregoing S603, except that the decoding end device in S704 needs to determine not only the node division manner information of the second-level coding tree but also the division manner corresponding to the first node in the second-level coding tree. For the tri-tree partitioning, it is also necessary to determine that the tri-tree leaf node mode identifier indicates that the node obtained by limiting the tri-tree partitioning continues to divide.
  • Table 3 is a syntax table of the second level coding tree in this embodiment.
  • the parsing condition of STSplitMode in Table 3 is modified to: "The second-level coding tree level stDepth of the node is smaller than the preset maximum second-level coding tree level maxSTDepth, and the width or height of the image area corresponding to the node is greater than the threshold minCUSize And the parent node of the node is not divided by a trinomial partition or tt_leaf_mode_enabled_flag is non-zero.
  • the decoding end device performs decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node, to obtain an image corresponding to the image data.
  • S705 can refer to the above S604, and details are not described herein again.
  • the embodiment of the present application adds a condition for restricting node division: if the division manner corresponding to the parent node of a node is a tri-tree division, the node does not continue to divide.
  • the decoding end device only needs to determine that the corresponding division manner of a certain node is a tri-tree division, and the coding information of the child node of the node can be directly obtained, and the decoding of all the child nodes of the node is not required, thereby speeding up the decoding rate. Reduced the complexity of decoding.
  • the decoding end device may determine the limitation of the node division according to the tri-tree leaf node mode identifier, thereby adaptively acquiring the node division information of each level coding tree.
  • the division manner corresponding to the first-level coding tree includes a quad-tree division
  • the division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division.
  • the division manner corresponding to the second-level coding tree may include only the binary tree division, so that the third-level coding tree is extracted, and the division manner corresponding to the third-level coding tree includes the tri-tree division.
  • the method for decoding image data includes:
  • the decoding end device obtains a code stream that includes image data.
  • the decoding end device decodes the obtained code stream to obtain node division manner information of the first-level coding tree.
  • S801 can refer to the description of S601 above, and details are not described herein again.
  • the decoding end device parses the obtained code stream to obtain node division mode information of the second-level coding tree.
  • the root node of the second-level coding tree is a leaf node of the first-level coding tree.
  • the node division manner corresponding to the second-level coding tree in this embodiment includes a binary tree division.
  • the decoding end device parses the CTU code stream, and obtains a fourth identifier (such as STSplitMode) for indicating how to divide a node in the second-level coding tree, that is, the fourth identifier indicates the node division of the second-level coding tree. Way information.
  • a fourth identifier such as STSplitMode
  • the node division manner corresponding to the second-level coding tree includes a binary tree division. Therefore, the fourth identifier in this embodiment may be used to indicate that a node is not divided, and may also be used to indicate that it corresponds to a node.
  • the division method is horizontal two points or vertical two points.
  • the fourth identifier is represented as STSplitMode, and the value of STSplitMode is 0, indicating that the node corresponding to the STSplitMode is not further divided; the value 1 or 2 of the STSplitMode indicates that the corresponding manner of the node corresponding to the STSplitMode is horizontal. Two points or two vertical points.
  • Table 4 shows a syntax table for the second level coding tree in this embodiment.
  • the decoding device parses the value of STSplitMode to 0, it starts parsing the third-level coding tree syntax structure; when the value of STSplitMode is 1 or 2, the node is divided into 2 by horizontal dichotomy or vertical dichotomy, respectively.
  • the child nodes are then parsed according to the coding_second_tree() syntax structure for each child node.
  • the fourth identifier in this embodiment may include a node partition identifier (such as STSplitFlag) for indicating whether to continue to divide according to a binary tree partition manner, and a split direction identifier (such as STSplitDir) for indicating a direction of the binary tree partition.
  • a node partition identifier such as STSplitFlag
  • a split direction identifier such as STSplitDir
  • the node division identifier is STSplitFlag. If the value of STSplitFlag is equal to 0, it indicates that the node corresponding to the STSplitFlag is not divided. If the value of STSplitFlag is equal to 1, it indicates that the node corresponding to the STSplitFlag is continued to be divided according to the binary tree division manner.
  • the division direction identifier is STSplitDir.
  • STSplitDir If the value of STSplitDir is equal to 0, it indicates that the node corresponding to the STSplitDir is divided according to the horizontal binary division manner; if the value of STSplitDir is equal to 1, it indicates that the node divides the node corresponding to the STSplitDir according to the vertical division method.
  • the decoding end device parses the code stream, The node division mode information of the third-level coding tree is obtained.
  • the first node is a leaf node of the second-level coding tree.
  • the first node may be divided according to the division manner of the third-level coding tree. Therefore, the first node is the root node of the third-level coding tree.
  • the division manner corresponding to the third-level coding tree in this embodiment includes a tri-tree division.
  • the first node is the root node of the third-level coding tree, and the third-level coding tree is divided into three-tree trees. Therefore, the three child nodes of the first node are the leaf nodes of the third-level coding tree.
  • the decoding end device parses the CTU code.
  • the stream obtains a fifth identifier (such as TTSplitMode) for indicating how to divide a node in the third-level coding tree, that is, the fifth identifier indicates node division manner information of the third-level coding tree.
  • the node division manner corresponding to the third-level coding tree includes a tri-tree division. Therefore, the fourth identifier in this embodiment may be used to indicate that a node is not divided, and may also be used to indicate that it corresponds to a certain node. It is divided into horizontal three points or vertical three points.
  • the fifth identifier is represented by TTSplitMode, and the value of TTSplitMode is 0, indicating that the node corresponding to the TTSplitMode is not further divided; the value of TTSplitMode is 1 or 2, respectively, indicating that the corresponding mode corresponding to the node corresponding to TTSplitMode is horizontal. Three points or three vertical points.
  • the fifth identifier in this embodiment may include a node partition identifier (such as TTSplitFlag) for indicating whether to divide according to a tri-tree partition manner, and a split direction identifier (such as TTSplitDir) for indicating a direction of the tri-tree partition.
  • a node partition identifier such as TTSplitFlag
  • a split direction identifier such as TTSplitDir
  • the node division identifier is TTSplitFlag. If the value of TTSplitFlag is equal to 0, it indicates that the node corresponding to the TTSplitFlag is not divided. If the value of TTSplitFlag is equal to 1, it indicates that the node corresponding to the TTSplitFlag is continued to be divided according to the tri-tree partition manner.
  • the division direction identifier is TTSplitDir.
  • TTSplitDir If the value of TTSplitDir is equal to 0, it means that the node corresponding to the TTSplitDir is divided according to the horizontal three-point division manner; if the value of TTSplitDir is equal to 1, it indicates that the section is divided into the TTSplitDir according to the vertical three-point division manner. node.
  • the decoding end device parses the code stream to obtain coding information of three child nodes of the first node.
  • one child node of the first node corresponds to one CU.
  • S804 may refer to the above S603, except that the decoding end device in S804 acquires the coding information of the leaf node of the third-level coding tree.
  • Table 5 shows a syntax table of the third level coding tree in this embodiment.
  • the width and height of the image area corresponding to the node are less than or equal to the threshold maxSTSize, and the image corresponding to the node If the width or height of the area is greater than 2 times the threshold minCUSize, the decoding device parses TTSplitMode; otherwise, the value of TTSplitMode is 0.
  • the decoding device parses the CU syntax structure coding_unit() to obtain CU information; if the value of TTSplitMode is 1 or 2, decoding The terminal device sequentially parses the coding_unit() for the three child nodes of the node corresponding to the TTSplitMode to obtain CU information.
  • the decoding end device performs decoding and reconstruction on the coding unit according to the decoding information of the three child nodes of the first node, to obtain an image corresponding to the image data.
  • S805 can refer to the above S604, and details are not described herein again.
  • the division manner corresponding to the second-level coding tree in this embodiment includes only the binary tree division, and the division manner corresponding to the third-level coding tree includes the tri-tree division, and the third The three child nodes of the root node of the level coding tree are the leaf nodes of the third-level coding tree, and the decoding end device can obtain the node division mode information of the second-level coding tree and the node division manner of the third-level coding tree more quickly. The information further increases the decoding rate.
  • the embodiment of the present application further provides an encoding method of image data, which can be applied to the image processing system shown in FIG. 4.
  • the encoding method of the image data includes:
  • the encoding end device determines a CTU corresponding to the image block to be encoded.
  • an image is composed of a plurality of CTUs, and a CTU generally corresponds to a square image area.
  • the encoding end device After acquiring an image, the encoding end device performs encoding processing on each CTU of the image.
  • the coding process of the CPT is the same for each CTU. Therefore, the coding process of one CTU by the coding end device is taken as an example for description.
  • S901 The coding end device divides the CTU according to a node division manner corresponding to the first-level coding tree, to obtain a leaf node of the first-level coding tree.
  • the root node of the first-level coding tree corresponds to the CTU, and the node division manner corresponding to the first-level coding tree is a quad-tree partition.
  • the encoding end device determines the CTU as the root node of the first-level coding tree, and uses the QT division manner to recursively divide the CTU into at least one leaf node.
  • the encoding end device After acquiring the at least one leaf node of the first-level coding tree, the encoding end device determines each leaf node of the first-level coding tree as the root node of the second-level coding tree, and sequentially pairs each of the second-level coding trees.
  • the root nodes perform the following steps until information about all leaf nodes of the second level coding tree is obtained.
  • the embodiment of the present application is described by taking the processing of the first node in the second-level coding tree by the encoding end device as an example.
  • the encoding end device determines, according to the preset condition, a division manner that can be used by the first node in the second-level coding tree, where the preset condition includes: if the division manner corresponding to the parent node of the first node is a tri-tree division, determining Does not divide the first node.
  • the division manner that the first node can use includes no division, horizontal dichotomy, horizontal trisection, vertical dichotomy, vertical trisection, and quadtree division. .
  • the encoding end device needs to calculate the RD cost of the six partitioning modes in turn, resulting in high coding complexity.
  • the embodiment of the present application provides a preset condition for limiting a division manner that can be used by the first node.
  • the preset condition includes: if the parent node of the first node uses the tri-tree partitioning manner, it is determined that the first node is not divided. In this way, after the coding end device determines that the parent node of the first node is divided by the TT division mode, the first node is no longer divided, and the RD cost of the six division manners for the first node is not required to be calculated, thereby reducing the coding complexity.
  • the preset condition further includes: when the width of the image region corresponding to the first node, the height of the image region corresponding to the first node, and the second-level coding tree hierarchy of the first node satisfy a certain condition, determining that the parameter is not allowed
  • the first node uses a first division manner, and the first division manner is at least one of a horizontal dichotomy, a horizontal triad, a vertical dichotomy, a vertical triad, and a quadtree division manner.
  • the first node when the width of the image area corresponding to the first node is equal to the width of the preset minimum CU, the first node is not allowed to use two division modes: vertical binary and vertical three; when the first node corresponds to When the height of the image area is equal to twice the height of the preset minimum CU, the first node is not allowed to use the horizontal three-point division manner; when the first node is the node of the second-level coding tree, the first node is not allowed to use the fourth node.
  • the cross-tree partitioning mode when the second-level coding tree level of the first node is equal to the preset maximum second-level coding tree hierarchy (represented by maxSTDepth), it is determined that the first node is not divided.
  • the foregoing example is only an example of the preset condition in the embodiment of the present application, and the preset condition in the embodiment of the present application may further include restrictions of other types of division manner.
  • the encoding end device encodes the CU corresponding to the first node, and obtains a coding unit code stream corresponding to the CU.
  • the first node is a leaf node of the second-level coding tree, and the first node corresponds to one CU.
  • the encoding end device encodes the CU corresponding to the first node to obtain a coded unit code stream with the CU.
  • the CU coding includes a prediction, a transform, a quantization, and an entropy coding.
  • the encoding end device encodes the CU, and the process of obtaining the CU code stream of the CU mainly includes:
  • the encoding end device selects the intra prediction or the inter prediction according to the prediction mode to obtain the predicted pixel of the CU.
  • the encoding end device changes and quantizes the residual between the original pixel of the CU and the predicted pixel of the CU to obtain a transform coefficient, and performs inverse quantization and inverse transform processing on the obtained transform coefficient, thereby obtaining the CU. Rebuild the residual.
  • the encoding end device adds the predicted pixel of the CU and the reconstructed residual of the CU, and performs loop filtering processing to obtain the reconstructed pixel of the CU.
  • the encoding end device entropy encodes the prediction mode and the transform coefficient of the CU to obtain a CU code stream.
  • the method for generating the CU code stream of the CU may refer to the existing method for generating the CU code stream, and details are not described herein again.
  • the encoding end device calculates an RD cost of each of the division manners that the first node can use.
  • the coding end device divides the first node by using the division manner, and obtains all the CUs after the first node is divided by the division manner, and the coding end device calculates the RD cost of each CU.
  • the sum of the RD costs of all CUs is determined as the RD cost of the division mode.
  • the RD cost of the CU is equal to the sum of the Sum of Squared Errors (SSE) of the reconstructed distortion of the pixel included in the CU and the estimated number of bits of the CU corresponding code stream. with.
  • SSE Sum of Squared Errors
  • the coding end device determines, by using a minimum rate distortion cost, a division manner as a target division manner corresponding to the first node.
  • the coding end device divides the first node by using a target division manner corresponding to the first node.
  • the S902-S906 is sequentially executed for each child node of the first node until all the leaf nodes in the second-level coding tree are acquired.
  • Each leaf node of the second-level coding tree corresponds to one CU, and after obtaining all the leaf nodes of the second-level coding tree, the coding end device can acquire the CU corresponding to each leaf node of the second-level coding tree. It can be seen from S903 that the encoding end device encodes one CU to obtain the CU code stream corresponding to the CU. Therefore, the encoding end device can obtain at least one CU code stream. In this way, the encoding end device can obtain the CTU code stream according to the at least one CU code stream, the node division manner information corresponding to the first level coding tree, and the node division manner information corresponding to the second level coding tree, thereby generating a code stream including the image data. .
  • the preset condition in the embodiment of the present application limits the division of nodes in the second-level coding tree, and the corresponding division manner of a node in the second-level coding tree is a tri-tree division, and the child nodes of the node are no longer Continue to divide, thus greatly reducing the complexity of dividing the nodes in the second-level coding tree and reducing the coding complexity.
  • the embodiment of the present application provides a decoding end device, which is used to perform the steps performed by the decoding end device in the decoding method of the above image data.
  • the decoding device provided by the embodiment of the present application may include a module corresponding to the corresponding step.
  • the embodiment of the present application may perform the division of the function module on the decoding end device according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and may be further divided in actual implementation.
  • FIG. 10 shows a possible structural diagram of the terminal device involved in the foregoing embodiment in the case where the respective functional modules are divided by corresponding functions.
  • the decoding end device includes an obtaining module 1000, a parsing module 1001, and a decoding and resolving module 1010.
  • the obtaining module 1000 is configured to support the decoding end device to perform S600, S700, and/or S800, etc. in the foregoing embodiments, and/or other processes for the techniques described herein;
  • the parsing module 1001 is configured to support the decoding end device Performing S601, S602, S603, S701, S702, S703, S704, S801, S802, S803, and/or S804, etc.
  • decoding reconstruction module 1010 is for supporting the decoding device to perform S604, S705, and/or S805, etc. in the above embodiments, and/or other processes for the techniques described herein. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • the decoding device provided by the embodiment of the present application includes, but is not limited to, the foregoing module.
  • the decoding device may further include a storage module 1011.
  • the storage module 1011 can be used to store program code and data of the decoding end device.
  • the parsing module 1001 and the decoding and resolving module 1011 in the embodiment of the present application may be the processor 57 in FIG. 5, and the obtaining module 1000 may be the RF circuit 50 in FIG. 5 and the RF The antenna 50 is connected to the circuit 50, and the memory module 1011 may be the memory 51 in FIG.
  • the decoding device When the decoding device operates, the decoding device performs a decoding method of the image data of the embodiment shown in any of Figs. 6-8.
  • the decoding method of the specific image data refer to the related description in the embodiment shown in any of the above-mentioned figures in FIG. 6 to FIG. 8 , and details are not described herein again.
  • Another embodiment of the present application further provides a computer readable storage medium including one or more program codes, the one or more programs including instructions, when a processor in a decoding end device is executing the In the program code, the decoding device performs a decoding method of the image data as shown in any of Figs. 6-8.
  • a computer program product comprising computer executed instructions stored in a computer readable storage medium; at least one processor of the decoding end device is The computer readable storage medium reads the computer execution instructions, and the at least one processor executes the computer execution instructions such that the decoding end device implements the decoding end device in the decoding method for performing the image data shown in any of FIGS. 6-8 A step of.
  • the embodiment of the present application provides an encoding end device, which is used to perform the steps performed by the encoding end device in the decoding method of the above image data.
  • the encoding end device provided by the embodiment of the present application may include a module corresponding to the corresponding step.
  • the embodiment of the present application may perform the division of the function module on the encoding end device according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and may be further divided in actual implementation.
  • FIG. 11 is a schematic diagram showing a possible structure of the terminal device involved in the foregoing embodiment, in the case where the respective functional modules are divided by corresponding functions.
  • the encoding end device includes a determining module 1100, a dividing module 1101, an encoding module 1110, and a computing module 1111.
  • the determining module 1100 is configured to support the encoding end device to perform S900, S902, and/or S905 and the like in the above embodiments, and/or other processes for the techniques described herein;
  • the dividing module 1101 is configured to support the encoding end device Performing S901, and/or S906, etc.
  • the encoding end device provided by the embodiment of the present application includes but is not limited to the foregoing module.
  • the encoding end device may further include a storage module 1102, a sending module 1103, and a receiving module 1104.
  • the storage module 1102 can be used to store program code and data of the encoding end device.
  • the transmitting module 1103 and the receiving module 1104 are configured to communicate with other devices.
  • the determining module 1100, the dividing module 1101, the encoding module 1110, and the computing module 1111 in the embodiment of the present application may be the processor 57 in FIG. 5, and the sending module 1103 and the receiving module 1104 may be in the form of an integrated unit.
  • the RF circuit 50 in 5 and the antenna connected to the RF circuit 50, the memory module 1102 may be the memory 51 in FIG.
  • the encoding device When the encoding device operates, the encoding device performs a decoding method of the image data of the embodiment shown in FIG.
  • the decoding method of the specific image data refer to the related description in the embodiment shown in FIG. 9 above, and details are not described herein again.
  • Another embodiment of the present application further provides a computer readable storage medium comprising one or more program codes, the one or more programs including instructions, when a processor in an encoding end device is executing the At the time of the program code, the encoding side device executes the decoding method of the image data as shown in FIG.
  • a computer program product comprising computer executed instructions stored in a computer readable storage medium; at least one processor of the encoding end device is The computer readable storage medium reads the computer execution instructions, and the at least one processor executes the computer execution instructions such that the encoding end device implements the step of the encoding end device in the decoding method of the image data shown in FIG.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used.
  • the combination may be integrated into another device, or some features may be ignored or not performed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to multiple different places. . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a readable storage medium.
  • the technical solution of the embodiments of the present application may be embodied in the form of a software product in the form of a software product in essence or in the form of a contribution to the prior art, and the software product is stored in a storage medium.
  • a number of instructions are included to cause a device (which may be a microcontroller, chip, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

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

Abstract

The present application relates to the field of image processing and addresses the problem of high coding complexity. Disclosed in embodiments of the present application are a method and device for encoding and decoding image data. The method of decoding image data particularly comprises: obtaining a code stream containing image data; parsing the code stream to obtain node dividing scheme information of a first-level coding tree; parsing the code stream to obtain node dividing scheme information of a second-level coding tree; if the node dividing scheme information of the second-level coding tree indicates that a dividing scheme corresponding to a first node in the second-level coding tree is a ternary tree division, parsing the code stream to obtain coding information of three sub-nodes of the first node, wherein each sub-node of the first node corresponds to one coding unit; and according to the coding information of the three sub-nodes of the first node, decoding and reconstructing the coding unit to obtain an image of corresponding image data.

Description

一种图像数据的编码、解码方法及装置Method and device for encoding and decoding image data
本申请要求于2017年06月28日提交中国专利局、申请号为201710509100.0、发明名称为“一种图像数据的编码、解码方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 200910509100.0, entitled "A Method for Encoding, Decoding, and Decoding of Image Data", filed on June 28, 2017, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请实施例涉及图像处理领域,尤其涉及一种图像数据的编码、解码方法及装置。The embodiments of the present invention relate to the field of image processing, and in particular, to a method and an apparatus for encoding and decoding image data.
背景技术Background technique
视频编解码标准H.265将一帧图像分割成互不重叠的编码树单元(Coding Tree Unit,CTU),并将每个CTU作为四叉树(Quad-Tree,QT)的根节点,按照QT结构将每个CTU递归划分为若干个叶节点。QT结构中的每个节点对应一个图像区域。如果某一节点不再划分,则该节点称为叶节点,它对应的图像区域形成一个编码单元(Coding Unit,CU)。因此,可以认为H.265是一种将CTU划分为一组CU的过程。将CTU划分成一组CU的划分方式对应于一个编码树(coding tree)。The video codec standard H.265 divides a frame of image into Coding Tree Units (CTUs) that do not overlap each other, and uses each CTU as the root node of a Quad-Tree (QT) according to QT. The structure recursively divides each CTU into several leaf nodes. Each node in the QT structure corresponds to an image area. If a node is no longer divided, the node is called a leaf node, and its corresponding image area forms a coding unit (CU). Therefore, H.265 can be considered as a process of dividing a CTU into a group of CUs. The division of the CTU into a group of CUs corresponds to a coding tree.
未来视频编码联合探索组(Joint Exploration team on Future Video Coding,JVET)参考软件联合探索模型(Joint Exploration Model,JEM)提出了QTBT划分方式,即第一级编码树中的节点采用QT划分方式,第二级编码树中的节点采用二叉树(Binary Tree,BT)划分方式(BT划分方式包括“水平二分”和“竖直二分”)。具体的,将CTU先按照QT划分方式划分,以获取若干个QT叶节点;QT的叶节点可以按照BT划分方式划分。QTBT划分方式中CU形状更加多样,能够更好地适应局部图像的内容。The Joint Exploration Team on Future Video Coding (JVET) reference software Joint Exploration Model (JEM) proposed the QTBT division method, that is, the nodes in the first-level coding tree adopt the QT division method. The nodes in the second-level coding tree adopt the Binary Tree (BT) division method (the BT division method includes "horizontal dichotomy" and "vertical dichotomy"). Specifically, the CTU is first divided according to the QT division manner to obtain a plurality of QT leaf nodes; the leaf nodes of the QT may be divided according to the BT division manner. In the QTBT division mode, the CU shape is more diverse and can better adapt to the content of the partial image.
但是,对于每个节点,编码端设备通常需要计算该节点能够使用的每一种划分方式的率失真代价(Rate Distortion cost,RD cost),比较计算出的RD cost,并将最小的RD cost所对应的划分方式确定为该节点的划分方式。因此,对于每个节点,编码端设备均需要计算多种划分方式的RD cost,这样的话,编码复杂度较高。However, for each node, the encoding end device usually needs to calculate the Rate Distortion Cost (RD cost) for each partitioning method that the node can use, compare the calculated RD cost, and the smallest RD cost. The corresponding division mode is determined as the division manner of the node. Therefore, for each node, the coding end device needs to calculate the RD cost of multiple division modes, so that the coding complexity is high.
发明内容Summary of the invention
本申请实施例提供一种图像数据的编码、解码方法及装置,能够解决目前编码复杂度较高的问题。The embodiment of the present application provides a method and an apparatus for encoding and decoding image data, which can solve the problem of high coding complexity.
为达到上述目的,本申请实施例采用如下技术方案:To achieve the above objective, the embodiment of the present application adopts the following technical solutions:
第一方面,提供一种图像数据的解码方法,解码端设备在得到包含图像数据的码流后,通过解析该码流,得到第一级编码树的节点划分方式信息和第二级编码树的节点划分方式信息,如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,该解码端设备通过解析码流,得到第一节点的三个子节点的编码信息,第一节点的一个子节点对应一个编码单元CU,这样,该解码端设备可根据第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。本申请中第一级编码树的根节点对应一个CTU,第一级编码树的叶 节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的,第二级编码树的根节点为第一级编码树的一个叶节点。In a first aspect, a method for decoding image data is provided. After obtaining a code stream including image data, the decoding end device obtains node partitioning mode information of the first-level coding tree and a second-level coding tree by parsing the code stream. The node division mode information, if the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition, the decoding end device obtains the first node by parsing the code stream. The coding information of the three child nodes, one child node of the first node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three child nodes of the first node, and obtain corresponding image data. Image. In this application, the root node of the first-level coding tree corresponds to one CTU, and the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree. Instructed, the root node of the second level coding tree is a leaf node of the first level coding tree.
本申请实施例中的解码端设备只需确定第一节点对应的划分方式为三叉树划分,即可直接得到第一节点的三个子节点的编码信息,无需再依次对第一节点的三个子节点进行解码,加快了解码的速率,降低了解码的复杂度。The decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to the first node is a tri-tree partition, and the encoding information of the three child nodes of the first node can be directly obtained, and the three child nodes of the first node need not be sequentially performed. Decoding is performed to speed up the decoding and reduce the complexity of decoding.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式与第二级编码树对应的节点划分方式不相同Optionally, in a possible implementation manner of the application, the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
可选的,在本申请的另一种可能的实现方式中,第一级编码树对应的节点划分方式包括四叉树划分,第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。Optionally, in another possible implementation manner of the present application, the node division manner corresponding to the first-level coding tree includes a quad-tree division, and the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division .
第二方面,提供一种解码端设备,该解码端设备包括获取模块、解析模块以及解码重建模块。其中,上述获取模块,用于得到包含图像数据的码流。上述解析模块,用于解析上述获取模块获取到的码流,得到第一级编码树的节点划分方式信息,其中,第一级编码树的根节点对应一个编码树单元CTU,第一级编码树的叶节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的,以及用于解析码流,得到第二级编码树的节点划分方式信息,其中,第二级编码树的根节点为第一级编码树的一个叶节点,以及用于如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,解析码流,得到第一节点的三个子节点的编码信息,其中,第一节点的一个子节点对应一个编码单元CU。上述解码重建模块,用于根据上述解析模块得到的第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。In a second aspect, a decoding end device is provided, where the decoding end device includes an obtaining module, a parsing module, and a decoding rebuilding module. The obtaining module is configured to obtain a code stream that includes image data. The parsing module is configured to parse the code stream acquired by the acquiring module, and obtain node partitioning mode information of the first-level coding tree, where the root node of the first-level coding tree corresponds to a coding tree unit CTU, and the first-level coding tree The leaf node is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree, and is used for parsing the code stream to obtain the node division manner of the second-level coding tree. Information, wherein a root node of the second-level coding tree is a leaf node of the first-level coding tree, and information for the node division mode of the second-level coding tree indicates that the first node in the second-level coding tree corresponds to The division mode is a tri-tree division, and the code stream is parsed to obtain coding information of three child nodes of the first node, wherein one child node of the first node corresponds to one coding unit CU. The decoding reconstruction module is configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式与第二级编码树对应的节点划分方式不相同。Optionally, in a possible implementation manner of the application, the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
可选的,在本申请的另一种可能的实现方式中,第一级编码树对应的节点划分方式包括四叉树划分,第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。Optionally, in another possible implementation manner of the present application, the node division manner corresponding to the first-level coding tree includes a quad-tree division, and the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division .
本申请中第二方面及其各种实现方式的具体描述,可以参考第一方面及其各种实现方式中的详细描述;并且,第二方面及其各种实现方式的有益效果,可以参考第一方面及其各种实现方式中的有益效果分析,此处不再赘述。For a detailed description of the second aspect and various implementations of the present application, reference may be made to the detailed description of the first aspect and various implementations thereof; and the beneficial effects of the second aspect and various implementations thereof may be referred to The analysis of the beneficial effects on the one hand and its various implementations will not be repeated here.
第三方面,提供一种图像数据的解码方法,解码端设备在得到包含图像数据的码流后,通过解析该码流,得到第一级编码树的节点划分方式信息和第二级编码树的节点划分方式信息,如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为不继续按照第二级编码树的划分方式进行划分,该解码端设备通过解析码流,得到第三级编码树的节点划分方式信息;如果第三级编码树的节点划分方式信息指示第一节点对应的划分方式为三叉树划分,该解码端设备通过解析码流,得到第一节点的三个子节点的编码信息,第一节点的一个子节点对应一个编码单元CU,这样,该解码端设备可根据第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。本申请中第一级编码树的根节点对应一个CTU,第一级编码树的叶节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的,第二级编码树的根节点为第一级编码树的一个叶节点,第一节点为第三级编码树的一个根节点。In a third aspect, a method for decoding image data is provided. After obtaining a code stream containing image data, the decoding end device obtains node partitioning mode information of the first-level coding tree and the second-level coding tree by parsing the code stream. The node division mode information, if the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is not continued to be divided according to the division manner of the second-level coding tree, the decoding end device The node division mode information of the third-level coding tree is obtained by parsing the code stream; if the node division mode information of the third-level coding tree indicates that the division manner corresponding to the first node is a tri-tree division, the decoding end device parses the code stream, The coding information of the three child nodes of the first node is obtained, and one child node of the first node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three child nodes of the first node. , an image corresponding to the image data is obtained. In this application, the root node of the first-level coding tree corresponds to one CTU, and the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree. Instructed, the root node of the second-level coding tree is a leaf node of the first-level coding tree, and the first node is a root node of the third-level coding tree.
本申请实施例中的解码端设备只需确定第一节点对应的划分方式为三叉树划分,即可直接得到第一节点的三个子节点的编码信息,无需再依次对第一节点的三个子节点进行解码,加快了解码的速率,降低了解码的复杂度。The decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to the first node is a tri-tree partition, and the encoding information of the three child nodes of the first node can be directly obtained, and the three child nodes of the first node need not be sequentially performed. Decoding is performed to speed up the decoding and reduce the complexity of decoding.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式包括四叉树划分,第二级编码树对应的节点划分方式包括二叉树划分,第三级编码对应的节点划分方式包括三叉树划分。Optionally, in a possible implementation manner of the present application, the node division manner corresponding to the first-level coding tree includes a quad-tree division, and the node division manner corresponding to the second-level coding tree includes a binary tree division, and the third-level coding The corresponding node division manner includes a tri-tree division.
第四方面,提供一种解码端设备,该解码端设备包括获取模块、解析模块和解码重建模块。其中,上述获取模块,用于得到包含图像数据的码流。上述解析模块,用于解析上述获取模块获取到的码流,得到第一级编码树的节点划分方式信息,其中,第一级编码树的根节点对应一个编码树单元CTU,第一级编码树的叶节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的,以及用于解析码流,得到第二级编码树的节点划分方式信息,其中,第二级编码树的根节点为第一级编码树的一个叶节点,以及用于如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为不继续按照第二级编码树的划分方式进行划分,解析码流,得到第三级编码树的节点划分方式信息,其中,第三级编码树的根节点为第一节点,以及用于如果第三级编码树的节点划分方式信息指示第一节点对应的划分方式为三叉树划分,解析码流,得到第一节点的三个子节点的编码信息,其中,第一节点的一个子节点对应一个编码单元CU。上述解码重建模块,用于根据上述解析模块得到的第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。In a fourth aspect, a decoding end device is provided, where the decoding end device includes an obtaining module, a parsing module, and a decoding rebuilding module. The obtaining module is configured to obtain a code stream that includes image data. The parsing module is configured to parse the code stream acquired by the acquiring module, and obtain node partitioning mode information of the first-level coding tree, where the root node of the first-level coding tree corresponds to a coding tree unit CTU, and the first-level coding tree The leaf node is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree, and is used for parsing the code stream to obtain the node division manner of the second-level coding tree. Information, wherein a root node of the second-level coding tree is a leaf node of the first-level coding tree, and information for the node division mode of the second-level coding tree indicates that the first node in the second-level coding tree corresponds to The division mode is not to continue to divide according to the division manner of the second-level coding tree, and the code stream is parsed to obtain the node division manner information of the third-level coding tree, wherein the root node of the third-level coding tree is the first node, and If the node division mode information of the third-level coding tree indicates that the division manner corresponding to the first node is a tri-tree partition, the code stream is parsed, and the first node is obtained. Coding information child nodes, wherein a first node of the child node corresponding to one coding unit CU. The decoding reconstruction module is configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式包括四叉树划分,第二级编码树对应的节点划分方式包括二叉树划分,第三级编码对应的节点划分方式包括三叉树划分。Optionally, in a possible implementation manner of the present application, the node division manner corresponding to the first-level coding tree includes a quad-tree division, and the node division manner corresponding to the second-level coding tree includes a binary tree division, and the third-level coding The corresponding node division manner includes a tri-tree division.
本申请中第四方面及其各种实现方式的具体描述,可以参考第三方面及其各种实现方式中的详细描述;并且,第四方面及其各种实现方式的有益效果,可以参考第三方面及其各种实现方式中的有益效果分析,此处不再赘述。For a detailed description of the fourth aspect of the present application and various implementations thereof, reference may be made to the detailed description in the third aspect and various implementation manners thereof; and the beneficial effects of the fourth aspect and various implementation manners thereof may be referred to The analysis of the beneficial effects in the three aspects and various implementations will not be repeated here.
第五方面,提供一种图像数据的解码方法,解码端设备在得到包含图像数据的码流后,通过解析该码流,得到用于指示是否限制三叉树划分得到的节点继续进行划分的三叉树叶节点模式标识、第一级编码树的节点划分方式信息和第二级编码树的节点划分方式信息,如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,且三叉树叶节点模式标识指示限制三叉树划分得到的节点继续进行划分,该解码端设备通过解析码流,得到第一节点的三个子节点的编码信息,第一节点的一个子节点对应一个编码单元CU,这样,该解码端设备可根据第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。本申请中第一级编码树的根节点对应一个CTU,第一级编码树的叶节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的,第二级编码树的根节点为第一级编码树的一个叶节点。In a fifth aspect, a decoding method for image data is provided. After obtaining a code stream including image data, the decoding end device parses the code stream to obtain a trigeminal leaf for indicating whether to limit the division of the trigeminal tree to continue dividing. a node mode identifier, node partitioning mode information of the first level coding tree, and node partitioning mode information of the second level coding tree, if the node partitioning mode information of the second level coding tree indicates the first node corresponding to the second level coding tree The division mode is a tri-tree division, and the tri-tree leaf node pattern identifier indicates that the node obtained by limiting the tri-tree division continues to be divided, and the decoding end device obtains the coding information of the three child nodes of the first node by parsing the code stream, and the first node One sub-node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three sub-nodes of the first node, and obtain an image corresponding to the image data. In this application, the root node of the first-level coding tree corresponds to one CTU, and the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree. Instructed, the root node of the second level coding tree is a leaf node of the first level coding tree.
本申请实施例增加了限制节点划分的条件:若某一节点的父节点对应的划分方式为三叉树划分,则该节点不再继续划分。解码端设备只需确定某一节点对应的划分方 式为三叉树划分,即可直接得到该节点的子节点的编码信息,无需再依次对该节点的所有子节点进行解码,加快了解码的速率,降低了解码的复杂度。此外,解码端设备可根据三叉树叶节点模式标识确定节点划分的限制情况,从而自适应地获取每一级编码树的节点划分信息。The embodiment of the present application adds a condition for restricting node division: if the division manner corresponding to the parent node of a node is a tri-tree division, the node does not continue to divide. The decoding end device only needs to determine that the corresponding division manner of a certain node is a tri-tree division, and the coding information of the child node of the node can be directly obtained, and the decoding of all the child nodes of the node is not required, thereby speeding up the decoding rate. Reduced the complexity of decoding. In addition, the decoding end device may determine the limitation of the node division according to the tri-tree leaf node mode identifier, thereby adaptively acquiring the node division information of each level coding tree.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式与第二级编码树对应的节点划分方式不相同。Optionally, in a possible implementation manner of the application, the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
第六方面,提供一种解码端设备,该解码端设备包括获取模块、解析模块和解码重建模块。其中,上述获取模块,用于得到包含图像数据的码流。上述解析模块,用于解析上述获取模块获取到的码流,得到三叉树叶节点模式标识,三叉树叶节点模式标识用于指示是否限制三叉树划分得到的节点继续进行划分,以及用于解析码流,得到第一级编码树的节点划分方式信息,其中,第一级编码树的根节点对应一个编码树单元CTU,第一级编码树的叶节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的,以及用于解析码流,得到第二级编码树的节点划分方式信息,其中,第二级编码树的根节点为第一级编码树的一个叶节点,以及用于如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,且三叉树叶节点模式标识指示限制三叉树划分得到的节点继续进行划分,解析码流,得到第一节点的三个子节点的编码信息,其中,第一节点的一个子节点对应一个编码单元CU。上述解码重建模块,用于根据上述解析模块得到的第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。In a sixth aspect, a decoding end device is provided, where the decoding end device includes an obtaining module, a parsing module, and a decoding rebuilding module. The obtaining module is configured to obtain a code stream that includes image data. The parsing module is configured to parse the code stream acquired by the acquiring module to obtain a tri-tree leaf node mode identifier, where the tri-tree leaf node mode identifier is used to indicate whether the node obtained by limiting the tri-tree partitioning is further divided, and is used for parsing the code stream. Obtaining node partitioning mode information of the first-level coding tree, where the root node of the first-level coding tree corresponds to one coding tree unit CTU, and the leaf node of the first-level coding tree is corresponding to the node division mode information of the first-level coding tree The node division manner is indicated by the root node of the first-level coding tree, and is used for parsing the code stream to obtain node division manner information of the second-level coding tree, wherein the root node of the second-level coding tree is the first level a leaf node of the coding tree, and a node division mode information for if the second level coding tree indicates that the first node corresponding to the second level coding tree corresponds to a trinomial division, and the trigeminal leaf node mode identifier indicates a restricted trigeminal The nodes obtained by the tree division continue to divide, parsing the code stream, and obtaining the coded letters of the three child nodes of the first node. Wherein a first node of the child node corresponding to one coding unit CU. The decoding reconstruction module is configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式与第二级编码树对应的节点划分方式不相同。Optionally, in a possible implementation manner of the application, the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
本申请中第六方面及其各种实现方式的具体描述,可以参考第五方面及其各种实现方式中的详细描述;并且,第六方面及其各种实现方式的有益效果,可以参考第五方面及其各种实现方式中的有益效果分析,此处不再赘述。For a detailed description of the sixth aspect and various implementation manners of the present application, reference may be made to the fifth aspect and the detailed description in the various implementation manners; and the beneficial effects of the sixth aspect and various implementation manners thereof may be referred to The analysis of the beneficial effects in the five aspects and various implementations will not be repeated here.
第七方面,提供一种图像数据的编码方法,编码端设备在确定与待编码图像块对应的CTU后,将该CTU按照第一级编码树对应的节点划分方式进行划分,得到第一级编码树的叶节点,其中,第一级编码树的根节点对应该CTU;编码端设备根据预设条件,确定第二级编码树中的第一节点能够使用的划分方式,第二级编码树的根节点为第一级编码树的一个叶节点,预设条件包括:若第一节点的父节点对应的划分方式为三叉树划分,确定不划分第一节点;如果第一节点能够使用的划分方式为不划分,该编码端设备对与第一节点对应的编码单元进行编码,得到对应编码单元的编码单元码流。In a seventh aspect, a method for encoding image data is provided. After determining a CTU corresponding to an image block to be encoded, the encoding end device divides the CTU according to a node division manner corresponding to the first-level coding tree, to obtain a first-level coding. a leaf node of the tree, wherein the root node of the first-level coding tree corresponds to the CTU; the coding end device determines, according to the preset condition, a division manner that the first node in the second-level coding tree can use, and the second-level coding tree The root node is a leaf node of the first-level coding tree, and the preset condition includes: if the division mode corresponding to the parent node of the first node is a tri-tree division, determining that the first node is not divided; if the first node can use the division manner For no division, the encoding end device encodes the coding unit corresponding to the first node to obtain a coding unit code stream corresponding to the coding unit.
本申请实施例中的预设条件限制了第二级编码树中的节点的划分,第二级编码树中的某一节点对应的划分方式为三叉树划分,则该节点的子节点将不再继续划分,这样,大幅度的减少了划分第二级编码树中节点的复杂度,降低了编码复杂度。The preset condition in the embodiment of the present application limits the division of nodes in the second-level coding tree, and the corresponding division manner of a node in the second-level coding tree is a tri-tree division, and the child nodes of the node are no longer Continue to divide, thus greatly reducing the complexity of dividing the nodes in the second-level coding tree and reducing the coding complexity.
此外,由于第二级编码树中的某一节点对应的划分方式为三叉树划分,则该节点的子节点将不再继续划分,这样,编码端设备完成编码后发送的码流中可以不再包括该节点的子节点的划分信息,节省了传输比特,降低了码流的长度。In addition, since the mapping manner of a node in the second-level coding tree is tri-tree partitioning, the child nodes of the node will not continue to be divided, so that the code stream sent by the encoding end device after encoding is no longer The division information including the child nodes of the node saves transmission bits and reduces the length of the code stream.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式与第二级编码树对应的节点划分方式不相同。Optionally, in a possible implementation manner of the application, the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
可选的,在本申请的另一种可能的实现方式中,如果第一节点能够使用的划分方式未包括不划分,编码端设备计算第一节点能够使用的划分方式中的每种划分方式的率失真代价,并将最小的率失真代价对应的划分方式确定为第一节点对应的目标划分方式,这样编码端设备即可使用第一节点对应的目标划分方式划分第一节点。Optionally, in another possible implementation manner of the present application, if the partitioning manner that the first node can use does not include no partitioning, the encoding end device calculates, for each of the partitioning manners that the first node can use. The rate distortion cost is determined, and the division mode corresponding to the minimum rate distortion cost is determined as the target division mode corresponding to the first node, so that the coding end device can divide the first node by using the target division manner corresponding to the first node.
可选的,在本申请的另一种可能的实现方式中,第一级编码树对应的节点划分方式包括四叉树划分,第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。Optionally, in another possible implementation manner of the present application, the node division manner corresponding to the first-level coding tree includes a quad-tree division, and the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division .
第八方面,提供一种编码端设备,该编码端设备包括确定模块、划分模块和编码模块。其中,上述确定模块,用于确定与待编码图像块对应的编码树单元CTU。上述划分模块,用于将上述确定模块确定的CTU按照第一级编码树对应的节点划分方式进行划分,得到第一级编码树的叶节点,第一级编码树的根节点对应CTU。上述确定模块,还用于根据预设条件,确定第二级编码树中的第一节点能够使用的划分方式,预设条件包括:若第一节点的父节点对应的划分方式为三叉树划分,确定不划分第一节点,第二级编码树的根节点为第一级编码树的一个叶节点。上述编码模块,用于如果上述确定模块确定出的第一节点能够使用的划分方式为不划分,对与第一节点对应的编码单元CU进行编码,得到对应编码单元的编码单元码流。In an eighth aspect, an encoding end device is provided, the encoding end device comprising a determining module, a dividing module and an encoding module. The determining module is configured to determine a coding tree unit CTU corresponding to the image block to be encoded. The dividing module is configured to divide the CTU determined by the determining module according to a node partitioning manner corresponding to the first-level coding tree, to obtain a leaf node of the first-level coding tree, where the root node of the first-level coding tree corresponds to the CTU. The determining module is further configured to determine, according to a preset condition, a division manner that can be used by the first node in the second-level coding tree, where the preset condition includes: if the division manner corresponding to the parent node of the first node is a tri-tree division, It is determined that the first node is not divided, and the root node of the second-level coding tree is a leaf node of the first-level coding tree. The coding module is configured to: if the division manner that is determined by the determining module is not to be divided, the coding unit CU corresponding to the first node is encoded to obtain a coding unit code stream corresponding to the coding unit.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式与第二级编码树对应的节点划分方式不相同。Optionally, in a possible implementation manner of the application, the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
可选的,在本申请的一种可能的实现方式中,本申请实施例提供的编码端设备还包括计算模块,该计算模块用于如果上述确定模块确定第一节点能够使用的划分方式未包括不划分,计算第一节点能够使用的划分方式中的每种划分方式的率失真代价。上述确定模块,还用于将最小的率失真代价对应的划分方式确定为第一节点对应的目标划分方式。上述划分模块具体用于使用上述确定模块确定的第一节点对应的目标划分方式划分第一节点。Optionally, in a possible implementation manner of the present application, the encoding end device provided by the embodiment of the present application further includes a computing module, where the calculating module is configured to: if the determining module determines that the first node is usable, the dividing manner is not included. Without division, the rate distortion cost of each of the division modes that the first node can use is calculated. The determining module is further configured to determine a partitioning manner corresponding to a minimum rate distortion cost as a target partitioning manner corresponding to the first node. The dividing module is specifically configured to divide the first node by using a target dividing manner corresponding to the first node determined by the determining module.
可选的,在本申请的一种可能的实现方式中,第一级编码树对应的节点划分方式包括四叉树划分,第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。Optionally, in a possible implementation manner of the present application, the node division manner corresponding to the first-level coding tree includes a quad-tree division, and the node division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division.
本申请中第八方面及其各种实现方式的具体描述,可以参考第七方面及其各种实现方式中的详细描述;并且,第八方面及其各种实现方式的有益效果,可以参考第七方面及其各种实现方式中的有益效果分析,此处不再赘述。For a detailed description of the eighth aspect of the present application and various implementations thereof, reference may be made to the detailed description in the seventh aspect and various implementation manners thereof; and the beneficial effects of the eighth aspect and various implementation manners thereof may be referred to The analysis of the beneficial effects in the seven aspects and various implementations will not be repeated here.
第九方面,提供一种解码端设备,其特征在于,解码端设备包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处理器执行指令时,解码端设备执行如上述第一方面、第三方面、第四方面、第六方面及其任意一种可能的实现方式所述的图像数据的解码方法。According to a ninth aspect, a decoding end device is provided, wherein the decoding end device comprises: one or more processors, a memory, and a communication interface. The memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, the computer program code comprising instructions, when the one or more processors execute the instructions, the decoding device performs the first aspect, The method for decoding image data according to the third aspect, the fourth aspect, the sixth aspect, and any one of the possible implementation manners.
第十方面,提供一种编码端设备,其特征在于,编码端设备包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处理器执行指令时,编码端设备执行如上述第八方面及其任意一种可能的实现方式所述的图像数据的编码 方法。A tenth aspect provides an encoding end device, wherein the encoding end device comprises: one or more processors, a memory, and a communication interface. The memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, the computer program code comprising instructions, and when the one or more processors execute the instructions, the encoding end device performs the eighth aspect as described above An encoding method of image data as described in any of the possible implementations.
第十一方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在解码端设备上运行时,使得所述解码端设备执行如上述第一方面、第三方面、第四方面、第六方面及其任意一种可能的实现方式所述的图像数据的解码方法。In an eleventh aspect, a computer readable storage medium is provided, wherein the computer readable storage medium stores instructions, wherein when the instructions are run on a decoding end device, the decoding end device is configured to perform The method for decoding image data according to the first aspect, the third aspect, the fourth aspect, the sixth aspect, and any one of the possible implementation manners.
第十二方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在编码端设备上运行时,使得所述编码端设备执行如上述第八方面及其任意一种可能的实现方式所述的图像数据的编码方法。According to a twelfth aspect, a computer readable storage medium is provided, wherein the computer readable storage medium stores instructions, wherein when the instructions are run on an encoding device, the encoding device is configured to perform The encoding method of the image data described in the above eighth aspect and any one of the possible implementation manners.
第十三方面,提供一种包含指令的计算机程序产品,当该计算机程序产品在解码端设备上运行时,使得解码端设备执行如上述第一方面、第三方面、第四方面、第六方面及其任意一种可能的实现方式所述的图像数据的解码方法。A thirteenth aspect, a computer program product comprising instructions for causing a decoding end device to perform the first aspect, the third aspect, the fourth aspect, and the sixth aspect as described above when the computer program product is run on the decoding end device And a decoding method of the image data as described in any of the possible implementations.
第十四方面,提供一种包含指令的计算机程序产品,当该计算机程序产品在编码端设备上运行时,使得编码端设备执行如上述第八方面及其任意一种可能的实现方式所述的图像数据的编码方法。A fourteenth aspect, a computer program product comprising instructions for causing an encoding end device to perform the apparatus as described in the eighth aspect above and any one of the possible implementations as described above, when the computer program product is run on the encoding end device The encoding method of image data.
在本申请中,上述解码端设备和编码端设备的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本申请类似,属于本申请权利要求及其等同技术的范围之内。In the present application, the names of the above-mentioned decoding end device and the encoding end device are not limited to the device or the functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of the respective devices or functional modules are similar to the present application, they are within the scope of the claims and their equivalents.
本申请的这些方面或其他方面在以下的描述中会更加简明易懂。These and other aspects of the present application will be more apparent from the following description.
附图说明DRAWINGS
图1为本申请实施例提供的不同划分方式的结构示意图;FIG. 1 is a schematic structural diagram of different division manners provided by an embodiment of the present application;
图2为本申请实施例提供的四叉树层级的结构示意图;2 is a schematic structural diagram of a quadtree hierarchy according to an embodiment of the present application;
图3为本申请实施例提供的四叉树划分和二叉树划分的组合划分示意图;FIG. 3 is a schematic diagram of a combined division of a quadtree partition and a binary tree partition according to an embodiment of the present disclosure;
图4为本申请实施例提供的图像处理系统的结构示意图;4 is a schematic structural diagram of an image processing system according to an embodiment of the present application;
图5为本申请实施例提供的一种手机的硬件结构示意图;FIG. 5 is a schematic structural diagram of hardware of a mobile phone according to an embodiment of the present application;
图6为本申请实施例提供的图像数据的解码方法流程示意图一;FIG. 6 is a schematic flowchart 1 of a method for decoding image data according to an embodiment of the present application;
图7为本申请实施例提供的图像数据的解码方法流程示意图二;FIG. 7 is a second schematic flowchart of a method for decoding image data according to an embodiment of the present disclosure;
图8为本申请实施例提供的图像数据的解码方法流程示意图三;FIG. 8 is a schematic flowchart 3 of a method for decoding image data according to an embodiment of the present disclosure;
图9为本申请实施例提供的图像数据的编码方法流程示意图;FIG. 9 is a schematic flowchart of a method for encoding image data according to an embodiment of the present application;
图10为本申请实施例提供的解码端设备的结构示意图;FIG. 10 is a schematic structural diagram of a decoding end device according to an embodiment of the present disclosure;
图11为本申请实施例提供的编码端设备的结构示意图。FIG. 11 is a schematic structural diagram of an apparatus of an encoding end according to an embodiment of the present disclosure.
具体实施方式Detailed ways
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于限定特定顺序。The terms "first", "second", "third", and "fourth" and the like in the specification and claims of the present application and the above drawings are used to distinguish different objects, and are not intended to limit the specific order.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, the words "exemplary" or "such as" are used to mean an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words "exemplary" or "such as" is intended to present the concepts in a particular manner.
为了方便理解本申请实施例,首先在此介绍本申请实施例涉及到的相关要素。In order to facilitate the understanding of the embodiments of the present application, the related elements involved in the embodiments of the present application are first introduced herein.
编码树单元(Coding Tree Unit,CTU):一幅图像由多个CTU构成,一个CTU 通常对应于一个方形图像区域,如图1(a)所示,图像10由多个CTU构成(包括CTU A、CTU B、CTU C等)。与某一CTU对应的编码信息包含与该CTU对应的方形图像区域中的像素的亮度值和/或色度值。此外,与某一CTU对应的编码信息还可以包含语法元素,这些语法元素指示如何将该CTU划分成至少一个CU,以及解码每个CU以得到重建图像的方法。Coding Tree Unit (CTU): An image consists of multiple CTUs. One CTU usually corresponds to a square image area. As shown in Figure 1(a), image 10 consists of multiple CTUs (including CTU A). , CTU B, CTU C, etc.). The coding information corresponding to a certain CTU includes luminance values and/or chrominance values of pixels in a square image region corresponding to the CTU. Furthermore, the coding information corresponding to a certain CTU may further include syntax elements indicating how to divide the CTU into at least one CU, and a method of decoding each CU to obtain a reconstructed image.
一个CTU对应的图像区域可以包括64×64、128×128或256×256个像素。在一个示例中,64×64个像素的CTU包含由64列、每列64个像素的矩形像素点阵,每个像素包含亮度分量和/或色度分量。An image area corresponding to one CTU may include 64×64, 128×128, or 256×256 pixels. In one example, a CTU of 64x64 pixels contains a rectangular pixel lattice of 64 columns of 64 pixels per column, each pixel containing a luminance component and/or a chrominance component.
可以理解的是,CTU也可以对应矩形图像区域或者其它形状的图像区域,一个CTU对应的图像区域也可以是水平方向的像素点的数量与竖直方向的像素点数量不同的图像区域,例如包括64×128个像素。It can be understood that the CTU can also correspond to a rectangular image area or an image area of other shapes. The image area corresponding to one CTU may also be an image area in which the number of pixels in the horizontal direction is different from the number of pixels in the vertical direction, for example, including 64 × 128 pixels.
编码单元(Coding Unit,CU):通常对应于一个A×B的矩形区域,A为矩形的宽,B为矩形的高,其中,本申请实施例中涉及到的宽是指图1示出的二维直角坐标系XoY中沿X轴方向(水平方向)的长度,高是指图1示出的二维直角坐标系XoY中沿Y轴方向(竖直方向)的长度。这里,A和B的取值可以相同,也可以不同。A和B的取值通常为2的整数次幂,例如:256、128、64、32、16、8或4等。一个CU可通过解码处理得到一个A×B的矩形区域的重建图像块,解码处理通常包括预测(prediction)、反量化(dequantization)、反变换(inverse transform)等处理,产生预测图像和残差,预测图像和残差叠加后得到重建图像块。多个重建图像块可以得到最终的重建图像。Coding Unit (CU): generally corresponds to a rectangular area of A×B, A is the width of the rectangle, and B is the height of the rectangle. The width referred to in the embodiment of the present application refers to the width shown in FIG. 1 . The length in the X-axis direction (horizontal direction) in the two-dimensional Cartesian coordinate system XoY, the height refers to the length in the Y-axis direction (vertical direction) in the two-dimensional Cartesian coordinate system XoY shown in FIG. Here, the values of A and B may be the same or different. The values of A and B are usually an integer power of 2, for example: 256, 128, 64, 32, 16, 8, or 4. A CU can obtain a reconstructed image block of an A×B rectangular region by decoding processing, and the decoding process usually includes processing such as prediction, dequantization, and inverse transform to generate a predicted image and a residual. The reconstructed image block is obtained by superimposing the predicted image and the residual. A plurality of reconstructed image blocks can be used to obtain a final reconstructed image.
四叉树(Quad-Tree,QT):一种树状结构,一个节点可划分为四个子节点。在一个示例中,视频编解码标准H.265采用基于四叉树的CTU划分方式:将CTU作为根节点,每个节点对应于一个方形图像区域;对于某一节点,可以不再划分该节点(此时该节点对应的方形图像区域为一个CU),也可以将该节点划分成四个下一层级的节点,即把该节点对应的方形图像区域划分成四个大小相同的方形区域(其宽、高各为划分前区域宽、高的一半),每个区域对应于一个节点。如图1(b)所示,CTU A为根节点,将CTU A划分为a、b、c和d四个节点,若不再划分a节点,则a节点对应的方形图像区域对应一个CU。Quad-Tree (QT): A tree structure in which one node can be divided into four sub-nodes. In one example, the video codec standard H.265 adopts a quadtree-based CTU partitioning method: a CTU is used as a root node, and each node corresponds to a square image area; for a node, the node can no longer be divided ( At this time, the square image area corresponding to the node is a CU), and the node may be divided into four lower level nodes, that is, the square image area corresponding to the node is divided into four square areas of the same size (the width thereof) The height is half of the width and height of the front area, and each area corresponds to one node. As shown in Figure 1(b), CTU A is the root node, and CTU A is divided into four nodes a, b, c, and d. If the node a is not divided, the square image area corresponding to node a corresponds to one CU.
二叉树(Binary Tree,BT):一种树状结构,一个节点可划分成两个子节点。对于二叉树结构上的某一节点,可以不再划分该节点,也可以将该节点划分成两个下一层级的节点。二叉树划分方式可以包括:Binary Tree (BT): A tree structure in which a node can be divided into two sub-nodes. For a node on the binary tree structure, the node may not be divided, or the node may be divided into two nodes of the next level. The binary tree division method can include:
(1)、水平二分(1), horizontal two points
将节点对应的图像区域划分成上、下两个相同大小的区域,即被划分的图像区域的宽保持不变,高变为被划分的图像区域的一半,划分后的每个图像区域对应于一个子节点。如图1(c)所示,节点b使用水平二分划分方式划分,生成节点e和节点f。The image area corresponding to the node is divided into upper and lower areas of the same size, that is, the width of the divided image area remains unchanged, and the height becomes half of the divided image area, and each divided image area corresponds to A child node. As shown in FIG. 1(c), the node b is divided by a horizontal binary division method to generate a node e and a node f.
(2)、竖直二分(2), vertical two points
将节点对应的区域划分成左、右两个大小相同的区域,即被划分的图像区域的高保持不变,宽变为被划分的图像区域的一半,划分后的每个图像区域对应于一个子节点。如图1(d)所示,节点d使用竖直二分划分方式划分,生成节点g和节点h。The area corresponding to the node is divided into left and right areas of the same size, that is, the height of the divided image area remains unchanged, the width becomes half of the divided image area, and each divided image area corresponds to one Child node. As shown in Fig. 1(d), the node d is divided by a vertical binary division method to generate a node g and a node h.
可以理解的是,上述水平二分和竖直二分是对二叉树划分方式的一种示例。可以采用别的方式将节点对应的图像区域划分为两个子区域。例如水平划分两个高不相等的子区域,或者竖直划分为两个宽不相等的区域。It can be understood that the above horizontal dichotomy and vertical dichotomy are an example of the manner in which the binary tree is divided. The image area corresponding to the node may be divided into two sub-areas in another manner. For example, two high unequal sub-regions are horizontally divided, or vertically divided into two unequal regions.
三叉树(Triple Tree,TT):一种树状结构,一个节点可划分成三个子节点。对于三叉树结构上的某一节点,可以不再划分该节点,也可以将该节点划分成三个下一层级的节点。三叉树划分方式可以包括:Triple Tree (TT): A tree structure in which one node can be divided into three child nodes. For a node on the tri-tree structure, the node may not be divided, or the node may be divided into three lower-level nodes. The trigeminal division can include:
(1)、水平三分(1), horizontal three points
将节点对应的图像区域划分成上、中、下三个区域,每个区域对应于一个子节点。在一个示例中,上、中、下三个区域的高分别为划分前的图像区域的高的1/4、1/2、1/4。如图1(e)所示,节点c使用水平三分划分方式划分,生成节点j、节点k和节点m,节点j对应的图像区域的高为节点c对应的图像区域的高的1/4,节点k对应的图像区域的高为节点c对应的图像区域的高的1/2,节点m对应的图像区域的高为节点c对应的图像区域的高的1/4。在另一个示例中,上、中、下三个区域的高分别为划分前的图像区域的高的1/3、1/3、1/3,即将节点对应的图像区域按照图1示出的二维直角坐标系XoY中的X轴的方向平均划分为三个区域。如图1(f)所示,节点c使用水平三分划分方式划分,生成节点j、节点k和节点m,节点j对应的图像区域的高、节点k对应的图像区域的高、节点m对应的图像区域的高均为节点c对应的图像区域的高的1/3。The image area corresponding to the node is divided into upper, middle and lower regions, and each region corresponds to one child node. In one example, the heights of the upper, middle, and lower regions are respectively 1/4, 1/2, and 1/4 of the height of the image region before division. As shown in FIG. 1(e), the node c is divided by a horizontal three-division method to generate a node j, a node k, and a node m. The height of the image region corresponding to the node j is the height 1/4 of the image region corresponding to the node c. The height of the image area corresponding to the node k is 1/2 of the height of the image area corresponding to the node c, and the height of the image area corresponding to the node m is 1/4 of the height of the image area corresponding to the node c. In another example, the heights of the upper, middle, and lower regions are respectively 1/3, 1/3, and 1/3 of the height of the image region before the division, that is, the image region corresponding to the node is as shown in FIG. The direction of the X-axis in the two-dimensional Cartesian coordinate system XoY is equally divided into three regions. As shown in Fig. 1(f), the node c is divided by a horizontal three-division method to generate a node j, a node k, and a node m. The height of the image region corresponding to the node j and the height of the image region corresponding to the node k correspond to the node m. The height of the image area is 1/3 of the height of the image area corresponding to the node c.
(2)、竖直三分(2), vertical three points
将节点对应的图像区域划分成左、中、右三个区域,每个区域对应于一个子节点。在一个示例中,左、中、右三个图像区域的宽分别为划分前的图像区域的宽的1/4、1/2、1/4。如图1(g)所示,节点c使用竖直三分划分方式划分,生成节点p、节点q和节点x,节点p对应的图像区域的宽为节点c对应的图像区域的宽的1/4,节点q对应的图像区域的宽为节点c对应的图像区域的宽的1/2,节点x对应的图像区域的宽为节点c对应的图像区域的宽的1/4。在另一个示例中,左、中、右三个图像区域的高分别为划分前的图像区域的高的1/3、1/3、1/3,即将节点对应的图像区域按照图1示出的二维直角坐标系XoY中的X轴的方向平均划分为三个区域。如图1(h)所示,节点c使用竖直三分划分方式划分,生成节点p、节点q和节点x,节点p对应的图像区域的宽、节点q对应的图像区域的宽、节点x对应的图像区域的宽均为节点c对应的图像区域的宽的1/3。The image area corresponding to the node is divided into three areas of left, middle and right, each area corresponding to one child node. In one example, the widths of the left, middle, and right image regions are respectively 1/4, 1/2, and 1/4 of the width of the image region before division. As shown in Fig. 1(g), the node c is divided by a vertical three-division method to generate a node p, a node q, and a node x. The width of the image region corresponding to the node p is the width of the image region corresponding to the node c. 4. The width of the image area corresponding to the node q is 1/2 of the width of the image area corresponding to the node c, and the width of the image area corresponding to the node x is 1/4 of the width of the image area corresponding to the node c. In another example, the heights of the left, middle, and right image regions are respectively 1/3, 1/3, and 1/3 of the height of the image region before the division, that is, the image region corresponding to the node is shown in FIG. The direction of the X-axis in the two-dimensional Cartesian coordinate system XoY is equally divided into three regions. As shown in FIG. 1(h), the node c is divided by a vertical three-division method to generate a node p, a node q, and a node x, the width of the image region corresponding to the node p, the width of the image region corresponding to the node q, and the node x. The width of the corresponding image area is 1/3 of the width of the image area corresponding to the node c.
图像编码(image encoding):将图像序列压缩成码流的处理过程。Image encoding: The process of compressing a sequence of images into a stream of code.
图像解码(image decoding):将码流按照特定的语法规则和处理方法恢复成重建图像的处理过程。Image decoding: The process of restoring a code stream into a reconstructed image according to specific grammar rules and processing methods.
视频编解码标准H.265使用QT划分方式划分CTU。具体的,将CTU作为QT结构的根节点(root),按照QT划分方式,将CTU递归划分成若干个叶节点(leaf node)。如果某一节点不再划分,则该节点称为叶节点。从上述描述可知,一幅图像由多个CTU构成,一个CTU对应于一个方形图像区域,也就是说,一个CTU对应一个图像块。每个叶节点对应一个CU,每个CU相当于CTU对应的图像块中的某一子图像块,且无法再继续使用QT划分方式划分该子图像块。如果需要继续划分某一节点,则将该 节点对应的图像区域划分成四个相同大小的图像区域,可参考图1(b),在该节点对应的图像区域被划分后,划分后生成的每个图像区域均对应一个节点,还需要分别确定这些节点是否还会继续划分。一个节点是否划分由码流中该节点对应的划分标志位(如split_cu_flag)指示。根节点在QT结构中的层级(简称为QT层级)为0,采用QT划分方式生成的子节点的QT层级为该子节点的父节点的QT层级加1。The video codec standard H.265 uses the QT partitioning method to divide the CTU. Specifically, the CTU is used as the root node (root) of the QT structure, and the CTU is recursively divided into a plurality of leaf nodes according to the QT division manner. If a node is no longer split, the node is called a leaf node. As can be seen from the above description, an image is composed of a plurality of CTUs, and one CTU corresponds to one square image area, that is, one CTU corresponds to one image block. Each leaf node corresponds to one CU, and each CU is equivalent to a certain sub-image block in the image block corresponding to the CTU, and the sub-image block can no longer be divided by using the QT division manner. If it is necessary to continue to divide a certain node, the image area corresponding to the node is divided into four image areas of the same size. Referring to FIG. 1(b), after the image area corresponding to the node is divided, each generated after the division is generated. Each image area corresponds to a node, and it is also necessary to determine whether these nodes will continue to be divided. Whether a node is divided is indicated by a partition flag bit (such as split_cu_flag) corresponding to the node in the code stream. The level of the root node in the QT structure (referred to as the QT level) is 0, and the QT level of the child node generated by the QT partitioning method is 1 for the QT level of the parent node of the child node.
示例性的,某一节点的划分标志位用split_cu_flag表示,split_cu_flag=0表示不再划分该节点,split_cu_flag=1表示继续划分该节点。如图2所示,在64×64的CTU节点(QT层级为0)的split_cu_flag的值为1的情况下,将CTU节点划分为四个32×32的节点(QT层级为1),这四个32×32的节点分别为节点A1、节点A2、节点A3以及节点A4。这四个32×32的节点中的每一个节点,又可以根据它对应的split_cu_flag,选择继续划分或者不划分。如果节点A1的split_cu_flag的值为1,则继续划分节点A1,将节点A1划分为四个16×16的节点(QT层级为2),这四个16×16的节点分别为节点B1、节点B2、节点B3以及节点B4。以此类推,直到所有节点都不再划分,这样,一个CTU就被划分成一组CU。在同一个QT结构中,每个CU的最小尺寸(即CU的最小大小)相同,且CU的最小尺寸在码流的序列参数集(Sequence Parameter Set,SPS)中标识,例如,8×8的CU为最小CU。在上述递归划分过程中,如果某一节点的尺寸等于最小CU尺寸,则确定不再划分该节点,同时也不需要在码流中包含该节点的划分标志位。Exemplarily, the split flag bit of a certain node is represented by split_cu_flag, split_cu_flag=0 indicates that the node is no longer divided, and split_cu_flag=1 indicates that the node is continuously divided. As shown in FIG. 2, in the case where the value of split_cu_flag of a 64×64 CTU node (QT level is 0) is 1, the CTU node is divided into four 32×32 nodes (QT level is 1), and the fourth The 32×32 nodes are node A1, node A2, node A3, and node A4, respectively. Each of the four 32×32 nodes can be further divided or not divided according to its corresponding split_cu_flag. If the value of the split_cu_flag of the node A1 is 1, the node A1 is further divided, and the node A1 is divided into four 16×16 nodes (the QT level is 2), and the four 16×16 nodes are the node B1 and the node B2, respectively. , node B3, and node B4. And so on, until all nodes are no longer divided, so that a CTU is divided into a group of CUs. In the same QT structure, the minimum size of each CU (ie, the minimum size of the CU) is the same, and the minimum size of the CU is identified in the Sequence Parameter Set (SPS) of the code stream, for example, 8×8. The CU is the smallest CU. In the above recursive partitioning process, if the size of a certain node is equal to the minimum CU size, it is determined that the node is no longer divided, and it is not necessary to include the division flag bit of the node in the code stream.
将CTU划分成一组CU的划分方式对应于一个编码树,图3(a)即为一种编码树的示例。一个编码树可能只对应一种划分方式,例如四叉树;也可以对应多种划分方式,例如前述的QTBT结构和下文中介绍的QT-BT/TT结构。The division manner in which the CTU is divided into a group of CUs corresponds to one coding tree, and FIG. 3(a) is an example of a coding tree. A coding tree may correspond to only one division, such as a quadtree; or it may correspond to multiple divisions, such as the aforementioned QTBT structure and the QT-BT/TT structure described below.
第一级编码树、第二级编码树、第三级编码树、……、第N级编码树分别对应的是不同的划分方式的集合,N为大于3的正整数。这些不同的划分方式的集合可以是某一种树的类型,例如三叉树,二叉树,四叉树;也可以是同一种树的类型中的划分方式的集合,例如水平二分,竖直二分等;还可以是两者的结合。可以理解的是,一个编码树并不需要同时包含上述多个不同级别的编码树。例如,一个编码树可以只包括第一级编码树;或者,一个编码树可以包含第一级和第二级编码树;或者一个编码树可以包含第一级编码树,第二级编码树和第三级编码树。The first level coding tree, the second level coding tree, the third level coding tree, ..., the Nth coding tree respectively correspond to a set of different division modes, and N is a positive integer greater than 3. The set of different division manners may be a type of a certain tree, such as a trigeminal tree, a binary tree, or a quadtree; or a collection of division manners in the same tree type, such as horizontal dichotomy, vertical dichotomy, etc.; It can also be a combination of the two. It can be understood that a coding tree does not need to include multiple different levels of coding trees at the same time. For example, a coding tree may only include a first-level coding tree; or a coding tree may include first-level and second-level coding trees; or a coding tree may include a first-level coding tree, a second-level coding tree, and a A three-level coding tree.
在一个示例中,第一级编码树可以包括四叉树划分,第二级编码树可以包括二叉树划分和三叉树划分。In one example, the first level coding tree may include a quadtree partition, and the second level coding tree may include a binary tree partition and a triblock tree partition.
在另一个示例中,第一级编码树可以包括四叉树划分,第二级编码树可以包括二叉树划分、三叉树划分和四叉树划分。In another example, the first level coding tree may include quadtree partitioning, and the second level coding tree may include binary tree partitioning, triblock tree partitioning, and quadtree partitioning.
在另一个示例中,第一级编码树可以包括四叉树划分和二叉树划分,第二级编码树包括三叉树划分。In another example, the first level coding tree may include quadtree partitioning and binary tree partitioning, and the second level coding tree includes triblock tree partitioning.
在另一个示例中,第一级编码树可以包括四叉树划分,第二级编码树可以包括二叉树划分,第三级编码树可以包括三叉树划分。In another example, the first level coding tree may comprise a quadtree partition, the second level coding tree may comprise a binary tree partition, and the third level coding tree may comprise a triblock tree partition.
在另一个示例中,第一级编码树可以包括水平二分,第二级编码树可以包括竖直二分和四叉树划分,第三级编码树可以包括竖直三分和水平三分。In another example, the first level coding tree may include a horizontal binary, the second level coding tree may include vertical binary and quadtree partitioning, and the third level coding tree may include vertical three and horizontal three.
第二级编码树还可能包含其它划分方式,本申请实施例对此不作具体限定。The second level coding tree may also include other division manners, which is not specifically limited in this embodiment of the present application.
编码端设备通常采用率失真优化(Rate Distortion Optimization,RDO)技术来确定CTU采用哪一种编码树编码。具体的,对于每个节点,编码端设备计算该节点能够使用的每一种划分方式的率失真代价(Rate Distortion cost,RD cost),比较计算出的RD cost,并将最小的RD cost所对应的划分方式确定为该节点的划分方式。The coding end device usually adopts Rate Distortion Optimization (RDO) technology to determine which coding tree coding is used by the CTU. Specifically, for each node, the encoding end device calculates a Rate Distortion Cost (RD cost) for each of the partitioning modes that the node can use, compares the calculated RD cost, and corresponds to the minimum RD cost. The division method is determined as the division mode of the node.
与QT结构相似,某一节点在BT结构中的层级称为BT层级,采用BT划分方式生成的子节点的BT层级为该子节点的父节点的BT层级加1。如果某一节点的BT层级等于最大BT层级,则确定不再划分该节点。一般的,BT结构中的最大BT层级在SPS中标识。Similar to the QT structure, the level of a node in the BT structure is called the BT level, and the BT level of the child node generated by the BT partitioning method is 1 for the BT level of the parent node of the child node. If the BT level of a node is equal to the maximum BT level, it is determined that the node is no longer divided. In general, the largest BT level in the BT structure is identified in the SPS.
在一个示例中,在QT划分方式的基础上引入了BT划分方式,其中,QT划分方式和BT划分方式级联,该划分方式称为QTBT划分方式。具体的,将CTU按照QT划分方式划分,QT的叶节点能够继续使用BT划分方式划分,即第一级编码树为QT,第二级编码树为BT。In an example, the BT division mode is introduced on the basis of the QT division mode, wherein the QT division manner and the BT division manner are cascaded, and the division manner is called a QTBT division manner. Specifically, the CTU is divided according to the QT division manner, and the leaf nodes of the QT can continue to be divided by the BT division manner, that is, the first-level coding tree is QT, and the second-level coding tree is BT.
如图3(a)所示,每个端点表示一个节点,实线表示节点使用QT划分方式划分,虚线表示节点使用BT划分方式划分,A到M为13个叶节点,每个叶节点对应1个CU。在BT结构中,10表示竖直二分,11表示水平二分。图3(b)示出了按照图3(a)示出的划分方式划分的CTU对应的图像区域。As shown in Fig. 3(a), each endpoint represents a node, the solid line indicates that the node is divided by QT division, the dotted line indicates that the node is divided by BT division, and A to M are 13 leaf nodes, and each leaf node corresponds to 1 CU. In the BT structure, 10 represents a vertical dichotomy and 11 represents a horizontal dichotomy. Fig. 3(b) shows an image area corresponding to the CTU divided according to the division manner shown in Fig. 3(a).
QTBT划分方式中,每个CU具有QT层级和BT层级。对于QTBT划分方式中的某个CU而言,该CU的QT层级为该CU所属的QT叶节点的QT层级,该CU的BT层级为该CU所属BT叶节点的BT层级。若CTU未被划分,即只有一个CU,则该CU的QT层级为0,BT层级为0。In the QTBT division mode, each CU has a QT level and a BT level. For a certain CU in the QTBT partitioning mode, the QT level of the CU is the QT level of the QT leaf node to which the CU belongs, and the BT level of the CU is the BT level of the BT leaf node to which the CU belongs. If the CTU is not divided, that is, there is only one CU, the QT level of the CU is 0, and the BT level is 0.
示例性的,图3(a)中,A和B的QT层级为1,BT层级为2;C、D以及E的QT层级为1,BT层级为1;F、K以及L的QT层级为2,BT层级为1;I和J的QT层级为2,BT层级为0;G和H的QT层级为2,BT层级为2;M的QT层级为1,BT层级为0。Exemplarily, in FIG. 3(a), the QT level of A and B is 1, and the BT level is 2; the QT level of C, D, and E is 1, and the BT level is 1; the QT level of F, K, and L is 2, the BT level is 1; the QT level of I and J is 2, the BT level is 0; the QT level of G and H is 2, the BT level is 2; the QT level of M is 1, and the BT level is 0.
QTBT划分方式中CU形状更加多样,能够更好地适应局部图像的内容。H.265标准中基于QT划分方式划分生成的所有CU都只能是正方形,即CU的宽(width)等于CU的高(height)。基于QT划分方式引入BT划分方式后,CU的宽和高可以不相同,例如:宽高比(其数值等于宽除以高)为2、4、8、16、1/2、1/4、1/8或者1/16。当然,在QTBT划分方式下,所有CU的宽和高都不能小于最小CU的边长(例如:最小CU可设置为4×4)。一般的,视频流的SPS包含有最小CU的大小信息。In the QTBT division mode, the CU shape is more diverse and can better adapt to the content of the partial image. All CUs generated by the QT partitioning method in the H.265 standard can only be square, that is, the width of the CU is equal to the height of the CU. After the BT partitioning mode is introduced based on the QT partitioning mode, the width and height of the CU may be different. For example, the aspect ratio (the value is equal to the width divided by the height) is 2, 4, 8, 16, 1/2, 1/4. 1/8 or 1/16. Of course, in the QTBT division mode, the width and height of all CUs cannot be smaller than the side length of the minimum CU (for example, the minimum CU can be set to 4×4). In general, the SPS of a video stream contains the size information of the smallest CU.
在上述QTBT的基础之上还可以包括一种QT-BT/TT划分方式,即第一级编码树中的节点使用QT划分方式,第二级编码树中的节点可以使用BT划分方式或TT划分方式。具体的,CTU为第一级编码树的根节点,将CTU采用QT划分方式划分,生成若干个第一级编码树的叶节点;再以第一级编码树的叶节点作为第二级编码树的根节点,采用BT划分方式(包括水平二分和竖直二分)或TT划分方式(包括水平三分和竖直三分)划分第二级编码树中的节点,以生成若干第二级编码树的叶节点。On the basis of the above QTBT, a QT-BT/TT division mode may also be included, that is, nodes in the first-level coding tree use QT division mode, and nodes in the second-level coding tree may use BT division mode or TT division. the way. Specifically, the CTU is a root node of the first-level coding tree, and the CTU is divided into QT division manners to generate a plurality of leaf nodes of the first-level coding tree; and the leaf node of the first-level coding tree is used as the second-level coding tree. The root node divides the nodes in the second-level coding tree by BT partitioning (including horizontal binary and vertical binary) or TT partitioning (including horizontal three-point and vertical three-point) to generate several second-level coding trees. Leaf node.
但是,对于每个节点,编码端设备通常需要计算该节点能够使用的每一种划分方式的RD cost,比较计算出的RD cost,并将最小的RD cost所对应的划分方式确定为该节点的划分方式。在QT-BT/TT划分方式中,由于第二级编码树中的节点可使用BT 划分方式,也可以使用TT划分方式,因此,对于第二级编码树中的每个节点,编码端设备均需要计算四种划分方式(水平二分、竖直二分、水平三分以及竖直三分)的RD cost,才能够确定出第二级编码树中的每个节点真正使用的划分方式,这样的话,编码复杂度较高。However, for each node, the encoding end device usually needs to calculate the RD cost of each partitioning mode that the node can use, compare the calculated RD cost, and determine the partitioning mode corresponding to the minimum RD cost as the node's The way of division. In the QT-BT/TT division mode, since the nodes in the second-level coding tree can use the BT division mode, the TT division mode can also be used. Therefore, for each node in the second-level coding tree, the coding end devices are used. It is necessary to calculate the RD cost of the four division methods (horizontal, vertical, horizontal, and vertical) to determine the actual division of each node in the second-level coding tree. The coding complexity is high.
针对上述问题,本申请实施例提供一种图像数据的解码方法,解码端设备在得到包含图像数据的码流后,通过解析该码流,得到第一级编码树的节点划分方式信息和第二级编码树的节点划分方式信息,如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,该解码端设备通过解析码流,得到第一节点的三个子节点的编码信息,第一节点的一个子节点对应一个编码单元CU,这样,该解码端设备可根据第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。本申请中第一级编码树的根节点对应一个CTU,第一级编码树的叶节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的,第二级编码树的根节点为第一级编码树的一个叶节点。本申请实施例中的解码端设备只需确定第一节点对应的划分方式为三叉树划分,即可直接得到第一节点的三个子节点的编码信息,无需再依次对第一节点的三个子节点进行解码,加快了解码的速率,降低了解码的复杂度。For the above problem, the embodiment of the present application provides a method for decoding image data. After obtaining a code stream including image data, the decoding end device obtains information about node partitioning manner of the first-level coding tree and second by analyzing the code stream. The node division mode information of the level coding tree, if the node division mode information of the second level coding tree indicates that the division manner corresponding to the first node in the second level coding tree is a trinomial division, the decoding end device obtains the parsing code stream to obtain The coding information of the three sub-nodes of the first node, one sub-node of the first node corresponds to one coding unit CU, so that the decoding end device can decode and reconstruct the coding unit according to the coding information of the three sub-nodes of the first node, An image corresponding to the image data is obtained. In this application, the root node of the first-level coding tree corresponds to one CTU, and the leaf node of the first-level coding tree is performed by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree. Instructed, the root node of the second level coding tree is a leaf node of the first level coding tree. The decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to the first node is a tri-tree partition, and the encoding information of the three child nodes of the first node can be directly obtained, and the three child nodes of the first node need not be sequentially performed. Decoding is performed to speed up the decoding and reduce the complexity of decoding.
相应的,本申请实施例还提供一种图像数据的编码方法,编码端设备在确定与待编码图像块对应的CTU后,将该CTU按照第一级编码树对应的节点划分方式进行划分,得到第一级编码树的叶节点,其中,第一级编码树的根节点对应该CTU;编码端设备根据预设条件,确定第二级编码树中的第一节点能够使用的划分方式,第二级编码树的根节点为第一级编码树的一个叶节点,预设条件包括:若第一节点的父节点对应的划分方式为三叉树划分,确定不划分第一节点;如果第一节点能够使用的划分方式为不划分,该编码端设备对与第一节点对应的编码单元进行编码,得到对应编码单元的编码单元码流。本申请实施例中的预设条件限制了第二级编码树中的节点的划分,第二级编码树中的某一节点对应的划分方式为三叉树划分,则该节点的子节点将不再继续划分,这样,大幅度的减少了划分第二级编码树中节点的复杂度,降低了编码复杂度。Correspondingly, the embodiment of the present application further provides an encoding method of image data, after the encoding end device determines the CTU corresponding to the image block to be encoded, the CTU is divided according to the node division manner corresponding to the first-level coding tree, a leaf node of the first level coding tree, wherein a root node of the first level coding tree corresponds to a CTU; the coding end device determines, according to a preset condition, a division manner that the first node in the second level coding tree can use, and second The root node of the level coding tree is a leaf node of the first level coding tree. The preset condition includes: if the division method corresponding to the parent node of the first node is a trinomial division, it is determined that the first node is not divided; if the first node can The coding mode used is not divided, and the coding end device encodes the coding unit corresponding to the first node to obtain a coding unit code stream corresponding to the coding unit. The preset condition in the embodiment of the present application limits the division of nodes in the second-level coding tree, and the corresponding division manner of a node in the second-level coding tree is a tri-tree division, and the child nodes of the node are no longer Continue to divide, thus greatly reducing the complexity of dividing the nodes in the second-level coding tree and reducing the coding complexity.
此外,由于第二级编码树中的某一节点对应的划分方式为三叉树划分,则该节点的子节点将不再继续划分,这样,编码端设备完成编码后发送的码流中可以不再包括该节点的子节点的划分信息,节省了传输比特,降低了码流的长度。In addition, since the mapping manner of a node in the second-level coding tree is tri-tree partitioning, the child nodes of the node will not continue to be divided, so that the code stream sent by the encoding end device after encoding is no longer The division information including the child nodes of the node saves transmission bits and reduces the length of the code stream.
本申请实施例提供一种图像数据的编码、解码方法均适用于图像处理系统。图4是本申请实施例提供的图像处理系统的结构示意图。如图4所示,该图像处理系统包括编码端设备40和解码端设备41。其中,编码端设备40和解码端设备41可以独立设置,也可以集成在同一设备,本申请实施例对此不作具体限定。图1中以编码端设备40和解码端设备41独立设置为例。为了便于描述,下文均以编码端设备与解码端设备独立设置为例进行说明。The embodiments of the present application provide a method for encoding and decoding image data, which is applicable to an image processing system. FIG. 4 is a schematic structural diagram of an image processing system according to an embodiment of the present application. As shown in FIG. 4, the image processing system includes an encoding end device 40 and a decoding end device 41. The encoding end device 40 and the decoding end device 41 may be independently configured or integrated in the same device, which is not specifically limited in this embodiment of the present application. In FIG. 1, the encoding end device 40 and the decoding end device 41 are independently set as an example. For the convenience of description, the following description will be made by taking the independent setting of the encoding end device and the decoding end device as an example.
具体的,编码端设备40在捕获到某一影像后,对该影像中的每一图像对应的CTU根据第一级编码树的划分方式和第二级编码树的划分方式进行处理,其中,若第二级编码树中的某一节点对应的划分方式为三叉树划分,则该节点的子节点将不再划分; 在划分完成后,编码端设备40获取CTU码流,并向解码端设备41发送该CTU码流;解码端设备41根据节点的划分信息解析其获取到的CTU码流,获取重建图像。Specifically, after capturing a certain image, the encoding end device 40 processes the CTU corresponding to each image in the image according to the division manner of the first-level coding tree and the division manner of the second-level coding tree, where If the partitioning mode of a node in the second-level coding tree is a tri-tree partition, the child nodes of the node are no longer divided. After the partitioning is completed, the encoding end device 40 acquires the CTU code stream, and sends the CTU code stream to the decoding end device 41. The CTU code stream is sent; the decoding end device 41 parses the acquired CTU code stream according to the split information of the node, and acquires a reconstructed image.
编码端设备40和解码端设备41均可以为配置有摄像头(如前置摄像头或后置摄像头)的各种设备,例如,该编码端设备和解码端设备为可穿戴电子设备(例如智能手表等)、拍立得,也可以是图5所示的手机,还可以是平板电脑,台式电脑,虚拟现实装置,笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、个人数字助理(Personal Digital Assistant,PDA)等,本申请实施例对编码端设备40和解码端设备41的具体形式不做特殊限制。Both the encoding end device 40 and the decoding end device 41 may be various devices configured with a camera (such as a front camera or a rear camera), for example, the encoding end device and the decoding end device are wearable electronic devices (such as smart watches, etc.) ), Polaroid, can also be the mobile phone shown in Figure 5, but also can be a tablet, desktop computer, virtual reality device, laptop, ultra-mobile personal computer (UMPC), personal digital assistant ( Personal Digital Assistant (PDA), etc., the specific form of the encoding end device 40 and the decoding end device 41 is not particularly limited in the embodiment of the present application.
结合图4,如图5所示,本实施例中的编码端设备40和解码端设备41均可以为手机。下面以手机为例对实施例进行具体说明。With reference to FIG. 4, as shown in FIG. 5, both the encoding end device 40 and the decoding end device 41 in this embodiment may be mobile phones. The embodiment will be specifically described below by taking a mobile phone as an example.
应该理解的是,图示手机仅仅是编码端设备40和解码端设备41的一个范例,并且手机可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图5中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile phone is only one example of the encoding end device 40 and the decoding end device 41, and the mobile phone may have more or fewer components than those shown in the figure, and two or more may be combined. Parts, or can have different part configurations. The various components shown in FIG. 5 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
如图5所示,手机包括:RF(Radio Frequency,射频)电路50、存储器51、输入单元52、显示单元53、传感器54、音频电路55、无线保真(Wireless Fidelity,Wi-Fi)模块56、处理器57、蓝牙模块58以及电源59等部件。本领域技术人员可以理解,图5中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 5, the mobile phone includes an RF (Radio Frequency) circuit 50, a memory 51, an input unit 52, a display unit 53, a sensor 54, an audio circuit 55, and a Wireless Fidelity (Wi-Fi) module 56. The processor 57, the Bluetooth module 58, and the power source 59 and the like. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 5 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
下面结合图5对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to FIG. 5:
RF电路50可用于收发信息或通话过程中,信号的接收和发送,可以将基站的下行信息接收后,给处理器57处理;另外,将涉及上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等器件。此外,RF电路50还可以通过无线通信与网络和其他移动设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、电子邮件、短消息服务等。The RF circuit 50 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. The downlink information of the base station can be received and processed by the processor 57. In addition, the data related to the uplink is sent to the base station. Typically, RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, RF circuitry 50 can also communicate with the network and other mobile devices via wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to global mobile communication systems, general packet radio services, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
存储器51可用于存储软件程序及数据。处理器57通过运行存储在存储器51的软件程序及数据,从而执行手机的各种功能以及数据处理。存储器51可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本、视频等)等。此外,存储器51可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。在以下实施例中,存储器51存储有使得手机能运行的操作系统,例如苹果公司所开发的
Figure PCTCN2018078837-appb-000001
操作系统,谷歌公司所开发的
Figure PCTCN2018078837-appb-000002
开源操作系统,微软公司所开发的
Figure PCTCN2018078837-appb-000003
操作系统等。
The memory 51 can be used to store software programs and data. The processor 57 executes various functions and data processing of the mobile phone by running software programs and data stored in the memory 51. The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, video, etc.). Further, the memory 51 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. In the following embodiments, the memory 51 stores an operating system that enables the mobile phone to operate, such as developed by Apple.
Figure PCTCN2018078837-appb-000001
Operating system, developed by Google Inc.
Figure PCTCN2018078837-appb-000002
Open source operating system, developed by Microsoft Corporation
Figure PCTCN2018078837-appb-000003
Operating system, etc.
输入单元52(如触摸屏)可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的信号输入。具体的,输入单元52可包括触摸屏521和其他输入设备522。触摸屏521,也称为触摸面板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控屏521上或在触控屏521 附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控屏521可包括触摸检测装置和触摸控制器两个部分(图5中未示出)。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器57,并能接收处理器57发来的指令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控屏521。An input unit 52, such as a touch screen, can be used to receive input numeric or character information and to generate signal inputs related to user settings and function controls of the handset. Specifically, the input unit 52 can include a touch screen 521 and other input devices 522. The touch screen 521, also referred to as a touch panel, can collect touch operations on or near the user (eg, the user operates on the touch screen 521 or near the touch screen 521 using any suitable object or accessory such as a finger, a stylus, or the like. ), and drive the corresponding connection device according to a preset program. Alternatively, the touch screen 521 may include two parts (not shown in FIG. 5) of the touch detecting device and the touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 57 is provided and can receive instructions from the processor 57 and execute them. In addition, the touch screen 521 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
显示单元53(即显示屏)可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单的图形用户界面(Graphical User Interface,GUI)。显示单元53可包括设置在手机正面的显示面板531。可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-emitting Diode,OLED)等形式来配置显示面板531。进一步的,触摸屏521可覆盖显示面板531,当触摸屏521检测到在其上或附近的触摸操作后,传送给处理器57以确定触摸事件的类型,随后处理器57根据触摸事件的类型在显示面板531上提供相应的视觉输出。虽然,在图5中,触摸屏521与显示面板531是作为两个独立的部件来实现手机的输入和输出功能,但是在某些实施例中,可以将触摸屏521与显示面板531集成而实现手机的输入和输出功能。The display unit 53 (ie, the display screen) can be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the mobile phone. The display unit 53 may include a display panel 531 disposed on the front of the mobile phone. Optionally, the display panel 531 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch screen 521 can cover the display panel 531. When the touch screen 521 detects a touch operation on or near it, the touch screen 521 transmits to the processor 57 to determine the type of the touch event, and then the processor 57 displays the panel according to the type of the touch event. A corresponding visual output is provided on the 531. Although, in FIG. 5, the touch screen 521 and the display panel 531 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch screen 521 and the display panel 531 may be integrated to implement the mobile phone. Input and output functions.
在另外的一些实施例中,上述触摸屏521还可以设置有压力感应传感器,这样用户在上述触控面板上进行触摸操作时,触控面板还能检测到该触摸操作的压力,进而手机能够更准确地检测该触摸操作。In other embodiments, the touch screen 521 can also be provided with a pressure sensing sensor, so that when the user performs a touch operation on the touch panel, the touch panel can also detect the pressure of the touch operation, and the mobile phone can be more accurate. The touch operation is detected.
手机还可以包括至少一种传感器54,比如光传感器、运动传感器以及其他传感器。具体的,光传感器可包括环境光传感器及接近传感器,环境光传感器可根据环境光线的明暗来调节显示面板531的亮度,接近光传感器设置在手机的正面,当在手机移动到耳边时,根据接近光传感器的检测,手机关闭显示面板531的电源,这样手机可以进一步节省电量。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏转化、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one type of sensor 54, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, and the ambient light sensor may adjust the brightness of the display panel 531 according to the brightness of the ambient light, and the proximity light sensor is disposed on the front side of the mobile phone, when the mobile phone moves to the ear, according to Close to the detection of the light sensor, the mobile phone turns off the power of the display panel 531, so that the mobile phone can further save power. As a kind of motion sensor, the accelerometer sensor can detect the acceleration of each direction (usually three axes). When it is still, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen conversion, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping). Other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that can be configured on the mobile phone are not described here.
音频电路55、扬声器551,麦克风552可提供用户与手机之间的音频接口。音频电路55可将接收到的音频数据转换后的电信号,传输到扬声器551,由扬声器551转换为声音信号输出;另一方面,麦克风552将收集的声音信号转换为电信号,由音频电路55接收后转换为音频数据,再将音频数据输出至RF电路50以发送给比如另一手机,或者将音频数据输出至存储器51以便进一步处理。An audio circuit 55, a speaker 551, and a microphone 552 provide an audio interface between the user and the handset. The audio circuit 55 can transmit the converted electrical data of the received audio data to the speaker 551, and is converted into a sound signal output by the speaker 551. On the other hand, the microphone 552 converts the collected sound signal into an electrical signal, and the audio circuit 55 is used by the audio circuit 55. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 50 for transmission to, for example, another mobile phone, or the audio data is output to the memory 51 for further processing.
Wi-Fi属于短距离无线传输技术,手机可以通过Wi-Fi模块56帮助用户收发电子邮件、浏览网页和访问流媒体等,它为用户提供了无线的宽带互联网访问。Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users to send and receive emails, browse web pages and access streaming media through the Wi-Fi module 56, which provides users with wireless broadband Internet access.
处理器57是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器51内的软件程序,以及调用存储在存储器51内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一些实施例中,处理器57可包括一个或多个处理单元;处理器57还可以集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器 主要处理无线通信。可以理解的是,上述调制解调处理器也可以是独立设置的。The processor 57 is a control center of the mobile phone, and connects various parts of the entire mobile phone by using various interfaces and lines, and executes various kinds of mobile phones by running or executing a software program stored in the memory 51 and calling data stored in the memory 51. Function and process data to monitor the phone as a whole. In some embodiments, processor 57 may include one or more processing units; processor 57 may also integrate an application processor and a modem processor, where the application processor primarily processes operating systems, user interfaces, applications, etc. The modem processor primarily handles wireless communications. It can be understood that the above modem processor can also be independently set.
蓝牙模块58,用于通过蓝牙这种短距离通讯协议来与其他设备进行信息交互。例如,手机可以通过蓝牙模块58与同样具备蓝牙模块的可穿戴电子设备(例如智能手表)建立蓝牙连接,从而进行数据交互。The Bluetooth module 58 is configured to exchange information with other devices through a short-range communication protocol such as Bluetooth. For example, the mobile phone can establish a Bluetooth connection through the Bluetooth module 58 and a wearable electronic device (such as a smart watch) that also has a Bluetooth module, thereby performing data interaction.
手机还包括给各个部件供电的电源59(比如电池)。电源可以通过电源管理系统与处理器57逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。The handset also includes a power source 59 (such as a battery) that powers the various components. The power supply can be logically coupled to the processor 57 through the power management system to manage functions such as charging, discharging, and power consumption through the power management system.
以下,将结合具体实施例详细阐述本申请实施例提供的一种图像数据的编码、解码方法。Hereinafter, a method for encoding and decoding image data provided by an embodiment of the present application will be described in detail in conjunction with specific embodiments.
图6为本申请实施例提供的图像数据的解码方法的流程示意图,该解码方法可以应用在图4所示的图像处理系统中。FIG. 6 is a schematic flowchart diagram of a method for decoding image data according to an embodiment of the present application, and the decoding method can be applied to the image processing system shown in FIG. 4.
如图6所示,该图像数据的解码方法包括:As shown in FIG. 6, the decoding method of the image data includes:
S600、解码端设备得到包含图像数据的码流。S600. The decoding end device obtains a code stream that includes image data.
可选的,解码端设备得到的包含图像数据的码流包括序列参数集(Sequence Parameter Set,SPS)、图像参数集(Picture Parameter Set,PPS)、条带头(slice header)或条带片段头(slice segment header)、以及CTU码流,CTU码流携带有图像数据。Optionally, the code stream that includes the image data obtained by the decoding device includes a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), a slice header, or a slice header ( A slice segment header), and a CTU code stream, the CTU code stream carries image data.
S601、解码端设备解码其得到的码流,得到第一级编码树的节点划分方式信息。S601. The decoding end device decodes the obtained code stream to obtain node division manner information of the first-level coding tree.
第一级编码树的根节点对应一个CTU,第一级编码树的叶节点是通过第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的。第一级编码树对应的节点划分方式包括四叉树划分。The root node of the first-level coding tree corresponds to a CTU, and the leaf node of the first-level coding tree is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree. The node division manner corresponding to the first-level coding tree includes quadtree partitioning.
解码端设备在得到码流后,解析该码流中的CTU码流,得到第一级编码树的节点划分信息。After obtaining the code stream, the decoding end device parses the CTU code stream in the code stream to obtain node partitioning information of the first level coding tree.
可选的,解码端设备解析CTU码流,得到第一级编码树的节点划分信息的方法可以为:解码端设备将CTU作为第一级编码树的根节点,解析CTU码流,获取该CTU码流中语法元素所包括的用于指示如何将该CTU划分成至少一个CU的第一标识(如SplitFlag),即第一标识表示第一级编码树的节点划分方式信息。在一个示例中,如果某一SplitFlag的数值为0,则说明与该SplitFlag对应的节点为第一级编码树的叶节点;如果某一SplitFlag的数值为1,则继续获取与该SplitFlag对应的节点的四个子节点的SplitFlag,直到确定出第一级编码树的所有叶节点的信息。Optionally, the method for the decoding end device to parse the CTU code stream to obtain the node partitioning information of the first level coding tree may be: the decoding end device uses the CTU as the root node of the first level coding tree, parses the CTU code stream, and obtains the CTU. The first identifier (such as SplitFlag) included in the syntax element of the code stream is used to indicate how to divide the CTU into at least one CU, that is, the first identifier indicates node division manner information of the first-level coding tree. In an example, if the value of a SplitFlag is 0, the node corresponding to the SplitFlag is a leaf node of the first-level coding tree; if the value of a SplitFlag is 1, the node corresponding to the SplitFlag is continuously obtained. SplitFlag of the four child nodes until the information of all leaf nodes of the first level coding tree is determined.
需要说明的是,若某一节点对应的图像区域的宽等于第一阈值(例如第一阈值为8或16),则该节点为第一级编码树的叶节点,与该节点对应的SplitFlag的数值为0。It should be noted that, if the width of the image region corresponding to a certain node is equal to the first threshold (for example, the first threshold is 8 or 16), the node is a leaf node of the first-level coding tree, and the SplitFlag corresponding to the node is The value is 0.
可选的,解码端设备解析CTU码流,得到第一级编码树的节点划分信息的方法还可以为:解码端设备将CTU作为第一级编码树的根节点,解析CTU码流,获取该CTU码流中语法元素所包括的用于指示是否划分第一级编码树的节点的第二标识(如NSFlag);如果第二标识的数值为第一值(例如1),则说明与该第二标识对应的节点为第一级编码树的叶节点,同时也为第二级编码树叶节点;如果第二标识的数值为第二值(例如0),则获取语法元素所包括的第三标识(如QTSplitFlag);如果第三标识的数值为第三值(例如0),则说明与该第三标识对应的节点为第一级编码树叶节点,但不是第二级编码树的叶节点;如果第三标识的数值为第四值(例如1),则继续获取与该第三标识对应的节点的四个子节点的第二标识,直到确定出第一级编码 树的所有叶节点的信息。Optionally, the method for the decoding end device to parse the CTU code stream to obtain the node partitioning information of the first level coding tree may also be: the decoding end device uses the CTU as the root node of the first level coding tree, parses the CTU code stream, and obtains the a second identifier (such as NSFlag) included in the syntax element of the CTU code stream for indicating whether to divide the node of the first level coding tree; if the value of the second identifier is the first value (for example, 1), The node corresponding to the second identifier is a leaf node of the first-level coding tree, and is also a second-level coding leaf node; if the value of the second identifier is a second value (for example, 0), acquiring the third identifier included in the syntax element (such as QTSplitFlag); if the value of the third identifier is a third value (for example, 0), it indicates that the node corresponding to the third identifier is a first-level encoded leaf node, but not a leaf node of the second-level coding tree; If the value of the third identifier is a fourth value (for example, 1), the second identifier of the four child nodes of the node corresponding to the third identifier is continuously obtained until the information of all the leaf nodes of the first level coding tree is determined.
需要说明的是,若某一节点对应的图像区域的宽等于第一阈值(例如第一阈值为8或16),则该节点为第一级编码树的叶节点,与该节点对应的第三标识的数值为第三值。另外,如果某一节点对应的图像区域的宽或高大于第二阈值、且与该节点对应的第二标识的数值为第二值,则第三标识的数值为第三值。如果某一节点对应的划分方式为QT划分,与该节点对应的第二标识的数值为第二值且与该节点对应的第三标识的数值为第三值。It should be noted that, if the width of the image region corresponding to a certain node is equal to the first threshold (for example, the first threshold is 8 or 16), the node is a leaf node of the first-level coding tree, and the third node corresponding to the node The value of the identification is the third value. In addition, if the width or height of the image area corresponding to a certain node is greater than the second threshold, and the value of the second identifier corresponding to the node is the second value, the value of the third identifier is the third value. If the mapping mode of the node is QT, the value of the second identifier corresponding to the node is the second value, and the value of the third identifier corresponding to the node is the third value.
S602、解码端设备解析其得到的码流,得到第二级编码树的节点划分方式信息。S602. The decoding end device parses the obtained code stream to obtain node division mode information of the second-level coding tree.
其中,第二级编码树的根节点为第一级编码树的一个叶节点。第二级编码树对应的节点划分方式与第一级编码树对应的节点划分方式不相同,本实施例中第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。The root node of the second-level coding tree is a leaf node of the first-level coding tree. The node division manner corresponding to the second-level coding tree is different from the node division manner corresponding to the first-level coding tree. In this embodiment, the node division manner corresponding to the second-level coding tree includes binary tree division and tri-tree division.
解码端设备在得到第一级编码树的节点划分方式信息后,将第一级编码树的节点划分方式信息对应的节点划分方式和第一级编码树的根节点进行指示的第一级编码树的叶节点作为第二级编码树的根节点,解析CTU码流,得到第二级编码树的节点的划分方式信息。After obtaining the node partitioning mode information of the first-level coding tree, the decoding end device performs the first-level coding tree indicating the node partitioning manner corresponding to the node partitioning mode information of the first-level coding tree and the root node of the first-level coding tree. The leaf node is used as the root node of the second-level coding tree, and the CTU code stream is parsed to obtain the division mode information of the nodes of the second-level coding tree.
可选的,解码端设备解析CTU码流,得到第二级编码树的节点的划分方式信息的方法可以为:解码端设备解析CTU码流,获取用于指示如何划分第二级编码树中某一节点的第四标识(如STSplitMode),即第四标识表示第二级编码树的节点划分方式信息。Optionally, the method for the decoding end device to parse the CTU code stream to obtain the partitioning mode information of the node of the second level coding tree may be: the decoding end device parses the CTU code stream, and obtains a method for indicating how to divide the second level coding tree. The fourth identifier of a node (such as STSplitMode), that is, the fourth identifier indicates the node division manner information of the second-level coding tree.
如果某一第四标识表示不划分(如STSplitMode=0),则说明与该第四标识对应的节点为第二级编码树的叶节点。If a fourth identifier indicates no division (eg, STSplitMode=0), it indicates that the node corresponding to the fourth identifier is a leaf node of the second-level coding tree.
如果某一第四标识表示三叉树划分(如STSplitMode=3或4),则说明与该第四标识对应的节点存在三个子节点,且该三个子节点中的每个子节点均为第二级编码树叶节点。If a fourth identifier indicates a tri-tree partition (such as STSplitMode=3 or 4), it indicates that the node corresponding to the fourth identifier has three child nodes, and each of the three child nodes is a second-level code. Leaf node.
如果某一第四标识表示二叉树划分(如STSplitMode=1或2),则说明与该第四标识对应的节点存在两个子节点,编码端设备继续获取与该第四标识对应的节点的两个子节点的第四标识,直到确定出第二级编码树的所有叶节点的信息。If a fourth identifier indicates a binary tree partition (such as STSplitMode=1 or 2), it indicates that the node corresponding to the fourth identifier has two child nodes, and the encoding end device continues to acquire two child nodes of the node corresponding to the fourth identifier. The fourth identifier is determined until information about all leaf nodes of the second level coding tree is determined.
从上面描述可知,对于QTBT划分方式中的某个CU而言,该CU的QT层级为该CU所属的QT叶节点的QT层级,该CU的BT层级为该CU所属BT叶节点的BT层级。也就是说,第二级编码树层级表示某一节点相对于该节点所在的第二级编码树的根节点的层级。第二级编码树的根节点的第二级编码树层级为0,若第二级编码树的某一节点进行划分,则该节点的子节点的第二级编码树层级为该节点的第二级编码树层级加1。It can be seen from the above description that for a certain CU in the QTBT partitioning mode, the QT level of the CU is the QT level of the QT leaf node to which the CU belongs, and the BT level of the CU is the BT level of the BT leaf node to which the CU belongs. That is, the second level coding tree level represents the level of a node relative to the root node of the second level coding tree in which the node is located. The second level coding tree level of the root node of the second level coding tree is 0. If a node of the second level coding tree is divided, the second level coding tree level of the child node of the node is the second of the node. Level coding tree level plus 1.
可选的,本实施例中第二级编码树对应的划分方式还可以包含除二叉树划分和三叉树划分以外的其它划分方式,本申请实施例对此不做具体限定。Optionally, the division manner corresponding to the second-level coding tree in this embodiment may further include other division manners except the binary tree division and the tri-tree division, which are not specifically limited in this embodiment of the present application.
示例性的,本实施例中第二级编码树对应的划分方式还包含四叉树划分;当某一节点的第二级编码树层级大于预设层级且与该节点对应的图像区域的高宽比(该节点对应的图像区域的高除以该节点对应的图像区域的宽)小于或等于第三阈值时,与该节点对应的划分方式还包括四叉树划分。在一个示例中,通过STSplitMode=5表示该 节点对应的划分方式为四叉树划分。Exemplarily, the division manner corresponding to the second-level coding tree in the embodiment further includes a quad-tree division; when the second-level coding tree level of a node is greater than the preset level and the height and width of the image region corresponding to the node When the ratio (the height of the image region corresponding to the node divided by the width of the image region corresponding to the node) is less than or equal to the third threshold, the division manner corresponding to the node further includes quadtree partitioning. In one example, STSplitMode=5 indicates that the partitioning mode corresponding to the node is quadtree partitioning.
可选的,解码端设备解析CTU码流,得到第二级编码树的节点的划分方式信息的方法还可以为:解码端设备确定第二级编码树的某一节点的第一信息满足一定条件,则说明该节点为第二级编码树的叶节点。这里,节点的第一信息是指与该节点对应的图像区域的宽、与该节点对应的图像区域的高以及该节点的第二级编码树层级中的至少一个。在这种情况下,CTU码流可以不携带与该节点对应的第四标识。Optionally, the method for the decoding end device to parse the CTU code stream to obtain the partitioning mode information of the node of the second level coding tree may further be: the decoding end device determines that the first information of a node of the second level coding tree satisfies certain conditions. , indicating that the node is a leaf node of the second-level coding tree. Here, the first information of the node refers to at least one of a width of an image area corresponding to the node, a height of an image area corresponding to the node, and a second level coding tree level of the node. In this case, the CTU code stream may not carry the fourth identifier corresponding to the node.
示例性的,若第二级编码树的某一节点符合下述任一条件,则说明该节点为第二级编码树的叶节点:Exemplarily, if a node of the second-level coding tree meets any of the following conditions, the node is a leaf node of the second-level coding tree:
(1)、某一节点的第二级编码树层级等于预设的最大第二级编码树层级(例如预设的最大第二级编码树层级为3、4或2)。(1) The second level coding tree level of a node is equal to the preset maximum second level coding tree level (for example, the preset maximum second level coding tree level is 3, 4 or 2).
(2)、某一节点对应的图像区域的高和宽等于预设的最小CU的高和宽。(2) The height and width of the image area corresponding to a certain node are equal to the height and width of the preset minimum CU.
(3)、某一节点对应的图像区域的高(或宽)大于预设的最大CU的高(或宽)。(3) The height (or width) of the image area corresponding to a certain node is greater than the height (or width) of the preset maximum CU.
(4)、某一节点对应的图像区域的高宽比值(或宽高比值)大于或者等于预设比值。(4) The aspect ratio (or aspect ratio) of the image area corresponding to a certain node is greater than or equal to the preset ratio.
(5)、某一节点对应的图像区域包括的像素值小于或者等于预设像素值。(5) The image area corresponding to a certain node includes a pixel value that is less than or equal to a preset pixel value.
当然,上述条件(1)~(5)仅仅是确定某一节点为第二级编码树的叶节点的条件的示例,并不是对这一条件的限定。Of course, the above conditions (1) to (5) are merely examples of the conditions for determining that a certain node is a leaf node of the second-level coding tree, and this condition is not limited.
可选的,编码端设备可从包含图像数据的码流中的SPS、PPS或条带头中获取到上述预设的最大第二级编码树层级、预设的最小CU的高(或宽)、预设的最大CU的高(或宽)、预设比值、预设像素值,当然,上述预设的最大第二级编码树层级、预设的最小CU的高(或宽)、预设的最大CU的高(或宽)、预设比值、预设像素值也可以是图像处理系统预设的。Optionally, the encoding end device may obtain the preset maximum second level coding tree level, the preset minimum CU height (or width) from the SPS, the PPS, or the strip header in the code stream that includes the image data, The preset maximum CU height (or width), preset ratio, preset pixel value, of course, the preset maximum second-level coding tree level, the preset minimum CU height (or width), preset The height (or width) of the maximum CU, the preset ratio, and the preset pixel value may also be preset by the image processing system.
从上述描述可知,本申请实施例中的第四标识用于指示如何划分第二级编码树中某一节点。可选的,第四标识可以包括用于指示是否继续划分该节点的节点划分标识、用于指示按照哪一方向划分该节点的划分方向标识以及用于指示按照哪一方式划分该节点的划分模式标识。It can be seen from the above description that the fourth identifier in the embodiment of the present application is used to indicate how to divide a node in the second level coding tree. Optionally, the fourth identifier may include a node division identifier for indicating whether to continue to divide the node, a division direction identifier for indicating which direction to divide the node, and a division mode for indicating which manner the node is divided according to which manner Logo.
示例性的,节点划分标识为STSplitFlag,如果STSplitFlag的数值等于0,表示不划分与该STSplitFlag对应的节点;如果STSplitFlag的数值等于1,表示继续划分与该STSplitFlag对应的节点。划分方向标识为STSplitDir,如果STSplitDir的数值等于0,表示按照水平方向划分与该STSplitDir对应的节点;如果STSplitDir的数值等于1,表示节按照竖直方向划分与该STSplitDir对应的节点。划分模式标识为STSplitType,如果STSplitType的数值等于0,表示与该STSplitType对应的节点所对应的划分方式为二叉树划分;如果STSplitDir的数值等于1,表示与该STSplitType对应的节点所对应的划分方式为三叉树划分。Exemplarily, the node division identifier is STSplitFlag. If the value of STSplitFlag is equal to 0, it indicates that the node corresponding to the STSplitFlag is not divided. If the value of STSplitFlag is equal to 1, it indicates that the node corresponding to the STSplitFlag is continued to be divided. The division direction identifier is STSplitDir. If the value of STSplitDir is equal to 0, it indicates that the node corresponding to the STSplitDir is divided according to the horizontal direction; if the value of STSplitDir is equal to 1, it indicates that the node divides the node corresponding to the STSplitDir in the vertical direction. The division mode identifier is STSplitType. If the value of the STSplitType is equal to 0, the division method corresponding to the node corresponding to the STSplitType is a binary tree division; if the value of the STSplitDir is equal to 1, the division corresponding to the node corresponding to the STSplitType is trifurcation. Tree division.
可选的,本申请实施例中的第四标识也可以包括用于指示是否按照二叉树划分方式划分该第四标识对应的节点的二叉树划分标识、用于指示是否按照三叉树划分方式划分该第四标识对应的节点的三叉树划分标识以及划分方向标识(该划分方向标识与上一示例中的划分方向标识相同)。Optionally, the fourth identifier in the embodiment of the present application may further include a binary tree partition identifier that is used to indicate whether the node corresponding to the fourth identifier is divided according to a binary tree partitioning manner, and is used to indicate whether the fourth partition is divided according to a tri-tree partition manner. The tri-tree partition identifier and the division direction identifier of the corresponding node are identified (the division direction identifier is the same as the division direction identifier in the previous example).
示例性的,二叉树划分标识为BTFlag,如果BTFlag的数值等于0,表示第四标 识对应的节点所对应的划分方式不是BT划分,如果BTFlag的数值等于1,表示第四标识对应的节点所对应的划分方式是BT划分。三叉树划分标识为TTFlag,如果TTFlag的数值等于0,表示第四标识对应的节点所对应的划分方式不是TT划分,如果TTFlag的数值等于1,表示第四标识对应的节点所对应的划分方式是TT划分。Exemplarily, the binary tree partitioning identifier is BTFlag. If the value of the BTFlag is equal to 0, the mapping manner corresponding to the node corresponding to the fourth identifier is not the BT partition. If the value of the BTFlag is equal to 1, it indicates that the node corresponding to the fourth identifier corresponds to The division method is BT division. The tribtree partition identifier is TTFlag. If the value of the TTFlag is equal to 0, the partitioning mode corresponding to the node corresponding to the fourth identifier is not the TT partition. If the value of the TTFlag is equal to 1, the partition corresponding to the node corresponding to the fourth identifier is TT division.
当然,本申请实施例中的第四标识也可以包括上述节点划分标识、上述划分方向标识以及上述划分模式标识的任意组合,本申请实施例对此不作具体限定。Of course, the fourth identifier in the embodiment of the present application may also include any combination of the foregoing node division identifier, the foregoing division direction identifier, and the foregoing division mode identifier, which is not specifically limited in this embodiment of the present application.
容易理解的是,如果第二级编码树对应的划分方式还包含除二叉树划分和三叉树划分以外的其它划分方式,则上述第四标识可包括更多的标识,此处不再进行详细赘述。It is easy to understand that if the division manner corresponding to the second-level coding tree further includes other division modes other than the binary tree division and the tri-tree division, the fourth identifier may include more identifiers, and details are not described herein again.
可选的,本申请实施例中的解码端设备可以在执行完S601后,再执行S602,也可以在执行S601的过程中,首次获取到第一级编码树的一个叶节点的信息后,基于该第一级编码树的叶节点立即执行S602,直到获取到第一级编码树的最后一个叶节点。Optionally, the decoding device in the embodiment of the present application may perform S602 after executing S601, or may acquire information about a leaf node of the first-level coding tree for the first time in the process of executing S601. The leaf node of the first level coding tree immediately executes S602 until the last leaf node of the first level coding tree is obtained.
S603、如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,解码端设备解析码流,得到第一节点的三个子节点的编码信息。S603. If the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree division, the decoding end device parses the code stream to obtain the coding of the three sub-nodes of the first node. information.
本申请实施例中,如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,则说明该第一节点的子节点为第二级编码树的叶节点。第一节点对应的划分方式为三叉树划分,因此,第一节点对应三个子节点。也就是说,如果第一节点对应的划分方式为三叉树划分,则说明该第一节点的三个子节点均为第二级编码树的叶节点。In the embodiment of the present application, if the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition, the child node of the first node is the second-level The leaf node of the coding tree. The division manner corresponding to the first node is a tri-tree division, and therefore, the first node corresponds to three child nodes. That is to say, if the division manner corresponding to the first node is a tri-tree division, it is indicated that the three sub-nodes of the first node are all leaf nodes of the second-level coding tree.
进一步地,在“如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,则说明该第一节点的子节点为第二级编码树的叶节点”的基础上,解码端设备还可结合上述S602所述的用于说明节点为第二级编码树的叶节点的条件(1)~条件(5)确定第一节点的信息。Further, if the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition, the child node of the first node is encoded as a second-level coding. Based on the leaf node of the tree, the decoding device may further determine the information of the first node in combination with the conditions (1) to (5) of the leaf node described in S602 for describing that the node is the second-level coding tree.
具体的,如果第一节点的第二级编码树层级小于预设的最大第二级编码树层级,且第一节点对应的图像区域的高(或宽)大于预设的最小CU的高(或宽),且第一节点对应的图像区域的高(或宽)小于或等于预设的最大CU的高(或宽),且第一节点的父节点对应的划分方式不是三叉树划分,则解码端设备从CTU码流中获取该第一节点对应的划分方式信息;否则,解码端设备确定该第一节点为第二级编码树的叶节点。Specifically, if the second level coding tree level of the first node is smaller than the preset maximum second level coding tree level, and the height (or width) of the image area corresponding to the first node is greater than the preset minimum CU height (or Width), and the height (or width) of the image region corresponding to the first node is less than or equal to the height (or width) of the preset maximum CU, and the division manner corresponding to the parent node of the first node is not a tri-tree partition, then decoding The end device acquires the partition mode information corresponding to the first node from the CTU code stream; otherwise, the decoding end device determines that the first node is a leaf node of the second level coding tree.
从上面描述可知,不再划分的节点对应一个CU。相应的,第一节点的每个子节点对应一个CU。As can be seen from the above description, nodes that are no longer divided correspond to one CU. Correspondingly, each child node of the first node corresponds to one CU.
具体的,解码端设备解析码流中的编码单元语法结构体(例如H.265中的coding_unit()语法结构体,coding_unit()语法结构体的解释请参考下面描述),得到每个CU的编码信息,每个CU的编码信息均包括CU的预测模式、变换系数等信息。这里,解码端设备获取每个CU的编码信息意味着解码端设备得到第二级编码树的每个叶节点的编码信息。Specifically, the decoding end device parses the coding unit syntax structure in the code stream (for example, the coding_unit() syntax structure in H.265, the explanation of the coding_unit() syntax structure is described below, and obtains the coding of each CU. Information, the coding information of each CU includes information such as a prediction mode and a transform coefficient of the CU. Here, the decoding end device acquiring the encoding information of each CU means that the decoding end device obtains the encoding information of each leaf node of the second-level coding tree.
可选的,本申请实施例中的解码端设备可以在执行S602的过程中,获取到第二级编码树的一个叶节点的信息后,解析码流,获取该叶节点的编码信息;在获取到该 叶节点的编码信息后,继续获取下一个第二级编码树的叶节点以及获取下一个第二级编码树的叶节点的编码信息,依次类推,直到最后一个第二级第二级编码树的叶节点。Optionally, the decoding end device in the embodiment of the present application may obtain the information of one leaf node of the second-level coding tree in the process of performing S602, parse the code stream, and obtain the coding information of the leaf node; After the coding information of the leaf node is obtained, the leaf information of the next second-level coding tree is obtained, and the coding information of the leaf node of the next second-level coding tree is obtained, and so on, until the last second-level second-level coding The leaf node of the tree.
在一个示例中,本申请实施例中第二级编码树的语法表如表1所示。coding_second_tree()为第二级编码树的语法结构体,描述第二级编码树的某一个节点的信息。In one example, the syntax table of the second level coding tree in the embodiment of the present application is as shown in Table 1. The coding_second_tree() is a grammatical structure of the second-level coding tree, and describes information of a node of the second-level coding tree.
表1中,x0和y0分别表示节点对应的图像区域的左上角相对于CTU对应的图像区域的左上角的水平坐标偏移和竖直坐标偏移;log2CuWidth和log2CuHeight分别表示节点对应的图像区域的宽和高以2为底的对数值;stDepth表示节点的第二级编码树层级,qtDepth表示节点对应的第一级编码树叶节点在第一级编码树上的层级;parentMode表示节点的父节点对应的划分方式。“X>>Y”表示将X右移Y位;“X<<Y”表示将X左移Y位;ae(v)表示使用CABAC解析语法元素。In Table 1, x0 and y0 respectively represent the horizontal coordinate offset and the vertical coordinate offset of the upper left corner of the image region corresponding to the node with respect to the upper left corner of the image region corresponding to the CTU; log2CuWidth and log2CuHeight respectively represent the image region corresponding to the node The base-valued logarithm of width and height; stDepth represents the second-level coding tree hierarchy of the node, qtDepth represents the level of the first-level coded leaf node corresponding to the node on the first-level coding tree; parentMode represents the parent node of the node The way of dividing. "X>>Y" means that X is shifted right by Y bits; "X<<Y" means that X is shifted left by Y bits; ae(v) means that syntax elements are parsed using CABAC.
STSplitMode的取值范围为0、1、2、3和4。当STSplitMode的数值为0时,节点为第二级编码树的叶节点,且该节点对应于一个CU,此时按照CU语法结构体coding_unit()解析编码单元信息。本申请实施例对编码单元信息的语法元素组织方式不做限定。当STSplitMode的数值为1至4时,分别使用水平二分、竖直二分、水平三分、竖直三分将节点划分为2个或3个子节点,对每个子节点,确定每个子节点对应的图像区域的宽、高、坐标、第二级编码树层级,并依次按照coding_second_tree()解析这些子节点。STSplitMode ranges from 0, 1, 2, 3, and 4. When the value of STSplitMode is 0, the node is a leaf node of the second-level coding tree, and the node corresponds to one CU. At this time, the coding unit information is parsed according to the CU syntax structure coding_unit(). The embodiment of the present application does not limit the manner in which the syntax elements of the coding unit information are organized. When the value of STSplitMode is 1 to 4, the node is divided into 2 or 3 sub-nodes by using horizontal dichotomy, vertical dichotomy, horizontal triad, and vertical three-point respectively, and for each sub-node, an image corresponding to each sub-node is determined. The width, height, coordinates, and second-level coding tree hierarchy of the region, and then parse these child nodes according to coding_second_tree().
表1中,当满足“节点的第二级编码树层级(用stDepth表示)小于预设的最大第二级编码树层级maxSTDepth,且节点对应的图像区域的宽和高均小于等于阈值maxSTSize,且节点对应的图像区域的宽或高大于阈值minCUSize,且节点的父节点对应的划分方式不是三叉树划分”时,解码端设备从码流中获取第二级编码树的节点划分方式信息STSplitMode;否则,STSplitMode不出现在码流中,这样,STSplitMode的数值默认设置为0。In Table 1, when the second-level coding tree level of the node (represented by stDepth) is less than the preset maximum second-level coding tree level maxSTDepth, and the width and height of the image area corresponding to the node are less than or equal to the threshold maxSTSize, and When the width or height of the image area corresponding to the node is greater than the threshold value minCUSize, and the division mode corresponding to the parent node of the node is not tri-tree partitioning, the decoding end device acquires the node division mode information STSplitMode of the second-level coding tree from the code stream; otherwise , STSplitMode does not appear in the code stream, so the value of STSplitMode is set to 0 by default.
可选的,coding_second_tree()的输入变量中还可包括节点的限制划分方式,节点的限制划分方式是指不能按照该划分方式划分节点。可以理解的是,解码端设备解析到的STSplitMode不能为上述限制划分方式所指示的划分方式。Optionally, the input variable of the coding_second_tree() may further include a restriction division manner of the node, and the restriction division manner of the node means that the node cannot be divided according to the division manner. It can be understood that the STSplitMode that the decoding end device resolves cannot be the division manner indicated by the above limitation division manner.
表1Table 1
Figure PCTCN2018078837-appb-000004
Figure PCTCN2018078837-appb-000004
Figure PCTCN2018078837-appb-000005
Figure PCTCN2018078837-appb-000005
在另一个示例中,本申请实施例中第二级编码树的语法表如表2所示。表2中,如果节点对应的划分方式为三叉树划分,即STSplitMode为3或4,则该节点的三个子节点均为第二级编码树的叶节点,编码端设备可依次得到这三个子节点的编码信息。In another example, the syntax table of the second level coding tree in the embodiment of the present application is as shown in Table 2. In Table 2, if the partitioning mode of the node is tri-tree partitioning, that is, STSplitMode is 3 or 4, the three child nodes of the node are leaf nodes of the second-level coding tree, and the encoding end device can obtain the three child nodes in turn. Encoding information.
S604、解码端设备根据第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。S604. The decoding end device performs decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node, to obtain an image corresponding to the image data.
对编码单元进行解码重建的过程包括预测、反量化、反变换、环路滤波等处理。具体的,对于每个编码单元进行解码重建的过程包括:The process of decoding and reconstructing a coding unit includes processing such as prediction, inverse quantization, inverse transform, loop filtering, and the like. Specifically, the process of performing decoding reconstruction for each coding unit includes:
(1)、根据该CU的编码信息所包括的预测模式,选用帧内预测或帧间预测,得到该CU的预测像素。(1) Selecting, according to a prediction mode included in the coding information of the CU, using intra prediction or inter prediction to obtain a prediction pixel of the CU.
(2)、如果该CU存在变换系数,则根据量化参数、变换模式,对该CU的变换系数进行反量化和反变换处理,得到该CU的重建残差。如果该CU不存在变换系数,则该CU的重建残差为0,即该CU中各像素的重建残差值均为0。(2) If the CU has a transform coefficient, the transform coefficient of the CU is inverse quantized and inverse transformed according to the quantization parameter and the transform mode, and the reconstructed residual of the CU is obtained. If the CU does not have a transform coefficient, the reconstructed residual of the CU is 0, that is, the reconstructed residual value of each pixel in the CU is 0.
(3)、将该CU的预测像素和该CU的重建残差相加后进行环路滤波处理,得到CU的重建图像块。(3) Adding the predicted pixel of the CU and the reconstructed residual of the CU, and performing loop filtering processing to obtain a reconstructed image block of the CU.
编码端设备按照上述方法对每个编码单元进行解码重建,获取到每个CU的重建图像块。在获取到每个CU的重建图像块后,编码端设备根据获取到的所有重建图像块得到最终的重建图像,即得到对应图像数据的图像。The encoding end device performs decoding reconstruction on each coding unit according to the above method, and acquires a reconstructed image block of each CU. After acquiring the reconstructed image block of each CU, the encoding end device obtains the final reconstructed image according to all the reconstructed image blocks obtained, that is, obtains an image corresponding to the image data.
本申请实施例中的解码端设备只需确定某一节点对应的划分方式为三叉树划分,即可直接得到该节点的子节点的编码信息,无需再依次对该节点的所有子节点进行解码,加快了解码的速率,降低了解码的复杂度。The decoding end device in the embodiment of the present application only needs to determine that the partitioning manner corresponding to a certain node is a tri-tree partition, and the encoding information of the child node of the node can be directly obtained, and it is not necessary to sequentially decode all the child nodes of the node. Speed up the decoding and reduce the complexity of decoding.
在图6所示的实施例中,若某一节点的父节点对应的划分方式为三叉树划分,则该节点不再继续划分。这一条件限制了节点的划分,在这一条件的作用下,本申请实施例提供的解码方法加快了解码的速率,降低了解码的复杂度。这一条件可以为图像处理系统预先设置的,也可以是根据实际需求确定的,本申请实施例对此不作具体限定。In the embodiment shown in FIG. 6, if the division mode corresponding to the parent node of a node is a tri-tree division, the node does not continue to divide. This condition limits the division of nodes. Under the condition of this condition, the decoding method provided by the embodiment of the present application speeds up the decoding rate and reduces the complexity of decoding. This condition may be preset for the image processing system, or may be determined according to actual needs, which is not specifically limited in the embodiment of the present application.
进一步地,在图6所示的实施例的基础上,本申请实施例中的解码端设备还可以在得到包含图像数据的码流后,先判断是否限制三叉树得到的节点继续进行划分,然后再根据判断结果解析图像数据。Further, on the basis of the embodiment shown in FIG. 6, the decoding end device in the embodiment of the present application may further determine whether to limit the node obtained by the tri-tree to continue dividing after obtaining the code stream containing the image data, and then The image data is further analyzed based on the judgment result.
具体的,结合图6,如图7所示,本申请实施例提供的解码方法包括:Specifically, in conjunction with FIG. 6, as shown in FIG. 7, the decoding method provided by the embodiment of the present application includes:
S700、解码端设备得到包含图像数据的码流。S700. The decoding end device obtains a code stream that includes image data.
S700可以参考上述S600的描述,此处不再进行详细赘述。For the S700, refer to the description of the foregoing S600, and details are not described herein again.
表2Table 2
Figure PCTCN2018078837-appb-000006
Figure PCTCN2018078837-appb-000006
Figure PCTCN2018078837-appb-000007
Figure PCTCN2018078837-appb-000007
S701、解码端设备解析其得到的码流,得到三叉树叶节点模式标识。S701. The decoding end device parses the obtained code stream to obtain a tri-tree leaf node mode identifier.
该三叉树叶节点模式标识用于指示是否限制三叉树划分得到的节点继续进行划分。The tri-tree leaf node mode identifier is used to indicate whether the node obtained by limiting the tri-tree partitioning continues to divide.
示例性的,三叉树叶节点模式标识表示为tt_leaf_mode_enabled_flag,tt_leaf_mode_enabled_flag的数值为第一值(例如1),表示与tt_leaf_mode_enabled_flag关联的CTU中三叉树划分后的节点为编码树叶节点,即若某一节点对应的划分方式为三叉树划分,则该节点的子节点为编码树的叶节点;tt_leaf_mode_enabled_flag为第二值(例如0),表示与tt_leaf_mode_enabled_flag关联的CTU中三叉树划分后的节点还可继续划分,即若某一节点对应的划分方式为三叉树划分,则该节点的子节点还可以对应除不划分以外的其他划分方式。Exemplarily, the tri-tree leaf node mode identifier is represented by tt_leaf_mode_enabled_flag, and the value of tt_leaf_mode_enabled_flag is a first value (for example, 1), and the node after the tri-tree partitioning in the CTU associated with the tt_leaf_mode_enabled_flag is a coded leaf node, that is, if a node corresponds to The division mode is a tri-tree partition, and the child node of the node is a leaf node of the coding tree; the tt_leaf_mode_enabled_flag is a second value (for example, 0), and the node after the tri-tree division in the CTU associated with the tt_leaf_mode_enabled_flag can continue to be divided, that is, if If the partitioning mode of a node is a tri-tree partition, the child nodes of the node may also correspond to other partitioning modes except for the partitioning.
可选的,包含图像数据的码流中的SPS、PPS以及条带头中的至少一项包括该三叉树叶节点模式标识。Optionally, at least one of the SPS, the PPS, and the strip header in the code stream including the image data includes the tri-tree leaf node pattern identifier.
具体的,如果SPS和PPS均包括三叉树叶节点模式标识,且SPS包括的三叉树叶节点模式标识的数值与PPS包括的三叉树叶节点模式标识的数值不同,则PPS包括的三叉树叶节点模式标识生效,而SPS包括的三叉树叶节点模式标识无效。如果SPS和条带头均包括三叉树叶节点模式标识,且SPS包括的三叉树叶节点模式标识的数值与条带头包括的三叉树叶节点模式标识的数值不同,则条带头包括的三叉树叶节点模式标识生效,而SPS包括的三叉树叶节点模式标识无效。如果PPS和条带头均包括三叉树叶节点模式标识,且PPS包括的三叉树叶节点模式标识的数值与条带头包括的三叉树叶节点模式标识的数值不同,则条带头包括的三叉树叶节点模式标识生效,而PPS包括的三叉树叶节点模式标识无效。也就是说,如果三叉树叶节点模式标识在多层语法结构体中同时出现且不同语法结构体中三叉树叶节点模式标识的数值不同,则最下层的语法结构体中的三叉树叶节点模式标识生效,而上层语法结构体中的三叉树叶节点模式标识无效。Specifically, if both the SPS and the PPS include the tri-tree leaf node pattern identifier, and the value of the tri-tree leaf node pattern identifier included in the SPS is different from the value of the tri-tree leaf node pattern identifier included in the PPS, the tri-tree leaf node pattern identifier included in the PPS is effective. The trigeminal leaf node pattern identifier included in the SPS is invalid. If both the SPS and the strip header include a tri-tree leaf node pattern identifier, and the value of the tri-tree leaf node pattern identifier included in the SPS is different from the value of the tri-tree leaf node pattern identifier included in the strip header, the tri-tree leaf node pattern identifier included in the strip header is valid. The trigeminal leaf node pattern identifier included in the SPS is invalid. If both the PPS and the strip header include the tri-tree leaf node pattern identifier, and the value of the tri-tree leaf node pattern identifier included in the PPS is different from the value of the tri-tree leaf node pattern identifier included in the strip header, the tri-tree leaf node pattern identifier included in the strip header is valid. However, the trigeminal leaf node pattern identifier included in the PPS is invalid. That is, if the trigeminal leaf node pattern identifiers appear simultaneously in the multi-layer syntax structure and the values of the trigeminal leaf node pattern identifiers in the different syntax structures are different, the trigeminal leaf node pattern identifier in the lowermost syntax structure is effective. The trigeminal leaf node pattern identifier in the upper grammatical structure is invalid.
具体的,解码端设备在得到包含图像数据的码流后,解析该码流,从该码流中获取生效的三叉树叶节点模式标识。Specifically, after obtaining the code stream containing the image data, the decoding end device parses the code stream, and obtains an effective trigeminal leaf node pattern identifier from the code stream.
示例性的,若SPS中包含tt_leaf_mode_enabled_flag,则解码端设备在解码CTU的同时,从SPS中获取与该CTU对应的tt_leaf_mode_enabled_flag。Exemplarily, if the SPS includes tt_leaf_mode_enabled_flag, the decoding end device acquires the tt_leaf_mode_enabled_flag corresponding to the CTU from the SPS while decoding the CTU.
S702、解码端设备解码其得到的码流,得到第一级编码树的节点划分方式信息。S702. The decoding end device decodes the obtained code stream to obtain node division manner information of the first-level coding tree.
S702可以参考上述S601的描述,此处不再进行详细赘述。S702 can refer to the description of S601 above, and details are not described herein again.
S703、解码端设备解析其得到的码流,得到第二级编码树的节点划分方式信息。S703. The decoding end device parses the obtained code stream to obtain node division mode information of the second-level coding tree.
S703可以参考送上述S602的描述,此处不再进行详细赘述。S703 can refer to the description of sending S602 above, and details are not described herein again.
S704、如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,且三叉树叶节点模式标识指示限制三叉树划分得到的节点继续进行划分,解码端设备解析码流,得到第一节点的三个子节点的编码信息。S704. If the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition, and the tri-tree leaf node pattern identifier indicates that the node obtained by limiting the tri-tree partition continues to be divided. The decoding end device parses the code stream to obtain coding information of the three child nodes of the first node.
S704与上述S603类似,不同的是,相比于上述S603,S704中的解码端设备不仅需要确定第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,还需要确定三叉树叶节点模式标识指示限制三叉树划分得到的节点继续进行划分。S704 is similar to the foregoing S603, except that the decoding end device in S704 needs to determine not only the node division manner information of the second-level coding tree but also the division manner corresponding to the first node in the second-level coding tree. For the tri-tree partitioning, it is also necessary to determine that the tri-tree leaf node mode identifier indicates that the node obtained by limiting the tri-tree partitioning continues to divide.
示例性的,表3为本实施例中第二级编码树的语法表。相比表1,表3中STSplitMode的解析条件修改为“节点的第二级编码树层级stDepth小于预设的最大第二级编码树层级maxSTDepth,且节点对应的图像区域的宽或高大于阈值minCUSize, 且节点的父节点对应的划分方式不是三叉树划分或tt_leaf_mode_enabled_flag非0”。Exemplarily, Table 3 is a syntax table of the second level coding tree in this embodiment. Compared with Table 1, the parsing condition of STSplitMode in Table 3 is modified to: "The second-level coding tree level stDepth of the node is smaller than the preset maximum second-level coding tree level maxSTDepth, and the width or height of the image area corresponding to the node is greater than the threshold minCUSize And the parent node of the node is not divided by a trinomial partition or tt_leaf_mode_enabled_flag is non-zero.
表3table 3
Figure PCTCN2018078837-appb-000008
Figure PCTCN2018078837-appb-000008
Figure PCTCN2018078837-appb-000009
Figure PCTCN2018078837-appb-000009
S705、解码端设备根据第一节点的三个子节点的编码信息,对编码单元进行解码重建,得到对应图像数据的图像。S705. The decoding end device performs decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node, to obtain an image corresponding to the image data.
S705可以参考上述S604,此处不再进行详细赘述。S705 can refer to the above S604, and details are not described herein again.
本申请实施例增加了限制节点划分的条件:若某一节点的父节点对应的划分方式为三叉树划分,则该节点不再继续划分。解码端设备只需确定某一节点对应的划分方式为三叉树划分,即可直接得到该节点的子节点的编码信息,无需再依次对该节点的所有子节点进行解码,加快了解码的速率,降低了解码的复杂度。此外,解码端设备可根据三叉树叶节点模式标识确定节点划分的限制情况,从而自适应地获取每一级编码树的节点划分信息。The embodiment of the present application adds a condition for restricting node division: if the division manner corresponding to the parent node of a node is a tri-tree division, the node does not continue to divide. The decoding end device only needs to determine that the corresponding division manner of a certain node is a tri-tree division, and the coding information of the child node of the node can be directly obtained, and the decoding of all the child nodes of the node is not required, thereby speeding up the decoding rate. Reduced the complexity of decoding. In addition, the decoding end device may determine the limitation of the node division according to the tri-tree leaf node mode identifier, thereby adaptively acquiring the node division information of each level coding tree.
在图6和图7示出的实施例中,第一级编码树对应的划分方式包括四叉树划分,第二级编码树对应的划分方式包括二叉树划分和三叉树划分。在实际应用中,第二级编码树对应的划分方式可仅包括二叉树划分,这样便会引出第三级编码树,该第三级编码树对应的划分方式包括三叉树划分。In the embodiment shown in FIG. 6 and FIG. 7 , the division manner corresponding to the first-level coding tree includes a quad-tree division, and the division manner corresponding to the second-level coding tree includes a binary tree division and a tri-tree division. In a practical application, the division manner corresponding to the second-level coding tree may include only the binary tree division, so that the third-level coding tree is extracted, and the division manner corresponding to the third-level coding tree includes the tri-tree division.
如图8所示,在这种场景中,本申请实施例提供的图像数据的解码方法包括:As shown in FIG. 8, in this scenario, the method for decoding image data provided by the embodiment of the present application includes:
S800、解码端设备得到包含图像数据的码流。S800. The decoding end device obtains a code stream that includes image data.
S800可以参考上述S600的描述,此处不再进行详细赘述。For the S800, refer to the description of the foregoing S600, and details are not described herein again.
S801、解码端设备解码其得到的码流,得到第一级编码树的节点划分方式信息。S801. The decoding end device decodes the obtained code stream to obtain node division manner information of the first-level coding tree.
S801可以参考上述S601的描述,此处不再进行详细赘述。S801 can refer to the description of S601 above, and details are not described herein again.
S802、解码端设备解析其得到的码流,得到第二级编码树的节点划分方式信息。S802. The decoding end device parses the obtained code stream to obtain node division mode information of the second-level coding tree.
其中,第二级编码树的根节点为第一级编码树的一个叶节点。本实施例中第二级编码树对应的节点划分方式包括二叉树划分。The root node of the second-level coding tree is a leaf node of the first-level coding tree. The node division manner corresponding to the second-level coding tree in this embodiment includes a binary tree division.
与上述S602类似,解码端设备解析CTU码流,获取用于指示如何划分第二级编码树中某一节点的第四标识(如STSplitMode),即第四标识表示第二级编码树的节点划分方式信息。Similar to the above S602, the decoding end device parses the CTU code stream, and obtains a fourth identifier (such as STSplitMode) for indicating how to divide a node in the second-level coding tree, that is, the fourth identifier indicates the node division of the second-level coding tree. Way information.
由于本实施例中第二级编码树对应的节点划分方式包括二叉树划分,因此,本实施例中的第四标识可以用于指示不划分某一节点,也可以用于指示与某一节点对应的划分方式为水平二分或竖直二分。In this embodiment, the node division manner corresponding to the second-level coding tree includes a binary tree division. Therefore, the fourth identifier in this embodiment may be used to indicate that a node is not divided, and may also be used to indicate that it corresponds to a node. The division method is horizontal two points or vertical two points.
示例性的,第四标识表示为STSplitMode,STSplitMode的数值为0,说明不再继续划分与该STSplitMode对应的节点;STSplitMode的数值1或2,分别表示与 STSplitMode对应的节点所对应的划分方式为水平二分或竖直二分。Exemplarily, the fourth identifier is represented as STSplitMode, and the value of STSplitMode is 0, indicating that the node corresponding to the STSplitMode is not further divided; the value 1 or 2 of the STSplitMode indicates that the corresponding manner of the node corresponding to the STSplitMode is horizontal. Two points or two vertical points.
结合该示例,表4示出了本实施例中第二级编码树的语法表。当解码端设备解析到STSplitMode的数值为0时,则开始解析第三级编码树语法结构体;当解析到STSplitMode的数值为1或2时,分别使用水平二分或竖直二分将节点划分为2个子节点,再对各子节点依次按照coding_second_tree()语法结构进行解析。In conjunction with this example, Table 4 shows a syntax table for the second level coding tree in this embodiment. When the decoding device parses the value of STSplitMode to 0, it starts parsing the third-level coding tree syntax structure; when the value of STSplitMode is 1 or 2, the node is divided into 2 by horizontal dichotomy or vertical dichotomy, respectively. The child nodes are then parsed according to the coding_second_tree() syntax structure for each child node.
表4Table 4
Figure PCTCN2018078837-appb-000010
Figure PCTCN2018078837-appb-000010
可选的,本实施例中的第四标识可以包括用于指示是否继续按照二叉树划分方式划分的节点划分标识(如STSplitFlag)和用于表示二叉树划分的方向的划分方向标识(如STSplitDir)。Optionally, the fourth identifier in this embodiment may include a node partition identifier (such as STSplitFlag) for indicating whether to continue to divide according to a binary tree partition manner, and a split direction identifier (such as STSplitDir) for indicating a direction of the binary tree partition.
示例性的,节点划分标识为STSplitFlag,如果STSplitFlag的数值等于0,表示不划分与该STSplitFlag对应的节点;如果STSplitFlag的数值等于1,表示继续按照二叉树划分方式划分与该STSplitFlag对应的节点。划分方向标识为STSplitDir,如果STSplitDir的数值等于0,表示按照水平二分划分方式划分与该STSplitDir对应的节点;如果STSplitDir的数值等于1,表示节按照竖直二分划分方式划分与该STSplitDir对 应的节点。Exemplarily, the node division identifier is STSplitFlag. If the value of STSplitFlag is equal to 0, it indicates that the node corresponding to the STSplitFlag is not divided. If the value of STSplitFlag is equal to 1, it indicates that the node corresponding to the STSplitFlag is continued to be divided according to the binary tree division manner. The division direction identifier is STSplitDir. If the value of STSplitDir is equal to 0, it indicates that the node corresponding to the STSplitDir is divided according to the horizontal binary division manner; if the value of STSplitDir is equal to 1, it indicates that the node divides the node corresponding to the STSplitDir according to the vertical division method.
S803、如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为不继续按照第二级编码树的划分方式进行划分,解码端设备解析码流,得到第三级编码树的节点划分方式信息。S803. If the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is not continued to be divided according to the division manner of the second-level coding tree, the decoding end device parses the code stream, The node division mode information of the third-level coding tree is obtained.
如果第二级编码树中的第一节点对应的划分方式不继续按照第二级编码树的划分方式进行划分,则说明该第一节点为第二级编码树的叶节点。第一节点有可能按照第三级编码树的划分方式划分,因此,第一节点为第三级编码树的根节点。本实施例中第三级编码树对应的划分方式包括三叉树划分。If the division manner corresponding to the first node in the second-level coding tree does not continue to be divided according to the division manner of the second-level coding tree, the first node is a leaf node of the second-level coding tree. The first node may be divided according to the division manner of the third-level coding tree. Therefore, the first node is the root node of the third-level coding tree. The division manner corresponding to the third-level coding tree in this embodiment includes a tri-tree division.
第一节点为第三级编码树的根节点,且第三级编码树对应的划分方式为三叉树划分,因此,第一节点的三个子节点均为第三级编码树的叶节点。The first node is the root node of the third-level coding tree, and the third-level coding tree is divided into three-tree trees. Therefore, the three child nodes of the first node are the leaf nodes of the third-level coding tree.
具体的,如果第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为不继续按照第二级编码树的划分方式进行划分,解码端设备解析CTU码流,获取用于指示如何划分第三级编码树中某一节点的第五标识(如TTSplitMode),即第五标识表示第三级编码树的节点划分方式信息。Specifically, if the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is not continued to be divided according to the division manner of the second-level coding tree, the decoding end device parses the CTU code. The stream obtains a fifth identifier (such as TTSplitMode) for indicating how to divide a node in the third-level coding tree, that is, the fifth identifier indicates node division manner information of the third-level coding tree.
由于本实施例中第三级编码树对应的节点划分方式包括三叉树划分,因此,本实施例中的第四标识可以用于指示不划分某一节点,也可以用于指示与某一节点对应的划分方式为水平三分或竖直三分。In this embodiment, the node division manner corresponding to the third-level coding tree includes a tri-tree division. Therefore, the fourth identifier in this embodiment may be used to indicate that a node is not divided, and may also be used to indicate that it corresponds to a certain node. It is divided into horizontal three points or vertical three points.
示例性的,第五标识表示为TTSplitMode,TTSplitMode的数值为0,说明不再继续划分与该TTSplitMode对应的节点;TTSplitMode的数值1或2,分别表示与TTSplitMode对应的节点所对应的划分方式为水平三分或竖直三分。Exemplarily, the fifth identifier is represented by TTSplitMode, and the value of TTSplitMode is 0, indicating that the node corresponding to the TTSplitMode is not further divided; the value of TTSplitMode is 1 or 2, respectively, indicating that the corresponding mode corresponding to the node corresponding to TTSplitMode is horizontal. Three points or three vertical points.
可选的,本实施例中的第五标识可以包括用于指示是否按照三叉树划分方式划分的节点划分标识(如TTSplitFlag)和用于表示三叉树划分的方向的划分方向标识(如TTSplitDir)。Optionally, the fifth identifier in this embodiment may include a node partition identifier (such as TTSplitFlag) for indicating whether to divide according to a tri-tree partition manner, and a split direction identifier (such as TTSplitDir) for indicating a direction of the tri-tree partition.
示例性的,节点划分标识为TTSplitFlag,如果TTSplitFlag的数值等于0,表示不划分与该TTSplitFlag对应的节点;如果TTSplitFlag的数值等于1,表示继续按照三叉树划分方式划分与该TTSplitFlag对应的节点。划分方向标识为TTSplitDir,如果TTSplitDir的数值等于0,表示按照水平三分划分方式划分与该TTSplitDir对应的节点;如果TTSplitDir的数值等于1,表示节按照竖直三分划分方式划分与该TTSplitDir对应的节点。Exemplarily, the node division identifier is TTSplitFlag. If the value of TTSplitFlag is equal to 0, it indicates that the node corresponding to the TTSplitFlag is not divided. If the value of TTSplitFlag is equal to 1, it indicates that the node corresponding to the TTSplitFlag is continued to be divided according to the tri-tree partition manner. The division direction identifier is TTSplitDir. If the value of TTSplitDir is equal to 0, it means that the node corresponding to the TTSplitDir is divided according to the horizontal three-point division manner; if the value of TTSplitDir is equal to 1, it indicates that the section is divided into the TTSplitDir according to the vertical three-point division manner. node.
S804、如果第三级编码树的节点划分方式信息指示第一节点对应的划分方式为三叉树划分,解码端设备解析码流,得到第一节点的三个子节点的编码信息。S804. If the node division mode information of the third-level coding tree indicates that the division manner corresponding to the first node is a tri-tree division, the decoding end device parses the code stream to obtain coding information of three child nodes of the first node.
其中,第一节点的一个子节点对应一个CU。Wherein, one child node of the first node corresponds to one CU.
S804可以参考上述S603,不同的是,S804中解码端设备获取的是第三级编码树的叶节点的编码信息。S804 may refer to the above S603, except that the decoding end device in S804 acquires the coding information of the leaf node of the third-level coding tree.
示例性的,表5示出本实施例中第三级编码树的语法表。表5中,当满足“节点的第二级编码树层级stDepth表示小于预设的最大第二级编码树层级maxSTDepth,节点对应的图像区域的宽和高均小于等于阈值maxSTSize,且节点对应的图像区域的宽或高大于阈值minCUSize的2倍”,则解码端设备解析TTSplitMode;否则,TTSplitMode的数值为0。如果TTSplitMode的数值为0,则与该TTSplitMode对应的节点为第三级 编码树的叶节点,解码端设备解析CU语法结构体coding_unit()获取CU信息;如果TTSplitMode的数值为1或2,则解码端设备对与该TTSplitMode对应的节点的三个子节点依次解析coding_unit()获取CU信息。Illustratively, Table 5 shows a syntax table of the third level coding tree in this embodiment. In Table 5, when the second-level coding tree level stDepth of the node is satisfied to be smaller than the preset maximum second-level coding tree level maxSTDepth, the width and height of the image area corresponding to the node are less than or equal to the threshold maxSTSize, and the image corresponding to the node If the width or height of the area is greater than 2 times the threshold minCUSize, the decoding device parses TTSplitMode; otherwise, the value of TTSplitMode is 0. If the value of TTSplitMode is 0, the node corresponding to the TTSplitMode is a leaf node of the third-level coding tree, and the decoding device parses the CU syntax structure coding_unit() to obtain CU information; if the value of TTSplitMode is 1 or 2, decoding The terminal device sequentially parses the coding_unit() for the three child nodes of the node corresponding to the TTSplitMode to obtain CU information.
S805、解码端设备根据第一节点的三个子节点的解码信息,对编码单元进行解码重建,得到对应图像数据的图像。S805. The decoding end device performs decoding and reconstruction on the coding unit according to the decoding information of the three child nodes of the first node, to obtain an image corresponding to the image data.
S805可以参考上述S604,此处不再进行详细赘述。S805 can refer to the above S604, and details are not described herein again.
与上述图6、图7所示的实施例相比,本实施例中的第二级编码树对应的划分方式仅包括二叉树划分,第三级编码树对应的划分方式包括三叉树划分,第三级编码树的根节点的三个子节点均为第三级编码树的叶节点,解码端设备可更加快速的获取到第二级编码树的节点划分方式信息和第三级编码树的节点划分方式信息,进一步地提高了解码速率。Compared with the embodiment shown in FIG. 6 and FIG. 7 , the division manner corresponding to the second-level coding tree in this embodiment includes only the binary tree division, and the division manner corresponding to the third-level coding tree includes the tri-tree division, and the third The three child nodes of the root node of the level coding tree are the leaf nodes of the third-level coding tree, and the decoding end device can obtain the node division mode information of the second-level coding tree and the node division manner of the third-level coding tree more quickly. The information further increases the decoding rate.
表5table 5
Figure PCTCN2018078837-appb-000011
Figure PCTCN2018078837-appb-000011
此外,本申请实施例还提供一种图像数据的编码方法,该编码方法可以应用在图4所示的图像处理系统中。In addition, the embodiment of the present application further provides an encoding method of image data, which can be applied to the image processing system shown in FIG. 4.
如图9所示,本申请实施例提供的图像数据的编码方法包括:As shown in FIG. 9, the encoding method of the image data provided by the embodiment of the present application includes:
S900、编码端设备确定与待编码图像块对应的CTU。S900. The encoding end device determines a CTU corresponding to the image block to be encoded.
从前面描述可知,一幅图像由多个CTU构成,一个CTU通常对应于一个方形图像区域。编码端设备在获取到某一图像后,对该图像的每个CTU进行编码处理。As can be seen from the foregoing description, an image is composed of a plurality of CTUs, and a CTU generally corresponds to a square image area. After acquiring an image, the encoding end device performs encoding processing on each CTU of the image.
编码端设备对每个CTU的编码处理过程均相同,因此,本申请实施例以编码端设备对其中一个CTU的编码处理为例进行说明。The coding process of the CPT is the same for each CTU. Therefore, the coding process of one CTU by the coding end device is taken as an example for description.
S901、编码端设备将CTU按照第一级编码树对应的节点划分方式进行划分,得到第一级编码树的叶节点。S901: The coding end device divides the CTU according to a node division manner corresponding to the first-level coding tree, to obtain a leaf node of the first-level coding tree.
第一级编码树的根节点对应CTU,第一级编码树对应的节点划分方式为四叉树划分。The root node of the first-level coding tree corresponds to the CTU, and the node division manner corresponding to the first-level coding tree is a quad-tree partition.
具体的,编码端设备将CTU确定为第一级编码树的根节点,使用QT划分方式,将该CTU递归划分为至少一个叶节点。Specifically, the encoding end device determines the CTU as the root node of the first-level coding tree, and uses the QT division manner to recursively divide the CTU into at least one leaf node.
编码端设备在获取到第一级编码树的至少一个叶节点后,将第一级编码树的每个叶节点确定为第二级编码树的根节点,并依次对第二级编码树的每个根节点执行下述步骤,直到获取到第二级编码树的所有叶节点的信息。本申请实施例以编码端设备对第二级编码树中的第一节点的处理为例进行说明。After acquiring the at least one leaf node of the first-level coding tree, the encoding end device determines each leaf node of the first-level coding tree as the root node of the second-level coding tree, and sequentially pairs each of the second-level coding trees. The root nodes perform the following steps until information about all leaf nodes of the second level coding tree is obtained. The embodiment of the present application is described by taking the processing of the first node in the second-level coding tree by the encoding end device as an example.
S902、编码端设备根据预设条件,确定第二级编码树中的第一节点能够使用的划分方式,该预设条件包括:若第一节点的父节点对应的划分方式为三叉树划分,确定不划分第一节点。S902: The encoding end device determines, according to the preset condition, a division manner that can be used by the first node in the second-level coding tree, where the preset condition includes: if the division manner corresponding to the parent node of the first node is a tri-tree division, determining Does not divide the first node.
一般的,在第一节点的划分无任何限制条件的情况下,第一节点能够使用的划分方式包括不划分、水平二分、水平三分、竖直二分、竖直三分和四叉树划分方式。这样的话,编码端设备需要依次计算这六种划分方式的RD cost,导致编码复杂度较高。Generally, in the case where the division of the first node is without any restriction, the division manner that the first node can use includes no division, horizontal dichotomy, horizontal trisection, vertical dichotomy, vertical trisection, and quadtree division. . In this case, the encoding end device needs to calculate the RD cost of the six partitioning modes in turn, resulting in high coding complexity.
本申请实施例提出了限制第一节点能够使用的划分方式的预设条件,该预设条件包括:若第一节点的父节点使用三叉树划分方式划分,则确定不划分第一节点。这样,编码端设备确定第一节点的父节点使用TT划分方式划分后,不再划分第一节点,无需再计算针对第一节点的六种划分方式的RD cost,降低了编码复杂度。The embodiment of the present application provides a preset condition for limiting a division manner that can be used by the first node. The preset condition includes: if the parent node of the first node uses the tri-tree partitioning manner, it is determined that the first node is not divided. In this way, after the coding end device determines that the parent node of the first node is divided by the TT division mode, the first node is no longer divided, and the RD cost of the six division manners for the first node is not required to be calculated, thereby reducing the coding complexity.
此外,预设条件还包括:当第一节点对应的图像区域的宽、第一节点对应的图像区域的高、第一节点的第二级编码树层级等参数满足某一条件时,确定不允许第一节点使用第一划分方式,该第一划分方式为水平二分、水平三分、竖直二分、竖直三分和四叉树划分方式中的至少一种。In addition, the preset condition further includes: when the width of the image region corresponding to the first node, the height of the image region corresponding to the first node, and the second-level coding tree hierarchy of the first node satisfy a certain condition, determining that the parameter is not allowed The first node uses a first division manner, and the first division manner is at least one of a horizontal dichotomy, a horizontal triad, a vertical dichotomy, a vertical triad, and a quadtree division manner.
示例性的,当第一节点对应的图像区域的宽度等于预设的最小CU的宽度时,不允许第一节点使用竖直二分和竖直三分这两种划分方式;当第一节点对应的图像区域的高度等于预设的最小CU的高度的2倍时,不允许第一节点使用水平三分划分方式;当第一节点为第二级编码树的节点时,不允许第一节点使用四叉树划分方式;当第一节点的第二级编码树层级等于预设的最大第二级编码树层级(用maxSTDepth表示)时,确定不划分第一节点。Exemplarily, when the width of the image area corresponding to the first node is equal to the width of the preset minimum CU, the first node is not allowed to use two division modes: vertical binary and vertical three; when the first node corresponds to When the height of the image area is equal to twice the height of the preset minimum CU, the first node is not allowed to use the horizontal three-point division manner; when the first node is the node of the second-level coding tree, the first node is not allowed to use the fourth node. The cross-tree partitioning mode; when the second-level coding tree level of the first node is equal to the preset maximum second-level coding tree hierarchy (represented by maxSTDepth), it is determined that the first node is not divided.
当然,上述示例仅仅是对本申请实施例中的预设条件的举例,本申请实施例中的预设条件还可以包括其他类型的划分方式的限制。Of course, the foregoing example is only an example of the preset condition in the embodiment of the present application, and the preset condition in the embodiment of the present application may further include restrictions of other types of division manner.
S903、如果第一节点能够使用的划分方式为不划分,编码端设备对与第一节点对应的CU进行编码,得到对应CU的编码单元码流。S903. If the division manner that can be used by the first node is not divided, the encoding end device encodes the CU corresponding to the first node, and obtains a coding unit code stream corresponding to the CU.
如果第一节点能够使用的划分方式为不划分,则说明第一节点为第二级编码树的 叶节点,该第一节点对应一个CU。编码端设备对与该第一节点对应的CU进行编码,得到与该CU的编码单元码流。If the division mode that the first node can use is no division, the first node is a leaf node of the second-level coding tree, and the first node corresponds to one CU. The encoding end device encodes the CU corresponding to the first node to obtain a coded unit code stream with the CU.
具体的,CU编码包括预测(prediction)、变换(transform)、量化(quantization)、熵编码(entropy coding)等环节。对于某一CU而言,编码端设备对该CU进行编码,得到该CU的CU码流的过程主要包括:Specifically, the CU coding includes a prediction, a transform, a quantization, and an entropy coding. For a certain CU, the encoding end device encodes the CU, and the process of obtaining the CU code stream of the CU mainly includes:
(1)、编码端设备根据预测模式,选用帧内预测或帧间预测,得到CU的预测像素。(1) The encoding end device selects the intra prediction or the inter prediction according to the prediction mode to obtain the predicted pixel of the CU.
(2)、编码端设备将CU的原始像素和CU的预测像素之间的残差进行变化和量化,得到变换系数,并对得到的变换系数进行反量化、反变换处理,从而得到该CU的重建残差。(2) The encoding end device changes and quantizes the residual between the original pixel of the CU and the predicted pixel of the CU to obtain a transform coefficient, and performs inverse quantization and inverse transform processing on the obtained transform coefficient, thereby obtaining the CU. Rebuild the residual.
(3)、编码端设备将该CU的预测像素和该CU的重建残差相加后进行环路滤波处理,得到该CU的重建像素。(3) The encoding end device adds the predicted pixel of the CU and the reconstructed residual of the CU, and performs loop filtering processing to obtain the reconstructed pixel of the CU.
(4)、编码端设备对该CU的预测模式、变换系数等信息进行熵编码,得到CU码流。(4) The encoding end device entropy encodes the prediction mode and the transform coefficient of the CU to obtain a CU code stream.
编码端设备对CU进行编码,得到该CU的CU码流的详细过程可以参考现有的生成CU码流的方法,此处不再进行详细赘述。For the detailed process of obtaining the CU code stream of the CU, the method for generating the CU code stream of the CU may refer to the existing method for generating the CU code stream, and details are not described herein again.
S904、如果第一节点能够使用的划分方式未包括不划分,编码端设备计算第一节点能够使用的划分方式中的每种划分方式的RD cost。S904. If the division manner that the first node can use does not include no division, the encoding end device calculates an RD cost of each of the division manners that the first node can use.
对于第一节点能够使用的某一种划分方式,编码端设备使用该划分方式划分第一节点,并获取该划分方式划分第一节点后的所有CU,编码端设备计算每个CU的RD cost,并将所有CU的RD cost之和确定为该划分方式的RD cost。For a certain division manner that can be used by the first node, the coding end device divides the first node by using the division manner, and obtains all the CUs after the first node is divided by the division manner, and the coding end device calculates the RD cost of each CU. The sum of the RD costs of all CUs is determined as the RD cost of the division mode.
可选的,对于任一CU而言,该CU的RD cost等于该CU包含的像素的重建失真的平方误差总和(Sum of Squared Errors,SSE)与该CU对应码流的比特数估算值的加权和。Optionally, for any CU, the RD cost of the CU is equal to the sum of the Sum of Squared Errors (SSE) of the reconstructed distortion of the pixel included in the CU and the estimated number of bits of the CU corresponding code stream. with.
S905、编码端设备将最小的率失真代价对应的划分方式确定为第一节点对应的目标划分方式。S905. The coding end device determines, by using a minimum rate distortion cost, a division manner as a target division manner corresponding to the first node.
S906、编码端设备使用第一节点对应的目标划分方式划分第一节点。S906. The coding end device divides the first node by using a target division manner corresponding to the first node.
编码端设备使用第一节点对应的目标划分方式划分第一节点后,再对第一节点的每个子节点依次执行S902-S906,直到获取到第二级编码树中的所有叶节点。After the coding end device divides the first node by using the target division manner corresponding to the first node, the S902-S906 is sequentially executed for each child node of the first node until all the leaf nodes in the second-level coding tree are acquired.
第二级编码树的每个叶节点对应一个CU,编码端设备在获取到第二级编码树的所有叶节点后,可获取到第二级编码树每个叶节点对应的CU。从S903可知,编码端设备对一个CU编码可得到该CU对应的CU码流。因此,编码端设备可得到至少一个CU码流。这样,编码端设备根据至少一个CU码流、第一级编码树对应的节点划分方式信息以及第二级编码树对应的节点划分方式信息,可得到CTU码流,进而生成包括图像数据的码流。Each leaf node of the second-level coding tree corresponds to one CU, and after obtaining all the leaf nodes of the second-level coding tree, the coding end device can acquire the CU corresponding to each leaf node of the second-level coding tree. It can be seen from S903 that the encoding end device encodes one CU to obtain the CU code stream corresponding to the CU. Therefore, the encoding end device can obtain at least one CU code stream. In this way, the encoding end device can obtain the CTU code stream according to the at least one CU code stream, the node division manner information corresponding to the first level coding tree, and the node division manner information corresponding to the second level coding tree, thereby generating a code stream including the image data. .
本申请实施例中的预设条件限制了第二级编码树中的节点的划分,第二级编码树中的某一节点对应的划分方式为三叉树划分,则该节点的子节点将不再继续划分,这样,大幅度的减少了划分第二级编码树中节点的复杂度,降低了编码复杂度。The preset condition in the embodiment of the present application limits the division of nodes in the second-level coding tree, and the corresponding division manner of a node in the second-level coding tree is a tri-tree division, and the child nodes of the node are no longer Continue to divide, thus greatly reducing the complexity of dividing the nodes in the second-level coding tree and reducing the coding complexity.
本申请实施例提供一种解码端设备,该解码端设备用于执行以上图像数据的解码 方法中的解码端设备所执行的步骤。本申请实施例提供的解码端设备可以包括相应步骤所对应的模块。The embodiment of the present application provides a decoding end device, which is used to perform the steps performed by the decoding end device in the decoding method of the above image data. The decoding device provided by the embodiment of the present application may include a module corresponding to the corresponding step.
本申请实施例可以根据上述方法示例对解码端设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may perform the division of the function module on the decoding end device according to the foregoing method example. For example, each function module may be divided according to each function, or two or more functions may be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and may be further divided in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图10示出上述实施例中所涉及的终端设备的一种可能的结构示意图。如图10所示,解码端设备包括获取模块1000、解析模块1001和解码重构模块1010。获取模块1000用于支持该解码端设备执行上述实施例中的S600、S700、和/或S800等,和/或用于本文所描述的技术的其它过程;解析模块1001用于支持该解码端设备执行上述实施例中的S601、S602、S603、S701、S702、S703、S704、S801、S802、S803、和/或S804等,和/或用于本文所描述的技术的其它过程;解码重构模块1010用于支持该解码端设备执行上述实施例中的S604、S705、和/或S805等,和/或用于本文所描述的技术的其它过程。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的解码端设备包括但不限于上述模块,例如解码端设备还可以包括存储模块1011。存储模块1011可以用于存储该解码端设备的程序代码和数据。FIG. 10 shows a possible structural diagram of the terminal device involved in the foregoing embodiment in the case where the respective functional modules are divided by corresponding functions. As shown in FIG. 10, the decoding end device includes an obtaining module 1000, a parsing module 1001, and a decoding and resolving module 1010. The obtaining module 1000 is configured to support the decoding end device to perform S600, S700, and/or S800, etc. in the foregoing embodiments, and/or other processes for the techniques described herein; the parsing module 1001 is configured to support the decoding end device Performing S601, S602, S603, S701, S702, S703, S704, S801, S802, S803, and/or S804, etc. in the above embodiments, and/or other processes for the techniques described herein; decoding reconstruction module 1010 is for supporting the decoding device to perform S604, S705, and/or S805, etc. in the above embodiments, and/or other processes for the techniques described herein. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again. The decoding device provided by the embodiment of the present application includes, but is not limited to, the foregoing module. For example, the decoding device may further include a storage module 1011. The storage module 1011 can be used to store program code and data of the decoding end device.
在采用集成的单元的情况下,本申请实施例中的解析模块1001和解码重构模块1011可以是图5中的处理器57,获取模块1000可以是图5中的RF电路50和与该RF电路50连接的天线,存储模块1011可以是图5中的存储器51。In the case of an integrated unit, the parsing module 1001 and the decoding and resolving module 1011 in the embodiment of the present application may be the processor 57 in FIG. 5, and the obtaining module 1000 may be the RF circuit 50 in FIG. 5 and the RF The antenna 50 is connected to the circuit 50, and the memory module 1011 may be the memory 51 in FIG.
当解码端设备运行时,该解码端设备执行如图6-图8中任一附图所示的实施例的图像数据的解码方法。具体的图像数据的解码方法可参见上述如图6-图8中任一附图所示的实施例中的相关描述,此处不再赘述。When the decoding device operates, the decoding device performs a decoding method of the image data of the embodiment shown in any of Figs. 6-8. For the decoding method of the specific image data, refer to the related description in the embodiment shown in any of the above-mentioned figures in FIG. 6 to FIG. 8 , and details are not described herein again.
本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括一个或多个程序代码,该一个或多个程序包括指令,当解码端设备中的处理器在执行该程序代码时,该解码端设备执行如图6-图8中任一附图所示的图像数据的解码方法。Another embodiment of the present application further provides a computer readable storage medium including one or more program codes, the one or more programs including instructions, when a processor in a decoding end device is executing the In the program code, the decoding device performs a decoding method of the image data as shown in any of Figs. 6-8.
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;解码端设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得解码端设备实施执行图6-图8中任一附图所示的图像数据的解码方法中的解码端设备的步骤。In another embodiment of the present application, there is also provided a computer program product comprising computer executed instructions stored in a computer readable storage medium; at least one processor of the decoding end device is The computer readable storage medium reads the computer execution instructions, and the at least one processor executes the computer execution instructions such that the decoding end device implements the decoding end device in the decoding method for performing the image data shown in any of FIGS. 6-8 A step of.
本申请实施例提供一种编码端设备,该编码端设备用于执行以上图像数据的解码方法中的编码端设备所执行的步骤。本申请实施例提供的编码端设备可以包括相应步骤所对应的模块。The embodiment of the present application provides an encoding end device, which is used to perform the steps performed by the encoding end device in the decoding method of the above image data. The encoding end device provided by the embodiment of the present application may include a module corresponding to the corresponding step.
本申请实施例可以根据上述方法示例对编码端设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的 形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may perform the division of the function module on the encoding end device according to the foregoing method example. For example, each function module may be divided according to each function, or two or more functions may be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and may be further divided in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图11示出上述实施例中所涉及的终端设备的一种可能的结构示意图。如图11所示,编码端设备包括确定模块1100、划分模块1101、编码模块1110和计算模块1111。确定模块1100用于支持该编码端设备执行上述实施例中的S900、S902、和/或S905等,和/或用于本文所描述的技术的其它过程;划分模块1101用于支持该编码端设备执行上述实施例中的S901、和/或S906等,和/或用于本文所描述的技术的其它过程;编码模块1110用于支持该编码端设备执行上述实施例中的S903,和/或用于本文所描述的技术的其它过程;计算模块1111用于支持该编码端设备执行上述实施例中的S904,和/或用于本文所描述的技术的其它过程。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的编码端设备包括但不限于上述模块,例如编码端设备还可以包括存储模块1102、发送模块1103和接收模块1104。存储模块1102可以用于存储该编码端设备的程序代码和数据。发送模块1103和接收模块1104用于与其他设备通信。FIG. 11 is a schematic diagram showing a possible structure of the terminal device involved in the foregoing embodiment, in the case where the respective functional modules are divided by corresponding functions. As shown in FIG. 11, the encoding end device includes a determining module 1100, a dividing module 1101, an encoding module 1110, and a computing module 1111. The determining module 1100 is configured to support the encoding end device to perform S900, S902, and/or S905 and the like in the above embodiments, and/or other processes for the techniques described herein; the dividing module 1101 is configured to support the encoding end device Performing S901, and/or S906, etc. in the above embodiments, and/or other processes for the techniques described herein; the encoding module 1110 is configured to support the encoding end device to perform S903 in the above embodiment, and/or Other processes of the techniques described herein; computing module 1111 is for supporting the encoding end device to perform S904 in the above-described embodiments, and/or other processes for the techniques described herein. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again. Certainly, the encoding end device provided by the embodiment of the present application includes but is not limited to the foregoing module. For example, the encoding end device may further include a storage module 1102, a sending module 1103, and a receiving module 1104. The storage module 1102 can be used to store program code and data of the encoding end device. The transmitting module 1103 and the receiving module 1104 are configured to communicate with other devices.
在采用集成的单元的情况下,本申请实施例中的确定模块1100、划分模块1101、编码模块1110和计算模块1111可以是图5中的处理器57,发送模块1103和接收模块1104可以是图5中的RF电路50和与该RF电路50连接的天线,存储模块1102可以是图5中的存储器51。The determining module 1100, the dividing module 1101, the encoding module 1110, and the computing module 1111 in the embodiment of the present application may be the processor 57 in FIG. 5, and the sending module 1103 and the receiving module 1104 may be in the form of an integrated unit. The RF circuit 50 in 5 and the antenna connected to the RF circuit 50, the memory module 1102 may be the memory 51 in FIG.
当编码端设备运行时,该编码端设备执行如图9所示的实施例的图像数据的解码方法。具体的图像数据的解码方法可参见上述如图9所示的实施例中的相关描述,此处不再赘述。When the encoding device operates, the encoding device performs a decoding method of the image data of the embodiment shown in FIG. For the decoding method of the specific image data, refer to the related description in the embodiment shown in FIG. 9 above, and details are not described herein again.
本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括一个或多个程序代码,该一个或多个程序包括指令,当编码端设备中的处理器在执行该程序代码时,该编码端设备执行如图9所示的图像数据的解码方法。Another embodiment of the present application further provides a computer readable storage medium comprising one or more program codes, the one or more programs including instructions, when a processor in an encoding end device is executing the At the time of the program code, the encoding side device executes the decoding method of the image data as shown in FIG.
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;编码端设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得编码端设备实施执行图9所示的图像数据的解码方法中的编码端设备的步骤。In another embodiment of the present application, there is also provided a computer program product comprising computer executed instructions stored in a computer readable storage medium; at least one processor of the encoding end device is The computer readable storage medium reads the computer execution instructions, and the at least one processor executes the computer execution instructions such that the encoding end device implements the step of the encoding end device in the decoding method of the image data shown in FIG.
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机 可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it may occur in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is illustrated. In practical applications, the above functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. The combination may be integrated into another device, or some features may be ignored or not performed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to multiple different places. . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be embodied in the form of a software product in the form of a software product in essence or in the form of a contribution to the prior art, and the software product is stored in a storage medium. A number of instructions are included to cause a device (which may be a microcontroller, chip, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. . Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (26)

  1. 一种图像数据的解码方法,其特征在于,所述解码方法包括:A method for decoding image data, characterized in that the decoding method comprises:
    得到包含所述图像数据的码流;Obtaining a code stream containing the image data;
    解析所述码流,得到第一级编码树的节点划分方式信息,其中,所述第一级编码树的根节点对应一个编码树单元CTU,所述第一级编码树的叶节点是通过所述第一级编码树的节点划分方式信息对应的节点划分方式和所述第一级编码树的根节点进行指示的;Parsing the code stream to obtain node partitioning mode information of the first-level coding tree, where a root node of the first-level coding tree corresponds to a coding tree unit CTU, and a leaf node of the first-level coding tree is a Determining a node partitioning manner corresponding to node partitioning mode information of the first-level coding tree and indicating a root node of the first-level coding tree;
    解析所述码流,得到第二级编码树的节点划分方式信息,其中,所述第二级编码树的根节点为所述第一级编码树的一个叶节点;Parsing the code stream to obtain node partitioning mode information of the second-level coding tree, where a root node of the second-level coding tree is a leaf node of the first-level coding tree;
    如果所述第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,解析所述码流,得到所述第一节点的三个子节点的编码信息,其中,所述第一节点的一个所述子节点对应一个编码单元CU;If the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition, parsing the code stream to obtain three child nodes of the first node. Encoding information, wherein one of the child nodes of the first node corresponds to one coding unit CU;
    根据所述第一节点的三个子节点的编码信息,对所述编码单元进行解码重建,得到对应所述图像数据的图像。Decoding and reconstructing the coding unit according to coding information of three child nodes of the first node to obtain an image corresponding to the image data.
  2. 根据权利要求1所述的解码方法,其特征在于,所述第一级编码树对应的节点划分方式与所述第二级编码树对应的节点划分方式不相同。The decoding method according to claim 1, wherein the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  3. 根据权利要求1或2所述的解码方法,其特征在于,所述第一级编码树对应的节点划分方式包括四叉树划分,所述第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。The decoding method according to claim 1 or 2, wherein the node division manner corresponding to the first-level coding tree comprises a quad-tree division, and the node division manner corresponding to the second-level coding tree includes a binary tree division and Trigeminal tree division.
  4. 一种图像数据的解码方法,其特征在于,所述解码方法包括:A method for decoding image data, characterized in that the decoding method comprises:
    得到包含所述图像数据的码流;Obtaining a code stream containing the image data;
    解析所述码流,得到第一级编码树的节点划分方式信息,其中,所述第一级编码树的根节点对应一个编码树单元CTU,所述第一级编码树的叶节点是通过所述第一级编码树的节点划分方式信息对应的节点划分方式和所述第一级编码树的根节点进行指示的;Parsing the code stream to obtain node partitioning mode information of the first-level coding tree, where a root node of the first-level coding tree corresponds to a coding tree unit CTU, and a leaf node of the first-level coding tree is a Determining a node partitioning manner corresponding to node partitioning mode information of the first-level coding tree and indicating a root node of the first-level coding tree;
    解析所述码流,得到第二级编码树的节点划分方式信息,其中,所述第二级编码树的根节点为所述第一级编码树的一个叶节点;Parsing the code stream to obtain node partitioning mode information of the second-level coding tree, where a root node of the second-level coding tree is a leaf node of the first-level coding tree;
    如果所述第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为不继续按照第二级编码树的划分方式进行划分,解析所述码流,得到第三级编码树的节点划分方式信息,其中,所述第三级编码树的根节点为所述第一节点;If the node division mode information of the second-level coding tree indicates that the division manner corresponding to the first node in the second-level coding tree is not continued to be divided according to the division manner of the second-level coding tree, parsing the code stream, and obtaining The node division mode information of the third level coding tree, wherein the root node of the third level coding tree is the first node;
    如果所述第三级编码树的节点划分方式信息指示第一节点对应的划分方式为三叉树划分,解析所述码流,得到所述第一节点的三个子节点的编码信息,其中,所述第一节点的一个所述子节点对应一个编码单元CU;If the node division mode information of the third-level coding tree indicates that the division manner corresponding to the first node is a tri-tree partition, parsing the code stream to obtain coding information of three child nodes of the first node, where One of the child nodes of the first node corresponds to one coding unit CU;
    根据所述第一节点的三个子节点的解码信息,对所述编码单元进行解码重建,得到对应所述图像数据的图像。Decoding and reconstructing the coding unit according to decoding information of three child nodes of the first node to obtain an image corresponding to the image data.
  5. 根据权利要求4所述的解码方法,其特征在于,所述第一级编码树对应的节点划分方式包括四叉树划分,所述第二级编码树对应的节点划分方式包括二叉树划分,所述第三级编码对应的节点划分方式包括三叉树划分。The decoding method according to claim 4, wherein the node partitioning manner corresponding to the first-level coding tree comprises a quadtree partitioning, and the node partitioning manner corresponding to the second-level coding tree comprises a binary tree partitioning, The node division manner corresponding to the third-level coding includes tri-tree division.
  6. 一种图像数据的解码方法,其特征在于,所述解码方法包括:A method for decoding image data, characterized in that the decoding method comprises:
    得到包含所述图像数据的码流;Obtaining a code stream containing the image data;
    解析所述码流,得到三叉树叶节点模式标识,所述三叉树叶节点模式标识用于指示是否限制三叉树划分得到的节点继续进行划分;Parsing the code stream to obtain a tri-tree leaf node pattern identifier, where the tri-tree leaf node pattern identifier is used to indicate whether to limit the node obtained by the tri-tree partition to continue to divide;
    解析所述码流,得到第一级编码树的节点划分方式信息,其中,所述第一级编码树的根节点对应一个编码树单元CTU,所述第一级编码树的叶节点是通过所述第一级编码树的节点划分方式信息对应的节点划分方式和所述第一级编码树的根节点进行指示的;Parsing the code stream to obtain node partitioning mode information of the first-level coding tree, where a root node of the first-level coding tree corresponds to a coding tree unit CTU, and a leaf node of the first-level coding tree is a Determining a node partitioning manner corresponding to node partitioning mode information of the first-level coding tree and indicating a root node of the first-level coding tree;
    解析所述码流,得到第二级编码树的节点划分方式信息,其中,所述第二级编码树的根节点为所述第一级编码树的一个叶节点;Parsing the code stream to obtain node partitioning mode information of the second-level coding tree, where a root node of the second-level coding tree is a leaf node of the first-level coding tree;
    如果所述第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,且所述三叉树叶节点模式标识指示限制三叉树划分得到的节点继续进行划分,解析所述码流,得到所述第一节点的三个子节点的编码信息,其中,所述第一节点的一个所述子节点对应一个编码单元CU;If the node division mode information of the second-level coding tree indicates that the first node in the second-level coding tree corresponds to a tri-tree partition, and the tri-tree leaf mode identifier indicates that the node obtained by limiting the tri-tree partition continues Performing division, parsing the code stream, and obtaining coding information of three child nodes of the first node, where one of the child nodes of the first node corresponds to one coding unit CU;
    根据所述第一节点的三个子节点的编码信息,对所述编码单元进行解码重建,得到对应所述图像数据的图像。Decoding and reconstructing the coding unit according to coding information of three child nodes of the first node to obtain an image corresponding to the image data.
  7. 根据权利要求6所述的解码方法,其特征在于,所述第一级编码树对应的节点划分方式与所述第二级编码树对应的节点划分方式不相同。The decoding method according to claim 6, wherein the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  8. 一种图像数据的编码方法,其特征在于,所述编码方法包括:A method for encoding image data, characterized in that the encoding method comprises:
    确定与待编码图像块对应的编码树单元CTU;Determining a coding tree unit CTU corresponding to the image block to be encoded;
    将所述CTU按照第一级编码树对应的节点划分方式进行划分,得到所述第一级编码树的叶节点,所述第一级编码树的根节点对应所述CTU;And dividing the CTU according to a node division manner corresponding to the first-level coding tree, to obtain a leaf node of the first-level coding tree, where a root node of the first-level coding tree corresponds to the CTU;
    根据预设条件,确定第二级编码树中的第一节点能够使用的划分方式,所述预设条件包括:若所述第一节点的父节点对应的划分方式为三叉树划分,确定不划分所述第一节点,所述第二级编码树的根节点为所述第一级编码树的一个叶节点;And determining, according to the preset condition, a division manner that can be used by the first node in the second-level coding tree, where the preset condition includes: if the division manner corresponding to the parent node of the first node is a tri-tree division, determining not to divide The first node, the root node of the second level coding tree is a leaf node of the first level coding tree;
    如果所述第一节点能够使用的划分方式为不划分,对与所述第一节点对应的编码单元CU进行编码,得到对应所述编码单元的编码单元码流。If the division manner that can be used by the first node is not divided, the coding unit CU corresponding to the first node is encoded to obtain a coding unit code stream corresponding to the coding unit.
  9. 根据权利要求8所述的编码方法,其特征在于,所述第一级编码树对应的节点划分方式与所述第二级编码树对应的节点划分方式不相同。The coding method according to claim 8, wherein the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  10. 根据权利要求8或9所述的编码方法,其特征在于,所述编码方法还包括:The encoding method according to claim 8 or 9, wherein the encoding method further comprises:
    如果所述第一节点能够使用的划分方式未包括不划分,计算所述第一节点能够使用的划分方式中的每种划分方式的率失真代价;Calculating a rate-distortion cost for each of the partitioning modes that the first node can use if the partitioning manner that the first node can use does not include no partitioning;
    将最小的率失真代价对应的划分方式确定为所述第一节点对应的目标划分方式;Determining, by using a minimum rate distortion cost, a division manner corresponding to the target division manner corresponding to the first node;
    使用所述第一节点对应的目标划分方式划分所述第一节点。And dividing the first node by using a target division manner corresponding to the first node.
  11. 根据权利要求8-10中任意一项所述的编码方法,其特征在于,所述第一级编码树对应的节点划分方式包括四叉树划分,所述第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。The coding method according to any one of claims 8 to 10, wherein the node division manner corresponding to the first-level coding tree comprises a quad-tree division, and the node division manner corresponding to the second-level coding tree Includes binary tree partitioning and trigeminal tree partitioning.
  12. 一种解码端设备,其特征在于,包括:A decoding end device, comprising:
    获取模块,用于得到包含所述图像数据的码流;An obtaining module, configured to obtain a code stream that includes the image data;
    解析模块,用于解析所述获取模块获取到的所述码流,得到第一级编码树的节点 划分方式信息,其中,所述第一级编码树的根节点对应一个编码树单元CTU,所述第一级编码树的叶节点是通过所述第一级编码树的节点划分方式信息对应的节点划分方式和所述第一级编码树的根节点进行指示的,以及用于解析所述码流,得到第二级编码树的节点划分方式信息,其中,所述第二级编码树的根节点为所述第一级编码树的一个叶节点,以及用于如果所述第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,解析所述码流,得到所述第一节点的三个子节点的编码信息,其中,所述第一节点的一个所述子节点对应一个编码单元CU;a parsing module, configured to parse the code stream obtained by the acquiring module, to obtain node partitioning mode information of the first-level coding tree, where a root node of the first-level coding tree corresponds to a coding tree unit CTU The leaf node of the first-level coding tree is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree, and is used for parsing the code Streaming, obtaining node partitioning mode information of the second level coding tree, wherein a root node of the second level coding tree is a leaf node of the first level coding tree, and for if the second level coding tree The node division mode information indicates that the division manner corresponding to the first node in the second-level coding tree is a tri-tree partition, and the code stream is parsed to obtain coding information of three child nodes of the first node, where the One of the child nodes of a node corresponds to one coding unit CU;
    解码重建模块,用于根据所述解析模块得到的所述第一节点的三个子节点的编码信息,对所述编码单元进行解码重建,得到对应所述图像数据的图像。And a decoding and reconstruction module, configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
  13. 根据权利要求12所述的解码端设备,其特征在于,所述第一级编码树对应的节点划分方式与所述第二级编码树对应的节点划分方式不相同。The decoding device according to claim 12, wherein the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  14. 根据权利要求12或13所述的解码端设备,其特征在于,所述第一级编码树对应的节点划分方式包括四叉树划分,所述第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。The decoding device according to claim 12 or 13, wherein the node division manner corresponding to the first level coding tree comprises a quadtree partition, and the node division manner corresponding to the second level coding tree comprises a binary tree division. And trigeminal division.
  15. 一种解码端设备,其特征在于,包括:A decoding end device, comprising:
    获取模块,用于得到包含所述图像数据的码流;An obtaining module, configured to obtain a code stream that includes the image data;
    解析模块,用于解析所述获取模块获取到的所述码流,得到第一级编码树的节点划分方式信息,其中,所述第一级编码树的根节点对应一个编码树单元CTU,所述第一级编码树的叶节点是通过所述第一级编码树的节点划分方式信息对应的节点划分方式和所述第一级编码树的根节点进行指示的,以及用于解析所述码流,得到第二级编码树的节点划分方式信息,其中,所述第二级编码树的根节点为所述第一级编码树的一个叶节点,以及用于如果所述第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为不继续按照第二级编码树的划分方式进行划分,解析所述码流,得到第三级编码树的节点划分方式信息,其中,所述第三级编码树的根节点为所述第一节点,以及用于如果所述第三级编码树的节点划分方式信息指示第一节点对应的划分方式为三叉树划分,解析所述码流,得到所述第一节点的三个子节点的编码信息,其中,所述第一节点的一个所述子节点对应一个编码单元CU;a parsing module, configured to parse the code stream obtained by the acquiring module, to obtain node partitioning mode information of the first-level coding tree, where a root node of the first-level coding tree corresponds to a coding tree unit CTU The leaf node of the first-level coding tree is indicated by the node division manner corresponding to the node division mode information of the first-level coding tree and the root node of the first-level coding tree, and is used for parsing the code Streaming, obtaining node partitioning mode information of the second level coding tree, wherein a root node of the second level coding tree is a leaf node of the first level coding tree, and for if the second level coding tree The node division mode information indicates that the first node in the second-level coding tree has a division manner that does not continue to be divided according to the division manner of the second-level coding tree, and parses the code stream to obtain a node division of the third-level coding tree. Mode information, where the root node of the third-level coding tree is the first node, and if the node division mode information of the third-level coding tree indicates that the first node corresponds to Ternary tree is divided to division manner, parsing the bitstream, the encoded information to obtain three sub-nodes of the first node, wherein a first node of the child nodes corresponding to one coding unit of the CU;
    解码重建模块,用于根据所述解析模块得到的所述第一节点的三个子节点的编码信息,对所述编码单元进行解码重建,得到对应所述图像数据的图像。And a decoding and reconstruction module, configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
  16. 根据权利要求15所述的解码端设备,其特征在于,所述第一级编码树对应的节点划分方式包括四叉树划分,所述第二级编码树对应的节点划分方式包括二叉树划分,所述第三级编码对应的节点划分方式包括三叉树划分。The decoding device according to claim 15, wherein the node division manner corresponding to the first level coding tree comprises a quadtree partition, and the node division manner corresponding to the second level coding tree comprises a binary tree division. The node division manner corresponding to the third-level coding includes tri-tree partitioning.
  17. 一种解码端设备,其特征在于,包括:A decoding end device, comprising:
    获取模块,用于得到包含所述图像数据的码流;An obtaining module, configured to obtain a code stream that includes the image data;
    解析模块,用于解析所述获取模块获取到的所述码流,得到三叉树叶节点模式标识,所述三叉树叶节点模式标识用于指示是否限制三叉树划分得到的节点继续进行划分,以及用于解析所述码流,得到第一级编码树的节点划分方式信息,其中,所述第一级编码树的根节点对应一个编码树单元CTU,所述第一级编码树的叶节点是通过所述第一级编码树的节点划分方式信息对应的节点划分方式和所述第一级编码树的根节 点进行指示的,以及用于解析所述码流,得到第二级编码树的节点划分方式信息,其中,所述第二级编码树的根节点为所述第一级编码树的一个叶节点,以及用于如果所述第二级编码树的节点划分方式信息指示第二级编码树中的第一节点对应的划分方式为三叉树划分,且所述三叉树叶节点模式标识指示限制三叉树划分得到的节点继续进行划分,解析所述码流,得到所述第一节点的三个子节点的编码信息,其中,所述第一节点的一个所述子节点对应一个编码单元CU;a parsing module, configured to parse the code stream obtained by the acquiring module, to obtain a tri-tree leaf node pattern identifier, where the tri-tree leaf node pattern identifier is used to indicate whether the node obtained by limiting the tri-tree partitioning is further divided, and used for Parsing the code stream to obtain node partitioning mode information of the first-level coding tree, where a root node of the first-level coding tree corresponds to a coding tree unit CTU, and a leaf node of the first-level coding tree is a Deriving a node partitioning manner corresponding to the node partitioning mode information of the first-level coding tree and indicating the root node of the first-level coding tree, and parsing the codestream to obtain a node partitioning manner of the second-level coding tree Information, wherein a root node of the second-level coding tree is a leaf node of the first-level coding tree, and information for node division mode if the second-level coding tree indicates a second-level coding tree The division manner corresponding to the first node is a tri-tree division, and the tri-tree leaf node pattern identifier indicates that the node obtained by limiting the tri-tree division continues to be divided. And parsing the code stream to obtain coding information of three child nodes of the first node, where one of the child nodes of the first node corresponds to one coding unit CU;
    解码重建模块,用于根据所述解析模块得到的所述第一节点的三个子节点的编码信息,对所述编码单元进行解码重建,得到对应所述图像数据的图像。And a decoding and reconstruction module, configured to perform decoding and reconstruction on the coding unit according to the coding information of the three child nodes of the first node obtained by the analysis module, to obtain an image corresponding to the image data.
  18. 根据权利要求17所述的解码端设备,其特征在于,所述第一级编码树对应的节点划分方式与所述第二级编码树对应的节点划分方式不相同。The decoding device according to claim 17, wherein the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  19. 一种编码端设备,其特征在于,包括:An encoding end device, comprising:
    确定模块,用于确定与待编码图像块对应的编码树单元CTU;a determining module, configured to determine a coding tree unit CTU corresponding to the image block to be encoded;
    划分模块,用于将所述确定模块确定的所述CTU按照第一级编码树对应的节点划分方式进行划分,得到所述第一级编码树的叶节点,所述第一级编码树的根节点对应所述CTU;a dividing module, configured to divide the CTU determined by the determining module according to a node division manner corresponding to the first-level coding tree, to obtain a leaf node of the first-level coding tree, and a root of the first-level coding tree The node corresponds to the CTU;
    所述确定模块,还用于根据预设条件,确定第二级编码树中的第一节点能够使用的划分方式,所述预设条件包括:若所述第一节点的父节点对应的划分方式为三叉树划分,确定不划分所述第一节点,所述第二级编码树的根节点为所述第一级编码树的一个叶节点;The determining module is further configured to determine, according to a preset condition, a division manner that can be used by the first node in the second-level coding tree, where the preset condition includes: if the parent node of the first node corresponds to a division manner For dividing into a tri-tree, determining that the first node is not divided, and the root node of the second-level coding tree is a leaf node of the first-level coding tree;
    编码模块,用于如果所述确定模块确定出的所述第一节点能够使用的划分方式为不划分,对与所述第一节点对应的编码单元CU进行编码,得到对应所述编码单元的编码单元码流。And an encoding module, configured to: if the partitioning mode that is determined by the determining, by the determining module, is not divided, the coding unit CU corresponding to the first node is encoded, and the coding corresponding to the coding unit is obtained. Unit code stream.
  20. 根据权利要求19所述的编码端设备,其特征在于,所述第一级编码树对应的节点划分方式与所述第二级编码树对应的节点划分方式不相同。The encoding device according to claim 19, wherein the node division manner corresponding to the first-level coding tree is different from the node division manner corresponding to the second-level coding tree.
  21. 根据权利要求19或20所述的编码端设备,其特征在于,所述编码端设备还包括计算模块:The encoding device according to claim 19 or 20, wherein the encoding device further comprises a computing module:
    所述计算模块,用于如果所述确定模块确定所述第一节点能够使用的划分方式未包括不划分,计算所述第一节点能够使用的划分方式中的每种划分方式的率失真代价;The calculating module is configured to calculate a rate distortion cost of each of the partitioning modes that the first node can use if the determining module determines that the dividing manner that the first node can use does not include no partitioning;
    所述确定模块,还用于将最小的率失真代价对应的划分方式确定为所述第一节点对应的目标划分方式;The determining module is further configured to determine a partitioning manner corresponding to a minimum rate distortion cost as a target partitioning manner corresponding to the first node;
    所述划分模块,具体用于使用所述确定模块确定的所述第一节点对应的目标划分方式划分所述第一节点。The dividing module is specifically configured to divide the first node by using a target dividing manner corresponding to the first node determined by the determining module.
  22. 根据权利要求19-21中任意一项所述的编码端设备,其特征在于,所述第一级编码树对应的节点划分方式包括四叉树划分,所述第二级编码树对应的节点划分方式包括二叉树划分和三叉树划分。The coding end device according to any one of claims 19 to 21, wherein the node division manner corresponding to the first level coding tree comprises a quadtree division, and the node division corresponding to the second level coding tree The modes include binary tree partitioning and tri-tree partitioning.
  23. 一种解码端设备,其特征在于,所述解码端设备包括:一个或多个处理器、存储器、通信接口;A decoding end device, characterized in that: the decoding end device comprises: one or more processors, a memory, a communication interface;
    所述存储器、所述通信接口与所述一个或多个处理器耦合;所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述一个或多个处理器执行所述 指令时,所述解码端设备执行如权利要求1-7中任意一项所述的图像数据的解码方法。The memory, the communication interface is coupled to the one or more processors; the memory is for storing computer program code, the computer program code comprising instructions when the one or more processors execute the instructions The decoding end device performs the decoding method of the image data according to any one of claims 1-7.
  24. 一种编码端设备,其特征在于,所述编码端设备包括:一个或多个处理器、存储器、通信接口;An encoding end device, wherein the encoding end device comprises: one or more processors, a memory, and a communication interface;
    所述存储器、所述通信接口与所述一个或多个处理器耦合;所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述一个或多个处理器执行所述指令时,所述编码端设备执行如权利要求8-11中任意一项所述的图像数据的编码方法。The memory, the communication interface is coupled to the one or more processors; the memory is for storing computer program code, the computer program code comprising instructions when the one or more processors execute the instructions The encoding end device performs the encoding method of the image data according to any one of claims 8-11.
  25. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在解码端设备上运行时,使得所述解码端设备执行如权利要求1-7中任意一项所述的图像数据的解码方法。A computer readable storage medium having stored therein instructions, wherein when the instructions are run on a decoding end device, causing the decoding end device to perform as in claims 1-7 A method of decoding image data as described in any one of the preceding claims.
  26. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在编码端设备上运行时,使得所述编码端设备执行如权利要求8-11中任意一项所述的图像数据的编码方法。A computer readable storage medium having stored therein instructions, wherein when the instructions are run on an encoding end device, causing the encoding end device to perform as in claims 8-11 A method of encoding image data as described in any one of the preceding claims.
PCT/CN2018/078837 2017-06-28 2018-03-13 Method and device for encoding and decoding image data WO2019001015A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710509100.0A CN109151477B (en) 2017-06-28 2017-06-28 Image data encoding and decoding methods and devices
CN201710509100.0 2017-06-28

Publications (1)

Publication Number Publication Date
WO2019001015A1 true WO2019001015A1 (en) 2019-01-03

Family

ID=64740993

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/078837 WO2019001015A1 (en) 2017-06-28 2018-03-13 Method and device for encoding and decoding image data

Country Status (3)

Country Link
CN (1) CN109151477B (en)
TW (1) TWI667914B (en)
WO (1) WO2019001015A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021018082A1 (en) * 2019-07-26 2021-02-04 Beijing Bytedance Network Technology Co., Ltd. Determination of picture partition mode based on block size
EP3958567A4 (en) * 2019-04-23 2022-05-04 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image decoding method, decoder and storage medium
RU2815443C2 (en) * 2019-07-26 2024-03-15 Бейджин Байтдэнс Нетворк Текнолоджи Ко., Лтд. Determination of image division mode based on block size

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4387224A1 (en) 2018-08-28 2024-06-19 Huawei Technologies Co., Ltd. Picture partitioning method and apparatus
CA3125904A1 (en) 2019-01-08 2020-07-16 Huawei Technologies Co., Ltd. Image prediction method, apparatus, system, device, and storage medium for processing performance and speed
WO2020156573A1 (en) * 2019-02-03 2020-08-06 Beijing Bytedance Network Technology Co., Ltd. Condition-dependent unsymmetrical quad-tree partitioning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016090568A1 (en) * 2014-12-10 2016-06-16 Mediatek Singapore Pte. Ltd. Binary tree block partitioning structure
CN105828073A (en) * 2009-07-02 2016-08-03 汤姆逊许可证公司 Methods and apparatus for video encoding and decoding binary sets using adaptive tree selection

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7660475B2 (en) * 2004-12-22 2010-02-09 Ntt Docomo, Inc. Method and apparatus for coding positions of coefficients
US9049452B2 (en) * 2011-01-25 2015-06-02 Mediatek Singapore Pte. Ltd. Method and apparatus for compressing coding unit in high efficiency video coding
US9185405B2 (en) * 2012-03-23 2015-11-10 Qualcomm Incorporated Coded block flag inference in video coding
CN103414891B (en) * 2013-07-19 2016-08-10 北京交通大学 A kind of bottom-up fast quad-tree trimming algorithm of HEVC intraframe coding
CN104702958B (en) * 2013-12-05 2017-09-15 中国科学院深圳先进技术研究院 A kind of HEVC inner frame coding methods and system based on spatial coherence
CN105530518B (en) * 2014-09-30 2019-04-26 联想(北京)有限公司 A kind of Video coding, coding/decoding method and device
CN104811696B (en) * 2015-04-17 2018-01-02 北京奇艺世纪科技有限公司 A kind of coding method of video data and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105828073A (en) * 2009-07-02 2016-08-03 汤姆逊许可证公司 Methods and apparatus for video encoding and decoding binary sets using adaptive tree selection
WO2016090568A1 (en) * 2014-12-10 2016-06-16 Mediatek Singapore Pte. Ltd. Binary tree block partitioning structure

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"EE 2.1: Quadtree plus binary tree structure integration with JEM tools", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 3RD MEETING: JVET-C0024, 1 June 2016 (2016-06-01), pages 1 - 5 *
"Multi-Type-Tree", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 4TH MEETING: JVET-D0117RL, 21 October 2016 (2016-10-21), pages 1 - 3 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3958567A4 (en) * 2019-04-23 2022-05-04 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image decoding method, decoder and storage medium
WO2021018082A1 (en) * 2019-07-26 2021-02-04 Beijing Bytedance Network Technology Co., Ltd. Determination of picture partition mode based on block size
US11539949B2 (en) 2019-07-26 2022-12-27 Beijing Bytedance Network Technology Co., Ltd. Determination of picture partition mode based on block size
US11659179B2 (en) 2019-07-26 2023-05-23 Beijing Bytedance Network Technology Co., Ltd. Determination of picture partition mode based on block size
US11930175B2 (en) 2019-07-26 2024-03-12 Beijing Bytedance Network Technology Co., Ltd Block size dependent use of video coding mode
RU2815443C2 (en) * 2019-07-26 2024-03-15 Бейджин Байтдэнс Нетворк Текнолоджи Ко., Лтд. Determination of image division mode based on block size

Also Published As

Publication number Publication date
TW201906415A (en) 2019-02-01
CN109151477B (en) 2020-08-07
CN109151477A (en) 2019-01-04
TWI667914B (en) 2019-08-01

Similar Documents

Publication Publication Date Title
TWI674790B (en) Method of picture data encoding and decoding and apparatus
TWI667914B (en) Picture data encoding and decoding method and apparatus
CN112188209B (en) Video stream decoding method, device, computer equipment and storage medium
US20230353747A1 (en) Storage of evc decoder configuration information
RU2773641C2 (en) Image data encoding method and device, image data decoding method and device
US20240095966A1 (en) Coding of displacements by use of contexts for vertex mesh (v-mesh)
US20240137558A1 (en) Vertex motion vector predictor coding for vertex mesh (v-mesh)
US20240171786A1 (en) Coding of displacements using skew flag for vertex mesh (v-mesh)
WO2024061138A1 (en) Data coding and data decoding method and apparatus, and device
WO2023024842A1 (en) Point cloud encoding/decoding method, apparatus and device, and storage medium
US20240015301A1 (en) Evc decoding complexity metrics
US20240185469A1 (en) Coding of displacements using hierarchical coding at subdivision level for vertex mesh (v-mesh)
CN115118979A (en) Image encoding method, image decoding method, device, equipment and storage medium
BR122024002650A2 (en) METHOD AND APPARATUS FOR CODING IMAGE DATA AND METHOD AND APPARATUS FOR DECODING IMAGE DATA

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18824228

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18824228

Country of ref document: EP

Kind code of ref document: A1