WO2019219066A1 - Coding and decoding methods and devices - Google Patents

Coding and decoding methods and devices Download PDF

Info

Publication number
WO2019219066A1
WO2019219066A1 PCT/CN2019/087316 CN2019087316W WO2019219066A1 WO 2019219066 A1 WO2019219066 A1 WO 2019219066A1 CN 2019087316 W CN2019087316 W CN 2019087316W WO 2019219066 A1 WO2019219066 A1 WO 2019219066A1
Authority
WO
WIPO (PCT)
Prior art keywords
image block
sub
mode
derivative
derived
Prior art date
Application number
PCT/CN2019/087316
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
Priority claimed from CN201810581662.0A external-priority patent/CN110505482B/en
Application filed by 华为技术有限公司, 清华大学 filed Critical 华为技术有限公司
Priority to EP19804393.7A priority Critical patent/EP3780612A4/en
Publication of WO2019219066A1 publication Critical patent/WO2019219066A1/en
Priority to US17/099,470 priority patent/US11936861B2/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/172Methods 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 picture, frame or field
    • 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

Definitions

  • the embodiments of the present invention relate to the field of video encoding and decoding and compression, and in particular, to a codec method and apparatus.
  • the basic processing unit of video codec is an image block, which is obtained by dividing a frame/image by the encoding end.
  • the fineness and diversity of image block division affect the texture and contour features of the image to some extent.
  • the image block division method includes a QuadTree plus Binary Tree (QTBT) division method, a Triple Tree (TT) division method, and an Asymmetric Binary Tree (ABT) division manner.
  • the QTBT division method is: dividing a coding tree unit (CTU) into four sub-image blocks according to a Quad-Tree (QT) division manner, and for a sub-image block that needs further division, The sub-image block is divided according to a QT/Binary Tree (BT) division manner.
  • BT Binary Tree
  • the TT division method is: dividing a certain image block horizontally into three sub-image blocks of central symmetry or non-central symmetry, or vertically dividing an image block into three sub-image blocks of central symmetry or non-central symmetry.
  • the ABT is divided into two sub-image blocks that are horizontally divided into central symmetric or non-central symmetric, or vertically divided into two sub-image blocks that are centrally symmetric or non-centralally symmetric.
  • Both the TT partitioning method and the ABT partitioning method can be combined with the QTBT partitioning method, but the image blocks obtained by the combined partitioning method cannot satisfy the more complicated texture requirements.
  • the embodiment of the present invention provides a codec method and apparatus, which can solve the problem that the existing division mode cannot meet more complicated texture requirements.
  • a decoding method After obtaining a code stream, the decoding device parses the code stream to determine a basic division mode of the current image block to be decoded and a target derivative mode of the sub image block in the current image block to be decoded; And the decoding device divides the current image block to be decoded into N (N is an integer greater than or equal to 2) sub-image blocks according to the basic division manner, and at least according to the derivative manner indicated by the target derivative mode, at least N of the N sub-image blocks Two adjacent sub-image blocks are derived as a first derived image block; finally, the decoding device decodes the first derived image block.
  • N is an integer greater than or equal to 2
  • the target derivation mode is one of the candidate derivation mode sets
  • the candidate derivation mode set includes M preset derivation modes
  • the preset derivation mode is used to indicate a derivation mode
  • the derivation mode is used to determine any of the current image blocks to be decoded.
  • Two adjacent sub-image blocks are derived as one derived image block, and M is an integer greater than or equal to zero.
  • the decoding apparatus determines the specific division manner of the image block to be decoded according to the basic division manner and the target derivative mode.
  • the combination of the division mode and the derivative mode identifies a plurality of different division results, and the image block division manner is more enriched than the prior art, and can be adapted to various texture characteristics.
  • the video image improves the image quality of the compressed video image, more effectively reduces the code stream load bit overhead of the image block division, and further improves the compression efficiency; can regularly divide the division manner of different image blocks, and reduce the code of the division manner of different image blocks.
  • Stream grammar complexity is the decoding method provided by the present application.
  • a decoding method After obtaining a code stream, a decoding device parses the code stream to determine a basic division manner of an image block to be decoded and a feature parameter (at least a height and a width of a current image block to be decoded).
  • the decoding device in a case that the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, the decoding device re-analyzes the code stream to determine a target derivative mode of the sub-image block in the current image block to be decoded;
  • the device divides the current image block to be decoded into N (N is an integer greater than or equal to 2) sub-image blocks according to the basic division manner, and at least two of the N sub-image blocks according to the derivative manner indicated by the target derivative mode.
  • the adjacent sub-image block is derived as a first derived image block; finally, the decoding device decodes the first derived image block.
  • the target derivation mode is one of the candidate derivation mode sets
  • the candidate derivation mode set includes M preset derivation modes
  • the preset derivation mode is used to indicate a derivation mode
  • the derivation mode is used to determine any of the current image blocks to be decoded.
  • Two adjacent sub-image blocks are derived as one derived image block, and M is an integer greater than or equal to zero.
  • the decoding device determines the target derivative mode of the sub-image block in the current image block to be decoded only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold. Compared to the first aspect described above, the decoding apparatus of the second aspect has higher decoding efficiency.
  • the method that “the decoding device parses the code stream and determines the basic division manner of the current image block to be decoded” is: the decoding device from the code stream Obtaining a division identifier of the current image block to be decoded, and determining a basic division manner according to the division identifier of the current image block to be decoded.
  • the method for determining, by the decoding device, the target derivative mode of the current image block to be decoded is: the decoding device acquires the derived identifier of the current image block to be decoded from the code stream, and determines according to the derivative identifier of the current image block to be decoded. Target derivative model.
  • a decoding apparatus comprising a parsing unit, a dividing unit, a deriving unit, and a decoding unit.
  • the parsing unit is configured to parse the code stream, determine a basic division manner of the current image block to be decoded, and a target derivation mode of the sub image block in the current image block to be decoded, and the target derivation mode is one of the candidate derivation mode sets.
  • the candidate derivative mode set includes M preset derivative modes, and the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derivate any two adjacent sub-image blocks in the current image block to be decoded into a derivative image block, M Is an integer greater than or equal to 0.
  • the dividing unit is configured to divide the current image block to be decoded into N sub-image blocks according to the basic division manner determined by the parsing unit, where N is an integer greater than or equal to 2.
  • the above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks obtained by the dividing unit into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the parsing unit.
  • the decoding unit is configured to decode the first derived image block obtained by the derivative unit.
  • a decoding apparatus comprising a parsing unit, a judging unit, a dividing unit, a deriving unit, and a decoding unit.
  • the parsing unit is configured to parse the code stream to determine a basic division manner of the current image block to be decoded and a feature parameter (at least one of width and height) of the current image block to be decoded.
  • the determining unit is configured to determine whether a feature parameter of the current graphics block to be decoded is less than or equal to a first preset threshold.
  • the parsing unit is further configured to parse the code stream to determine a target derivation mode of the sub-image block in the current image block to be decoded, the target derivation mode is one of the candidate derivation mode sets, and the candidate derivation mode set includes M preset derivatives.
  • the mode, the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derivate any two adjacent sub-image blocks in the current image block to be decoded into one derivative image block, where M is an integer greater than or equal to 0.
  • the dividing unit is configured to divide the current image block to be decoded into N sub-image blocks according to the basic division manner determined by the parsing unit, where N is an integer greater than or equal to 2.
  • the above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks obtained by the dividing unit into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the parsing unit.
  • the decoding unit is configured to decode the first derived image block obtained by the derivative unit.
  • the parsing unit is configured to: obtain, from the code stream, a partition identifier of the current image block to be decoded; and according to the current image block to be decoded.
  • the division identifier determines the basic division manner; the derived identifier of the current image block to be decoded is obtained from the code stream; and the target derivative mode is determined according to the derived identifier of the current image block to be decoded.
  • a decoding 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 second
  • a video decoder including a non-volatile storage medium storing a executable program, and a non-volatile storage medium, the non-volatile storage The medium is coupled and the executable program is executed to implement the decoding method as described in the first aspect, the second aspect, or any one of the possible implementations described above.
  • a decoder comprising the decoding apparatus and the reconstruction module in the third aspect or the fourth aspect, wherein the reconstruction module is configured to determine a current according to the predicted pixel obtained by the decoding apparatus The reconstructed pixel value of the image block.
  • a computer readable storage medium stores instructions, when the instructions are executed on the decoding device of the third aspect or the fourth aspect, The decoding device performs the decoding method as described in the first aspect, the second aspect, or any of the possible implementations thereof.
  • a ninth aspect a computer program product comprising instructions, when the computer program product is run on the decoding device of the above third aspect or the fourth aspect, causing the decoding device to perform the first aspect, A decoding method as described in two aspects or any of its possible implementations.
  • the name of the above decoding device is not limited to the device or the function 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.
  • a tenth aspect provides an encoding method.
  • an encoding apparatus determines a basic division manner of a current image block to be encoded and a target derivative mode of a sub image block in an image block to be currently encoded, and the target derivative mode is one of the candidate derivative mode sets.
  • the candidate derivative mode set includes M preset derivative modes, and the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derive any two adjacent sub-image blocks in the current image block to be coded into a derivative image block.
  • the encoding apparatus divides the current image block to be encoded into N (N is an integer greater than or equal to 2) sub-image blocks according to the basic division manner, and derives according to the target derivative mode indication. In a manner, at least two adjacent sub-image blocks of the N sub-image blocks are derived as a first derived image block; in a case where the first derivation image block is not divided, the encoding device encodes the derived image block to obtain a code stream.
  • the code stream includes a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, and the current image block to be encoded
  • the division identifier is used to indicate a basic division manner
  • the derived identifier of the current image block to be encoded is used to indicate the target derivative mode.
  • the coding device combines the division mode and the derivative mode to identify a plurality of different division results, enriches the division manner of the image block, can adapt to the video images of various texture characteristics, and can improve the image quality of the compressed video image;
  • the code stream load bit overhead of the image block division is effectively reduced, and the compression efficiency is further improved;
  • the division manner of different image blocks can be regularized, and the code stream syntax complexity of the division manner of different image blocks is reduced.
  • an encoding method determines a basic division manner of an image block to be currently encoded and a feature parameter (at least one of width and height) of an image block to be currently encoded, and is currently in an image to be encoded.
  • the target derivative mode is one of the candidate derivative mode sets, and the candidate derivative mode set includes M preset derivation mode, the preset derivation mode is used to indicate a derivative mode, and the derivation mode is used to derivate any two adjacent sub-image blocks in the current image block to be derived into a derivative image block, where M is greater than or equal to 0.
  • the encoding apparatus divides the current image block to be encoded into N (N is an integer greater than or equal to 2) sub-image blocks according to a basic division manner, and sets N sub-image blocks according to a derivative manner indicated by the target derivative mode.
  • At least two adjacent sub-image blocks in the derivation are derived as a first derivation image block; in the case of not dividing the first derivation image block, The device encodes the derived image block to obtain a code stream, where the code stream includes a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be coded, and the division identifier of the current image block to be coded is used to indicate the basic division mode, and the current The derived identifier of the image block to be encoded is used to indicate the target derived mode.
  • the encoding device determines the target derivative mode of the sub-image block in the current image block to be encoded only if the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold.
  • the coding apparatus of the eleventh aspect has higher coding efficiency.
  • the method for determining, by the encoding device, the basic division manner of the current image block to be encoded is: the encoding device determines the current image to be encoded Corresponding at least two candidate division manners, and calculating a rate distortion cost of each of the at least two candidate division manners, so that the coding apparatus determines the candidate division manner corresponding to the minimum rate distortion cost as the basic division manner .
  • the method for determining, by the encoding device, the target derivative mode of the current image block to be encoded is: the encoding device calculates a rate distortion cost of each of the preset derivative modes in the candidate derivative mode set, and presets a minimum rate distortion cost corresponding to the preset
  • the derivative mode is determined as the target derivative mode, and the candidate derivative mode set includes M preset derivative modes.
  • the basic division mode is horizontal N or vertical N, 0 ⁇ M ⁇ 2 N-1 ; when the basic division mode is horizontal N
  • M is an integer, Is an integer.
  • an encoding apparatus comprising a determining unit, a dividing unit, a deriving unit, a judging unit, and an encoding unit.
  • the determining unit is configured to determine a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded, and the target derivative mode is one of the candidate derivative mode sets, and the candidate derivative mode
  • the set includes M preset derivation modes, and the preset derivation mode is used to indicate a derivation mode, and the derivation mode is used to derivate any two adjacent sub-image blocks in the current image block to be derived into one derivation image block, where M is greater than or equal to An integer of 0.
  • the dividing unit is configured to divide the current image block to be encoded into N sub-image blocks according to the basic division manner determined by the determining unit, and N is an integer greater than or equal to 2.
  • the above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks obtained by the dividing unit into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the determining unit.
  • the determining unit is configured to determine whether to divide the first derivative image block obtained by the derivative unit.
  • the coding unit is configured to: when the determining unit determines that the first derived image block obtained by the deriving unit is not divided, encode the first derived image block to obtain a code stream, where the code stream includes the current image block to be encoded.
  • the partition identifier of the current image block to be encoded is used to indicate the basic partition mode
  • the derived identifier of the current image block to be encoded is used to indicate the target derivative mode
  • an encoding apparatus comprising a determining unit, a dividing unit, a deriving unit, a judging unit, and an encoding unit.
  • the determining unit is configured to determine a basic division manner of the current image block to be encoded and a feature parameter (at least one of a width and a height) of the current image block to be encoded.
  • the dividing unit is configured to divide the current image block to be encoded into N sub-image blocks according to the basic dividing manner determined by the determining unit, and N is an integer greater than or equal to 2.
  • the determining unit is configured to determine whether a feature parameter of the current image block to be encoded is less than or equal to a first preset threshold.
  • the determining unit is further configured to: when the determining unit determines that the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, determine a target derivative mode of the sub image block in the current image block to be encoded; target derivative mode As one of the candidate derivative mode sets, the candidate derivative mode set includes M preset derivative modes, and the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to use any two adjacent sub-images in the current image block to be encoded.
  • the block is derived as a derived image block, and M is an integer greater than or equal to zero.
  • the above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the determining unit.
  • the determining unit is further configured to determine whether to divide the first derivative image block obtained by the derivative unit.
  • the coding unit is configured to: when the determining unit determines that the first derivative image block is not divided, encode the derived image block to obtain a code stream, where the code stream includes the division identifier of the current image block to be encoded and the current image to be encoded.
  • the derived identifier of the block, the partition identifier of the current image block to be encoded is used to indicate the basic partition mode, and the derived identifier of the current image block to be encoded is used to indicate the target derivative mode.
  • the determining unit is specifically configured to: determine at least two candidate division manners corresponding to the current image to be encoded; calculate at least two The rate-distortion cost of each of the candidate partitioning modes; the candidate partitioning mode corresponding to the smallest rate-distortion cost is determined as the basic partitioning mode.
  • the determining unit is specifically configured to: calculate a rate distortion cost of each preset derivative mode in the candidate derived mode set.
  • the basic division mode is horizontal N or vertical N, 0 ⁇ M ⁇ 2 N-1 ; when the basic division is horizontal and vertical N, It is an integer; the preset derivative mode corresponding to the minimum rate distortion cost is determined as the target derivative mode.
  • an encoding 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 encoding device performs the tenth aspect, tenth An encoding method as described on the one hand or any of its possible implementations.
  • a video encoder including a nonvolatile storage medium and a central processing unit, the nonvolatile storage medium storing an executable program, the central processing unit and the nonvolatile The storage medium is coupled and the executable program is executed to implement the encoding method as described in the tenth aspect, the eleventh aspect, or any one of the possible implementations.
  • an encoder comprising the encoding apparatus of the twelfth aspect or the thirteenth aspect.
  • a seventeenth aspect a computer readable storage medium having instructions stored in an operation on the encoding device of the twelfth aspect or the thirteenth aspect, The encoding device is caused to perform the encoding method as described in the tenth aspect, the eleventh aspect, or any one of the possible implementations.
  • An eighteenth aspect a computer program product comprising instructions for causing said encoding device to perform a tenth operation as described above when said computer program product is run on said encoding device of said twelfth or thirteenth aspect
  • the names of the above-mentioned encoding devices are not limited to the devices or the functional modules themselves. 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.
  • the basic division manner is horizontal N, vertical N, or horizontal N.
  • the horizontal N points, the vertical N points, and the horizontal vertical N points may all be used to represent the average division of the current image block to be decoded/the current image block to be encoded, and may also represent the non-average division of the current image block to be decoded/the current image block to be encoded. .
  • the width of each of the plurality of sub image blocks is the current The widths of the image blocks to be decoded are equal, and the height of each sub-image block is equal to 1/N of the height of the current image block to be decoded.
  • the height of each of the plurality of sub-image blocks is equal to the height of the current image block to be decoded, and the width of each sub-image block is equal to the width of the current image block to be decoded. 1/N.
  • the width of each of the plurality of sub image blocks is equal to The width of the current image block to be decoded
  • the height of each sub-image block is equal to the height of the current image block to be decoded. Is an integer.
  • the target derivative mode is one of a candidate derivative mode set
  • the candidate derivative mode set includes M preset derivative modes, where when the base is divided into a horizontal mode or vertical N-N division, 0 ⁇ M ⁇ 2 N-1; when the base is divided into a horizontal mode or vertical N-N division, M is an integer.
  • the maximum value of M is related to the number of dividing lines used to divide the image block.
  • the number of division lines dividing the image block is N-1, and correspondingly, the maximum value of M is 2 N-1 .
  • the maximum value of M is Of course, the set of candidate derivative patterns may also refer to including some of the preset derivative patterns.
  • the candidate derivative mode set includes the first a preset derivative mode, a second preset derivative mode, a third preset derivative mode, and a fourth preset derivative mode; wherein the first preset derivative mode is a first sub-image block, a second sub-image block, and a third The sub-image block is derived as a derivative image block; the second preset derivation mode is that the third sub-image block and the fourth sub-image block are derived as one derived image block; and the third preset derivation mode is the second sub-image block and the third The sub-image block is derived as a derivative image block; the fourth preset derivation mode is that the first sub-image block and the second sub-image block are derived as one derived image block, and the third sub-image block and the fourth sub-image block are derived as another The derived image block; the first sub-image block, the second sub-
  • the first preset derivative mode reference may be made to D in FIG. 12
  • the second preset derivative mode may refer to C in FIG. 12
  • the third preset derivative mode may refer to B in FIG. 12
  • the fourth preset derivative mode Reference may be made to F in FIG.
  • the candidate derivative mode set includes a fifth preset derivative mode, a sixth preset derivative mode, a seventh preset derivative mode, and an eighth preset. a derivative mode; wherein the fifth preset derivative mode is a fifth sub-image block, a sixth sub-image block, and a seventh sub-image block are derived as one derivative image block; the sixth preset derivation mode is a sixth sub-image block, The seventh sub-image block and the eighth image block are derived as one derived image block; the seventh preset derivation mode is that the sixth sub-image block and the seventh sub-image block are derived as one derivative image block; the eighth preset derivation mode is fifth The sub image block, the sixth sub image block, the seventh sub image block, and the eighth sub image block are all kept independent; the fifth sub image block, the sixth sub image block, the seventh sub image block, and the eighth sub image block are currently The image blocks to be decoded are sequentially arranged in order from left to right
  • the fifth preset derivative mode reference may be made to D' in FIG. 13, and the sixth preset derivative mode may refer to E' in FIG. 13, and the seventh preset derivative mode may refer to B' in FIG. 13, the eighth pre- For the derivative mode, refer to G' in FIG.
  • the candidate derivative mode set includes a ninth preset derivative mode, a tenth preset derivative mode, an eleventh preset derivative mode, and a tenth a second preset derivative mode; wherein the ninth preset derivative mode is a ninth sub-image block and a tenth sub-image block are derived as one derived image block; and the tenth preset derivation mode is a ninth sub-image block and a tenth sub-image The block is derived as a derivative image block, and the eleventh sub-image block and the twelfth image block are derived as another derivation image block; the eleventh preset derivation mode is derived from the tenth sub-image block and the eleventh sub-image block.
  • the ninth sub-image block and the twelfth image block are derived as another derived image block;
  • the twelfth preset derivation mode is that the ninth sub-image block and the twelfth sub-image block are derived as one derivative image block
  • the ninth sub-image block, the tenth sub-image block, the eleventh sub-image block, and the twelfth sub-image block are sequentially arranged in a clockwise direction in the currently to-be-decoded image block.
  • the ninth preset derivative mode reference may be made to A′′ in FIG. 14
  • the tenth preset derivative mode may refer to E′′ in FIG. 14
  • the eleventh preset derivative mode may refer to F′′ in FIG. 14
  • the two preset derivation modes reference may be made to B" in FIG.
  • the candidate derivative mode set includes a preset number of preset derivative modes (such as four types) in the candidate derivative mode set.
  • Each of the preset derivation modes is represented by a fixed length code.
  • the division identifier of the current image block to be decoded or the division identifier of the current image block to be encoded is represented by a variable length code
  • the current image to be decoded The derived identifier of the block or the derived identifier of the current image block to be encoded is represented by a fixed length code.
  • 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 dividing a prediction unit by using different division manners according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a division and identification of a QT division manner according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of dividing an image block by a QTBT division mode according to an embodiment of the present application
  • FIG. 5 is a first schematic diagram of a method for marking a mark in a QT-ABT/TT division manner according to an embodiment of the present application
  • FIG. 6 is a second schematic diagram of a method for marking a mark in a QT-ABT/TT division mode according to an embodiment of the present application
  • FIG. 7 is a schematic structural diagram of a video codec system according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a video encoder according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a video decoder according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a codec device according to an embodiment of the present application.
  • FIG. 11 is a schematic flowchart 1 of a decoding method according to an embodiment of the present application.
  • FIG. 11B is a second schematic flowchart of a decoding method according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram 1 of a derivative mode according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram 2 of a derivative mode according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram 3 of a derivative mode according to an embodiment of the present disclosure.
  • 15A is a schematic flowchart 1 of an encoding method according to an embodiment of the present application.
  • FIG. 15B is a second schematic flowchart of an encoding method according to an embodiment of the present disclosure.
  • 16 is a schematic flowchart of a method for determining a basic division manner and a target derivative mode according to an embodiment of the present application
  • 17A is a schematic diagram 1 of a division structure of an image block in the embodiment of the present application.
  • 17B is a second schematic structural diagram of an image block according to an embodiment of the present application.
  • FIG. 18 is a third schematic structural diagram of an image block according to an embodiment of the present application.
  • 19 is a schematic diagram 4 of a division structure of an image block in an embodiment of the present application.
  • 20 is a schematic diagram 5 of a division structure of an image block in the embodiment of the present application.
  • 21 is a schematic diagram 6 of a division structure of an image block in the embodiment of the present application.
  • FIG. 22 is a schematic structural diagram 1 of a decoding apparatus according to an embodiment of the present application.
  • FIG. 23 is a second schematic structural diagram of a decoding apparatus according to an embodiment of the present application.
  • 24 is a schematic structural diagram 1 of an encoding apparatus according to an embodiment of the present application.
  • FIG. 25 is a second schematic structural diagram of an encoding apparatus according to an embodiment 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.
  • a complete image in a video is often referred to as a "frame,” and a video composed of many frames in chronological order is also referred to as a video sequence.
  • the video sequence has a series of redundant information such as spatial redundancy, temporal redundancy, visual redundancy, information entropy redundancy, structural redundancy, knowledge redundancy, and importance redundancy.
  • a video coding (Video Coding) technique is proposed to reduce the storage space and save the transmission bandwidth.
  • Video coding technology is also known as video compression technology.
  • video coding technologies mainly include intra prediction, inter prediction, transform quantization, entropy coding, and deblocking filtering.
  • video compression coding standards such as: MPEG-2 and MPEG-4 Part 10 Advanced Video Coding (AVC), developed by Motion Picture Experts Group (MPEG), H.263, H.264, and H.265 High Efficiency Video Coding Standard (HEVC) developed by the International Telecommunication Uion-Telecommunication Standardization Sector (ITU-T)
  • AVC Advanced Video Coding
  • MPEG Motion Picture Experts Group
  • HEVC High Efficiency Video Coding Standard
  • ITU-T International Telecommunication Uion-Telecommunication Standardization Sector
  • Chromatic Sampling Make full use of the visual and psychological characteristics of the human eye, and in the underlying data representation, try to minimize the amount of data described by a single element.
  • Predictive coding The data information of the previously encoded frame is used to predict the frame currently to be encoded.
  • the encoding end obtains a predicted value by prediction, and there is a certain residual value between the predicted value and the actual value. If the prediction is more suitable, the closer the predicted value is to the actual value, the smaller the residual value, so that the encoding end encodes the residual value to greatly reduce the amount of data.
  • the decoder reconstructs the original image by using the residual value plus the predicted value.
  • predictive coding is divided into two basic types: intra prediction and inter prediction.
  • Transform coding instead of directly encoding the original spatial domain information, the information sample value is converted from the current domain to another artificial domain (usually called the transform domain) according to some form of transformation function, and then The information is compressed and encoded in the distribution characteristics of the transform domain.
  • the transform domain another artificial domain (usually called the transform domain) according to some form of transformation function
  • Quantization coding Forcibly adjust the input value with a large dynamic range to a smaller output value.
  • the above compression coding methods are used in combination, and the basic processing unit of these compression coding is an image block, which is obtained by dividing the frame/image by the encoding end.
  • HEVC For image partitioning, in order to more flexibly represent video content, HEVC defines a CTU, a Coding Unit (CU), a Prediction Unit (PU), and a Transform Unit (TU).
  • the CTU, CU, PU, and TU are all image blocks.
  • CTU An image consists of multiple CTUs. One CTU usually corresponds to a square image area. As shown in (a) of Figure 1, the 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 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 two-dimensional Cartesian coordinate system XoY shown in FIG. 1 .
  • the length in the X-axis direction (horizontal direction), 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.
  • PU is the basic unit of intra prediction and inter prediction.
  • the division of the intra prediction unit includes a 2N ⁇ 2N division scheme (shown as A in FIG. 2) and an N ⁇ N division scheme (shown as B in FIG. 2).
  • the division of the inter prediction unit includes a 2N ⁇ 2N division manner (as shown by C in FIG. 2), an N ⁇ N division manner (shown as D in FIG. 2), and an N ⁇ 2N division manner (as shown in FIG. 2). E)), 2N ⁇ N division mode (shown as F in Fig. 2), 2N ⁇ nD division mode (shown as G in Fig. 2), 2N ⁇ nU division mode (such as H in Fig. 2) Show), nL ⁇ 2N division mode (shown as I in Figure 2), nR ⁇ 2N division mode (shown as J in Figure 2).
  • N is any positive integer
  • n x ⁇ N, and 0 ⁇ x ⁇ 1.
  • the 2N ⁇ 2N division method is not to divide the image block; the N ⁇ N division method is to divide the image block into four large sub-image blocks; the N ⁇ 2N division method is to divide the image block into two equal parts.
  • the vertical bisector moves down n, where D indicates that the image dividing line is shifted downward relative to the vertical bisector of the image block; 2N ⁇ nU is divided into two sub-image blocks, and the image dividing line is opposite to the image.
  • the vertical bisector of the block is shifted by n, where U represents the image dividing line moving relative to the vertical bisector of the image block; nL ⁇ 2N is divided into two sub-image blocks, and the image dividing line is opposite to the image dividing line.
  • the vertical bisector of the image block is shifted to the left by n, where L indicates that the image dividing line is shifted to the left by the vertical bisector of the image block; nR ⁇ 2N is divided into two sub-image blocks, and the image dividing line is relatively
  • TU Processes the residuals of the original image block and the predicted image block.
  • the division manners for dividing an image block include: Quad-Tree (QT) division, Binary Tree (BT) division, and TT division.
  • QT Quad-Tree
  • BT Binary Tree
  • TT division TT division
  • QT division method divide one image block into four sub-image blocks.
  • the sub-image block may be further divided, or the sub-image block may not be divided.
  • the encoding end divides the CTU into four sub-image blocks by using a QT division manner; for each sub-image block, the encoding end may not be divided (in this case, each sub-image block is a CU), and the sub-image may also be The block is divided into four sub-image blocks of the next level. As shown in (b) of FIG. 1, the encoding end divides CTU A into four sub-image blocks a, b, c, and d.
  • the BT division method divide one image block into two sub-image blocks.
  • the sub-image block may be further divided, or the sub-image block may not be divided.
  • the BT division method can include:
  • the image block is divided into upper and lower sub-image blocks of the same size. As shown in (c) of FIG. 1, the image block b is divided using a horizontal binary division method, and sub-image blocks e and sub-image blocks f of equal size are generated.
  • the image block is divided into two sub-image blocks of the same size, left and right. As shown in (d) of FIG. 1, the image block d is divided by the vertical binary division method, and sub-image blocks g and sub-image blocks h of equal size are generated.
  • the TT division method divide one image block into three sub-image blocks.
  • the sub-image block may be further divided, or the sub-image block may not be divided.
  • the TT division method can include:
  • the image block is divided into upper, middle and lower sub-image blocks.
  • the heights of the upper, middle, and lower sub-image blocks are respectively 1/4, 1/2, and 1/4 of the height of the image block.
  • the image block c is divided by a horizontal three-division division method, and the sub-image block j, the sub-image block k, and the sub-image block m are generated, and the height of the sub-image block j is high for the image block c.
  • the height of the sub-image block k is 1/2 of the height of the image block c
  • the height of the sub-image block m is 1/4 of the height of the image block c.
  • the heights of the upper, middle, and lower sub-image blocks are respectively 1/3, 1/3, and 1/3 of the height of the image block, that is, the image block is in accordance with the two-dimensional Cartesian coordinate system shown in FIG.
  • the direction of the X-axis in XoY is equally divided into three sub-image blocks.
  • the image block c is divided by a horizontal three-division division method, and the sub-image block j, the sub-image block k, and the sub-image block m are generated, and the height of the sub-image block j and the height of the sub-image block k are high.
  • the height of the sub-image block m is 1/3 of the height of the image block c.
  • the image block is divided into three sub-image blocks: left, center, and right.
  • the widths of the left, middle, and right sub-image blocks are respectively 1/4, 1/2, and 1/4 of the width of the image block.
  • the image block c is divided by a vertical three-division division method, and the sub-image block p, the sub-image block q, and the sub-image block x are generated, and the width of the sub-image block p is the width of the image block c.
  • the width of the sub-image block q is 1/2 of the width of the image block c
  • the width of the sub-image block x is 1/4 of the width of the image block c.
  • the heights of the left, middle, and right sub-image blocks are respectively 1/3, 1/3, and 1/3 of the image block, that is, the image block is in accordance with the two-dimensional Cartesian coordinate system shown in FIG.
  • the direction of the X-axis in XoY is equally divided into three sub-image blocks.
  • the image block c is divided by a vertical three-division division method, and the sub-image block p, the sub-image block q, and the sub-image block x are generated, and the width of the sub-image block p and the width of the sub-image block q are wide.
  • the width of the sub-image block x is 1/3 of the width of the image block c.
  • the encoding end after dividing an image block, the encoding end also needs to determine whether to continue dividing the sub-image block. Whether to divide a certain image block is indicated in the code stream by a division flag bit (such as split_cu_flag) corresponding to the image block.
  • a division flag bit such as split_cu_flag
  • the level of the image block in the QT partition structure indirectly represents the number of QT partitions.
  • split_cu_flag the value of the split_cu_flag of the image block indicated by the 64 ⁇ 64 CTU is 1
  • the CTU is divided into four 32 ⁇ 32 sub-image blocks, and the four 32 ⁇ 32 sub-images are divided.
  • the blocks are a sub-picture block A1, a sub-picture block A2, a sub-picture block A3, and a sub-picture block A4, respectively.
  • Each of the four 32 ⁇ 32 sub-image blocks may be further divided or not divided according to its corresponding split_cu_flag. If the value of the split_cu_flag of the sub-picture block A1 is 1, the sub-picture block A1 is further divided, and the sub-picture block A1 is divided into four 16 ⁇ 16 nodes, and the four 16 ⁇ 16 sub-image blocks are respectively sub-image blocks. B1, sub-picture block B2, sub-picture block B3, and sub-picture block B4. And so on, until all sub-image blocks are no longer divided. In FIG.
  • the QT level of the CTU is 0, and the QT levels of the sub-image block A1, the sub-image block A2, the sub-image block A3, and the sub-image block A4 are all 1, the sub-image block B1, the sub-image block B2, and the sub-image block.
  • Both B3 and sub-picture block B4 have a QT level of 2.
  • the Joint Video Exploration Team proposes a QTBT division method in which the QT division method and the BT division method are cascaded. Specifically, the CTU is divided into four sub-image blocks according to the QT division manner, and for the sub-image blocks that need to be further divided, the sub-image block is further divided according to the QT/BT division manner.
  • each node represents an image block
  • a node is a child node of the previous node
  • the image block represented by the node is an image represented by the previous node.
  • the solid line indicates division using the QT division method
  • the broken line indicates division using the BT division method
  • each of the nodes A to M corresponds to one CU.
  • 10 represents a vertical dichotomy
  • 11 represents a horizontal dichotomy.
  • FIG. 4 shows a CTU divided according to the division manner shown in (a) of FIG.
  • a QT-ABT/TT partitioning method is formed on the basis of the above QTBT, that is, the CTU is divided into four sub-image blocks according to the QT partitioning manner, for the sub-image block that needs further division. Then, the sub-image block is divided according to the QT/ABT/TT division method.
  • the coding end can use the identifier bit indication method shown in FIG. 5 or FIG. 6 to write a specific division manner into the code stream.
  • Each branch in Figure 5 represents the manner in which the corresponding levels are divided.
  • 1 indicates the QT division mode
  • 0 indicates the BT division method/TT division method/non-division.
  • 1 indicates the BT division method/TT division method
  • 0 indicates no division.
  • 1 indicates the horizontal division mode
  • 0 indicates the vertical division mode.
  • the 1 indicates the BT division mode (ie, the horizontal dichotomy)
  • 0 indicates the TT division mode (ie, the horizontal three-point).
  • 0 indicates the TT division mode (ie, vertical three points)
  • 1 indicates the BT division mode (ie, vertical dichotomy).
  • the BT division mode indicates whether the symmetrical division manner is adopted by the three identifiers of 0, 10, and 11.
  • the qt in Fig. 6 indicates that the QT division mode is adopted, and the no qt indicates that the QT division mode is not employed.
  • no qt means that the BT division mode may not be divided or further adopted.
  • the BT division mode is further adopted, it is necessary to identify in the code stream whether a parallel division method or a vertical division manner is adopted. If the horizontal division method is adopted, the further identification is 1/4 division, or 1/8 division, or 1/3 division, or 1/2 division, and so on.
  • the decoding end can correctly decode the specific shape of the image block.
  • the above division method still uses QTBT as the basic framework. On the basis of which the horizontal or vertical division of TT or ABT is still limited, it cannot meet the more complicated texture requirements.
  • the present application provides a decoding method.
  • the decoding method provided by the present application can be implemented in two ways.
  • the decoding apparatus determines the basic division manner of the current image block to be decoded and the target derivative mode of the sub image block in the current image block to be decoded by parsing the code stream, and according to the basic division manner, the current Decoding the image block to be divided into N (N is an integer greater than or equal to 2) sub-image blocks, and deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first according to the derivative manner indicated by the target derivative mode
  • the image block is derived such that the decoding device can decode the first derived image block.
  • the target derivative mode is one of a set of candidate derivative modes
  • the candidate derivative mode set includes M (M is an integer greater than or equal to 0) preset derivation mode, and each of the preset derivation modes is used for the unique indication one.
  • the derivative method is used to derive at least two adjacent sub-image blocks of the above N sub-image blocks into one derived image block. It is easy to understand that the combination of the division mode and the derivative mode can identify a plurality of different division results. Compared with the prior art, the image block is enriched and can be adapted to video images of various texture characteristics.
  • the decoding device determines, by parsing the code stream, a basic division manner of the current image block to be decoded and a feature parameter (at least one of height and width) of the current image block to be decoded; If the feature parameter of the to-be-decoded image block is less than or equal to the first preset threshold, the decoding device parses the code stream to determine a target derivative mode of the sub-image block in the current image block to be decoded, so that the decoding device may be configured according to the basic division manner.
  • the decoding device determines the target derivative mode of the sub-image block in the current image block to be decoded only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold.
  • the decoding efficiency of the decoding device in this mode is higher than that of the first implementation.
  • the decoding device may be a video decoder (as shown in FIG. 9 below), or may be a device having the functions of implementing the first implementable manner or the second implementable manner.
  • the present application also provides an encoding method.
  • This encoding method can be implemented in two ways.
  • the encoding device divides the current image block to be encoded into N according to the basic division manner. And sub-image blocks, and deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first derivative image block according to the derivative manner indicated by the target derived mode. Further, in a case where the first derivative image block is not divided, the encoding device encodes the first derivative image block to obtain a code stream including a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, And transmitting the code stream to the decoding device.
  • the target derivative mode is one of a set of candidate derivative modes
  • the candidate derivative mode set includes M (M is an integer greater than or equal to 0) preset derivation mode, and each of the preset derivation modes is used for the unique indication one.
  • the derivative method is used to derive at least two adjacent sub-image blocks of the above N sub-image blocks into one derived image block.
  • the division identifier of the current image block to be encoded is used to indicate a basic division manner, and the derived identifier of the current image block to be encoded is used to indicate the target derivative mode.
  • the coding end device in the present application derives at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block by using the target derivation mode on the basis of the basic division mode, thereby realizing the current image block to be encoded. Division. That is to say, the coding end device in the present application identifies a plurality of different division results by combining the division mode and the derivative mode, enriches the division manner of the image block, and can adapt to video images of various texture characteristics.
  • the encoding device divides the current image block to be encoded into N sub-image blocks according to the basic division manner, and If the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, parsing the code stream, determining a target derivative mode of the sub image block in the current image block to be encoded, such that the encoding device indicates according to the target derivative mode
  • the derivative method is to derive at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block.
  • the encoding device encodes the first derivative image block to obtain a code stream including a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, And transmitting the code stream to the decoding device.
  • the encoding device determines the target derivative mode only when the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold.
  • the implementation B effectively improves the coding efficiency, and the code The transmission resources occupied by the stream are small. In practical applications, implementation B is easier to implement than implementation A.
  • the above encoding device may be a video encoder (as shown in FIG. 8 below), or may be a device having the functions of implementing the above-described implementation A or the above-described implementation B.
  • Fig. 7 shows the structure of a video codec system.
  • the video codec system includes a source device 70 and a destination device 71.
  • the source device 70 generates encoded video data, and the source device 70 may also be referred to as a video encoding device or a video encoding device.
  • the destination device 71 may decode the encoded video data generated by the source device 70, and the destination device 71 also It may be referred to as a video decoding device or a video decoding device.
  • Source device 70 and/or destination device 71 can include at least one processor and a memory coupled to the at least one processor.
  • the memory may include, but is not limited to, a read-only memory (ROM), a random access memory (RAM), and an electrically erasable programmable read-only memory (EEPROM).
  • the flash memory or any other medium that can be used to store the desired program code in the form of an instruction or data structure accessible by the computer is not specifically limited herein.
  • Source device 70 and destination device 71 may comprise various devices, including desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set top boxes, telephone handsets such as so-called “smart" phones, A television, a camera, a display device, a digital media player, a video game console, an on-board computer or the like.
  • Link 72 can include one or more media and/or devices capable of moving encoded video data from source device 70 to destination device 71.
  • link 72 can include one or more communication media that enable source device 70 to transmit encoded video data directly to destination device 71 in real time.
  • source device 70 may modulate the encoded video data in accordance with a communication standard (eg, a wireless communication protocol) and may transmit the modulated video data to destination device 71.
  • the one or more communication media may include wireless and/or wired communication media, such as a radio frequency (RF) spectrum, one or more physical transmission lines.
  • RF radio frequency
  • the one or more communication media described above may form part of a packet-based network, a portion of a packet-based network (eg, a local area network, a wide area network, or a global network (eg, the Internet)).
  • the one or more communication media described above may include routers, switches, base stations, or other devices that enable communication from source device 70 to destination device 71.
  • the encoded video data can be output from the output interface 703 to the storage device 73.
  • the encoded video data can be accessed from storage device 73 via input interface 713.
  • the storage device 73 can include a variety of local access data storage media, such as Blu-ray Disc, High Density Digital Video Disc (DVD), Compact Disc Read-Only Memory (CD-ROM), flash. Memory, or other suitable digital storage medium for storing encoded video data.
  • storage device 73 may correspond to a file server or another intermediate storage device that stores encoded video data generated by source device 70.
  • destination device 71 may retrieve its stored video data from storage device 73 via streaming or download.
  • the file server can be any type of server capable of storing encoded video data and transmitting the encoded video data to the destination device 71.
  • the file server may include a World Wide Web (Web) server (for example, for a website), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, and a local disk. driver.
  • Web World Wide Web
  • FTP File Transfer Protocol
  • NAS Network Attached Storage
  • the destination device 71 can access the encoded video data over any standard data connection (e.g., an internet connection).
  • the instance type of the data connection includes a wireless channel, a wired connection (e.g., a cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server.
  • the transmission of the encoded video data from the file server may be streaming, downloading, or a combination of both.
  • the codec method of the present application is not limited to a wireless application scenario.
  • the codec method of the present application can be applied to video codec supporting multiple multimedia applications such as the following applications: aerial television broadcasting, cable television transmission, satellite television transmission, Streaming video transmission (e.g., via the Internet), encoding of video data stored on a data storage medium, decoding of video data stored on a data storage medium, or other application.
  • video codec system 1 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
  • the video codec system shown in FIG. 7 is only an example of a video codec system, and is not a limitation of the video codec system in this application.
  • the codec method provided by the present application is also applicable to a scenario where there is no data communication between the encoding device and the decoding device.
  • the video data to be encoded or the encoded video data may be retrieved from a local memory, streamed over a network, or the like.
  • the video encoding device may encode the encoded video data and store the encoded video data to a memory, and the video decoding device may also acquire the encoded video data from the memory and decode the encoded video data.
  • source device 70 includes a video source 701, a video encoder 702, and an output interface 703.
  • output interface 703 can include a regulator/demodulator (modem) and/or a transmitter.
  • Video source 701 can include a video capture device (eg, a video camera), a video archive containing previously captured video data, a video input interface to receive video data from a video content provider, and/or a computer graphic for generating video data. A combination of systems, or such sources of video data.
  • Video encoder 702 can encode video data from video source 701.
  • source device 70 transmits the encoded video data directly to destination device 71 via output interface 703.
  • the encoded video data may also be stored on storage device 73 for later access by destination device 71 for decoding and/or playback.
  • destination device 71 includes display device 711, video decoder 712, and input interface 713.
  • input interface 713 includes a receiver and/or a modem.
  • Input interface 713 can receive encoded video data via link 72 and/or from storage device 73.
  • the display device 711 can be integrated with the destination device 71 or can be external to the destination device 71. Generally, the display device 711 displays the decoded video data.
  • Display device 711 can include a variety of display devices, such as liquid crystal displays, plasma displays, organic light emitting diode displays, or other types of display devices.
  • video encoder 702 and video decoder 712 may each be integrated with an audio encoder and decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and software to handle common Encoding of both audio and video in a data stream or in a separate data stream.
  • the video encoder 702 and the video decoder 712 may include at least one microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and a field programmable gate array (Field Programmable). Gate Array, FPGA), discrete logic, hardware, or any combination thereof. If the codec method provided by the present application is implemented in software, the instructions for the software may be stored in a suitable non-transitory computer readable storage medium, and the instructions may be executed in hardware using at least one processor Implement this application. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) can be considered at least one processor. Video encoder 702 may be included in an encoder, and video decoder 712 may be included in a decoder, which may be part of a combined encoder/decoder (codec) in a respective device.
  • codec combined encoder/decoder
  • the video encoder 702 and the video decoder 712 in this application may be operated according to a video compression standard (for example, HEVC), and may also be operated according to other industry standards, which is not specifically limited herein.
  • a video compression standard for example, HEVC
  • the video encoder 702 is configured to determine a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded, or determine a basic division manner of the current image block to be encoded and a feature of the current image block to be encoded.
  • a parameter in a case where the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, determining a target derivative mode of the sub image block in the current image block to be encoded; and dividing the current image block to be encoded according to the basic division mode At least N (N is an integer greater than or equal to 2) sub-image blocks, and at least two adjacent sub-image blocks of the N sub-image blocks are derived as the first derivative image block according to a derivative manner indicated by the target derived mode.
  • video encoder 702 does not need to partition the first derived image block, video encoder 702 encodes the first derived image block, resulting in a code stream and transmitting the code stream to video decoder 712.
  • the video encoder 702 determines the first derived image block as the current image block to be encoded, and repeatedly performs the above process until the first obtained. Derived image blocks are no longer partitioned.
  • the method that the video encoder 702 determines the basic division manner of the current image block to be encoded may be: the video encoder 702 determines at least two candidate division manners corresponding to the current image to be encoded, and calculates at least two types.
  • the rate-distortion cost of each of the candidate partitioning modes is such that the video encoder 702 determines the candidate partitioning mode corresponding to the smallest rate-distortion cost as the basic partitioning mode.
  • the method of “the video encoder 702 determining the target derived mode of the sub-image block in the current image block to be encoded” may be: the video encoder 702 calculates a rate distortion cost of each of the preset derivative modes in the candidate derived mode set, and The preset derivative mode corresponding to the minimum rate distortion cost is determined as the target derivative mode.
  • the video decoder 712 is configured to: parse the code stream, determine a basic division manner of the current image block to be decoded, and a target derivative mode of the sub image block in the current image block to be decoded (S111); or Parsing the code stream, determining a basic division manner of the current image block to be decoded, and a feature parameter of the current image block to be decoded (S111a), and determining whether the feature parameter of the current image block to be decoded is less than or equal to a first preset threshold (S111b), In a case that the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, the code stream is parsed to determine a target derivative mode of the sub-image block in the current image block to be decoded (S111c).
  • the video decoder 712 divides the current image block to be decoded into N sub-image blocks according to the basic division manner (S112), and at least two adjacent sub-N of the N sub-image blocks according to the derivative manner indicated by the target derivative mode.
  • the image block is derived as a first derived image block (S113). Further, the video decoder 712 decodes the first derived image block (S114).
  • FIG. 8 is a schematic block diagram of a video encoder 702 in the embodiment of the present application.
  • Video encoder 702 may perform intra coding and inter coding of video blocks within a video strip.
  • Intra coding relies on spatial prediction to reduce or remove spatial redundancy of video within a given video frame or image.
  • Inter-coding relies on temporal prediction to reduce or remove temporal redundancy of adjacent frames of a video sequence or video within an image.
  • the intra coding mode may refer to any of a number of space based compression modes. For example, one-way prediction (P mode) or bidirectional prediction (B mode).
  • the inter coding mode may refer to any of a number of time based compression modes.
  • video encoder 702 includes a partitioning unit 81, a transform unit 82, a quantization unit 83, a prediction unit 84, an entropy encoding unit 85, a reference image memory 88, and a summer 802.
  • the prediction unit 84 includes a motion estimation unit 841, a motion compensation unit 842, and an intra prediction unit 843.
  • video encoder 702 also includes inverse quantization unit 86, inverse transform unit 87, and summer 801.
  • video encoder 702 can also include a deblocking filter (not shown in FIG. 8) for filtering block boundaries to remove blockiness artifacts from the reconstructed video. The deblocking filter will typically filter the output of summer 801 as needed.
  • video encoder 702 may also include additional loop filters (in-loop or post-loop).
  • video encoder 702 receives video data, and segmentation unit 81 segments the data into video blocks.
  • This partitioning may also include partitioning into slices, image blocks, or other larger units, and, for example, video block partitioning based on the quadtree structure of the LCU and CU.
  • video encoder 702 encodes components of a video block within a video strip to be encoded.
  • a stripe may be partitioned into multiple video blocks (and possibly into a collection of video blocks called image blocks).
  • Prediction unit 84 may select one of a plurality of possible coding modes of the current video block based on the coding quality and the cost calculation result (eg, Rate Distortion cost (RD cost)), such as one of a plurality of intra coding modes.
  • the cost calculation result eg, Rate Distortion cost (RD cost)
  • Prediction unit 84 may provide the resulting intra-coded or inter-coded block to summer 802 to generate residual block data, and provide the resulting intra-coded or inter-coded decoding to summer 801 to reconstruct the The coded block is thus used as a reference image.
  • Motion estimation unit 841 and motion compensation unit 842 within prediction unit 84 perform inter-predictive decoding of the current video block relative to one or more of the one or more reference pictures to provide temporal compression.
  • Motion estimation unit 841 can be configured to determine an inter prediction mode for the video stripe based on a predetermined pattern of the video sequence. The predetermined mode specifies the video strips in the sequence as P strips, B strips, or GPB strips.
  • Motion estimation unit 841 and motion compensation unit 842 are highly integrated, but are illustrated separately for conceptual purposes.
  • the motion performed by the motion estimation unit 841 is estimated as a process of generating a motion vector of the estimated video block.
  • the motion vector may indicate the displacement of the PU of the video block within the current video frame or image relative to the predicted block within the reference image.
  • the prediction block is a block of PUs that are found to closely match the video block to be decoded according to the pixel difference, and the pixel difference may be Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD) or Other difference metrics are determined.
  • video encoder 702 can calculate a value of a sub-integer pixel location of a reference image stored in reference image memory 88. For example, video encoder 702 can interpolate values of a quarter pixel position, an eighth pixel position, or other fractional pixel position of a reference image. Accordingly, the motion estimation unit 841 can perform motion search with respect to the full pixel position and the fractional pixel position and output a motion vector having fractional pixel precision.
  • the motion estimation unit 841 calculates a motion vector of the PU of the video block in the inter-decoded slice by comparing the position of the PU with the position of the prediction block of the reference image.
  • the reference images may be selected from a first reference image list (List 0) or a second reference image list (List 1), each of the lists identifying one or more reference images stored in the reference image memory 88.
  • the motion estimation unit 841 transmits the calculated motion vector to the entropy encoding unit 85 and the motion compensation unit 842.
  • Motion compensation performed by motion compensation unit 842 may involve extracting or generating a prediction block based on motion vectors determined by motion estimation, possibly performing interpolation to sub-pixel precision. After receiving the motion vector of the PU of the current video block, motion compensation unit 842 may locate the prediction block pointed to by the motion vector in one of the reference image lists. Video encoder 702 forms a residual video block by subtracting the pixel values of the prediction block from the pixel values of the current video block being decoded, thereby forming pixel difference values. The pixel difference values form residual data for the block and may include both luminance and chrominance difference components. Summer 801 represents one or more components that perform this subtraction. Motion compensation unit 842 may also generate syntax elements associated with video blocks and video slices for use by video decoder 712 to decode video blocks of the video strip.
  • the PU-containing image may be associated with two reference image lists called "List 0" and "List 1".
  • an image containing B strips may be associated with a list combination that is a combination of List 0 and List 1.
  • motion estimation unit 841 can perform uni-directional prediction or bi-directional prediction for the PU, wherein, in some possible implementations, bi-directional prediction is based on list of reference pictures of list 0 and list 1, respectively.
  • the prediction performed by the image in other possible embodiments, the bidirectional prediction is prediction based on the reconstructed future frame and the reconstructed past frame in the display order of the current frame, respectively.
  • the motion estimation unit 841 may search for a reference block for the PU in the reference image of list 0 or list 1.
  • Motion estimation unit 841 may then generate a reference index indicating a reference picture containing the reference block in list 0 or list 1 and a motion vector indicating a spatial displacement between the PU and the reference block.
  • the motion estimation unit 841 may output a reference index, a prediction direction identifier, and a motion vector as motion information of the PU.
  • the predicted direction indicator may indicate that the reference index indicates a reference picture in list 0 or list 1.
  • Motion compensation unit 842 may generate a predicted image block of the PU based on the reference block indicated by the motion information of the PU.
  • the motion estimation unit 841 may search for a reference block for the PU in the reference image in the list 0 and may also search for another one for the PU in the reference image in the list 1 Reference block. Motion estimation unit 841 may then generate a reference index indicating the reference picture containing the reference block in list 0 and list 1 and a motion vector indicating the spatial displacement between the reference block and the PU. The motion estimation unit 841 may output a reference index of the PU and a motion vector as motion information of the PU. Motion compensation unit 842 may generate a predicted image block of the PU based on the reference block indicated by the motion information of the PU.
  • motion estimation unit 841 does not output a complete set of motion information for the PU to entropy encoding unit 85. Rather, the motion estimation unit 841 can signal the motion information of the PU with reference to motion information of another PU. For example, motion estimation unit 841 can determine that the motion information of the PU is sufficiently similar to the motion information of the neighboring PU. In this embodiment, motion estimation unit 841 can indicate an indication value in a syntax structure associated with the PU that indicates to video decoder 712 that the PU has the same motion information as the neighboring PU or has a slave phase The motion information derived by the neighboring PU.
  • motion estimation unit 841 can identify candidate predicted motion vectors and Motion Vector Differences (MVDs) associated with neighboring PUs in a syntax structure associated with the PU.
  • the MVD indicates the difference between the motion vector of the PU and the indicated candidate predicted motion vector associated with the neighboring PU.
  • Video decoder 712 may determine the motion vector of the PU using the indicated candidate predicted motion vector and MVD.
  • prediction unit 84 may generate a list of candidate predicted motion vectors for each PU of the CU.
  • One or more of the candidate predicted motion vector lists may include one or more original candidate predicted motion vectors and one or more additional candidate predicted motion vectors derived from the original candidate predicted motion vectors.
  • Intra prediction unit 843 within prediction unit 84 may perform intra-predictive decoding of the current video block relative to one or more neighboring blocks in the same image or slice as the current block to be decoded to provide spatial compression. Accordingly, instead of inter prediction (as described above) performed by motion estimation unit 841 and motion compensation unit 842, intra prediction unit 843 may intra-predict the current block. In particular, intra prediction unit 843 can determine an intra prediction mode to encode the current block. In some possible implementations, intra-prediction unit 843 can encode the current block using various intra-prediction modes, for example, during a separate encoding traversal, and intra-prediction unit 843 can select the appropriate frame to use from the tested mode. Internal prediction mode.
  • video encoder 702 forms a residual video block by subtracting the prediction block from the current video block.
  • the residual video data in the residual block may be included in one or more TUs and applied to transform unit 82.
  • the transform unit 82 transforms the residual video data into residual transform coefficients using, for example, a Discrete Cosine Transform (DCT) or a transform of a conceptually similar transform (for example, DST for Discrete Sine Transform (DST)).
  • Transform unit 82 may convert the residual video data from the pixel domain to a transform domain (eg, a frequency domain).
  • Transform unit 82 may send the resulting transform coefficients to quantization unit 83.
  • the quantization unit 83 quantizes the transform coefficients to further reduce the code rate.
  • the quantization process can reduce the bit depth associated with some or all of the coefficients.
  • the degree of quantization can be modified by adjusting the quantization parameters.
  • quantization unit 83 may then perform a scan of the matrix containing the quantized transform coefficients.
  • the entropy encoding unit 85 may perform scanning.
  • entropy encoding unit 85 may entropy encode the quantized transform coefficients.
  • the entropy encoding unit 85 may perform Context-Adaptive Varial-Length Coding (CAVLC), Context-based Adaptive Binary Arithmetic Coding (CABAC), and grammar-based Context Adaptive Binary Arithmetic Decoding (SBAC), Probability Interval Partition Entropy (PIPE) decoding or another entropy encoding method or technique.
  • Entropy encoding unit 85 may also entropy encode the motion vectors and other syntax elements of the current video strip being decoded.
  • the encoded code stream may be transmitted to video decoder 712 or archive for later transmission or retrieved by video decoder 712.
  • the inverse quantization unit 86 and the inverse transform unit 87 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain for later use as a reference block of the reference image.
  • Motion compensation unit 842 may calculate the reference block by adding the residual block to a prediction block of one of the reference pictures within one of the reference picture lists. Motion compensation unit 842 may also apply one or more interpolation filters to the reconstructed residual block to calculate sub-integer pixel values for motion estimation.
  • Summer 801 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 842 to produce a reference block for storage in reference image memory 88.
  • the reference block may be used by the motion estimation unit 841 and the motion compensation unit 842 as reference blocks to inter-predict blocks in subsequent video frames or images.
  • video encoder 702 may directly quantize the residual signal without the need for processing by transform unit 82, and accordingly need not be processed by inverse transform unit 87; or, for some image blocks Or the image frame, video encoder 702 does not generate residual data, and accordingly does not need to be processed by transform unit 82, quantization unit 83, inverse quantization unit 86, and inverse transform unit 87; alternatively, video encoder 702 can reconstruct the reconstructed The video block is stored directly as a reference block without filtering processing; alternatively, the quantization unit 83 and the inverse quantization unit 86 in the video encoder 702 can be combined.
  • FIG. 9 is a schematic structural diagram of a video decoder 712 in the embodiment of the present application.
  • video decoder 712 includes an entropy decoding unit 90, a prediction unit 91, an inverse quantization unit 94, an inverse transform unit 93, a summer 95, and a reference image memory 92.
  • the prediction unit 91 includes a motion compensation unit 911 and an intra prediction unit 912.
  • video decoder 712 can perform an exemplary reciprocal decoding process with respect to the encoding flow described by video encoder 702 from FIG.
  • video decoder 712 receives from video encoder 702 an encoded video code stream representing the video blocks of the encoded video slice and associated syntax elements.
  • Entropy decoding unit 90 of video decoder 712 entropy decodes the code stream to produce quantized coefficients, motion vectors, and other syntax elements.
  • the entropy decoding unit 90 forwards the motion vector and other syntax elements to the prediction unit 91.
  • Video decoder 712 can receive syntax elements at the video stripe level and/or video block level.
  • the intra-prediction unit 912 of the prediction unit 91 may be based on the signaled intra-prediction mode and data from the previously decoded block of the current frame or image. The predicted data of the video block of the current video stripe is generated.
  • the motion compensation unit 911 of the prediction unit 91 When the video image is decoded into an inter-frame decoded (eg, B, P, or GPB) stripe, the motion compensation unit 911 of the prediction unit 91 generates the current video based on the motion vector and other syntax elements received from the entropy decoding unit 90.
  • Video decoder 712 may construct a reference image list (List 0 and List 1) using default construction techniques based on reference images stored in reference image memory 92.
  • Motion compensation unit 911 determines the prediction information for the video block of the current video slice by parsing the motion vector and other syntax elements, and uses the prediction information to generate a predictive block of the current video block being decoded. For example, motion compensation unit 911 uses some of the received syntax elements to determine a prediction mode (eg, intra prediction or inter prediction) of a video block used to decode a video slice, an inter prediction slice type (eg, B strip, P strip, or GPB strip), construction information for one or more of the reference picture lists of the strip, motion vectors for each inter-coded video block of the strip, and each frame of the strip The inter prediction state of the decoded video block and other information used to decode the video block in the current video slice.
  • a prediction mode eg, intra prediction or inter prediction
  • an inter prediction slice type eg, B strip, P strip, or GPB strip
  • Motion compensation unit 911 can also perform interpolation based on the interpolation filter. Motion compensation unit 911 may use the interpolation filters as used by video encoder 702 during encoding of the video block to calculate interpolated values for sub-integer pixels of the reference block. In this application, motion compensation unit 911 can determine the interpolation filters used by video encoder 702 from the received syntax elements and use an interpolation filter to generate the predictive blocks.
  • motion compensation unit 911 may generate a candidate predicted motion vector list for the PU. Data identifying the location of the selected candidate predicted motion vector in the candidate motion vector list of the PU may be included in the code stream. After generating the candidate prediction motion vector list for the PU, motion compensation unit 911 may generate a predictive image block for the PU based on one or more reference blocks indicated by the motion information of the PU. The reference block of the PU may be in a different time image than the PU. Motion compensation unit 911 may determine motion information for the PU based on the selected motion information from the candidate motion vector list of the PU.
  • Inverse quantization unit 94 inverse quantizes (eg, dequantizes) the quantized transform coefficients provided in the code stream and decoded by entropy decoding unit 90.
  • the inverse quantization process can include determining the degree of quantization using the quantization parameters calculated by video encoder 702 for each of the video slices, and likewise determining the degree of inverse quantization of the application.
  • Inverse transform unit 93 applies an inverse transform (eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to produce a residual block in the pixel domain.
  • an inverse transform eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process
  • the video decoder 712 sums the residual block from the inverse transform unit 93 with the corresponding predictive block generated by the motion compensation unit 911. To form a decoded video block.
  • Summer 95 represents one or more components that perform this summation operation.
  • a deblocking filter can also be applied to filter the decoded blocks to remove blockiness artifacts as needed.
  • Other loop filters can also be used to smooth pixel transitions or otherwise improve video quality.
  • the decoded video block in a given frame or image is then stored in a reference image memory 92, which stores a reference image for subsequent motion compensation.
  • video decoder 712 may be used for the decoding of the code stream. For example, for certain image blocks or image frames, entropy decoding unit 90 of video decoder 712 does not decode the quantized coefficients, and accordingly does not need to be processed by inverse quantization unit 94 and inverse transform unit 93. For example, inverse quantization unit 94 and inverse transform unit 93 in video decoder 712 can be combined.
  • the video encoder 702 and the video decoder 712 may also be implemented by another implementation, for example, by using a general-purpose digital processor system, such as the codec device 10 shown in FIG. Some of the devices in the video encoder 702 may also be part of the video decoder 712.
  • the codec device 10 may be applied to the encoding side or may be applied to the decoding side.
  • the codec device 10 includes a processor 1001 and a memory 1002.
  • the processor 1001 is coupled to the memory 1002 (e.g., interconnected by a bus 1004).
  • the codec device 10 may further include a transceiver 1003, and the transceiver 1003 is connected to the processor 1001 and the memory 1002 for receiving/transmitting data.
  • the memory 1002 can be a random access memory (RAM), a read-only memory (ROM), an Erasable Programmable Read Only Memory (EPROM), or a portable read only memory. (Compact Disc Read-Only Memory, CD-ROM).
  • RAM random access memory
  • ROM read-only memory
  • EPROM Erasable Programmable Read Only Memory
  • CD-ROM Compact Disc Read-Only Memory
  • the processor 1001 may be one or more central processing units (CPUs). In the case that the processor 1001 is a CPU, the CPU may be a single core CPU or a multi-core CPU.
  • CPUs central processing units
  • the processor 1001 is configured to read program code stored in the memory 1002, and perform operations of any one of the embodiments corresponding to FIG. 11A, FIG. 11B, FIG. 15A, or FIG. 15B and various possible embodiments thereof.
  • FIG. 11A is a schematic flowchart of a decoding method according to an embodiment of the present application, and the decoding method can be applied to the video codec system shown in FIG. 7.
  • the flow shown in FIG. 11A is explained by taking the video decoder 712 shown in FIG. 9 as an execution subject as an example.
  • the decoding method provided by the embodiment of the present application includes:
  • the video decoder obtains a code stream that includes image data.
  • the code stream obtained by the video decoder including the image data includes a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), and a slice header or a slice header ( Slice segment header) and other syntax elements.
  • SPS Sequence Parameter Set
  • PPS Picture Parameter Set
  • Slice segment header Slice segment header
  • the video decoder decodes the obtained code stream, determines a basic division manner of the current image block to be decoded, and a target derivative mode of the sub-image block in the current image block to be decoded.
  • the syntax element of the code stream includes a division identifier of the current image block to be decoded and a derivative identifier of the current graphics block to be decoded, and the division identifier of the current image block to be decoded is used to indicate a basic division manner, and the derivative identifier of the current image block to be decoded is used. Indicates the target derivative mode.
  • the division identifier of the current image block to be decoded is represented by a variable length code, for example, a binary truncation code or an exponential Golomb code.
  • the derived identifier of the current image block to be decoded is represented by a fixed length code.
  • the division identifier of the current image block to be decoded and the derivative identifier of the current image block to be decoded may be an independent flag.
  • the division identifier of the current image block to be decoded is represented by SplitFlag
  • the derivative identifier of the current image block to be decoded adopts DeriveFlag. Said.
  • the division identifier of the current image block to be decoded and the derivative identifier of the current image block to be decoded may also be a part of the same identifier, for example, if the derivative identifier of the current image block to be decoded is represented by a fixed length code of length x.
  • the code stream includes flag1 corresponding to the current image block to be decoded, and the last x bit of the flag1 is a derivative identifier of the current image block to be decoded, and the remaining bits of the flag1 except the last x bit are the division identifier of the current image block to be decoded. .
  • the video decoder parses the code stream
  • the method for determining the basic division mode and the target derivation mode may be: the video decoder parses the code stream, and the syntax element included in the code stream is included to indicate how to a division identifier (such as SplitFlag) of the currently to-be-decoded image block into which the decoded image block is divided into N sub-image blocks and a current indication for how to derivate at least two adjacent sub-image blocks of the N sub-image blocks into one derived image block Derived identification of the image block to be decoded (such as DeriveFlag), and determining a basic division manner according to the division identifier of the current image block to be decoded, and determining a target derivative mode according to the derived identifier of the current image block to be decoded.
  • a division identifier such as SplitFlag
  • a SplitFlag indicates that the image block corresponding to the SplitFlag is divided into horizontal quarters. If the value of a certain DeriveFlag is 01, it indicates that at least two adjacent sub-image blocks in the image block corresponding to the DeriveFlag are derived into a derivative image block by using the first preset derivation mode in the candidate derivation mode.
  • the video decoder parses the code stream
  • the method for determining the basic division mode and the target derivation mode may further be: the decoding end device parses the code stream, and obtains, by the decoding end, the syntax element included in the code stream, Decoding a first identifier of the image block (such as NSFlag); if the value of the first identifier is a first value (for example, 1), acquiring a second identifier (such as QTSplitFlag) included in the syntax element corresponding to the current image block to be decoded; If the value of the second identifier is a second value (for example, 01), it indicates that the current image block to be decoded is divided into vertical quarters; if the value of the second identifier is a third value (for example, 00), the current to be decoded is The image block is divided into horizontal quarters.
  • a first identifier of the image block such as NSFlag
  • a second identifier such as QTSplitFlag
  • the decoding end device further acquires, from the code stream, a derivative identifier of the current to-be-decoded image block included in the syntax element for indicating how to derivate at least two adjacent sub-image blocks of the N sub-image blocks into one derived image block.
  • a derivative identifier of the current to-be-decoded image block included in the syntax element for indicating how to derivate at least two adjacent sub-image blocks of the N sub-image blocks into one derived image block.
  • DeriveFlag For example, DeriveFlag
  • the basic division manner in the embodiment of the present application is a horizontal N score, a vertical N score, or a horizontal vertical N score.
  • the horizontal N point refers to horizontally dividing the current image block to be decoded into N sub-image blocks.
  • the height of each of the N sub-image blocks may be 1/N of the height of the current image block to be decoded, that is, the current image block to be decoded is horizontally divided, and is equally divided into N sub-image blocks. As shown in (c) of FIG. 1, the height of each sub-image block is 1/2 of the height of the image block b.
  • the heights of any two sub-image blocks of the N sub-image blocks may also be unequal, that is, the current image block to be decoded is horizontally divided, and is unevenly divided into N sub-image blocks. As shown in (e) of FIG.
  • the height of the sub-image block j is 1/4 of the height of the image block c
  • the height of the sub-image block k is 1/2 of the height of the image block c
  • the sub-image block m The height is 1/4 of the height of the image block c.
  • the vertical N point refers to vertically dividing the current image block to be decoded into N sub-image blocks.
  • the width of each of the N sub-image blocks may be 1/N of the width of the current image block to be decoded, that is, the current image block to be decoded is vertically divided, and is equally divided into N sub-image blocks. As shown in (d) of FIG. 1, the width of each sub-image block is 1/2 of the width of the image block d.
  • the widths of any two sub-image blocks of the N sub-image blocks may not be equal, that is, the current image block to be decoded is vertically divided, and is unevenly divided into N sub-image blocks. As shown in (g) of FIG.
  • the width of the sub-image block p is 1/4 of the width of the image block c
  • the width of the sub-image block q is 1/2 of the width of the image block c
  • the sub-image block x is The width is 1/4 of the width of the image block c.
  • horizontal and vertical N points mean that the current image block to be decoded is horizontally and vertically divided into N sub-image blocks.
  • the width of each of the N sub-image blocks may be the width of the current image block to be decoded.
  • the height of each sub-image block can be the height of the current image block to be decoded. That is, the current image block to be decoded is horizontally and vertically divided, and is equally divided into N sub-image blocks.
  • the width of each sub-image block is the width of CTU A. (ie 1/2)
  • the height of each sub-image block is the height of CTU A (ie 1/2).
  • the widths of any two sub-image blocks in the N sub-image blocks may not be equal, or the heights of any two sub-image blocks are not equal, that is, the current image block to be decoded is vertically divided, and is unevenly divided into N sub-image blocks.
  • a typical representation of the horizontal and vertical N points in the embodiment of the present application is a quadtree partition.
  • the embodiment of the present application refers to the above-mentioned “leveling the currently to-be-decoded image block horizontally and dividing into N sub-image blocks”, and the vertical N-score refers to “discriminating the current image block to be decoded vertically, and The average is divided into N sub-image blocks, and the horizontal and vertical N points are described as an example of “dividing the current image block to be decoded horizontally and dividing into N sub-image blocks equally”.
  • the image block may be divided by a horizontal N-segment or a vertical N-segmentation when a certain image block satisfies a preset condition.
  • the width of an image block is M1 and the height is H1.
  • M1 ⁇ H1 is greater than X1 ⁇ Y1
  • the video encoder divides the image block by horizontal N or vertical N division; or, if M1 ⁇ H1 is smaller than X2 ⁇ Y2, the video encoder divides the image block by horizontal N or vertical N division; or, if M1 ⁇ H1 is greater than X1 ⁇ Y1 and smaller than X2 ⁇ Y2, the video encoder adopts horizontal N or vertical
  • the image block is divided by the N division method.
  • X1, Y1, X2 and Y2 are all positive integers.
  • the basic division method is horizontal N or vertical N.
  • the target derivative mode in the embodiment of the present application is one of the candidate derivative mode sets, where the candidate derivative mode set includes M (M is an integer) preset derivative mode, and the basic division mode is horizontal N or vertical N when, 0 ⁇ M ⁇ 2 N-1; when the base is divided into horizontal and vertical N time division manner,
  • M is an integer
  • the basic division mode is horizontal N or vertical N when, 0 ⁇ M ⁇ 2 N-1; when the base is divided into horizontal and vertical N time division manner
  • M is an integer preset derivative mode
  • the basic division mode is horizontal N or vertical N when, 0 ⁇ M ⁇ 2 N-1; when the base is divided into horizontal and vertical N time division manner
  • Each of the preset derivative modes uniquely indicates a derivative mode
  • the derivative method refers to deriving at least two adjacent sub-image blocks of the N sub-image blocks into one derivative image block. It should be noted that there is a preset derivative mode for indicating that no derivation is performed in the preset derivation mode in M.
  • Derivation in the embodiments of the present application can be understood as fusion/merge. Specifically, after the image block to be decoded is divided into N sub-image blocks, at least two adjacent sub-image blocks are combined into one derived image block.
  • A, B, C, D, E, F, G, and H in Fig. 12 show these eight preset derivation modes. Taking the preset derivation mode shown by A in FIG. 12 as an example, the first dividing line is removed, and the sub-image block 1 and the sub-image block 2 are derived (or referred to as fusion/merging) into one derived image block.
  • A', B', C', D', E', F', G', H' in Fig. 13 show these eight preset derivation patterns.
  • the first dividing line is removed, and the sub-image block 1 and the sub-image block 2 are derived as one derived image block, and the third dividing line is removed, and the sub-image block 3 is removed.
  • sub-image block 4 is derived as another derived image block.
  • the image block to be decoded is divided into a sub-image block 1 (which may correspond to the ninth sub-image block described herein) and a sub-image block 2 (corresponding to each other).
  • the tenth sub-image block described herein), sub-image block 3 (which may correspond to the eleventh sub-image block described herein), and sub-image block 4 (which may correspond to the twelfth sub-image block described herein), N 4, Dividing the dividing line of the image block to be decoded into four a first dividing line, a second dividing line, a third dividing line, and a fourth dividing line.
  • A", B", C", D", E", F", G", H" in Fig. 14 show 8 of the preset derivation patterns. Taking the preset derivation mode shown by G" in FIG. 14 as an example, the third dividing line and the fourth dividing line are removed, and the sub-image block 1, the sub-image block 3, and the sub-image block 4 are derived as one derived image block.
  • the candidate derivative mode set corresponding to different partitioning modes includes a preset diffraction mode having the same derivative result.
  • the derived image block shown by F in FIG. 12 is the same as the derivative image block shown by E′′ in FIG. 14 above, and F′ in FIG. 13 is shown.
  • the derived image block is the same as the derived image block shown by F" in Fig. 14 described above, and the derived image block shown by H in Fig. 12 is the same as the derivative image block shown by H" in Fig. 14 described above. Therefore,
  • the preset derivative mode with the same derivative result may be deleted by one, and only reserved in the candidate derivative mode set corresponding to a certain dividing mode.
  • the candidate derivative mode set may include only B in FIG. 12 (corresponding to the third preset derivative described herein). Mode), C (corresponding to the second preset derivative mode described herein), D (corresponding to the first preset derivative mode described herein), and F (corresponding to the fourth preset derivative mode described herein) Preset derivative mode.
  • the candidate derivative mode set may include only B′ in FIG. 13 (corresponding to the seventh pre-described herein) Derivative mode), D' (corresponding to the fifth preset derivative mode described herein), E' (corresponding to the sixth preset derivative mode described herein), and G' (corresponding to the eighth preset derivative described herein) Mode) shows the preset derivative mode.
  • the candidate derivative pattern set may include only A′′ in FIG. 14 (corresponding to the ninth described herein) Preset derivative mode), B" (corresponding to the twelfth preset derivative mode described herein), E" (corresponding to the tenth preset derivative mode described herein), and F" (corresponding to the eleventh described herein) The preset derivative mode shown by the preset derivative mode).
  • Each of the preset derivative modes in the candidate derivative mode set uses a fixed length code identifier, for example, 2 bits, so that the decoding method provided by the present application can identify the image block by using a simple identifier compared to the prior art.
  • the division effectively improves the decoding efficiency.
  • the feature parameter of the derived image block is greater than the feature parameter of each of the N sub-image blocks, the feature parameter being at least one of height and width.
  • the video decoder divides the current image block to be decoded into N sub-image blocks according to a basic division manner.
  • the video decoder divides the current image block to be decoded into four sub-image blocks by using the division method shown in FIG. 12 described above. If the basic division mode is a vertical quarter, the video decoder divides the current image block to be decoded into 4 sub-image blocks by using the division method as shown in FIG. 13 described above. If the basic division mode is horizontal and vertical quarters, the video decoder divides the current image block to be decoded into four sub-image blocks by using the division method as shown in FIG. 14 described above.
  • the video decoder derives at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block according to a derivative manner of the target derived mode indication.
  • the video decoder decodes the first derivative image block.
  • the video decoder performs decoding and reconstruction on the first derivative image block to obtain a reconstructed image block.
  • the video decoder regards the first derivative image block as the current image block to be decoded, and re-executes the above S111-S114 until the re-obtained first derivative image block is no longer used. Until the division.
  • the video decoder in the present application determines a specific division manner of the current image block to be decoded according to the basic division manner and the target derivative mode.
  • the combination of the division mode and the derivative mode identifies a plurality of different division results.
  • the image block is enriched and can be adapted to video images of various texture characteristics.
  • the video decoder in the present application may also determine the target derivative mode only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold.
  • the above S111 may be replaced with S111a to S111c.
  • the video decoder decodes the obtained code stream, determines a basic division manner of the current image block to be decoded, and a feature parameter of the current image block to be decoded.
  • the feature parameter of the current image block to be decoded refers to the height of the current image block to be decoded and the width of the current image block to be decoded.
  • the video decoder parses the code stream, and directly determines the feature parameters of the current image block to be decoded.
  • the video decoder determines whether a feature parameter of the current image block to be decoded is less than or equal to a first preset threshold.
  • the video decoder performs S111c.
  • the video decoder regards the sub-image block of the current image block to be decoded as the current image block to be decoded, and re-executes S111a.
  • the video decoder parses the code stream, and determines a target derivative mode.
  • the video decoder may perform S112 first, then S111b, or S111b may be performed first, then S112 may be performed, and S112 and S111b may be simultaneously performed. Specifically limited.
  • the video decoder determines the target derivative mode only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, and therefore, the feature parameter is greater than the first preset.
  • the code stream may only include the division identifier of the image block, but does not include the derivative identifier of the image block, which effectively reduces the transmission resource occupied by the code stream.
  • the code stream may also include a derivative identifier of the image block, and the derived identifier of the image block is used to indicate that the sub-image block in the image block is not derivatized.
  • the video decoder determines the target derivative mode only when the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, and effectively improves the decoding rate.
  • the embodiment of the present application further provides an encoding method, which can be applied to the video codec system shown in FIG. 7.
  • FIG. 15A is a schematic flowchart of a coding method in an embodiment of the present application. The flow shown in FIG. 15A is exemplified by the video encoder 702 shown in FIG. 8 as an execution subject.
  • the coding method provided by the embodiment of the present application includes:
  • the video encoder determines an image block to be currently encoded.
  • the image block to be encoded may be a CTU or a CU, which is not specifically limited in this embodiment of the present application.
  • the current image block to be encoded may be an image block 170, a sub-image block in the image block 173, an image block 174, or a sub-block in the image block 171.
  • the image block is not specifically limited in this embodiment of the present application.
  • the video encoder determines a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded.
  • the video encoder determines at least two candidate partitioning modes (horizontal N, vertical N, horizontal and vertical N, and no partition) corresponding to the current image to be encoded, and calculates at least two types.
  • the rate-distortion cost of each of the candidate partitioning modes so that the video encoder determines the candidate partitioning mode corresponding to the smallest rate-distortion cost as the basic partitioning mode.
  • the video encoder calculates a rate distortion cost of each of the preset derivative modes in the candidate derivative mode set corresponding to the basic partition mode, and determines a preset derivative mode corresponding to the minimum rate distortion cost as the target derivative mode.
  • the basic division mode of the current image block to be encoded and the target derivative mode of the sub image block in the current image block to be encoded may be referred to the description in the embodiment described above with reference to FIG. 11A. The difference is that the above-mentioned FIG. 11A is described for the current image block to be decoded, and the embodiment is described for the current image block to be encoded.
  • the video encoder determines at least two candidate partitioning modes (horizontal N, vertical N, horizontal, and non-divided) corresponding to the current image block to be encoded, and subsequently, for each A candidate division mode, where the video encoder derivates at least two adjacent sub-image blocks by using each of the preset derivation modes, so that the video encoder can be calculated in each candidate division mode.
  • the rate distortion cost of each of the preset derivation modes is determined, and the division mode corresponding to the minimum rate distortion cost is determined as the basic division mode, and the derivative mode corresponding to the minimum rate distortion cost is determined as the target derivation mode.
  • the video encoder divides the current image block to be encoded into N sub-image blocks according to a basic division manner.
  • the video encoder derives at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block according to a derivative manner of the target derived mode indication.
  • the video encoder If the video encoder does not divide the first derived image block, the video encoder encodes the first derived image block to obtain a code stream.
  • the syntax element of the code stream includes a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, and the division identifier of the current image block to be encoded is used to indicate a basic division manner of the image block to be currently encoded.
  • the derived identifier of the current image block to be encoded is used to indicate a target derivative mode of the sub-image block in the current image block to be encoded.
  • the division identifier of the current image block to be encoded is represented by a variable length code, for example, a binary truncation code or an exponential Golomb code.
  • the derived identifier of the current image block to be encoded is represented by a fixed length code.
  • the split identifier of the current image block to be encoded and the derived identifier of the current image block to be encoded may be independent flags.
  • the split identifier of the current image block to be encoded is represented by SplitFlag
  • the derivative identifier of the current image block to be coded is DeriveFlag. Said.
  • the division identifier of the current image block to be encoded and the derivative identifier of the current image block to be encoded may also be a part of the same identifier, for example, if the derivative identifier of the current image block to be encoded is represented by a fixed length code of length x
  • the code stream includes flag1 corresponding to the current image block to be encoded, and the last x bit of the flag1 is a derivative identifier of the current image block to be encoded, and the remaining bits of the flag1 except the last x bit are the division identifier of the current image block to be encoded.
  • the video encoder determines the derived image block as the current image block to be encoded, and re-executes S151-S154 until it is re-determined.
  • the first derivative image block is divided.
  • the method for determining the basic division mode and the target derivative mode by the video encoder in the embodiment of the present application can be implemented by S161 to S166, that is, the above S151 can be replaced with S161 to S166.
  • S161 ⁇ S166 are specifically:
  • the video encoder divides the current image block to be encoded by using at least two candidate division manners.
  • Candidate division methods include horizontal N points, vertical N points, horizontal vertical N points, and no division.
  • the video encoder may adopt level four.
  • the image block 170 is divided into four, and four rectangular sub-image blocks having a width equal to the width of the image block 170 and a height of 1/4 of the height of the image block 170 are generated, and FIG. 17A uses 171 to represent the image block of the structure.
  • the video encoder may also divide the image block 170 by vertical quadrants to generate four rectangular sub-image blocks having a height equal to the height of the image block 170 and a width of 1/4 of the width of the image block 170, and FIG. 17A indicates the structure by 172.
  • the video encoder may also divide the image block 170 by horizontal and vertical divisions to generate four square sub-image blocks having a height of 1/2 of the height of the image block 170 and a width of 1/2 of the width of the image block 170, which is adopted in FIG. 17A.
  • 173 denotes an image block of the structure.
  • the video encoder may also not divide the current coded image block 170, and the undivided image block is represented by 174 in FIG. 17A.
  • the horizontal four-point is identified by 100
  • the vertical four-point is identified by 101
  • the horizontal and vertical four-points are identified by 110, and the zero mark is not divided.
  • the horizontal four-points may be identified by using 110, the vertical four-points are identified by 101, and the horizontal and vertical four-points are identified by using 101, and the zero-marking is not used.
  • the embodiment of the present application does not specifically limit this. .
  • the video encoder may adopt horizontal dichotomy.
  • the sub-image block in the image block 171 generates two rectangular sub-image blocks having a width equal to the width of the sub-image block in the image block 171 and a height equal to 1/2 of the height of the sub-graphic block in the image block 171, and FIG. 19 is adopted.
  • 175 denotes an image block of the structure.
  • the video encoder may also divide the sub-image blocks in the image block 171 by vertical bipartite division, and generate two heights equal to the height of the sub-image block in the image block 171, and the width is 1/2 of the width of the sub-image block in the image block 171.
  • a rectangular sub-image block, Figure 19 uses 176 to represent an image block of the structure.
  • the video encoder may also not divide the sub-image blocks in image block 171, and the un-divided image blocks are represented by 177 in FIG.
  • the video encoder may adopt a horizontal level. Dividing the sub-image blocks in the image block 171 to generate four rectangular sub-image blocks having a width equal to the width of the sub-image block in the image block 171 and a height equal to 1/4 of the height of the sub-graphic block in the image block 171, Figure 20 shows an image block of the structure using 175'.
  • the video encoder may also divide the sub-image blocks in the image block 171 by vertical quadrants to generate four heights equal to the height of the sub-image blocks in the image block 171, and the width is 1/4 of the width of the sub-image block in the image block 171.
  • the rectangular sub-image block, Figure 20 uses 176' to represent the image block of the structure.
  • the video encoder may also not divide the sub-image blocks in the image block 171, and the undivided image block 20 is represented by 177'.
  • the candidate division mode indirectly reflects the division level, so that the video encoder may divide the current image block to be coded by using a corresponding division manner on the preset division level according to the candidate division manner.
  • the video encoder divides the image block 170 in a horizontal and vertical division manner at the first level, generates an image block 173, or does not divide the image block 170.
  • the video encoder may or may not divide the image block 170 at the second level.
  • the video encoder may divide the image block 170 by horizontal quadrant division to generate the image block 171, or divide the image block 170 by vertical quadrant division.
  • a graphics block 172 is generated.
  • Fig. 17B the division manner shown by the 011 identification image block 171 is adopted, and the division manner shown by the 010 identification image block 172 is adopted, and the division manner shown by the 1 identification image block 173 is employed.
  • the numerical value of the division mark in Fig. 17B is just an example.
  • the division manner shown by the 1 identification image block 171 may be employed, and the division manner shown by the 010 identification image block 172 is employed, and the division manner shown by the image block 173 is indicated by the 011 flag.
  • the video encoder may divide the current image block to be encoded by using a bifurcation/four-fork division method when the current image block to be encoded satisfies a preset condition.
  • the image block 171 has a width of M1 and a height of H1.
  • the video encoder divides the image block 171 by a bifurcation/quadruple division; or, if M1 ⁇ H1 is smaller than X2 ⁇ Y2, the video encoder divides the image block 171 by a bifurcation/quadruple division method; or, if M1 ⁇ H1 is larger than X1 ⁇ Y1 and smaller than X2 ⁇ Y2, the video encoder adopts bifurcation/quad
  • the image block 171 is divided by the cross division method.
  • X1, Y1, X2 and Y2 are all positive integers.
  • the video encoder calculates a rate-distortion cost for each candidate partitioning manner, and determines a candidate partitioning manner corresponding to the minimum rate-distortion cost as the basic partitioning manner.
  • the video encoder derivates the sub-image block obtained by dividing the basic division manner according to each preset derivation mode in the candidate derivative mode set.
  • the video encoder can adopt the eight preset derivative modes (A, B, C, D, shown in FIG. 12 above). E, F, G, and H) respectively deriving at least two adjacent sub-image blocks in 171, and correspondingly, the image blocks processed by using the above eight preset derivation patterns are respectively represented as 401, 402, 403, and 404. , 405, 406, 407, 408.
  • the video encoder can adopt the eight preset derivative modes (A', B', C' shown in FIG. 13 above. , D′, E′, F′, G′, H′) respectively deriving at least two adjacent sub-image blocks in 172, and correspondingly, the image blocks processed by using the above eight preset derivation modes respectively represent It is 501, 502, 503, 504, 505, 506, 507, 508.
  • the video encoder can adopt the eight preset derivative modes (A′′, B′′, C shown in FIG. 14 above. ", D”, E”, F", G”, H") respectively deriving at least two adjacent sub-image blocks in 173, and correspondingly, the image blocks processed by using the above eight preset derivation patterns respectively Expressed as 601, 602, 603, 604, 605, 606, 607, 608.
  • the method of identifying the image block processed by the preset derivative mode may be determined according to the state of the dividing line.
  • the dividing line is represented by “0”; if a dividing line is reserved, the dividing line is represented by “1”; according to the removal and retention of the dividing line in the image block, Identifies the image block.
  • the image block 171 includes a first dividing line, a second dividing line, and a third dividing line (the representation of the dividing line may refer to FIG. 12 above), if the first dividing line is removed, the second dividing line and the third dividing line Reserved, that is, the first sub-image block and the second sub-image block are combined to generate an image block 401, and the image block 401 can be represented by 011.
  • the image block 172 includes a first dividing line, a second dividing line, and a third dividing line (the representation of the dividing line can refer to FIG. 13 above), and if the second dividing line is removed, the first dividing line and the third dividing line are retained.
  • the image block 173 includes a first dividing line, a second dividing line, a third dividing line, and a fourth dividing line (the representation of the dividing line can be referred to FIG. 14 above), if the first dividing line is removed, the second dividing line, and the third dividing line
  • the line and the fourth dividing line are reserved, that is, the first sub-image block and the second sub-image block are combined to generate an image block 601, and the image block 601 may be represented by 0111.
  • the identification methods of other image blocks are similar, and will not be repeated here.
  • identification of the image block may also adopt a different method from that of FIG. 18, which is not specifically limited in this embodiment of the present application.
  • the video encoder may select a part of the eight preset derivative modes corresponding to the division mode shown in FIG. 18 as the focus mode (the image block generated by the derivative mode) Further division is required) or the deletion mode (regardless of the derivative mode), and the remainder is used as the normal mode (the mode in which the video encoder performs derivation processing).
  • the set of candidate derived patterns may include only normal patterns.
  • the normal mode may include the preset derivative modes shown by B, C, D, and F in FIG. 12 above, that is, the video encoder generates image blocks 402, 403, and 404. 406.
  • the normal mode may include the preset derivative modes shown by B', D', E', and G' in FIG. 13 above, that is, the video encoder generates image blocks 502, 504, and 505. 507.
  • the normal mode may include the preset derivative modes shown by A′′, B′′, E′′, and F′′ in FIG. 14 above, that is, the video encoder generates image blocks 601 and 602, 605, 606.
  • the embodiment of the present application may adopt a bit identifier of a preset length, such as a 2-bit identifier.
  • the image block 608 and the image block 173 have the same shape. Therefore, if the preset derivative mode corresponding to the image block 608 is the focus mode, the mode can be identified by the flag bit "1" of the image block 173. Compared to the identification bit "1111" of the image block 608, the number of bits of the identification bit "1" is less. If the video encoder determines that the derived mode shown by image block 608 is a target derived mode, the video encoder may directly use 1 to indicate the derived mode of the target derived mode for image block 608 after the last bit of the divided identification.
  • the derived image blocks in the embodiments of the present application may employ a smaller number of bit identifiers.
  • the coding method provided by the present application can identify the division of image blocks by using simple identification, and effectively improve coding efficiency.
  • the video encoder calculates a rate distortion cost of each of the preset derivative modes in the candidate derivative mode set corresponding to the basic partition mode.
  • the video encoder determines the preset derivative mode corresponding to the minimum rate distortion cost as the target derivative mode.
  • the video encoder regards the first derivative image block as the current image block to be encoded, and re-executes S161-S165 to determine the basic division manner and Target derivative model.
  • the video codec in the present application may also determine the target derivative mode only if the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold.
  • the above S151 may be replaced with S151a to S151c.
  • the video encoder determines a basic division manner of the current image block to be encoded and a feature parameter of the current image block to be encoded.
  • the feature parameter of the current image block to be encoded refers to the height of the current image block to be encoded and the width of the current image block to be encoded.
  • the video encoder determines whether a feature parameter of the current image block to be encoded is less than or equal to a first preset threshold.
  • the video encoder performs S151c.
  • the video encoder regards the sub-image block of the current image block to be encoded as the current image block to be encoded, that is, re-executes S150. For example, in FIG. 21, if the current image block to be encoded is the image block 210, the size of the image block 210 is 64 ⁇ 64, and the first preset threshold is 32 ⁇ 32, the video encoder determines that the basic division mode of the image block 210 is After horizontally dividing the image block 210, the image block 212 is generated.
  • the video encoder uses the sub-image block in the image block 212 as the current image block to be encoded. And re-determining the basic division manner of the sub-image block of the image block 212.
  • the video encoder determines the target derivative mode.
  • the video encoder may perform S152 first, then S151b, or S151b may be performed first, then S152 may be performed, and S152 and S151b may be simultaneously performed. Specifically limited.
  • the video encoder only determines the target derivative mode if the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, and therefore, for the image whose feature parameter is greater than the first preset threshold.
  • the code stream may include only the partition identifier of the image block, and the derivative identifier of the image block is not included, which effectively reduces the transmission resource occupied by the code stream.
  • the code stream may also include a derivative identifier of the image block, and the derived identifier of the image block is used to indicate that the sub-image block in the image block is not derivatized.
  • the video encoder determines the target derivative mode only when the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, and effectively increases the encoding rate. In practical applications, the flow shown in Figure 15B is easier to implement.
  • FIG. Figure 21 illustrates the partitioning of square image blocks and the derivation of sub-image blocks in a square image block using the methods provided herein, as well as the partitioning of non-square image blocks and the derivation of sub-image blocks in non-square image blocks.
  • the video encoder divides the image block 210, and the image block 210 may be divided by the horizontal vertical quadrant division method at the first level, and the image block 211 may be generated or may not be divided. Under the branch without division, the video encoder may divide the image block 210 by a bifurcation division method at the second level; or may divide the four-fork/non-division division manner. In the branch of the second layer that divides the image block 210 by the bifurcation division mode, the video encoder may specifically divide the image block 210 by the horizontal binary division method to generate the image block 212; or divide the image block by the vertical binary division method. 210. Generate an image block 213.
  • the video encoder may divide the sub-image block of the image block 212 by using a bifurcation division manner, and may also divide the sub-image block of the image block 212 by a four-fork division method.
  • the video encoder may divide the sub-image block of the image block 212 into a horizontal quadrant division manner to generate an image block 219, or a video encoder may divide the sub-image block of the image block 212 by a four-division division method.
  • the sub-image blocks of the image block 212 are divided by a vertical division method to generate an image block 220.
  • the video encoder may divide the image block 210 by horizontal quadrant division to generate the image block 214, or may adopt the vertical quadrant division mode.
  • the image block 210 is divided to generate an image block 215.
  • the image block 219 and the image block 220 are non-square image blocks, and the image blocks obtained by deriving the at least two adjacent sub-image blocks in the image block 219 are respectively represented as 221 by using four preset derivation modes. 222, 223, 233; image blocks obtained by deriving at least two adjacent sub-image blocks in the image block 220 by using four preset derivation modes are respectively represented as 224, 225, 226, 234.
  • the image block 214 and the image block 215 are square image blocks, and the image blocks obtained by deriving the at least two adjacent sub-image blocks in the image block 214 by using four preset derivation modes are respectively represented as 227, 228, 228, 235. Image blocks obtained by deriving at least two adjacent sub-image blocks in the image block 215 by using four preset derivation modes are respectively represented as 230, 231, 232, and 236.
  • the image block 212 is identified by "011". If the basic division mode of the sub-image block of the image block 212 is horizontal four-division and the image block 219 is generated, the basic division mode may be identified by "011111", if the sub-image of the image block 212 The feature parameter of the block is less than or equal to the first preset threshold, and the video encoder may determine one of the four preset derivative modes corresponding to the image block 219 shown in FIG. 21 as the target derivative mode. Since the shape of the image block 233 is the same as that of the image block 219, the derivative mode represented by the image block 233 can be directly identified by 1 , and the remaining 3 preset derivative modes can be identified by a value different from 1 (such as 0), the image block.
  • the logos of 221, 222, and 223 start with 0.
  • the video encoder can directly add 1 after the identifier "011111" of the basic division mode, that is, form the identifier "0111111”.
  • the video decoder parses the code stream, and after obtaining the identifier "0111111", it can be determined that the derivation is not performed after the image block 219.
  • the video encoder adopts the derivative mode shown by the image block 223 as the target derivative mode
  • the video encoder adds 011 after the identifier "011111” of the basic division mode, that is, the identifier "011111011” is formed.
  • the video decoder parses the code stream, and after obtaining the identifier “011111011”, it may determine that the target derivative mode is the derivative mode shown by the image block 223.
  • the video encoder also processes the image blocks 214, 215, 220 in a similar manner.
  • the division mode shown in FIG. 21 is implemented on the basis of the existing QTBT division mode. Therefore, in practical applications, the division mode is relatively easy to implement.
  • the video encoder in the present application identifies a plurality of different division results by combining the division mode and the derivative mode, enriches the division manner of the image block, and can adapt to video images of various texture characteristics.
  • the embodiment of the present application provides a decoding apparatus, which may be a video decoder.
  • the decoding device is configured to perform the steps performed by the video decoder in the above decoding method.
  • the decoding apparatus provided in this embodiment of the present application may include a module corresponding to the corresponding step.
  • the embodiment of the present application may divide the function module into the decoding 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. 22 shows a possible structural diagram of the decoding device involved in the above embodiment.
  • the decoding device 22 includes a parsing unit 220, a dividing unit 221, a deriving unit 222, a decoding unit 223, and a judging unit 224.
  • the parsing unit 220 is configured to support the decoding apparatus to perform S111 and the like in the above embodiments, and/or other processes for the techniques described herein.
  • the dividing unit 221 is for supporting the decoding apparatus to execute S112 and the like in the above embodiments, and/or other processes for the techniques described herein.
  • the derivation unit 222 is for supporting the decoding apparatus to perform S113 and the like in the above embodiments, and/or other processes for the techniques described herein.
  • the decoding unit 223 is for supporting the decoding apparatus to perform S114 and the like in the above embodiments, and/or other processes for the techniques described herein.
  • the judging unit 224 is configured to instruct the decoding apparatus to execute S111b and the like in the above embodiment, and/or other processes for the techniques described herein.
  • 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 unit 225.
  • the storage unit 225 can be used to store program codes and data of the decoding device.
  • the decoding device 23 includes a processing module 230 and a communication module 231.
  • the processing module 230 is configured to perform control management on the actions of the decoding device, for example, perform the steps performed by the parsing unit 220, the dividing unit 221, the deriving unit 222, the decoding unit 223, and the determining unit 224, and/or for performing the description herein. Other processes of technology.
  • the communication module 231 is used to support interaction between the decoding device and other devices.
  • the decoding apparatus may further include a storage module 232 for storing program codes and data of the decoding apparatus, for example, storing the content held by the storage unit 225.
  • the processing module 230 can be a processor or a controller, such as a central processing unit (CPU), a general purpose processor, a digital signal processor (DSP), an ASIC, an FPGA, or other programmable Logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 231 can be a transceiver, an RF circuit or a communication interface, or the like.
  • the storage module 232 can be a memory.
  • Both the decoding device 22 and the decoding device 23 can perform the above-described decoding method shown in FIG. 11A or FIG. 11B.
  • the decoding device 22 and the decoding device 23 can be specifically a video decoding device or other device having a video encoding and decoding function.
  • the application also provides a decoding device, the decoding device comprising: one or more processors, a memory, a communication interface.
  • the memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, and the computer program code includes instructions that, when executed by one or more processors, perform a decoding method of an embodiment of the present application.
  • the decoding devices herein may be video display devices, smart phones, portable computers, and other devices that can process video or play video.
  • the present application also provides a video decoder including a nonvolatile storage medium, and a central processing unit, the nonvolatile storage medium storing an executable program, the central processing unit and the nonvolatile storage The medium is connected, and the executable program is executed to implement the decoding method of the embodiment of the present application.
  • the present application also provides a decoder, which includes the decoding device (the decoding device 22 and the decoding device 23) and the reconstruction module in the embodiment of the present application, wherein the reconstruction module is used according to the decoding device.
  • the prediction map pixel determines the reconstructed pixel value of the current image block.
  • Another embodiment of the present application also provides a computer readable storage medium comprising one or more program codes, the one or more programs comprising instructions when a processor in a decoding device is executing the program At the time of the code, the decoding device performs the decoding method as shown in FIG. 11A or FIG. 11B.
  • a computer program product comprising computer executed instructions stored in a computer readable storage medium; at least one processor of the decoding device is readable from a computer
  • the readable storage medium reads the computer execution instructions, and the at least one processor executes the computer to execute the instructions such that the terminal implements the step of executing the video decoder in the decoding method illustrated in FIG. 11A or FIG. 11B.
  • An embodiment of the present application provides an encoding apparatus, which may be a video encoder.
  • the encoding device is configured to perform the steps performed by the video encoder in the above encoding method.
  • the encoding 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 divide the functional modules of the encoding device according to the foregoing method example.
  • each functional 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. 24 shows a possible structural diagram of the encoding apparatus involved in the above embodiment.
  • the encoding device 24 includes a determining unit 240, a dividing unit 241, a deriving unit 242, an encoding unit 243, and a judging unit 244.
  • the determining unit 240 is configured to support the encoding apparatus to perform S150, S151, S161, S162, S163, S164, S165, etc. in the above embodiments, and/or other processes for the techniques described herein.
  • the dividing unit 241 is for supporting the encoding apparatus to execute S152 and the like in the above embodiments, and/or other processes for the techniques described herein.
  • the derivation unit 242 is for supporting the encoding apparatus to perform S153 and the like in the above embodiments, and/or other processes for the techniques described herein.
  • the encoding unit 243 is for supporting the encoding apparatus to execute S154 and the like in the above embodiments, and/or other processes for the techniques described herein.
  • the judging unit 244 is for supporting the encoding apparatus to execute S151b and the like in the above embodiment, and/or other processes for the techniques described herein.
  • the encoding device provided by the embodiment of the present application includes, but is not limited to, the foregoing module.
  • the encoding device may further include a storage unit 245.
  • the storage unit 245 can be used to store program codes and data of the encoding device.
  • FIG. 25 A schematic structural diagram of an encoding apparatus provided by an embodiment of the present application is shown in FIG. 25 in the case of an integrated unit.
  • the encoding device 25 includes a processing module 250 and a communication module 251.
  • the processing module 250 is configured to perform control management on the actions of the encoding device, for example, perform the steps performed by the determining unit 240, the dividing unit 241, the deriving unit 242, the encoding unit 243, and the determining unit 244, and/or for performing the description herein. Other processes of technology.
  • the communication module 251 is used to support interaction between the encoding device and other devices.
  • the encoding device may further include a storage module 252 for storing program code and data of the encoding device, for example, storing the content held by the storage unit 245.
  • the processing module 250 can be a processor or a controller, such as a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 251 can be a transceiver, an RF circuit, a communication interface, or the like.
  • the storage module 252 can be a memory.
  • Both the encoding device 24 and the encoding device 25 described above can perform the above-described encoding method shown in FIG. 15A or FIG. 15B.
  • the encoding device 24 and the encoding device 25 can be specifically a video encoding device or other device having a video encoding function.
  • the application also provides an encoding device comprising: one or more processors, a memory, a communication interface.
  • the memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, and the computer program code includes instructions that, when executed by one or more processors, perform an encoding method of an embodiment of the present application.
  • the encoding device here can be a video display device, a smart phone, a portable computer, and other devices that can process video or play video.
  • the present application also provides a video encoder, including a non-volatile storage medium, and a central processing unit, the non-volatile storage medium storing an executable program, the central processing unit and the non-volatile storage The medium is connected, and the executable program is executed to implement the encoding method of the embodiment of the present application.
  • the present application also provides an encoder including the encoding device (encoding device 24 and encoding device 25) in the embodiment of the present application.
  • Another embodiment of the present application also provides a computer readable storage medium including one or more program codes, the one or more programs including instructions, when a processor in an encoding device is executing the program At the time of the code, the encoding device executes the encoding method as shown in Fig. 15A or Fig. 15B.
  • a computer program product comprising computer executed instructions stored in a computer readable storage medium; at least one processor of the encoding device can be from a computer
  • the readable storage medium reads the computer execution instructions, and the at least one processor executes the computer to execute the instructions such that the terminal implements the step of executing the video encoder in the encoding method illustrated in FIG. 15A or FIG. 15B.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • 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.
  • 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 video coding, decoding and compression. Disclosed in the embodiments of the present application are coding and decoding methods and devices, for use in solving the problem in an existing division mode of being unable to satisfy relatively complex texture requirements. The decoding method specifically comprises: parsing a code stream, and determining a basic division mode of a current image block to be decoded and a target derivative mode of a sub-image block in the current image block to be decoded; dividing the current image block to be decoded into N sub-image blocks according to the target derivative mode, N being an integer greater than or equal to 2; deriving at least two adjacent sub-image blocks in the N sub-image blocks into a derivative image block according to the target derivative mode; and decoding the derivative image block.

Description

一种编解码方法及装置Codec method and device
本申请要求于2018年05月16日提交国家知识产权局、申请号为201810470411.5、发明名称为“视频编解码方法及装置”的中国专利申请,以及于2018年06月07日提交国家知识产权局、申请号为201810581662.0、发明名称为“一种编解码方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the State Intellectual Property Office on May 16, 2018, the application number is 201810470411.5, the Chinese patent application whose invention name is "video codec method and device", and submitted to the State Intellectual Property Office on June 7, 2018. The priority of the Chinese Patent Application No. 201100581662.0, entitled "A Codec Method and Apparatus", the entire disclosure of which is incorporated herein by reference.
技术领域Technical field
本申请实施例涉及视频编解码及压缩领域,尤其涉及一种编解码方法及装置。The embodiments of the present invention relate to the field of video encoding and decoding and compression, and in particular, to a codec method and apparatus.
背景技术Background technique
视频编解码的基本处理单位是图像块,图像块是编码端将一帧/幅图像进行划分得到的。图像块划分的精细程度及多样性在一定程度上影响着图像的纹理及轮廓特点。The basic processing unit of video codec is an image block, which is obtained by dividing a frame/image by the encoding end. The fineness and diversity of image block division affect the texture and contour features of the image to some extent.
目前,图像块的划分方式包括四叉树二叉树(QuadTree plus Binary Tree,QTBT)划分方式、三叉树(Triple Tree,TT)划分方式以及任意二叉树(Asymmetric Binary Tree,ABT)划分方式等。其中,QTBT划分方式为:按照四叉树(Quad-Tree,QT)划分方式将编码树单元(Coding Tree Unit,CTU)划分为四个子图像块,对于需要进一步划分的子图像块而言,再按照QT/二叉树(Binary Tree,BT)划分方式将该子图像块进行划分。这种划分方式,图像块只能被划分为多个中心对应的子图像块。TT划分方式为:将某一图像块水平划分为中心对称或非中心对称的三个子图像块,或者将某一图像块垂直划分为中心对称或非中心对称的三个子图像块。ABT划分方式为:将某一图像块水平划分为中心对称或非中心对称的两个子图像块,或者将某一图像块垂直划分为中心对称或非中心对称的两个子图像块。At present, the image block division method includes a QuadTree plus Binary Tree (QTBT) division method, a Triple Tree (TT) division method, and an Asymmetric Binary Tree (ABT) division manner. The QTBT division method is: dividing a coding tree unit (CTU) into four sub-image blocks according to a Quad-Tree (QT) division manner, and for a sub-image block that needs further division, The sub-image block is divided according to a QT/Binary Tree (BT) division manner. In this division mode, an image block can only be divided into a plurality of sub-image blocks corresponding to the center. The TT division method is: dividing a certain image block horizontally into three sub-image blocks of central symmetry or non-central symmetry, or vertically dividing an image block into three sub-image blocks of central symmetry or non-central symmetry. The ABT is divided into two sub-image blocks that are horizontally divided into central symmetric or non-central symmetric, or vertically divided into two sub-image blocks that are centrally symmetric or non-centralally symmetric.
TT划分方式和ABT划分方式均可与QTBT划分方式组合使用,但是采用组合的划分方式得到的图像块也无法满足较为复杂的纹理要求。Both the TT partitioning method and the ABT partitioning method can be combined with the QTBT partitioning method, but the image blocks obtained by the combined partitioning method cannot satisfy the more complicated texture requirements.
发明内容Summary of the invention
本申请实施例提供一种编解码方法及装置,能够解决现有的划分方式无法满足较为复杂的纹理要求的问题。The embodiment of the present invention provides a codec method and apparatus, which can solve the problem that the existing division mode cannot meet more complicated texture requirements.
为达到上述目的,本申请实施例采用如下技术方案:To achieve the above objective, the embodiment of the present application adopts the following technical solutions:
第一方面,提供一种解码方法,在得到码流后,解码装置解析该码流,以确定当前待解码图像块的基础划分方式以及当前待解码图像块中子图像块的目标衍生模式;然后,解码装置根据该基础划分方式,将当前待解码图像块划分为N(N为大于或等于2的整数)个子图像块,并根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;最后,解码装置对该第一衍生图像块进行解码。这里,目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,该衍生方式用于将当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数。In a first aspect, a decoding method is provided. After obtaining a code stream, the decoding device parses the code stream to determine a basic division mode of the current image block to be decoded and a target derivative mode of the sub image block in the current image block to be decoded; And the decoding device divides the current image block to be decoded into N (N is an integer greater than or equal to 2) sub-image blocks according to the basic division manner, and at least according to the derivative manner indicated by the target derivative mode, at least N of the N sub-image blocks Two adjacent sub-image blocks are derived as a first derived image block; finally, the decoding device decodes the first derived image block. Here, the target derivation mode is one of the candidate derivation mode sets, and the candidate derivation mode set includes M preset derivation modes, and the preset derivation mode is used to indicate a derivation mode, and the derivation mode is used to determine any of the current image blocks to be decoded. Two adjacent sub-image blocks are derived as one derived image block, and M is an integer greater than or equal to zero.
可以看出,解码装置根据基础划分方式和目标衍生模式确定当前待解码图像块的 具体划分方式。本申请提供的解码方法中,划分方式和衍生模式的结合,标识出了多种不同的划分结果,与现有技术相比,更加丰富了图像块的划分方式,能够适应于各种纹理特性的视频图像,提升压缩视频图像的图像质量,更有效地减少图像块划分的码流负载比特开销,进一步提升压缩效率;能规则化不同的图像块的划分方式,降低不同图像块的划分方式的码流语法复杂性。It can be seen that the decoding apparatus determines the specific division manner of the image block to be decoded according to the basic division manner and the target derivative mode. In the decoding method provided by the present application, the combination of the division mode and the derivative mode identifies a plurality of different division results, and the image block division manner is more enriched than the prior art, and can be adapted to various texture characteristics. The video image improves the image quality of the compressed video image, more effectively reduces the code stream load bit overhead of the image block division, and further improves the compression efficiency; can regularly divide the division manner of different image blocks, and reduce the code of the division manner of different image blocks. Stream grammar complexity.
第二方面,提供一种解码方法,在得到码流后,解码装置解析该码流,以确定当前待解码图像块的基础划分方式以及当前待解码图像块的特征参数(高度和宽度中的至少一个),在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,解码装置再解析码流,以确定当前待解码图像块中子图像块的目标衍生模式;然后,解码装置根据该基础划分方式,将当前待解码图像块划分为N(N为大于或等于2的整数)个子图像块,并根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;最后,解码装置对该第一衍生图像块进行解码。这里,目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,该衍生方式用于将当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数。In a second aspect, a decoding method is provided. After obtaining a code stream, a decoding device parses the code stream to determine a basic division manner of an image block to be decoded and a feature parameter (at least a height and a width of a current image block to be decoded). a), in a case that the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, the decoding device re-analyzes the code stream to determine a target derivative mode of the sub-image block in the current image block to be decoded; The device divides the current image block to be decoded into N (N is an integer greater than or equal to 2) sub-image blocks according to the basic division manner, and at least two of the N sub-image blocks according to the derivative manner indicated by the target derivative mode. The adjacent sub-image block is derived as a first derived image block; finally, the decoding device decodes the first derived image block. Here, the target derivation mode is one of the candidate derivation mode sets, and the candidate derivation mode set includes M preset derivation modes, and the preset derivation mode is used to indicate a derivation mode, and the derivation mode is used to determine any of the current image blocks to be decoded. Two adjacent sub-image blocks are derived as one derived image block, and M is an integer greater than or equal to zero.
解码装置只有在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,才确定当前待解码图像块中子图像块的目标衍生模式。相比于上述第一方面,第二方面中解码装置的解码效率更高。The decoding device determines the target derivative mode of the sub-image block in the current image block to be decoded only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold. Compared to the first aspect described above, the decoding apparatus of the second aspect has higher decoding efficiency.
可选的,在上述第一方面或第二方面的一种可能的实现方式中,上述“解码装置解析码流,确定当前待解码图像块的基础划分方式”的方法为:解码装置从码流中获取当前待解码图像块的划分标识,并根据当前待解码图像块的划分标识确定基础划分方式。相应的,上述“解码装置确定当前待解码图像块的目标衍生模式”的方法为:解码装置从码流中获取当前待解码图像块的衍生标识,并根据当前待解码图像块的衍生标识,确定目标衍生模式。Optionally, in a possible implementation manner of the foregoing first aspect or the second aspect, the method that “the decoding device parses the code stream and determines the basic division manner of the current image block to be decoded” is: the decoding device from the code stream Obtaining a division identifier of the current image block to be decoded, and determining a basic division manner according to the division identifier of the current image block to be decoded. Correspondingly, the method for determining, by the decoding device, the target derivative mode of the current image block to be decoded is: the decoding device acquires the derived identifier of the current image block to be decoded from the code stream, and determines according to the derivative identifier of the current image block to be decoded. Target derivative model.
第三方面,提供一种解码装置,该解码装置包括解析单元、划分单元、衍生单元和解码单元。In a third aspect, a decoding apparatus is provided, the decoding apparatus comprising a parsing unit, a dividing unit, a deriving unit, and a decoding unit.
具体的,上述解析单元,用于解析码流,确定当前待解码图像块的基础划分方式以及当前待解码图像块中子图像块的目标衍生模式,目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,衍生方式用于将当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数。上述划分单元,用于根据上述解析单元确定出的基础划分方式,将当前待解码图像块划分为N个子图像块,N为大于或等于2的整数。上述衍生单元,用于根据上述解析单元确定出的目标衍生模式指示的衍生方式,将上述划分单元得到的N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。上述解码单元,用于对上述衍生单元得到的第一衍生图像块进行解码。Specifically, the parsing unit is configured to parse the code stream, determine a basic division manner of the current image block to be decoded, and a target derivation mode of the sub image block in the current image block to be decoded, and the target derivation mode is one of the candidate derivation mode sets. The candidate derivative mode set includes M preset derivative modes, and the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derivate any two adjacent sub-image blocks in the current image block to be decoded into a derivative image block, M Is an integer greater than or equal to 0. The dividing unit is configured to divide the current image block to be decoded into N sub-image blocks according to the basic division manner determined by the parsing unit, where N is an integer greater than or equal to 2. The above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks obtained by the dividing unit into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the parsing unit. The decoding unit is configured to decode the first derived image block obtained by the derivative unit.
第四方面,提供一种解码装置,该解码装置包括解析单元、判断单元、划分单元、衍生单元和解码单元。In a fourth aspect, a decoding apparatus is provided, the decoding apparatus comprising a parsing unit, a judging unit, a dividing unit, a deriving unit, and a decoding unit.
具体的,上述解析单元,用于解析码流,以确定当前待解码图像块的基础划分方式以及当前待解码图像块的特征参数(宽度和高度中的至少一个)。上述判断单元, 用于判断当前待解码图形块的特征参数是否小于或等于第一预设阈值。上述解析单元,还用于解析码流,以确定当前待解码图像块中子图像块的目标衍生模式,目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,衍生方式用于将所述当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数。上述划分单元,用于根据上述解析单元确定出的基础划分方式,将当前待解码图像块划分为N个子图像块,N为大于或等于2的整数。上述衍生单元,用于根据上述解析单元确定出的目标衍生模式指示的衍生方式,将上述划分单元得到的N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。上述解码单元,用于对上述衍生单元得到的第一衍生图像块进行解码。Specifically, the parsing unit is configured to parse the code stream to determine a basic division manner of the current image block to be decoded and a feature parameter (at least one of width and height) of the current image block to be decoded. The determining unit is configured to determine whether a feature parameter of the current graphics block to be decoded is less than or equal to a first preset threshold. The parsing unit is further configured to parse the code stream to determine a target derivation mode of the sub-image block in the current image block to be decoded, the target derivation mode is one of the candidate derivation mode sets, and the candidate derivation mode set includes M preset derivatives. The mode, the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derivate any two adjacent sub-image blocks in the current image block to be decoded into one derivative image block, where M is an integer greater than or equal to 0. The dividing unit is configured to divide the current image block to be decoded into N sub-image blocks according to the basic division manner determined by the parsing unit, where N is an integer greater than or equal to 2. The above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks obtained by the dividing unit into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the parsing unit. The decoding unit is configured to decode the first derived image block obtained by the derivative unit.
可选的,在上述第三方面或第四方面的一种可能的实现方式中,上述解析单元,具体用于:从码流中获取当前待解码图像块的划分标识;根据当前待解码图像块的划分标识确定基础划分方式;从码流中获取当前待解码图像块的衍生标识;根据当前待解码图像块的衍生标识,确定目标衍生模式。Optionally, in a possible implementation manner of the foregoing third aspect or the fourth aspect, the parsing unit is configured to: obtain, from the code stream, a partition identifier of the current image block to be decoded; and according to the current image block to be decoded. The division identifier determines the basic division manner; the derived identifier of the current image block to be decoded is obtained from the code stream; and the target derivative mode is determined according to the derived identifier of the current image block to be decoded.
第五方面,提供一种解码设备,该解码设备包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处理器执行指令时,解码设备执行如上述第一方面、第二方面或者其任意一种可能的实现方式所述的解码方法。In a fifth aspect, a decoding device is provided, the decoding 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 second The decoding method described in terms of aspect or any of its possible implementations.
第六方面,提供一种视频解码器,包括非易失性存储介质以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现如上述第一方面、第二方面或者其任意一种可能的实现方式所述的解码方法。In a sixth aspect, a video decoder is provided, including a non-volatile storage medium storing a executable program, and a non-volatile storage medium, the non-volatile storage The medium is coupled and the executable program is executed to implement the decoding method as described in the first aspect, the second aspect, or any one of the possible implementations described above.
第七方面,提供一种解码器,所述解码器包括上述第三方面或第四方面中的解码装置以及重建模块,其中,所述重建模块用于根据所述解码装置得到的预测像素确定当前图像块的重建像素值。In a seventh aspect, a decoder is provided, the decoder comprising the decoding apparatus and the reconstruction module in the third aspect or the fourth aspect, wherein the reconstruction module is configured to determine a current according to the predicted pixel obtained by the decoding apparatus The reconstructed pixel value of the image block.
第八方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在上述第三方面或第四方面所述的解码装置上运行时,使得所述解码装置执行如上述第一方面、第二方面或者其任意一种可能的实现方式所述的解码方法。In an eighth aspect, a computer readable storage medium is provided, wherein the computer readable storage medium stores instructions, when the instructions are executed on the decoding device of the third aspect or the fourth aspect, The decoding device performs the decoding method as described in the first aspect, the second aspect, or any of the possible implementations thereof.
第九方面,提供一种包含指令的计算机程序产品,当该计算机程序产品在上述第三方面或第四方面所述的解码装置上运行时,使得所述解码装置执行如上述第一方面、第二方面或者其任意一种可能的实现方式所述的解码方法。A ninth aspect, a computer program product comprising instructions, when the computer program product is run on the decoding device of the above third aspect or the fourth aspect, causing the decoding device to perform the first aspect, A decoding method as described in two aspects or any of its possible implementations.
在本申请中,上述解码装置的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本申请类似,属于本申请权利要求及其等同技术的范围之内。In the present application, the name of the above decoding device is not limited to the device or the function 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.
本申请中第三方面到第九方面及其各种实现方式的具体描述,可以参考第一方面、第二方面及其各种实现方式中的详细描述;并且,第三方面到第九方面及其各种实现方式的有益效果,可以参考第一方面、第二方面或者其各种实现方式中的有益效果分析或此处不再赘述。For a detailed description of the third aspect to the ninth aspect and various implementations thereof, reference may be made to the detailed description in the first aspect, the second aspect, and various implementations thereof; and the third aspect to the ninth aspect and For the beneficial effects of the various implementations, reference may be made to the benefit analysis in the first aspect, the second aspect, or various implementations thereof, or the details are not described herein.
第十方面,提供一种编码方法,首先,编码装置确定当前待编码图像块的基础划 分方式以及当前待编码图像块中子图像块的目标衍生模式,目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,衍生方式用于将当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;然后,该编码装置根据基础划分方式,将当前待编码图像块划分为N(N为大于或等于2的整数)个子图像块,并根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;在对第一衍生图像块不划分的情况下,编码装置对衍生图像块进行编码,得到码流,该码流包括当前待编码图像块的划分标识和当前待编码图像块的衍生标识,当前待编码图像块的划分标识用于指示基础划分方式,当前待编码图像块的衍生标识用于指示目标衍生模式。A tenth aspect provides an encoding method. First, an encoding apparatus determines a basic division manner of a current image block to be encoded and a target derivative mode of a sub image block in an image block to be currently encoded, and the target derivative mode is one of the candidate derivative mode sets. The candidate derivative mode set includes M preset derivative modes, and the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derive any two adjacent sub-image blocks in the current image block to be coded into a derivative image block. M is an integer greater than or equal to 0; then, the encoding apparatus divides the current image block to be encoded into N (N is an integer greater than or equal to 2) sub-image blocks according to the basic division manner, and derives according to the target derivative mode indication. In a manner, at least two adjacent sub-image blocks of the N sub-image blocks are derived as a first derived image block; in a case where the first derivation image block is not divided, the encoding device encodes the derived image block to obtain a code stream. The code stream includes a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, and the current image block to be encoded The division identifier is used to indicate a basic division manner, and the derived identifier of the current image block to be encoded is used to indicate the target derivative mode.
编码装置通过划分方式和衍生模式的结合,标识出多种不同的划分结果,丰富了图像块的划分方式,能够适应于各种纹理特性的视频图像,能够提升压缩视频图像的图像质量;能更有效地减少图像块划分的码流负载比特开销,进一步提升压缩效率;能规则化不同的图像块的划分方式,降低不同图像块的划分方式的码流语法复杂性。The coding device combines the division mode and the derivative mode to identify a plurality of different division results, enriches the division manner of the image block, can adapt to the video images of various texture characteristics, and can improve the image quality of the compressed video image; The code stream load bit overhead of the image block division is effectively reduced, and the compression efficiency is further improved; the division manner of different image blocks can be regularized, and the code stream syntax complexity of the division manner of different image blocks is reduced.
第十一方面,提供一种编码方法,首先,编码装置确定当前待编码图像块的基础划分方式以及当前待编码图像块的特征参数(宽度和高度中的至少一个),并在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,确定当前待编码图像块中子图像块的目标衍生模式,该目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,衍生方式用于将当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;然后,该编码装置根据基础划分方式,将当前待编码图像块划分为N(N为大于或等于2的整数)个子图像块,并根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;在对第一衍生图像块不划分的情况下,编码装置对衍生图像块进行编码,得到码流,该码流包括当前待编码图像块的划分标识和当前待编码图像块的衍生标识,当前待编码图像块的划分标识用于指示基础划分方式,当前待编码图像块的衍生标识用于指示目标衍生模式。In an eleventh aspect, an encoding method is provided. First, an encoding apparatus determines a basic division manner of an image block to be currently encoded and a feature parameter (at least one of width and height) of an image block to be currently encoded, and is currently in an image to be encoded. If the feature parameter of the block is less than or equal to the first preset threshold, determining a target derivative mode of the sub image block in the current image block to be encoded, the target derivative mode is one of the candidate derivative mode sets, and the candidate derivative mode set includes M preset derivation mode, the preset derivation mode is used to indicate a derivative mode, and the derivation mode is used to derivate any two adjacent sub-image blocks in the current image block to be derived into a derivative image block, where M is greater than or equal to 0. An integer; then, the encoding apparatus divides the current image block to be encoded into N (N is an integer greater than or equal to 2) sub-image blocks according to a basic division manner, and sets N sub-image blocks according to a derivative manner indicated by the target derivative mode. At least two adjacent sub-image blocks in the derivation are derived as a first derivation image block; in the case of not dividing the first derivation image block, The device encodes the derived image block to obtain a code stream, where the code stream includes a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be coded, and the division identifier of the current image block to be coded is used to indicate the basic division mode, and the current The derived identifier of the image block to be encoded is used to indicate the target derived mode.
编码装置只有在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,才确定当前待编码图像块中子图像块的目标衍生模式。相比于上述第十方面,第十一方面中编码装置的编码效率更高。The encoding device determines the target derivative mode of the sub-image block in the current image block to be encoded only if the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold. Compared with the above tenth aspect, the coding apparatus of the eleventh aspect has higher coding efficiency.
可选的,在上述第十方面或第十一方面的一种可能的实现方式中,上述“编码装置确定当前待编码图像块的基础划分方式”的方法为:编码装置确定与当前待编码图像对应的至少两种候选划分方式,并计算至少两种候选划分方式中的每种候选划分方式的率失真代价,这样,该编码装置将最小的率失真代价对应的候选划分方式确定为基础划分方式。上述“编码装置确定当前待编码图像块的目标衍生模式”的方法为:编码装置计算候选衍生模式集合中的每种预设衍生模式的率失真代价,并将最小的率失真代价对应的预设衍生模式确定为目标衍生模式,候选衍生模式集合包括M种预设衍生模式,当基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当基础划分方式为水平N分或垂直N分时,
Figure PCTCN2019087316-appb-000001
M为整数,
Figure PCTCN2019087316-appb-000002
为整数。
Optionally, in a possible implementation manner of the foregoing tenth or eleventh aspect, the method for determining, by the encoding device, the basic division manner of the current image block to be encoded, is: the encoding device determines the current image to be encoded Corresponding at least two candidate division manners, and calculating a rate distortion cost of each of the at least two candidate division manners, so that the coding apparatus determines the candidate division manner corresponding to the minimum rate distortion cost as the basic division manner . The method for determining, by the encoding device, the target derivative mode of the current image block to be encoded, is: the encoding device calculates a rate distortion cost of each of the preset derivative modes in the candidate derivative mode set, and presets a minimum rate distortion cost corresponding to the preset The derivative mode is determined as the target derivative mode, and the candidate derivative mode set includes M preset derivative modes. When the basic division mode is horizontal N or vertical N, 0≤M≤2 N-1 ; when the basic division mode is horizontal N When dividing or dividing N points,
Figure PCTCN2019087316-appb-000001
M is an integer,
Figure PCTCN2019087316-appb-000002
Is an integer.
第十二方面,提供一种编码装置,该编码装置包括确定单元、划分单元、衍生单 元、判断单元和编码单元。According to a twelfth aspect, there is provided an encoding apparatus comprising a determining unit, a dividing unit, a deriving unit, a judging unit, and an encoding unit.
具体的,上述确定单元,用于确定当前待编码图像块的基础划分方式以及当前待编码图像块中子图像块的目标衍生模式,目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,衍生方式用于将当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数。上述划分单元,用于根据上述确定单元确定的基础划分方式,将当前待编码图像块划分为N个子图像块,N为大于或等于2的整数。上述衍生单元,用于根据上述确定单元确定的目标衍生模式指示的衍生方式,将上述划分单元得到的N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。上述判断单元,用于判断是否对上述衍生单元得到的第一衍生图像块进行划分。上述编码单元,用于在上述判断单元确定对上述衍生单元得到的第一衍生图像块不划分的情况下,对第一衍生图像块进行编码,得到码流,码流包括当前待编码图像块的划分标识和当前待编码图像块的衍生标识,当前待编码图像块的划分标识用于指示基础划分方式,当前待编码图像块的衍生标识用于指示目标衍生模式。Specifically, the determining unit is configured to determine a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded, and the target derivative mode is one of the candidate derivative mode sets, and the candidate derivative mode The set includes M preset derivation modes, and the preset derivation mode is used to indicate a derivation mode, and the derivation mode is used to derivate any two adjacent sub-image blocks in the current image block to be derived into one derivation image block, where M is greater than or equal to An integer of 0. The dividing unit is configured to divide the current image block to be encoded into N sub-image blocks according to the basic division manner determined by the determining unit, and N is an integer greater than or equal to 2. The above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks obtained by the dividing unit into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the determining unit. The determining unit is configured to determine whether to divide the first derivative image block obtained by the derivative unit. The coding unit is configured to: when the determining unit determines that the first derived image block obtained by the deriving unit is not divided, encode the first derived image block to obtain a code stream, where the code stream includes the current image block to be encoded. Deriving the identifier and the derived identifier of the current image block to be encoded, the partition identifier of the current image block to be encoded is used to indicate the basic partition mode, and the derived identifier of the current image block to be encoded is used to indicate the target derivative mode.
第十三方面,提供一种编码装置,该编码装置包括确定单元、划分单元、衍生单元、判断单元和编码单元。In a thirteenth aspect, an encoding apparatus is provided, the encoding apparatus comprising a determining unit, a dividing unit, a deriving unit, a judging unit, and an encoding unit.
具体的,上述确定单元,用于确定当前待编码图像块的基础划分方式以及当前待编码图像块的特征参数(宽度和高度中的至少一个)。上述划分单元,用于根据上述确定单元确定出的基础划分方式,将当前待编码图像块划分为N个子图像块,N为大于或等于2的整数。上述判断单元,用于判断当前待编码图像块的特征参数是否小于或等于第一预设阈值。上述确定单元,还用于在上述判断单元确定当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,确定当前待编码图像块中子图像块的目标衍生模式;目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,预设衍生模式用于指示衍生方式,衍生方式用于将当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数。上述衍生单元,用于根据上述确定单元确定出的目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。上述判断单元,还用于判断是否对上述衍生单元得到的第一衍生图像块进行划分。上述编码单元,用于在上述判断单元确定对第一衍生图像块不划分的情况下,对衍生图像块进行编码,得到码流,码流包括当前待编码图像块的划分标识和当前待编码图像块的衍生标识,当前待编码图像块的划分标识用于指示基础划分方式,当前待编码图像块的衍生标识用于指示目标衍生模式。Specifically, the determining unit is configured to determine a basic division manner of the current image block to be encoded and a feature parameter (at least one of a width and a height) of the current image block to be encoded. The dividing unit is configured to divide the current image block to be encoded into N sub-image blocks according to the basic dividing manner determined by the determining unit, and N is an integer greater than or equal to 2. The determining unit is configured to determine whether a feature parameter of the current image block to be encoded is less than or equal to a first preset threshold. The determining unit is further configured to: when the determining unit determines that the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, determine a target derivative mode of the sub image block in the current image block to be encoded; target derivative mode As one of the candidate derivative mode sets, the candidate derivative mode set includes M preset derivative modes, and the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to use any two adjacent sub-images in the current image block to be encoded. The block is derived as a derived image block, and M is an integer greater than or equal to zero. The above-mentioned deriving unit is configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block according to the derivative manner of the target derivative mode indication determined by the determining unit. The determining unit is further configured to determine whether to divide the first derivative image block obtained by the derivative unit. The coding unit is configured to: when the determining unit determines that the first derivative image block is not divided, encode the derived image block to obtain a code stream, where the code stream includes the division identifier of the current image block to be encoded and the current image to be encoded. The derived identifier of the block, the partition identifier of the current image block to be encoded is used to indicate the basic partition mode, and the derived identifier of the current image block to be encoded is used to indicate the target derivative mode.
可选的,在上述第十二方面或第十三方面的一种可能的实现方式中,上述确定单元,具体用于:确定与当前待编码图像对应的至少两种候选划分方式;计算至少两种候选划分方式中的每种候选划分方式的率失真代价;将最小的率失真代价对应的候选划分方式确定为基础划分方式。Optionally, in a possible implementation manner of the foregoing twelfth or thirteenth aspect, the determining unit is specifically configured to: determine at least two candidate division manners corresponding to the current image to be encoded; calculate at least two The rate-distortion cost of each of the candidate partitioning modes; the candidate partitioning mode corresponding to the smallest rate-distortion cost is determined as the basic partitioning mode.
可选的,在上述第十二方面或第十三方面的另一种可能的实现方式中,上述确定单元,具体用于:计算候选衍生模式集合中的每种预设衍生模式的率失真代价,其中,当基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当基础划分方式为水平垂 直N分时,
Figure PCTCN2019087316-appb-000003
Figure PCTCN2019087316-appb-000004
为整数;将最小的率失真代价对应的预设衍生模式确定为目标衍生模式。
Optionally, in another possible implementation manner of the foregoing twelfth or thirteenth aspect, the determining unit is specifically configured to: calculate a rate distortion cost of each preset derivative mode in the candidate derived mode set. Wherein, when the basic division mode is horizontal N or vertical N, 0 ≤ M ≤ 2 N-1 ; when the basic division is horizontal and vertical N,
Figure PCTCN2019087316-appb-000003
Figure PCTCN2019087316-appb-000004
It is an integer; the preset derivative mode corresponding to the minimum rate distortion cost is determined as the target derivative mode.
第十四方面,提供一种编码设备,该编码设备包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处理器执行指令时,编码设备执行如上述第十方面、第十一方面或者其任意一种可能的实现方式所述的编码方法。In a fourteenth aspect, an encoding device is provided, the encoding 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 encoding device performs the tenth aspect, tenth An encoding method as described on the one hand or any of its possible implementations.
第十五方面,提供一种视频编码器,包括非易失性存储介质以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现如上述第十方面、第十一方面或者其任意一种可能的实现方式所述的编码方法。According to a fifteenth aspect, a video encoder is provided, including a nonvolatile storage medium and a central processing unit, the nonvolatile storage medium storing an executable program, the central processing unit and the nonvolatile The storage medium is coupled and the executable program is executed to implement the encoding method as described in the tenth aspect, the eleventh aspect, or any one of the possible implementations.
第十六方面,提供一种编码器,所述编码器包括上述第十二方面或第十三方面中的编码装置。According to a sixteenth aspect, there is provided an encoder comprising the encoding apparatus of the twelfth aspect or the thirteenth aspect.
第十七方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在上述第十二方面或第十三方面所述的编码装置上运行时,使得所述编码装置执行如上述第十方面、第十一方面或者其任意一种可能的实现方式所述的编码方法。A seventeenth aspect, a computer readable storage medium having instructions stored in an operation on the encoding device of the twelfth aspect or the thirteenth aspect, The encoding device is caused to perform the encoding method as described in the tenth aspect, the eleventh aspect, or any one of the possible implementations.
第十八方面,提供一种包含指令的计算机程序产品,当该计算机程序产品在上述第十二方面或第十三方面所述的编码装置上运行时,使得所述编码装置执行如上述第十方面、第十一方面或者其任意一种可能的实现方式所述的编码方法。An eighteenth aspect, a computer program product comprising instructions for causing said encoding device to perform a tenth operation as described above when said computer program product is run on said encoding device of said twelfth or thirteenth aspect An encoding method as described in the aspect, the eleventh aspect or any one of its possible implementations.
在本申请中,上述编码装置的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本申请类似,属于本申请权利要求及其等同技术的范围之内。In the present application, the names of the above-mentioned encoding devices are not limited to the devices or the functional modules themselves. 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.
本申请中第十二方面到第十八方面及其各种实现方式的具体描述,可以参考第十方面、第十一方面或者其各种实现方式中的详细描述;并且,第十二方面到第十八方面及其各种实现方式的有益效果,可以参考第十方面、第十一方面或者其各种实现方式中的有益效果分析或此处不再赘述。For a detailed description of the twelfth aspect to the eighteenth aspect and various implementations thereof, reference may be made to the tenth aspect, the eleventh aspect or the detailed description in various implementations thereof; and, the twelfth aspect For the beneficial effects of the eighteenth aspect and various implementations thereof, reference may be made to the benefit analysis in the tenth aspect, the eleventh aspect, or various implementations thereof, or the details are not described herein.
可选的,在上述任一方面或任一方面的任意一种可能的实现方式中,上述基础划分方式为水平N分、垂直N分或水平垂直N分。Optionally, in any one of the foregoing possible implementation manners, the basic division manner is horizontal N, vertical N, or horizontal N.
这里,水平N分、垂直N分以及水平垂直N分可以均用于表示平均划分当前待解码图像块/当前待编码图像块,也可以表示非平均划分当前待解码图像块/当前待编码图像块。Here, the horizontal N points, the vertical N points, and the horizontal vertical N points may all be used to represent the average division of the current image block to be decoded/the current image block to be encoded, and may also represent the non-average division of the current image block to be decoded/the current image block to be encoded. .
可选的,在上述任一方面或任一方面的任意一种可能的实现方式中,在基础划分方式为水平N分的情况下,多个子图像块中的每个子图像块的宽度均与当前待解码图像块的宽度相等,每个子图像块的高度均等于当前待解码图像块的高度的1/N。在基础划分方式为垂直N分的情况下,多个子图像块中的每个子图像块的高度均与当前待解码图像块的高度相等,每个子图像块的宽度均等于当前待解码图像块的宽度的1/N。Optionally, in any one of the foregoing possible implementation manners, in the case that the basic division mode is horizontal N minutes, the width of each of the plurality of sub image blocks is the current The widths of the image blocks to be decoded are equal, and the height of each sub-image block is equal to 1/N of the height of the current image block to be decoded. In the case that the basic division mode is vertical N minutes, the height of each of the plurality of sub-image blocks is equal to the height of the current image block to be decoded, and the width of each sub-image block is equal to the width of the current image block to be decoded. 1/N.
可选的,在上述任一方面或任一方面的任意一种可能的实现方式中,在基础划分方式为水平垂直N分的情况下,多个子图像块中的每个子图像块的宽度均等于当前待解码图像块的宽度的
Figure PCTCN2019087316-appb-000005
每个子图像块的高度均等于当前待解码图像块的高度的
Figure PCTCN2019087316-appb-000006
Figure PCTCN2019087316-appb-000007
为整数。
Optionally, in any one of the foregoing possible implementation manners, in the case that the basic division mode is horizontal and vertical N minutes, the width of each of the plurality of sub image blocks is equal to The width of the current image block to be decoded
Figure PCTCN2019087316-appb-000005
The height of each sub-image block is equal to the height of the current image block to be decoded.
Figure PCTCN2019087316-appb-000006
Figure PCTCN2019087316-appb-000007
Is an integer.
可选的,在上述任一方面或任一方面的任意一种可能的实现方式中,目标衍生模式为候选衍生模式集合中的一种,候选衍生模式集合包括M种预设衍生模式,其中,当基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当基础划分方式为水平N分或垂直N分时,
Figure PCTCN2019087316-appb-000008
M为整数。
Optionally, in any one of the foregoing possible implementation manners, the target derivative mode is one of a candidate derivative mode set, and the candidate derivative mode set includes M preset derivative modes, where when the base is divided into a horizontal mode or vertical N-N division, 0≤M≤2 N-1; when the base is divided into a horizontal mode or vertical N-N division,
Figure PCTCN2019087316-appb-000008
M is an integer.
M的最大取值与划分图像块所使用的划分线的数量相关。在基础划分方式为水平N分或垂直N分时,划分图像块的划分线的数量为N-1,相应的,M的最大取值为2 N-1。在基础划分方式为水平垂直N分时,划分图像块的划分线的数量为
Figure PCTCN2019087316-appb-000009
相应的,M的最大取值为
Figure PCTCN2019087316-appb-000010
当然,候选衍生模式集合也可以指包括其中一部分预设衍生模式。
The maximum value of M is related to the number of dividing lines used to divide the image block. When the basic division mode is horizontal N or vertical N, the number of division lines dividing the image block is N-1, and correspondingly, the maximum value of M is 2 N-1 . When the basic division mode is horizontal and vertical N minutes, the number of division lines dividing the image block is
Figure PCTCN2019087316-appb-000009
Correspondingly, the maximum value of M is
Figure PCTCN2019087316-appb-000010
Of course, the set of candidate derivative patterns may also refer to including some of the preset derivative patterns.
可选的,在上述任一方面或任一方面的任意一种可能的实现方式中,在N=4、M=4、且基础划分方式为水平四分的情况下,候选衍生模式集合包括第一预设衍生模式、第二预设衍生模式、第三预设衍生模式以及第四预设衍生模式;其中,第一预设衍生模式为第一子图像块、第二子图像块和第三子图像块衍生为一个衍生图像块;第二预设衍生模式为第三子图像块和第四子图像块衍生为一个衍生图像块;第三预设衍生模式为第二子图像块和第三子图像块衍生为一个衍生图像块;第四预设衍生模式为第一子图像块和第二子图像块衍生为一个衍生图像块,第三子图像块和第四子图像块衍生为另一衍生图像块;第一子图像块、第二子图像块、第三子图像块和第四子图像块在当前待解码图像块中按照从上往下的顺序依次排列。其中,第一预设衍生模式可以参考图12中的D,第二预设衍生模式可以参考图12中的C,第三预设衍生模式可以参考图12中的B,第四预设衍生模式可以参考图12中的F。Optionally, in any one of the foregoing possible implementation manners, in the case that N=4, M=4, and the basic division manner is horizontal quarter, the candidate derivative mode set includes the first a preset derivative mode, a second preset derivative mode, a third preset derivative mode, and a fourth preset derivative mode; wherein the first preset derivative mode is a first sub-image block, a second sub-image block, and a third The sub-image block is derived as a derivative image block; the second preset derivation mode is that the third sub-image block and the fourth sub-image block are derived as one derived image block; and the third preset derivation mode is the second sub-image block and the third The sub-image block is derived as a derivative image block; the fourth preset derivation mode is that the first sub-image block and the second sub-image block are derived as one derived image block, and the third sub-image block and the fourth sub-image block are derived as another The derived image block; the first sub-image block, the second sub-image block, the third sub-image block, and the fourth sub-image block are sequentially arranged in the order from top to bottom in the currently to-be-decoded image block. For the first preset derivative mode, reference may be made to D in FIG. 12, the second preset derivative mode may refer to C in FIG. 12, and the third preset derivative mode may refer to B in FIG. 12, and the fourth preset derivative mode. Reference may be made to F in FIG.
在N=4、M=4、基础划分方式为垂直四分的情况下,候选衍生模式集合包括第五预设衍生模式、第六预设衍生模式、第七预设衍生模式以及第八预设衍生模式;其中,第五预设衍生模式为第五子图像块、第六子图像块和第七子图像块衍生为一个衍生图像块;第六预设衍生模式为第六子图像块、第七子图像块和第八图像块衍生为一个衍生图像块;第七预设衍生模式为第六子图像块和第七子图像块衍生为一个衍生图像块;第八预设衍生模式为第五子图像块、第六子图像块、第七子图像块和第八子图像块均保持独立;第五子图像块、第六子图像块、第七子图像块和第八子图像块在当前待解码图像块中按照从左往右的顺序依次排列。其中,第五预设衍生模式可以参考图13中的D',第六预设衍生模式可以参考图13中的E',第七预设衍生模式可以参考图13中的B',第八预设衍生模式可以参考图13中的G'。In the case that N=4, M=4, and the basic division mode is vertical quarter, the candidate derivative mode set includes a fifth preset derivative mode, a sixth preset derivative mode, a seventh preset derivative mode, and an eighth preset. a derivative mode; wherein the fifth preset derivative mode is a fifth sub-image block, a sixth sub-image block, and a seventh sub-image block are derived as one derivative image block; the sixth preset derivation mode is a sixth sub-image block, The seventh sub-image block and the eighth image block are derived as one derived image block; the seventh preset derivation mode is that the sixth sub-image block and the seventh sub-image block are derived as one derivative image block; the eighth preset derivation mode is fifth The sub image block, the sixth sub image block, the seventh sub image block, and the eighth sub image block are all kept independent; the fifth sub image block, the sixth sub image block, the seventh sub image block, and the eighth sub image block are currently The image blocks to be decoded are sequentially arranged in order from left to right. For the fifth preset derivative mode, reference may be made to D' in FIG. 13, and the sixth preset derivative mode may refer to E' in FIG. 13, and the seventh preset derivative mode may refer to B' in FIG. 13, the eighth pre- For the derivative mode, refer to G' in FIG.
在N=4、M=4、基础划分方式为水平垂直四分的情况下,候选衍生模式集合包括第九预设衍生模式、第十预设衍生模式、第十一预设衍生模式以及第十二预设衍生模式;其中,第九预设衍生模式为第九子图像块和第十子图像块衍生为一个衍生图像块;第十预设衍生模式为第九子图像块和第十子图像块衍生为一个衍生图像块,第十一子图像块和第十二图像块衍生为另一衍生图像块;第十一预设衍生模式为第十子图像块和第十一子图像块衍生为一个衍生图像块,第九子图像块和第十二图像块衍生为另一衍生图像块;第十二预设衍生模式为第九子图像块和第十二子图像块衍生为一个衍生图像块;第九子图像块、第十子图像块、第十一子图像块和第十二子图像块在当前待 解码图像块中以顺时针的方向依次排列。其中,第九预设衍生模式可以参考图14中的A″,第十预设衍生模式可以参考图14中的E″,第十一预设衍生模式可以参考图14中的F″,第十二预设衍生模式可以参考图14中的B″。In the case that N=4, M=4, and the basic division mode is horizontal and vertical quarters, the candidate derivative mode set includes a ninth preset derivative mode, a tenth preset derivative mode, an eleventh preset derivative mode, and a tenth a second preset derivative mode; wherein the ninth preset derivative mode is a ninth sub-image block and a tenth sub-image block are derived as one derived image block; and the tenth preset derivation mode is a ninth sub-image block and a tenth sub-image The block is derived as a derivative image block, and the eleventh sub-image block and the twelfth image block are derived as another derivation image block; the eleventh preset derivation mode is derived from the tenth sub-image block and the eleventh sub-image block. a derived image block, the ninth sub-image block and the twelfth image block are derived as another derived image block; the twelfth preset derivation mode is that the ninth sub-image block and the twelfth sub-image block are derived as one derivative image block The ninth sub-image block, the tenth sub-image block, the eleventh sub-image block, and the twelfth sub-image block are sequentially arranged in a clockwise direction in the currently to-be-decoded image block. For the ninth preset derivative mode, reference may be made to A′′ in FIG. 14 , and the tenth preset derivative mode may refer to E′′ in FIG. 14 , and the eleventh preset derivative mode may refer to F′′ in FIG. 14 , For the two preset derivation modes, reference may be made to B" in FIG.
可选的,在上述任一方面或任一方面的任意一种可能的实现方式中,在候选衍生模式集合包括预设数量的预设衍生模式(如四种),该候选衍生模式集合中的每一种预设衍生模式均采用定长码表示,这样,相比于现有技术,本申请提供的编解码方法可以采用简单的标识即可标识图像块的划分,有效的提高了编解码效率。Optionally, in any one of the foregoing possible implementation manners, the candidate derivative mode set includes a preset number of preset derivative modes (such as four types) in the candidate derivative mode set. Each of the preset derivation modes is represented by a fixed length code. Thus, compared with the prior art, the codec method provided by the present application can identify the division of the image block by using a simple identifier, thereby effectively improving the coding and decoding efficiency. .
可选的,在上述任一方面或任一方面的任意一种可能的实现方式中,当前待解码图像块的划分标识或当前待编码图像块的划分标识采用变长码表示,当前待解码图像块的衍生标识或当前待编码图像块的衍生标识采用定长码表示。Optionally, in any one of the foregoing possible implementation manners, the division identifier of the current image block to be decoded or the division identifier of the current image block to be encoded is represented by a variable length code, and the current image to be decoded The derived identifier of the block or the derived identifier of the current image block to be encoded is represented by a fixed length code.
本申请的这些方面或其他方面在以下的描述中会更加简明易懂。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 dividing a prediction unit by using different division manners according to an embodiment of the present application;
图3为本申请实施例提供的QT划分方式的划分标识示意图;FIG. 3 is a schematic diagram of a division and identification of a QT division manner according to an embodiment of the present disclosure;
图4为本申请实施例中QTBT划分方式划分图像块的示意图;4 is a schematic diagram of dividing an image block by a QTBT division mode according to an embodiment of the present application;
图5为本申请实施例中QT-ABT/TT划分方式的标识位标志方法的示意图一;FIG. 5 is a first schematic diagram of a method for marking a mark in a QT-ABT/TT division manner according to an embodiment of the present application; FIG.
图6为本申请实施例中QT-ABT/TT划分方式的标识位标志方法的示意图二;6 is a second schematic diagram of a method for marking a mark in a QT-ABT/TT division mode according to an embodiment of the present application;
图7为本申请实施例中视频编解码系统的结构示意图;FIG. 7 is a schematic structural diagram of a video codec system according to an embodiment of the present application;
图8为本申请实施例中视频编码器的结构示意图;FIG. 8 is a schematic structural diagram of a video encoder according to an embodiment of the present application;
图9为本申请实施例中视频解码器的结构示意图;FIG. 9 is a schematic structural diagram of a video decoder according to an embodiment of the present application;
图10为本申请实施例中编解码装置的结构示意图;FIG. 10 is a schematic structural diagram of a codec device according to an embodiment of the present application;
图11A为本申请实施例提供的解码方法流程示意图一;FIG. 11 is a schematic flowchart 1 of a decoding method according to an embodiment of the present application;
图11B为本申请实施例提供的解码方法流程示意图二;FIG. 11B is a second schematic flowchart of a decoding method according to an embodiment of the present disclosure;
图12为本申请实施例提供的衍生模式的结构示意图一;FIG. 12 is a schematic structural diagram 1 of a derivative mode according to an embodiment of the present disclosure;
图13为本申请实施例提供的衍生模式的结构示意图二;FIG. 13 is a schematic structural diagram 2 of a derivative mode according to an embodiment of the present disclosure;
图14为本申请实施例提供的衍生模式的结构示意图三;FIG. 14 is a schematic structural diagram 3 of a derivative mode according to an embodiment of the present disclosure;
图15A为本申请实施例提供的编码方法流程示意图一;15A is a schematic flowchart 1 of an encoding method according to an embodiment of the present application;
图15B为本申请实施例提供的编码方法流程示意图二;FIG. 15B is a second schematic flowchart of an encoding method according to an embodiment of the present disclosure;
图16为本申请实施例提供的确定基础划分方式以及目标衍生模式的方法流程示意图;16 is a schematic flowchart of a method for determining a basic division manner and a target derivative mode according to an embodiment of the present application;
图17A为本申请实施例中图像块的划分结构示意图一;17A is a schematic diagram 1 of a division structure of an image block in the embodiment of the present application;
图17B为本申请实施例中图像块的划分结构示意图二;17B is a second schematic structural diagram of an image block according to an embodiment of the present application;
图18为本申请实施例中图像块的划分结构示意图三;FIG. 18 is a third schematic structural diagram of an image block according to an embodiment of the present application; FIG.
图19为本申请实施例中图像块的划分结构示意图四;19 is a schematic diagram 4 of a division structure of an image block in an embodiment of the present application;
图20为本申请实施例中图像块的划分结构示意图五;20 is a schematic diagram 5 of a division structure of an image block in the embodiment of the present application;
图21为本申请实施例中图像块的划分结构示意图六;21 is a schematic diagram 6 of a division structure of an image block in the embodiment of the present application;
图22为本申请实施例中解码装置的结构示意图一;FIG. 22 is a schematic structural diagram 1 of a decoding apparatus according to an embodiment of the present application;
图23为本申请实施例中解码装置的结构示意图二;FIG. 23 is a second schematic structural diagram of a decoding apparatus according to an embodiment of the present application;
图24为本申请实施例中编码装置的结构示意图一;24 is a schematic structural diagram 1 of an encoding apparatus according to an embodiment of the present application;
图25为本申请实施例中编码装置的结构示意图二。FIG. 25 is a second schematic structural diagram of an encoding apparatus according to an embodiment of the present application.
具体实施方式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.
视频中完整的图像通常被称为“帧”,由许多帧按照时间顺序组成的视频也被称为视频序列(Video Sequence)。视频序列存在空间冗余、时间冗余、视觉冗余、信息熵冗余、结构冗余、知识冗余、重要性冗余等一系列的冗余信息。为了尽可能的去除视频序列中的冗余信息,减少表征视频的数据量,提出了视频编码(Video Coding)技术,以达到减小存储空间和节省传输带宽的效果。视频编码技术也称为视频压缩技术。A complete image in a video is often referred to as a "frame," and a video composed of many frames in chronological order is also referred to as a video sequence. The video sequence has a series of redundant information such as spatial redundancy, temporal redundancy, visual redundancy, information entropy redundancy, structural redundancy, knowledge redundancy, and importance redundancy. In order to remove the redundant information in the video sequence and reduce the amount of data representing the video, a video coding (Video Coding) technique is proposed to reduce the storage space and save the transmission bandwidth. Video coding technology is also known as video compression technology.
就目前的技术发展现状而言,视频编码技术主要包括帧内预测、帧间预测、变换量化、熵编码以及消块滤波处理等。As far as the current state of technology development is concerned, video coding technologies mainly include intra prediction, inter prediction, transform quantization, entropy coding, and deblocking filtering.
在国际通用范围内,视频压缩编码标准,例如:由运动图像专家组(Motion Picture Experts Group,MPEG)制定的MPEG-2和MPEG-4第10部分高级视频编解码(Advanced Video Coding,AVC),由国际电信联盟电信标准化部门(International Telecommunication Uion-Telecommunication Standardization Sector,ITU-T)制定的H.263、H.264和H.265高效率视频编解码(High Efficiency Video Coding standard,HEVC),中主流的压缩编码方式主要有四种:色度抽样、预测编码、变换编码和量化编码。In the internationally accepted range, video compression coding standards, such as: MPEG-2 and MPEG-4 Part 10 Advanced Video Coding (AVC), developed by Motion Picture Experts Group (MPEG), H.263, H.264, and H.265 High Efficiency Video Coding Standard (HEVC) developed by the International Telecommunication Uion-Telecommunication Standardization Sector (ITU-T) There are four main compression coding methods: chroma sampling, predictive coding, transform coding, and quantization coding.
色度抽样:充分利用了人眼的视觉心理特点,在底层的数据表示中就开始设法最大限度的缩减单个元素描述的数据量。Chromatic Sampling: Make full use of the visual and psychological characteristics of the human eye, and in the underlying data representation, try to minimize the amount of data described by a single element.
预测编码:利用之前已编码帧的数据信息来预测当前将要编码的帧。编码端通过预测得到一个预测值,该预测值与实际值之间存在着一定的残差值。如果预测越适合,则预测值就会越接近实际值,残差值就越小,这样编码端对残差值进行编码就能大大减小数据量。解码端在解码时,运用残差值加上预测值还原重构出初始图像。在主流编码标准中,预测编码分为帧内预测和帧间预测两种基本类型。Predictive coding: The data information of the previously encoded frame is used to predict the frame currently to be encoded. The encoding end obtains a predicted value by prediction, and there is a certain residual value between the predicted value and the actual value. If the prediction is more suitable, the closer the predicted value is to the actual value, the smaller the residual value, so that the encoding end encodes the residual value to greatly reduce the amount of data. When decoding, the decoder reconstructs the original image by using the residual value plus the predicted value. In the mainstream coding standard, predictive coding is divided into two basic types: intra prediction and inter prediction.
变换编码:不直接对原本的空间域信息进行编码,而是将信息采样值按照某种形式的变换函数,从当前域转换到另外一种人为定义域中(通常称为变换域),再根据信息在变换域的分布特性进行压缩编码。Transform coding: instead of directly encoding the original spatial domain information, the information sample value is converted from the current domain to another artificial domain (usually called the transform domain) according to some form of transformation function, and then The information is compressed and encoded in the distribution characteristics of the transform domain.
量化编码:将动态范围较大的输入值强行调整为较少的输出值。Quantization coding: Forcibly adjust the input value with a large dynamic range to a smaller output value.
在基于混合编码架构的编码算法中,上述压缩编码方式被混合使用,而这些压缩编码的基本处理单位是图像块,该图像块是编码端将一帧/幅图像进行划分得到的。In the coding algorithm based on the hybrid coding architecture, the above compression coding methods are used in combination, and the basic processing unit of these compression coding is an image block, which is obtained by dividing the frame/image by the encoding end.
对于图像的划分,为了更加灵活的表示视频内容,HEVC定义了CTU、编码单元(Coding Unit,CU)、预测单元(Prediction Unit,PU)和变换单元(Transform Unit, TU)。CTU、CU、PU和TU均为图像块。For image partitioning, in order to more flexibly represent video content, HEVC defines a CTU, a Coding Unit (CU), a Prediction Unit (PU), and a Transform Unit (TU). The CTU, CU, PU, and TU are all image blocks.
CTU:一幅图像由多个CTU构成,一个CTU通常对应于一个方形图像区域,如图1中的(a)所示,图像10由多个CTU构成(包括CTU A、CTU B、CTU C等)。CTU: An image consists of multiple CTUs. One CTU usually corresponds to a square image area. As shown in (a) of Figure 1, the image 10 consists of multiple CTUs (including CTU A, CTU B, CTU C, etc. ).
与某一CTU对应的编码信息包含与该CTU对应的方形图像区域中的像素的亮度值和/或色度值。此外,与某一CTU对应的编码信息还可以包含语法元素,这些语法元素指示如何将该CTU划分成至少一个CU,以及解码每个CU以得到重建图像的方法。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.
CU:通常对应于一个A×B的矩形区域,A为矩形的宽,B为矩形的高,其中,本申请实施例中涉及到的宽是指图1示出的二维直角坐标系XoY中沿X轴方向(水平方向)的长度,高是指图1示出的二维直角坐标系XoY中沿Y轴方向(竖直方向)的长度。这里,A和B的取值可以相同,也可以不同。A和B的取值通常为2的整数次幂,例如:256、128、64、32、16、8或4等。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 two-dimensional Cartesian coordinate system XoY shown in FIG. 1 . The length in the X-axis direction (horizontal direction), 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.
PU:是帧内预测、帧间预测的基本单元。PU: is the basic unit of intra prediction and inter prediction.
帧内预测单元的划分包括2N×2N划分方式(如图2中的A所示)和N×N划分方式(如图2中的B所示)。帧间预测单元的划分包括2N×2N划分方式(如图2中的C所示)、N×N划分方式(如图2中的D所示)、N×2N划分方式(如图2中的E所示)、2N×N划分方式(如图2中的F所示)、2N×nD划分方式(如图2中的G所示)、2N×nU划分方式(如图2中的H所示)、nL×2N划分方式(如图2中的I所示)、nR×2N划分方式(如图2中的J所示)。其中,N为任意正整数,n=x×N,0≤x≤1。The division of the intra prediction unit includes a 2N×2N division scheme (shown as A in FIG. 2) and an N×N division scheme (shown as B in FIG. 2). The division of the inter prediction unit includes a 2N×2N division manner (as shown by C in FIG. 2), an N×N division manner (shown as D in FIG. 2), and an N×2N division manner (as shown in FIG. 2). E)), 2N×N division mode (shown as F in Fig. 2), 2N×nD division mode (shown as G in Fig. 2), 2N×nU division mode (such as H in Fig. 2) Show), nL × 2N division mode (shown as I in Figure 2), nR × 2N division mode (shown as J in Figure 2). Where N is any positive integer, n=x×N, and 0≤x≤1.
2N×2N划分方式为对图像块不进行划分;N×N划分方式为将图像块划分为四个瞪大的子图像块;N×2N划分方式为将图像块划分成左右两个等大的子图像块;2N×N划分方式为将图像块划分成上下两个等大的子图像块;2N×nD划分方式为将图像块划分为上下两个子图像块,且图像划分线相对该图像块的垂直平分线下移n,其中,D表示图像划分线相对该图像块的垂直平分线下移;2N×nU划分方式为将图像块划分为上下两个子图像块,且图像划分线相对该图像块的垂直平分线上移n,其中,U表示图像划分线相对该图像块的垂直平分线上移;nL×2N划分方式为将图像块划分为左右两个子图像块,且图像划分线相对该图像块的垂直平分线左移n,其中,L表示图像划分线相对该图像块的垂直平分线左移;nR×2N划分方式为将图像块划分为左右两个子图像块,且图像划分线相对该图像块的垂直平分线右移n,其中,R表示图像划分线相对该图像块的垂直平分线右移。The 2N×2N division method is not to divide the image block; the N×N division method is to divide the image block into four large sub-image blocks; the N×2N division method is to divide the image block into two equal parts. Sub-image block; 2N×N division mode is to divide the image block into two sub-image blocks of upper and lower; 2N×nD division is to divide the image block into upper and lower sub-image blocks, and the image division line is opposite to the image block. The vertical bisector moves down n, where D indicates that the image dividing line is shifted downward relative to the vertical bisector of the image block; 2N×nU is divided into two sub-image blocks, and the image dividing line is opposite to the image. The vertical bisector of the block is shifted by n, where U represents the image dividing line moving relative to the vertical bisector of the image block; nL×2N is divided into two sub-image blocks, and the image dividing line is opposite to the image dividing line. The vertical bisector of the image block is shifted to the left by n, where L indicates that the image dividing line is shifted to the left by the vertical bisector of the image block; nR×2N is divided into two sub-image blocks, and the image dividing line is relatively The Perpendicular bisector of the right image block n, wherein, R represents an image division line of the image relative to the vertical bisector of the right block.
TU:对原始图像块和预测图像块的残差进行处理。TU: Processes the residuals of the original image block and the predicted image block.
一般的,对图像块进行划分所采用的划分方式包括:四叉树(Quad-Tree,QT) 划分、二叉树(Binary Tree,BT)划分、TT划分。Generally, the division manners for dividing an image block include: Quad-Tree (QT) division, Binary Tree (BT) division, and TT division.
QT划分方式:将一个图像块划分为四个子图像块。可选的,可以将子图像块进一步划分,也可以不再划分子图像块。QT division method: divide one image block into four sub-image blocks. Optionally, the sub-image block may be further divided, or the sub-image block may not be divided.
在一个示例中,编码端采用QT划分方式将CTU划分为四个子图像块;对于每个子图像块,编码端可以不再划分(此时,每个子图像块均为CU),也可以将子图像块划分为四个下一层级的子图像块。如图1中的(b)所示,编码端将CTU A划分为a、b、c和d四个子图像块。In an example, the encoding end divides the CTU into four sub-image blocks by using a QT division manner; for each sub-image block, the encoding end may not be divided (in this case, each sub-image block is a CU), and the sub-image may also be The block is divided into four sub-image blocks of the next level. As shown in (b) of FIG. 1, the encoding end divides CTU A into four sub-image blocks a, b, c, and d.
BT划分方式:将一个图像块划分为两个子图像块。可选的,可以将子图像块进一步划分,也可以不再划分子图像块。BT划分方式可以包括:BT division method: divide one image block into two sub-image blocks. Optionally, the sub-image block may be further divided, or the sub-image block may not be divided. The BT division method can include:
(1)、水平二分(1), horizontal two points
将图像块划分成上、下两个相同大小的子图像块。如图1中的(c)所示,使用水平二分划分方式划分图像块b,生成大小相等的子图像块e和子图像块f。The image block is divided into upper and lower sub-image blocks of the same size. As shown in (c) of FIG. 1, the image block b is divided using a horizontal binary division method, and sub-image blocks e and sub-image blocks f of equal size are generated.
(2)、垂直二分(或称为竖直二分)(2), vertical two points (or vertical two points)
将图像块划分成左、右两个大小相同的子图像块。如图1中的(d)所示,使用垂直二分划分方式划分图像块d,生成大小相等的子图像块g和子图像块h。The image block is divided into two sub-image blocks of the same size, left and right. As shown in (d) of FIG. 1, the image block d is divided by the vertical binary division method, and sub-image blocks g and sub-image blocks h of equal size are generated.
TT划分方式:将一个图像块划分为三个子图像块。可选的,可以将子图像块进一步划分,也可以不再划分子图像块。TT划分方式可以包括:TT division method: divide one image block into three sub-image blocks. Optionally, the sub-image block may be further divided, or the sub-image block may not be divided. The TT division method can include:
(1)、水平三分(1), horizontal three points
将图像块划分成上、中、下三个子图像块。The image block is divided into upper, middle and lower sub-image blocks.
在一个示例中,上、中、下三个子图像块的高分别为图像块的高的1/4、1/2、1/4。如图1中的(e)所示,使用水平三分划分方式划分图像块c,生成子图像块j、子图像块k和子图像块m,子图像块j的高为图像块c的高的1/4,子图像块k的高为图像块c的高的1/2,子图像块m的高为图像块c的高的1/4。In one example, the heights of the upper, middle, and lower sub-image blocks are respectively 1/4, 1/2, and 1/4 of the height of the image block. As shown in (e) of FIG. 1, the image block c is divided by a horizontal three-division division method, and the sub-image block j, the sub-image block k, and the sub-image block m are generated, and the height of the sub-image block j is high for the image block c. 1/4, the height of the sub-image block k is 1/2 of the height of the image block c, and the height of the sub-image block m is 1/4 of the height of the image block c.
在另一个示例中,上、中、下三个子图像块的高分别为图像块的高的1/3、1/3、1/3,即将图像块按照图1示出的二维直角坐标系XoY中的X轴的方向平均划分为三个子图像块。如图1中的(f)所示,使用水平三分划分方式划分图像块c,生成子图像块j、子图像块k和子图像块m,子图像块j的高、子图像块k的高、子图像块m的高均为图像块c的高的1/3。In another example, the heights of the upper, middle, and lower sub-image blocks are respectively 1/3, 1/3, and 1/3 of the height of the image block, that is, the image block is in accordance with the two-dimensional Cartesian coordinate system shown in FIG. The direction of the X-axis in XoY is equally divided into three sub-image blocks. As shown in (f) of FIG. 1, the image block c is divided by a horizontal three-division division method, and the sub-image block j, the sub-image block k, and the sub-image block m are generated, and the height of the sub-image block j and the height of the sub-image block k are high. The height of the sub-image block m is 1/3 of the height of the image block c.
(2)、垂直三分(或称为竖直三分)(2), vertical three points (or vertical three points)
将图像块划分成左、中、右三个子图像块。The image block is divided into three sub-image blocks: left, center, and right.
在一个示例中,左、中、右三个子图像块的宽分别为图像块的宽的1/4、1/2、1/4。如图1中的(g)所示,使用垂直三分划分方式划分图像块c,生成子图像块p、子图像块q和子图像块x,子图像块p的宽为图像块c的宽的1/4,子图像块q的宽为图像块c的宽的1/2,子图像块x的宽为图像块c的宽的1/4。In one example, the widths of the left, middle, and right sub-image blocks are respectively 1/4, 1/2, and 1/4 of the width of the image block. As shown in (g) of FIG. 1, the image block c is divided by a vertical three-division division method, and the sub-image block p, the sub-image block q, and the sub-image block x are generated, and the width of the sub-image block p is the width of the image block c. 1/4, the width of the sub-image block q is 1/2 of the width of the image block c, and the width of the sub-image block x is 1/4 of the width of the image block c.
在另一个示例中,左、中、右三个子图像块的高分别为图像块的高的1/3、1/3、1/3,即将图像块按照图1示出的二维直角坐标系XoY中的X轴的方向平均划分为三个子图像块。如图1中的(h)所示,使用垂直三分划分方式划分图像块c,生成子图像块p、子图像块q和子图像块x,子图像块p的宽、子图像块q的宽、子图像块x的宽均为图像块c的宽的1/3。In another example, the heights of the left, middle, and right sub-image blocks are respectively 1/3, 1/3, and 1/3 of the image block, that is, the image block is in accordance with the two-dimensional Cartesian coordinate system shown in FIG. The direction of the X-axis in XoY is equally divided into three sub-image blocks. As shown in (h) of FIG. 1, the image block c is divided by a vertical three-division division method, and the sub-image block p, the sub-image block q, and the sub-image block x are generated, and the width of the sub-image block p and the width of the sub-image block q are wide. The width of the sub-image block x is 1/3 of the width of the image block c.
从上述描述可知,在划分某一图像块后,编码端还需要确定是否继续对子图像块进行划分。是否划分某一图像块在码流中采用与该图像块对应的划分标志位(如split_cu_flag)指示。该图像块在QT划分结构中的层级(简称QT层级)间接的表示了QT划分的次数。As can be seen from the above description, after dividing an image block, the encoding end also needs to determine whether to continue dividing the sub-image block. Whether to divide a certain image block is indicated in the code stream by a division flag bit (such as split_cu_flag) corresponding to the image block. The level of the image block in the QT partition structure (referred to as the QT level) indirectly represents the number of QT partitions.
示例性的,某一图像块的划分标志位用split_cu_flag表示,split_cu_flag=0表示不再划分该节点,split_cu_flag=1表示继续划分该节点。如图3所示,在64×64的CTU所表示的图像块的split_cu_flag的值为1的情况下,将CTU划分为四个32×32的子图像块,这四个32×32的子图像块分别为子图像块A1、子图像块A2、子图像块A3以及子图像块A4。这四个32×32的子图像块中的每一个子图像块,又可以根据它对应的split_cu_flag,选择继续划分或者不划分。如果子图像块A1的split_cu_flag的值为1,则继续划分子图像块A1,将子图像块A1划分为四个16×16的节点,这四个16×16的子图像块分别为子图像块B1、子图像块B2、子图像块B3以及子图像块B4。以此类推,直到所有子图像块都不再划分。图3中,CTU的QT层级为0,子图像块A1、子图像块A2、子图像块A3以及子图像块A4的QT层级均为1,子图像块B1、子图像块B2、子图像块B3以及子图像块B4的QT层级均为2。Exemplarily, the division flag bit of a certain image block 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. 3, in the case where the value of the split_cu_flag of the image block indicated by the 64×64 CTU is 1, the CTU is divided into four 32×32 sub-image blocks, and the four 32×32 sub-images are divided. The blocks are a sub-picture block A1, a sub-picture block A2, a sub-picture block A3, and a sub-picture block A4, respectively. Each of the four 32×32 sub-image blocks may be further divided or not divided according to its corresponding split_cu_flag. If the value of the split_cu_flag of the sub-picture block A1 is 1, the sub-picture block A1 is further divided, and the sub-picture block A1 is divided into four 16×16 nodes, and the four 16×16 sub-image blocks are respectively sub-image blocks. B1, sub-picture block B2, sub-picture block B3, and sub-picture block B4. And so on, until all sub-image blocks are no longer divided. In FIG. 3, the QT level of the CTU is 0, and the QT levels of the sub-image block A1, the sub-image block A2, the sub-image block A3, and the sub-image block A4 are all 1, the sub-image block B1, the sub-image block B2, and the sub-image block. Both B3 and sub-picture block B4 have a QT level of 2.
目前,联合视频探究组(Joint Video Exploration Team,JVET)提出了QT划分方式和BT划分方式级联的QTBT划分方式。具体的,按照QT划分方式将CTU划分为四个子图像块,对于需要进一步划分的子图像块而言,再按照QT/BT划分方式将该子图像块进行划分。At present, the Joint Video Exploration Team (JVET) proposes a QTBT division method in which the QT division method and the BT division method are cascaded. Specifically, the CTU is divided into four sub-image blocks according to the QT division manner, and for the sub-image blocks that need to be further divided, the sub-image block is further divided according to the QT/BT division manner.
如图4中的(a)所示,每个节点表示一个图像块,某一节点为其上一节点的子节点,相应的,该节点所表示的图像块为其上一节点所表示的图像块的子图像块。图4中的(a)中,实线表示使用QT划分方式划分,虚线表示使用BT划分方式划分,A到M中的每个节点对应1个CU。在BT结构中,10表示垂直二分,11表示水平二分。图4中的(b)示出了按照图4中的(a)示出的划分方式划分的CTU。As shown in (a) of FIG. 4, each node represents an image block, and a node is a child node of the previous node, and correspondingly, the image block represented by the node is an image represented by the previous node. A sub-image block of the block. In (a) of FIG. 4, the solid line indicates division using the QT division method, and the broken line indicates division using the BT division method, and each of the nodes A to M corresponds to one CU. In the BT structure, 10 represents a vertical dichotomy and 11 represents a horizontal dichotomy. (b) in FIG. 4 shows a CTU divided according to the division manner shown in (a) of FIG.
结合图4可以看出,采用QTBT划分方式划分某一图像块后,只能得到中心对称的子图像块。对于非中心对称的划分,QTBT划分方式无法满足。此外,QTBT划分方式只能覆盖较少数量的模式,对于纹理较为复杂或者纹理较为细致的图像区域而言,编码端需要进行更深层次的BT划分或QT划分。As can be seen from Fig. 4, after dividing an image block by QTBT division, only the centrally symmetric sub-image block can be obtained. For non-central symmetric partitioning, the QTBT partitioning method cannot be satisfied. In addition, the QTBT partitioning method can only cover a small number of modes. For an image region with a more complex texture or a finer texture, the encoding end needs to perform deeper BT partitioning or QT partitioning.
为了解决这一问题,后续在上述QTBT的基础之上出现了一种QT-ABT/TT划分方式,即按照QT划分方式将CTU划分为四个子图像块,对于需要进一步划分的子图像块而言,再按照QT/ABT/TT划分方式将该子图像块进行划分。In order to solve this problem, a QT-ABT/TT partitioning method is formed on the basis of the above QTBT, that is, the CTU is divided into four sub-image blocks according to the QT partitioning manner, for the sub-image block that needs further division. Then, the sub-image block is divided according to the QT/ABT/TT division method.
对于QT-ABT/TT划分方式,编码端可采用图5或图6所示的标识位标示方法将具体的划分方式写入码流中。For the QT-ABT/TT division mode, the coding end can use the identifier bit indication method shown in FIG. 5 or FIG. 6 to write a specific division manner into the code stream.
图5中的每一分支均表示对应层级的划分方式。在第1层级中,1表示QT划分方式,0表示BT划分方式/TT划分方式/不划分。在第2层级中,1表示BT划分方式/TT划分方式,0表示不划分,在第3层级中,1表示水平划分方式,0表示垂直划分方式。在第3层级的标识为1的分支下,1表示BT划分方式(即水平二分),0表示TT划分方式(即水平三分)。在第3层级的标识为0的分支下,0表示TT划分方式(即垂直三分),1表示BT划分方式(即垂直二分)。进一步地,在第3层级的分支 下,BT划分方式通过0、10以及11三种标识标示是否为对称的划分方式。Each branch in Figure 5 represents the manner in which the corresponding levels are divided. In the first level, 1 indicates the QT division mode, and 0 indicates the BT division method/TT division method/non-division. In the second level, 1 indicates the BT division method/TT division method, and 0 indicates no division. In the third hierarchy, 1 indicates the horizontal division mode, and 0 indicates the vertical division mode. Under the branch with the flag of level 3 being 1, the 1 indicates the BT division mode (ie, the horizontal dichotomy), and 0 indicates the TT division mode (ie, the horizontal three-point). Under the branch of the third level with the identifier 0, 0 indicates the TT division mode (ie, vertical three points), and 1 indicates the BT division mode (ie, vertical dichotomy). Further, under the branch of the third level, the BT division mode indicates whether the symmetrical division manner is adopted by the three identifiers of 0, 10, and 11.
图6中的qt表示采用QT划分方式,no qt表示不采用QT划分方式。相应的,no qt意味着可能不划分或者进一步采用BT划分方式,如果进一步采用BT划分方式,则需要在码流中标识是采用水平(parallel)划分方式或者垂直(perpendicular)划分方式。如果采用水平划分方式,则进一步标识是采用1/4划分,亦或1/8划分,亦或1/3划分,亦或1/2划分,以此类推。The qt in Fig. 6 indicates that the QT division mode is adopted, and the no qt indicates that the QT division mode is not employed. Correspondingly, no qt means that the BT division mode may not be divided or further adopted. If the BT division mode is further adopted, it is necessary to identify in the code stream whether a parallel division method or a vertical division manner is adopted. If the horizontal division method is adopted, the further identification is 1/4 division, or 1/8 division, or 1/3 division, or 1/2 division, and so on.
通过上述的标示方法能够使的解码端正确的解码出图像块的具体的形状。然而,上述划分方式依然以QTBT为基本的框架,在其基础上增加水平或者竖直划分的TT或者ABT的划分方式仍然存在局限性,无法满足较为复杂的纹理要求。Through the above-mentioned marking method, the decoding end can correctly decode the specific shape of the image block. However, the above division method still uses QTBT as the basic framework. On the basis of which the horizontal or vertical division of TT or ABT is still limited, it cannot meet the more complicated texture requirements.
此外,上述多种划分模式的组合导致图像块的划分方式的标示方法复杂,一定程度上影响了编解码的效率。In addition, the combination of the above multiple division modes leads to a complicated indication method of the division manner of the image block, which affects the efficiency of the codec to some extent.
对此,本申请提供一种解码方法。本申请提供的解码方法可以通过两种方式实现。In this regard, the present application provides a decoding method. The decoding method provided by the present application can be implemented in two ways.
在第一种可实现方式中,解码装置通过解析码流,确定出当前待解码图像块的基础划分方式以及当前待解码图像块中子图像块的目标衍生模式,并根据基础划分方式,将当前待解码图像块划分为N(N为大于或等于2的整数)个子图像块,以及根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块,这样,解码装置可对第一衍生图像块进行解码。这里,目标衍生模式为候选衍生模式集合中的一种,该候选衍生模式集合包括M(M为大于或等于0的整数)预设衍生模式,每一种预设衍生模式均用于唯一指示一种衍生方式,衍生方式用于将上述N个子图像块中的至少两个相邻子图像块衍生为一个衍生图像块。容易理解的是,划分方式和衍生模式的结合可标识出了多种不同的划分结果,与现有技术相比,丰富了图像块的划分方式,能够适应于各种纹理特性的视频图像。In the first implementation manner, the decoding apparatus determines the basic division manner of the current image block to be decoded and the target derivative mode of the sub image block in the current image block to be decoded by parsing the code stream, and according to the basic division manner, the current Decoding the image block to be divided into N (N is an integer greater than or equal to 2) sub-image blocks, and deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first according to the derivative manner indicated by the target derivative mode The image block is derived such that the decoding device can decode the first derived image block. Here, the target derivative mode is one of a set of candidate derivative modes, and the candidate derivative mode set includes M (M is an integer greater than or equal to 0) preset derivation mode, and each of the preset derivation modes is used for the unique indication one. The derivative method is used to derive at least two adjacent sub-image blocks of the above N sub-image blocks into one derived image block. It is easy to understand that the combination of the division mode and the derivative mode can identify a plurality of different division results. Compared with the prior art, the image block is enriched and can be adapted to video images of various texture characteristics.
在第二种可实现方式中,解码装置通过解析码流,确定出当前待解码图像块的基础划分方式以及当前待解码图像块的特征参数(高度和宽度中的至少一个);然后,在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,解码装置解析码流,确定当前待解码图像块中子图像块的目标衍生模式,这样,解码装置可根据基础划分方式,将当前待解码图像块划分为N个子图像块,并根据目标衍生模式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块,这样,解码装置可对第一衍生图像块进行解码。解码装置只有在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,才确定当前待解码图像块中子图像块的目标衍生模式。相比于第一种可实现方式,该方式中解码装置的解码效率更高。In a second implementation manner, the decoding device determines, by parsing the code stream, a basic division manner of the current image block to be decoded and a feature parameter (at least one of height and width) of the current image block to be decoded; If the feature parameter of the to-be-decoded image block is less than or equal to the first preset threshold, the decoding device parses the code stream to determine a target derivative mode of the sub-image block in the current image block to be decoded, so that the decoding device may be configured according to the basic division manner. Dividing the current image block to be decoded into N sub-image blocks, and deriving at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block according to the target derivative mode, so that the decoding device can be the first Derived image blocks are decoded. The decoding device determines the target derivative mode of the sub-image block in the current image block to be decoded only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold. The decoding efficiency of the decoding device in this mode is higher than that of the first implementation.
上述解码装置可以为视频解码器(如下图9所示),也可以为具备实现上述第一种可实现方式或上述第二种可实现方式功能的设备。The decoding device may be a video decoder (as shown in FIG. 9 below), or may be a device having the functions of implementing the first implementable manner or the second implementable manner.
相应的,本申请还提供一种编码方法。该编码方法可以通过两种方式实现。Correspondingly, the present application also provides an encoding method. This encoding method can be implemented in two ways.
在实现方式A中,编码装置在确定当前待编码图像块的基础划分方式以及当前待编码图像块中子图像块的目标衍生模式后,根据该基础划分方式,将当前待编码图像块划分为N个子图像块,并根据该目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。进一步地,在对第一衍生图像块不划分的情况下,编码装置对第一衍生图像块进行编码,得到包括当前待编码图像块的 划分标识和当前待编码图像块的衍生标识的码流,并向解码装置发送该码流。这里,目标衍生模式为候选衍生模式集合中的一种,该候选衍生模式集合包括M(M为大于或等于0的整数)预设衍生模式,每一种预设衍生模式均用于唯一指示一种衍生方式,衍生方式用于将上述N个子图像块中的至少两个相邻子图像块衍生为一个衍生图像块。当前待编码图像块的划分标识用于指示基础划分方式,当前待编码图像块的衍生标识用于指示目标衍生模式。本申请中的编码端设备在基础划分方式的基础上,采用目标衍生模式将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块,从而实现对当前待编码图像块的划分。也就是说,本申请中的编码端设备通过划分方式和衍生模式的结合,标识出多种不同的划分结果,丰富了图像块的划分方式,能够适应于各种纹理特性的视频图像。In implementation mode A, after determining the basis division manner of the current image block to be encoded and the target derivation mode of the sub image block in the current image block to be encoded, the encoding device divides the current image block to be encoded into N according to the basic division manner. And sub-image blocks, and deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first derivative image block according to the derivative manner indicated by the target derived mode. Further, in a case where the first derivative image block is not divided, the encoding device encodes the first derivative image block to obtain a code stream including a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, And transmitting the code stream to the decoding device. Here, the target derivative mode is one of a set of candidate derivative modes, and the candidate derivative mode set includes M (M is an integer greater than or equal to 0) preset derivation mode, and each of the preset derivation modes is used for the unique indication one. The derivative method is used to derive at least two adjacent sub-image blocks of the above N sub-image blocks into one derived image block. The division identifier of the current image block to be encoded is used to indicate a basic division manner, and the derived identifier of the current image block to be encoded is used to indicate the target derivative mode. The coding end device in the present application derives at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block by using the target derivation mode on the basis of the basic division mode, thereby realizing the current image block to be encoded. Division. That is to say, the coding end device in the present application identifies a plurality of different division results by combining the division mode and the derivative mode, enriches the division manner of the image block, and can adapt to video images of various texture characteristics.
在实现方式B中,编码装置在确定当前待编码图像块的基础划分方式以及当前待编码图像块的特征参数后,根据该基础划分方式,将当前待编码图像块划分为N个子图像块,并在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,解析码流,确定当前待编码图像块中子图像块的目标衍生模式,这样,该编码装置根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。进一步地,在对第一衍生图像块不划分的情况下,编码装置对第一衍生图像块进行编码,得到包括当前待编码图像块的划分标识和当前待编码图像块的衍生标识的码流,并向解码装置发送该码流。编码装置只有在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,才确定目标衍生模式,相比于上述实现方式A,实现方式B有效的提高了编码效率,且码流占用的传输资源较小。在实际应用中,相比于实现方式A,实现方式B更易于实现。In implementation B, after determining the basic division manner of the current image block to be encoded and the feature parameter of the current image block to be encoded, the encoding device divides the current image block to be encoded into N sub-image blocks according to the basic division manner, and If the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, parsing the code stream, determining a target derivative mode of the sub image block in the current image block to be encoded, such that the encoding device indicates according to the target derivative mode The derivative method is to derive at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block. Further, in a case where the first derivative image block is not divided, the encoding device encodes the first derivative image block to obtain a code stream including a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, And transmitting the code stream to the decoding device. The encoding device determines the target derivative mode only when the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold. Compared with the foregoing implementation manner A, the implementation B effectively improves the coding efficiency, and the code The transmission resources occupied by the stream are small. In practical applications, implementation B is easier to implement than implementation A.
上述编码装置可以为视频编码器(如下图8所示),也可以为具备实现上述实现方式A或上述实现方式B功能的设备。The above encoding device may be a video encoder (as shown in FIG. 8 below), or may be a device having the functions of implementing the above-described implementation A or the above-described implementation B.
本申请提供的编解码方法适用于视频编解码系统。图7示出了视频编解码系统的结构。The codec method provided by the present application is applicable to a video codec system. Fig. 7 shows the structure of a video codec system.
如图7所示,视频编解码系统包含源装置70和目的装置71。源装置70产生经过编码后的视频数据,源装置70也可以被称为视频编码装置或视频编码设备,目的装置71可以对源装置70产生的经过编码后的视频数据进行解码,目的装置71也可以被称为视频解码装置或视频解码设备。源装置70和/或目的装置71可包含至少一个处理器以及耦合到所述至少一个处理器的存储器。所述存储器可包含但不限于只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、带电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、快闪存储器或可用于以可由计算机存取的指令或数据结构的形式存储所要的程序代码的任何其它媒体,本申请对此不作具体限定。As shown in FIG. 7, the video codec system includes a source device 70 and a destination device 71. The source device 70 generates encoded video data, and the source device 70 may also be referred to as a video encoding device or a video encoding device. The destination device 71 may decode the encoded video data generated by the source device 70, and the destination device 71 also It may be referred to as a video decoding device or a video decoding device. Source device 70 and/or destination device 71 can include at least one processor and a memory coupled to the at least one processor. The memory may include, but is not limited to, a read-only memory (ROM), a random access memory (RAM), and an electrically erasable programmable read-only memory (EEPROM). The flash memory or any other medium that can be used to store the desired program code in the form of an instruction or data structure accessible by the computer is not specifically limited herein.
源装置70和目的装置71可以包括各种装置,包含桌上型计算机、移动计算装置、笔记本(例如,膝上型)计算机、平板计算机、机顶盒、例如所谓的“智能”电话等电话手持机、电视机、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机或其类似者。 Source device 70 and destination device 71 may comprise various devices, including desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set top boxes, telephone handsets such as so-called "smart" phones, A television, a camera, a display device, a digital media player, a video game console, an on-board computer or the like.
目的装置71可经由链路72从源装置70接收经编码视频数据。链路72可包括能 够将经编码视频数据从源装置70移动到目的装置71的一个或多个媒体和/或装置。在一个实例中,链路72可包括使得源装置70能够实时地将编码后的视频数据直接发射到目的装置71的一个或多个通信媒体。在此实例中,源装置70可根据通信标准(例如:无线通信协议)来调制编码后的视频数据,并且可以将调制后的视频数据发射到目的装置71。上述一个或多个通信媒体可包含无线和/或有线通信媒体,例如:射频(Radio Frequency,RF)频谱、一个或多个物理传输线。上述一个或多个通信媒体可形成基于分组的网络的一部分,基于分组的网络(例如,局域网、广域网或全球网络(例如,因特网))的部分。上述一个或多个通信媒体可以包含路由器、交换器、基站,或者实现从源装置70到目的装置71的通信的其它设备。 Destination device 71 may receive encoded video data from source device 70 via link 72. Link 72 can include one or more media and/or devices capable of moving encoded video data from source device 70 to destination device 71. In one example, link 72 can include one or more communication media that enable source device 70 to transmit encoded video data directly to destination device 71 in real time. In this example, source device 70 may modulate the encoded video data in accordance with a communication standard (eg, a wireless communication protocol) and may transmit the modulated video data to destination device 71. The one or more communication media may include wireless and/or wired communication media, such as a radio frequency (RF) spectrum, one or more physical transmission lines. The one or more communication media described above may form part of a packet-based network, a portion of a packet-based network (eg, a local area network, a wide area network, or a global network (eg, the Internet)). The one or more communication media described above may include routers, switches, base stations, or other devices that enable communication from source device 70 to destination device 71.
在另一实例中,可将编码后的视频数据从输出接口703输出到存储装置73。类似地,可通过输入接口713从存储装置73存取编码后的视频数据。存储装置73可包含多种本地存取式数据存储媒体,例如蓝光光盘、高密度数字视频光盘(Digital Video Disc,DVD)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、快闪存储器,或用于存储经编码视频数据的其它合适数字存储媒体。In another example, the encoded video data can be output from the output interface 703 to the storage device 73. Similarly, the encoded video data can be accessed from storage device 73 via input interface 713. The storage device 73 can include a variety of local access data storage media, such as Blu-ray Disc, High Density Digital Video Disc (DVD), Compact Disc Read-Only Memory (CD-ROM), flash. Memory, or other suitable digital storage medium for storing encoded video data.
在另一实例中,存储装置73可对应于文件服务器或存储由源装置70产生的编码后的视频数据的另一中间存储装置。在此实例中,目的装置71可经由流式传输或下载从存储装置73获取其存储的视频数据。文件服务器可为任何类型的能够存储经编码的视频数据并且将经编码的视频数据发射到目的装置71的服务器。例如,文件服务器可以包含全球广域网(World Wide Web,Web)服务器(例如,用于网站)、文件传送协议(File Transfer Protocol,FTP)服务器、网络附加存储(Network Attached Storage,NAS)装置以及本地磁盘驱动器。In another example, storage device 73 may correspond to a file server or another intermediate storage device that stores encoded video data generated by source device 70. In this example, destination device 71 may retrieve its stored video data from storage device 73 via streaming or download. The file server can be any type of server capable of storing encoded video data and transmitting the encoded video data to the destination device 71. For example, the file server may include a World Wide Web (Web) server (for example, for a website), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, and a local disk. driver.
目的装置71可通过任何标准数据连接(例如,因特网连接)存取编码后的视频数据。数据连接的实例类型包含适合于存取存储于文件服务器上的编码后的视频数据的无线信道、有线连接(例如,缆线调制解调器等),或两者的组合。编码后的视频数据从文件服务器的发射可为流式传输、下载传输或两者的组合。The destination device 71 can access the encoded video data over any standard data connection (e.g., an internet connection). The instance type of the data connection includes a wireless channel, a wired connection (e.g., a cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server. The transmission of the encoded video data from the file server may be streaming, downloading, or a combination of both.
本申请的编解码方法不限于无线应用场景,示例性的,本申请的编解码方法可以应用于支持以下应用等多种多媒体应用的视频编解码:空中电视广播、有线电视发射、卫星电视发射、流式传输视频发射(例如,经由因特网)、存储于数据存储媒体上的视频数据的编码、存储于数据存储媒体上的视频数据的解码,或其它应用。在一些实例中,视频编解码系统1可经配置以支持单向或双向视频发射,以支持例如视频流式传输、视频播放、视频广播及/或视频电话等应用。The codec method of the present application is not limited to a wireless application scenario. Illustratively, the codec method of the present application can be applied to video codec supporting multiple multimedia applications such as the following applications: aerial television broadcasting, cable television transmission, satellite television transmission, Streaming video transmission (e.g., via the Internet), encoding of video data stored on a data storage medium, decoding of video data stored on a data storage medium, or other application. In some examples, video codec system 1 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
需要说明的是,图7示出的视频编解码系统仅仅是视频编解码系统的示例,并不是对本申请中视频编解码系统的限定。本申请提供的编解码方法还可适用于编码装置与解码装置之间无数据通信的场景。在其它实例中,待编码视频数据或编码后的视频数据可以从本地存储器检索,也可以在网络上流式传输等。视频编码装置可对待编码视频数据进行编码并且将编码后的视频数据存储到存储器,视频解码装置也可从存储器中获取编码后的视频数据并且对该编码后的视频数据进行解码。It should be noted that the video codec system shown in FIG. 7 is only an example of a video codec system, and is not a limitation of the video codec system in this application. The codec method provided by the present application is also applicable to a scenario where there is no data communication between the encoding device and the decoding device. In other examples, the video data to be encoded or the encoded video data may be retrieved from a local memory, streamed over a network, or the like. The video encoding device may encode the encoded video data and store the encoded video data to a memory, and the video decoding device may also acquire the encoded video data from the memory and decode the encoded video data.
在图7中,源装置70包含视频源701、视频编码器702和输出接口703。在一些实例中,输出接口703可包含调节器/解调器(调制解调器)和/或发射器。视频源701 可包括视频捕获装置(例如,摄像机)、含有先前捕获的视频数据的视频存档、用以从视频内容提供者接收视频数据的视频输入接口,和/或用于产生视频数据的计算机图形系统,或视频数据的此些来源的组合。In FIG. 7, source device 70 includes a video source 701, a video encoder 702, and an output interface 703. In some examples, output interface 703 can include a regulator/demodulator (modem) and/or a transmitter. Video source 701 can include a video capture device (eg, a video camera), a video archive containing previously captured video data, a video input interface to receive video data from a video content provider, and/or a computer graphic for generating video data. A combination of systems, or such sources of video data.
视频编码器702可对来自视频源701的视频数据进行编码。在一些实例中,源装置70经由输出接口703将编码后的视频数据直接发射到目的装置71。在其它实例中,编码后的视频数据还可存储到存储装置73上,供目的装置71稍后存取来用于解码和/或播放。 Video encoder 702 can encode video data from video source 701. In some examples, source device 70 transmits the encoded video data directly to destination device 71 via output interface 703. In other examples, the encoded video data may also be stored on storage device 73 for later access by destination device 71 for decoding and/or playback.
在图7的实例中,目的装置71包含显示装置711、视频解码器712以及输入接口713。在一些实例中,输入接口713包含接收器和/或调制解调器。输入接口713可经由链路72和/或从存储装置73接收编码后的视频数据。显示装置711可与目的装置71集成或可在目的装置71外部。一般来说,显示装置711显示解码后的视频数据。显示装置711可包括多种显示装置,例如,液晶显示器、等离子显示器、有机发光二极管显示器或其它类型的显示装置。In the example of FIG. 7, destination device 71 includes display device 711, video decoder 712, and input interface 713. In some examples, input interface 713 includes a receiver and/or a modem. Input interface 713 can receive encoded video data via link 72 and/or from storage device 73. The display device 711 can be integrated with the destination device 71 or can be external to the destination device 71. Generally, the display device 711 displays the decoded video data. Display device 711 can include a variety of display devices, such as liquid crystal displays, plasma displays, organic light emitting diode displays, or other types of display devices.
可选的,视频编码器702和视频解码器712可各自与音频编码器和解码器集成,且可包含适当的多路复用器-多路分用器单元或其它硬件和软件,以处置共同数据流或单独数据流中的音频和视频两者的编码。Alternatively, video encoder 702 and video decoder 712 may each be integrated with an audio encoder and decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and software to handle common Encoding of both audio and video in a data stream or in a separate data stream.
视频编码器702和视频解码器712可以包括至少一个微处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application-Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、离散逻辑、硬件或其任何组合。若本申请提供的编解码方法采用软件实现,则可将用于软件的指令存储在合适的非易失性计算机可读存储媒体中,且可使用至少一个处理器在硬件中执行所述指令从而实施本申请。前述内容(包含硬件、软件、硬件与软件的组合等)中的任一者可被视为至少一个处理器。视频编码器702可以包含在编码器中,视频解码器712可包含在解码器中,所述编码器或解码器可以为相应装置中组合编码器/解码器(编码解码器)中的一部分。The video encoder 702 and the video decoder 712 may include at least one microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and a field programmable gate array (Field Programmable). Gate Array, FPGA), discrete logic, hardware, or any combination thereof. If the codec method provided by the present application is implemented in software, the instructions for the software may be stored in a suitable non-transitory computer readable storage medium, and the instructions may be executed in hardware using at least one processor Implement this application. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) can be considered at least one processor. Video encoder 702 may be included in an encoder, and video decoder 712 may be included in a decoder, which may be part of a combined encoder/decoder (codec) in a respective device.
本申请中的视频编码器702和视频解码器712可以根据视频压缩标准(例如HEVC)操作,也可根据其它业界标准操作,本申请对此不作具体限定。The video encoder 702 and the video decoder 712 in this application may be operated according to a video compression standard (for example, HEVC), and may also be operated according to other industry standards, which is not specifically limited herein.
视频编码器702用于确定当前待编码图像块的基础划分方式以及当前待编码图像块中子图像块的目标衍生模式,或者确定当前待编码图像块的基础划分方式以及当前待编码图像块的特征参数,在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,确定当前待编码图像块中子图像块的目标衍生模式;根据基础划分方式,将当前待编码图像块划分为N(N为大于或等于2的整数)个子图像块,以及根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。这样,在视频编码器702不需要对第一衍生图像块进行划分的情况下,视频编码器702对第一衍生图像块进行编码,得到码流并向视频解码器712发送该码流。在视频编码器702还需要对第一衍生图像块进行划分的情况下,视频编码器702将该第一衍生图像块确定为当前待编码图像块,并重复执行上述过程,直至重新得到的第一衍生图像块不再进行划分。The video encoder 702 is configured to determine a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded, or determine a basic division manner of the current image block to be encoded and a feature of the current image block to be encoded. a parameter, in a case where the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, determining a target derivative mode of the sub image block in the current image block to be encoded; and dividing the current image block to be encoded according to the basic division mode At least N (N is an integer greater than or equal to 2) sub-image blocks, and at least two adjacent sub-image blocks of the N sub-image blocks are derived as the first derivative image block according to a derivative manner indicated by the target derived mode. Thus, where video encoder 702 does not need to partition the first derived image block, video encoder 702 encodes the first derived image block, resulting in a code stream and transmitting the code stream to video decoder 712. In the case that the video encoder 702 further needs to divide the first derived image block, the video encoder 702 determines the first derived image block as the current image block to be encoded, and repeatedly performs the above process until the first obtained. Derived image blocks are no longer partitioned.
可选的,上述“视频编码器702确定当前待编码图像块的基础划分方式”的方法 可以为:视频编码器702确定与当前待编码图像对应的至少两种候选划分方式,并计算至少两种候选划分方式中的每种候选划分方式的率失真代价,这样,视频编码器702将最小的率失真代价对应的候选划分方式确定为基础划分方式。Optionally, the method that the video encoder 702 determines the basic division manner of the current image block to be encoded may be: the video encoder 702 determines at least two candidate division manners corresponding to the current image to be encoded, and calculates at least two types. The rate-distortion cost of each of the candidate partitioning modes is such that the video encoder 702 determines the candidate partitioning mode corresponding to the smallest rate-distortion cost as the basic partitioning mode.
上述“视频编码器702确定当前待编码图像块中子图像块的目标衍生模式”的方法可以为:该视频编码器702计算候选衍生模式集合中的每种预设衍生模式的率失真代价,并将最小的率失真代价对应的预设衍生模式确定为目标衍生模式。The method of “the video encoder 702 determining the target derived mode of the sub-image block in the current image block to be encoded” may be: the video encoder 702 calculates a rate distortion cost of each of the preset derivative modes in the candidate derived mode set, and The preset derivative mode corresponding to the minimum rate distortion cost is determined as the target derivative mode.
参考下述图11A或图11B,视频解码器712用于:解析码流,确定当前待解码图像块的基础划分方式以及当前待解码图像块中子图像块的目标衍生模式(S111);或者,解析码流,确定当前待解码图像块的基础划分方式以及当前待解码图像块的特征参数(S111a),并判断当前待解码图像块的特征参数是否小于或等于第一预设阈值(S111b),在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,解析码流,确定当前待解码图像块中子图像块的目标衍生模式(S111c)。后续,视频解码器712根据基础划分方式,将当前待解码图像块划分为N个子图像块(S112),并根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块(S113)。进一步地,视频解码器712对第一衍生图像块进行解码(S114)。Referring to FIG. 11A or FIG. 11B described below, the video decoder 712 is configured to: parse the code stream, determine a basic division manner of the current image block to be decoded, and a target derivative mode of the sub image block in the current image block to be decoded (S111); or Parsing the code stream, determining a basic division manner of the current image block to be decoded, and a feature parameter of the current image block to be decoded (S111a), and determining whether the feature parameter of the current image block to be decoded is less than or equal to a first preset threshold (S111b), In a case that the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, the code stream is parsed to determine a target derivative mode of the sub-image block in the current image block to be decoded (S111c). Subsequently, the video decoder 712 divides the current image block to be decoded into N sub-image blocks according to the basic division manner (S112), and at least two adjacent sub-N of the N sub-image blocks according to the derivative manner indicated by the target derivative mode. The image block is derived as a first derived image block (S113). Further, the video decoder 712 decodes the first derived image block (S114).
图8是本申请实施例中视频编码器702的一种示意性框图。视频编码器702可执行视频条带内的视频块的帧内编码和帧间编码。帧内编码依赖于空间预测来减少或去除给定视频帧或图像内的视频的空间冗余。帧间编码依赖于时间预测来减少或去除视频序列的邻近帧或图像内的视频的时间冗余。帧内编码模式(I模式)可指若干基于空间的压缩模式中的任一者。例如单向预测(P模式)或双向预测(B模式)等。帧间编码模式可指若干基于时间的压缩模式中的任一者。FIG. 8 is a schematic block diagram of a video encoder 702 in the embodiment of the present application. Video encoder 702 may perform intra coding and inter coding of video blocks within a video strip. Intra coding relies on spatial prediction to reduce or remove spatial redundancy of video within a given video frame or image. Inter-coding relies on temporal prediction to reduce or remove temporal redundancy of adjacent frames of a video sequence or video within an image. The intra coding mode (I mode) may refer to any of a number of space based compression modes. For example, one-way prediction (P mode) or bidirectional prediction (B mode). The inter coding mode may refer to any of a number of time based compression modes.
在图8的可行的实施方式中,视频编码器702包括分割单元81、变换单元82、量化单元83、预测单元84、熵编码单元85、参考图像存储器88以及求和器802。预测单元84包括运动估计单元841、运动补偿单元842和帧内预测单元843。对于视频块重构建,视频编码器702也包括反量化单元86、反变换单元87和求和器801。除此之外,视频编码器702还可以包括解块滤波器(图8中未展示),该解块滤波器用于以对块边界进行滤波从而从经重构建视频中去除块效应伪影。在需要时,解块滤波器将通常对求和器801的输出进行滤波。除了解块滤波器之外,视频编码器702还可以包括额外环路滤波器(环路内或环路后)。In the possible embodiment of FIG. 8, video encoder 702 includes a partitioning unit 81, a transform unit 82, a quantization unit 83, a prediction unit 84, an entropy encoding unit 85, a reference image memory 88, and a summer 802. The prediction unit 84 includes a motion estimation unit 841, a motion compensation unit 842, and an intra prediction unit 843. For video block reconstruction, video encoder 702 also includes inverse quantization unit 86, inverse transform unit 87, and summer 801. In addition, video encoder 702 can also include a deblocking filter (not shown in FIG. 8) for filtering block boundaries to remove blockiness artifacts from the reconstructed video. The deblocking filter will typically filter the output of summer 801 as needed. In addition to the deblocking filter, video encoder 702 may also include additional loop filters (in-loop or post-loop).
如图8中所展示,视频编码器702接收视频数据,且分割单元81将数据分割成视频块。此分割也可包含分割成条带(slice)、图像块或其它较大单元,以及(例如)根据LCU及CU的四叉树结构进行视频块分割。示例性的,视频编码器702编码在待编码的视频条带内的视频块的组件。一般的,条带可划分成多个视频块(且可能划分成称作图像块的视频块的集合)。As shown in FIG. 8, video encoder 702 receives video data, and segmentation unit 81 segments the data into video blocks. This partitioning may also include partitioning into slices, image blocks, or other larger units, and, for example, video block partitioning based on the quadtree structure of the LCU and CU. Illustratively, video encoder 702 encodes components of a video block within a video strip to be encoded. In general, a stripe may be partitioned into multiple video blocks (and possibly into a collection of video blocks called image blocks).
预测单元84可基于编码质量与代价计算结果(例如率失真代价(Rate Distortion cost,RD cost))选择当前视频块的多个可能编码模式中的一者,例如多个帧内编码模式中的一者或多个编码解码模式中的一者。预测单元84可将所得经帧内编码或经帧间编码块提供到求和器802以产生残余块数据,且将所得经帧内解码或经帧间解码提 供到求和器801以重构建经编码块从而用作参考图像。 Prediction unit 84 may select one of a plurality of possible coding modes of the current video block based on the coding quality and the cost calculation result (eg, Rate Distortion cost (RD cost)), such as one of a plurality of intra coding modes. One of a plurality of code decoding modes. Prediction unit 84 may provide the resulting intra-coded or inter-coded block to summer 802 to generate residual block data, and provide the resulting intra-coded or inter-coded decoding to summer 801 to reconstruct the The coded block is thus used as a reference image.
预测单元84内的运动估计单元841及运动补偿单元842执行相对于一个或多个参考图像中的一个或多个预测块的当前视频块的帧间预测解码以提供时间压缩。运动估计单元841可经配置以根据视频序列的预定模式确定视频条带的帧间预测模式。预定模式可将序列中的视频条带指定为P条带、B条带或GPB条带。运动估计单元841及运动补偿单元842可高度集成,但为概念目的而分别说明。通过运动估计单元841所执行的运动估计为产生估计视频块的运动矢量的过程。例如,运动矢量可指示当前视频帧或图像内的视频块的PU相对于参考图像内的预测块的位移。 Motion estimation unit 841 and motion compensation unit 842 within prediction unit 84 perform inter-predictive decoding of the current video block relative to one or more of the one or more reference pictures to provide temporal compression. Motion estimation unit 841 can be configured to determine an inter prediction mode for the video stripe based on a predetermined pattern of the video sequence. The predetermined mode specifies the video strips in the sequence as P strips, B strips, or GPB strips. Motion estimation unit 841 and motion compensation unit 842 are highly integrated, but are illustrated separately for conceptual purposes. The motion performed by the motion estimation unit 841 is estimated as a process of generating a motion vector of the estimated video block. For example, the motion vector may indicate the displacement of the PU of the video block within the current video frame or image relative to the predicted block within the reference image.
预测块为依据像素差而被发现为紧密匹配待解码的视频块的PU的块,像素差可通过绝对差和(Sum of Absolute Differences,SAD)、平方差和(Sum of Squared Differences,SSD)或其它差度量确定。在一些可行的实施方式中,视频编码器702可计算存储于参考图像存储器88中的参考图像的子整数(sub-integer)像素位置的值。例如,视频编码器702可内插参考图像的四分之一像素位置、八分之一像素位置或其它分数像素位置的值。因此,运动估计单元841可执行相对于全像素位置及分数像素位置的运动搜索且输出具有分数像素精确度的运动矢量。The prediction block is a block of PUs that are found to closely match the video block to be decoded according to the pixel difference, and the pixel difference may be Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD) or Other difference metrics are determined. In some possible implementations, video encoder 702 can calculate a value of a sub-integer pixel location of a reference image stored in reference image memory 88. For example, video encoder 702 can interpolate values of a quarter pixel position, an eighth pixel position, or other fractional pixel position of a reference image. Accordingly, the motion estimation unit 841 can perform motion search with respect to the full pixel position and the fractional pixel position and output a motion vector having fractional pixel precision.
运动估计单元841通过比较PU的位置与参考图像的预测块的位置而计算经帧间解码条带中的视频块的PU的运动矢量。可从第一参考图像列表(列表0)或第二参考图像列表(列表1)选择参考图像,列表中的每一者识别存储于参考图像存储器88中的一个或多个参考图像。运动估计单元841将经计算运动矢量发送到熵编码单元85及运动补偿单元842。The motion estimation unit 841 calculates a motion vector of the PU of the video block in the inter-decoded slice by comparing the position of the PU with the position of the prediction block of the reference image. The reference images may be selected from a first reference image list (List 0) or a second reference image list (List 1), each of the lists identifying one or more reference images stored in the reference image memory 88. The motion estimation unit 841 transmits the calculated motion vector to the entropy encoding unit 85 and the motion compensation unit 842.
由运动补偿单元842执行的运动补偿可涉及基于由运动估计所确定的运动矢量提取或产生预测块,可能执行到子像素精确度的内插。在接收当前视频块的PU的运动矢量后,运动补偿单元842即可在参考图像列表中的一者中定位运动矢量所指向的预测块。视频编码器702通过从正经解码的当前视频块的像素值减去预测块的像素值来形成残余视频块,从而形成像素差值。像素差值形成块的残余数据,且可包含亮度及色度差分量两者。求和器801表示执行此减法运算的一个或多个组件。运动补偿单元842也可产生与视频块及视频条带相关联的语法元素以供视频解码器712用于解码视频条带的视频块。Motion compensation performed by motion compensation unit 842 may involve extracting or generating a prediction block based on motion vectors determined by motion estimation, possibly performing interpolation to sub-pixel precision. After receiving the motion vector of the PU of the current video block, motion compensation unit 842 may locate the prediction block pointed to by the motion vector in one of the reference image lists. Video encoder 702 forms a residual video block by subtracting the pixel values of the prediction block from the pixel values of the current video block being decoded, thereby forming pixel difference values. The pixel difference values form residual data for the block and may include both luminance and chrominance difference components. Summer 801 represents one or more components that perform this subtraction. Motion compensation unit 842 may also generate syntax elements associated with video blocks and video slices for use by video decoder 712 to decode video blocks of the video strip.
如果PU位于B条带中,则含有PU的图像可与称作“列表0”和“列表1”的两个参考图像列表相关联。在一些可行的实施方式中,含有B条带的图像可与为列表0和列表1的组合的列表组合相关联。If the PU is located in a B-strip, the PU-containing image may be associated with two reference image lists called "List 0" and "List 1". In some possible implementations, an image containing B strips may be associated with a list combination that is a combination of List 0 and List 1.
此外,如果PU位于B条带中,则运动估计单元841可针对PU执行单向预测或双向预测,其中,在一些可行的实施方式中,双向预测为分别基于列表0和列表1的参考图像列表的图像进行的预测,在另一些可行的实施方式中,双向预测为分别基于当前帧在显示顺序上的已重建的未来帧和已重建的过去帧进行的预测。当运动估计单元841针对PU执行单向预测时,运动估计单元841可在列表0或列表1的参考图像中搜索用于PU的参考块。运动估计单元841可接着产生指示列表0或列表1中的含有参考块的参考图像的参考索引和指示PU与参考块之间的空间位移的运动矢量。运动估计单元841可输出参考索引、预测方向标识和运动矢量作为PU的运动信息。预 测方向标识可指示参考索引指示列表0或列表1中的参考图像。运动补偿单元842可基于由PU的运动信息指示的参考块产生PU的预测图像块。Furthermore, if the PU is located in a B-strip, motion estimation unit 841 can perform uni-directional prediction or bi-directional prediction for the PU, wherein, in some possible implementations, bi-directional prediction is based on list of reference pictures of list 0 and list 1, respectively. The prediction performed by the image, in other possible embodiments, the bidirectional prediction is prediction based on the reconstructed future frame and the reconstructed past frame in the display order of the current frame, respectively. When the motion estimation unit 841 performs unidirectional prediction for the PU, the motion estimation unit 841 may search for a reference block for the PU in the reference image of list 0 or list 1. Motion estimation unit 841 may then generate a reference index indicating a reference picture containing the reference block in list 0 or list 1 and a motion vector indicating a spatial displacement between the PU and the reference block. The motion estimation unit 841 may output a reference index, a prediction direction identifier, and a motion vector as motion information of the PU. The predicted direction indicator may indicate that the reference index indicates a reference picture in list 0 or list 1. Motion compensation unit 842 may generate a predicted image block of the PU based on the reference block indicated by the motion information of the PU.
当运动估计单元841针对PU执行双向预测时,运动估计单元841可在列表0中的参考图像中搜索用于PU的参考块且还可在列表1中的参考图像中搜索用于PU的另一参考块。运动估计单元841可接着产生指示列表0和列表1中的含有参考块的参考图像的参考索引和指示参考块与PU之间的空间位移的运动矢量。运动估计单元841可输出PU的参考索引和运动矢量作为PU的运动信息。运动补偿单元842可基于由PU的运动信息指示的参考块产生PU的预测图像块。When the motion estimation unit 841 performs bidirectional prediction for the PU, the motion estimation unit 841 may search for a reference block for the PU in the reference image in the list 0 and may also search for another one for the PU in the reference image in the list 1 Reference block. Motion estimation unit 841 may then generate a reference index indicating the reference picture containing the reference block in list 0 and list 1 and a motion vector indicating the spatial displacement between the reference block and the PU. The motion estimation unit 841 may output a reference index of the PU and a motion vector as motion information of the PU. Motion compensation unit 842 may generate a predicted image block of the PU based on the reference block indicated by the motion information of the PU.
在一些可行的实施方式中,运动估计单元841不向熵编码单元85输出用于PU的运动信息的完整集合。而是,运动估计单元841可参考另一PU的运动信息来用信号通知PU的运动信息。举例来说,运动估计单元841可确定PU的运动信息充分类似于相邻PU的运动信息。在此实施方式中,运动估计单元841可在与PU相关联的语法结构中指示一个指示值,所述指示值向视频解码器712指示PU具有与相邻PU相同的运动信息或具有可从相邻PU导出的运动信息。在另一实施方式中,运动估计单元841可在与PU相关联的语法结构中识别与相邻PU相关联的候选预测运动矢量和运动矢量差(Motion Vector Difference,MVD)。MVD指示PU的运动矢量和与相邻PU相关联的所指示候选预测运动矢量之间的差。视频解码器712可使用所指示候选预测运动矢量和MVD来确定PU的运动矢量。In some possible implementations, motion estimation unit 841 does not output a complete set of motion information for the PU to entropy encoding unit 85. Rather, the motion estimation unit 841 can signal the motion information of the PU with reference to motion information of another PU. For example, motion estimation unit 841 can determine that the motion information of the PU is sufficiently similar to the motion information of the neighboring PU. In this embodiment, motion estimation unit 841 can indicate an indication value in a syntax structure associated with the PU that indicates to video decoder 712 that the PU has the same motion information as the neighboring PU or has a slave phase The motion information derived by the neighboring PU. In another embodiment, motion estimation unit 841 can identify candidate predicted motion vectors and Motion Vector Differences (MVDs) associated with neighboring PUs in a syntax structure associated with the PU. The MVD indicates the difference between the motion vector of the PU and the indicated candidate predicted motion vector associated with the neighboring PU. Video decoder 712 may determine the motion vector of the PU using the indicated candidate predicted motion vector and MVD.
如前文所描述,预测单元84可产生用于CU的每一PU的候选预测运动矢量列表。候选预测运动矢量列表中的一或多者可包括一或多个原始候选预测运动矢量和从原始候选预测运动矢量导出的一或多个额外候选预测运动矢量。As described above, prediction unit 84 may generate a list of candidate predicted motion vectors for each PU of the CU. One or more of the candidate predicted motion vector lists may include one or more original candidate predicted motion vectors and one or more additional candidate predicted motion vectors derived from the original candidate predicted motion vectors.
预测单元84内的帧内预测单元843可执行相对于在与待解码的当前块相同的图像或条带中的一个或多个相邻块的当前视频块的帧内预测解码以提供空间压缩。因此,作为通过运动估计单元841及运动补偿单元842执行的帧间预测(如前文所描述)的替代,帧内预测单元843可帧内预测当前块。明确的说,帧内预测单元843可确定用以编码当前块的帧内预测模式。在一些可行的实施方式中,帧内预测单元843可(例如)在单独编码遍历期间使用各种帧内预测模式来编码当前块,且帧内预测单元843可从经测试模式选择使用的适当帧内预测模式。 Intra prediction unit 843 within prediction unit 84 may perform intra-predictive decoding of the current video block relative to one or more neighboring blocks in the same image or slice as the current block to be decoded to provide spatial compression. Accordingly, instead of inter prediction (as described above) performed by motion estimation unit 841 and motion compensation unit 842, intra prediction unit 843 may intra-predict the current block. In particular, intra prediction unit 843 can determine an intra prediction mode to encode the current block. In some possible implementations, intra-prediction unit 843 can encode the current block using various intra-prediction modes, for example, during a separate encoding traversal, and intra-prediction unit 843 can select the appropriate frame to use from the tested mode. Internal prediction mode.
在预测单元84经由帧间预测或帧内预测产生当前视频块的预测块之后,视频编码器702通过从当前视频块减去预测块而形成残余视频块。残余块中的残余视频数据可包括于一个或多个TU中且应用于变换单元82。变换单元82使用例如离散余弦变换(Discrete Cosine Transform,DCT)或概念上类似的变换的变换(例如,离散正弦变换(DST for Discrete Sine Transform,DST))将残余视频数据变换成残余变换系数。变换单元82可将残余视频数据从像素域转换到变换域(例如,频域)。After prediction unit 84 generates a prediction block for the current video block via inter prediction or intra prediction, video encoder 702 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and applied to transform unit 82. The transform unit 82 transforms the residual video data into residual transform coefficients using, for example, a Discrete Cosine Transform (DCT) or a transform of a conceptually similar transform (for example, DST for Discrete Sine Transform (DST)). Transform unit 82 may convert the residual video data from the pixel domain to a transform domain (eg, a frequency domain).
变换单元82可将所得变换系数发送到量化单元83。量化单元83对变换系数进行量化以进一步减小码率。量化过程可减少与系数中的一些或全部相关联的比特深度。可通过调整量化参数来修改量化的程度。在一些可行的实施方式中,量化单元83可接着执行包含经量化变换系数的矩阵的扫描。替代的,熵编码单元85可执行扫描。 Transform unit 82 may send the resulting transform coefficients to quantization unit 83. The quantization unit 83 quantizes the transform coefficients to further reduce the code rate. The quantization process can reduce the bit depth associated with some or all of the coefficients. The degree of quantization can be modified by adjusting the quantization parameters. In some possible implementations, quantization unit 83 may then perform a scan of the matrix containing the quantized transform coefficients. Alternatively, the entropy encoding unit 85 may perform scanning.
在量化之后,熵编码单元85可熵编码经量化变换系数。例如,熵编码单元85可 执行上下文自适应性可变长度编码(Context-Adaptive Varialbe-Length Coding,CAVLC)、上下文自适应性二进制算术编码(Context-based Adaptive Binary Arithmetic Coding,CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PIPE)解码或另一熵编码方法或技术。熵编码单元85也可熵编码正经解码的当前视频条带的运动矢量及其它语法元素。在通过熵编码单元85进行熵编码之后,可将经编码码流传输到视频解码器712或存档以供稍后传输或由视频解码器712检索。After quantization, entropy encoding unit 85 may entropy encode the quantized transform coefficients. For example, the entropy encoding unit 85 may perform Context-Adaptive Varial-Length Coding (CAVLC), Context-based Adaptive Binary Arithmetic Coding (CABAC), and grammar-based Context Adaptive Binary Arithmetic Decoding (SBAC), Probability Interval Partition Entropy (PIPE) decoding or another entropy encoding method or technique. Entropy encoding unit 85 may also entropy encode the motion vectors and other syntax elements of the current video strip being decoded. After entropy encoding by entropy encoding unit 85, the encoded code stream may be transmitted to video decoder 712 or archive for later transmission or retrieved by video decoder 712.
反量化单元86及反变换单元87分别应用反量化及反变换,以在像素域中重构建残余块以供稍后用作参考图像的参考块。运动补偿单元842可通过将残余块与参考图像列表中的一者内的参考图像中的一者的预测块相加来计算参考块。运动补偿单元842也可将一个或多个内插滤波器应用于经重构建残余块以计算子整数像素值以用于运动估计。求和器801将经重构建残余块与通过运动补偿单元842所产生的经运动补偿的预测块相加以产生参考块以供存储于参考图像存储器88中。参考块可由运动估计单元841及运动补偿单元842用作参考块以帧间预测后续视频帧或图像中的块。The inverse quantization unit 86 and the inverse transform unit 87 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain for later use as a reference block of the reference image. Motion compensation unit 842 may calculate the reference block by adding the residual block to a prediction block of one of the reference pictures within one of the reference picture lists. Motion compensation unit 842 may also apply one or more interpolation filters to the reconstructed residual block to calculate sub-integer pixel values for motion estimation. Summer 801 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 842 to produce a reference block for storage in reference image memory 88. The reference block may be used by the motion estimation unit 841 and the motion compensation unit 842 as reference blocks to inter-predict blocks in subsequent video frames or images.
应当理解的是,视频编码器702的其它的结构变化可用于编码视频流。例如,对于某些图像块或者图像帧,视频编码器702可以直接地量化残差信号而不需要经过变换单元82处理,相应地也不需要经反变换单元87处理;或者,对于某些图像块或者图像帧,视频编码器702没有产生残差数据,相应地不需要经变换单元82、量化单元83、反量化单元86和反变换单元87处理;或者,视频编码器702可以将经重构建的视频块作为参考块直接地进行存储而不需要经滤波器处理;或者,视频编码器702中量化单元83和反量化单元86可以合并在一起。It should be understood that other structural changes to video encoder 702 can be used to encode the video stream. For example, for certain image blocks or image frames, video encoder 702 may directly quantize the residual signal without the need for processing by transform unit 82, and accordingly need not be processed by inverse transform unit 87; or, for some image blocks Or the image frame, video encoder 702 does not generate residual data, and accordingly does not need to be processed by transform unit 82, quantization unit 83, inverse quantization unit 86, and inverse transform unit 87; alternatively, video encoder 702 can reconstruct the reconstructed The video block is stored directly as a reference block without filtering processing; alternatively, the quantization unit 83 and the inverse quantization unit 86 in the video encoder 702 can be combined.
图9是本申请实施例中视频解码器712的结构示意图。如图9所示,视频解码器712包含熵解码单元90、预测单元91、反量化单元94、反变换单元93、求和器95和参考图像存储器92。预测单元91包含运动补偿单元911和帧内预测单元912。在一些可行的实施方式中,视频解码器712可执行与关于来自图8的视频编码器702描述的编码流程的示例性地互逆的解码流程。FIG. 9 is a schematic structural diagram of a video decoder 712 in the embodiment of the present application. As shown in FIG. 9, video decoder 712 includes an entropy decoding unit 90, a prediction unit 91, an inverse quantization unit 94, an inverse transform unit 93, a summer 95, and a reference image memory 92. The prediction unit 91 includes a motion compensation unit 911 and an intra prediction unit 912. In some possible implementations, video decoder 712 can perform an exemplary reciprocal decoding process with respect to the encoding flow described by video encoder 702 from FIG.
在解码过程期间,视频解码器712从视频编码器702接收表示经编码视频条带的视频块及相关联的语法元素的经编码视频码流。视频解码器712的熵解码单元90熵解码码流以产生经量化系数、运动矢量及其它语法元素。熵解码单元90将运动矢量及其它语法元素转递到预测单元91。视频解码器712可在视频条带层级和/或视频块层级处接收语法元素。During the decoding process, video decoder 712 receives from video encoder 702 an encoded video code stream representing the video blocks of the encoded video slice and associated syntax elements. Entropy decoding unit 90 of video decoder 712 entropy decodes the code stream to produce quantized coefficients, motion vectors, and other syntax elements. The entropy decoding unit 90 forwards the motion vector and other syntax elements to the prediction unit 91. Video decoder 712 can receive syntax elements at the video stripe level and/or video block level.
在视频条带经解码为经帧内解码(I)条带时,预测单元91的帧内预测单元912可基于用信号发送的帧内预测模式及来自当前帧或图像的先前经解码块的数据而产生当前视频条带的视频块的预测数据。When the video stripe is decoded into an intra-coded (I) stripe, the intra-prediction unit 912 of the prediction unit 91 may be based on the signaled intra-prediction mode and data from the previously decoded block of the current frame or image. The predicted data of the video block of the current video stripe is generated.
在视频图像经解码为经帧间解码(例如,B、P或GPB)条带时,预测单元91的运动补偿单元911基于从熵解码单元90所接收的运动矢量及其它语法元素而产生当前视频图像的视频块的预测性块。预测性块可从参考图像列表中的一者内的参考图像中的一者产生。视频解码器712可基于存储于参考图像存储器92中的参考图像使用默认构建技术来构建参考图像列表(列表0及列表1)。When the video image is decoded into an inter-frame decoded (eg, B, P, or GPB) stripe, the motion compensation unit 911 of the prediction unit 91 generates the current video based on the motion vector and other syntax elements received from the entropy decoding unit 90. A predictive block of video blocks of an image. The predictive block may be generated from one of the reference images within one of the reference image lists. Video decoder 712 may construct a reference image list (List 0 and List 1) using default construction techniques based on reference images stored in reference image memory 92.
运动补偿单元911通过解析运动矢量及其它语法元素来确定当前视频条带的视频 块的预测信息,且使用预测信息来产生正经解码的当前视频块的预测性块。例如,运动补偿单元911使用所接收的语法元素中的一些来确定用以解码视频条带的视频块的预测模式(例如,帧内预测或帧间预测)、帧间预测条带类型(例如,B条带、P条带或GPB条带)、条带的参考图像列表中的一者或多者的构建信息、条带的每一经帧间编码视频块的运动矢量、条带的每一经帧间解码视频块的帧间预测状态及用以解码当前视频条带中的视频块的其它信息。 Motion compensation unit 911 determines the prediction information for the video block of the current video slice by parsing the motion vector and other syntax elements, and uses the prediction information to generate a predictive block of the current video block being decoded. For example, motion compensation unit 911 uses some of the received syntax elements to determine a prediction mode (eg, intra prediction or inter prediction) of a video block used to decode a video slice, an inter prediction slice type (eg, B strip, P strip, or GPB strip), construction information for one or more of the reference picture lists of the strip, motion vectors for each inter-coded video block of the strip, and each frame of the strip The inter prediction state of the decoded video block and other information used to decode the video block in the current video slice.
运动补偿单元911也可基于内插滤波器执行内插。运动补偿单元911可使用如由视频编码器702在视频块的编码期间所使用的内插滤波器来计算参考块的子整数像素的内插值。在此应用中,运动补偿单元911可从所接收的语法元素确定由视频编码器702使用的内插滤波器且使用内插滤波器来产生预测性块。 Motion compensation unit 911 can also perform interpolation based on the interpolation filter. Motion compensation unit 911 may use the interpolation filters as used by video encoder 702 during encoding of the video block to calculate interpolated values for sub-integer pixels of the reference block. In this application, motion compensation unit 911 can determine the interpolation filters used by video encoder 702 from the received syntax elements and use an interpolation filter to generate the predictive blocks.
如果PU是使用帧间预测而编码,则运动补偿单元911可产生用于PU的候选预测运动矢量列表。码流中可包括识别选定候选预测运动矢量在PU的候选预测运动矢量列表中的位置的数据。在产生用于PU的候选预测运动矢量列表之后,运动补偿单元911可基于由PU的运动信息指示的一或多个参考块产生用于PU的预测性图像块。PU的参考块可在与所述PU不同的时间图像中。运动补偿单元911可基于由PU的候选预测运动矢量列表中的选定的运动信息确定PU的运动信息。If the PU is encoded using inter prediction, motion compensation unit 911 may generate a candidate predicted motion vector list for the PU. Data identifying the location of the selected candidate predicted motion vector in the candidate motion vector list of the PU may be included in the code stream. After generating the candidate prediction motion vector list for the PU, motion compensation unit 911 may generate a predictive image block for the PU based on one or more reference blocks indicated by the motion information of the PU. The reference block of the PU may be in a different time image than the PU. Motion compensation unit 911 may determine motion information for the PU based on the selected motion information from the candidate motion vector list of the PU.
反量化单元94对码流中所提供且通过熵解码单元90所解码的经量化变换系数进行反量化(例如,解量化)。反量化过程可包含使用通过视频编码器702针对视频条带中的每一视频块所计算的量化参数确定量化的程度,且同样地确定应用的反量化的程度。反变换单元93将反变换(例如,反DCT、反整数变换或概念上类似的反变换过程)应用于变换系数以便在像素域中产生残余块。 Inverse quantization unit 94 inverse quantizes (eg, dequantizes) the quantized transform coefficients provided in the code stream and decoded by entropy decoding unit 90. The inverse quantization process can include determining the degree of quantization using the quantization parameters calculated by video encoder 702 for each of the video slices, and likewise determining the degree of inverse quantization of the application. Inverse transform unit 93 applies an inverse transform (eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to produce a residual block in the pixel domain.
在运动补偿单元911基于运动矢量及其它语法元素产生当前视频块的预测性块之后,视频解码器712通过将来自反变换单元93的残余块与通过运动补偿单元911产生的对应预测性块求和来形成经解码视频块。求和器95表示执行此求和运算的一个或多个组件。在需要时,也可应用解块滤波器来对经解码块进行滤波以便去除块效应伪影。其它环路滤波器(在解码环路中或在解码环路之后)也可用以使像素转变平滑,或以其它方式改进视频质量。给定帧或图像中的经解码视频块接着存储于参考图像存储器92中,参考图像存储器92存储供后续运动补偿所使用的参考图像。After the motion compensation unit 911 generates a predictive block of the current video block based on the motion vector and other syntax elements, the video decoder 712 sums the residual block from the inverse transform unit 93 with the corresponding predictive block generated by the motion compensation unit 911. To form a decoded video block. Summer 95 represents one or more components that perform this summation operation. A deblocking filter can also be applied to filter the decoded blocks to remove blockiness artifacts as needed. Other loop filters (either in the decoding loop or after the decoding loop) can also be used to smooth pixel transitions or otherwise improve video quality. The decoded video block in a given frame or image is then stored in a reference image memory 92, which stores a reference image for subsequent motion compensation.
应当理解的是,视频解码器712的其它结构变化可用于码流的解码。例如,对于某些图像块或者图像帧,视频解码器712的熵解码单元90没有解码出经量化的系数,相应地不需要经反量化单元94和反变换单元93处理。例如,视频解码器712中反量化单元94和反变换单元93可以合并在一起。It should be understood that other structural changes to video decoder 712 may be used for the decoding of the code stream. For example, for certain image blocks or image frames, entropy decoding unit 90 of video decoder 712 does not decode the quantized coefficients, and accordingly does not need to be processed by inverse quantization unit 94 and inverse transform unit 93. For example, inverse quantization unit 94 and inverse transform unit 93 in video decoder 712 can be combined.
上述视频编码器702以及视频解码器712也可以通过另外一种实现形态来实现,例如,采用通用的数字处理器系统实现,如图10所示的编解码装置10,该编解码装置10可以为上述视频编码器702中的部分装置,也可以为上述视频解码器712中的部分装置。The video encoder 702 and the video decoder 712 may also be implemented by another implementation, for example, by using a general-purpose digital processor system, such as the codec device 10 shown in FIG. Some of the devices in the video encoder 702 may also be part of the video decoder 712.
该编解码装置10可以是应用于编码侧,也可以是应用于解码侧。编解码装置10包括处理器1001以及存储器1002。所述处理器1001与存储器1002相连接(如通过总线1004相互连接)。可选的,编解码装置10还可包括收发器1003,收发器1003 连接处理器1001和存储器1002,用于接收/发送数据。The codec device 10 may be applied to the encoding side or may be applied to the decoding side. The codec device 10 includes a processor 1001 and a memory 1002. The processor 1001 is coupled to the memory 1002 (e.g., interconnected by a bus 1004). Optionally, the codec device 10 may further include a transceiver 1003, and the transceiver 1003 is connected to the processor 1001 and the memory 1002 for receiving/transmitting data.
存储器1002可以为随机存储记忆体(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)或便携式只读存储器(Compact Disc Read-Only Memory,CD-ROM)。该存储器1002用于存储相关程序代码及视频数据。The memory 1002 can be a random access memory (RAM), a read-only memory (ROM), an Erasable Programmable Read Only Memory (EPROM), or a portable read only memory. (Compact Disc Read-Only Memory, CD-ROM). The memory 1002 is used to store related program codes and video data.
处理器1001可以是一个或多个中央处理器(Central Processing Unit,CPU),在处理器1001是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。The processor 1001 may be one or more central processing units (CPUs). In the case that the processor 1001 is a CPU, the CPU may be a single core CPU or a multi-core CPU.
该处理器1001用于读取所存储器1002中存储的程序代码,执行图11A、图11B、图15A或图15B所对应的任意一个实施方案及其各种可行的实施方式的操作。The processor 1001 is configured to read program code stored in the memory 1002, and perform operations of any one of the embodiments corresponding to FIG. 11A, FIG. 11B, FIG. 15A, or FIG. 15B and various possible embodiments thereof.
以下,结合上述图7示出的视频编解码系统、图8示出的视频编码器702以及图9示出的视频解码器712对本申请提供的编解码方法进行详细描述。Hereinafter, the codec method provided by the present application will be described in detail in conjunction with the video codec system shown in FIG. 7 above, the video encoder 702 shown in FIG. 8, and the video decoder 712 shown in FIG.
图11A为本申请实施例中解码方法的一种流程示意图,该解码方法可以应用于图7示出的视频编解码系统中。图11A示出的流程以执行主体为图9示出的视频解码器712为例进行说明。FIG. 11A is a schematic flowchart of a decoding method according to an embodiment of the present application, and the decoding method can be applied to the video codec system shown in FIG. 7. The flow shown in FIG. 11A is explained by taking the video decoder 712 shown in FIG. 9 as an execution subject as an example.
如图11A所示,本申请实施例提供的解码方法包括:As shown in FIG. 11A, the decoding method provided by the embodiment of the present application includes:
S110、视频解码器得到包含图像数据的码流。S110. The video decoder obtains a code stream that includes image data.
可选的,视频解码器得到的包括图像数据的码流包括序列参数集(Sequence Parameter Set,SPS)、图像参数集(Picture Parameter Set,PPS)以及条带头(slice header)或条带片段头(slice segment header)等语法元素。Optionally, the code stream obtained by the video decoder including the image data includes a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), and a slice header or a slice header ( Slice segment header) and other syntax elements.
S111、视频解码器解码其得到的码流,确定当前待解码图像块的基础划分方式以及当前待解码图像块中子图像块的目标衍生模式。S111. The video decoder decodes the obtained code stream, determines a basic division manner of the current image block to be decoded, and a target derivative mode of the sub-image block in the current image block to be decoded.
码流的语法元素中包括当前待解码图像块的划分标识以及当前待解码图形块的衍生标识,该当前待解码图像块的划分标识用于指示基础划分方式,当前待解码图像块的衍生标识用于指示目标衍生模式。The syntax element of the code stream includes a division identifier of the current image block to be decoded and a derivative identifier of the current graphics block to be decoded, and the division identifier of the current image block to be decoded is used to indicate a basic division manner, and the derivative identifier of the current image block to be decoded is used. Indicates the target derivative mode.
可选的,当前待解码图像块的划分标识采用变长码(variable length code)表示,例如:二元截断码或指数哥伦布码。当前待解码图像块的衍生标识采用定长码表示。Optionally, the division identifier of the current image block to be decoded is represented by a variable length code, for example, a binary truncation code or an exponential Golomb code. The derived identifier of the current image block to be decoded is represented by a fixed length code.
当前待解码图像块的划分标识和当前待解码图像块的衍生标识可以为独立的标识(flag),例如:当前待解码图像块的划分标识采用SplitFlag表示,当前待解码图像块的衍生标识采用DeriveFlag表示。当然,当前待解码图像块的划分标识和当前待解码图像块的衍生标识也可以为同一标识中的某一部分,例如:若当前待解码图像块的衍生标识的采用长度为x的定长码表示,码流包括与当前待解码图像块对应的flag1,该flag1的最后x位为当前待解码图像块的衍生标识,flag1中除最后x位之外的剩余比特为当前待解码图像块的划分标识。The division identifier of the current image block to be decoded and the derivative identifier of the current image block to be decoded may be an independent flag. For example, the division identifier of the current image block to be decoded is represented by SplitFlag, and the derivative identifier of the current image block to be decoded adopts DeriveFlag. Said. Certainly, the division identifier of the current image block to be decoded and the derivative identifier of the current image block to be decoded may also be a part of the same identifier, for example, if the derivative identifier of the current image block to be decoded is represented by a fixed length code of length x. The code stream includes flag1 corresponding to the current image block to be decoded, and the last x bit of the flag1 is a derivative identifier of the current image block to be decoded, and the remaining bits of the flag1 except the last x bit are the division identifier of the current image block to be decoded. .
可选的,视频解码器解析码流,确定出基础划分方式以及目标衍生模式的方法可以为:视频解码器解析码流,获取该码流中语法元素所包括的用于指示如何将该当前待解码图像块划分成N个子图像块的当前待解码图像块的划分标识(如SplitFlag)以及用于指示如何将N个子图像块中的至少两个相邻子图像块衍生为一个衍生图像块的当前待解码图像块的衍生标识(如DeriveFlag),并根据当前待解码图像块的划分标识确定基础划分方式,根据当前待解码图像块的衍生标识确定目标衍生模式。Optionally, the video decoder parses the code stream, and the method for determining the basic division mode and the target derivation mode may be: the video decoder parses the code stream, and the syntax element included in the code stream is included to indicate how to a division identifier (such as SplitFlag) of the currently to-be-decoded image block into which the decoded image block is divided into N sub-image blocks and a current indication for how to derivate at least two adjacent sub-image blocks of the N sub-image blocks into one derived image block Derived identification of the image block to be decoded (such as DeriveFlag), and determining a basic division manner according to the division identifier of the current image block to be decoded, and determining a target derivative mode according to the derived identifier of the current image block to be decoded.
示例性的,若某一SplitFlag的数值为011,则说明与该SplitFlag对应的图像块的划分方式为水平四分。若某一DeriveFlag的数值为01,则说明与该DeriveFlag对应的图像块中至少两个相邻子图像块采用候选衍生模式中的第一预设衍生模式衍生为一个衍生图像块。Exemplarily, if the value of a SplitFlag is 011, it indicates that the image block corresponding to the SplitFlag is divided into horizontal quarters. If the value of a certain DeriveFlag is 01, it indicates that at least two adjacent sub-image blocks in the image block corresponding to the DeriveFlag are derived into a derivative image block by using the first preset derivation mode in the candidate derivation mode.
可选的,视频解码器解析码流,确定出基础划分方式以及目标衍生模式的方法还可以为:解码端设备解析码流,获取该码流中语法元素所包括的用于指示是否划分当前待解码图像块的第一标识(如NSFlag);如果第一标识的数值为第一值(例如1),则获取语法元素所包括的与当前待解码图像块对应的第二标识(如QTSplitFlag);如果第二标识的数值为第二值(例如01),则说明当前待解码图像块的划分方式为垂直四分;如果第二标识的数值为第三值(例如00),则说明当前待解码图像块的划分方式为水平四分。此外,解码端设备还从码流中获取语法元素所包括的用于指示如何将N个子图像块中的至少两个相邻子图像块衍生为一个衍生图像块的当前待解码图像块的衍生标识(如DeriveFlag),并根据当前待解码图像块的划分标识确定基础划分方式,根据当前待解码图像块的衍生标识确定目标衍生模式。Optionally, the video decoder parses the code stream, and the method for determining the basic division mode and the target derivation mode may further be: the decoding end device parses the code stream, and obtains, by the decoding end, the syntax element included in the code stream, Decoding a first identifier of the image block (such as NSFlag); if the value of the first identifier is a first value (for example, 1), acquiring a second identifier (such as QTSplitFlag) included in the syntax element corresponding to the current image block to be decoded; If the value of the second identifier is a second value (for example, 01), it indicates that the current image block to be decoded is divided into vertical quarters; if the value of the second identifier is a third value (for example, 00), the current to be decoded is The image block is divided into horizontal quarters. In addition, the decoding end device further acquires, from the code stream, a derivative identifier of the current to-be-decoded image block included in the syntax element for indicating how to derivate at least two adjacent sub-image blocks of the N sub-image blocks into one derived image block. (For example, DeriveFlag), and determining a basic division manner according to the division identifier of the current image block to be decoded, and determining a target derivative mode according to the derived identifier of the current image block to be decoded.
具体的,本申请实施例中的基础划分方式为水平N分、垂直N分或水平垂直N分。Specifically, the basic division manner in the embodiment of the present application is a horizontal N score, a vertical N score, or a horizontal vertical N score.
这里,水平N分指将当前待解码图像块水平划分为N个子图像块。N个子图像块中每个子图像块的高度均可以为当前待解码图像块的高度的1/N,即将当前待解码图像块水平划分,且平均划分为N个子图像块。如图1中的(c)所示,每个子图像块的高度均为图像块b的高度的1/2。此外,N个子图像块中任意两个子图像块的高度也可以不相等,即将当前待解码图像块水平划分,且不平均划分为N个子图像块。如图1中的(e)所示,子图像块j的高度为图像块c的高度的1/4,子图像块k的高度为图像块c的高度的1/2,子图像块m的高度为图像块c的高度的1/4。Here, the horizontal N point refers to horizontally dividing the current image block to be decoded into N sub-image blocks. The height of each of the N sub-image blocks may be 1/N of the height of the current image block to be decoded, that is, the current image block to be decoded is horizontally divided, and is equally divided into N sub-image blocks. As shown in (c) of FIG. 1, the height of each sub-image block is 1/2 of the height of the image block b. In addition, the heights of any two sub-image blocks of the N sub-image blocks may also be unequal, that is, the current image block to be decoded is horizontally divided, and is unevenly divided into N sub-image blocks. As shown in (e) of FIG. 1, the height of the sub-image block j is 1/4 of the height of the image block c, and the height of the sub-image block k is 1/2 of the height of the image block c, and the sub-image block m The height is 1/4 of the height of the image block c.
同理,垂直N分指将当前待解码图像块垂直划分为N个子图像块。N个子图像块中每个子图像块的宽度均可以为当前待解码图像块的宽度的1/N,即将当前待解码图像块垂直划分,且平均划分为N个子图像块。如图1中的(d)所示,每个子图像块的宽度均为图像块d的宽度的1/2。此外,N个子图像块中任意两个子图像块的宽度也可以不相等,即将当前待解码图像块垂直划分,且不平均划分为N个子图像块。如图1中的(g)所示,子图像块p的宽度为图像块c的宽度的1/4,子图像块q的宽度为图像块c的宽度的1/2,子图像块x的宽度为图像块c的宽度的1/4。Similarly, the vertical N point refers to vertically dividing the current image block to be decoded into N sub-image blocks. The width of each of the N sub-image blocks may be 1/N of the width of the current image block to be decoded, that is, the current image block to be decoded is vertically divided, and is equally divided into N sub-image blocks. As shown in (d) of FIG. 1, the width of each sub-image block is 1/2 of the width of the image block d. In addition, the widths of any two sub-image blocks of the N sub-image blocks may not be equal, that is, the current image block to be decoded is vertically divided, and is unevenly divided into N sub-image blocks. As shown in (g) of FIG. 1, the width of the sub-image block p is 1/4 of the width of the image block c, and the width of the sub-image block q is 1/2 of the width of the image block c, and the sub-image block x is The width is 1/4 of the width of the image block c.
同理,水平垂直N分指将当前待解码图像块水平垂直划分为N个子图像块。N个子图像块中每个子图像块的宽度均可以为当前待解码图像块的宽度的
Figure PCTCN2019087316-appb-000011
且每个子图像块的高度均可以为当前待解码图像块的高度的
Figure PCTCN2019087316-appb-000012
即将当前待解码图像块水平垂直划分,且平均划分为N个子图像块。如图1中的(b)所示,每个子图像块的宽度均为CTU A的宽度的
Figure PCTCN2019087316-appb-000013
(即为1/2),且每个子图像块的高度均为CTU A的高度的
Figure PCTCN2019087316-appb-000014
(即为1/2)。此外,N个子图像块中任意两个子图像块的宽度也可以不相等,或者任意两个子图像块的高度不相等,即将当前待解码图像块垂直划分,且不平均划分为N个子图像块。
Similarly, horizontal and vertical N points mean that the current image block to be decoded is horizontally and vertically divided into N sub-image blocks. The width of each of the N sub-image blocks may be the width of the current image block to be decoded.
Figure PCTCN2019087316-appb-000011
And the height of each sub-image block can be the height of the current image block to be decoded.
Figure PCTCN2019087316-appb-000012
That is, the current image block to be decoded is horizontally and vertically divided, and is equally divided into N sub-image blocks. As shown in (b) of Figure 1, the width of each sub-image block is the width of CTU A.
Figure PCTCN2019087316-appb-000013
(ie 1/2), and the height of each sub-image block is the height of CTU A
Figure PCTCN2019087316-appb-000014
(ie 1/2). In addition, the widths of any two sub-image blocks in the N sub-image blocks may not be equal, or the heights of any two sub-image blocks are not equal, that is, the current image block to be decoded is vertically divided, and is unevenly divided into N sub-image blocks.
本申请实施例中的水平垂直N分的典型表现方式为四叉树(Quadtree)划分。A typical representation of the horizontal and vertical N points in the embodiment of the present application is a quadtree partition.
为了便于说明,本申请实施例以水平N分指上述“将当前待解码图像块水平划分,且平均划分为N个子图像块”,垂直N分指上述“将当前待解码图像块垂直划分,且平均划分为N个子图像块”,水平垂直N分指上述“将当前待解码图像块水平垂直划分,且平均划分为N个子图像块”为例进行说明。For convenience of description, the embodiment of the present application refers to the above-mentioned “leveling the currently to-be-decoded image block horizontally and dividing into N sub-image blocks”, and the vertical N-score refers to “discriminating the current image block to be decoded vertically, and The average is divided into N sub-image blocks, and the horizontal and vertical N points are described as an example of “dividing the current image block to be decoded horizontally and dividing into N sub-image blocks equally”.
在实际应用中,对于视频编码器而言,可以在某一图像块满足预设条件时,采用水平N分或垂直N分划分方式划分该图像块。例如,某一图像块的宽度为M1,高度为H1,若M1×H1大于X1×Y1,则视频编码器采用水平N分或垂直N分划分方式划分该图像块;或者,若M1×H1小于X2×Y2,则视频编码器采用水平N分或垂直N分划分方式划分该图像块;或者,若M1×H1大于X1×Y1、且小于X2×Y2,则视频编码器采用水平N分或垂直N分划分方式划分该图像块。其中,X1、Y1、X2和Y2均为正整数。In practical applications, for a video encoder, the image block may be divided by a horizontal N-segment or a vertical N-segmentation when a certain image block satisfies a preset condition. For example, the width of an image block is M1 and the height is H1. If M1×H1 is greater than X1×Y1, the video encoder divides the image block by horizontal N or vertical N division; or, if M1×H1 is smaller than X2×Y2, the video encoder divides the image block by horizontal N or vertical N division; or, if M1×H1 is greater than X1×Y1 and smaller than X2×Y2, the video encoder adopts horizontal N or vertical The image block is divided by the N division method. Among them, X1, Y1, X2 and Y2 are all positive integers.
示例性的,若M1=4×H1,则视频编码器可以采用垂直四分划分方式划分该图像块;若H1=4×M,则视频编码器可以采用水平四分划分方式划分该图像块。Exemplarily, if M1=4×H1, the video encoder may divide the image block by vertical quadrant division; if H1=4×M, the video encoder may divide the image block by horizontal quadrant division.
相应的,若当前待解码图像块的宽度为M1,高度为H1,若M1×H1大于X1×Y1,或者,M1×H1小于X2×Y2,或者,M1×H1大于X1×Y1、且小于X2×Y2,则基础划分方式为水平N分或垂直N分。Correspondingly, if the current image block to be decoded has a width M1 and a height H1, if M1×H1 is greater than X1×Y1, or M1×H1 is smaller than X2×Y2, or M1×H1 is greater than X1×Y1 and smaller than X2. ×Y2, the basic division method is horizontal N or vertical N.
本申请实施例中的目标衍生模式为候选衍生模式集合中的一种,其中,候选衍生模式集合包括M(M为整数)种预设衍生模式,当基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当基础划分方式为水平垂直N分时,
Figure PCTCN2019087316-appb-000015
每一种预设衍生模式均唯一指示一种衍生方式,衍生方式是指将N个子图像块中至少两个相邻子图像块衍生为一个衍生图像块。需要说明的是,M中预设衍生模式中存在一种用于指示不进行衍生的预设衍生模式。
The target derivative mode in the embodiment of the present application is one of the candidate derivative mode sets, where the candidate derivative mode set includes M (M is an integer) preset derivative mode, and the basic division mode is horizontal N or vertical N when, 0≤M≤2 N-1; when the base is divided into horizontal and vertical N time division manner,
Figure PCTCN2019087316-appb-000015
Each of the preset derivative modes uniquely indicates a derivative mode, and the derivative method refers to deriving at least two adjacent sub-image blocks of the N sub-image blocks into one derivative image block. It should be noted that there is a preset derivative mode for indicating that no derivation is performed in the preset derivation mode in M.
本申请实施例中的衍生可以理解为融合/合并(merge)。具体的,在将待解码图像块划分为N个子图像块后,将至少两个相邻子图像块合并为一个衍生图像块。Derivation in the embodiments of the present application can be understood as fusion/merge. Specifically, after the image block to be decoded is divided into N sub-image blocks, at least two adjacent sub-image blocks are combined into one derived image block.
在一个示例中,如图12所示,采用水平四分划分方式将待解码图像块划分为子图像块1(可对应本文描述的第一子图像块)、子图像块2(可对应本文描述的第二子图像块)、子图像块3(可对应本文描述的第三子图像块)以及子图像块4(可对应本文描述的第四子图像块),N=4,划分该待解码图像块的划分线有三(N-1=3)条:第一划分线、第二划分线和第三划分线,相应的,该待解码图像块对应的候选衍生模式最多包括24-1=8种预设衍生模式。图12中的A、B、C、D、E、F、G、H示出了这8种预设衍生模式。以图12中的A示出的预设衍生模式为例进行说明,去除第一划分线,子图像块1和子图像块2衍生(或称为融合/合并)为一个衍生图像块。In one example, as shown in FIG. 12, the image block to be decoded is divided into a sub-image block 1 (which may correspond to the first sub-image block described herein) and a sub-image block 2 in a horizontal quad division manner (corresponding to the description herein) Second sub-image block), sub-image block 3 (which may correspond to the third sub-image block described herein), and sub-image block 4 (which may correspond to the fourth sub-image block described herein), N=4, dividing the to-be-decoded The dividing line of the image block has three (N-1=3) strips: a first dividing line, a second dividing line, and a third dividing line. Correspondingly, the candidate derivative mode corresponding to the image block to be decoded includes at most 24-1=8. Pre-defined derivative mode. A, B, C, D, E, F, G, and H in Fig. 12 show these eight preset derivation modes. Taking the preset derivation mode shown by A in FIG. 12 as an example, the first dividing line is removed, and the sub-image block 1 and the sub-image block 2 are derived (or referred to as fusion/merging) into one derived image block.
在另一个示例中,如图13所示,采用垂直四分划分方式将待解码图像块划分为子图像块1(可对应本文描述的第五子图像块)、子图像块2(可对应本文描述的第六子图像块)、子图像块3(可对应本文描述的第七子图像块)以及子图像块4(可对应本文描述的第八子图像块),N=4,划分该待解码图像块的划分线有三(N-1=3)条:第一划分线、第二划分线和第三划分线,相应的,该待解码图像块对应的候选衍生模式最多包括24-1=8种预设衍生模式。图13中的A'、B'、C'、D'、E'、F'、G'、H'示出了这8种预设衍生模式。以图13中的F'示出的预设衍生模式为例进 行说明,去除第一划分线,子图像块1和子图像块2衍生为一个衍生图像块,去除第三划分线,子图像块3和子图像块4衍生为另一衍生图像块。In another example, as shown in FIG. 13, the image block to be decoded is divided into a sub-image block 1 (which may correspond to the fifth sub-image block described herein) and a sub-image block 2 in a vertical division manner (corresponding to this document) a sixth sub-image block), a sub-image block 3 (corresponding to the seventh sub-image block described herein), and a sub-image block 4 (corresponding to the eighth sub-image block described herein), N=4, dividing the The dividing line of the decoded image block has three (N-1=3) strips: a first dividing line, a second dividing line, and a third dividing line. Correspondingly, the candidate derivative mode corresponding to the image block to be decoded includes at most 24-1= 8 preset derivative modes. A', B', C', D', E', F', G', H' in Fig. 13 show these eight preset derivation patterns. Taking the preset derivation mode shown by F′ in FIG. 13 as an example, the first dividing line is removed, and the sub-image block 1 and the sub-image block 2 are derived as one derived image block, and the third dividing line is removed, and the sub-image block 3 is removed. And sub-image block 4 is derived as another derived image block.
在另一个示例中,如图14所示,采用水平垂直四分划分方式将待解码图像块划分为子图像块1(可对应本文描述的第九子图像块)、子图像块2(可对应本文描述的第十子图像块)、子图像块3(可对应本文描述的第十一子图像块)以及子图像块4(可对应本文描述的第十二子图像块),N=4,划分该待解码图像块的划分线有四
Figure PCTCN2019087316-appb-000016
条:第一划分线、第二划分线、第三划分线和第四划分线,相应的,该待解码图像块对应的候选衍生模式最多包括24=16种预设衍生模式。图14中的A″、B″、C″、D″、E″、F″、G″、H″示出了其中8种预设衍生模式。以图14中的G″示出的预设衍生模式为例进行说明,去除第三划分线和第四划分线,子图像块1、子图像块3和子图像块4衍生为一个衍生图像块。
In another example, as shown in FIG. 14, the image block to be decoded is divided into a sub-image block 1 (which may correspond to the ninth sub-image block described herein) and a sub-image block 2 (corresponding to each other). The tenth sub-image block described herein), sub-image block 3 (which may correspond to the eleventh sub-image block described herein), and sub-image block 4 (which may correspond to the twelfth sub-image block described herein), N=4, Dividing the dividing line of the image block to be decoded into four
Figure PCTCN2019087316-appb-000016
a first dividing line, a second dividing line, a third dividing line, and a fourth dividing line. Correspondingly, the candidate derivative mode corresponding to the image block to be decoded includes at most 24=16 preset derivative modes. A", B", C", D", E", F", G", H" in Fig. 14 show 8 of the preset derivation patterns. Taking the preset derivation mode shown by G" in FIG. 14 as an example, the third dividing line and the fourth dividing line are removed, and the sub-image block 1, the sub-image block 3, and the sub-image block 4 are derived as one derived image block.
结合上述图12、图13以及图14可以看出,不同划分方式对应的候选衍生模式集合包括有衍生结果相同的预设衍射模式。例如:若对同一当前待解码图像块进行衍生,上述图12中的F示出的衍生图像块与上述图14中的E″示出的衍生图像块相同,上述图13中的F'示出的衍生图像块与上述图14中的F″示出的衍生图像块相同,上述图12中的H示出的衍生图像块与上述图14中的H″示出的衍生图像块相同。因此,在不同划分方式对应的候选衍生模式集合中,可以将衍生结果相同的预设衍生模式删除一个,仅在某一划分方式对应的候选衍生模式集合中保留。As can be seen from the above-mentioned FIG. 12, FIG. 13 and FIG. 14, the candidate derivative mode set corresponding to different partitioning modes includes a preset diffraction mode having the same derivative result. For example, if the same current image block to be decoded is derived, the derived image block shown by F in FIG. 12 is the same as the derivative image block shown by E′′ in FIG. 14 above, and F′ in FIG. 13 is shown. The derived image block is the same as the derived image block shown by F" in Fig. 14 described above, and the derived image block shown by H in Fig. 12 is the same as the derivative image block shown by H" in Fig. 14 described above. Therefore, In the candidate derivative mode set corresponding to different partitioning modes, the preset derivative mode with the same derivative result may be deleted by one, and only reserved in the candidate derivative mode set corresponding to a certain dividing mode.
在一个示例中,结合上述图12,在N=4,且基础划分方式为水平四分的情况下,候选衍生模式集合可以仅包括图12中的B(可对应本文描述的第三预设衍生模式)、C(可对应本文描述的第二预设衍生模式)、D(可对应本文描述的第一预设衍生模式)以及F(可对应本文描述的第四预设衍生模式)示出的预设衍生模式。In one example, in combination with FIG. 12 above, in the case where N=4 and the basic division mode is horizontal quarter, the candidate derivative mode set may include only B in FIG. 12 (corresponding to the third preset derivative described herein). Mode), C (corresponding to the second preset derivative mode described herein), D (corresponding to the first preset derivative mode described herein), and F (corresponding to the fourth preset derivative mode described herein) Preset derivative mode.
在另一个示例中,结合上述图13,在N=4,且基础划分方式为垂直四分的情况下,候选衍生模式集合可以仅包括图13中的B'(可对应本文描述的第七预设衍生模式)、D'(可对应本文描述的第五预设衍生模式)、E'(可对应本文描述的第六预设衍生模式)以及G'(可对应本文描述的第八预设衍生模式)示出的预设衍生模式。In another example, in combination with FIG. 13 above, in the case where N=4 and the basic division manner is vertical quarter, the candidate derivative mode set may include only B′ in FIG. 13 (corresponding to the seventh pre-described herein) Derivative mode), D' (corresponding to the fifth preset derivative mode described herein), E' (corresponding to the sixth preset derivative mode described herein), and G' (corresponding to the eighth preset derivative described herein) Mode) shows the preset derivative mode.
在另一个示例中,结合上述图14,在N=4,且基础划分方式为水平垂直四分的情况下,候选衍生模式集合可以仅包括图14中的A″(可对应本文描述的第九预设衍生模式)、B″(可对应本文描述的第十二预设衍生模式)、E″(可对应本文描述的第十预设衍生模式)以及F″(可对应本文描述的第十一预设衍生模式)示出的预设衍生模式。In another example, in combination with FIG. 14 above, in the case where N=4 and the basic division manner is horizontal and vertical quarters, the candidate derivative pattern set may include only A′′ in FIG. 14 (corresponding to the ninth described herein) Preset derivative mode), B" (corresponding to the twelfth preset derivative mode described herein), E" (corresponding to the tenth preset derivative mode described herein), and F" (corresponding to the eleventh described herein) The preset derivative mode shown by the preset derivative mode).
候选衍生模式集合中的每一种预设衍生模式均采用定长码标识,例如2比特,这样,相比于现有技术,本申请提供的解码方法可以采用简单的标识即可标识图像块的划分,有效的提高了解码效率。Each of the preset derivative modes in the candidate derivative mode set uses a fixed length code identifier, for example, 2 bits, so that the decoding method provided by the present application can identify the image block by using a simple identifier compared to the prior art. The division effectively improves the decoding efficiency.
结合上述图12、图13以及图14可以看出,衍生图像块的特征参数大于N个子图像块中每个子图像块的特征参数,该特征参数为高度和宽度中的至少一个。As can be seen in conjunction with FIG. 12, FIG. 13, and FIG. 14 above, the feature parameter of the derived image block is greater than the feature parameter of each of the N sub-image blocks, the feature parameter being at least one of height and width.
S112、视频解码器根据基础划分方式,将当前待解码图像块划分为N个子图像块。S112. The video decoder divides the current image block to be decoded into N sub-image blocks according to a basic division manner.
具体的,若基础划分方式为水平四分,则视频解码器采用如上述图12示出的划 分方法将当前待解码图像块划分为4个子图像块。若基础划分方式为垂直四分,则视频解码器采用如上述图13示出的划分方法将当前待解码图像块划分为4个子图像块。若基础划分方式为水平垂直四分,则视频解码器采用如上述图14示出的划分方法将当前待解码图像块划分为4个子图像块。Specifically, if the basic division mode is horizontal four points, the video decoder divides the current image block to be decoded into four sub-image blocks by using the division method shown in FIG. 12 described above. If the basic division mode is a vertical quarter, the video decoder divides the current image block to be decoded into 4 sub-image blocks by using the division method as shown in FIG. 13 described above. If the basic division mode is horizontal and vertical quarters, the video decoder divides the current image block to be decoded into four sub-image blocks by using the division method as shown in FIG. 14 described above.
S113、视频解码器根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。S113. The video decoder derives at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block according to a derivative manner of the target derived mode indication.
S114、视频解码器对第一衍生图像块进行解码。S114. The video decoder decodes the first derivative image block.
具体的,在第一衍生图像块不再进行划分的情况下,视频解码器对该第一衍生图像块进行解码重建,以得到重建图像块。在第一衍生图像块还进行划分的情况下,视频解码器将该第一衍生图像块视为当前待解码图像块,重新执行上述S111~S114,直至不再对重新得到的第一衍生图像块进行划分为止。Specifically, in a case where the first derivative image block is no longer divided, the video decoder performs decoding and reconstruction on the first derivative image block to obtain a reconstructed image block. In the case that the first derivative image block is further divided, the video decoder regards the first derivative image block as the current image block to be decoded, and re-executes the above S111-S114 until the re-obtained first derivative image block is no longer used. Until the division.
本申请中的视频解码器根据基础划分方式和目标衍生模式确定当前待解码图像块的具体划分方式。划分方式和衍生模式的结合,标识出了多种不同的划分结果,与现有技术相比,丰富了图像块的划分方式,能够适应于各种纹理特性的视频图像。The video decoder in the present application determines a specific division manner of the current image block to be decoded according to the basic division manner and the target derivative mode. The combination of the division mode and the derivative mode identifies a plurality of different division results. Compared with the prior art, the image block is enriched and can be adapted to video images of various texture characteristics.
结合上述描述可知,本申请中的视频解码器还可以只有在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,确定目标衍生模式。As can be seen from the above description, the video decoder in the present application may also determine the target derivative mode only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold.
具体的,结合上述图11A,如图11B所示,上述S111可以替换为S111a~S111c。Specifically, in combination with FIG. 11A described above, as shown in FIG. 11B, the above S111 may be replaced with S111a to S111c.
S111a、视频解码器解码其得到的码流,确定当前待解码图像块的基础划分方式以及当前待解码图像块的特征参数。S111a: The video decoder decodes the obtained code stream, determines a basic division manner of the current image block to be decoded, and a feature parameter of the current image block to be decoded.
视频解码器确定当前待解码图像块的基础划分方式的方法可以参考上述S111的描述,此处不再进行详细赘述。For the method for the video decoder to determine the basic division mode of the image block to be decoded, refer to the description of S111 above, and details are not described herein again.
当前待解码图像块的特征参数是指当前待解码图像块的高度以及当前待解码图像块的宽度。视频解码器解析码流,可直接确定出该当前待解码图像块的特征参数。The feature parameter of the current image block to be decoded refers to the height of the current image block to be decoded and the width of the current image block to be decoded. The video decoder parses the code stream, and directly determines the feature parameters of the current image block to be decoded.
S111b、视频解码器判断当前待解码图像块的特征参数是否小于或等于第一预设阈值。S111b. The video decoder determines whether a feature parameter of the current image block to be decoded is less than or equal to a first preset threshold.
若当前待解码图像块的特征参数小于或等于第一预设阈值,视频解码器执行S111c。If the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, the video decoder performs S111c.
若当前待解码图像块的特征参数大于第一预设阈值,视频解码器则将当前待解码图像块的子图像块视为当前待解码图像块,重新执行S111a。If the feature parameter of the current image block to be decoded is greater than the first preset threshold, the video decoder regards the sub-image block of the current image block to be decoded as the current image block to be decoded, and re-executes S111a.
S111c、视频解码器解析码流,确定目标衍生模式。S111c, the video decoder parses the code stream, and determines a target derivative mode.
视频解码器确定目标衍生模式的方法可以参考上述S111的描述,此处不再进行详细赘述。For the method for determining the target derivation mode by the video decoder, reference may be made to the description of S111 above, and details are not described herein again.
图11B示出的流程中,视频解码器在执行S111a后,可以先执行S112,后执行S111b,也可以先执行S111b,后执行S112,还可以同时执行S112和S111b,本申请实施例对此不作具体限定。In the process shown in FIG. 11B, after performing S111a, the video decoder may perform S112 first, then S111b, or S111b may be performed first, then S112 may be performed, and S112 and S111b may be simultaneously performed. Specifically limited.
容易理解的是,由于视频解码器只有在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,才解析码流确定目标衍生模式,因此,对于特征参数大于第一预设阈值的图像块而言,码流可仅包括该图像块的划分标识,而未包括该图像块的衍生标识,有效的减少了码流占用的传输资源。当然,对于特征参数大于第一预设阈 值的图像块而言,码流也可包括该图像块的衍生标识,该图像块的衍生标识用于指示该图像块中的子图像块未衍生。It is easy to understand that the video decoder determines the target derivative mode only if the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, and therefore, the feature parameter is greater than the first preset. For the image block of the threshold, the code stream may only include the division identifier of the image block, but does not include the derivative identifier of the image block, which effectively reduces the transmission resource occupied by the code stream. Of course, for an image block whose feature parameter is greater than the first preset threshold, the code stream may also include a derivative identifier of the image block, and the derived identifier of the image block is used to indicate that the sub-image block in the image block is not derivatized.
视频解码器只有在当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,才解析码流确定目标衍生模式,有效的提高了解码速率。The video decoder determines the target derivative mode only when the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold, and effectively improves the decoding rate.
此外,本申请实施例还提供一种编码方法,该编码方法可以应用于图7示出的视频编解码系统中。In addition, the embodiment of the present application further provides an encoding method, which can be applied to the video codec system shown in FIG. 7.
图15A为本申请实施例中编码方法的一种流程示意图。图15A示出的流程以执行主体为图8示出的视频编码器702为例进行说明。FIG. 15A is a schematic flowchart of a coding method in an embodiment of the present application. The flow shown in FIG. 15A is exemplified by the video encoder 702 shown in FIG. 8 as an execution subject.
如图15A所示,本申请实施例提供的编码方法包括:As shown in FIG. 15A, the coding method provided by the embodiment of the present application includes:
S150、视频编码器确定当前待编码图像块。S150. The video encoder determines an image block to be currently encoded.
当前待编码图像块可以为CTU,也可以为CU,本申请实施例对此不作具体限定。The image block to be encoded may be a CTU or a CU, which is not specifically limited in this embodiment of the present application.
如图17A或图17B所示所示,当前待编码图像块可以为图像块170,也可以为图像块173中的子图像块,还可以为图像块174,还可以为图像块171中的子图像块,本申请实施例对此不作具体限定。As shown in FIG. 17A or FIG. 17B, the current image block to be encoded may be an image block 170, a sub-image block in the image block 173, an image block 174, or a sub-block in the image block 171. The image block is not specifically limited in this embodiment of the present application.
S151、视频编码器确定当前待编码图像块的基础划分方式以及当前待编码图像块中子图像块的目标衍生模式。S151. The video encoder determines a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded.
在第一种可实现的方式中,视频编码器确定与当前待编码图像对应的至少两种候选划分方式(水平N分、垂直N分、水平垂直N分以及不划分),并计算至少两种候选划分方式中的每种候选划分方式的率失真代价,这样,该视频编码器将最小的率失真代价对应的候选划分方式确定为基础划分方式。后续,视频编码器计算与基础划分方式对应的候选衍生模式集合中的每种预设衍生模式的率失真代价,并将最小的率失真代价对应的预设衍生模式确定为目标衍生模式。In a first implementation manner, the video encoder determines at least two candidate partitioning modes (horizontal N, vertical N, horizontal and vertical N, and no partition) corresponding to the current image to be encoded, and calculates at least two types. The rate-distortion cost of each of the candidate partitioning modes, so that the video encoder determines the candidate partitioning mode corresponding to the smallest rate-distortion cost as the basic partitioning mode. Subsequently, the video encoder calculates a rate distortion cost of each of the preset derivative modes in the candidate derivative mode set corresponding to the basic partition mode, and determines a preset derivative mode corresponding to the minimum rate distortion cost as the target derivative mode.
该候选衍生模式可以参考上述图11A或图11B所示的实施例中对候选衍生模式的描述,此处不再进行详细赘述。For the candidate derivation mode, reference may be made to the description of the candidate derivation mode in the embodiment shown in FIG. 11A or FIG. 11B above, and details are not described herein again.
本实施例中的当前待编码图像块的基本划分方式以及当前待编码图像块中子图像块的目标衍生模式可以参考上述图11A所述的实施例中的描述。不同的是,上述图11A是针对当前待解码图像块进行描述的,本实施例是针对当前待编码图像块进行描述的。The basic division mode of the current image block to be encoded and the target derivative mode of the sub image block in the current image block to be encoded may be referred to the description in the embodiment described above with reference to FIG. 11A. The difference is that the above-mentioned FIG. 11A is described for the current image block to be decoded, and the embodiment is described for the current image block to be encoded.
第一种可实现的方式具体参考下述图16的描述,此处不再进行详细赘述。The first achievable manner refers specifically to the description of FIG. 16 below, and details are not described herein again.
在第二种可实现的方式中,视频编码器确定与当前待编码图像块对应的至少两种候选划分方式(水平N分、垂直N分、水平垂直N分以及不划分),后续,针对每一种候选划分方式,视频编码器采用预设衍生模式中的每一种预设衍生模式对至少两个相邻子图像块进行衍生,这样,视频编码器可计算在每一种候选划分方式中每一种预设衍生模式的率失真代价,并将最小的率失真代价对应的划分方式确定为基础划分方式,将该最小的率失真代价对应的衍生模式确定为目标衍生模式。In a second implementation manner, the video encoder determines at least two candidate partitioning modes (horizontal N, vertical N, horizontal, and non-divided) corresponding to the current image block to be encoded, and subsequently, for each A candidate division mode, where the video encoder derivates at least two adjacent sub-image blocks by using each of the preset derivation modes, so that the video encoder can be calculated in each candidate division mode. The rate distortion cost of each of the preset derivation modes is determined, and the division mode corresponding to the minimum rate distortion cost is determined as the basic division mode, and the derivative mode corresponding to the minimum rate distortion cost is determined as the target derivation mode.
S152、视频编码器根据基础划分方式,将当前待编码图像块划分为N个子图像块。S152. The video encoder divides the current image block to be encoded into N sub-image blocks according to a basic division manner.
S153、视频编码器根据目标衍生模式指示的衍生方式,将N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块。S153. The video encoder derives at least two adjacent sub-image blocks of the N sub-image blocks into the first derivative image block according to a derivative manner of the target derived mode indication.
S154、在视频编码器对第一衍生图像块不划分的情况下,该视频编码器对第一衍 生图像块进行编码,得到码流。S154. If the video encoder does not divide the first derived image block, the video encoder encodes the first derived image block to obtain a code stream.
可选的,该码流的语法元素包括当前待编码图像块的划分标识和当前待编码图像块的衍生标识,当前待编码图像块的划分标识用于指示当前待编码图像块的基础划分方式,当前待编码图像块的衍生标识用于指示当前待编码图像块中子图像块的目标衍生模式。Optionally, the syntax element of the code stream includes a division identifier of the current image block to be encoded and a derivative identifier of the current image block to be encoded, and the division identifier of the current image block to be encoded is used to indicate a basic division manner of the image block to be currently encoded. The derived identifier of the current image block to be encoded is used to indicate a target derivative mode of the sub-image block in the current image block to be encoded.
可选的,当前待编码图像块的划分标识采用变长码(variable length code)表示,例如:二元截断码或指数哥伦布码。当前待编码图像块的衍生标识采用定长码表示。Optionally, the division identifier of the current image block to be encoded is represented by a variable length code, for example, a binary truncation code or an exponential Golomb code. The derived identifier of the current image block to be encoded is represented by a fixed length code.
当前待编码图像块的划分标识和当前待编码图像块的衍生标识可以为独立的标识(flag),例如:当前待编码图像块的划分标识采用SplitFlag表示,当前待编码图像块的衍生标识采用DeriveFlag表示。当然,当前待编码图像块的划分标识和当前待编码图像块的衍生标识也可以为同一标识中的某一部分,例如:若当前待编码图像块的衍生标识的采用长度为x的定长码表示,码流包括与当前待编码图像块对应的flag1,该flag1的最后x位为当前待编码图像块的衍生标识,flag1中除最后x位之外的剩余比特为当前待编码图像块的划分标识。The split identifier of the current image block to be encoded and the derived identifier of the current image block to be encoded may be independent flags. For example, the split identifier of the current image block to be encoded is represented by SplitFlag, and the derivative identifier of the current image block to be coded is DeriveFlag. Said. Certainly, the division identifier of the current image block to be encoded and the derivative identifier of the current image block to be encoded may also be a part of the same identifier, for example, if the derivative identifier of the current image block to be encoded is represented by a fixed length code of length x The code stream includes flag1 corresponding to the current image block to be encoded, and the last x bit of the flag1 is a derivative identifier of the current image block to be encoded, and the remaining bits of the flag1 except the last x bit are the division identifier of the current image block to be encoded. .
容易理解的是,若视频编码器还需对第一衍生图像块进行划分,则该视频编码器将该衍生图像块确定为当前待编码图像块,并重新执行S151~S154,直到重新确定出的第一衍生图像块进行划分为止。It is easy to understand that if the video encoder further needs to divide the first derivative image block, the video encoder determines the derived image block as the current image block to be encoded, and re-executes S151-S154 until it is re-determined. The first derivative image block is divided.
现对上述S151中的第一种可实现的方式进行描述。The first achievable manner in the above S151 will now be described.
结合上述图15A,如图16所示,本申请实施例中视频编码器确定基础划分方式以及目标衍生模式的方法可以通过S161~S166实现,即上述S151可以替换为S161~S166。S161~S166具体为:With reference to the above-mentioned FIG. 15A, as shown in FIG. 16, the method for determining the basic division mode and the target derivative mode by the video encoder in the embodiment of the present application can be implemented by S161 to S166, that is, the above S151 can be replaced with S161 to S166. S161 ~ S166 are specifically:
S161、视频编码器采用至少两种候选划分方式对当前待编码图像块进行划分。S161. The video encoder divides the current image block to be encoded by using at least two candidate division manners.
候选划分方式包括水平N分、垂直N分、水平垂直N分以及不划分。Candidate division methods include horizontal N points, vertical N points, horizontal vertical N points, and no division.
在一个示例中,如图17A所示,若候选划分方式为水平四分、垂直四分、水平垂直四分以及不划分,当前待编码图像块为图像块170,则视频编码器可采用水平四分划分图像块170,生成四个宽度与图像块170的宽度相等,高度为图像块170的高度的1/4的长方形子图像块,图17A采用171表示该结构的图像块。视频编码器还可采用垂直四分划分图像块170,生成四个高度与图像块170的高度相等,宽度为图像块170的宽度的1/4的长方形子图像块,图17A采用172表示该结构的图像块。视频编码器还可采用水平垂直四分划分图像块170,生成四个高度为图像块170的高度的1/2,宽度为图像块170的宽度的1/2的正方形子图像块,图17A采用173表示该结构的图像块。当然,视频编码器还可对当前编码图像块170不进行划分,未被划分的图像块图17A中采用174表示。In one example, as shown in FIG. 17A, if the candidate division mode is horizontal quarter, vertical quarter, horizontal vertical quarter, and no division, and the current image block to be encoded is image block 170, the video encoder may adopt level four. The image block 170 is divided into four, and four rectangular sub-image blocks having a width equal to the width of the image block 170 and a height of 1/4 of the height of the image block 170 are generated, and FIG. 17A uses 171 to represent the image block of the structure. The video encoder may also divide the image block 170 by vertical quadrants to generate four rectangular sub-image blocks having a height equal to the height of the image block 170 and a width of 1/4 of the width of the image block 170, and FIG. 17A indicates the structure by 172. Image block. The video encoder may also divide the image block 170 by horizontal and vertical divisions to generate four square sub-image blocks having a height of 1/2 of the height of the image block 170 and a width of 1/2 of the width of the image block 170, which is adopted in FIG. 17A. 173 denotes an image block of the structure. Of course, the video encoder may also not divide the current coded image block 170, and the undivided image block is represented by 174 in FIG. 17A.
图17A中,采用100标识水平四分,采用101标识垂直四分,采用110标识水平垂直四分,采用0标识不划分。In Fig. 17A, the horizontal four-point is identified by 100, the vertical four-point is identified by 101, and the horizontal and vertical four-points are identified by 110, and the zero mark is not divided.
当然,图17A示出的划分方式中,也可以采用110标识水平四分,采用101标识垂直四分,采用101标识水平垂直四分,采用0标识不划分,本申请实施例对此不作具体限定。Of course, in the partitioning mode shown in FIG. 17A, the horizontal four-points may be identified by using 110, the vertical four-points are identified by 101, and the horizontal and vertical four-points are identified by using 101, and the zero-marking is not used. The embodiment of the present application does not specifically limit this. .
在另一个示例中,如图19所示,若候选划分方式为水平二分、垂直二分以及不 划分,当前待编码图像块为图像块171中的子图像块,则视频编码器可以采用水平二分划分图像块171中的子图像块,生成两个宽度与图像块171中子图像块的宽度相等,高度为图像块171中的子图形块的高度的1/2的长方形子图像块,图19采用175表示该结构的图像块。视频编码器还可采用垂直二分划分图像块171中的子图像块,生成两个高度与图像块171中子图像块的高度相等,宽度为图像块171中子图像块的宽度的1/2的长方形子图像块,图19采用176表示该结构的图像块。当然,视频编码器还可对图像块171中的子图像块不进行划分,未被划分的图像块图19中采用177表示。In another example, as shown in FIG. 19, if the candidate division mode is horizontal dichotomy, vertical dichotomy, and non-division, and the current image block to be encoded is a sub-image block in the image block 171, the video encoder may adopt horizontal dichotomy. The sub-image block in the image block 171 generates two rectangular sub-image blocks having a width equal to the width of the sub-image block in the image block 171 and a height equal to 1/2 of the height of the sub-graphic block in the image block 171, and FIG. 19 is adopted. 175 denotes an image block of the structure. The video encoder may also divide the sub-image blocks in the image block 171 by vertical bipartite division, and generate two heights equal to the height of the sub-image block in the image block 171, and the width is 1/2 of the width of the sub-image block in the image block 171. A rectangular sub-image block, Figure 19 uses 176 to represent an image block of the structure. Of course, the video encoder may also not divide the sub-image blocks in image block 171, and the un-divided image blocks are represented by 177 in FIG.
在另一个示例中,如图20所示,若候选划分方式为水平四分、垂直四分以及不划分,当前待编码图像块为图像块171中的子图像块,则视频编码器可以采用水平四分划分图像块171中的子图像块,生成四个宽度与图像块171中子图像块的宽度相等,高度为图像块171中的子图形块的高度的1/4的长方形子图像块,图20采用175'表示该结构的图像块。视频编码器还可采用垂直四分划分图像块171中的子图像块,生成四个高度与图像块171中子图像块的高度相等,宽度为图像块171中子图像块的宽度的1/4的长方形子图像块,图20采用176'表示该结构的图像块。当然,视频编码器还可对图像块171中的子图像块不进行划分,未被划分的图像块图20中采用177'表示。In another example, as shown in FIG. 20, if the candidate division mode is horizontal quadrant, vertical quadrant, and no division, and the current image block to be encoded is a sub-image block in the image block 171, the video encoder may adopt a horizontal level. Dividing the sub-image blocks in the image block 171 to generate four rectangular sub-image blocks having a width equal to the width of the sub-image block in the image block 171 and a height equal to 1/4 of the height of the sub-graphic block in the image block 171, Figure 20 shows an image block of the structure using 175'. The video encoder may also divide the sub-image blocks in the image block 171 by vertical quadrants to generate four heights equal to the height of the sub-image blocks in the image block 171, and the width is 1/4 of the width of the sub-image block in the image block 171. The rectangular sub-image block, Figure 20 uses 176' to represent the image block of the structure. Of course, the video encoder may also not divide the sub-image blocks in the image block 171, and the undivided image block 20 is represented by 177'.
可选的,候选划分方式间接的体现了划分层级,这样,视频编码器可根据候选划分方式在预设的划分层级上采用对应的划分方式划分当前待编码图像块。Optionally, the candidate division mode indirectly reflects the division level, so that the video encoder may divide the current image block to be coded by using a corresponding division manner on the preset division level according to the candidate division manner.
示例性的,如图17B所示,视频编码器在第1层级采用水平垂直四分划分方式划分图像块170,生成图像块173,或对图像块170不进行划分。在不划分的分支下,视频编码器在第2层级可以对图像块170进行划分,也可以不划分。在视频编码器在第2层级对图像块170进行划分的分支下,视频编码器可以采用水平四分划分方式划分图像块170,生成图像块171,也可以采用垂直四分划分方式划分图像块170,生成图形块172。Illustratively, as shown in FIG. 17B, the video encoder divides the image block 170 in a horizontal and vertical division manner at the first level, generates an image block 173, or does not divide the image block 170. Under the undivided branch, the video encoder may or may not divide the image block 170 at the second level. Under the branch where the video encoder divides the image block 170 at the second level, the video encoder may divide the image block 170 by horizontal quadrant division to generate the image block 171, or divide the image block 170 by vertical quadrant division. , a graphics block 172 is generated.
图17B中,采用011标识图像块171示出的划分方式,采用010标识图像块172示出的划分方式,采用1标识图像块173示出的划分方式。In Fig. 17B, the division manner shown by the 011 identification image block 171 is adopted, and the division manner shown by the 010 identification image block 172 is adopted, and the division manner shown by the 1 identification image block 173 is employed.
当然,图17B中划分标识的数值仅仅是一种示例。除了图17B中的示例外,也可采用1标识图像块171示出的划分方式,采用010标识图像块172示出的划分方式,采用011标识示出图像块173示出的划分方式。Of course, the numerical value of the division mark in Fig. 17B is just an example. In addition to the example in FIG. 17B, the division manner shown by the 1 identification image block 171 may be employed, and the division manner shown by the 010 identification image block 172 is employed, and the division manner shown by the image block 173 is indicated by the 011 flag.
在实际应用中,视频编码器可以在当前待编码图像块满足预设条件时,才采用二分叉/四分叉划分方式划分该当前待编码图像块。例如,图像块171的宽度为M1,高度为H1,若M1×H1大于X1×Y1,则视频编码器采用二分叉/四分叉划分方式划分图像块171;或者,若M1×H1小于X2×Y2,则视频编码器采用二分叉/四分叉划分方式划分图像块171;或者,若M1×H1大于X1×Y1、且小于X2×Y2,则视频编码器采用二分叉/四分叉划分方式划分图像块171。其中,X1、Y1、X2和Y2均为正整数。In a practical application, the video encoder may divide the current image block to be encoded by using a bifurcation/four-fork division method when the current image block to be encoded satisfies a preset condition. For example, the image block 171 has a width of M1 and a height of H1. If M1×H1 is greater than X1×Y1, the video encoder divides the image block 171 by a bifurcation/quadruple division; or, if M1×H1 is smaller than X2 ×Y2, the video encoder divides the image block 171 by a bifurcation/quadruple division method; or, if M1×H1 is larger than X1×Y1 and smaller than X2×Y2, the video encoder adopts bifurcation/quad The image block 171 is divided by the cross division method. Among them, X1, Y1, X2 and Y2 are all positive integers.
示例性的,若M1=4×H1,则视频编码器采用垂直四分划分当前待编码图像块;若H1=4×M1,则视频编码器采用水平四分划分方式划分该当前待编码图像块。Exemplarily, if M1=4×H1, the video encoder divides the current image block to be coded by vertical quadrant; if H1=4×M1, the video encoder divides the current image block to be coded by horizontal quadrant division. .
S162、视频编码器计算每种候选划分方式的率失真代价,并将最小的率失真代价对应的候选划分方式确定为基础划分方式。S162. The video encoder calculates a rate-distortion cost for each candidate partitioning manner, and determines a candidate partitioning manner corresponding to the minimum rate-distortion cost as the basic partitioning manner.
S163、视频编码器根据候选衍生模式集合中的每一种预设衍生模式对采用基础划分方式划分得到的子图像块进行衍生。S163. The video encoder derivates the sub-image block obtained by dividing the basic division manner according to each preset derivation mode in the candidate derivative mode set.
结合上述图12和图17B,如图18所示,若基础划分方式为水平四分,则视频编码器可以采用上述图12示出的8种预设衍生模式(A、B、C、D、E、F、G、H)分别对171中的至少两个相邻子图像块进行衍生,相应的,采用上述8种预设衍生模式处理后的图像块分别表示为401、402、403、404、405、406、407、408。Referring to FIG. 12 and FIG. 17B above, as shown in FIG. 18, if the basic division mode is horizontal quarter, the video encoder can adopt the eight preset derivative modes (A, B, C, D, shown in FIG. 12 above). E, F, G, and H) respectively deriving at least two adjacent sub-image blocks in 171, and correspondingly, the image blocks processed by using the above eight preset derivation patterns are respectively represented as 401, 402, 403, and 404. , 405, 406, 407, 408.
结合上述图13和图17B,如图18所示,若基础划分方式为垂直四分,则视频编码器可以采用上述图13示出的8种预设衍生模式(A'、B'、C'、D'、E'、F'、G'、H')分别对172中的至少两个相邻子图像块进行衍生,相应的,采用上述8种预设衍生模式处理后的图像块分别表示为501、502、503、504、505、506、507、508。Referring to FIG. 13 and FIG. 17B above, as shown in FIG. 18, if the basic division mode is vertical quarter, the video encoder can adopt the eight preset derivative modes (A', B', C' shown in FIG. 13 above. , D′, E′, F′, G′, H′) respectively deriving at least two adjacent sub-image blocks in 172, and correspondingly, the image blocks processed by using the above eight preset derivation modes respectively represent It is 501, 502, 503, 504, 505, 506, 507, 508.
结合上述图14和图17B,如图18所示,若基础划分方式为水平垂直四分,则视频编码器可以采用上述图14示出的8种预设衍生模式(A″、B″、C″、D″、E″、F″、G″、H″)分别对173中的至少两个相邻子图像块进行衍生,相应的,采用上述8种预设衍生模式处理后的图像块分别表示为601、602、603、604、605、606、607、608。14 and FIG. 17B, as shown in FIG. 18, if the basic division mode is horizontal and vertical quarters, the video encoder can adopt the eight preset derivative modes (A′′, B′′, C shown in FIG. 14 above. ", D", E", F", G", H") respectively deriving at least two adjacent sub-image blocks in 173, and correspondingly, the image blocks processed by using the above eight preset derivation patterns respectively Expressed as 601, 602, 603, 604, 605, 606, 607, 608.
经过预设衍生模式处理后的图像块的标识方法可以根据划分线的状态确定。可选的,若某一划分线去除,则该划分线采用“0”表示;若某一划分线保留,则该划分线采用“1”表示;根据图像块中划分线的去除和保留,来标识该图像块。The method of identifying the image block processed by the preset derivative mode may be determined according to the state of the dividing line. Optionally, if a certain dividing line is removed, the dividing line is represented by “0”; if a dividing line is reserved, the dividing line is represented by “1”; according to the removal and retention of the dividing line in the image block, Identifies the image block.
示例性的,图像块171包括第一划分线、第二划分线以及第三划分线(划分线的表示可参考上述图12),若第一划分线去除,第二划分线和第三划分线保留,即第一子图像块和第二子图像块合并,生成图像块401,则图像块401可以采用011表示。相应的,图像块172包括第一划分线、第二划分线以及第三划分线(划分线的表示可参考上述图13),若第二划分线去除,第一划分线和第三划分线保留,即第二子图像块和第三子图像块合并,生成图像块502,则图像块502可以采用101表示。图像块173包括第一划分线、第二划分线、第三划分线以及第四划分线(划分线的表示可参考上述图14),若第一划分线去除,第二划分线、第三划分线以及第四划分线保留,即第一子图像块和第二子图像块合并,生成图像块601,则图像块601可以采用0111表示。其他图像块的标识方法类似,这里不再一一赘述。Exemplarily, the image block 171 includes a first dividing line, a second dividing line, and a third dividing line (the representation of the dividing line may refer to FIG. 12 above), if the first dividing line is removed, the second dividing line and the third dividing line Reserved, that is, the first sub-image block and the second sub-image block are combined to generate an image block 401, and the image block 401 can be represented by 011. Correspondingly, the image block 172 includes a first dividing line, a second dividing line, and a third dividing line (the representation of the dividing line can refer to FIG. 13 above), and if the second dividing line is removed, the first dividing line and the third dividing line are retained. That is, the second sub-image block and the third sub-image block are combined to generate an image block 502, and the image block 502 can be represented by 101. The image block 173 includes a first dividing line, a second dividing line, a third dividing line, and a fourth dividing line (the representation of the dividing line can be referred to FIG. 14 above), if the first dividing line is removed, the second dividing line, and the third dividing line The line and the fourth dividing line are reserved, that is, the first sub-image block and the second sub-image block are combined to generate an image block 601, and the image block 601 may be represented by 0111. The identification methods of other image blocks are similar, and will not be repeated here.
当然,图像块的标识还可以采用与图18不同的方法,本申请实施例对此不作具体限定。Of course, the identification of the image block may also adopt a different method from that of FIG. 18, which is not specifically limited in this embodiment of the present application.
在实际编码中,对于每一种划分方式而言,视频编码器可以选取图18示出的与该划分方式对应的八种预设衍生模式中的部分作为重点模式(该衍生模式生成的图像块还需要进一步的划分)或者删除模式(不考虑该衍生模式),剩余部分作为普通模式(视频编码器进行衍生处理的模式)。这样,候选衍生模式集合可以仅包括普通模式。In the actual coding, for each division mode, the video encoder may select a part of the eight preset derivative modes corresponding to the division mode shown in FIG. 18 as the focus mode (the image block generated by the derivative mode) Further division is required) or the deletion mode (regardless of the derivative mode), and the remainder is used as the normal mode (the mode in which the video encoder performs derivation processing). Thus, the set of candidate derived patterns may include only normal patterns.
示例性的,若基础划分方式为水平四分,则普通模式可以包括上述图12中的B、C、D以及F示出的预设衍生模式,即视频编码器生成图像块402、403、404、406。Exemplarily, if the basic division mode is horizontal quarter, the normal mode may include the preset derivative modes shown by B, C, D, and F in FIG. 12 above, that is, the video encoder generates image blocks 402, 403, and 404. 406.
若基础划分方式为垂直四分,则普通模式可以包括上述图13中的B'、D'、E' 以及G'示出的预设衍生模式,即视频编码器生成图像块502、504、505、507。If the basic division mode is vertical quarter, the normal mode may include the preset derivative modes shown by B', D', E', and G' in FIG. 13 above, that is, the video encoder generates image blocks 502, 504, and 505. 507.
若基础划分方式为水平垂直四分,则普通模式可以包括上述图14中的A″、B″、E″以及F″示出的预设衍生模式,即视频编码器生成图像块601、602、605、606。If the basic division mode is horizontal and vertical quarters, the normal mode may include the preset derivative modes shown by A′′, B′′, E′′, and F′′ in FIG. 14 above, that is, the video encoder generates image blocks 601 and 602, 605, 606.
对于上述普通模式而言,本申请实施例可采用预设长度的比特标识,如采用2比特标识。For the above-mentioned common mode, the embodiment of the present application may adopt a bit identifier of a preset length, such as a 2-bit identifier.
结合图18可以看出,图像块608和图像块173的形状相同,因此,若图像块608对应的预设衍生模式为重点模式,则该模式可以采用图像块173的标识位“1”标识。相比于图像块608的标识位“1111”,标识位“1”的位数更少。若视频编码器确定图像块608示出的衍生模式为目标衍生模式,则该视频编码器可直接在划分标识的最后一位比特之后采用1表示目标衍生模式为图像块608示出的衍生模式。As can be seen in conjunction with FIG. 18, the image block 608 and the image block 173 have the same shape. Therefore, if the preset derivative mode corresponding to the image block 608 is the focus mode, the mode can be identified by the flag bit "1" of the image block 173. Compared to the identification bit "1111" of the image block 608, the number of bits of the identification bit "1" is less. If the video encoder determines that the derived mode shown by image block 608 is a target derived mode, the video encoder may directly use 1 to indicate the derived mode of the target derived mode for image block 608 after the last bit of the divided identification.
本申请实施例中的衍生图像块可以采用较少数量的比特标识。相比于现有技术,本申请提供的编码方法可以采用简单的标识即可标识图像块的划分,有效的提高了编码效率。The derived image blocks in the embodiments of the present application may employ a smaller number of bit identifiers. Compared with the prior art, the coding method provided by the present application can identify the division of image blocks by using simple identification, and effectively improve coding efficiency.
S164、视频编码器计算与基础划分方式对应的候选衍生模式集合中的每种预设衍生模式的率失真代价。S164. The video encoder calculates a rate distortion cost of each of the preset derivative modes in the candidate derivative mode set corresponding to the basic partition mode.
S165、视频编码器将最小的率失真代价对应的预设衍生模式确定为目标衍生模式。S165. The video encoder determines the preset derivative mode corresponding to the minimum rate distortion cost as the target derivative mode.
容易理解的是,若上述S153得到的第一衍生图像块还需要进行划分,则视频编码器将该第一衍生图像块视为当前待编码图像块,重新执行S161~S165以确定基础划分方式以及目标衍生模式。It is easy to understand that if the first derivative image block obtained in the above S153 further needs to be divided, the video encoder regards the first derivative image block as the current image block to be encoded, and re-executes S161-S165 to determine the basic division manner and Target derivative model.
结合上述描述可知,本申请中的视频编码码器还可以只有在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,确定目标衍生模式。As can be seen from the above description, the video codec in the present application may also determine the target derivative mode only if the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold.
具体的,结合上述图15A和上述图16,如图15B所示,上述S151可以替换为S151a~S151c。Specifically, in combination with FIG. 15A and FIG. 16 described above, as shown in FIG. 15B, the above S151 may be replaced with S151a to S151c.
S151a、视频编码器确定当前待编码图像块的基础划分方式以及当前待编码图像块的特征参数。S151a. The video encoder determines a basic division manner of the current image block to be encoded and a feature parameter of the current image block to be encoded.
视频编码器确定当前待编码图像块的基础划分方式的方法可以参考上述S161~S162的描述,此处不再进行详细赘述。For a method for the video encoder to determine the basic division mode of the image block to be encoded, reference may be made to the descriptions of the foregoing S161 to S162, and details are not described herein again.
当前待编码图像块的特征参数是指当前待编码图像块的高度以及当前待编码图像块的宽度。The feature parameter of the current image block to be encoded refers to the height of the current image block to be encoded and the width of the current image block to be encoded.
S151b、视频编码器判断当前待编码图像块的特征参数是否小于或等于第一预设阈值。S151b. The video encoder determines whether a feature parameter of the current image block to be encoded is less than or equal to a first preset threshold.
若当前待编码图像块的特征参数小于或等于第一预设阈值(例如32×32),视频编码器执行S151c。If the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold (for example, 32×32), the video encoder performs S151c.
若当前待编码图像块的特征参数大于第一预设阈值,视频编码器则将当前待编码图像块的子图像块视为当前待编码图像块,即重新执行S150。例如:在图21中,若当前待编码图像块为图像块210,图像块210的大小为64×64,第一预设阈值为32×32,视频编码器确定图像块210的基础划分方式为水平二分,对图像块210水平二分后,生成图像块212,由于图像块210的特征参数大于第一预设阈值,因此,视频编码器将图像块212中的子图像块作为当前待编码图像块,并重新确定图像块212的子 图像块的基础划分方式。If the feature parameter of the current image block to be encoded is greater than the first preset threshold, the video encoder regards the sub-image block of the current image block to be encoded as the current image block to be encoded, that is, re-executes S150. For example, in FIG. 21, if the current image block to be encoded is the image block 210, the size of the image block 210 is 64×64, and the first preset threshold is 32×32, the video encoder determines that the basic division mode of the image block 210 is After horizontally dividing the image block 210, the image block 212 is generated. Since the feature parameter of the image block 210 is greater than the first preset threshold, the video encoder uses the sub-image block in the image block 212 as the current image block to be encoded. And re-determining the basic division manner of the sub-image block of the image block 212.
S151c、视频编码器确定目标衍生模式。S151c, the video encoder determines the target derivative mode.
视频编码器确定目标衍生模式的方法可以参考上述S163~S165的描述,此处不再进行详细赘述。For the method for the video encoder to determine the target derivative mode, reference may be made to the descriptions of S163 to S165 above, and details are not described herein again.
图15B示出的流程中,视频编码器在执行S151a后,可以先执行S152,后执行S151b,也可以先执行S151b,后执行S152,还可以同时执行S152和S151b,本申请实施例对此不作具体限定。In the flow shown in FIG. 15B, after performing S151a, the video encoder may perform S152 first, then S151b, or S151b may be performed first, then S152 may be performed, and S152 and S151b may be simultaneously performed. Specifically limited.
容易理解的是,由于视频编码器只有在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,才确定目标衍生模式,因此,对于特征参数大于第一预设阈值的图像块而言,码流可仅包括该图像块的划分标识,而未包括该图像块的衍生标识,有效的减少了码流占用的传输资源。当然,对于特征参数大于第一预设阈值的图像块而言,码流也可包括该图像块的衍生标识,该图像块的衍生标识用于指示该图像块中的子图像块未衍生。It is easy to understand that the video encoder only determines the target derivative mode if the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, and therefore, for the image whose feature parameter is greater than the first preset threshold. In the case of a block, the code stream may include only the partition identifier of the image block, and the derivative identifier of the image block is not included, which effectively reduces the transmission resource occupied by the code stream. Certainly, for an image block whose feature parameter is greater than the first preset threshold, the code stream may also include a derivative identifier of the image block, and the derived identifier of the image block is used to indicate that the sub-image block in the image block is not derivatized.
视频编码器只有在当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,才确定目标衍生模式,有效的提高了编码速率。在实际应用中,图15B示出的流程更容易实现。The video encoder determines the target derivative mode only when the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, and effectively increases the encoding rate. In practical applications, the flow shown in Figure 15B is easier to implement.
为了便于充分理解本申请,现结合图21示出的编码树(coding tree)说明本申请中的图像块划分以及子图像块的衍生。图21示出了采用本申请提供的方法对方形图像块的划分以及方形图像块中子图像块的衍生,以及对非方形图像块的划分以及非方形图像块中子图像块的衍生。In order to facilitate a full understanding of the present application, the image block partitioning and the derivation of sub-image blocks in the present application will now be described in conjunction with the coding tree shown in FIG. Figure 21 illustrates the partitioning of square image blocks and the derivation of sub-image blocks in a square image block using the methods provided herein, as well as the partitioning of non-square image blocks and the derivation of sub-image blocks in non-square image blocks.
视频编码器对图像块210进行划分,在第1层级可以采用水平垂直四分划分方式划分图像块210,生成图像块211,也可以不进行划分。在不进行划分的分支下,视频编码器在第2层级可对图像块210采用二分叉划分方式进行划分;也可以采用四分叉/不划分的划分方式进行划分。在第2层级对图像块210采用二分叉划分方式进行划分的分支下,视频编码器具体可以采用水平二分划分方式划分图像块210,生成图像块212;也可以采用垂直二分划分方式划分图像块210,生成图像块213。进一步地,视频编码器可采用二分叉划分方式划分图像块212的子图像块,也可采用四分叉划分方式划分图像块212的子图像块。在视频编码器采用四分叉划分方式划分图像块212的子图像块的分支下,视频编码器具体可以采用水平四分划分方式划分图像块212的子图像块,以生成图像块219;也可以采用垂直四分划分方式划分图像块212的子图像块,以生成图像块220。在视频编码器采用四分叉/不划分的划分方式进行划分的分支下,视频编码器具体可采用水平四分划分方式划分图像块210,以生成图像块214;也可以采用垂直四分划分方式划分图像块210,以生成图像块215。其中,图像块219和图像块220为非方形的图像块,采用四种预设衍生模式分别对图像块219中的至少两个相邻子图像块进行衍生处理后的图像块分别表示为221、222、223、233;采用四种预设衍生模式分别对图像块220中的至少两个相邻子图像块进行衍生处理后的图像块分别表示为224、225、226、234。图像块214和图像块215为方形图像块,采用四种预设衍生模式分别对图像块214中的至少两个相邻子图像块进行衍生处理后的图像块分别表示为227、228、228、235;采用四种预设衍生模式分别对图像块215中的至 少两个相邻子图像块进行衍生处理后的图像块分别表示为230、231、232、236。The video encoder divides the image block 210, and the image block 210 may be divided by the horizontal vertical quadrant division method at the first level, and the image block 211 may be generated or may not be divided. Under the branch without division, the video encoder may divide the image block 210 by a bifurcation division method at the second level; or may divide the four-fork/non-division division manner. In the branch of the second layer that divides the image block 210 by the bifurcation division mode, the video encoder may specifically divide the image block 210 by the horizontal binary division method to generate the image block 212; or divide the image block by the vertical binary division method. 210. Generate an image block 213. Further, the video encoder may divide the sub-image block of the image block 212 by using a bifurcation division manner, and may also divide the sub-image block of the image block 212 by a four-fork division method. The video encoder may divide the sub-image block of the image block 212 into a horizontal quadrant division manner to generate an image block 219, or a video encoder may divide the sub-image block of the image block 212 by a four-division division method. The sub-image blocks of the image block 212 are divided by a vertical division method to generate an image block 220. In the branch where the video encoder is divided by the four-branch/non-divided partitioning mode, the video encoder may divide the image block 210 by horizontal quadrant division to generate the image block 214, or may adopt the vertical quadrant division mode. The image block 210 is divided to generate an image block 215. The image block 219 and the image block 220 are non-square image blocks, and the image blocks obtained by deriving the at least two adjacent sub-image blocks in the image block 219 are respectively represented as 221 by using four preset derivation modes. 222, 223, 233; image blocks obtained by deriving at least two adjacent sub-image blocks in the image block 220 by using four preset derivation modes are respectively represented as 224, 225, 226, 234. The image block 214 and the image block 215 are square image blocks, and the image blocks obtained by deriving the at least two adjacent sub-image blocks in the image block 214 by using four preset derivation modes are respectively represented as 227, 228, 228, 235. Image blocks obtained by deriving at least two adjacent sub-image blocks in the image block 215 by using four preset derivation modes are respectively represented as 230, 231, 232, and 236.
图21中的各个图像块分别采用图中示出的方法标识。The individual image blocks in Fig. 21 are identified by the methods shown in the figures, respectively.
图像块212采用“011”标识,若图像块212的子图像块的基础划分方式为水平四分,生成图像块219,则该基础划分方式可采用“011111”标识,若图像块212的子图像块的特征参数小于或等于第一预设阈值,则视频编码器可从图21示出的与图像块219对应的4种预设衍生模式中确定一种作为目标衍生模式。由于图像块233的形状与图像块219相同,因此,图像块233表示的衍生模式可直接采用1标识,剩余的3种预设衍生模式可采用与1不同的数值(如0)标识,图像块221、222、223的标识均以0开始。这样,若视频编码器采用图像块233示出的衍生模式为目标衍生模式,则视频编码器可直接在基础划分方式的标识“011111”之后添加1,即形成标识“0111111”。对应的,视频解码器解析码流,在获取到标识“0111111”后,可确定在图像块219之后并未进行衍生。若视频编码器采用图像块223示出的衍生模式为目标衍生模式,则视频编码器在基础划分方式的标识“011111”之后添加011,即形成标识“011111011”。对应的,视频解码器解析码流,在获取到标识“011111011”后,可确定目标衍生模式为图像块223示出的衍生模式。The image block 212 is identified by "011". If the basic division mode of the sub-image block of the image block 212 is horizontal four-division and the image block 219 is generated, the basic division mode may be identified by "011111", if the sub-image of the image block 212 The feature parameter of the block is less than or equal to the first preset threshold, and the video encoder may determine one of the four preset derivative modes corresponding to the image block 219 shown in FIG. 21 as the target derivative mode. Since the shape of the image block 233 is the same as that of the image block 219, the derivative mode represented by the image block 233 can be directly identified by 1 , and the remaining 3 preset derivative modes can be identified by a value different from 1 (such as 0), the image block. The logos of 221, 222, and 223 start with 0. Thus, if the video encoder adopts the derivative mode shown by the image block 233 as the target derivative mode, the video encoder can directly add 1 after the identifier "011111" of the basic division mode, that is, form the identifier "0111111". Correspondingly, the video decoder parses the code stream, and after obtaining the identifier "0111111", it can be determined that the derivation is not performed after the image block 219. If the video encoder adopts the derivative mode shown by the image block 223 as the target derivative mode, the video encoder adds 011 after the identifier "011111" of the basic division mode, that is, the identifier "011111011" is formed. Correspondingly, the video decoder parses the code stream, and after obtaining the identifier “011111011”, it may determine that the target derivative mode is the derivative mode shown by the image block 223.
同理,视频编码器也采用类似的方法对图像块214、215、220进行处理。Similarly, the video encoder also processes the image blocks 214, 215, 220 in a similar manner.
图21示出的划分方式是在现有的QTBT划分方式的基础上实现的,因此,在实际应用中,该划分方式比较容易实现。The division mode shown in FIG. 21 is implemented on the basis of the existing QTBT division mode. Therefore, in practical applications, the division mode is relatively easy to implement.
本申请中的视频编码器通过划分方式和衍生模式的结合,标识出多种不同的划分结果,丰富了图像块的划分方式,能够适应于各种纹理特性的视频图像。The video encoder in the present application identifies a plurality of different division results by combining the division mode and the derivative mode, enriches the division manner of the image block, and can adapt to video images of various texture characteristics.
本申请实施例提供一种解码装置,该解码装置可以为视频解码器。具体的,解码装置用于执行以上解码方法中的视频解码器所执行的步骤。本申请实施例提供的解码装置可以包括相应步骤所对应的模块。The embodiment of the present application provides a decoding apparatus, which may be a video decoder. Specifically, the decoding device is configured to perform the steps performed by the video decoder in the above decoding method. The decoding apparatus provided in this embodiment of the present application may include a module corresponding to the corresponding step.
本申请实施例可以根据上述方法示例对解码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the function module into the decoding 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.
在采用对应各个功能划分各个功能模块的情况下,图22示出上述实施例中所涉及的解码装置的一种可能的结构示意图。如图22所示,解码装置22包括解析单元220、划分单元221、衍生单元222、解码单元223和判断单元224。In the case where the respective functional modules are divided by the respective functions, FIG. 22 shows a possible structural diagram of the decoding device involved in the above embodiment. As shown in FIG. 22, the decoding device 22 includes a parsing unit 220, a dividing unit 221, a deriving unit 222, a decoding unit 223, and a judging unit 224.
解析单元220用于支持该解码装置执行上述实施例中的S111等,和/或用于本文所描述的技术的其它过程。The parsing unit 220 is configured to support the decoding apparatus to perform S111 and the like in the above embodiments, and/or other processes for the techniques described herein.
划分单元221用于支持该解码装置执行上述实施例中的S112等,和/或用于本文所描述的技术的其它过程。The dividing unit 221 is for supporting the decoding apparatus to execute S112 and the like in the above embodiments, and/or other processes for the techniques described herein.
衍生单元222用于支持该解码装置执行上述实施例中的S113等,和/或用于本文所描述的技术的其它过程。The derivation unit 222 is for supporting the decoding apparatus to perform S113 and the like in the above embodiments, and/or other processes for the techniques described herein.
解码单元223用于支持该解码装置执行上述实施例中的S114等,和/或用于本文所描述的技术的其它过程。The decoding unit 223 is for supporting the decoding apparatus to perform S114 and the like in the above embodiments, and/or other processes for the techniques described herein.
判断单元224用于指示该解码装置执行上述实施例中的S111b等,和/或用于本文所描述的技术的其它过程。The judging unit 224 is configured to instruct the decoding apparatus to execute S111b and the like in the above embodiment, 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.
当然,本申请实施例提供的解码装置包括但不限于上述模块,例如:解码装置还可以包括存储单元225。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 unit 225.
存储单元225可以用于存储该解码装置的程序代码和数据。The storage unit 225 can be used to store program codes and data of the decoding device.
在采用集成的单元的情况下,本申请实施例提供的解码装置的结构示意图如图23所示。在图23中,解码装置23包括:处理模块230和通信模块231。处理模块230用于对解码装置的动作进行控制管理,例如,执行上述解析单元220、划分单元221、衍生单元222、解码单元223和判断单元224执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块231用于支持解码装置与其他设备之间的交互。如图23所示,解码装置还可以包括存储模块232,存储模块232用于存储解码装置的程序代码和数据,例如存储上述存储单元225所保存的内容。In the case of an integrated unit, a schematic structural diagram of a decoding apparatus provided by an embodiment of the present application is shown in FIG. In FIG. 23, the decoding device 23 includes a processing module 230 and a communication module 231. The processing module 230 is configured to perform control management on the actions of the decoding device, for example, perform the steps performed by the parsing unit 220, the dividing unit 221, the deriving unit 222, the decoding unit 223, and the determining unit 224, and/or for performing the description herein. Other processes of technology. The communication module 231 is used to support interaction between the decoding device and other devices. As shown in FIG. 23, the decoding apparatus may further include a storage module 232 for storing program codes and data of the decoding apparatus, for example, storing the content held by the storage unit 225.
其中,处理模块230可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块231可以是收发器、RF电路或通信接口等。存储模块232可以是存储器。The processing module 230 can be a processor or a controller, such as a central processing unit (CPU), a general purpose processor, a digital signal processor (DSP), an ASIC, an FPGA, or other programmable Logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like. The communication module 231 can be a transceiver, an RF circuit or a communication interface, or the like. The storage module 232 can be a memory.
其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。All the relevant content of each scenario involved in the foregoing method embodiments may be referred to the functional description of the corresponding functional module, and details are not described herein again.
上述解码装置22和解码装置23均可执行上述图11A或图11B所示的解码方法,解码装置22和解码装置23具体可以是视频解码装置或者其他具有视频编解码功能的设备。Both the decoding device 22 and the decoding device 23 can perform the above-described decoding method shown in FIG. 11A or FIG. 11B. The decoding device 22 and the decoding device 23 can be specifically a video decoding device or other device having a video encoding and decoding function.
本申请还提供一种解码设备,该解码设备包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处理器执行指令时,解码设备执行本申请实施例的解码方法。The application also provides a decoding device, the decoding device comprising: one or more processors, a memory, a communication interface. The memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, and the computer program code includes instructions that, when executed by one or more processors, perform a decoding method of an embodiment of the present application.
这里的解码设备可以是视频显示设备,智能手机,便携式电脑以及其它可以处理视频或者播放视频的设备。The decoding devices herein may be video display devices, smart phones, portable computers, and other devices that can process video or play video.
本申请还提供一种视频解码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的解码方法。The present application also provides a video decoder including a nonvolatile storage medium, and a central processing unit, the nonvolatile storage medium storing an executable program, the central processing unit and the nonvolatile storage The medium is connected, and the executable program is executed to implement the decoding method of the embodiment of the present application.
本申请还提供一种解码器,所述解码器包括本申请实施例中的解码装置(解码装置22和解码装置23)以及重建模块,其中,所述重建模块用于根据所述解码装置得到的预测图像素确定当前图像块的重建像素值。The present application also provides a decoder, which includes the decoding device (the decoding device 22 and the decoding device 23) and the reconstruction module in the embodiment of the present application, wherein the reconstruction module is used according to the decoding device. The prediction map pixel determines the reconstructed pixel value of the current image block.
本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括 一个或多个程序代码,该一个或多个程序包括指令,当解码设备中的处理器在执行该程序代码时,该解码设备执行如图11A或图11B所示的解码方法。Another embodiment of the present application also provides a computer readable storage medium comprising one or more program codes, the one or more programs comprising instructions when a processor in a decoding device is executing the program At the time of the code, the decoding device performs the decoding method as shown in FIG. 11A or FIG. 11B.
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;解码设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得终端实施执行图11A或图11B所示的解码方法中的视频解码器的步骤。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 device is readable from a computer The readable storage medium reads the computer execution instructions, and the at least one processor executes the computer to execute the instructions such that the terminal implements the step of executing the video decoder in the decoding method illustrated in FIG. 11A or FIG. 11B.
本申请实施例提供一种编码装置,该编码装置可以为视频编码器。具体的,编码装置用于执行以上编码方法中的视频编码器所执行的步骤。本申请实施例提供的编码装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an encoding apparatus, which may be a video encoder. Specifically, the encoding device is configured to perform the steps performed by the video encoder in the above encoding method. The encoding 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 divide the functional modules of the encoding device according to the foregoing method example. For example, each functional 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.
在采用对应各个功能划分各个功能模块的情况下,图24示出上述实施例中所涉及的编码装置的一种可能的结构示意图。如图24所示,编码装置24包括确定单元240、划分单元241、衍生单元242、编码单元243和判断单元244。In the case where the respective functional modules are divided by corresponding functions, FIG. 24 shows a possible structural diagram of the encoding apparatus involved in the above embodiment. As shown in FIG. 24, the encoding device 24 includes a determining unit 240, a dividing unit 241, a deriving unit 242, an encoding unit 243, and a judging unit 244.
确定单元240用于支持该编码装置执行上述实施例中的S150、S151、S161、S162、S163、S164、S165等,和/或用于本文所描述的技术的其它过程。The determining unit 240 is configured to support the encoding apparatus to perform S150, S151, S161, S162, S163, S164, S165, etc. in the above embodiments, and/or other processes for the techniques described herein.
划分单元241用于支持该编码装置执行上述实施例中的S152等,和/或用于本文所描述的技术的其它过程。The dividing unit 241 is for supporting the encoding apparatus to execute S152 and the like in the above embodiments, and/or other processes for the techniques described herein.
衍生单元242用于支持该编码装置执行上述实施例中的S153等,和/或用于本文所描述的技术的其它过程。The derivation unit 242 is for supporting the encoding apparatus to perform S153 and the like in the above embodiments, and/or other processes for the techniques described herein.
编码单元243用于支持该编码装置执行上述实施例中的S154等,和/或用于本文所描述的技术的其它过程。The encoding unit 243 is for supporting the encoding apparatus to execute S154 and the like in the above embodiments, and/or other processes for the techniques described herein.
判断单元244用于支持该编码装置执行上述实施例中的S151b等,和/或用于本文所描述的技术的其它过程。The judging unit 244 is for supporting the encoding apparatus to execute S151b and the like in the above embodiment, 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.
当然,本申请实施例提供的编码装置包括但不限于上述模块,例如:编码装置还可以包括存储单元245。The encoding device provided by the embodiment of the present application includes, but is not limited to, the foregoing module. For example, the encoding device may further include a storage unit 245.
存储单元245可以用于存储该编码装置的程序代码和数据。The storage unit 245 can be used to store program codes and data of the encoding device.
在采用集成的单元的情况下,本申请实施例提供的编码装置的结构示意图如图25所示。在图25中,编码装置25包括:处理模块250和通信模块251。处理模块250用于对编码装置的动作进行控制管理,例如,执行上述确定单元240、划分单元241、衍生单元242、编码单元243和判断单元244执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块251用于支持编码装置与其他设备之间的交互。如图25所示,编码装置还可以包括存储模块252,存储模块252用于存储编码装置的程序代 码和数据,例如存储上述存储单元245所保存的内容。A schematic structural diagram of an encoding apparatus provided by an embodiment of the present application is shown in FIG. 25 in the case of an integrated unit. In FIG. 25, the encoding device 25 includes a processing module 250 and a communication module 251. The processing module 250 is configured to perform control management on the actions of the encoding device, for example, perform the steps performed by the determining unit 240, the dividing unit 241, the deriving unit 242, the encoding unit 243, and the determining unit 244, and/or for performing the description herein. Other processes of technology. The communication module 251 is used to support interaction between the encoding device and other devices. As shown in Fig. 25, the encoding device may further include a storage module 252 for storing program code and data of the encoding device, for example, storing the content held by the storage unit 245.
其中,处理模块250可以是处理器或控制器,例如可以是CPU,通用处理器,DSP,ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块251可以是收发器、RF电路或通信接口等。存储模块252可以是存储器。The processing module 250 can be a processor or a controller, such as a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like. The communication module 251 can be a transceiver, an RF circuit, a communication interface, or the like. The storage module 252 can be a memory.
其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。All the relevant content of each scenario involved in the foregoing method embodiments may be referred to the functional description of the corresponding functional module, and details are not described herein again.
上述编码装置24和编码装置25均可执行上述图15A或图15B所示的编码方法,编码装置24和编码装置25具体可以是视频编码装置或者其他具有视频编编码功能的设备。Both the encoding device 24 and the encoding device 25 described above can perform the above-described encoding method shown in FIG. 15A or FIG. 15B. The encoding device 24 and the encoding device 25 can be specifically a video encoding device or other device having a video encoding function.
本申请还提供一种编码设备,该编码设备包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处理器执行指令时,编码设备执行本申请实施例的编码方法。The application also provides an encoding device comprising: one or more processors, a memory, a communication interface. The memory, communication interface is coupled to one or more processors; the memory is for storing computer program code, and the computer program code includes instructions that, when executed by one or more processors, perform an encoding method of an embodiment of the present application.
这里的编码设备可以是视频显示设备,智能手机,便携式电脑以及其它可以处理视频或者播放视频的设备。The encoding device here can be a video display device, a smart phone, a portable computer, and other devices that can process video or play video.
本申请还提供一种视频编码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的编码方法。The present application also provides a video encoder, including a non-volatile storage medium, and a central processing unit, the non-volatile storage medium storing an executable program, the central processing unit and the non-volatile storage The medium is connected, and the executable program is executed to implement the encoding method of the embodiment of the present application.
本申请还提供一种编码器,所述编码器包括本申请实施例中的编码装置(编码装置24和编码装置25)。The present application also provides an encoder including the encoding device (encoding device 24 and encoding device 25) in the embodiment of the present application.
本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括一个或多个程序代码,该一个或多个程序包括指令,当编码设备中的处理器在执行该程序代码时,该编码设备执行如图15A或图15B所示的编码方法。Another embodiment of the present application also provides a computer readable storage medium including one or more program codes, the one or more programs including instructions, when a processor in an encoding device is executing the program At the time of the code, the encoding device executes the encoding method as shown in Fig. 15A or Fig. 15B.
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;编码设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得终端实施执行图15A或图15B所示的编码方法中的视频编码器的步骤。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 device can be from a computer The readable storage medium reads the computer execution instructions, and the at least one processor executes the computer to execute the instructions such that the terminal implements the step of executing the video encoder in the encoding method illustrated in FIG. 15A or FIG. 15B.
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。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.
所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或 无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。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 (32)

  1. 一种解码方法,其特征在于,包括:A decoding method, comprising:
    解析码流,以确定当前待解码图像块的基础划分方式以及所述当前待解码图像块中子图像块的目标衍生模式;所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;Parsing the code stream to determine a basic division manner of the current image block to be decoded and a target derivative mode of the sub image block in the current image block to be decoded; the target derivative mode is one of a candidate derivative mode set, the candidate The derivative mode set includes M preset derivative modes, where the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derive any two adjacent sub-image blocks in the current image block to be decoded into one derivative. Image block, M is an integer greater than or equal to 0;
    根据所述基础划分方式,将所述当前待解码图像块划分为N个子图像块,N为大于或等于2的整数;Decoding, according to the basic division manner, the current image block to be decoded into N sub-image blocks, where N is an integer greater than or equal to 2;
    根据所述目标衍生模式指示的衍生方式,将所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;And deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first derivative image block according to the derivative manner of the target-derived mode indication;
    对所述第一衍生图像块进行解码。Decoding the first derived image block.
  2. 一种解码方法,其特征在于,包括:A decoding method, comprising:
    解析码流,以确定当前待解码图像块的基础划分方式以及所述当前待解码图像块的特征参数,所述特征参数为高度和宽度中的至少一个;Parsing the code stream to determine a basic division manner of the current image block to be decoded and a feature parameter of the current image block to be decoded, the feature parameter being at least one of a height and a width;
    在所述当前待解码图像块的特征参数小于或等于第一预设阈值的情况下,解析码流,以确定所述当前待解码图像块中子图像块的目标衍生模式,所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,所述M种预设衍生模式指示的衍生方式互不相同,所述衍生图像块的特征参数大于所述当前待解码图像块中每个子图像块的特征参数,所述特征参数为高度和宽度中的至少一个,M为大于或等于0的整数;And if the feature parameter of the current to-be-decoded image block is less than or equal to the first preset threshold, parsing the code stream to determine a target derivative mode of the sub-image block in the current image block to be decoded, the target derivative mode As one of the candidate derivative mode sets, the candidate derivative mode set includes M preset derivative modes, where the preset derivative mode is used to indicate a derivative mode, where the derivative mode is used to use the current image block to be decoded Any two adjacent sub-image blocks are derived into one derivation image block, and the derivation manners of the M preset derivation mode indications are different from each other, and the feature parameters of the derived image block are larger than each of the current image blocks to be decoded. a feature parameter of the sub-image block, the feature parameter being at least one of height and width, and M being an integer greater than or equal to 0;
    根据所述基础划分方式,将所述当前待解码图像块划分为N个子图像块,N为大于或等于2的整数;Decoding, according to the basic division manner, the current image block to be decoded into N sub-image blocks, where N is an integer greater than or equal to 2;
    根据所述目标衍生模式指示的衍生方式,将所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;And deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first derivative image block according to the derivative manner of the target-derived mode indication;
    对所述第一衍生图像块进行解码。Decoding the first derived image block.
  3. 根据权利要求1或2所述的解码方法,其特征在于,A decoding method according to claim 1 or 2, characterized in that
    所述基础划分方式为水平N分、垂直N分或水平垂直N分。The basic division mode is horizontal N, vertical N or horizontal and vertical N.
  4. 根据权利要求3所述的解码方法,其特征在于,The decoding method according to claim 3, characterized in that
    在所述基础划分方式为所述水平N分的情况下,所述N个子图像块中的每个子图像块的宽度均与所述当前待解码图像块的宽度相等,所述每个子图像块的高度均等于所述当前待解码图像块的高度的1/N;In a case where the basic division mode is the horizontal N-score, a width of each of the N sub-image blocks is equal to a width of the current image block to be decoded, and each of the sub-image blocks The height is equal to 1/N of the height of the current image block to be decoded;
    在所述基础划分方式为所述垂直N分的情况下,所述N个子图像块中的每个子图像块的高度均与所述当前待解码图像块的高度相等,所述每个子图像块的宽度均等于所述当前待解码图像块的宽度的1/N。In a case where the basic division manner is the vertical N-score, a height of each of the N sub-image blocks is equal to a height of the current image block to be decoded, and each of the sub-image blocks The width is equal to 1/N of the width of the current image block to be decoded.
  5. 根据权利要求3所述的解码方法,其特征在于,The decoding method according to claim 3, characterized in that
    在所述基础划分方式为所述水平垂直N分的情况下,所述N个子图像块中的每个子图像块的宽度均等于所述当前待解码图像块的宽度的
    Figure PCTCN2019087316-appb-100001
    所述每个子图像块的高 度均等于所述当前待解码图像块的高度的
    Figure PCTCN2019087316-appb-100002
    为整数。
    In a case where the basic division manner is the horizontal vertical N-minute, the width of each of the N sub-image blocks is equal to the width of the current image block to be decoded.
    Figure PCTCN2019087316-appb-100001
    The height of each of the sub-image blocks is equal to the height of the current image block to be decoded.
    Figure PCTCN2019087316-appb-100002
    Is an integer.
  6. 根据权利要求1-5中任意一项所述的解码方法,其特征在于,A decoding method according to any one of claims 1 to 5, characterized in that
    当所述基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当所述基础划分方式为水平垂直N分时,
    Figure PCTCN2019087316-appb-100003
    为整数。
    When the basic division mode is horizontal N or vertical N, 0 ≤ M ≤ 2 N-1 ; when the basic division mode is horizontal and vertical N,
    Figure PCTCN2019087316-appb-100003
    Is an integer.
  7. 根据权利要求6所述的解码方法,其特征在于,The decoding method according to claim 6, wherein
    在N=4、M=4、且所述基础划分方式为所述水平四分的情况下,所述候选衍生模式集合包括第一预设衍生模式、第二预设衍生模式、第三预设衍生模式以及第四预设衍生模式;其中,所述第一预设衍生模式为第一子图像块、第二子图像块和第三子图像块衍生为一个衍生图像块;所述第二预设衍生模式为所述第三子图像块和第四子图像块衍生为一个衍生图像块;所述第三预设衍生模式为所述第二子图像块和所述第三子图像块衍生为一个衍生图像块;所述第四预设衍生模式为所述第一子图像块和所述第二子图像块衍生为一个衍生图像块,所述第三子图像块和所述第四子图像块衍生为另一衍生图像块;所述第一子图像块、所述第二子图像块、所述第三子图像块和所述第四子图像块在所述当前待解码图像块中按照从上往下的顺序依次排列;In the case that N=4, M=4, and the basic division mode is the horizontal four-point, the candidate derivative mode set includes a first preset derivative mode, a second preset derivative mode, and a third preset. a derivative mode and a fourth preset derivative mode; wherein the first preset derivative mode is a first sub-image block, a second sub-image block, and a third sub-image block are derived as one derived image block; Determining that the third sub-image block and the fourth sub-image block are derived as one derived image block; the third preset derivation mode is deriving the second sub-image block and the third sub-image block as a derived image block; the fourth preset derivative mode is that the first sub-image block and the second sub-image block are derived as one derived image block, the third sub-image block and the fourth sub-image Deriving a block into another derived image block; the first sub-image block, the second sub-image block, the third sub-image block, and the fourth sub-image block are in the current image block to be decoded Arranged in order from top to bottom;
    在N=4、M=4、所述基础划分方式为所述垂直四分的情况下,所述候选衍生模式集合包括第五预设衍生模式、第六预设衍生模式、第七预设衍生模式以及第八预设衍生模式;其中,所述第五预设衍生模式为第五子图像块、第六子图像块和第七子图像块衍生为一个衍生图像块;所述第六预设衍生模式为所述第六子图像块、第七子图像块和第八子图像块衍生为一个衍生图像块;所述第七预设衍生模式为所述第六子图像块和所述第七子图像块衍生为一个衍生图像块;所述第八预设衍生模式为所述第五子图像块、所述第六子图像块、第七子图像块和所述第八子图像块均保持独立;所述第五子图像块、所述第六子图像块、第七子图像块和所述第八子图像块在所述当前待解码图像块中按照从左往右的顺序依次排列;In the case that N=4, M=4, and the basic division manner is the vertical quarter, the candidate derivative mode set includes a fifth preset derivative mode, a sixth preset derivative mode, and a seventh preset derivative. And a fifth preset derivative mode, wherein the fifth preset derivative mode is a fifth sub-image block, a sixth sub-image block, and a seventh sub-image block are derived as one derivative image block; the sixth preset The derived mode is that the sixth sub-image block, the seventh sub-image block, and the eighth sub-image block are derived as one derived image block; the seventh preset derivation mode is the sixth sub-image block and the seventh The sub-image block is derived as a derived image block; the eighth preset derivation mode is that the fifth sub-image block, the sixth sub-image block, the seventh sub-image block, and the eighth sub-image block are all maintained Independently; the fifth sub-image block, the sixth sub-image block, the seventh sub-image block, and the eighth sub-image block are sequentially arranged in the current to-be-decoded image block in order from left to right;
    在N=4、M=4、所述基础划分方式为所述水平垂直四分的情况下,所述候选衍生模式集合包括第九预设衍生模式、第十预设衍生模式、第十一预设衍生模式以及第十二预设衍生模式;其中,所述第九预设衍生模式为第九子图像块和第十子图像块衍生为一个衍生图像块;所述第十预设衍生模式为所述第九子图像块和所述第十子图像块衍生为一个衍生图像块,第十一子图像块和第十二子图像块衍生为另一衍生图像块;所述第十一预设衍生模式为所述第十子图像块和所述第十一子图像块衍生为一个衍生图像块,所述第九子图像块和所述第十二子图像块衍生为另一衍生图像块;所述第十二预设衍生模式为所述第九子图像块和所述第十二子图像块衍生为一个衍生图像块;所述第九子图像块、所述第十子图像块、第十一子图像块和所述第十二子图像块在所述当前待解码图像块中以顺时针的方向依次排列。In the case that N=4, M=4, and the basic division manner is the horizontal vertical quarter, the candidate derivative mode set includes a ninth preset derivative mode, a tenth preset derivative mode, and an eleventh pre-predetermined a derivation mode and a twelfth preset derivation mode; wherein the ninth pre-derivative mode is a ninth sub-image block and a tenth sub-image block are derived as one derivative image block; The ninth sub-image block and the tenth sub-image block are derived as one derived image block, and the eleventh sub-image block and the twelfth sub-image block are derived as another derived image block; the eleventh preset Derived mode is derived from the tenth sub-image block and the eleventh sub-image block into one derived image block, and the ninth sub-image block and the twelfth sub-image block are derived as another derived image block; The twelfth preset derivation mode is that the ninth sub-image block and the twelfth sub-image block are derived as one derived image block; the ninth sub-image block, the tenth sub-image block, and the An eleven sub-image block and the twelfth sub-image block at the current The image blocks to be decoded are sequentially arranged in a clockwise direction.
  8. 根据权利要求1-7中任意一项所述的解码方法,其特征在于,所述解析码流,确定当前待解码图像块的基础划分方式,具体包括:The decoding method according to any one of claims 1 to 7, wherein the parsing code stream determines a basic division manner of an image block to be decoded, and specifically includes:
    从所述码流中获取所述当前待解码图像块的划分标识;Obtaining, from the code stream, a division identifier of the current image block to be decoded;
    根据所述当前待解码图像块的划分标识确定所述基础划分方式;Determining, according to the division identifier of the current image block to be decoded, the basic division manner;
    所述确定当前待解码图像块的目标衍生模式,具体包括:Determining a target derivative mode of the current image block to be decoded, specifically:
    从所述码流中获取所述当前待解码图像块的衍生标识;Obtaining, from the code stream, a derivative identifier of the current image block to be decoded;
    根据所述当前待解码图像块的衍生标识确定所述目标衍生模式。Determining the target derivative mode according to the derived identifier of the current image block to be decoded.
  9. 根据权利要求8所述的解码方法,其特征在于,The decoding method according to claim 8, wherein
    所述当前待解码图像块的划分标识采用变长码表示,所述当前待解码图像块的衍生标识采用定长码表示。The division identifier of the current image block to be decoded is represented by a variable length code, and the derivative identifier of the current image block to be decoded is represented by a fixed length code.
  10. 根据权利要求1-9中任意一项所述的解码方法,其特征在于,所述候选衍生模式集合中的每一种预设衍生模式均采用定长码标识。The decoding method according to any one of claims 1 to 9, wherein each of the candidate derived mode sets adopts a fixed length code identifier.
  11. 一种编码方法,其特征在于,包括:An encoding method, comprising:
    确定当前待编码图像块的基础划分方式以及所述当前待编码图像块中子图像块的目标衍生模式;所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;Determining a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded; the target derivative mode is one of a candidate derivative mode set, and the candidate derivative mode set includes M a preset derivative mode, the preset derivative mode is used to indicate a derivative mode, and the derivative mode is used to derivate any two adjacent sub-image blocks in the current image block to be encoded into a derivative image block, where M is An integer greater than or equal to 0;
    根据所述基础划分方式,将所述当前待编码图像块划分为N个子图像块,N为大于或等于2的整数;Decoding the current image block to be encoded into N sub-image blocks according to the basic division manner, where N is an integer greater than or equal to 2;
    根据所述目标衍生模式指示的衍生方式,将所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;And deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first derivative image block according to the derivative manner of the target-derived mode indication;
    在对所述第一衍生图像块不划分的情况下,对所述第一衍生图像块进行编码,得到码流,所述码流包括所述当前待编码图像块的划分标识和所述当前待编码图像块的衍生标识,所述当前待编码图像块的划分标识用于指示所述基础划分方式,所述当前待编码图像块的衍生标识用于指示所述目标衍生模式。And encoding the first derived image block to obtain a code stream, where the code stream includes a division identifier of the current to-be-coded image block and the current to-be-supplied a derivative identifier of the coded image block, the partition identifier of the current image block to be encoded is used to indicate the basic partition mode, and the derived identifier of the current image block to be encoded is used to indicate the target derivative mode.
  12. 一种编码方法,其特征在于,包括:An encoding method, comprising:
    确定当前待编码图像块的基础划分方式以及所述当前待编码图像块的特征参数;Determining a basic division manner of the current image block to be encoded and a feature parameter of the current image block to be encoded;
    根据所述基础划分方式,将所述当前待编码图像块划分为N个子图像块,N为大于或等于2的整数;Decoding the current image block to be encoded into N sub-image blocks according to the basic division manner, where N is an integer greater than or equal to 2;
    在所述当前待编码图像块的特征参数小于或等于第一预设阈值的情况下,确定所述当前待编码图像块中子图像块的目标衍生模式;所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;Determining, in a case that a feature parameter of the current to-be-coded image block is less than or equal to a first preset threshold, a target derivative mode of the sub-image block in the current image block to be encoded; the target derivative mode is a candidate derivative mode set The candidate derivative mode set includes M preset derivative modes, where the preset derivative mode is used to indicate a derivative mode, where the derivative mode is used to use any two phases in the current image block to be encoded. The neighboring image block is derived as a derived image block, and M is an integer greater than or equal to 0;
    根据所述目标衍生模式指示的衍生方式,将所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;And deriving at least two adjacent sub-image blocks of the N sub-image blocks as the first derivative image block according to the derivative manner of the target-derived mode indication;
    在对所述第一衍生图像块不划分的情况下,对所述衍生图像块进行编码,得到码流,所述码流包括所述当前待编码图像块的划分标识和所述当前待编码图像块的衍生标识,所述当前待编码图像块的划分标识用于指示所述基础划分方式,所述当前待编码图像块的衍生标识用于指示所述目标衍生模式。And encoding the derived image block to obtain a code stream, where the code stream includes a division identifier of the current to-be-encoded image block and the current to-be-coded image, where the first derivative image block is not divided. a derivation identifier of the block to be used to indicate the basic division mode, where the derivation identifier of the current to-be-encoded image block is used to indicate the target derivation mode.
  13. 根据权利要求11或12所述的编码方法,其特征在于,所述确定当前待编码图像块的基础划分方式,具体包括:The encoding method according to claim 11 or 12, wherein the determining the basic division manner of the image block to be encoded currently includes:
    确定与所述当前待编码图像对应的至少两种候选划分方式;Determining at least two candidate division manners corresponding to the current image to be encoded;
    计算所述至少两种候选划分方式中的每种候选划分方式的率失真代价;Calculating a rate distortion cost of each of the at least two candidate partitioning modes;
    将最小的率失真代价对应的候选划分方式确定为所述基础划分方式。The candidate division manner corresponding to the smallest rate distortion cost is determined as the basic division manner.
  14. 根据权利要求11-13中任意一项所述的编码方法,其特征在于,所述确定当前待编码图像块的目标衍生模式,具体包括:The encoding method according to any one of claims 11 to 13, wherein the determining the target derivative mode of the current image block to be encoded comprises:
    计算所述候选衍生模式集合中的每种预设衍生模式的率失真代价,其中,当所述基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当所述基础划分方式为水平垂直N分时,
    Figure PCTCN2019087316-appb-100004
    为整数;
    Calculating a rate distortion cost of each of the preset derivative modes in the candidate derived mode set, wherein when the basic partitioning mode is horizontal N or vertical N, 0≤M≤2 N-1 ; When the basic division method is horizontal and vertical N minutes,
    Figure PCTCN2019087316-appb-100004
    Is an integer;
    将最小的率失真代价对应的预设衍生模式确定为所述目标衍生模式。The preset derivative mode corresponding to the minimum rate distortion cost is determined as the target derivative mode.
  15. 根据权利要求11-14中任意一项所述的编码方法,其特征在于,The encoding method according to any one of claims 11 to 14, wherein
    所述当前待解码图像块的划分标识采用变长码表示,所述当前待解码图像块的衍生标识采用定长码表示。The division identifier of the current image block to be decoded is represented by a variable length code, and the derivative identifier of the current image block to be decoded is represented by a fixed length code.
  16. 根据权利要求11-15中任意一项所述的编码方法,其特征在于,所述候选衍生模式集合中的每一种预设衍生模式均采用定长码标识。The encoding method according to any one of claims 11-15, wherein each of the candidate derived mode sets adopts a fixed length code identifier.
  17. 一种解码装置,其特征在于,包括:A decoding device, comprising:
    解析单元,用于解析码流,以确定当前待解码图像块的基础划分方式以及所述当前待解码图像块中子图像块的目标衍生模式;所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;a parsing unit, configured to parse the code stream, to determine a basic division manner of the current image block to be decoded, and a target derivation mode of the sub image block in the current image block to be decoded; the target derivation mode is one of the candidate derivation mode sets The candidate derivative mode set includes M preset derivative modes, where the preset derivative mode is used to indicate a derivative mode, where the derivative mode is used to use any two adjacent sub-images in the current image block to be decoded. The block is derived as a derived image block, and M is an integer greater than or equal to 0;
    划分单元,用于根据所述解析单元确定出的所述基础划分方式,将所述当前待解码图像块划分为N个子图像块,N为大于或等于2的整数;a dividing unit, configured to divide the current image block to be decoded into N sub-image blocks according to the basic division manner determined by the parsing unit, where N is an integer greater than or equal to 2;
    衍生单元,用于根据所述解析单元确定出的所述目标衍生模式指示的衍生方式,将所述划分单元得到的所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;a deriving unit, configured to derive at least two adjacent sub-image blocks of the N sub-image blocks obtained by the dividing unit into a first according to a derivative manner of the target derived mode indication determined by the parsing unit Derived image block;
    解码单元,用于对所述衍生单元得到的所述第一衍生图像块进行解码。And a decoding unit, configured to decode the first derived image block obtained by the derived unit.
  18. 一种解码装置,其特征在于,包括:A decoding device, comprising:
    解析码流,用于解析码流,以确定当前待解码图像块的基础划分方式以及所述当前待解码图像块的特征参数,所述特征参数为高度和宽度中的至少一个;Parsing a code stream for parsing the code stream to determine a basic division manner of the current image block to be decoded and a feature parameter of the current image block to be decoded, the feature parameter being at least one of a height and a width;
    判断单元,用于判断所述当前待解码图形块的特征参数是否小于或等于第一预设阈值;a determining unit, configured to determine whether a feature parameter of the current graphic block to be decoded is less than or equal to a first preset threshold;
    所述解析单元,还用于在所述判断单元确定所述当前待解码图像块的特征参数小于或等于所述第一预设阈值的情况下,解析码流,以确定所述当前待解码图像块中子图像块的目标衍生模式,所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待解码图像块中任意两个相邻子图像块衍生为一个衍生图像块,所述M种预设衍生模式指示的衍生方式互不相同,所述衍生图像块的特征参数大于所述当前待解码图像块中每个子图像块的特征参数,所述特征参数为高度和宽度中的至少一个,M为大于或等于0的整数;The parsing unit is further configured to parse the code stream to determine the current image to be decoded if the determining unit determines that the feature parameter of the current image block to be decoded is less than or equal to the first preset threshold. a target derivation mode of the block neutron image block, the target derivation mode is one of a candidate derivation mode set, the candidate derivation mode set includes M preset derivation modes, and the preset derivation mode is used to indicate a derivative mode And the deriving manner is used to derivate any two adjacent sub-image blocks in the current to-be-decoded image block into one derived image block, where the derivative manners indicated by the M preset derivation patterns are different from each other, and the derivation The feature parameter of the image block is greater than a feature parameter of each sub-image block in the current image block to be decoded, the feature parameter is at least one of height and width, and M is an integer greater than or equal to 0;
    划分单元,用于根据所述解析单元确定出的所述基础划分方式,将所述当前待解码图像块划分为N个子图像块,N为大于或等于2的整数;a dividing unit, configured to divide the current image block to be decoded into N sub-image blocks according to the basic division manner determined by the parsing unit, where N is an integer greater than or equal to 2;
    衍生单元,用于根据所述解析单元确定出的所述目标衍生模式指示的衍生方式,将所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;a deriving unit, configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks into a first derivative image block according to a derivative manner of the target derived mode indication determined by the parsing unit;
    解码单元,用于对所述衍生单元得到的所述第一衍生图像块进行解码。And a decoding unit, configured to decode the first derived image block obtained by the derived unit.
  19. 根据权利要求17或18所述的解码装置,其特征在于,A decoding apparatus according to claim 17 or 18, characterized in that
    所述基础划分方式为水平N分、垂直N分或水平垂直N分。The basic division mode is horizontal N, vertical N or horizontal and vertical N.
  20. 根据权利要求19所述的解码装置,其特征在于,A decoding apparatus according to claim 19, wherein
    在所述基础划分方式为所述水平N分的情况下,所述N个子图像块中的每个子图像块的宽度均与所述当前待解码图像块的宽度相等,所述每个子图像块的高度均等于所述当前待解码图像块的高度的1/N;In a case where the basic division mode is the horizontal N-score, a width of each of the N sub-image blocks is equal to a width of the current image block to be decoded, and each of the sub-image blocks The height is equal to 1/N of the height of the current image block to be decoded;
    在所述基础划分方式为所述垂直N分的情况下,所述N个子图像块中的每个子图像块的高度均与所述当前待解码图像块的高度相等,所述每个子图像块的宽度均等于所述当前待解码图像块的宽度的1/N。In a case where the basic division manner is the vertical N-score, a height of each of the N sub-image blocks is equal to a height of the current image block to be decoded, and each of the sub-image blocks The width is equal to 1/N of the width of the current image block to be decoded.
  21. 根据权利要求19所述的解码装置,其特征在于,A decoding apparatus according to claim 19, wherein
    在所述基础划分方式为所述水平垂直N分的情况下,所述N个子图像块中的每个子图像块的宽度均等于所述当前待解码图像块的宽度的
    Figure PCTCN2019087316-appb-100005
    所述每个子图像块的高度均等于所述当前待解码图像块的高度的
    Figure PCTCN2019087316-appb-100006
    为整数。
    In a case where the basic division manner is the horizontal vertical N-minute, the width of each of the N sub-image blocks is equal to the width of the current image block to be decoded.
    Figure PCTCN2019087316-appb-100005
    The height of each of the sub-image blocks is equal to the height of the current image block to be decoded.
    Figure PCTCN2019087316-appb-100006
    Is an integer.
  22. 根据权利要求17-21中任意一项所述的解码装置,其特征在于,A decoding apparatus according to any one of claims 17 to 21, characterized in that
    当所述基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当所述基础划分方式为水平垂直N分时,
    Figure PCTCN2019087316-appb-100007
    为整数。
    When the basic division mode is horizontal N or vertical N, 0 ≤ M ≤ 2 N-1 ; when the basic division mode is horizontal and vertical N,
    Figure PCTCN2019087316-appb-100007
    Is an integer.
  23. 根据权利要求22所述的解码装置,其特征在于,A decoding apparatus according to claim 22, wherein
    在N=4、M=4、且所述基础划分方式为所述水平四分的情况下,所述候选衍生模式集合包括第一预设衍生模式、第二预设衍生模式、第三预设衍生模式以及第四预设衍生模式;其中,所述第一预设衍生模式为第一子图像块、第二子图像块和第三子图像块衍生为一个衍生图像块;所述第二预设衍生模式为所述第三子图像块和第四子图像块衍生为一个衍生图像块;所述第三预设衍生模式为所述第二子图像块和所述第三子图像块衍生为一个衍生图像块;所述第四预设衍生模式为所述第一子图像块和所述第二子图像块衍生为一个衍生图像块,所述第三子图像块和所述第四子图像块衍生为另一衍生图像块;所述第一子图像块、所述第二子图像块、所述第三子图像块和所述第四子图像块在所述当前待解码图像块中按照从上往下的顺序依次排列;In the case that N=4, M=4, and the basic division mode is the horizontal four-point, the candidate derivative mode set includes a first preset derivative mode, a second preset derivative mode, and a third preset. a derivative mode and a fourth preset derivative mode; wherein the first preset derivative mode is a first sub-image block, a second sub-image block, and a third sub-image block are derived as one derived image block; Determining that the third sub-image block and the fourth sub-image block are derived as one derived image block; the third preset derivation mode is deriving the second sub-image block and the third sub-image block as a derived image block; the fourth preset derivative mode is that the first sub-image block and the second sub-image block are derived as one derived image block, the third sub-image block and the fourth sub-image Deriving a block into another derived image block; the first sub-image block, the second sub-image block, the third sub-image block, and the fourth sub-image block are in the current image block to be decoded Arranged in order from top to bottom;
    在N=4、M=4、所述基础划分方式为所述垂直四分的情况下,所述候选衍生模式集合包括第五预设衍生模式、第六预设衍生模式、第七预设衍生模式以及第八预设衍生模式;其中,所述第五预设衍生模式为第五子图像块、第六子图像块和第七子图像块衍生为一个衍生图像块;所述第六预设衍生模式为所述第六子图像块、第七子图像块和第八子图像块衍生为一个衍生图像块;所述第七预设衍生模式为所述第六子图像块和所述第七子图像块衍生为一个衍生图像块;所述第八预设衍生模式为所述第五子图像块、所述第六子图像块、第七子图像块和所述第八子图像块均保持独立;所述第五子图像块、所述第六子图像块、第七子图像块和所述第八子图像块在所述当前待解码图像块中按照从左往右的顺序依次排列;In the case that N=4, M=4, and the basic division manner is the vertical quarter, the candidate derivative mode set includes a fifth preset derivative mode, a sixth preset derivative mode, and a seventh preset derivative. And a fifth preset derivative mode, wherein the fifth preset derivative mode is a fifth sub-image block, a sixth sub-image block, and a seventh sub-image block are derived as one derivative image block; the sixth preset The derived mode is that the sixth sub-image block, the seventh sub-image block, and the eighth sub-image block are derived as one derived image block; the seventh preset derivation mode is the sixth sub-image block and the seventh The sub-image block is derived as a derived image block; the eighth preset derivation mode is that the fifth sub-image block, the sixth sub-image block, the seventh sub-image block, and the eighth sub-image block are all maintained Independently; the fifth sub-image block, the sixth sub-image block, the seventh sub-image block, and the eighth sub-image block are sequentially arranged in the current to-be-decoded image block in order from left to right;
    在N=4、M=4、所述基础划分方式为所述水平垂直四分的情况下,所述候选衍生 模式集合包括第九预设衍生模式、第十预设衍生模式、第十一预设衍生模式以及第十二预设衍生模式;其中,所述第九预设衍生模式为第九子图像块和第十子图像块衍生为一个衍生图像块;所述第十预设衍生模式为所述第九子图像块和所述第十子图像块衍生为一个衍生图像块,第十一子图像块和第十二子图像块衍生为另一衍生图像块;所述第十一预设衍生模式为所述第十子图像块和所述第十一子图像块衍生为一个衍生图像块,所述第九子图像块和所述第十二子图像块衍生为另一衍生图像块;所述第十二预设衍生模式为所述第九子图像块和所述第十二子图像块衍生为一个衍生图像块;所述第九子图像块、所述第十子图像块、第十一子图像块和所述第十二子图像块在所述当前待解码图像块中以顺时针的方向依次排列。In the case that N=4, M=4, and the basic division manner is the horizontal vertical quarter, the candidate derivative mode set includes a ninth preset derivative mode, a tenth preset derivative mode, and an eleventh pre-predetermined a derivation mode and a twelfth preset derivation mode; wherein the ninth pre-derivative mode is a ninth sub-image block and a tenth sub-image block are derived as one derivative image block; The ninth sub-image block and the tenth sub-image block are derived as one derived image block, and the eleventh sub-image block and the twelfth sub-image block are derived as another derived image block; the eleventh preset Derived mode is derived from the tenth sub-image block and the eleventh sub-image block into one derived image block, and the ninth sub-image block and the twelfth sub-image block are derived as another derived image block; The twelfth preset derivation mode is that the ninth sub-image block and the twelfth sub-image block are derived as one derived image block; the ninth sub-image block, the tenth sub-image block, and the An eleven sub-image block and the twelfth sub-image block are in the same The image block to be decoded are sequentially arranged in a clockwise direction.
  24. 根据权利要求17-23中任意一项所述的解码装置,其特征在于,所述解析单元具体用于:The decoding device according to any one of claims 17 to 23, wherein the parsing unit is specifically configured to:
    从所述码流中获取所述当前待解码图像块的划分标识;Obtaining, from the code stream, a division identifier of the current image block to be decoded;
    根据所述当前待解码图像块的划分标识确定所述基础划分方式;Determining, according to the division identifier of the current image block to be decoded, the basic division manner;
    从所述码流中获取所述当前待解码图像块的衍生标识;Obtaining, from the code stream, a derivative identifier of the current image block to be decoded;
    根据所述当前待解码图像块的衍生标识确定所述目标衍生模式。Determining the target derivative mode according to the derived identifier of the current image block to be decoded.
  25. 根据权利要求24所述的解码装置,其特征在于,A decoding apparatus according to claim 24, wherein
    所述当前待解码图像块的划分标识采用变长码表示,所述当前待解码图像块的衍生标识采用定长码表示。The division identifier of the current image block to be decoded is represented by a variable length code, and the derivative identifier of the current image block to be decoded is represented by a fixed length code.
  26. 根据权利要求17-25中任意一项所述的解码装置,其特征在于,所述候选衍生模式集合中的每一种预设衍生模式均采用定长码标识。The decoding apparatus according to any one of claims 17-25, wherein each of the preset derivative modes in the candidate derivative mode set is identified by a fixed length code.
  27. 一种编码装置,其特征在于,包括:An encoding device, comprising:
    确定单元,用于确定当前待编码图像块的基础划分方式以及所述当前待编码图像块中子图像块的目标衍生模式;所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;a determining unit, configured to determine a basic division manner of the current image block to be encoded and a target derivative mode of the sub image block in the current image block to be encoded; the target derivative mode is one of a candidate derivative mode set, and the candidate The derivative mode set includes M preset derivation modes, where the preset derivation mode is used to indicate a derivation mode, where the derivation mode is used to derive any two adjacent sub-image blocks in the current to-be-coded image block into one derivative. Image block, M is an integer greater than or equal to 0;
    划分单元,用于根据所述确定单元确定出的所述基础划分方式,将所述当前待编码图像块划分为N个子图像块,N为大于或等于2的整数;a dividing unit, configured to divide the current image block to be encoded into N sub-image blocks according to the basic division manner determined by the determining unit, where N is an integer greater than or equal to 2;
    衍生单元,用于根据所述确定单元确定出的所述目标衍生模式指示的衍生方式,将所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;a deriving unit, configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks into a first derivative image block according to a derivative manner of the target derived mode indication determined by the determining unit;
    判断单元,用于判断是否对所述衍生单元得到的第一衍生图像块进行划分;a determining unit, configured to determine whether to divide the first derivative image block obtained by the derivative unit;
    编码单元,用于在所述判断单元确定对所述第一衍生图像块不划分的情况下,对所述衍生单元得到的所述第一衍生图像块进行编码,得到码流,所述码流包括所述当前待编码图像块的划分标识和所述当前待编码图像块的衍生标识,所述当前待编码图像块的划分标识用于指示所述基础划分方式,所述当前待编码图像块的衍生标识用于指示所述目标衍生模式。a coding unit, configured to: when the determining unit determines that the first derived image block is not divided, encoding the first derived image block obtained by the derived unit to obtain a code stream, where the code stream And including a split identifier of the current to-be-coded image block and a derivative identifier of the current to-be-coded image block, where the partition identifier of the current to-be-coded image block is used to indicate the basic partition mode, where the current image block to be encoded is A derived identifier is used to indicate the target derived mode.
  28. 一种编码装置,其特征在于,包括:An encoding device, comprising:
    确定单元,用于确定当前待编码图像块的基础划分方式以及所述当前待编码图像块的特征参数;a determining unit, configured to determine a basic division manner of the current image block to be encoded and a feature parameter of the current image block to be encoded;
    划分单元,用于根据所述确定单元确定出的所述基础划分方式,将所述当前待编码图像块划分为N个子图像块,N为大于或等于2的整数;a dividing unit, configured to divide the current image block to be encoded into N sub-image blocks according to the basic division manner determined by the determining unit, where N is an integer greater than or equal to 2;
    判断单元,用于判断所述当前待编码图像块的特征参数是否小于或等于第一预设阈值;a determining unit, configured to determine whether a feature parameter of the current image block to be encoded is less than or equal to a first preset threshold;
    所述确定单元,还用于在所述判断单元确定所述当前待编码图像块的特征参数小于或等于所述第一预设阈值的情况下,确定所述当前待编码图像块中子图像块的目标衍生模式;所述目标衍生模式为候选衍生模式集合中的一种,所述候选衍生模式集合包括M种预设衍生模式,所述预设衍生模式用于指示衍生方式,所述衍生方式用于将所述当前待编码图像块中任意两个相邻子图像块衍生为一个衍生图像块,M为大于或等于0的整数;The determining unit is further configured to: when the determining unit determines that the feature parameter of the current image block to be encoded is less than or equal to the first preset threshold, determine a sub-image block in the current image block to be encoded. Target derivation mode; the target derivation mode is one of a set of candidate derivation modes, the candidate derivation mode set includes M preset derivation modes, the preset derivation mode is used to indicate a derivative mode, and the derivative mode For deriving any two adjacent sub-image blocks in the current to-be-coded image block into one derived image block, where M is an integer greater than or equal to 0;
    衍生单元,用于根据所述确定单元确定出的所述目标衍生模式指示的衍生方式,将所述N个子图像块中的至少两个相邻子图像块衍生为第一衍生图像块;a deriving unit, configured to derivate at least two adjacent sub-image blocks of the N sub-image blocks into a first derivative image block according to a derivative manner of the target derived mode indication determined by the determining unit;
    所述判断单元,还用于判断是否对所述衍生单元得到的第一衍生图像块进行划分;The determining unit is further configured to determine whether to divide the first derivative image block obtained by the derivative unit;
    编码单元,用于在所述判断单元确定对所述第一衍生图像块不划分的情况下,对所述衍生图像块进行编码,得到码流,所述码流包括所述当前待编码图像块的划分标识和所述当前待编码图像块的衍生标识,所述当前待编码图像块的划分标识用于指示所述基础划分方式,所述当前待编码图像块的衍生标识用于指示所述目标衍生模式。a coding unit, configured to: when the determining unit determines that the first derived image block is not divided, to encode the derived image block to obtain a code stream, where the code stream includes the current image block to be encoded a partition identifier and a derived identifier of the current image block to be encoded, the partition identifier of the current image block to be encoded is used to indicate the basic partition mode, and the derivative identifier of the current image block to be encoded is used to indicate the target Derivative mode.
  29. 根据权利要求27或28所述的编码装置,其特征在于,所述确定单元具体用于:The encoding device according to claim 27 or 28, wherein the determining unit is specifically configured to:
    确定与所述当前待编码图像对应的至少两种候选划分方式;Determining at least two candidate division manners corresponding to the current image to be encoded;
    计算所述至少两种候选划分方式中的每种候选划分方式的率失真代价;Calculating a rate distortion cost of each of the at least two candidate partitioning modes;
    将最小的率失真代价对应的候选划分方式确定为所述基础划分方式。The candidate division manner corresponding to the smallest rate distortion cost is determined as the basic division manner.
  30. 根据权利要求27-29中任意一项所述的编码装置,其特征在于,所述确定单元具体用于:The encoding device according to any one of claims 27 to 29, wherein the determining unit is specifically configured to:
    计算所述候选衍生模式集合中的每种预设衍生模式的率失真代价,其中,当所述基础划分方式为水平N分或垂直N分时,0≤M≤2 N-1;当所述基础划分方式为水平垂直N分时,
    Figure PCTCN2019087316-appb-100008
    为整数;
    Calculating a rate distortion cost of each of the preset derivative modes in the candidate derived mode set, wherein when the basic partitioning mode is horizontal N or vertical N, 0≤M≤2 N-1 ; When the basic division method is horizontal and vertical N minutes,
    Figure PCTCN2019087316-appb-100008
    Is an integer;
    将最小的率失真代价对应的预设衍生模式确定为所述目标衍生模式。The preset derivative mode corresponding to the minimum rate distortion cost is determined as the target derivative mode.
  31. 根据权利要求27-30中任意一项所述的编码装置,其特征在于,An encoding apparatus according to any one of claims 27 to 30, characterized in that
    所述当前待解码图像块的划分标识采用变长码表示,所述当前待解码图像块的衍生标识采用定长码表示。The division identifier of the current image block to be decoded is represented by a variable length code, and the derivative identifier of the current image block to be decoded is represented by a fixed length code.
  32. 根据权利要求27-31中任意一项所述的编码装置,其特征在于,所述候选衍生模式集合中的每一种预设衍生模式均采用定长码标识。The encoding apparatus according to any one of claims 27 to 31, wherein each of the preset derivative modes of the candidate derived mode set is identified by a fixed length code.
PCT/CN2019/087316 2018-05-16 2019-05-16 Coding and decoding methods and devices WO2019219066A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19804393.7A EP3780612A4 (en) 2018-05-16 2019-05-16 Coding and decoding methods and devices
US17/099,470 US11936861B2 (en) 2018-05-16 2020-11-16 Encoding method and apparatus, and decoding method and apparatus

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810470411 2018-05-16
CN201810470411.5 2018-05-16
CN201810581662.0 2018-06-07
CN201810581662.0A CN110505482B (en) 2018-05-16 2018-06-07 Encoding and decoding method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/099,470 Continuation US11936861B2 (en) 2018-05-16 2020-11-16 Encoding method and apparatus, and decoding method and apparatus

Publications (1)

Publication Number Publication Date
WO2019219066A1 true WO2019219066A1 (en) 2019-11-21

Family

ID=68539506

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/087316 WO2019219066A1 (en) 2018-05-16 2019-05-16 Coding and decoding methods and devices

Country Status (1)

Country Link
WO (1) WO2019219066A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210258576A1 (en) * 2018-06-18 2021-08-19 Interdigital Vc Holdings, Inc. Method and apparatus for video encoding and decoding based on asymmetric binary partitioning of image blocks

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595116A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Encoding and decoding methods and devices for multiple image block division ways
TW201528209A (en) * 2014-01-03 2015-07-16 Mediatek Singapore Pte Ltd Coding methods
CN104811736A (en) * 2010-05-04 2015-07-29 Lg电子株式会社 Method and apparatus for processing a video signal
CN107566848A (en) * 2016-06-30 2018-01-09 华为技术有限公司 The method and device of encoding and decoding
WO2018056703A1 (en) * 2016-09-20 2018-03-29 주식회사 케이티 Method and apparatus for processing video signal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811736A (en) * 2010-05-04 2015-07-29 Lg电子株式会社 Method and apparatus for processing a video signal
CN102595116A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Encoding and decoding methods and devices for multiple image block division ways
TW201528209A (en) * 2014-01-03 2015-07-16 Mediatek Singapore Pte Ltd Coding methods
CN107566848A (en) * 2016-06-30 2018-01-09 华为技术有限公司 The method and device of encoding and decoding
WO2018056703A1 (en) * 2016-09-20 2018-03-29 주식회사 케이티 Method and apparatus for processing video signal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3780612A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210258576A1 (en) * 2018-06-18 2021-08-19 Interdigital Vc Holdings, Inc. Method and apparatus for video encoding and decoding based on asymmetric binary partitioning of image blocks
US11956430B2 (en) * 2018-06-18 2024-04-09 Interdigital Vc Holdings, Inc. Method and apparatus for video encoding and decoding based on asymmetric binary partitioning of image blocks

Similar Documents

Publication Publication Date Title
AU2018282523B2 (en) Intra filtering applied together with transform processing in video coding
US11611757B2 (en) Position dependent intra prediction combination extended with angular modes
TWI755376B (en) Geometric transforms for filters for video coding
US20150071357A1 (en) Partial intra block copying for video coding
TW202106012A (en) Multiple adaptive loop filter sets for video coding
KR20220020427A (en) Coefficient domain block differential pulse-code modulation in video coding
US11936861B2 (en) Encoding method and apparatus, and decoding method and apparatus
TWI784345B (en) Method, apparatus and system for encoding and decoding a coding tree unit
TW202135530A (en) Method, apparatus and system for encoding and decoding a block of video samples
JP7410236B2 (en) Position-dependent spatial variation transform for video coding
BR112021003869A2 (en) time prediction of adaptive loop filter parameters with reduced memory consumption for video encoding
TW202127884A (en) Bit shifting for cross-component adaptive loop filtering for video coding
TW202133619A (en) History-based motion vector predictor constraint for merge estimation region
TW202133615A (en) Lfnst signaling for chroma based on chroma transform skip
WO2019219066A1 (en) Coding and decoding methods and devices
WO2024145851A1 (en) Intra template matching prediction method and apparatus, video coding method and apparatus, video decoding method and apparatus, and system
WO2021211340A1 (en) Coefficient coding for support of different color formats in video coding
TW202415068A (en) Signaling of triangle merge mode indexes in video coding
CN117957838A (en) Intra prediction mode signaling
TW202029754A (en) Scans and last coefficient position coding for zero-out transforms

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: 19804393

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019804393

Country of ref document: EP

Effective date: 20201104

NENP Non-entry into the national phase

Ref country code: DE