WO2019174567A1 - 划分标志位的上下文建模方法及装置 - Google Patents

划分标志位的上下文建模方法及装置 Download PDF

Info

Publication number
WO2019174567A1
WO2019174567A1 PCT/CN2019/077782 CN2019077782W WO2019174567A1 WO 2019174567 A1 WO2019174567 A1 WO 2019174567A1 CN 2019077782 W CN2019077782 W CN 2019077782W WO 2019174567 A1 WO2019174567 A1 WO 2019174567A1
Authority
WO
WIPO (PCT)
Prior art keywords
current node
preset condition
value
model
determining
Prior art date
Application number
PCT/CN2019/077782
Other languages
English (en)
French (fr)
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 CN201811109475.9A external-priority patent/CN110278443B/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19766770.2A priority Critical patent/EP3761646A4/en
Publication of WO2019174567A1 publication Critical patent/WO2019174567A1/zh
Priority to US17/021,259 priority patent/US11323746B2/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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Definitions

  • the embodiments of the present invention relate to the field of multimedia technologies, and in particular, to a context modeling method and apparatus for dividing a flag bit.
  • the division flag is an important syntax element in the field of video coding and video decoding. It can indicate whether the nodes in the coding tree continue to be subdivided into smaller sub-nodes.
  • the coding and decoding of the division flags are performed in the video coding and video decoding process. It is indispensable.
  • the encoding and decoding of the divided flag bits can be realized by the entropy coding technique. Specifically, the probability value of the bit element is determined according to the probability model of the bit element corresponding to the divided flag bit, and then the probability value of the bit element is encoded and Decoding to achieve encoding and decoding of the divided flag bits.
  • a coding tree unit by coding or decoding using a quadtree method as an example, determining a probability model of a bit corresponding to a division flag bit (which may also be referred to as a context model for determining a division flag bit)
  • determining a probability model of a bit corresponding to a division flag bit (which may also be referred to as a context model for determining a division flag bit)
  • first obtain the quadtree depth of the current node ie, the coding tree depth of the current node, the H.265 standard, which may also be referred to as the quadtree level of the current node
  • the quadtree depth of the current node ie, the coding tree depth of the current node, the H.265 standard, which may also be referred to as the quadtree level of the current node
  • the binary tree and the tri-tree partitioning method since the height and the width of one node are not necessarily the same, whether the depth of the coding tree of the current node is smaller than the adjacent leaf node (such as the left leaf above) The method of coding the tree depth of the node or the upper leaf node does not accurately determine whether the current node can be further divided.
  • the present application provides a context modeling method and apparatus for dividing a flag bit, which can more accurately determine a context model for dividing a flag bit, thereby improving the efficiency of entropy coding of the partition flag bit.
  • a context modeling method for dividing a flag bit is provided, which is applied to a video encoding device and a video decoding device, the method comprising: acquiring a height and a width of a current node, and a first position adjacent to a current node in a first direction a height of the leaf node and a width of the second leaf node adjacent to the current node in the second direction; and determining whether the current node satisfies the first preset condition and whether the current node satisfies the second preset condition, the first preset condition
  • the height of the current node is greater than the height of the first leaf node
  • the second preset condition is that the width of the current node is greater than the width of the second leaf node; and determining according to the satisfaction of the first preset condition and the second preset condition a context model of a partition flag of the current node, wherein the first direction is perpendicular to the second direction, the first leaf node and the second leaf node are
  • the first leaf node covers a preset position in the first direction of the current node
  • the second leaf node covers a preset position in the second direction of the current node
  • the context modeling method for dividing the flag bit provided by the present application can more accurately determine whether the current node is more accurately by comparing the height of the current node with the height of the first leaf node and comparing the width of the current node with the width of the second leaf node. Further dividing, in this way, the context model of the divided flag bits can be determined more accurately according to the case where the above two preset conditions are satisfied, so that the efficiency of entropy coding of the divided flag bits can be improved.
  • the division of any one node adopts binary tree division and/or tri-tree division
  • the height of the current node and the height of the first leaf node can be compared, and the width of the current node and the width of the second leaf node are compared, thereby The context model of the partition flag of the current node is determined more accurately.
  • the problem that the context model of the partition flag of the current node determined by the depth information is inaccurate in the prior art, for example, the depth of the current node and the depth of the first leaf node are the same, but the height of the current node is well solved. It is much larger than the height of the first leaf node. In this case, the prior art is more inclined to determine that the current node does not need to continue to divide. In fact, since the height of the current node is relatively high, the current node should be horizontally divided. The possibility is relatively high.
  • the context model of the partitioning flag includes N, and the number of the N context models is 0 to N-1, and N is an integer greater than 1.
  • the method for determining the context model of the partition flag of the current node includes: determining the division of the current node according to the satisfaction of the first preset condition and the second preset condition, where the preset condition and the second preset condition are satisfied.
  • ctxInc n_conL+n_conA; wherein ctxInc represents the number of the context model that divides the flag bit; n_conL indicates whether the first preset condition is satisfied, when n_conL When it is 1, it indicates that the first preset condition is satisfied. When n_conL is 0, it indicates that the first preset condition is not satisfied; n_conA indicates whether the second preset condition is satisfied, and when n_conA is 1, it indicates that the second preset condition is satisfied, when n_conA When 0, it means that the second preset condition is not satisfied.
  • n_conL When n_conL is 0, it indicates that the first preset condition is not satisfied; and n_conA indicates whether the second preset condition is satisfied. Satisfied, when n_conA is 1, it indicates that the second preset condition is satisfied, and when n_conA is 0, it indicates that the second preset condition is not satisfied.
  • the bit context modeling method further includes: determining a subclass number of the context model that divides the flag bit according to the height and width of the current node.
  • the method for determining the context model of the partition flag of the current node according to the satisfaction of the first preset condition and the second preset condition may include: satisfying according to the first preset condition and the second preset condition, and dividing The subclass number of the context model of the flag bit determines the context model of the partition flag of the current node.
  • the method for determining a subclass number of a context model that divides a flag bit according to a height and a width of the current node may include: acquiring a current node according to a height and a width of the current node. The area is determined according to the mapping relationship between the preset node area and the subclass number, and the subclass number of the context model for dividing the flag bit is determined; or, according to the height and width of the current node, in the preset subclass number query table.
  • the subclass number of the context model that divides the flag bit, the subclass number query table includes the height and width of the current node, and the subclass number corresponding to the width and height of the current node.
  • the context model of the partitioning flag includes N, and the number of the N context models is 0 to N-1, and N is an integer greater than 1.
  • n_conL When n_conL is 0, it indicates that the first preset condition is not satisfied; n_conA indicates whether the second preset condition is satisfied, when n_conA is 1, it indicates that the second preset condition is satisfied, and when n_conA is 0, it indicates that the first condition is satisfied.
  • the second preset condition is not satisfied;
  • X represents the subclass number of the context model that divides the flag bit;
  • a represents the context model of the partition flag bit corresponding to the subclass number Number; * represents multiplication.
  • the sub-class number of the division flag bit of the current node may be determined according to the size of the current node itself, and the context of the division flag bit is jointly determined based on whether the first preset condition is satisfied and whether the second preset condition is satisfied.
  • the subclass number of the model and the determined context model of the divided flag bits are relatively accurate, and thus, the efficiency of entropy coding of the divided flag bits can be further improved.
  • the bit context modeling method may further include: obtaining a height of a third leaf node that is adjacent to the current node by a third party, the third direction is opposite to the first direction, and the third leaf node is a reconstructed leaf node; and determining the current Whether the node satisfies a third preset condition that the height of the current node is greater than the height of the third leaf node.
  • the method for determining the context model of the dividing flag of the current node according to the satisfaction of the first preset condition and the second preset condition may include: according to the first preset condition, the second preset condition, and the third preset condition The satisfaction of the situation, determine the context model of the partition flag of the current node.
  • the context model of the partitioning flag includes N, and the number of the N context models is 0 to N-1, and N is an integer greater than 1.
  • a further leaf node adjacent to the current node may be combined to determine whether the current node meets the third preset condition, and based on whether the first preset condition is satisfied and the second preset condition is satisfied, Whether the three preset conditions are satisfied, the determined context model of the divided flag bits is relatively accurate, and thus, the efficiency of entropy coding of the divided flag bits can be further improved.
  • the context modeling method for dividing the flag bit provided by the present application may further include: determining a sub-class number of the context model that divides the flag bit according to the height and width of the current node. .
  • the method for determining the context model of the dividing flag of the current node according to the satisfaction of the first preset condition and the second preset condition may include: according to the first preset condition, the second preset condition, and the third preset condition The satisfaction condition, and the subclass number of the context model that divides the flag bit, determines the context model of the partition flag of the current node.
  • the method for determining a context model of a partition flag of a current node includes: determining a current state according to a first preset condition, a second preset condition, a satisfaction condition of a third preset condition, and a subclass number of a context model that divides the flag bit
  • n_conL indicates whether the first preset condition is satisfied.
  • n_conL When n_conL is 1, it indicates that the first preset condition is satisfied, when n_conL is 0, it indicates that the first preset condition is not satisfied; and n_conA indicates whether the second preset condition is satisfied.
  • n_conA When n_conA is 1, it indicates that the second preset condition is satisfied, when n_conA is 0, it indicates that the second preset condition is not satisfied;
  • n_conR indicates whether the third preset condition is satisfied, when n_conR is 1 Indicates that the third preset condition is satisfied.
  • X represents the subclass number of the context model that divides the flag bit; and a represents the number of context models of the partition flag bit corresponding to the subclass number. ;* indicates multiplication.
  • the sub-class number of the dividing flag of the current node may be determined according to the size of the current node itself, and combined with another leaf node adjacent to the current node, determining whether the current node meets the third preset condition, according to Whether the first preset condition is satisfied, whether the second preset condition is satisfied, and whether the third preset condition is satisfied, the sub-class number of the context model of the joint division flag bit, and the determined context model of the division flag bit are more accurate, In this way, the efficiency of entropy coding of the divided flag bits can be significantly improved.
  • the first preset condition further includes that the first leaf node is available; or the second preset condition further includes that the second leaf node is available .
  • the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree.
  • a context modeling apparatus for dividing a flag bit
  • the apparatus comprising an acquisition module, a condition determination module, and a context model determination module.
  • the acquiring module is configured to acquire a height and a width of the current node, a height of the first leaf node adjacent to the current node in the first direction, and a width of the second leaf node adjacent to the current node in the second direction, where The first leaf node and the second leaf node are the reconstructed leaf nodes
  • the condition determining module is configured to determine whether the current node meets the first preset condition and whether the current node meets the second preset condition.
  • the first preset condition is that the height of the current node is greater than the height of the first leaf node
  • the second preset condition is that the width of the current node is greater than the width of the second leaf node
  • the context model determining module is configured to use the first pre-
  • the context model of the division flag bit of the current node is determined according to the condition and the satisfaction condition of the second preset condition, and the context model of the division flag bit is a probability model of the bit corresponding to the division flag bit.
  • the first leaf node covers a preset position in the first direction of the current node
  • the second leaf node covers a preset position in the second direction of the current node
  • the context model of the partitioning flag includes N, and the number of the N context models is 0 to N-1, and N is an integer greater than 1, and the context model is determined.
  • condition determining module is further configured to: determine, by the context model determining module, the dividing flag of the current node according to the satisfaction of the first preset condition and the second preset condition Before the context model of the bit, the subclass number of the context model that divides the flag bit is determined according to the height and width of the current node; the context model determining module is specifically configured to satisfy the condition according to the first preset condition and the second preset condition. And the subclass number of the context model that divides the flag bit, and determines the context model of the partition flag of the current node.
  • the foregoing context model determining module is configured to obtain an area of the current node according to a height and a width of the current node, and then map according to the preset node area and the subclass number. Relationship, determining a subclass number of the context model that divides the flag bit; or, the context model determining module is specifically configured to query the context of the division flag bit in the preset subclass number query table according to the height and width of the current node The subclass number of the model.
  • the subclass number query table includes the height and width of the current node, and the subclass number corresponding to the width and height of the current node.
  • the context model of the partitioning flag includes N, and the number of the N context models is 0 to N-1, and N is an integer greater than 1.
  • n_conA When n_conA is 0, it indicates that the second preset condition is not satisfied; X represents the subclass number of the context model that divides the flag bit; and a represents the number of context models of the partition flag bit corresponding to the subclass number. ;* indicates multiplication.
  • the acquiring module is further configured to: before determining a context model of the dividing flag of the current node according to the satisfaction of the first preset condition and the second preset condition Obtaining a height of a third leaf node that is adjacent to the current node by a third party, the third direction is opposite to the first direction, and the third leaf node is a reconstructed leaf node; the foregoing condition determining module is further configured to determine whether the current node is The third preset condition is that the height of the current node is greater than the height of the third leaf node; the context model determining module is specifically configured to use the first preset condition, the second preset condition, and the third The context condition of the division flag of the current node is determined by the satisfaction of the preset condition.
  • the context model of the partitioning flag includes N, and the number of the N context models is 0 to N-1, and N is an integer greater than 1.
  • n_conL When n_conL is 0, it indicates that the first preset condition is not satisfied; n_conA indicates whether the second preset condition is satisfied, when n_conA is 1, it indicates that the second preset condition is satisfied, and when n_conA is 0, it indicates that the second preset is satisfied.
  • the context model determining module is configured to determine, according to the first preset condition, the second preset condition, and the third preset condition, the current node is determined.
  • n_conL represents the number Whether a preset condition is satisfied, when n_conL is 1, it indicates that the first preset condition is satisfied, when n_conL is 0, it indicates that the first preset condition is not satisfied;
  • n_conA indicates whether the second preset condition is satisfied, and when n_conA is 1, it indicates that when n_conA is 1.
  • the second preset condition is satisfied.
  • n_conA When n_conA is 0, it indicates that the second preset condition is not satisfied;
  • n_conR indicates whether the third preset condition is satisfied, when n_conR is 1, the third preset condition is satisfied, and when n_conR is 0, it indicates The third preset condition is not satisfied.
  • the context model determining module is further configured to determine, according to a height and a width of the current node, a subclass number of a context model that divides the flag bit; the context model determining module, The method is specifically configured to determine a context model of the partition flag of the current node according to the first preset condition, the second preset condition, the satisfaction of the third preset condition, and the subclass number of the context model that divides the flag bit.
  • the foregoing context model determining module is specifically configured to: according to the first preset condition, the second preset condition, the third preset condition, and the division flag
  • ctxInc represents the number of the context model that divides the flag bit
  • n_conL indicates whether the first preset condition is satisfied, when n_conL is 1, the first preset condition is satisfied, and when n_conL is 0, the first preset condition is not satisfied.
  • n_conA indicates whether the second preset condition is satisfied.
  • n_conA indicates that the second preset condition is satisfied.
  • n_conA indicates that the second preset condition is not satisfied;
  • n_conR indicates whether the third preset condition is satisfied, when n_conR When it is 1, it indicates that the third preset condition is satisfied.
  • n_conR is 0, it indicates that the third preset condition is not satisfied;
  • X represents the subclass number of the context model that divides the flag bit;
  • a represents the subclass number corresponding to The number of context models that divide the flag bits; * indicates multiplication.
  • the first preset condition further includes that the first leaf node is available; or the second preset condition further includes that the second leaf node is available .
  • the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree.
  • a context modeling method for dividing a flag bit is provided, which is applied to a video encoding device or a video decoding device, the method comprising: according to a width and a height of a current node, a height of the first leaf node and a second leaf Determining a first model number in a width of the node; the first leaf node is adjacent to the current node in a first direction, and the second leaf node is adjacent to the current node in a second direction, The first direction is perpendicular to the second direction, the first leaf node and the second leaf node are reconstructed leaf nodes; determining a second model number according to a type of the coding tree to which the current node belongs; The first model number and the second model number determine a context model of the partition flag of the current node.
  • the embodiment may determine the context model of the partition flag of the current node according to the type of the coding tree to which the current node belongs, so that the chroma coding tree and the non-chroma coding tree (ie, the luma coding tree or the luminance brightness) may be used.
  • the chroma joint tree uses different context models, so that the determined context model can adapt to the chroma coding tree and the non-chroma coding tree, thereby improving the compression efficiency.
  • the determining, according to the type of the coding tree to which the current node belongs, determining the second model number includes: if the coding tree to which the current node belongs is a chroma coding tree, determining The second model number is a first value, and the first value is a preset positive integer.
  • the determining, according to the type of the coding tree to which the current node belongs, determining the second model number includes: if the coding tree to which the current node belongs is a luma coding tree or luma chrominance
  • the joint tree determines the second model number according to the magnitude relationship between the MTT depth of the current node and the MTT depth threshold ThD.
  • the second model number is a second value, and the second value is a non-negative integer
  • the MTT depth of the current node is less than the MTT depth threshold ThD
  • the MTT depth threshold ThD is determined according to a maximum MTT depth corresponding to the current node.
  • the determining, according to the type of the coding tree to which the current node belongs, determining the second model number includes: if the coding tree to which the current node belongs is a luma coding tree or luma chrominance
  • the joint tree determines the second model number according to a product of the MTT depth of the current node and a preset constant P1.
  • the product is the second model number; or if the product is greater than 6, the second model number is 6.
  • the first value is greater than or equal to 9.
  • the determining, according to the type of the coding tree to which the current node belongs, determining the second model number includes: if the coding tree to which the current node belongs is a luma coding tree or luma chrominance
  • the joint tree determines the second model number according to the size relationship between the area of the current node and the first preset area threshold ThA1.
  • the third aspect in a possible implementation, if the area of the current node is greater than the first preset area threshold ThA1, determining that the second model number is a fourth value, and the fourth value is non-negative An integer; or if the area of the current node is less than or equal to the first preset area threshold ThA1, determining that the second model number is a fifth value, the fifth value is a non-negative integer; the first value The fourth value and the fifth value are different from each other.
  • the determining, according to the type of the coding tree to which the current node belongs, determining the second model number includes: if the coding tree to which the current node belongs is a luma coding tree or luma chrominance
  • the joint tree determines the second model number according to the size relationship between the area of the current node and at least one of the second preset area threshold ThA2 and the third preset area threshold ThA3, and the second preset area threshold ThA2 Greater than the third preset area threshold ThA3.
  • the second model number is a sixth value, and the sixth value is a non-negative integer
  • the third area threshold ThA3 if the area of the current node is greater than the third area threshold ThA3 and less than or equal to the second area threshold ThA2, determining that the second model number is a seventh value, and the seventh value is a non-negative integer
  • the second model number is less than or equal to the third area threshold ThA3, determining that the second model number is an eighth value, the eighth value is a non-negative integer; the first value, the sixth value The seventh value and the eighth value are different from each other.
  • the determining, according to the type of the coding tree to which the current node belongs, determining the second model number includes: according to a type of the coding tree to which the current node belongs, and the current node The relationship between the MTT depth and the magnitude of the MTT depth threshold ThD determines the second model number.
  • the MTT depth of the current node is smaller than the MTT depth threshold ThD, and the second model number is determined to be the ninth a value of the ninth value is a non-negative integer; or if the coding tree to which the current node belongs is a chroma coding tree, and the MTT depth of the current node is greater than or equal to the MTT depth threshold ThD, determining the second The model number is a tenth value, and the tenth value is a non-negative integer; or if the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, the MTT depth of the current node is less than the MTT depth Threshold ThD, determining that the second model number is an eleventh value, the eleventh value is a non-negative integer; or if the coding tree to which the
  • a fourth aspect provides a context modeling apparatus for dividing a flag bit, comprising: a first model number determining module, configured to determine a height of a first leaf node and a width of a second leaf node according to a width and a height of the current node, Determining a first model number; the first leaf node is adjacent to the current node in a first direction, and the second leaf node is adjacent to the current node in a second direction, the first direction is The second direction is vertical, the first leaf node and the second leaf node are reconstructed leaf nodes, and the second model number determining module is configured to determine, according to the type of the coding tree to which the current node belongs a second model number; a context model determining module, configured to determine a context model of the partition flag of the current node according to the first model number and the second model number.
  • the embodiment may determine the context model of the partition flag of the current node according to the type of the coding tree to which the current node belongs, so that the chroma coding tree and the non-chroma coding tree (ie, the luma coding tree or the luma color) may be used.
  • the degree of joint tree adopts different context models, so that the determined context model can adapt to the chroma coding tree and the non-chroma coded tree, thereby improving the compression efficiency.
  • the second model number determining module is specifically configured to: when the coding tree to which the current node belongs is a chroma coding tree, determine that the second model number is the first value.
  • the first value is a preset positive integer.
  • the second model number determining module is specifically configured to: when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, according to the current node The magnitude relationship between the MTT depth and the MTT depth threshold ThD determines the second model number.
  • the second model number determining module is specifically configured to: when the MTT depth of the current node is less than the MTT depth threshold ThD, determine that the second model number is a second value is a non-negative integer; or when the MTT depth of the current node is greater than or equal to the MTT depth threshold ThD, determining that the second model number is a third value, the third value Is a non-negative integer; the first value, the second value, and the third value are different from each other.
  • the MTT depth threshold ThD is determined according to a maximum MTT depth corresponding to the current node.
  • the second model number determining module is specifically configured to: when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, according to the current node The product of the MTT depth and the preset constant P1 determines the second model number.
  • the product is the second model number; or if the product is greater than 6, the second model number is 6.
  • the first value is greater than or equal to 9.
  • the second model number determining module is specifically configured to: when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, according to the current node The relationship between the area and the first predetermined area threshold ThA1 determines the second model number.
  • the second model number determining module is specifically configured to: when the area of the current node is greater than the first preset area threshold ThA1, determine the second model number a fourth value, the fourth value is a non-negative integer; or when the area of the current node is less than or equal to the first preset area threshold ThA1, determining that the second model number is a fifth value, The fifth value is a non-negative integer; the first value, the fourth value, and the fifth value are different from each other.
  • the second model number determining module is specifically configured to: when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, according to the current node And determining, by the size relationship between the area and at least one of the second preset area threshold ThA2 and the third preset area threshold ThA3, the second preset area threshold ThA2 is greater than the third preset area threshold ThA3.
  • the second model number determining module is specifically configured to: when the area of the current node is greater than the second area threshold ThA2, determine that the second model number is a sixth value, the sixth value is a non-negative integer; or when the area of the current node is greater than the third area threshold ThA3 and less than or equal to the second area threshold ThA2, determining that the second model number is a seventh value, the seventh value is a non-negative integer; or when the area of the current node is less than or equal to the third area threshold ThA3, determining that the second model number is an eighth value, the eighth The value is a non-negative integer; the first value, the sixth value, the seventh value, and the eighth value are different from each other.
  • the second model number determining module is specifically configured to: according to a type of a coding tree to which the current node belongs, and a size of an MTT depth and an MTT depth threshold ThD of the current node. Relationship, determining the second model number.
  • the second model number determining module is specifically configured to: the coding tree to which the current node belongs is a chroma coding tree, where the MTT depth of the current node is smaller than the MTT Determining, when the depth threshold is ThD, determining that the second model number is a ninth value, the ninth value is a non-negative integer; or the coding tree to which the current node belongs is a chroma coding tree, and the MTT depth of the current node is greater than or When the MTT depth threshold ThD is equal to, the second model number is determined to be a tenth value, and the tenth value is a non-negative integer; or the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint.
  • the coding tree is a luma coding tree or a luma chroma joint tree, and when the MTT depth of the current node is greater than or equal to the MTT depth threshold ThD, determining that the second model number is a twelfth value, the twelfth value Is a non-negative integer; Said ninth value, the tenth value, the tenth and eleventh binary values different from each other.
  • the first direction is a horizontal leftward direction
  • the second direction is a vertically upward direction
  • the present application provides a context modeling apparatus for dividing a flag bit, the apparatus comprising a processor and a memory coupled to the processor.
  • the memory is for storing computer instructions that, when executed, the processor executes the computer instructions stored by the memory to cause the apparatus to perform the partitioning of any of the first aspects described above and various alternative implementations thereof.
  • the context modeling method for flag bits is for dividing a flag bit.
  • the present application provides a context modeling apparatus for dividing a flag bit, the apparatus comprising a processor and a memory coupled to the processor.
  • the memory is for storing computer instructions that, when executed, the processor executes the computer instructions stored by the memory to cause the apparatus to perform the partitioning of any of the above third aspects and various alternative implementations thereof.
  • the context modeling method for flag bits is for dividing a flag bit.
  • the present application provides a computer readable storage medium including computer instructions that, when executed on a computer, cause the computer to perform the first aspect and its various optional A context modeling method for dividing a flag bit according to any one of the implementation modes.
  • the present application provides a computer readable storage medium including computer instructions that, when executed on a computer, cause the computer to perform the third aspect and its various optional A context modeling method for dividing a flag bit according to any one of the implementation modes.
  • the present application provides a computer program product comprising instructions, when the computer program product is run on a computer, causing the computer to perform the method of any of the first aspect and various alternative implementations thereof A context modeling method for dividing flag bits.
  • the application provides a computer program product comprising instructions, when the computer program product is run on a computer, causing the computer to perform any of the third aspect and various alternative implementations thereof A context modeling method for dividing flag bits.
  • a video decoder comprising the context modeling apparatus of any of the second aspect and various alternative implementations thereof.
  • a video decoder comprising the context modeling apparatus of any of the fourth aspect and various alternative implementations thereof.
  • a video decoder comprising an execution circuit for performing the method of the first aspect or any of the possible embodiments of the first aspect.
  • a video decoder comprising an execution circuit for performing the method of any of the third or third aspect.
  • a video encoder comprising an execution circuit for performing the method of any of the first aspect or the first aspect.
  • a video encoder comprising an execution circuit for performing the method of any of the third or third aspect.
  • FIG. 1 is a schematic diagram of a node division result according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a method for encoding video data and decoding video data according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of hardware of a video encoding apparatus according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of hardware of a video decoding device according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram 1 of a context modeling method for dividing a flag bit according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram 2 of a node according to an embodiment of the present invention.
  • FIG. 7 is a second schematic diagram of a context modeling method for dividing a flag bit according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of mapping relationship between a node area and a subclass number according to an embodiment of the present disclosure
  • FIG. 9 is a third schematic diagram of a context modeling method for dividing a flag bit according to an embodiment of the present disclosure.
  • FIG. 10 is a fourth schematic diagram of a context modeling method for dividing a flag bit according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram 5 of a context modeling method for dividing a flag bit according to an embodiment of the present disclosure
  • FIG. 12 is a schematic diagram 6 of a context modeling method for dividing a flag bit according to an embodiment of the present disclosure
  • FIG. 13 is a schematic diagram 7 of a context modeling method for dividing a flag bit according to an embodiment of the present invention.
  • FIG. 14 is a schematic diagram 8 of a context modeling method for dividing a flag bit according to an embodiment of the present invention.
  • FIG. 15 is a schematic structural diagram 1 of a video encoding apparatus according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic structural diagram 2 of a video encoding apparatus according to an embodiment of the present disclosure.
  • FIG. 17 is a schematic structural diagram 1 of a video decoding device according to an embodiment of the present disclosure.
  • FIG. 18 is a schematic structural diagram 2 of a video decoding device according to an embodiment of the present disclosure.
  • FIG. 19 is a schematic diagram 9 of a context modeling method for dividing a flag bit according to an embodiment of the present invention.
  • FIG. 20 is a schematic diagram of a context modeling apparatus for dividing a flag bit according to an embodiment of the present invention.
  • first and second and the like in the specification and claims of the embodiments of the present invention are used to distinguish different objects, and are not intended to describe a specific order of the objects.
  • first direction, the second direction, and the like are used to distinguish different directions, rather than a specific order for describing the direction
  • the first preset condition and the second preset condition, etc. are used to distinguish different preset conditions, Rather than being used to describe a specific order of preset conditions.
  • 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 invention 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 plurality means two or more unless otherwise stated.
  • a plurality of coding units refers to two or more coding units;
  • a plurality of processing units refers to two or more processing units.
  • CTU a coding tree unit, which is a basic unit in a video coding or video decoding process, and a CTU corresponds to a square image block in a video frame (ie, an image) in the video data, that is, an image
  • an image may include one or more CTU, for example, the size of the CTU can be 64*64, that is, the 64*64 CTU includes a rectangular pixel lattice consisting of 64 rows and 64 columns of pixels, and the size of the CTU can also be 128*128 or 256*256. Wait.
  • the coding unit is a leaf node generated after the CTU is divided, that is, a node that is no longer divided on the coding tree, and one CU corresponds to a rectangular image block, and the width and height of the CU can also be represented by the number of pixels; for example, The width of the CU may be 256, 128, 64, 32, 8 or 4 pixels, etc., and the height of the CU may also be 256, 128, 64, 32, 8 or 4 pixels, etc., wherein the height and width of the CU They may or may not be equal; for example, when quadtree partitioning is used, the height and width of the CU are equal, but the height and width of the CU are not necessarily equal when divided by a binary tree and/or a trigeminal tree.
  • a video frame (also referred to as an image) of the video data is taken as an example.
  • the video encoding device uses CU as a coding unit to complete coding of all CUs included in one CTU according to a certain encoding rule. Completing the encoding of multiple CTUs of an image to obtain a code stream; in the process of decoding the video data, the decoding device completes reconstruction of multiple CUs included in one CTU according to a decoding rule corresponding to the encoding process (including prediction and inverse Decoding, inverse transform, and filtering, etc., to complete reconstruction of multiple CTUs of an image to obtain a reconstructed image.
  • a decoding rule corresponding to the encoding process including prediction and inverse Decoding, inverse transform, and filtering, etc.
  • the CTU and the CU are both nodes in the coding tree, and the CTU is the root node, and the CTU is divided to obtain a certain number of nodes. Further, some or all of the nodes obtained by the CTU after one division can continue to be divided. For smaller nodes, and so on, until all nodes do not need to be subdivided, the nodes that do not need to be subdivided are called leaf nodes, that is, the leaf nodes are nodes that do not need to be subdivided at the end of the coding tree, usually one.
  • the leaf node corresponds to a CU.
  • a method of dividing a node into sub-nodes includes quadtree partitioning, binary tree partitioning, or tri-tree partitioning, and the like.
  • the quadtree partitioning refers to dividing the nodes into four sub-nodes of equal size, as shown in (a) of FIG. 1 as a schematic diagram of quadtree partitioning; binary tree partitioning refers to dividing one node into two equal sizes.
  • the child node specifically, may be divided by a horizontal binary tree or a vertical binary tree.
  • FIG. 1 is a schematic diagram of horizontal binary tree division
  • FIG. 1 is a schematic diagram of vertical binary tree division; a trigeminal tree
  • the division refers to dividing a node into three sub-nodes. Specifically, it can be divided by a horizontal tri-tree or a vertical tri-tree.
  • the horizontal tri-tree division the heights of the three regions corresponding to the upper, middle, and lower regions are occupied.
  • the ratio of the height of the currently divided nodes is 1/4, 1/2, 1/4.
  • the widths of the three regions corresponding to the left, middle, and right occupy the proportion of the currently divided node width.
  • 1/4, 1/2, 1/4, as shown in (d) of FIG. 1 is a schematic diagram of horizontal tri-tree division
  • (e) in FIG. 1 is a schematic diagram of vertical tri-tree division.
  • any one or more of quadtree partitioning, tri-tree partitioning, and binary tree partitioning may be selected.
  • a quadtree and a binary tree cascading partitioning method may be adopted, that is, the CTU first performs quadtree partitioning to obtain four nodes, and if one or more of the four nodes obtained are required, Continue to divide, the binary tree partitioning method is used to divide the nodes that need to continue to be divided into smaller nodes.
  • the foregoing CTU also includes some syntax elements, such as split mode information used to indicate which partitioning method is used to divide the node, and the syntax element further includes a flag bit for indicating whether each node continues to divide.
  • Each of the nodes corresponds to a flag bit that is subdivided.
  • a flag indicating whether a node is subdivided is referred to as a split flag bit. If the size of a node is already the smallest size that the node is allowed to divide, the node can no longer continue to divide. In this case, it is not necessary to include in the syntax element a flag indicating whether the node is subdivided, and the decoding end is also It can be directly determined according to the size of the node that the node does not need to continue to divide.
  • the division flag bit is used to indicate whether the node corresponding to the division flag bit needs to be further divided into smaller-sized nodes.
  • the video coding device encodes the image block corresponding to one node to obtain a code stream. And the video encoding device also encodes the division flag bit of the node, and also writes the coded division flag bit into the code stream, so that when the decoding device decodes the video data, the decoding device obtains the node by parsing the code stream. The division flag bit, thereby completing the reconstruction of the image corresponding to the node.
  • a "0" may be used to indicate that a node continues to be divided, and a "1" may be used to indicate that a node continues to be divided.
  • an appropriate identifier may be selected according to an actual situation to indicate that the node continues to be divided. limited.
  • 0 can be used to indicate that a node does not need to continue to be divided
  • 1 can be used to indicate that a node does not need to continue to be divided.
  • an appropriate identifier can be selected according to the actual situation to indicate that the node does not need to continue to divide. The embodiment of the invention is not limited.
  • an embodiment of the present invention provides a context modeling method and apparatus for dividing a flag bit, and the video coding device or the video decoding device can pass the width and height of the current node and be adjacent to the current node.
  • the height of the first leaf node and the width of the second leaf node adjacent to the current node determine the context model of the partition flag of the current node, and can more accurately determine the context model of the divided flag bit, thereby improving the division of the flag bit.
  • the efficiency of entropy coding is a context modeling method and apparatus for dividing a flag bit.
  • the context modeling method and apparatus for dividing a flag bit may be applied to a scenario of encoding video data or decoding video data, and specifically, may be applied to coding a divided flag bit in a video data encoding process.
  • the method may be applied to a device having a coding and/or decoding function.
  • a device that encodes video data is referred to as a video encoding device
  • a device that decodes video data is referred to as a video decoding device.
  • the video encoding device After the video encoding device acquires the video data, the video encoding device encodes the video data, and the video data may be compressed into a code stream (ie, encoded video data), and then the video data is sent to other devices (for example, a video decoding device).
  • the video decoding device obtains the encoded video data, and the video encoding device can decode the video data to recover the complete information of the video data.
  • an image block in a video frame of video data is taken as an example to illustrate a brief process of video data encoding and video data decoding.
  • the video encoding device may encode the image block (after prediction and transformation). , quantization, entropy coding, etc.), to obtain an encoded image block, and the encoding device performs corresponding encoding on the syntax elements (eg, the division flag bits) of the image block, and the encoded syntax element and the encoded image block constitute
  • the encoded information ie, the code stream
  • the encoded information of the video data includes the encoded image data and the encoded syntax elements.
  • the decoding device After the decoding device receives the encoded information, the decoding device decodes the encoded syntax elements in the encoded information (processes by prediction, inverse quantization, inverse transform, etc.), and then the decoding device reconstructs the image based on the syntax elements extracted from the encoded information.
  • a block ie, a video decoding device, obtains a predictive pixel block of the image block based on the syntax elements associated with the image block and the encoded image block.
  • the context modeling method for dividing a flag bit may be applied to a video encoding device or a video decoding device, and the video encoding device and the video decoding device may each be a desktop computer, a mobile computing device, or a notebook (eg, a laptop).
  • Handheld computers such as computers, tablet computers, set-top boxes, smart phones, televisions, cameras, display devices, digital media players, video game consoles, on-board computers, virtual reality devices, augmented reality devices, or the like.
  • the video encoding apparatus provided by the embodiment of the present invention includes components such as a video capture device 10, a video memory 11, a video encoder 12, and an output interface 13. It will be understood by those skilled in the art that the structure of the video encoding apparatus shown in FIG. 3 does not constitute a limitation of the video encoding apparatus, and may include more or less components such as those shown in FIG. 3, or may be combined as Some of the components shown in Figure 3 may be different than the components shown in Figure 3.
  • Video capture device 10 a device that acquires video data, and the video capture device may be a video camera.
  • Video memory 11 The video data captured by the video capture device may be stored, or may be encoded by the video encoder 12 for the video data.
  • Video encoder 12 The video data acquired by the video capture device may be encoded into a machine-recognizable code according to an encoding standard (for example, H.264) to compress the video data, facilitating transmission and storage of the video data.
  • the video encoder 12 can be a central processing unit (CPU), a general purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and a field programmable gate.
  • the modules and circuits; the video encoder 12 may also be a combination of computing functions, such as one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • Output interface 13 an interface circuit for transmitting data to other devices.
  • the output interface 13 may be a transceiver, a transceiver circuit, or the like having a transceiver function, including a modulator/demodulator (modem) and/or a transmitter, in the video.
  • modem modulator/demodulator
  • the output interface 13 can transmit the encoded video data to the video decoding device.
  • the video encoding device shown in FIG. 3 may further include a wireless gidelity (WiFi) module, a Bluetooth module, and the like, and details are not described herein.
  • WiFi wireless gidelity
  • the video decoding device provided by the embodiment of the present invention includes: an input interface 20, a video decoder 21, and a display device 22. It will be understood by those skilled in the art that the structure of the video decoding apparatus shown in FIG. 4 does not constitute a limitation of the video decoding apparatus, and may include more or less components such as those shown in FIG. 4, or may be combined as Some of the components shown in Figure 4 may be different than the components shown in Figure 4.
  • the input interface 20 is for receiving data transmitted by other devices, such as video encoding devices, and the input interface 20 can be a receiver and/or a modem. In the video codec system, the input interface 20 can receive the encoded video data transmitted by the encoding device.
  • the video decoder 21 can restore and decode the encoded video data it receives, that is, decompress, so that the decoded video data can be played in the display device.
  • the video decoder 21 may be 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, which may implement or perform the operations described in the embodiments of the present invention.
  • Various exemplary logical blocks, modules and circuits; video decoder 21 may also be a combination of computing functions, such as one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the display device 22 is configured to display the decoded video data, and the display device may include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or Other types of display devices.
  • the display device 22 can be integrated in the video decoding device, and the display device 22 can also be disposed outside the video decoding device independently of the video decoding device.
  • dividing the flag bit is a very important syntax element.
  • the context modeling of dividing the flag bit is also important.
  • the encoding of the divided flag bit and the decoding of the video data are performed from the video data coding scene.
  • the context modeling method for dividing the flag bits in the embodiment of the present invention is introduced in the aspect of the decoding of the flag bits.
  • the division flag of the current node is used to indicate whether the current node needs to be divided.
  • the context modeling method for dividing the flag bit provided by the embodiment of the present invention may include S101-S104:
  • the video encoding device acquires a height and a width of a current node, a height of a first leaf node adjacent to the current node in the first direction, and a width of a second leaf node adjacent to the current node in the second direction.
  • the first direction is perpendicular to the second direction, and the first leaf node and the second leaf node are reconstructed leaf nodes, that is, the first leaf node and the second leaf node have been coded.
  • the first direction may be horizontal to the left or horizontal to the right, and the second direction may be vertically upward or vertical downward.
  • the height of the current node and the height of the first leaf node refer to: a measure of the current node and the adjacent edge of the first leaf node in the same direction; the width of the current node and the width of the second leaf node The measure of the current node and the adjacent edge of the second leaf node in the same direction.
  • the first direction may be horizontal to the left, and the second direction may be vertically upward.
  • the first direction is a direction vertically pointing to the upper side of the current node
  • the second node is The horizontal direction points to the direction of the left side of the current node. If the first direction is horizontal to the left, the first leaf node is an adjacent leaf node to the left of the current node, and the first leaf node may also be referred to as a left leaf node; If the second direction is vertically upward, the second leaf node is an adjacent leaf node on the upper side of the current node, and the second leaf node may also be referred to as an upper leaf node.
  • the first leaf node covers a preset position in the first direction of the current node
  • the second leaf node covers a preset position in the second direction of the current node.
  • the method for determining the first leaf node may be: A preset position on the left side of the current node will be overwritten, and any one of the at least one leaf node located on the left side of the current node is determined as the first leaf node, wherein the preset position may be the left side distance of the current node
  • the node presets any one of the regions S1 of the distance, and the distance may be less than or equal to the width of one CU.
  • the preset distance may be other values such as 4 or 8.
  • the preset position may be the coordinate in S1.
  • the preset position may be other positions in the S1, and is selected according to the actual situation, which is not limited in the embodiment of the present invention.
  • the method for determining the second leaf node may be: determining a leaf node that covers a preset position on the upper side of the current node as a second leaf node, wherein the preset position may be the current node. Any one of the regions S2 whose side distance is from the current node preset distance.
  • the preset position may be the position P4 of the coordinate (x, y-1) in S2, or the position P5 of the coordinate (x+M/2, y-1), the preset position It can also be other positions in the S2, and is selected according to the actual situation, which is not limited in the embodiment of the present invention.
  • the first direction may also be horizontal to the right, such that the first leaf node is a right leaf node; the second direction may also be vertically downward, such that the second leaf node
  • the first direction and the second direction may be determined according to an actual coding rule, so as to determine the first leaf node and the second leaf node, which are not limited in the embodiment of the present invention.
  • the video encoding device determines whether the current node meets the first preset condition and whether the current node meets the second preset condition.
  • the first preset condition is that the height of the current node is greater than the height of the first leaf node
  • the second preset condition is that the width of the current node is greater than the width of the second leaf node
  • the current node is further divided by comparing the length of a certain edge of the current node with the length of the adjacent edge of the leaf node adjacent to the current node, if the height of the current node is greater than the first leaf node.
  • the height indicates that the probability that the current node continues to be horizontally divided is relatively high; if the height of the current node is less than or equal to the height of the first leaf node, the probability that the current node continues to be horizontally divided is relatively low.
  • the probability that the current node continues to be vertically divided is relatively high; if the width of the current node is less than or equal to the width of the second leaf node, the current node continues to be vertically divided. The probability is relatively low.
  • the terminal device may determine, by using a determining action, whether the current node meets the first preset condition and whether the current node meets the second preset condition.
  • the terminal device may determine whether the current node meets the first preset condition and whether the current node meets the second preset condition by using two determining actions.
  • the terminal device may first determine whether the current node meets the first preset condition. And determining whether the current node meets the second preset condition; or the terminal device may determine whether the current node meets the second preset condition, and then determines whether the current node meets the first preset condition, which is not specifically limited in the embodiment of the present invention.
  • the video encoding device determines a context model of the dividing flag bit of the current node according to the satisfaction of the first preset condition and the second preset condition.
  • the video encoding device may determine a context model of the dividing flag bit of the current node according to the situation that the current node satisfies the first preset condition and the condition that the second preset condition is met, and the context model of the dividing flag bit refers to Is a probability model for dividing the bit corresponding to the flag bit.
  • a context model for dividing the flag bit is specified, and the context model for dividing the flag bit includes N, the N The number of the context models may be 0 to N-1 in turn, and N is an integer greater than 1.
  • the method for determining, by the video encoding device, the context model of the dividing flag of the current node according to the satisfaction of the first preset condition and the second preset condition includes: the video encoding device according to the first preset condition and the second preset condition Satisfy the situation, determine the number of the context model of the partition flag of the current node. Specifically, in an implementation manner, the number of the context model of the partition flag of the current node satisfies:
  • ctxInc represents the number of the context model that divides the flag bit;
  • n_conL indicates whether the first preset condition is satisfied, when n_conL is 1, the first preset condition is satisfied, and when n_conL is 0, the first preset condition is not satisfied,
  • n_conA indicates whether the second preset condition is satisfied. When n_conA is 1, it indicates that the second preset condition is satisfied, and when n_conA is 0, it indicates that the second preset condition is not satisfied.
  • the context model of the partition flag of the current node when the first preset condition is not satisfied and the second preset condition is not satisfied, the context model of the partition flag of the current node is 0; when the first preset condition is met, the second preset condition If the content is not satisfied, the context model of the partition flag of the current node is numbered 1, or the first preset condition is not satisfied, and the second preset condition is satisfied, and the context model of the partition flag of the current node is numbered 1; If the preset condition is satisfied and the second preset condition is also satisfied, the context model of the partition flag of the current node is numbered 2.
  • the form of the context model that divides the flag is a form of the model, which is not limited by the embodiment of the present invention.
  • the video encoding device encodes the bit element corresponding to the divided flag bit according to the context model of the divided flag bit.
  • the division flag bit may be binarized into a binary value bit, and it is assumed that the division flag bit may take 0 and 1 (where one value indicates that the current node continues to divide, and another value indicates that the current node does not need to be If the division flag is further continued, the division flag bit can be binarized into one binary value bit, the bit element is 0 corresponding to the division flag bit being 0, and the bit element is 1 corresponding to the division flag bit being 1.
  • the coding of the division flag bit can be understood as encoding the bit element corresponding to the division flag bit. Specifically, the value of the bit element is coded according to the probability value of the bit element corresponding to the division flag bit under a certain probability model.
  • the video encoding device performs the encoding of the bit corresponding to the divided flag bit, that is, the video encoding device completes the encoding of the divided flag bit, so that the video encoding device divides the information of the divided flag bit after encoding.
  • Other information such as mode information and coding unit information is written into the code stream to complete encoding of the video data.
  • the context model of the current node determined by the node is relatively accurate, that is, the probability model of the bit corresponding to the division flag of the current node is relatively accurate.
  • the probability value of the bit corresponding to the division flag is 1 is closer to 0 or 1, as such, the number of bits required to encode the divided flag bits is relatively small, so that the efficiency of entropy coding of the divided flag bits can be improved.
  • the video encoding device may further update the probability value of the bit corresponding to the divided flag bit according to the value of the bit corresponding to the divided flag bit, so that the probability value is dynamically updated with the image content.
  • the context modeling method for dividing a flag bit when determining a context model for dividing a flag bit in a scenario in which a division flag bit is encoded, the video encoding device compares the height of the current node with the height of the first leaf node. And comparing the width of the current node with the width of the second leaf node, can more accurately determine whether the current node is subdivided, and thus, the context model for dividing the flag bit can be determined more accurately according to the situation that the above two preset conditions are satisfied, Thereby, the efficiency of entropy coding of the divided flag bits can be improved.
  • the height of the current node and the height of the first leaf node can be compared, and the width of the current node is compared with the second node when the partitioning of any one node is performed by a binary tree partitioning and/or a tri-tree partitioning.
  • the width of the leaf node thereby more accurately determining the context model of the partitioning flag of the current node.
  • the problem that the context model of the partition flag of the current node determined by the depth information is inaccurate in the prior art, for example, the depth of the current node and the depth of the first leaf node are the same, but the height of the current node is well solved. It is much larger than the height of the first leaf node. In this case, the prior art is more inclined to determine that the current node does not need to continue to divide. In fact, since the height of the current node is relatively high, the current node should be horizontally divided. The possibility is relatively high.
  • the method may further include S105:
  • the video encoding device determines, according to the height and width of the current node, a subclass number of the context model that divides the flag bit.
  • the probability of re-segmentation may be different for nodes of different sizes. For example, for a node having a relatively large size, the probability that the node continues to be divided to a certain extent is relatively high, and the node with a relatively small size is relatively small. The probability that the node continues to be divided is relatively low.
  • the current node can be classified into a subclass according to the size of the current node.
  • the context model of the partition flag of the current node can also correspond to a subclass model. Specifically, The height and width of the current node determine the subclass number of the context model of the partition flag for the current node.
  • S105a may be specifically implemented by using S105a:
  • the video encoding device acquires the area of the current node according to the height and width of the current node, and then determines the subclass number of the context model that divides the flag according to the mapping relationship between the preset node area and the subclass number.
  • the video encoding device first determines the area of the current node by using the product of the height and the width of the current node, and then determines the current relationship according to the area of the current node and the mapping relationship between the preset node area and the subclass number.
  • the subclass number corresponding to the area of the node that is, the subclass number of the context model that divides the flag.
  • the mapping relationship between the preset node area and the sub-class number may be: when the node area is greater than the first threshold.
  • the corresponding subclass code is 0.
  • the node area is smaller than the second threshold, the corresponding subclass number is 2, the node area is greater than or equal to the second threshold, and when the node is less than or equal to the first threshold, the corresponding subclass number is 1.
  • the first threshold is 2048, the current node has a width of 64, the height is 64, and the current node has an area of 4096, the sub-class number of the division flag of the current node is 0.
  • the first threshold is greater than the second threshold.
  • the first threshold may be 1024, 2048, or 4096
  • the second threshold may be 256 or 512.
  • the first threshold and the second threshold may be determined according to actual conditions, and the present invention is The embodiment is not limited.
  • S105b may be specifically implemented by using S105b:
  • the video encoding device queries the subclass number of the context model that divides the flag bit in the preset subclass number query table according to the height and width of the current node.
  • the subclass number of the context model for dividing the flag bit may be determined according to the height and width of the current node, and the mapping relationship between the preset node height and width and the subclass number, and the preset node height and
  • the mapping relationship between the width and the sub-class number may be a preset sub-class number query table, where the preset sub-class number query table includes the height and width of the current node, and the sub-class number corresponding to the width and height of the current node.
  • the preset sub-class number query table may include Table 1, Table 2, and Table 3 as shown in the following.
  • one of the three sub-class code query tables may be selected according to actual conditions.
  • To query the subclass number of the context model that divides the flag bits as shown in Table 1, Table 2, and Table 3 below.
  • the sub-class number lookup table shown in Table 1 is used, combined with Table 1, if the current node has a width of 16 and a height of 64, the sub-query of the current node's partition flag is obtained in Table 1.
  • the class number is 2.
  • the preset sub-class number query table is only an optional implementation manner of a preset mapping relationship between a node height and a width and a sub-class number, and the preset node
  • the mapping between the height and the width and the sub-class number may also be other types of mappings, which are not specifically limited in the embodiment of the present invention.
  • S103a may be specifically implemented by using S103a:
  • the video encoding device determines a context model of the dividing flag bit of the current node according to the satisfaction of the first preset condition and the second preset condition, and the subclass number of the context model that divides the flag bit.
  • the method for determining the context model of the dividing flag of the current node according to the satisfaction of the first preset condition and the second preset condition, and the subclass number of the context model that divides the flag bit may include : determining, according to the satisfaction of the first preset condition and the second preset condition, and the subclass number of the context model that divides the flag bit, the number of the context model of the partition flag of the current node, in an implementation manner, The number of the context model of the partition flag is satisfied:
  • ctxInc represents the number of the context model that divides the flag bit
  • n_conL indicates whether the first preset condition is satisfied, when n_conL is 1, it indicates that the first preset condition is satisfied, and when n_conL is 0, it indicates that the first preset condition is not satisfied
  • n_conA indicates whether the second preset condition is satisfied. When n_conA is 1, it indicates that the second preset condition is satisfied. When n_conA is 0, it indicates that the second preset condition is not satisfied
  • X indicates the subclass number of the context model that divides the flag bit
  • a represents the number of context models of the partition flag bits corresponding to the subclass number
  • * indicates multiplication.
  • the context modeling method for dividing a flag bit may determine, according to the size of the current node itself, a subclass number of the partition flag bit of the current node, whether the first preset condition is met and the second preset condition is On the basis of satisfaction, the sub-class number of the context model of the joint division flag bit is determined, and the context model of the determined division flag bit is relatively accurate, and thus, the efficiency of entropy coding of the division flag bit can be further improved.
  • the method may further include: S106-S107:
  • the video encoding device acquires a height of a third leaf node that is adjacent to the current node by a third party.
  • the third direction is opposite to the first direction, and the third leaf node is a reconstructed leaf node.
  • the third leaf node is a leaf node adjacent to the current node on the right side of the current node, and the third leaf node is It can also be called a right leaf node.
  • the video encoding device determines whether the current node meets a third preset condition.
  • the third preset condition is that the height of the current node is greater than the height of the third leaf node.
  • the probability that the current node continues to be horizontally divided is relatively high; if the height of the current node is less than or equal to the height of the third leaf node, the current node continues.
  • the probability of being divided horizontally is relatively low.
  • S103b may be specifically implemented by using S103b:
  • the video encoding device determines a context model of the dividing flag bit of the current node according to the satisfaction of the first preset condition, the second preset condition, and the third preset condition.
  • the method for determining the context model of the dividing flag of the current node according to the satisfaction of the first preset condition, the second preset condition, and the third preset condition may include: according to the first preset condition And determining, by the second preset condition and the third preset condition, the number of the context model of the partition flag of the current node.
  • the number of the context model of the split flag satisfies:
  • ctxInc represents the number of the context model that divides the flag bit
  • n_conL indicates whether the first preset condition is satisfied, when n_conL is 1, it indicates that the first preset condition is satisfied, and when n_conL is 0, it indicates that the first preset condition is not satisfied
  • n_conA indicates whether the second preset condition is satisfied. When n_conA is 1, it indicates that the second preset condition is satisfied.
  • n_conA When n_conA is 0, it indicates that the second preset condition is not satisfied; n_conR indicates whether the third preset condition is satisfied, when n_conR is 1 o'clock means that the third preset condition is satisfied, when n_conR is 0, it means that the third preset condition is not satisfied; min(a, b) means taking the smaller value of a and b.
  • the context modeling method for dividing a flag bit may be combined with another leaf node adjacent to the current node to determine whether the current node satisfies a third preset condition, whether the first preset condition is satisfied and the second On the basis of whether the preset condition is satisfied, whether the third preset condition is satisfied or not, the determined context model of the divided flag bit is relatively accurate, and thus, the efficiency of entropy coding of the divided flag bit can be further improved.
  • the encoding device may further acquire a width of a fourth leaf node adjacent to the current node in the fourth direction, where the fourth direction is opposite to the second direction, and the fourth leaf node is reconstructed.
  • a leaf node the encoding device determines whether the current node satisfies a fourth preset condition, wherein the fourth preset condition is that the width of the current node is greater than the width of the fourth leaf node; thus, according to the first preset condition and the second preset condition
  • the method for determining the context model of the dividing flag of the current node may include: determining, by the encoding device, the dividing flag of the current node according to the satisfaction of the first preset condition, the second preset condition, and the fourth preset condition Context model.
  • the coding device determines that the number of the context model of the division flag of the current node is similar to that of the foregoing S103b according to the first preset condition, the second preset condition, and the fourth preset condition. For details, refer to the foregoing for S103b. The related description is not repeated here.
  • the context modeling method for dividing a flag bit may further include S108:
  • the video encoding device determines a subclass number of the context model that divides the flag bit according to the height and width of the current node.
  • S108 may be performed before S106, or S108 may be performed after S106, or S106 and S108 may be simultaneously performed, and the embodiment of the present invention does not limit the execution order of S108 and S106.
  • S103c may be specifically implemented by using S103c:
  • the video encoding device determines a context model of the dividing flag bit of the current node according to the first preset condition, the second preset condition, the satisfaction of the third preset condition, and the subclass number of the context model that divides the flag bit.
  • the determining, according to the first preset condition, the second preset condition, the third preset condition, and the subclass number of the context model of the divided flag bit, determining the dividing flag of the current node includes: determining the context of the dividing flag of the current node according to the first preset condition, the second preset condition, the satisfaction of the third preset condition, and the subclass number of the context model dividing the flag bit Encoding of the model, in one embodiment, the numbering of the context model of the partitioning flag bit satisfies:
  • ctxInc represents the number of the context model that divides the flag bit
  • n_conL indicates whether the first preset condition is satisfied, when n_conL is 1, it indicates that the first preset condition is satisfied, and when n_conL is 0, it indicates that the first preset condition is not satisfied
  • n_conA indicates whether the second preset condition is satisfied. When n_conA is 1, it indicates that the second preset condition is satisfied.
  • n_conA When n_conA is 0, it indicates that the second preset condition is not satisfied; n_conR indicates whether the third preset condition is satisfied, when n_conR is 1 indicates that the third preset condition is satisfied, when n_conR is 0, the third preset condition is not satisfied; X represents the subclass number of the context model of the divided flag bit; and a represents the context model of the divided flag bit corresponding to the subclass number.
  • the number; * means multiplication.
  • the context modeling method for dividing a flag bit may determine the subclass number of the dividing flag bit of the current node in combination with the size of the current node itself, and determine another current node with another leaf node adjacent to the current node. Whether the node satisfies the third preset condition, and based on whether the first preset condition is satisfied, whether the second preset condition is satisfied, and whether the third preset condition is satisfied, jointly subclassing the sub-class number of the context model of the flag bit, The context model of the determined partition flag is more accurate, and thus, the efficiency of entropy coding of the divided flag bits can be significantly improved.
  • the context modeling method for dividing the flag bit provided by the embodiment of the present invention may include S201-S205:
  • the video decoding device acquires a height and a width of the current node, a height of the first leaf node adjacent to the current node in the first direction, and a width of the second leaf node adjacent to the current node in the second direction.
  • the video decoding device determines whether the current node meets the first preset condition and whether the current node meets the second preset condition.
  • the video decoding device determines a context model of the dividing flag bit of the current node according to the satisfaction of the first preset condition and the second preset condition.
  • the steps S101-S203 are similar to the steps S101-S103 performed by the video encoding device, and the detailed descriptions of S101-S103 may be referred to. I will not repeat them here.
  • the video decoding device decodes the bit element corresponding to the divided flag bit according to the context model of the divided flag bit.
  • the video decoding device decodes the value of the bit according to the probability value of the bit corresponding to the divided flag bit in a certain probability model.
  • the video decoding device determines, according to the decoded bit, a value of the divided flag bit.
  • the video decoding device may determine the division flag bit corresponding to the bit, thereby completing decoding of the division flag bit, and determining whether the current node continues to be divided according to the division flag bit; If the current node does not need to continue to divide, the current node is regarded as a coding unit, and the video decoding device parses the coding information of the coding unit to complete decoding of the coding unit; if the current node continues to divide, the current node is divided into child nodes. The way is to parse the partition mode information, and then parse the coding unit corresponding to each sub-node. Through the above processing, the CTU is divided into CUs, and each CU is decoded, thereby completing decoding of the video data.
  • the context modeling method for dividing a flag bit when determining a context model for dividing a flag bit in a scenario for decoding a partition flag bit, the video decoding device compares the height of the current node with the height of the first leaf node. And comparing the width of the current node with the width of the second leaf node, can more accurately determine whether the current node is subdivided, and thus, the context model for dividing the flag bit can be determined more accurately according to the situation that the above two preset conditions are satisfied, Thereby, the efficiency of entropy coding of the divided flag bits can be improved.
  • the height of the current node and the height of the first leaf node can be compared, and the width of the current node is compared with the second node when the partitioning of any one node is performed by a binary tree partitioning and/or a tri-tree partitioning.
  • the width of the leaf node thereby more accurately determining the context model of the partitioning flag of the current node.
  • the problem that the context model of the partition flag of the current node determined by the depth information is inaccurate in the prior art, for example, the depth of the current node and the depth of the first leaf node are the same, but the height of the current node is well solved. It is much larger than the height of the first leaf node. In this case, the prior art is more inclined to determine that the current node does not need to continue to divide. In fact, since the height of the current node is relatively high, the current node should be horizontally divided. The possibility is relatively high.
  • the method further includes S206:
  • the video decoding device determines, according to the height and width of the current node, a subclass number of the context model that divides the flag bit.
  • the video decoding device acquires the area of the current node according to the height and width of the current node, and determines the subclass number of the context model that divides the flag according to the mapping relationship between the preset node area and the subclass number.
  • the video decoding device queries the subclass number of the context model that divides the flag bit in the preset subclass number query table according to the height and width of the current node.
  • S203a may be specifically implemented by using S203a:
  • the video decoding device determines a context model of the partition flag of the current node according to the satisfaction of the first preset condition and the second preset condition, and the subclass number of the context model that divides the flag bit.
  • the method may further include S207-S208:
  • the video decoding device acquires a height of a third leaf node that is adjacent to the current node by a third party.
  • the video decoding device determines whether the current node meets a third preset condition.
  • S203b may be specifically implemented by using S203b:
  • the video decoding device determines a context model of the partition flag of the current node according to the first preset condition, the second preset condition, and the third preset condition.
  • the context modeling method for dividing a flag bit may further include S209:
  • the video decoding device determines, according to the height and width of the current node, a subclass number of the context model that divides the flag bit.
  • S203c may be specifically implemented by using S203c:
  • the video decoding device determines a context model of the partition flag of the current node according to the first preset condition, the second preset condition, the satisfaction of the third preset condition, and the subclass number of the context model that divides the flag bit.
  • one coding tree node contains one luminance block and two chrominance blocks; the luminance block and the chrominance block are divided in the same manner, called a luminance chrominance joint coding tree.
  • VVC if the current frame is an I frame, when a coding tree node is a node of a preset size (such as 64x64) in an intra-coded frame (I frame), the luminance block included in the node is divided by the luma coding tree.
  • a set of coding units containing only luma blocks the chromatographic block included in the node is divided into a set of coding units containing only chroma blocks by a chroma coding tree; the division of the luma coding tree and the chroma coding tree are independent of each other.
  • Such luma blocks and chroma blocks use separate coding trees called separate trees.
  • CABAC Context-based Adaptive Binary Arithmetic Coding
  • the encoding process mainly includes three steps: 1) binarizing a syntax element into one or more binary bins, each bit having a value of 0 or 1; 2) for each bit Determining the probability model C of this bit according to the context information (for example, the coding information in the reconstructed area around the corresponding node of the syntax element), this step is usually called context modeling; 3) the bit value according to the probability value in the probability model C Encoding is performed and the probability value in the probability model C is updated based on the value of the bit.
  • the corresponding decoding process mainly includes three steps: 1) for each bit, the probability model C of the bit is determined according to the context information; 2) the bit is decoded according to the probability value in the probability model C, and according to the bit element The value of the probability value in the probability model C is updated; 3) the value of the syntax element is obtained from the value of one or more bits obtained by decoding.
  • the context modeling method is the same during the encoding process and the decoding process.
  • a syntax element has only two values, 0 and 1
  • the syntax element is called a flag, which is binarized to 1 bin, and the bin value is 0.
  • the value of the syntax element corresponds to the value of the syntax element.
  • the bin value of 1 corresponds to a value of 1 for the syntax element.
  • a probability model is selected from a plurality of probability models, and a total probability that a bin is 1 can be split into a conditional probability that bin is 1 in various cases, and each conditional probability can be closer to the total probability. At 0 or 1, thereby reducing the number of coded bits and improving the efficiency of entropy coding.
  • the conditional probability may be close to the total probability and the efficiency of entropy coding cannot be improved.
  • the MTT partition flag corresponds to three candidate context models, and its number ctxInc is 0, 1, and 2.
  • a model is selected from the context information for actual use. Model.
  • the context model for dividing the flag bit is determined according to the area of the current node, the area of the left leaf node, and the area of the upper leaf node.
  • the left leaf node is a leaf node covering a preset position on the left side of the node
  • the upper leaf node is a leaf node covering a preset position on the upper side of the node.
  • the MTT division flag bit is 1 to indicate that the current node is divided according to one of a binary tree or a tri-tree partitioning manner; the MTT partitioning flag is 0 to indicate that the current node is not divided, that is, the current node corresponds to one coding unit.
  • the area of a node is represented by twice the node's quadtree depth Dq plus the node's binary tree depth Db.
  • the Dq of the child node is equal to the Dq of the node plus one; when the node uses binary tree partitioning or tri-tree partitioning, the Dq of the child node is equal to the Dq of the node.
  • the Db of the child node is equal to the Db of the node plus 1.
  • the Db of the child node is equal to the Db of the node plus 1;
  • the Db of the child node is equal to the Db of the node plus 2.
  • Condition 1 If the left leaf node is available (the left leaf node is in the image area and has been reconstructed) and the area of the left leaf node is smaller than the area of the current node, the condition condL is established, otherwise condL is not established;
  • Condition 2 If the upper leaf node is available and the quadtree depth of the upper leaf node is smaller than the area of the current node, the condition condA is established, otherwise condA does not hold.
  • the MTT partition flag bits use the above three context models.
  • condition 1 is replaced by if the left leaf node is available and the height of the left leaf node is lower than the height of the current node, then the condition condL is established, otherwise the condL is not established;
  • condition 2 is replaced by if the upper leaf The node is available and the width of the upper leaf node is smaller than the width of the current node, then the condition condA is established, otherwise the condA is not established.
  • An embodiment of the present invention may determine a context model of an MTT partition flag according to a type of a coding tree, and use a different context model for the MTT partition flag of the luma coding tree and the partition flag of the chroma coding tree to improve the MTT partition flag. Coding efficiency.
  • An embodiment of the present invention provides a context model determining method for dividing a flag bit, which is applied to a video encoding device or a video decoding device.
  • the node in the coding tree that is determined to be divided is called the current node.
  • the division flag is used to indicate whether the current node continues to divide.
  • the division flag bit in the present invention may be an MTT division flag bit, such as mtt_split_cu_flag in VVC draft 2; the MTT division flag bit is 1 indicating that the current node is divided into child nodes by using one of a binary tree division manner or a tri-tree division manner; The MTT division flag bit is 0, indicating that the current node is not divided, and becomes a coding unit CU in the QT-MTT coding tree.
  • the division flag bit in the present invention may also be a QT division flag bit, such as qt_split_cu_flag in VVC draft 2.
  • a context model determining method for dividing a flag bit includes:
  • the 1901. Determine a first model number according to a width and a height of the current node, a height of the first leaf node, and a width of the second leaf node.
  • the first leaf node is adjacent to the current node in the first direction.
  • the second leaf node is adjacent to the current node in a second direction, the first direction is perpendicular to the second direction, and the first leaf node and the second leaf node are reconstructed leaf nodes .
  • the first direction is, for example, the left side of the current node
  • the second direction is, for example, the upper side of the current node.
  • this step may be referred to the method in the prior art or the method for determining the context model for dividing the flag bits provided in the foregoing embodiments, and details are not described herein; for example, the method for determining the context model for dividing the flag bits in HEVC may be used. Or a method of determining a context model for dividing a flag bit in the VVC draft 2 version; or, for example, a method of determining a context model for dividing a flag bit as described in FIG. 5, FIG. 7, and FIGS. 9 to 14 . That is to say, the first model number obtained in this step may be the number of the context model determined in the foregoing method.
  • the type of the coding tree described by the current node may be a chroma coding tree, a luma coding tree or a luma chroma joint tree.
  • the manner of determining the second model number or the second model number may be different according to the type of the coding tree to which the current node belongs.
  • determining that the second model number is a first value, and the first value is a preset positive integer may be three. 6, 6, 9, 12, 13, etc.
  • the second model number is determined according to the magnitude relationship between the MTT depth of the current node and the MTT depth threshold ThD. .
  • determining that the second model number is a second value, and the second value is a non-negative integer may be 0, 1, or 2 or the like; or if the MTT depth of the current node is greater than or equal to the MTT depth threshold ThD, determining that the second model number is a third value, and the third value is a non-negative integer, for example, may be 3 , 4, or 5, etc.; wherein the first value, the second value, and the third value are different from each other; for example, the second value may be 0, the third value may be 3, and the first value may be 6. .
  • the maximum MTT depth MaxMttDepth corresponding to the current node is determined by a max_mtt_hierarchy_depth_intra_slices syntax element in a Sequence Parameter Set (SPS); if the current node is a P frame or For a node in a B frame, the current node corresponding maximum MTT depth MaxMttDepth is determined by the max_mtt_hierarchy_depth_inter_slices syntax element in the sequence parameter set.
  • SPS Sequence Parameter Set
  • the second model number if the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, determining the second model number according to a product of an MTT depth of the current node and a preset constant P1; For example, the product can be determined directly as the second model number. In some embodiments, considering the range of values of the second model number, it may be considered to set an upper limit value of the second model number, that is, when the product is greater than the upper limit value, the upper limit value is determined.
  • the second model number is numbered; for example, in one embodiment, the upper limit value is set to 6, ie if the product is greater than 6, the second model number is 6.
  • the foregoing first value may be set to an integer greater than or equal to 9.
  • the preset constant P1 is a positive integer, for example, P1 is equal to 3.
  • the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, determining the second model according to the size relationship between the area of the current node and the first preset area threshold ThA1. Numbering.
  • the second model number is a fourth value, and the fourth value is a non-negative integer, for example, may be 0, 1, Or 2 or the like; or if the area of the current node is less than or equal to the first preset area threshold ThA1, determining that the second model number is a fifth value, and the fifth value is a non-negative integer, for example, 3, 4, or 5, etc.; the first value, the fourth value, and the fifth value are different from each other, for example, the fourth value may be 0, the fifth value may be 3, and the first value may be 6.
  • the area of the current node can be calculated by the product of the width and height of the image block contained in the current node. If the current node is a node in a luma coding tree or a luma chroma joint tree, the image block included in the current node is a luma block, and the area of the current node is the product of the width and height of the luma block; if the current node is chroma coded The node in the tree, the current node contains the image block as a chroma block, and the area of the current node is the product of the width and height of the chroma block. In addition, the area of the current node can also be calculated by the product of the width and height of the image area corresponding to the current node. The current node corresponds to a 16x16 image area, and its area is 256.
  • the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, according to the area of the current node and the second preset area threshold ThA2 and the third preset area threshold ThA3
  • the size relationship of at least one of the plurality determines the second model number, and the second preset area threshold ThA2 is greater than the third preset area threshold ThA3.
  • the second model number is a sixth value, and the sixth value is a non-negative integer, for example, may be 0, 1, or 2 And the like; or if the area of the current node is greater than the third area threshold ThA3 and less than or equal to the second area threshold ThA2, determining that the second model number is a seventh value, and the seventh value is non a negative integer, for example, may be 3, 4, or 5, etc.; or if the area of the current node is less than or equal to the third area threshold ThA3, determining that the second model number is an eighth value, the eighth The value is a non-negative integer, for example, may be 6, 7, or 8, etc.; wherein the first value, the sixth value, the seventh value, and the eighth value are different from each other, for example, the sixth value may be 0, and the seventh value The value can be 3, the eighth value can be 6, and the first value can be 9.
  • step 1901 and step 1902 have no sequence in execution, that is, the execution of step 1902 may be performed before step 1901, or after step 1901, or simultaneously with step 1901.
  • the sum of the first model number and the second model number may be directly added as the number of the context model of the partition flag of the current node, thereby determining the context model of the partition flag of the current node according to the number.
  • the method may be specifically performed by an entropy coding unit.
  • the entropy coding unit may encode the bit of the context model according to the context model, and then write the coded bit. Into the stream.
  • the method may be specifically performed by an entropy decoding unit. After the entropy decoding unit determines the context model of the partition flag of the current node, the code stream may be decoded according to the context model. Thereby, the value of the bit corresponding to the divided flag bit is obtained, and the value of the divided flag bit is determined by the value of the bit, thereby determining whether it is necessary to continue dividing the current node according to the value of the divided flag bit.
  • the embodiment may determine the context model of the partition flag of the current node according to the type of the coding tree to which the current node belongs, so that the chroma coding tree and the non-chroma coding tree (ie, the luma coding tree or the luma color) may be used.
  • the degree of joint tree adopts different context models, so that the determined context model can adapt to the chroma coding tree and the non-chroma coded tree, thereby improving the compression efficiency.
  • the step 1902 that is, determining the second model number according to the type of the coding tree to which the current node belongs may specifically include: according to the type of the coding tree to which the current node belongs And determining, according to the magnitude relationship between the MTT depth of the current node and the MTT depth threshold ThD, determining the second model number.
  • the value or determination of the MTT depth threshold ThD can be referred to the foregoing description.
  • the MTT depth of the current node is smaller than the MTT depth threshold ThD, and the second model number is determined to be a ninth value, and the ninth value is non.
  • a negative integer for example, may be 6, 7, or 8, etc.; or if the coding tree to which the current node belongs is a chroma coding tree, and the MTT depth of the current node is greater than or equal to the MTT depth threshold ThD, determining The second model number is a tenth value, and the tenth value is a non-negative integer, for example, may be 9, 10, or 11 or the like; or if the coding tree to which the current node belongs is a luma coding tree or luma chrominance a joint tree, where the MTT depth of the current node is smaller than the MTT depth threshold ThD, determining that the second model number is an eleventh value, and the eleventh value is a non-negative integer, for example, may be 0, 1 or 2 And the like; or if the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, and the MTT depth of the current node is greater than or equal to
  • the embodiment may determine the context model of the partition flag of the current node according to the type of the coding tree to which the current node belongs, so that the chroma coding tree and the non-chroma coding tree (ie, the luma coding tree or the luma color) may be used.
  • the degree of joint tree adopts different context models, so that the determined context model can adapt to the chroma coding tree and the non-chroma coded tree, thereby improving the compression efficiency.
  • FIG. 20 illustrates a structure of a context modeling apparatus for dividing a flag bit according to an embodiment of the present invention.
  • the apparatus may be a video encoder or a video decoder, or the apparatus may be an entropy coding unit in a video encoder, or Is the entropy decoding unit in the video decoder.
  • the device includes:
  • a first model number determining module 2001 configured to determine a first model number according to a width and a height of the current node, a height of the first leaf node, and a width of the second leaf node; the first leaf node is in the first direction
  • the current node is adjacent, the second leaf node is adjacent to the current node in a second direction, the first direction is perpendicular to the second direction, the first leaf node and the second node
  • the leaf node is a reconstructed leaf node.
  • step 1901 For specific implementation, reference may be made to step 1901.
  • the second model number determining module 2002 is configured to determine the second model number according to the type of the coding tree to which the current node belongs.
  • the context model determining module 2003 is configured to determine a context model of the dividing flag bit of the current node according to the first model number and the second model number.
  • the second model number determining module 2002 may be specifically configured to determine that the second model number is the first value when the coding tree to which the current node belongs is a chroma coding tree.
  • the first value is a preset positive integer.
  • the second model number determining module 2002 may be specifically configured to be used according to the current when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree.
  • the magnitude relationship between the MTT depth of the node and the MTT depth threshold ThD determines the second model number.
  • the second model number determining module 2002 may be specifically configured to: when the MTT depth of the current node is less than the MTT depth threshold ThD, determine that the second model number is a second value, the second The value is a non-negative integer; or when the MTT depth of the current node is greater than or equal to the MTT depth threshold ThD, determining that the second model number is a third value, and the third value is a non-negative integer; The first value, the second value, and the third value are different from each other.
  • the MTT depth threshold ThD is determined according to the maximum MTT depth corresponding to the current node, and the specific determination manner may refer to the foregoing description.
  • the second model number determining module 2002 may be specifically configured to be used according to the current when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree.
  • the product of the MTT depth of the node and the preset constant P1 determines the second model number.
  • the product is the second model number; or if the product is greater than 6, the second model number is 6.
  • the first value may be an integer greater than or equal to 9.
  • the second model number determining module 2002 may be specifically configured to be used according to the current when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree.
  • the relationship between the area of the node and the first predetermined area threshold ThA1 determines the second model number.
  • the fourth value is a non-negative integer; or at the current node
  • the area is less than or equal to the first preset area threshold ThA1
  • determining that the second model number is a fifth value is a non-negative integer; the first value, the fourth value, and the fifth Values are different from each other.
  • the second model number determining module 2002 may be specifically configured to: according to the area of the current node when the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree Determining, according to a size relationship of at least one of the second preset area threshold ThA2 and the third preset area threshold ThA3, the second preset area threshold ThA2 is greater than the third preset area threshold ThA3 .
  • the second model number determining module 2002 is specifically configured to: when the area of the current node is greater than the second area threshold ThA2, determine that the second model number is a sixth value, and the sixth value Is a non-negative integer; or when the area of the current node is greater than the third area threshold ThA3 and less than or equal to the second area threshold ThA2, determining that the second model number is a seventh value, the seventh The value is a non-negative integer; or when the area of the current node is less than or equal to the third area threshold ThA3, determining that the second model number is an eighth value, and the eighth value is a non-negative integer; The first value, the sixth value, the seventh value, and the eighth value are different from each other.
  • the second model number determining module 2002 may be specifically configured to: according to a type of a coding tree to which the current node belongs, and a size relationship between an MTT depth of the current node and an MTT depth threshold ThD. And determining the second model number.
  • the second model number determining module 2002 may be specifically configured to: when the coding tree to which the current node belongs is a chroma coding tree, and when the MTT depth of the current node is less than the MTT depth threshold ThD, determine the second The model number is a ninth value, and the ninth value is a non-negative integer; or the coding tree to which the current node belongs is a chroma coding tree, and the MTT depth of the current node is greater than or equal to the MTT depth threshold ThD Determining that the second model number is a tenth value, the tenth value is a non-negative integer; or the coding tree to which the current node belongs is a luma coding tree or a luma chroma joint tree, and the MTT of the current node When the depth is smaller than the MTT depth threshold ThD, determining that the second model number is an eleventh value, the eleventh value is a non-negative integer; or the coding tree to which the current node belongs
  • the values of the first value to the twelfth value may refer to the foregoing description.
  • the values of the respective thresholds can also be referred to the previous description. I will not repeat them here.
  • the embodiment may determine the context model of the partition flag of the current node according to the type of the coding tree to which the current node belongs, so that the chroma coding tree and the non-chroma coding tree (ie, the luma coding tree or the luma color) may be used.
  • the degree of joint tree adopts different context models, so that the determined context model can adapt to the chroma coding tree and the non-chroma coded tree, thereby improving the compression efficiency.
  • each network element such as a video encoding device, a video decoding device, etc.
  • each network element includes hardware structures and/or software modules corresponding to each function.
  • the embodiments of the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functionality for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
  • the embodiment of the present invention may divide a function module of a video encoding device, a video decoding device, and the like 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 process.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 15 is a schematic diagram showing a possible structure of a video encoding device involved in the foregoing embodiment.
  • the video encoding device may include: acquiring The module 30, the condition determination module 31, and the context model determination module 32.
  • the obtaining module 30 may be configured to support the video encoding device to perform S101 and S106 in the foregoing method embodiment;
  • the condition determining module 31 may be configured to support the video encoding device to perform S102 and S107 in the foregoing method embodiment;
  • the context model determining module 32 may use
  • the supporting video encoding apparatus performs S103 (including S103a, S103b or S103c), S105 (including S105a or S105b) and S108 in the above method embodiment. 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.
  • FIG. 16 shows a possible structural diagram of the video encoding apparatus involved in the above embodiment.
  • the video encoding apparatus may include a processing module 40 and a communication module 41.
  • the processing module 40 can be used to control and control the action of the video encoding device, and the processing module 40 can be used to support the video encoding device to perform S102, S103 (including S103a, S103b or S103c), S105 (including S105a or S105b), S107, and S108, and/or other processes for the techniques described herein.
  • the communication module 41 can be used to support communication of the video encoding device with other network entities.
  • the video encoding device may further include a storage module 42 for storing program codes and data of the video encoding device.
  • the processing module 40 may be a processor or a controller (for example, the video encoder 12 shown in FIG. 3 above), and may be, for example, a CPU, a general-purpose processor, a 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 embodiments of the invention.
  • the above processors may also be a combination of computing functions, such as one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 41 may be a transceiver, a transceiver circuit or a communication interface or the like (for example, may be the output interface 13 as shown in FIG. 3 described above).
  • the storage module 42 may be a memory (for example, may be the memory 11 as shown in FIG. 3 described above).
  • the processing module 40 is a processor
  • the communication module 41 is a transceiver
  • the storage module 42 is a memory
  • the processor, the transceiver, and the memory can be connected by a bus.
  • the bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like.
  • FIG. 17 is a schematic diagram showing a possible structure of the video decoding device involved in the foregoing embodiment.
  • the video decoding device may include: Module 50, condition determination module 51 and context model determination module 52.
  • the obtaining module 50 may be configured to support the video decoding device to perform S201 and S207 in the foregoing method embodiment;
  • the condition determining module 51 may be configured to support the video decoding device to perform S202 and S208 in the foregoing method embodiment;
  • the context model determining module 52 may use
  • the supporting video decoding apparatus performs S203 (including S203a, S203b or S203c), S205, S206 (including S206a or S206b) and S209 in the above method embodiment. 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.
  • FIG. 18 shows a possible structural diagram of the video decoding apparatus involved in the above embodiment.
  • the video decoding device may include a processing module 60 and a communication module 61.
  • the processing module 60 can be used to control and control the action of the video decoding device, and the processing module 60 can be used to support the video decoding device to perform S202, S203 (including S203a, S203b or S203c), S204, S205, S206 in the foregoing method embodiment. (Including S206a or S206b), S208, and S209, and/or other processes for the techniques described herein.
  • Communication module 61 can be used to support communication of video decoding devices with other network entities.
  • the video decoding device may further include a storage module 62 for storing program codes and data of the video decoding device.
  • the processing module 60 may be a processor or a controller (for example, the video decoder 21 shown in FIG. 4 above), and may be, for example, a CPU, a general-purpose processor, a 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 embodiments of the invention.
  • the above processors may also be a combination of computing functions, such as one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 61 may be a transceiver, a transceiver circuit or a communication interface or the like (for example, may be the input interface 20 as shown in FIG. 4 above), and the storage module 62 may be a memory.
  • the processing module 60 is a processor
  • the communication module 61 is a transceiver
  • the storage module 62 is a memory
  • the processor, the transceiver, and the memory can be connected by a bus.
  • the bus can be a PCI bus or an EISA bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like.
  • 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 be implemented 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 instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be wired from a website site, computer, server or data center (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website, computer, server or data center.
  • 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 (for example, a floppy disk, a magnetic disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (such as a solid state drives (SSD)).
  • a magnetic medium for example, a floppy disk, a magnetic disk, a magnetic tape
  • an optical medium for example, a digital video disc (DVD)
  • a semiconductor medium such as a solid state drives (SSD)
  • the disclosed system, 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. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • 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 or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. 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 computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or 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 flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.

Abstract

提供一种划分标志位的上下文建模方法及装置,涉及多媒体技术领域,能够更加准确地确定划分标志位的上下文模型,从而提高划分标志位的熵编码的效率。该方法包括:获取当前节点的高度和宽度、第一方向上与当前节点相邻的第一叶节点的高度以及第二方向上与当前节点相邻的第二叶节点的宽度;确定当前节点是否满足第一预设条件以及当前节点是否满足第二预设条件,该第一预设条件为当前节点的高度大于第一叶节点的高度,该第二预设条件为当前节点的宽度大于第二叶节点的宽度;根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型,其中,第一方向与第二方向垂直,第一叶节点和第二叶节点为已重建的叶节点。

Description

划分标志位的上下文建模方法及装置
本申请要求于2018年9月21日提交中国国家知识产权局、申请号为201811109475.9、申请名称为“划分标志位的上下文建模方法及装置”,以及于2018年3月16日提交中国国家知识产权局、申请号为201810219551.5、申请名称为“划分标志位的上下文建模方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及多媒体技术领域,尤其涉及一种划分标志位的上下文建模方法及装置。
背景技术
划分标志位是视频编码和视频解码领域的一种重要的语法元素,可以指示编码树中的节点是否继续再划分为更小的子节点,划分标志位的编码与解码在视频编码和视频解码过程中是不可或缺的。
目前,可以通过熵编码技术实现对划分标志位的编码和解码,具体的,根据划分标志位对应的位元的概率模型,确定位元的概率值,然后对该位元的概率值进行编码和解码,从而实现对划分标志位的编码和解码。以编码或者解码采用四叉树的方法划分编码树单元(coding tree unit,CTU)为例,在确定划分标志位对应的位元的概率模型(也可以称为确定划分标志位的上下文模型)的过程中,首先获取当前节点的四叉树深度(即当前节点的编码树深度,H.265标准中,也可以称为当前节点的四叉树层级)、当前节点的左侧叶节点的四叉树深度以及当前节点的上侧叶节点的四叉树深度,其中,当前节点的左侧叶节点和上侧叶节点均已重建;然后确定当前节点的四叉树深度是否小于左侧叶节点的四叉树深度,以及确定当前节点的四叉树深度是否小于上侧叶节点的四叉树深度;最后,根据前述两个确定步骤的确定结果,确定当前节点对应的位元的概率模型,即确定当前节点的上下文模型的编号。
然而,在上述方法中,在采用二叉树和\或三叉树划分方法时,由于一个节点的高度和宽度不一定相同,根据当前节点的编码树深度是否小于相邻叶节点(如上述的左侧叶节点或上侧叶节点)的编码树深度的方法,并不能准确地确定当前节点是否可以再被划分。
综上所述,可知,采用上述方法确定的当前节点的上下文模型的准确性比较低,如此,导致划分标志位的编码或者解码效率比较低。
发明内容
本申请提供一种划分标志位的上下文建模方法及装置,能够更加准确地确定划分标志位的上下文模型,从而提高划分标志位的熵编码的效率。
为达到上述目的,本申请采用如下技术方案:
第一方面,提供一种划分标志位的上下文建模方法,应用于视频编码设备和视频解码设备,该方法包括:获取当前节点的高度和宽度、第一方向上与当前节点相邻的第一叶节点的高度以及第二方向上与当前节点相邻的第二叶节点的宽度;并且确定当前节点是否满足第一预设条件以及当前节点是否满足第二预设条件,该第一预设条件为当前节点的高度大于第一叶节点的高度,该第二预设条件为当前节点的宽度大于第二叶节点的宽度;并且根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型,其中,第一方向与第二方向垂直,第一叶节点和第二叶节点为已重建的叶节点,划分标志位的上下文模型为划分标志位对应的位元的概率模型。
其中,上述第一叶节点覆盖当前节点第一方向上的一个预设位置,第二叶节点覆盖当前节点第二方向上的一个预设位置。
本申请提供的划分标志位的上下文建模方法,由于通过比较当前节点的高度与第一叶节点的高度,并且比较当前节点的宽度与第二叶节点的宽度,能更加准确地确定当前节点是否再划分,如此,根据满足上述两个预设条件的情况可以更加准确地确定划分标志位的上下文模型,从而能够提高划分标志位的熵编码的效率。
进一步地,在任何一个节点的划分采用了二叉树划分和/或三叉树划分时,可以比较当前节点的高度与第一叶节点的高度,以及比较当前节点的宽度与第二叶节点的宽度,从而更精确地确定当前节点的划分标志位的上下文模型。如此,可以很好地解决,现有技术中使用深度信息确定的当前节点的划分标志位的上下文模型不准确的问题,例如当前节点的深度和第一叶节点的深度相同,但是当前节点的高度远大于第一叶节点的高度,在这种情况下,采用现有技术则更倾向于确定当前节点不需要再继续划分,而实际上由于当前节点的高度比较高,因此当前节点应当进行水平划分的可能性是比较高的。
在第一方面的第一种可选的实现方式中,上述划分标志的上下文模型包括N个,该N个上下文模型的编号依次为0至N-1,N为大于1的整数;上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法具体包括:根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足。
在第一方面的一种可选的实现方式中,上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法具体包括:根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时 表示第二预设条件不满足。
在第一方面的第二种可选的实现方式中,上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型之前,本申请提供的划分标志位的上下文建模方法还包括:根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号。
上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法可以包括:根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
在第一方面的第三种可选的实现方式中,上述根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号的方法可以包括:根据当前节点的高度和宽度获取当前节点的面积,再根据预设的节点面积与子类编号的映射关系,确定划分标志位的上下文模型的子类编号;或者,根据当前节点的高度和宽度,在预设的子类编号查询表中,查询划分标志位的上下文模型的子类编号,该子类编号查询表包括当前节点的高度和宽度,以及当前节点的宽度和高度对应的子类编号。
在第一方面的第四种可选的实现方式中,上述划分标志的上下文模型包括N个,该N个上下文模型的编号依次为0至N-1,N为大于1的整数;上述根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的方法包括:根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA+X*a;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
在第一方面的第四种可选的实现方式中,上述根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的方法包括:根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA+X*a;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
本申请中,可以结合当前节点本身的尺寸,确定当前节点的划分标志位的子类编号,在第一预设条件是否满足和第二预设条件是否满足的基础上,联合划分标志位的上下文模型的子类编号,确定的划分标志位的上下文模型比较准确,如此,可以进一步提高划分标志位的熵编码的效率。
在第一方面的第五种可选的实现方式中,上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型之前,本申请提供的划分标志位的上下文建模方法还可以包括:获取第三方向上与当前节点相邻的第三叶节点的高度,第三方向与第一方向相反,第三叶节点为已重建的叶节点;并且确定当前节点是否满足第三预设条件,该第三预设条件为当前节点的高度大于第三叶节点的高度。
上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法可以包括:根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型。
在第一方面的第六种可选的实现方式中,上述划分标志的上下文模型包括N个,该N个上下文模型的编号依次为0至N-1,N为大于1的整数;上述根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法包括:根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1);其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;n_conR表示第三预设条件是否满足,当n_conR为1时表示第三预设条件满足,当n_conR为0时表示第三预设条件不满足。
本申请中,可以结合与当前节点相邻的又一个叶节点,确定当前节点是否满足第三预设条件,在第一预设条件是否满足和第二预设条件是否满足的基础上,联合第三预设条件是否满足,确定的划分标志位的上下文模型的比较准确,如此,可以进一步提高划分标志位的熵编码的效率。
在第一方面的第七种可选的实现方式中,本申请提供的划分标志位的上下文建模方法还可以包括:根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号。
上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法可以包括:根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
在第一方面的第八种可选的实现方式中,上述根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的方法包括:根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1)+X*a;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足; n_conR表示第三预设条件是否满足,当n_conR为1时表示第三预设条件满足,当n_conR为0时表示第三预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
本申请中,可以结合当前节点本身的尺寸,确定当前节点的划分标志位的子类编号,并且结合与当前节点相邻的又一个叶节点,确定当前节点是否满足第三预设条件,在根据第一预设条件是否满足、第二预设条件是否满足以及第三预设条件是否满足的基础上,联合划分标志位的上下文模型的子类编号,确定的划分标志位的上下文模型更加准确,如此,可以显著提高划分标志位的熵编码的效率。
在第一方面的一种可选的实现方式中,所述第一预设条件还包括所述第一叶节点可得;或所述第二预设条件还包括所述第二叶节点可得。
在第一方面的一种可选的实现方式中,所述当前节点所属的编码树为亮度编码树或亮度色度联合树。
第二方面,提供一种划分标志位的上下文建模装置,该装置包括获取模块、条件确定模块和上下文模型确定模块。其中,获取模块,用于获取当前节点的高度和宽度、第一方向上与当前节点相邻的第一叶节点的高度以及第二方向上与当前节点相邻的第二叶节点的宽度,第一方向与第二方向垂直,第一叶节点和第二叶节点为已重建的叶节点;条件确定模块,用于确定当前节点是否满足第一预设条件以及当前节点是否满足第二预设条件,该第一预设条件为当前节点的高度大于第一叶节点的高度,该第二预设条件为当前节点的宽度大于第二叶节点的宽度;上下文模型确定模块,用于根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型,该划分标志位的上下文模型为划分标志位对应的位元的概率模型。
其中,第一叶节点覆盖当前节点第一方向上的一个预设位置,第二叶节点覆盖当前节点第二方向上的一个预设位置。
在第二方面的第一种可选的实现方式中,上述划分标志的上下文模型包括N个,该N个上下文模型的编号依次为0至N-1,N为大于1的整数,上下文模型确定模块,具体用于根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:xInc=n_conL+n_conA;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足。
在第二方面的第二种可选的实现方式中,上述条件确定模块,还用于在上下文模型确定模块根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型之前,根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号;上述上下文模型确定模块,具体用于根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
在第二方面的第三种可选的实现方式中,上述上下文模型确定模块,具体用于根据当前节点的高度和宽度获取当前节点的面积,再根据预设的节点面积与子类编号的 映射关系,确定划分标志位的上下文模型的子类编号;或者,该上下文模型确定模块,具体用于根据当前节点的高度和宽度,在预设的子类编号查询表中,查询划分标志位的上下文模型的子类编号,该子类编号查询表包括当前节点的高度和宽度,以及当前节点的宽度和高度对应的子类编号。
在第二方面的第四种可选的实现方式中,上述划分标志的上下文模型包括N个,该N个上下文模型的编号依次为0至N-1,N为大于1的整数,上述上下文模型确定模块,具体用于根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA+X*a;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
在第二方面的一种可选的实现方式中,上述上下文模型确定模块,具体用于根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA+X*a;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
在第二方面的第五种可选的实现方式中,上述获取模块,还用于在根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型之前,获取第三方向上与当前节点相邻的第三叶节点的高度,第三方向与第一方向相反,第三叶节点为已重建的叶节点;上述条件确定模块,还用于确定当前节点是否满足第三预设条件,该第三预设条件为当前节点的高度大于第三叶节点的高度;上述上下文模型确定模块,具体用于根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型。
在第二方面的第六种可选的实现方式中,上述划分标志的上下文模型包括N个,该N个上下文模型的编号依次为0至N-1,N为大于1的整数,上述上下文模型确定模块,具体用于根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1);其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;n_conR表示第三预设条件是否满足,当n_conR为1时表示第三预设条 件满足,当n_conR为0时表示第三预设条件不满足。
在第二方面的一种可选的实现方式中,上述上下文模型确定模块,具体用于根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1);其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;n_conR表示第三预设条件是否满足,当n_conR为1时表示第三预设条件满足,当n_conR为0时表示第三预设条件不满足。
在第二方面的第七种可选的实现方式中,上述上下文模型确定模块,还用于根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号;上述上下文模型确定模块,具体用于根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
在第二方面的第八种可选的实现方式中,上述上下文模型确定模块,具体用于根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型的编号,该划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1)+X*a;其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;n_conR表示第三预设条件是否满足,当n_conR为1时表示第三预设条件满足,当n_conR为0时表示第三预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
在第二方面的一种可选的实现方式中,所述第一预设条件还包括所述第一叶节点可得;或所述第二预设条件还包括所述第二叶节点可得。
在第二方面的一种可选的实现方式中,所述当前节点所属的编码树为亮度编码树或亮度色度联合树。
第三方面,提供了一种划分标志位的上下文建模方法,应用于视频编码设备或视频解码设备,所述方法包括:根据当前节点的宽度和高度,第一叶节点的高度以及第二叶节点的宽度,确定第一模型编号;所述第一叶节点在第一方向上与所述当前节点相邻,所述第二叶节点在第二方向上与所述当前节点相邻,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点;根据所述当前节点所属的编码树的类型,确定第二模型编号;根据所述第一模型编号以及所述第二模型编号,确定所述当前节点的划分标志位的上下文模型。
从上可知,本实施方式可以根据当前节点所属的编码树的类型来确定当前节点的划分标志位的上下文模型,从而可以对色度编码树和非色度编码树(即亮度编码树或亮度亮度色度联合树)采用不同的上下文模型,使得确定的上下文模型能够适配色度 编码树和非色度编码树,从而提高了压缩效率。
结合第三方面,在可能的实施方式中,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:如果所述当前节点所属的编码树为色度编码树,确定所述第二模型编号为第一值,所述第一值为预设正整数。
结合第三方面,在可能的实施方式中,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的MTT深度与MTT深度阈值ThD的大小关系确定所述第二模型编号。
结合第三方面,在可能的实施方式中,如果所述当前节点的MTT深度小于所述MTT深度阈值ThD,则确定所述第二模型编号为第二值,所述第二值为非负整数;或如果所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,则确定所述第二模型编号为第三值,所述第三值为非负整数;所述第一值,第二值和第三值互不相同。
结合第三方面,在可能的实施方式中,所述MTT深度阈值ThD根据所述当前节点对应的最大MTT深度确定。
结合第三方面,在可能的实施方式中,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的MTT深度与预设常数P1的乘积确定所述第二模型编号。
结合第三方面,在可能的实施方式中,所述乘积为所述第二模型编号;或如果所述乘积大于6,所述第二模型编号为6。
结合第三方面,在可能的实施方式中,所述第一值大于或等于9。
结合第三方面,在可能的实施方式中,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的面积与第一预设面积阈值ThA1大小关系确定所述第二模型编号。
结合第三方面,在可能的实施方式中,如果所述当前节点的面积大于所述第一预设面积阈值ThA1,确定所述第二模型编号为第四值,所述第四值为非负整数;或如果所述当前节点的面积小于或等于所述第一预设面积阈值ThA1,确定所述第二模型编号为第五值,所述第五值为非负整数;所述第一值、第四值和第五值互不相同。
结合第三方面,在可能的实施方式中,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的面积与第二预设面积阈值ThA2以及第三预设面积阈值ThA3中的至少一个的大小关系确定所述第二模型编号,所述第二预设面积阈值ThA2大于所述第三预设面积阈值ThA3。
结合第三方面,在可能的实施方式中,如果所述当前节点的面积大于所述第二面积阈值ThA2,确定所述第二模型编号为第六值,所述第六值为非负整数;或如果所述当前节点的面积大于所述第三面积阈值ThA3且小于或等于所述第二面积阈值ThA2,确定所述第二模型编号为第七值,所述第七值为非负整数;或如果所述当前节点的面积小于或等于所述第三面积阈值ThA3,确定所述第二模型编号为第八值,所述第八值 为非负整数;所述第一值、第六值、第七值和第八值互不相同。
结合第三方面,在可能的实施方式中,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:根据所述当前节点所属的编码树的类型,以及所述当前节点的MTT深度与MTT深度阈值ThD的大小关系,确定所述第二模型编号。
结合第三方面,在可能的实施方式中,如果所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度小于所述MTT深度阈值ThD,确定第二模型编号为第九值,所述第九值为非负整数;或如果所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,确定所述第二模型编号为第十值,所述第十值为非负整数;或如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度小于所述MTT深度阈值ThD,确定所述第二模型编号为第十一值,所述第十一值为非负整数;或如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,确定所述第二模型编号为第十二值,所述第十二值为非负整数;所述第九值、第十值、第十一值和所述第十二值互不相同。
第四方面,提供了一种划分标志位的上下文建模装置,包括:第一模型编号确定模块,用于根据当前节点的宽度和高度,第一叶节点的高度以及第二叶节点的宽度,确定第一模型编号;所述第一叶节点在第一方向上与所述当前节点相邻,所述第二叶节点在第二方向上与所述当前节点相邻,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点;第二模型编号确定模块,用于根据所述当前节点所属的编码树的类型,确定第二模型编号;上下文模型确定模块,用于根据所述第一模型编号以及所述第二模型编号,确定所述当前节点的划分标志位的上下文模型。
从上可知,本实施方式可以根据当前节点所属的编码树的类型来确定当前节点的划分标志位的上下文模型,从而可以对色度编码树和非色度编码树(即亮度编码树或亮度色度联合树)采用不同的上下文模型,使得确定的上下文模型能够适配色度编码树和非色度编码树,从而提高了压缩效率。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为色度编码树时,确定所述第二模型编号为第一值,所述第一值为预设正整数。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的MTT深度与MTT深度阈值ThD的大小关系确定所述第二模型编号。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于:在所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定所述第二模型编号为第二值,所述第二值为非负整数;或在所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第三值,所述第三值为非负整数;所述第一值,第二值和第三值互不相同。
结合第四方面,在可能的实施方式中,所述MTT深度阈值ThD根据所述当前节点对应的最大MTT深度确定。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的MTT深度与预设常数P1的乘积确定所述第二模型编号。
结合第四方面,在可能的实施方式中,所述乘积为所述第二模型编号;或如果所述乘积大于6,所述第二模型编号为6。
结合第四方面,在可能的实施方式中,所述第一值大于或等于9。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的面积与第一预设面积阈值ThA1大小关系确定所述第二模型编号。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于:在所述当前节点的面积大于所述第一预设面积阈值ThA1时,确定所述第二模型编号为第四值,所述第四值为非负整数;或在所述当前节点的面积小于或等于所述第一预设面积阈值ThA1时,确定所述第二模型编号为第五值,所述第五值为非负整数;所述第一值、第四值和第五值互不相同。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的面积与第二预设面积阈值ThA2以及第三预设面积阈值ThA3中的至少一个的大小关系确定所述第二模型编号,所述第二预设面积阈值ThA2大于所述第三预设面积阈值ThA3。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于:在所述当前节点的面积大于所述第二面积阈值ThA2时,确定所述第二模型编号为第六值,所述第六值为非负整数;或在所述当前节点的面积大于所述第三面积阈值ThA3且小于或等于所述第二面积阈值ThA2时,确定所述第二模型编号为第七值,所述第七值为非负整数;或在所述当前节点的面积小于或等于所述第三面积阈值ThA3时,确定所述第二模型编号为第八值,所述第八值为非负整数;所述第一值、第六值、第七值和第八值互不相同。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于根据所述当前节点所属的编码树的类型,以及所述当前节点的MTT深度与MTT深度阈值ThD的大小关系,确定所述第二模型编号。
结合第四方面,在可能的实施方式中,所述第二模型编号确定模块具体用于:在所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定第二模型编号为第九值,所述第九值为非负整数;或在所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第十值,所述第十值为非负整数;或在所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定所述第二模型编号为第十一值,所述第十一值为非负整数;或在所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第十二值,所述第十二值为非负整数;所述第九值、第十值、第十一值和所述第十 二值互不相同。
在第一方面和第二方面,第三方面和第四方面中,上述第一方向为水平向左的方向,上述第二方向为竖直向上的方向。
第五方面,本申请提供一种划分标志位的上下文建模装置,该装置可以包括处理器和与该处理器耦合连接的存储器。该存储器用于存储计算机指令,当该装置运行时,处理器执行该存储器存储的计算机指令,以使得该装置执行上述第一方面及其各种可选的实现方式中任意之一所述的划分标志位的上下文建模方法。
第六方面,本申请提供一种划分标志位的上下文建模装置,该装置可以包括处理器和与该处理器耦合连接的存储器。该存储器用于存储计算机指令,当该装置运行时,处理器执行该存储器存储的计算机指令,以使得该装置执行上述第三方面及其各种可选的实现方式中任意之一所述的划分标志位的上下文建模方法。
第七方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质中包括计算机指令,当该计算机指令在计算机上运行时,使得该计算机执行第一方面及其各种可选的实现方式中任意之一所述的划分标志位的上下文建模方法。
第八方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质中包括计算机指令,当该计算机指令在计算机上运行时,使得该计算机执行第三方面及其各种可选的实现方式中任意之一所述的划分标志位的上下文建模方法。
第九方面,本申请提供一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行第一方面及其各种可选的实现方式中任意之一所述的划分标志位的上下文建模方法。
第十方面,本申请提供一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行第三方面及其各种可选的实现方式中任意之一所述的划分标志位的上下文建模方法。
第十一方面,提供了一种视频解码器,包括如第二方面及其各种可选的实现方式中任一所述的上下文建模装置。
第十二方面,提供了一种视频解码器,包括如第四方面及其各种可选的实现方式中任一所述的上下文建模装置。
第十三方面,提出一种视频解码器,包括用于执行如第一方面或第一方面任何可能实施例的方法的执行电路。
第十四方面,提出一种视频解码器,包括用于执行如第三方面或第三方面任何可能实施例的方法的执行电路。
第十五方面,提出一种视频编码器,包括用于执行如第一方面或第一方面任何可能实施例的方法的执行电路。
第十六方面,提出一种视频编码器,包括用于执行如第三方面或第三方面任何可能实施例的方法的执行电路。
第二方面至第五方面的相关内容和技术效果的描述可以参见上述对第一方面及其各种可选的实现方式的相关内容和技术效果的相关描述,此处不再赘述。
附图说明
图1为本发明实施例提供的一种节点划分结果示意图;
图2为本发明实施例提供的一种视频数据编码和视频数据解码的方法示意图;
图3为本发明实施例提供的一种视频编码设备硬件示意图;
图4为本发明实施例提供的一种视频解码设备硬件示意图;
图5为本发明实施例提供的划分标志位的上下文建模方法示意图一;
图6为本发明实施例提供的一种节点为位置示意图二;
图7为本发明实施例提供的划分标志位的上下文建模方法示意图二;
图8为本发明实施例提供的一种节点面积与子类编号的映射关系示意图;
图9为本发明实施例提供的划分标志位的上下文建模方法示意图三;
图10为本发明实施例提供的划分标志位的上下文建模方法示意图四;
图11为本发明实施例提供的划分标志位的上下文建模方法示意图五;
图12为本发明实施例提供的划分标志位的上下文建模方法示意图六;
图13为本发明实施例提供的划分标志位的上下文建模方法示意图七;
图14为本发明实施例提供的划分标志位的上下文建模方法示意图八;
图15为本发明实施例提供的视频编码设备的结构示意图一;
图16为本发明实施例提供的视频编码设备的结构示意图二;
图17为本发明实施例提供的视频解码设备的结构示意图一;
图18为本发明实施例提供的视频解码设备的结构示意图二;
图19为本发明实施例提供的划分标志位的上下文建模方法示意图九;
图20为本发明实施例提供的划分标志位的上下文建模装置示意图。
具体实施方式
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本发明实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一方向和第二方向等是用于区别不同的方向,而不是用于描述方向的特定顺序,第一预设条件和第二预设条件等是用于区别不同的预设条件,而不是用于描述预设条件的特定顺序。
在本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本发明实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个编码单元是指两个或两个以上的编码单元;多个处理单元是指两个或两个以上的处理单元。
首先对本发明实施例提供的一种划分标志位的上下文建模(context modeling)方法及装置中涉及的一些概念做解释说明。
CTU:编码树单元,是视频编码或者视频解码过程中的基本单元,CTU对应视频数据中的一个视频帧(即一幅图像)中的一个方形图像块,即一幅图像可以包括一个 或多个CTU,示例性的,CTU的尺寸可以为64*64,即64*64的CTU包含由64行、64列像素组成的矩形像素点阵,CTU的尺寸还可以为128*128或者256*256等等。
CU:编码单元,是CTU经过划分之后产生的叶节点,即编码树上不再划分的节点,一个CU对应一个矩形的图像块,CU的宽度和高度也可以使用像素的数量来表示;例如,CU的宽度可以为256、128、64、32、8或4个像素等等,CU的高度也可以为256、128、64、32、8或4个像素等等;其中,CU的高度和宽度可以相等,也可以不相等;例如,在采用四叉树划分时,CU的高度和宽度是相等的,但是在采用二叉树和/或三叉树划分时,CU的高度和宽度是不一定相等的。
在视频编码过程中,以视频数据的一个视频帧(也可以称为一幅图像)为例,视频编码设备以CU为编码单位,按照一定的编码规则完成一个CTU包括的所有CU的编码,进而完成一幅图像的多个CTU的编码,得到码流;在视频数据解码的过程中,解码设备按照与编码过程中对应的解码规则,完成一个CTU包括的多个CU的重建(包括预测、反量化、反变换以及滤波等解码处理),进而完成一幅图像的多个CTU的重建,得到重建后的图像。
本发明实施例中,CTU和CU都是编码树上的节点,CTU为根节点,CTU经过划分得到一定数量的节点,进一步,CTU经过一次划分得到的节点中的部分或者全部节点还可以继续划分为尺寸更小的节点,以此类推,直至所有的节点都不需要再划分,将最终不需要再划分的节点称为叶节点,即叶节点为编码树末端不需要再划分的节点,通常一个叶节点对应一个CU。
在视频数据的编码和解码领域,将节点划分为子节点的方法包括四叉树划分、二叉树划分或三叉树划分等等。其中,四叉树划分指的是将节点划分为尺寸相等的四个子节点,如图1中的(a)为四叉树划分的示意图;二叉树划分指的是将一个节点划分为两个尺寸相等的子节点,具体的,可以采用水平二叉树划分或者竖直二叉树划分,例如图1中的(b)为水平二叉树划分的示意图,图1中的(c)为竖直二叉树划分的示意图;三叉树划分指的是将一个节点划分为三个子节点,具体的,可以采用水平三叉树划分或者竖直三叉树划分,其中,对于水平三叉树划分,对应上、中、下的三个区域的高度占当前被划分节点高度的比例为1/4,1/2,1/4,相应地,对于竖直三叉树划分,对应左、中、右的三个区域的宽度占当前被划分节点宽度的比例为1/4,1/2,1/4,如图1中的(d)为水平三叉树划分的示意图,图1中的(e)为竖直三叉树划分的示意图。
其中,在CTU的划分过程中,可以选择四叉树划分、三叉树划分和二叉树划分中的任意一种或多种。例如,在一种实施方式中,可以采用四叉树和二叉树级联的划分方法,即CTU先进行四叉树划分获得四个节点,若获得的该四个节点中的一个或多个节点需要继续划分,则采用二叉树的划分方法将需要继续划分的节点划分为更小的节点。
需要说明的是,上述CTU中还包括一些语法元素,例如用于指示采用哪种划分方式对节点进行划分的划分模式信息,语法元素还包括用于指示每一个节点是否继续划分的标志位。其中,每一个节点对应一个是否再划分的标志位,以下实施例中,指示一个节点是否再划分的标志位称为划分标志位。其中,如果一个节点的尺寸已经是节 点允许划分成的最小尺寸,则该节点已经不能够再继续划分,则此时不需要在语法元素中包括指示该节点是否再划分的标志位,解码端也可以根据该节点的尺寸直接确定该节点不需要继续划分。
划分标志位:用于指示与该划分标志位对应的节点是否需要再划分为尺寸更小的节点,在视频数据的编码过程中,视频编码设备对一个节点对应的图像块进行编码得到一段码流,并且视频编码设备将该节点的划分标志位也进行编码,并将编码后的划分标志位的也写入码流,如此,解码设备在解码视频数据时,解码设备通过解析码流,得到节点的划分标志位,从而完成该节点对应的图像的重建。
本发明实施例中,可以采用“0”表示一个节点继续划分,也可以采用“1”表示一个节点继续划分,具体可以根据实际情况选择合适的标识用来表示节点继续划分,本发明实施例不作限定。
同理,可以采用“0”表示一个节点不需要再继续划分,也可以采用“1”表示一个节点不需要再继续划分,具体可以根据实际情况选择合适的标识用来表示节点不需要再继续划分,本发明实施例不作限定。
需要说明的是,本发明实施例中,如果采用“1”表示一个节点继续划分,那么可以采用“0”表示一个节点不需要再继续划分。
基于背景技术中存在的问题,本发明实施例提供一种划分标志位的上下文建模方法及装置,(视频编码设备或者视频解码设备)可以通过当前节点的宽度和高度,以及与当前节点相邻的第一叶节点的高度以及与当前节点相邻的第二叶节点的宽度,确定当前节点的划分标志位的上下文模型,能够更加准确地确定划分标志位的上下文模型,从而提高划分标志位的熵编码的效率。
本发明实施例提供的划分标志位的上下文建模方法及装置可以应用于对视频数据编码或者对视频数据解码的场景中,具体的,可以应用于视频数据编码过程中对划分标志位进行编码的场景,或者应用于视频数据解码过程中对划分标志位进行解码的场景中。该方法可以应用于具有编码和\或解码功能的设备,本发明实施例中,将对视频数据编码的设备称为视频编码设备,将对视频数据解码的设备称为视频解码设备。视频编码设备获取到视频数据之后,视频编码设备对该视频数据编码,可以将该视频数据压缩为码流(即编码后的视频数据),然后将该视频数据发送给其他设备(例如视频解码设备);视频解码设备获取到编码后的视频数据,该视频编码设备可以对该视频数据解码,恢复该视频数据的完整信息。
下面,以视频数据的一个视频帧中的一个图像块为例,说明视频数据编码和视频数据解码的简要过程,如图2所示,视频编码设备可以将该图像块进行编码(经过预测、变换、量化、熵编码等处理),得到编码后的图像块,并且编码设备将该图像块的语法元素(例如划分标志位)进行相应的编码,该编码后的语法元素和编码后的图像块组成编码信息(即码流),视频数据的编码信息包含了编码后的图像数据及编码后的语法元素。解码设备接收到编码信息之后,解码设备对该编码信息中的编码后的语法元素解码(经过预测、反量化,反变换等处理),然后解码设备基于从编码信息提取的语法元素来重建该图像块,即视频解码设备基于与该图像块相关联的语法元素和编码后的图像块,得到该图像块的预测性像素块。
本发明实施例提供的划分标志位的上下文建模方法可以应用于视频编码设备或视频解码设备中,视频编码设备和视频解码设备均可以为台式计算机、移动计算装置、笔记本(例如膝上型)计算机、平板计算机、机顶盒、智能电话等手持机、电视、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机、虚拟现实设备、增强现实设备,或其他类似的设备。
下面结合图3具体介绍本发明实施例提供的视频编码设备的各个构成部件。如图3所示,本发明实施例提供的视频编码设备包括:视频俘获装置10、视频存储器11、视频编码器12和输出接口13等部件。本领域技术人员可以理解,图3中示出的视频编码设备的结构并不构成对视频编码设备的限定,其可以包括比如图3所示的部件更多或更少的部件,或者可以组合如图3所示的部件中的某些部件,或者可以与如图3所示的部件布置不同。
视频俘获装置10:即获取视频数据的装置,视频俘获装置可以为视频相机。
视频存储器11:可以存储由视频俘获装置俘获的视频数据,也可以由视频编码器12对视频数据编码后的码流。
视频编码器12:可以根据编码标准(例如H.264)将视频俘获装置获取的视频数据经过编码后转化为机器可以识别的代码,以将视频数据压缩,有利于视频数据的传输和存储。视频编码器12可以为中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application-specific integrated circuit,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合,其可以实现或执行本发明实施例公开的内容所描述的各种示例性的逻辑方框,模块和电路;视频编码器12也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。
输出接口13:用于向其他设备发送数据的接口电路,输出接口13可以为收发器、收发电路等具有收发功能的结构,包括调制器/解调器(调制解调器)及/或发射器,在视频编解码系统中,输出接口13可以将编码后的视频数据发送给视频解码设备。
可选的,如图3所示的视频编码设备还可以包括无线保真(wireless gidelity,WiFi)模块、蓝牙模块等,在此不再赘述。
下面结合图4具体介绍本发明实施例提供的视频解码设备的各个构成部件。如图4所示,本发明实施例提供的视频解码设备包括:输入接口20、视频解码器21和显示装置22等部件。本领域技术人员可以理解,图4中示出的视频解码设备的结构并不构成对视频解码设备的限定,其可以包括比如图4所示的部件更多或更少的部件,或者可以组合如图4所示的部件中的某些部件,或者可以与如图4所示的部件布置不同。
输入接口20用于接收其他设备(例如视频编码设备)发送的数据,输入接口20可以为接收器及/或调制解调器。在视频编解码系统中,输入接口20可以接收编码设备发送的编码后的视频数据。
视频解码器21可以将其接收的编码后的视频数据还原解码,即解压缩,从而可以使得解码后的视频数据在显示装置中播放。视频解码器21可以为CPU,通用处理器,DSP,ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任 意组合,其可以实现或执行本发明实施例公开的内容所描述的各种示例性的逻辑方框,模块和电路;视频解码器21也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。
显示装置22用于显示解码后的视频数据,显示装置可以包括多种显示装置,例如液晶显示器(liquid crystal display,LCD)、等离子体显示器、有机发光二极管(organic light-emitting diode,OLED)显示器或其它类型的显示装置。可选的,显示装置22可以整合在视频解码设备中,显示装置22也可以与视频解码设备独立,设置于视频解码设备外部。
在视频数据的编码或者解码过程中,划分标志位是一种非常重要的语法元素,划分标志位的上下文建模也比较重要,下面从视频数据编码场景中对划分标志位的编码和视频数据解码的场景中对划分标志位的解码的角度分别介绍本发明实施例提供的划分标志位的上下文建模方法。其中,当前节点的划分标志位用于指示当前节点是否需要进行划分。
首先,如图5所示,在对划分标志位进行编码的过程中,本发明实施例提供的划分标志位的上下文建模方法可以包括S101-S104:
S101、视频编码设备获取当前节点的高度和宽度、第一方向上与当前节点相邻的第一叶节点的高度以及第二方向上与当前节点相邻的第二叶节点的宽度。
其中,第一方向与第二方向垂直,上述第一叶节点和第二叶节点为已重建的叶节点,即第一叶节点和第二叶节点已经完成编码。例如,第一方向可以为水平向左或水平向右,则第二方向可以为竖直向上或竖直向下。
其中,当前节点的高度与第一叶节点的高度指的是:当前节点与该第一叶节点的相邻接的边在同一方向上的度量;当前节点的宽度与第二叶节点的宽度指的是:当前节点与该第二叶节点的相邻接的边在同一方向上的度量。
可选的,上述第一方向可以为水平向左,第二方向可以为竖直向上,如图6所示,可见,第一方向是竖直指向当前节点的上侧的方向,第二节点是水平指向当前节点左侧的方向,如果第一方向为水平向左,那么第一叶节点为当前节点左侧的一个相邻的叶节点,该第一叶节点也可以称为左侧叶节点;如果第二方向为竖直向上,那么第二叶节点为当前节点上侧的一个相邻的叶节点,该第二叶节点也可以称为上侧叶节点。
上述第一叶节点覆盖当前节点第一方向上的一个预设位置,第二叶节点覆盖当前节点第二方向上的一个预设位置,结合图6,上述确定第一叶节点的方法可以为:将覆盖当前节点左侧一个预设位置,并且位于当前节点左侧的至少一个叶节点中的任意一个叶节点确定为第一叶节点,其中,该预设位置可以为当前节点的左侧距离当前节点预设距离的区域S1中的任意一个位置,该距离可以小于或者等于一个CU的宽,例如该预设距离可以为4或者8等其他数值。示例性的,若当前节点的宽度为M,高度为N,预设距离为1,当前节点的左上角像素对应的坐标为(x,y),则该预设位置可以为S1中的坐标为(x-1,y)的位置P1,或者可以坐标为(x-1,y+N-1)的位置P2,还可以为坐标为(x-1,y+N/2)的位置P3,上述预设位置可以为S1中的其他位置,具体根据实际情况选择,本发明实施例中不作限定。
同理,结合图6,上述确定第二叶节点的方法可以为:将覆盖当前节点上侧一个 预设位置的叶节点确定为第二叶节点,其中,该预设位置可以为当前节点的上侧距离当前节点预设距离的区域S2中的任意一个位置,示例性的,若当前节点的宽度为M,高度为N,预设距离为1,当前节点的左上角像素对应的坐标为(x,y),则该预设位置可以为S2中的坐标为(x,y-1)的位置P4,或者可以坐标为(x+M/2,y-1)的位置P5,上述预设位置还可以为S2中其他位置,具体根据实际情况选择,本发明实施例中不作限定。
需要说明的是,本发明实施例中,第一方向也可以为水平向右,如此,第一叶节点为右侧叶节点;第二方向也可以为竖直向下,如此,第二叶节点为下侧叶节点,具体的,可以根据实际的编码规则,确定第一方向和第二方向,从而确定第一叶节点和第二叶节点,本发明实施例不作限定。
S102、视频编码设备确定当前节点是否满足第一预设条件以及该当前节点是否满足第二预设条件。
其中,第一预设条件为当前节点的高度大于第一叶节点的高度,第二预设条件为当前节点的宽度大于第二叶节点的宽度。
本发明实施例中,可以通过比较当前节点的某条边的长度与该当前节点相邻的叶节点的邻接边的长度,预估当前节点是否再划分,若当前节点的高度大于第一叶节点的高度,说明当前节点继续被水平划分的概率比较高;若当前节点的高度小于或者等于第一叶节点的高度,说明当前节点继续被水平划分的概率比较低。若当前节点的宽度大于第二叶节点的宽度,说明当前节点继续被竖直划分的概率比较高;若当前节点的宽度小于或者等于第二叶节点的宽度,说明当前节点继续被竖直划分的概率比较低。
需要说明的是,本发明实施例中,在上述S102中,终端设备可以通过一次确定动作确定出当前节点是否满足第一预设条件以及该当前节点是否满足第二预设条件。终端设备也可以通过两次确定动作分别确定当前节点是否满足第一预设条件以及该当前节点是否满足第二预设条件,可选的,终端设备可以先确定当前节点是否满足第一预设条件,再确定当前节点是否满足第二预设条件;或者终端设备可以先当前节点是否满足第二预设条件,再确定当前节点是否满足第一预设条件,本发明实施例不作具体限定。
S103、视频编码设备根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型。
本发明实施例中,视频编码设备可以根据当前节点满足第一预设条件的情况和满足第二预设条件的情况,确定当前节点的划分标志位的上下文模型,该划分标志位的上下文模型指的是划分标志位对应的位元的概率模型,在现有的视频编解码标准(例如H.265)中,规定了划分标志位的上下文模型,划分标志位的上下文模型包括N个,该N个上下文模型的编号可以依次为0至N-1,N为大于1的整数。
上述视频编码设备根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法包括:视频编码设备根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号。具体的,在一种实施方式中,当前节点的划分标志位的上下文模型的编号满足:
ctxInc=n_conL+n_conA
其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足,n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足。
示例性的,当第一预设条件不满足,第二预设条件也不满足,则当前节点的划分标志位的上下文模型的编号为0;当第一预设条件满足,第二预设条件不满足,则当前节点的划分标志位的上下文模型的编号为1,或者第一预设条件不满足,第二预设条件满足,当前节点的划分标志位的上下文模型的编号为1;当第一预设条件满足,第二预设条件也满足,则当前节点的划分标志位的上下文模型的编号为2。具体的,划分标志位的上下文模型是何种形式的模型,本发明实施例不做限定。
S104、视频编码设备根据划分标志位的上下文模型,对划分标志位对应的位元进行编码。
本发明实施例中,划分标志位可以被二值化为一个二值的位元,假设划分标志位可以取0和1(其中,一个值表示当前节点继续划分,另一个值表示当前节点不需要再继续划分),则该划分标志位可以被二值化为1个二值的位元,位元为0对应划分标志位为0,位元为1对应划分标志位为1。对划分标志位的编码即可理解为对划分标志位对应的位元编码,具体的,是根据划分标志位对应的位元在某一概率模型下的概率值对该位元的值进行编码。
本发明实施例中,视频编码设备完成对划分标志位对应的位元的编码,即认为视频编码设备完成了对划分标志位的编码,从而视频编码设备将编码后的划分标志位的信息、划分模式信息和编码单元信息等其它信息写入码流,完成视频数据的编码。
需要说明的是,本发明实施例中,从信息论的角度分析,一个位元为1的概率越接近于0.5,则编码该位元所需要的平均比特就越多,一个位元为1的概率越接近于0或1,则编码该位元所需要的平均比特就越少,本发明实施例中,根据当前节点的上下文信息(即上述与当前节点相邻的第一叶节点和第二叶节点)确定的当前节点的上下文模型比较准确,即当前节点的划分标志位对应的位元的概率模型比较准确,在该概率模型下,划分标志位对应的位元为1的概率值更加接近于0或者1,如此,编码该划分标志位所需的比特数比较少,从而可以提高划分标志位的熵编码的效率。
可选的,本发明实施例中,视频编码设备还可以根据划分标志位对应的位元的值更新该划分标志位对应的位元的概率值,使概率值随图像内容动态更新。
本发明实施例提供的划分标志位的上下文建模方法,在对划分标志位进行编码的场景中确定划分标志位的上下文模型时,视频编码设备通过比较当前节点的高度与第一叶节点的高度,并且比较当前节点的宽度与第二叶节点的宽度,能更加准确地确定当前节点是否再划分,如此,根据满足上述两个预设条件的情况可以更加准确地确定划分标志位的上下文模型,从而能够提高划分标志位的熵编码的效率。
进一步地,在任何一个节点的划分采用了二叉树划分和/或三叉树划分时,本发明实施例中,可以比较当前节点的高度与第一叶节点的高度,以及比较当前节点的宽度与第二叶节点的宽度,从而更精确地确定当前节点的划分标志位的上下文模型。如此,可以很好地解决,现有技术中使用深度信息确定的当前节点的划分标志位的上下文模 型不准确的问题,例如当前节点的深度和第一叶节点的深度相同,但是当前节点的高度远大于第一叶节点的高度,在这种情况下,采用现有技术则更倾向于确定当前节点不需要再继续划分,而实际上由于当前节点的高度比较高,因此当前节点应当进行水平划分的可能性是比较高的。
可选的,结合图5,如图7所示,本发明实施例提供的划分标志位的上下文建模方法中,在上述S103之前,还可以包括S105:
S105、视频编码设备根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号。
本发明实施例中,对于尺寸不同的节点,其是否再划分的概率可能不同,例如,对于尺寸比较大的节点,在一定程度上该节点继续被划分的概率比较高,对于尺寸比较小的节点,该节点继续被划分的概率比较低。基于这个角度的考虑,可以按照当前节点的尺寸,将该当前节点归入某一子类中,如此,当前节点的划分标志位的上下文模型也可以对应于一个子类模型,具体的,可以根据当前节点的高度和宽度确定当前节点的划分标志位的上下文模型的子类编号。
一种可选的实现方式中,上述S105具体可以通过S105a实现:
S105a、视频编码设备根据当前节点的高度和宽度获取当前节点的面积,再根据预设的节点面积与子类编号的映射关系,确定划分标志位的上下文模型的子类编号。
本发明实施例中,视频编码设备首先通过当前节点的高度和宽度的乘积,确定该当前节点的面积,然后根据当前节点的面积,以及预设的节点面积与子类编号的映射关系,确定当前节点的面积对应的子类编号,即划分标志位的上下文模型的子类编号。
可选的,如图8所示,本发明实施例中,若子类编号为0,1,2,上述预设的节点面积与子类编号的映射关系可以为:节点面积大于第一阈值时,对应的子类编码为0,节点面积小于第二阈值时,对应的子类编号为2,节点面积大于或者等于第二阈值,并且小于或者等于第一阈值时,对应的子类编号为1。示例性的,若第一阈值为2048,当前节点的宽度为64,高度为64,该当前节点的面积为4096,则当前节点的划分标志位的子类编号为0。其中,第一阈值大于第二阈值。
需要说明的是,本发明实施例中,上述第一阈值可以为1024、2048或者4096,第二阈值可以为256或者512,具体的,第一阈值和第二阈值可以根据实际情况确定,本发明实施例不作限定。
另一种可选的实现方式中,上述S105具体可以通过S105b实现:
S105b、视频编码设备根据当前节点的高度和宽度,在预设的子类编号查询表中,查询划分标志位的上下文模型的子类编号。
本发明实施例中,可以根据当前节点的高度和宽度,以及预设的节点高度和宽度与子类编号的映射关系,确定划分标志位的上下文模型的子类编号,该预设的节点高度和宽度与子类编号的映射关系可以为预设的子类编号查询表,该预设的子类编号查询表包括当前节点的高度和宽度,以及当前节点的宽度和高度对应的子类编号。
示例性的,上述预设的子类编号查询表可以包括如下所示的表1、表2以及表3,在实际使用过程中,可以根据实际情况选择3个子类编码查询表中的一个查询表来查询划分标志位的上下文模型的子类编号,如下所示为表1、表2以及表3的示例。
表1
Figure PCTCN2019077782-appb-000001
表2
Figure PCTCN2019077782-appb-000002
表3
Figure PCTCN2019077782-appb-000003
需要说明的是,上述表1、表2和表3中,空白位置表示对应的宽和高的组合的节点不需要再继续划分或者不可能出现,如表1所示,对于高度为4,宽度为4的节点,该节点不需要再继续划分。
示例性的,若采用表1所示的子类编号查询表,结合表1,若当前节点的宽度为16,高度为64,在表1中查询得到当前节点的划分标志位的上下文模型的子类编号为2。
需要说明的是,本发明实施例中,上述预设的子类编号查询表仅为预设的节点高 度和宽度与子类编号的映射关系的一种可选的实现方式,该预设的节点高度和宽度与子类编号的映射关系也可以为其他形式的映射关系,本发明实施例不作具体限定。
可选的,如图7所示,上述S103具体可以通过S103a实现:
S103a、视频编码设备根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
本发明实施例中,上述根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定的当前节点的划分标志位的上下文模型的方法可以包括:根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定的当前节点的划分标志位的上下文模型的编号,在一种实施方式中,该划分标志位的上下文模型的编号满足:
ctxInc=n_conL+n_conA+X*a
其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
本发明实施例提供的划分标志位的上下文建模方法,可以结合当前节点本身的尺寸,确定当前节点的划分标志位的子类编号,在第一预设条件是否满足和第二预设条件是否满足的基础上,联合划分标志位的上下文模型的子类编号,确定的划分标志位的上下文模型比较准确,如此,可以进一步提高划分标志位的熵编码的效率。
可选的,结合图5,如图9所示,本发明实施例提供的划分标志位的上下文建模方法中,在上述S103之前,还可以包括S106-S107:
S106、视频编码设备获取第三方向上与当前节点相邻的第三叶节点的高度。
其中,第三方向与第一方向相反,第三叶节点为已重建的叶节点。
本发明实施例中,若第一方向为水平向左,则第三方向为水平向右,该第三叶节点为当前节点的右侧与该当前节点相邻的叶节点,该第三叶节点也可以称为右侧叶节点。
S107、视频编码设备确定当前节点是否满足第三预设条件。
其中,第三预设条件为当前节点的高度大于第三叶节点的高度。
本发明实施例中,若当前节点的高度大于第三叶节点的高度,说明当前节点继续被水平划分的概率比较高;若当前节点的高度小于或者等于第三叶节点的高度,说明当前节点继续被水平划分的概率比较低。
可选的,如图9所示,上述S103具体可以通过S103b实现:
S103b、视频编码设备根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型。
本发明实施例中,上述根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法可以包括:根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号,在一种实施方式中,该划分标志位的上下文模型的编号满足:
ctxInc=min(n_conL+n_conA+n_conR,N-1)
其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;n_conR表示第三预设条件是否满足,当n_conR为1时表示第三预设条件满足,当n_conR为0时表示第三预设条件不满足;min(a,b)表示取a和b中的较小值。
本发明实施例提供的划分标志位的上下文建模方法,可以结合与当前节点相邻的又一个叶节点,确定当前节点是否满足第三预设条件,在第一预设条件是否满足和第二预设条件是否满足的基础上,联合第三预设条件是否满足,确定的划分标志位的上下文模型的比较准确,如此,可以进一步提高划分标志位的熵编码的效率。
可选的,本发明实施例中,编码设备还可以获取第四方向上与当前节点相邻的第四叶节点的宽度,第四方向与第二方向相反,该第四叶节点为已重建的叶节点;然后编码设备确定当前节点是否满足第四预设条件,该第四预设条件为当前节点的宽度大于第四叶节点的宽度;如此上述根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型的方法可以包括:编码设备根据第一预设条件、第二预设条件以及第四预设条件的满足情况,确定当前节点的划分标志位的上下文模型。
具体的,编码设备根据第一预设条件、第二预设条件以及第四预设条件的满足情况,确定当前节点的划分标志位的上下文模型的编号与上述S103b类似,具体可以参考上述对于S103b的相关描述,此处不再赘述。
可选的,结合图9,如图10所示,本发明实施例提供的划分标志位的上下文建模方法还可以包括S108:
S108、视频编码设备根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号。
需要说明的是,可以在S106之前执行S108,或者可以在S106之后执行S108,或者可以同时执行S106和S108,本发明实施例不限定S108与S106的执行顺序。
可选的,如图10所示,上述S103具体可以通过S103c实现:
S103c、视频编码设备根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
本发明实施例中,上述根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定的当前节点的划分标志位的上下文模型的方法包括:根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定的当前节点的划分标志位的上下文模型的编码,在一种实施方式中,该划分标志位的上下文模型的编号满足:
ctxInc=min(n_conL+n_conA+n_conR,N)+X*a
其中,ctxInc表示划分标志位的上下文模型的编号;n_conL表示第一预设条件是否满足,当n_conL为1时表示第一预设条件满足,当n_conL为0时表示第一预设条 件不满足;n_conA表示第二预设条件是否满足,当n_conA为1时表示第二预设条件满足,当n_conA为0时表示第二预设条件不满足;n_conR表示第三预设条件是否满足,当n_conR为1时表示第三预设条件满足,当n_conR为0时表示第三预设条件不满足;X表示划分标志位的上下文模型的子类编号;a表示子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
本发明实施例提供的划分标志位的上下文建模方法,可以结合当前节点本身的尺寸,确定当前节点的划分标志位的子类编号,并且结合与当前节点相邻的又一个叶节点,确定当前节点是否满足第三预设条件,在根据第一预设条件是否满足、第二预设条件是否满足以及第三预设条件是否满足的基础上,联合划分标志位的上下文模型的子类编号,确定的划分标志位的上下文模型更加准确,如此,可以显著提高划分标志位的熵编码的效率。
如图11所示,在对划分标志位进行解码的过程中,本发明实施例提供的划分标志位的上下文建模方法可以包括S201-S205:
S201、视频解码设备获取当前节点的高度和宽度,第一方向上与当前节点相邻的第一叶节点的高度以及第二方向上与当前节点相邻的第二叶节点的宽度。
S202、视频解码设备确定当前节点是否满足第一预设条件以及该当前节点是否满足第二预设条件。
S203、视频解码设备根据第一预设条件和第二预设条件的满足情况,确定当前节点的划分标志位的上下文模型。
上述S201-S203中的各个步骤与上述对划分标志位进行编码的过程中,视频编码设备执行的步骤S101-S103类似,对于S201-S203的具体描述,可以参见上述对于S101-S103的详细描述,此处不再赘述。
S204、视频解码设备根据划分标志位的上下文模型,对划分标志位对应的位元进行解码。
本发明实施例中,视频解码设备根据划分标志位对应的位元在某一概率模型下的概率值对该位元的值进行解码。
S205、视频解码设备根据解码得到的位元,确定划分标志位的值。
本发明实施例中,视频解码设备解码得到位元之后,视频解码设备可以确定该位元对应的划分标志位,从而完成对划分标志位的解码,并根据划分标志位确定当前节点是否继续划分;如果当前节点不需要再继续划分,则将当前节点作为一个编码单元,视频解码设备解析此编码单元的编码信息,进而完成编码单元的解码;如果当前节点继续划分,则解析当前节点划分为子节点的方式,即解析划分模式信息,然后解析各个子节点对应的编码单元。通过上述处理过程,完成CTU划分为CU,并解码各个CU,从而完成视频数据的解码。
本发明实施例提供的划分标志位的上下文建模方法,在对划分标志位进行解码的场景中确定划分标志位的上下文模型时,视频解码设备通过比较当前节点的高度与第一叶节点的高度,并且比较当前节点的宽度与第二叶节点的宽度,能更加准确地确定当前节点是否再划分,如此,根据满足上述两个预设条件的情况可以更加准确地确定划分标志位的上下文模型,从而能够提高划分标志位的熵编码的效率。
进一步地,在任何一个节点的划分采用了二叉树划分和/或三叉树划分时,本发明实施例中,可以比较当前节点的高度与第一叶节点的高度,以及比较当前节点的宽度与第二叶节点的宽度,从而更精确地确定当前节点的划分标志位的上下文模型。如此,可以很好地解决,现有技术中使用深度信息确定的当前节点的划分标志位的上下文模型不准确的问题,例如当前节点的深度和第一叶节点的深度相同,但是当前节点的高度远大于第一叶节点的高度,在这种情况下,采用现有技术则更倾向于确定当前节点不需要再继续划分,而实际上由于当前节点的高度比较高,因此当前节点应当进行水平划分的可能性是比较高的。
可选的,结合图11,如图12所示,本发明实施例提供的划分标志位的上下文建模方法中,在上述S203之前,还包括S206:
S206、视频解码设备根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号。
对于S206的具体描述,可以参见上述实施例中对于S105的相关描述,此处不再赘述。
一种可选的实现方式中,上述S206具体可以通过S206a实现:
S206a、视频解码设备根据当前节点的高度和宽度获取当前节点的面积,再根据预设的节点面积与子类编号的映射关系,确定划分标志位的上下文模型的子类编号。
另一种可选的实现方式中,上述S206具体可以通过S206b实现:
S206b、视频解码设备根据当前节点的高度和宽度,在预设的子类编号查询表中,查询划分标志位的上下文模型的子类编号。
对于S206a和S206b的具体描述,可以参见上述实施例中对于S105a和S105b的相关描述,此处不再赘述。
可选的,如图12所示,上述S203具体可以通过S203a实现:
S203a、视频解码设备根据第一预设条件和第二预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
对于S203a的具体描述,可以参见上述实施例中对于S103a的相关描述,此处不再赘述。
可选的,结合图11,如图13所示,本发明实施例提供的划分标志位的上下文建模方法中,在上述S203之前,还可以包括S207-S208:
S207、视频解码设备获取第三方向上与当前节点相邻的第三叶节点的高度。
S208、视频解码设备确定当前节点是否满足第三预设条件。
对于S207-S208的具体描述,可以参见上述实施例中对于S106-S107的相关描述,此处不再赘述。
可选的,如图13所示,上述S203具体可以通过S203b实现:
S203b、视频解码设备根据第一预设条件、第二预设条件以及第三预设条件的满足情况,确定当前节点的划分标志位的上下文模型。
对于S203b的具体描述,可以参见上述实施例中对于S103b的相关描述,此处不再赘述。
可选的,结合图13,如图14所示,本发明实施例提供的划分标志位的上下文建 模方法还可以包括S209:
S209、视频解码设备根据当前节点的高度和宽度,确定划分标志位的上下文模型的子类编号。
对于S209的具体描述,可以参见上述实施例中对于S108的相关描述,此处不再赘述。
可选的,如图14所示,上述S203具体可以通过S203c实现:
S203c、视频解码设备根据第一预设条件、第二预设条件、第三预设条件的满足情况,以及划分标志位的上下文模型的子类编号,确定当前节点的划分标志位的上下文模型。
对于S203c的具体描述,可以参见上述实施例中对于S103c的相关描述,此处不再赘述。
HEVC中,对于YUV4:2:0格式的图像,一个编码树节点包含一个亮度块和两个色度块;亮度块和色度块使用相同的方式划分,称为亮度色度联合编码树。VVC中,如果当前帧为I帧,则当一个编码树节点为帧内编码帧(I帧)中的预设大小(如64x64)的节点时,该节点包含的亮度块通过亮度编码树被划分成一组只包含亮度块的编码单元,该节点包含的色度块通过色度编码树被划分成一组只包含色度块的编码单元;亮度编码树和色度编码树的划分相互独立。这种亮度块和色度块使用独立的编码树,称为分离树(separate trees)。
基于上下文自适应的二进制算术编码(Context-based Adaptive Binary Arithmetic Coding,CABAC)是一种常用的熵编码(entropy coding)技术,用于语法元素值的编码和解码处理。
编码处理主要包括三个步骤:1)将一个语法元素二值化为一个或多个二值的位元(bin),每个位元的取值为0或1;2)对每一个位元,根据上下文信息(例如语法元素对应节点周围已重建区域内的编码信息)决定这个位元的概率模型C,此步骤通常称为上下文建模;3)根据概率模型C中的概率值对位元进行编码,并根据位元的值更新概率模型C中的概率值。
相应的解码处理主要包括三个步骤:1)对每一个位元,根据上下文信息决定这个位元的概率模型C;2)根据概率模型C中的概率值对位元进行解码,并根据位元的值更新概率模型C中的概率值;3)根据解码得到的一个或多个位元的值,得到语法元素的值。
在编码过程和解码过程中,上下文建模方法是相同的。
通常,如果一个语法元素的取值只有0和1两个值,这个语法元素被称为标志位(flag),它被二值化为1个bin,bin值为0对应于语法元素的值为0,bin值为1对应于语法元素的值为1。
统计意义上,一个bin为1的概率越接近于0.5,则编码一组这样的bin需要的比特越多;一个bin为1的概率越接近于0或1,则编码一组这样的bin需要的比特越少。根据上下文信息从多个概率模型中选择一个概率模型,则可以将一个bin为1的总概率拆分成为多种情况下bin为1的条件概率,每个条件概率相比于总概率可更接近于0或1,从而降低编码比特数,提高熵编码的效率。然而,如果上下文建模方法不当, 则条件概率可能与总概率接近,无法提高熵编码的效率。
VVC draft 2版本(VVC草案第2版本)中,MTT划分标志位对应3个候选的上下文模型,其编号ctxInc为0、1和2,编码和解码时会由上下文信息从中选择一个模型作为实际使用的模型。具体的,根据当前节点的面积、左侧叶节点的面积和上侧叶节点的面积决定划分标志位的上下文模型。左侧叶节点为覆盖节点左侧预设位置的叶节点,上侧叶节点为覆盖节点上侧预设位置的叶节点。MTT划分标志位为1指示当前节点按照二叉树或三叉树划分方式中的一种进行划分;MTT划分标志为0指示当前节点不划分,即当前节点对应一个编码单元。
VVC draft 2版本中,一个节点的面积用节点的四叉树深度Dq的2倍加上节点的二叉树深度Db来表示。当一个节点使用四叉树划分时,子节点的Dq等于节点的Dq加1;当节点使用二叉树划分或三叉树划分时,子节点的Dq等于节点的Dq。当节点由二叉树划分方式划分时子节点的Db等于节点的Db加1,当节点由三叉树划分方式划分且子节点为三叉树划分的中间节点时,子节点的Db等于节点的Db加1;当节点由三叉树划分方式划分且子节点不为三叉树划分的中间节点时,子节点的Db等于节点的Db加2。
条件1:如果左侧叶节点可得(左侧叶节点在图像区域内且已经重建)且左侧叶节点的面积小于当前节点的面积,则条件condL成立,否则condL不成立;
条件2:如果上侧叶节点可得且上侧叶节点的四叉树深度小于当前节点的面积,则条件condA成立,否则condA不成立。
用上述两个条件成立的个数来决定划分标志位使用的上下文模型,即ctxInc=condL+condA。有0个条件成立,则使用0号模型;有1个条件成立,则使用1号模型;有2个条件成立,则使用2号模型。
VVC draft 2中,无论使用亮度色度联合树还是分离树(即亮度编码树或色度编码树),MTT划分标志位均使用上述3个上下文模型。
另一些现有技术中,上述条件1替换为如果左侧叶节点可得且左侧叶节点的高小于当前节点的高,则条件condL成立,否则condL不成立;上述条件2替换为如果上侧叶节点可得且上侧叶节点的宽小于当前节点的宽,则条件condA成立,否则condA不成立。
本发明一个实施例可以根据编码树的类型确定MTT划分标志位的上下文模型,对亮度编码树的MTT划分标志位和色度编码树的划分标志位使用不同的上下文模型,提高MTT划分标志位的编码效率。
本发明一个实施例提供了一种划分标志位的上下文模型确定方法,该方法应用于视频编码设备或视频解码设备。其中,编码树中正在确定划分的节点称为当前节点。划分标志位用于表示当前节点是否继续划分。本发明中的划分标志位可以是MTT划分标志位,如VVC draft 2中的mtt_split_cu_flag;MTT划分标志位为1表示当前节点使用二叉树划分方式或三叉树划分方式中的一种方式划分成为子节点;MTT划分标志位为0表示当前节点不划分,成为QT-MTT编码树中的一个编码单元CU。本发明中的划分标志位也可以是QT划分标志位,如VVC draft 2中的qt_split_cu_flag。
如图19所示,本发明一个实施例提供的划分标志位的上下文模型确定方法包括:
1901、根据当前节点的宽度和高度,第一叶节点的高度以及第二叶节点的宽度,确定第一模型编号;所述第一叶节点在第一方向上与所述当前节点相邻,所述第二叶节点在第二方向上与所述当前节点相邻,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点。所述第一方向例如为当前节点的左方,第二方向例如为当前节点的上方。
该步骤的实现可以参考现有技术中的方法或前面实施例中提供的确定划分标志位的上下文模型的方法,此处不再赘述;例如可以使用HEVC中的确定划分标志位的上下文模型的方法,或VVC draft 2版本中的确定划分标志位的上下文模型的方法;或者,例如可以使用如图5,图7,以及图9~图14所描述的任一确定划分标志位的上下文模型的方法。也就是说,该步骤获取的第一模型编号可以为前述方法中确定的上下文模型的编号。
1902、根据所述当前节点所属的编码树的类型,确定第二模型编号。
所述当前节点所述的编码树的类型可以是色度编码树,亮度编码树或亮度色度联合树。
根据所述当前节点所属的编码树的类型的不同,确定第二模型编号的方式或者第二模型编号会有不同。
例如在一种实施方式中,如果所述当前节点所属的编码树为色度编码树,确定所述第二模型编号为第一值,所述第一值为预设正整数,例如可以为3、6、9、10、12、13等。
在一种实施方式中,如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的MTT深度与MTT深度阈值ThD的大小关系确定所述第二模型编号。具体地,如果所述当前节点的MTT深度小于所述MTT深度阈值ThD,则确定所述第二模型编号为第二值,所述第二值为非负整数,例如可以为0,1,或2等等;或如果所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,则确定所述第二模型编号为第三值,所述第三值为非负整数,例如可以为3,4,或5等等;其中所述第一值,第二值和第三值互不相同;例如,第二值可以为0、第三值可以为3,第一值可以为6。。
在一种实施方式中,MTT深度阈值ThD可以为预设的正整数,例如可以为2,3,或4等等。在另一种实施方式中,所述MTT深度阈值ThD可以由当前节点对应的最大MTT深度(MaxMttDepth)确定,例如,ThD=(MaxMttDepth+1)>>1。例如在VVC draft2中,如果当前节点为I帧中的节点,则当前节点对应的最大MTT深度MaxMttDepth由序列参数集(Sequence Parameter Set,SPS)中的max_mtt_hierarchy_depth_intra_slices语法元素确定;如果当前节点为P帧或B帧中的节点,则当前节点对应最大MTT深度MaxMttDepth由序列参数集中的max_mtt_hierarchy_depth_inter_slices语法元素确定。
在一种实施方式中,如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的MTT深度与预设常数P1的乘积确定所述第二模型编号;例如,可以直接将所述乘积确定为所述第二模型编号。在一些实施方式中,考虑到第二模型编号的取值范围,可以考虑设定第二模型编号的上限值,即当所述乘积大于所 述上限值时,将所述上限值确定为所述第二模型编号;例如在一个实施例中,所述上限值设置为6,即如果所述乘积大于6,所述第二模型编号为6。其中,在一种实施方式中,在根据所述当前节点的MTT深度与预设常数P1的乘积确定所述第二模型编号时,前述的第一值可以设置为大于或等于9的整数。预设常数P1为正整数,例如P1等于3。
在一种实施方式中,如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的面积与第一预设面积阈值ThA1大小关系确定所述第二模型编号。具体地,如果所述当前节点的面积大于所述第一预设面积阈值ThA1,确定所述第二模型编号为第四值,所述第四值为非负整数,例如可以为0,1,或2等等;或如果所述当前节点的面积小于或等于所述第一预设面积阈值ThA1,确定所述第二模型编号为第五值,所述第五值为非负整数,例如可以为3,4,或5等等;所述第一值、第四值和第五值互不相同,例如,第四值可以为0、第五值可以为3,第一值可以为6。
其中,第一预设面积阈值ThA1为正整数,例如ThA1=128,256,512或1024等等。ThA1还可以根据当前图像的最大二叉树划分节点的尺寸确定,例如最大二叉树划分节点为128x128时,ThA1设置为512或256;最大二叉树划分节点为64x64时,ThA1设置为256或128;最大二叉树划分节点为32x32或更小时,ThA1设置为128或64。ThA1还可以根据当前图像的帧类型确定,如果当前图像为I帧,则ThA1为256或128;否则,ThA1为1024或512。当前节点的面积可以用当前节点包含的图像块的宽与高的乘积来计算。如果当前节点为亮度编码树或者亮度色度联合树中的节点,则当前节点包含的图像块为亮度块,当前节点的面积为该亮度块的宽和高的乘积;如果当前节点为色度编码树中的节点,则当前节点包含图像块为色度块,当前节点的面积为该色度块的宽和高的乘积。此外,当前节点的面积还可以用当前节点对应图像区域的宽与高的乘积来计算。当前节点对应了16x16的图像区域,则它的面积为256。
在一种实施方式中,如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的面积与第二预设面积阈值ThA2以及第三预设面积阈值ThA3中的至少一个的大小关系确定所述第二模型编号,所述第二预设面积阈值ThA2大于所述第三预设面积阈值ThA3。具体地,如果所述当前节点的面积大于所述第二面积阈值ThA2,确定所述第二模型编号为第六值,所述第六值为非负整数,例如可以为0,1,或2等等;或如果所述当前节点的面积大于所述第三面积阈值ThA3且小于或等于所述第二面积阈值ThA2,确定所述第二模型编号为第七值,所述第七值为非负整数,例如可以为3,4,或5等等;或如果所述当前节点的面积小于或等于所述第三面积阈值ThA3,确定所述第二模型编号为第八值,所述第八值为非负整数,例如可以为6,7或8等等;其中,所述第一值、第六值、第七值和第八值互不相同,例如第六值可以为0、第七值可以为3、第八值可以为6、第一值可以为9。
第二预设面积阈值ThA2为正整数,例如ThA2=256,512、1024或2048等等。ThA2还可以根据当前图像的最大二叉树划分节点的尺寸确定,例如最大二叉树划分节点为128x128时,ThA2设置为1024或512;最大二叉树划分节点为64x64时,ThA2设置为512或256;最大二叉树划分节点为32x32或更小时,ThA2设置为256或128。ThA2还可以根据当前图像的帧类型确定,如果当前图像为I帧,则ThA2为1024或 512;否则,ThA2为256或128。
第三预设面积阈值ThA3为正整数,例如ThA3=32,64,128,256或512等等。ThA3还可以根据当前图像的最大二叉树划分节点的尺寸确定,例如最大二叉树划分节点为128x128时,ThA3设置为512或256;最大二叉树划分节点为64x64时,ThA3设置为128或64;最大二叉树划分节点为32x32或更小时,ThA3设置为64或32。ThA3还可以根据当前图像的帧类型确定,如果当前图像为I帧,则ThA3为256或128;否则,ThA3为64或32。
其中,需要说明的是,步骤1901和步骤1902在执行上没有先后顺序,即步骤1902的执行可以可以在步骤1901之前,或在步骤1901之后,也可以与步骤1901同时执行。
1903、根据所述第一模型编号以及所述第二模型编号,确定所述当前节点的划分标志位的上下文模型。
例如,可以直接将第一模型编号以及第二模型编号相加得到的和作为所述当前节点的划分标志位的上下文模型的编号,从而根据该编号确定所述当前节点的划分标志位的上下文模型。在本方法应用于编码器时,该方法具体可以由熵编码单元来执行,此时,该熵编码单元可以根据该上下文模型对该上下文模型的位元进行编码,再将编码后的位元写入码流。在本方法应用于解码器时,该方法具体可以由熵解码单元来执行,该熵解码单元确定了所述当前节点的划分标志位的上下文模型后,可以根据该上下文模型对码流进行解码,从而得到所述划分标志位对应的位元的值,再由该位元的值确定划分标志位的值,从而根据该划分标志位的值确定是否需要对所述当前节点进行继续划分。
从上可知,本实施例可以根据当前节点所属的编码树的类型来确定当前节点的划分标志位的上下文模型,从而可以对色度编码树和非色度编码树(即亮度编码树或亮度色度联合树)采用不同的上下文模型,使得确定的上下文模型能够适配色度编码树和非色度编码树,从而提高了压缩效率。
在本发明的另一个实施例中,所述步骤1902,即所述根据所述当前节点所属的编码树的类型,确定第二模型编号具体可以包括:根据所述当前节点所属的编码树的类型,以及所述当前节点的MTT深度与MTT深度阈值ThD的大小关系,确定所述第二模型编号。其中,MTT深度阈值ThD的取值或者确定可以参考前面的描述。
具体地,如果所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度小于所述MTT深度阈值ThD,确定第二模型编号为第九值,所述第九值为非负整数,例如可以为6,7,或8等等;或如果所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,确定所述第二模型编号为第十值,所述第十值为非负整数,例如可以为9,10,或11等等;或如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度小于所述MTT深度阈值ThD,确定所述第二模型编号为第十一值,所述第十一值为非负整数,例如可以为0,1或2等等;或如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,确定所述第二模型编号为第十二值,所述第十二值为非负整数,例如可以为3,4,或5等等;其中,所述第九值、第十值、第十一值和所述第十二值互不相同,例如第九值 可以为6、第十值可以为9、第十一值可以为0、第十二值可以为3。
从上可知,本实施例可以根据当前节点所属的编码树的类型来确定当前节点的划分标志位的上下文模型,从而可以对色度编码树和非色度编码树(即亮度编码树或亮度色度联合树)采用不同的上下文模型,使得确定的上下文模型能够适配色度编码树和非色度编码树,从而提高了压缩效率。
图20描述了本发明一个实施例提供的划分标志位的上下文建模装置的结构,该装置具体可以为视频编码器或视频解码器,或者该装置可以为视频编码器中的熵编码单元,或者为视频解码器中的熵解码单元。如图20所示,该装置包括:
第一模型编号确定模块2001,用于根据当前节点的宽度和高度,第一叶节点的高度以及第二叶节点的宽度,确定第一模型编号;所述第一叶节点在第一方向上与所述当前节点相邻,所述第二叶节点在第二方向上与所述当前节点相邻,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点。
具体实现可以参考步骤1901。
第二模型编号确定模块2002,用于根据所述当前节点所属的编码树的类型,确定第二模型编号。
具体实现可以参考步骤1902。
上下文模型确定模块2003,用于根据所述第一模型编号以及所述第二模型编号,确定所述当前节点的划分标志位的上下文模型。
具体实现可以参考步骤1903。
例如,在一种实施方式中,所述第二模型编号确定模块2002可以具体用于在所述当前节点所属的编码树为色度编码树时,确定所述第二模型编号为第一值,所述第一值为预设正整数。
例如,在一种实施方式中,所述第二模型编号确定模块2002可以具体用于具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的MTT深度与MTT深度阈值ThD的大小关系确定所述第二模型编号。具体地,所述第二模型编号确定模块2002可以具体用于:在所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定所述第二模型编号为第二值,所述第二值为非负整数;或在所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第三值,所述第三值为非负整数;其中,所述第一值,第二值和第三值互不相同。其中,所述MTT深度阈值ThD根据所述当前节点对应的最大MTT深度确定,具体确定方式可以参考前面的描述。
例如,在一种实施方式中,所述第二模型编号确定模块2002可以具体用于具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的MTT深度与预设常数P1的乘积确定所述第二模型编号。具体地,所述乘积为所述第二模型编号;或如果所述乘积大于6,所述第二模型编号为6。在该实施方式中,所述第一值可以为大于或等于9的整数。
例如,在一种实施方式中,所述第二模型编号确定模块2002可以具体用于具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的面积与第一预设面积阈值ThA1大小关系确定所述第二模型编号。具体地,在所 述当前节点的面积大于所述第一预设面积阈值ThA1时,确定所述第二模型编号为第四值,所述第四值为非负整数;或在所述当前节点的面积小于或等于所述第一预设面积阈值ThA1时,确定所述第二模型编号为第五值,所述第五值为非负整数;所述第一值、第四值和第五值互不相同。
例如,在一种实施方式中,所述第二模型编号确定模块2002可以具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的面积与第二预设面积阈值ThA2以及第三预设面积阈值ThA3中的至少一个的大小关系确定所述第二模型编号,所述第二预设面积阈值ThA2大于所述第三预设面积阈值ThA3。具体地,所述第二模型编号确定模块2002具体用于:在所述当前节点的面积大于所述第二面积阈值ThA2时,确定所述第二模型编号为第六值,所述第六值为非负整数;或在所述当前节点的面积大于所述第三面积阈值ThA3且小于或等于所述第二面积阈值ThA2时,确定所述第二模型编号为第七值,所述第七值为非负整数;或在所述当前节点的面积小于或等于所述第三面积阈值ThA3时,确定所述第二模型编号为第八值,所述第八值为非负整数;其中,所述第一值、第六值、第七值和第八值互不相同。
例如,在一种实施方式中,所述第二模型编号确定模块2002可以具体用于根据所述当前节点所属的编码树的类型,以及所述当前节点的MTT深度与MTT深度阈值ThD的大小关系,确定所述第二模型编号。例如,所述第二模型编号确定模块2002可以具体用于:在所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定第二模型编号为第九值,所述第九值为非负整数;或在所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第十值,所述第十值为非负整数;或在所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定所述第二模型编号为第十一值,所述第十一值为非负整数;或在所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第十二值,所述第十二值为非负整数;其中,所述第九值、第十值、第十一值和所述第十二值互不相同。
具体地,所述第一值~第十二值的取值可以参考前面的描述。所述各个阈值的取值也可以参考前面的描述。此处不再赘述。
从上可知,本实施例可以根据当前节点所属的编码树的类型来确定当前节点的划分标志位的上下文模型,从而可以对色度编码树和非色度编码树(即亮度编码树或亮度色度联合树)采用不同的上下文模型,使得确定的上下文模型能够适配色度编码树和非色度编码树,从而提高了压缩效率。
上述主要从各个网元的角度对本发明实施例提供的方案进行了介绍。可以理解的是,各个网元,例如视频编码设备、视频解码设备等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每 个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本发明实施例可以根据上述方法示例对视频编码设备和视频解码设备等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图15示出了上述实施例中所涉及的视频编码设备的一种可能的结构示意图,如图15所示,该视频编码设备可以包括:获取模块30、条件确定模块31和上下文模型确定模块32。获取模块30可以用于支持视频编码设备执行上述方法实施例中的S101和S106;条件确定模块31可以用于支持视频编码设备执行上述方法实施例中的S102和S107;上下文模型确定模块32可以用于支持视频编码设备执行上述方法实施例中的S103(包括S103a、S103b或S103c)、S105(包括S105a或S105b)以及S108。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在采用集成的单元的情况下,图16示出了上述实施例中所涉及的视频编码设备的一种可能的结构示意图。如图16所示,该视频编码设备可以包括:处理模块40和通信模块41。处理模块40可以用于对视频编码设备的动作进行控制管理,处理模块40可以用于支持视频编码设备执行上述方法实施例中的S102、S103(包括S103a、S103b或S103c)、S105(包括S105a或S105b)、S107以及S108,和/或用于本文所描述的技术的其它过程。通信模块41可以用于支持视频编码设备与其他网络实体的通信。可选的,如图16所示,该视频编码设备还可以包括存储模块42,用于存储视频编码设备的程序代码和数据。
其中,处理模块40可以是处理器或控制器(例如可以是上述如图3所示的视频编码器12),例如可以是CPU、通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明实施例公开内容所描述的各种示例性的逻辑方框、模块和电路。上述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块41可以是收发器、收发电路或通信接口等(例如可以是上述如图3所示的输出接口13)。存储模块42可以是存储器(例如可以是上述如图3所示的存储器11)。
当处理模块40为处理器,通信模块41为收发器,存储模块42为存储器时,处理器、收发器和存储器可以通过总线连接。总线可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended Industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。
在采用对应各个功能划分各个功能模块的情况下,图17示出了上述实施例中所涉及的视频解码设备的一种可能的结构示意图,如图17所示,该视频解码设备可以包括:获取模块50、条件确定模块51和上下文模型确定模块52。获取模块50可以用于支持视频解码设备执行上述方法实施例中的S201和S207;条件确定模块51可以用于支持视频解码设备执行上述方法实施例中的S202和S208;上下文模型确定模块52可以用 于支持视频解码设备执行上述方法实施例中的S203(包括S203a、S203b或S203c)、S205、S206(包括S206a或S206b)以及S209。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在采用集成的单元的情况下,图18示出了上述实施例中所涉及的视频解码设备的一种可能的结构示意图。如图18所示,该视频解码设备可以包括:处理模块60和通信模块61。处理模块60可以用于对视频解码设备的动作进行控制管理,处理模块60可以用于支持视频解码设备执行上述方法实施例中的S202、S203(包括S203a、S203b或S203c)、S204、S205、S206(包括S206a或S206b)、S208以及S209,和/或用于本文所描述的技术的其它过程。通信模块61可以用于支持视频解码设备与其他网络实体的通信。可选的,如图18所示,该视频解码设备还可以包括存储模块62,用于存储视频解码设备的程序代码和数据。
其中,处理模块60可以是处理器或控制器(例如可以是上述如图4所示的视频解码器21),例如可以是CPU、通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明实施例公开内容所描述的各种示例性的逻辑方框、模块和电路。上述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块61可以是收发器、收发电路或通信接口等(例如可以是上述如图4所示的输入接口20),存储模块62可以是存储器。
当处理模块60为处理器,通信模块61为收发器,存储模块62为存储器时,处理器、收发器和存储器可以通过总线连接。总线可以是PCI总线或EISA总线等。总线可以分为地址总线、数据总线、控制总线等。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机指令时,全部或部分地产生按照本发明实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))方式或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、磁盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state drives,SSD))等。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (52)

  1. 一种划分标志位的上下文建模方法,其特征在于,应用于视频编码设备或视频解码设备,所述方法包括:
    获取当前节点的高度和宽度、第一方向上与所述当前节点相邻的第一叶节点的高度以及第二方向上与所述当前节点相邻的第二叶节点的宽度,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点;
    确定所述当前节点是否满足第一预设条件以及所述当前节点是否满足第二预设条件,所述第一预设条件包括所述当前节点的高度大于所述第一叶节点的高度,所述第二预设条件包括所述当前节点的宽度大于所述第二叶节点的宽度;
    根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型,包括:
    根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA;其中,ctxInc表示所述划分标志位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型之前,所述方法还包括:
    根据所述当前节点的高度和宽度,确定所述划分标志位的上下文模型的子类编号;
    所述根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型,包括:
    根据所述第一预设条件和所述第二预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型。
  4. 根据权利要求3所述的方法,其特征在于,根据所述当前节点的高度和宽度,确定所述划分标志位的上下文模型的子类编号,包括:
    根据所述当前节点的高度和宽度获取所述当前节点的面积,再根据预设的节点面积与子类编号的映射关系,确定所述划分标志位的上下文模型的子类编号;或者,
    根据所述当前节点的高度和宽度,在预设的子类编号查询表中,查询所述划分标志位的上下文模型的子类编号,所述子类编号查询表包括所述当前节点的高度和宽度,以及所述当前节点的宽度和高度对应的子类编号。
  5. 根据权利要求3或4所述的方法,其特征在于,所述根据所述第一预设条件和所述第二预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型,包括:
    根据所述第一预设条件和所述第二预设条件的满足情况,以及所述划分标志位的 上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA+X*a;其中,ctxInc表示所述划分标志位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足;X表示所述划分标志位的上下文模型的子类编号;a表示所述子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
  6. 根据权利要求1所述的方法,其特征在于,所述根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型之前,所述方法还包括:
    获取第三方向上与所述当前节点相邻的第三叶节点的高度,所述第三方向与所述第一方向相反,所述第三叶节点为已重建的叶节点;
    确定所述当前节点是否满足第三预设条件,所述第三预设条件为所述当前节点的高度大于所述第三叶节点的高度;
    所述根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型,包括:
    根据所述第一预设条件、所述第二预设条件以及所述第三预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型。
  7. 根据权利要求6所述的方法,其特征在于,所述划分标志的上下文模型包括N个,所述N个上下文模型的编号依次为0至N-1,N为大于1的整数;所述根据所述第一预设条件、所述第二预设条件以及所述第三预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型,包括:
    根据所述第一预设条件、所述第二预设条件以及所述第三预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1);其中,ctxInc表示所述划分标志位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足;n_conR表示所述第三预设条件是否满足,当n_conR为1时表示所述第三预设条件满足,当n_conR为0时表示所述第三预设条件不满足。
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    根据所述当前节点的高度和宽度,确定所述划分标志位的上下文模型的子类编号;
    所述根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型,包括:
    根据所述第一预设条件、所述第二预设条件、所述第三预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述第一预设条件、所述第二预设条件、所述第三预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型,包括:
    根据所述第一预设条件、所述第二预设条件、所述第三预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1)+X*a;其中,ctxInc表示所述划分标志位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足;n_conR表示所述第三预设条件是否满足,当n_conR为1时表示所述第三预设条件满足,当n_conR为0时表示所述第三预设条件不满足;X表示所述划分标志位的上下文模型的子类编号;a表示所述子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
  10. 根据权利要求1至9任意一项所述的方法,其特征在于,
    所述第一方向为水平向左的方向,所述第二方向为竖直向上的方向。
  11. 根据权利要求1至10任意一项所述的方法,其特征在于,所述第一预设条件还包括所述第一叶节点可得;或
    所述第二预设条件还包括所述第二叶节点可得。
  12. 根据权利要求1至11任意一项所述的方法,其特征在于,所述当前节点所属的编码树为亮度编码树或亮度色度联合树。
  13. 一种划分标志位的上下文建模装置,其特征在于,包括获取模块、条件确定模块和上下文模型确定模块;
    所述获取模块,用于获取当前节点的高度和宽度、第一方向上与所述当前节点相邻的第一叶节点的高度以及第二方向上与所述当前节点相邻的第二叶节点的宽度,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点;
    所述条件确定模块,用于确定所述当前节点是否满足第一预设条件以及所述当前节点是否满足第二预设条件,所述第一预设条件包括所述当前节点的高度大于所述第一叶节点的高度,所述第二预设条件包括所述当前节点的宽度大于所述第二叶节点的宽度;
    所述上下文模型确定模块,用于根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型,所述划分标志位的上下文模型为所述划分标志位对应的位元的概率模型。
  14. 根据权利要求13所述的装置,其特征在于,所述划分标志的上下文模型包括N个,所述N个上下文模型的编号依次为0至N-1,N为大于1的整数;
    所述上下文模型确定模块,具体用于根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA;其中,ctxInc表示所述划分标志 位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足。
  15. 根据权利要求13所述的装置,其特征在于,
    所述条件确定模块,还用于在所述上下文模型确定模块根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型之前,根据所述当前节点的高度和宽度,确定所述划分标志位的上下文模型的子类编号;
    所述上下文模型确定模块,具体用于根据所述第一预设条件和所述第二预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型。
  16. 根据权利要求15所述的装置,其特征在于,
    所述上下文模型确定模块,具体用于根据所述当前节点的高度和宽度获取所述当前节点的面积,再根据预设的节点面积与子类编号的映射关系,确定所述划分标志位的上下文模型的子类编号;或者,
    所述上下文模型确定模块,具体用于根据所述当前节点的高度和宽度,在预设的子类编号查询表中,查询所述划分标志位的上下文模型的子类编号,所述子类编号查询表包括所述当前节点的高度和宽度,以及所述当前节点的宽度和高度对应的子类编号。
  17. 根据权利要求15或16所述的装置,其特征在于,所述划分标志的上下文模型包括N个,所述N个上下文模型的编号依次为0至N-1,N为大于1的整数;
    所述上下文模型确定模块,具体用于根据所述第一预设条件和所述第二预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=n_conL+n_conA+X*a;其中,ctxInc表示所述划分标志位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足;X表示所述划分标志位的上下文模型的子类编号;a表示所述子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
  18. 根据权利要求13所述的装置,其特征在于,
    所述获取模块,还用于在根据所述第一预设条件和所述第二预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型之前,获取第三方向上与所述当前节点相邻的第三叶节点的高度,所述第三方向与所述第一方向相反,所述第三叶节点为已重建的叶节点;
    所述条件确定模块,还用于确定所述当前节点是否满足第三预设条件,所述第三预设条件为所述当前节点的高度大于所述第三叶节点的高度;
    所述上下文模型确定模块,具体用于根据所述第一预设条件、所述第二预设条件以及所述第三预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型。
  19. 根据权利要求18所述的装置,其特征在于,所述划分标志的上下文模型包括N个,所述N个上下文模型的编号依次为0至N-1,N为大于1的整数;
    所述上下文模型确定模块,具体用于根据所述第一预设条件、所述第二预设条件以及所述第三预设条件的满足情况,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1);其中,ctxInc表示所述划分标志位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足;n_conR表示所述第三预设条件是否满足,当n_conR为1时表示所述第三预设条件满足,当n_conR为0时表示所述第三预设条件不满足。
  20. 根据权利要求13所述的装置,其特征在于,
    所述上下文模型确定模块,还用于根据所述当前节点的高度和宽度,确定所述划分标志位的上下文模型的子类编号;
    所述上下文模型确定模块,具体用于根据所述第一预设条件、所述第二预设条件、所述第三预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型。
  21. 根据权利要求20所述的装置,其特征在于,
    所述上下文模型确定模块,具体用于根据所述第一预设条件、所述第二预设条件、所述第三预设条件的满足情况,以及所述划分标志位的上下文模型的子类编号,确定所述当前节点的划分标志位的上下文模型的编号,所述划分标志位的上下文模型的编号满足:ctxInc=min(n_conL+n_conA+n_conR,N-1)+X*a;其中,ctxInc表示所述划分标志位的上下文模型的编号;n_conL表示所述第一预设条件是否满足,当n_conL为1时表示所述第一预设条件满足,当n_conL为0时表示所述第一预设条件不满足;n_conA表示所述第二预设条件是否满足,当n_conA为1时表示所述第二预设条件满足,当n_conA为0时表示所述第二预设条件不满足;n_conR表示所述第三预设条件是否满足,当n_conR为1时表示所述第三预设条件满足,当n_conR为0时表示所述第三预设条件不满足;X表示所述划分标志位的上下文模型的子类编号;a表示所述子类编号对应的划分标志位的上下文模型的数量;*表示相乘。
  22. 根据权利要求13至21任意一项所述的装置,其特征在于,
    所述第一方向为水平向左的方向,所述第二方向为竖直向上的方向。
  23. 根据权利要求13至22任意一项所述的装置,其特征在于,所述第一预设条件还包括所述第一叶节点可得;或
    所述第二预设条件还包括所述第二叶节点可得。
  24. 根据权利要求13至23任意一项所述的装置,其特征在于,所述当前节点所属的编码树为亮度编码树或亮度色度联合树。
  25. 一种划分标志位的上下文建模方法,其特征在于,应用于视频编码设备或视频解码设备,所述方法包括:
    根据当前节点的宽度和高度,第一叶节点的高度以及第二叶节点的宽度,确定第 一模型编号;所述第一叶节点在第一方向上与所述当前节点相邻,所述第二叶节点在第二方向上与所述当前节点相邻,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点;
    根据所述当前节点所属的编码树的类型,确定第二模型编号;
    根据所述第一模型编号以及所述第二模型编号,确定所述当前节点的划分标志位的上下文模型。
  26. 根据权利要求25所述的方法,其特征在于,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:
    如果所述当前节点所属的编码树为色度编码树,确定所述第二模型编号为第一值,所述第一值为预设正整数。
  27. 根据权利要求25或26所述的方法,其特征在于,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:
    如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的MTT深度与MTT深度阈值ThD的大小关系确定所述第二模型编号。
  28. 根据权利要求27所述的方法,其特征在于,如果所述当前节点的MTT深度小于所述MTT深度阈值ThD,则确定所述第二模型编号为第二值,所述第二值为非负整数;或
    如果所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,则确定所述第二模型编号为第三值,所述第三值为非负整数;
    所述第一值,第二值和第三值互不相同。
  29. 根据权利要求27或28所述的方法,其特征在于,所述MTT深度阈值ThD根据所述当前节点对应的最大MTT深度确定。
  30. 根据权利要求25或26所述的方法,其特征在于,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:
    如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的MTT深度与预设常数P1的乘积确定所述第二模型编号。
  31. 根据权利要求30所述的方法,其特征在于,所述乘积为所述第二模型编号;或
    如果所述乘积大于6,所述第二模型编号为6。
  32. 根据权利要求30或31所述的方法,其特征在于,所述第一值大于或等于9。
  33. 根据权利要求25或26所述的方法,其特征在于,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:
    如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的面积与第一预设面积阈值ThA1大小关系确定所述第二模型编号。
  34. 根据权利要求33所述的方法,其特征在于,如果所述当前节点的面积大于所述第一预设面积阈值ThA1,确定所述第二模型编号为第四值,所述第四值为非负整数;或
    如果所述当前节点的面积小于或等于所述第一预设面积阈值ThA1,确定所述第二模型编号为第五值,所述第五值为非负整数;
    所述第一值、第四值和第五值互不相同。
  35. 根据权利要求24或26所述的方法,其特征在于,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:
    如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,根据所述当前节点的面积与第二预设面积阈值ThA2以及第三预设面积阈值ThA3中的至少一个的大小关系确定所述第二模型编号,所述第二预设面积阈值ThA2大于所述第三预设面积阈值ThA3。
  36. 根据权利要求35所述的方法,其特征在于,如果所述当前节点的面积大于所述第二面积阈值ThA2,确定所述第二模型编号为第六值,所述第六值为非负整数;或
    如果所述当前节点的面积大于所述第三面积阈值ThA3且小于或等于所述第二面积阈值ThA2,确定所述第二模型编号为第七值,所述第七值为非负整数;或
    如果所述当前节点的面积小于或等于所述第三面积阈值ThA3,确定所述第二模型编号为第八值,所述第八值为非负整数;
    所述第一值、第六值、第七值和第八值互不相同。
  37. 根据权利要求25所述的方法,其特征在于,所述根据所述当前节点所属的编码树的类型,确定第二模型编号包括:
    根据所述当前节点所属的编码树的类型,以及所述当前节点的MTT深度与MTT深度阈值ThD的大小关系,确定所述第二模型编号。
  38. 根据权利要求37所述的方法,其特征在于,如果所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度小于所述MTT深度阈值ThD,确定第二模型编号为第九值,所述第九值为非负整数;或
    如果所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,确定所述第二模型编号为第十值,所述第十值为非负整数;或
    如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度小于所述MTT深度阈值ThD,确定所述第二模型编号为第十一值,所述第十一值为非负整数;或
    如果所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD,确定所述第二模型编号为第十二值,所述第十二值为非负整数;
    所述第九值、第十值、第十一值和所述第十二值互不相同。
  39. 一种划分标志位的上下文建模装置,其特征在于,所述装置包括:
    第一模型编号确定模块,用于根据当前节点的宽度和高度,第一叶节点的高度以及第二叶节点的宽度,确定第一模型编号;所述第一叶节点在第一方向上与所述当前节点相邻,所述第二叶节点在第二方向上与所述当前节点相邻,所述第一方向与所述第二方向垂直,所述第一叶节点和所述第二叶节点为已重建的叶节点;
    第二模型编号确定模块,用于根据所述当前节点所属的编码树的类型,确定第二模型编号;
    上下文模型确定模块,用于根据所述第一模型编号以及所述第二模型编号,确定 所述当前节点的划分标志位的上下文模型。
  40. 根据权利要求39所述的装置,其特征在于,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为色度编码树时,确定所述第二模型编号为第一值,所述第一值为预设正整数。
  41. 根据权利要求39或40所述的装置,其特征在于,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的MTT深度与MTT深度阈值ThD的大小关系确定所述第二模型编号。
  42. 根据权利要求41所述的装置,其特征在于,所述第二模型编号确定模块具体用于:
    在所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定所述第二模型编号为第二值,所述第二值为非负整数;或
    在所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第三值,所述第三值为非负整数;
    所述第一值,第二值和第三值互不相同。
  43. 根据权利要求41或42所述的装置,其特征在于,所述MTT深度阈值ThD根据所述当前节点对应的最大MTT深度确定。
  44. 根据权利要求39或40所述的装置,其特征在于,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的MTT深度与预设常数P1的乘积确定所述第二模型编号。
  45. 根据权利要求44所述的装置,其特征在于,所述乘积为所述第二模型编号;或
    如果所述乘积大于6,所述第二模型编号为6。
  46. 根据权利要求44或45所述的装置,其特征在于,所述第一值大于或等于9。
  47. 根据权利要求39或40所述的装置,其特征在于,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的面积与第一预设面积阈值ThA1大小关系确定所述第二模型编号。
  48. 根据权利要求47所述的装置,其特征在于,所述第二模型编号确定模块具体用于:
    在所述当前节点的面积大于所述第一预设面积阈值ThA1时,确定所述第二模型编号为第四值,所述第四值为非负整数;或
    在所述当前节点的面积小于或等于所述第一预设面积阈值ThA1时,确定所述第二模型编号为第五值,所述第五值为非负整数;
    所述第一值、第四值和第五值互不相同。
  49. 根据权利要求39或40所述的装置,其特征在于,所述第二模型编号确定模块具体用于在所述当前节点所属的编码树为亮度编码树或亮度色度联合树时,根据所述当前节点的面积与第二预设面积阈值ThA2以及第三预设面积阈值ThA3中的至少一个的大小关系确定所述第二模型编号,所述第二预设面积阈值ThA2大于所述第三预设面积阈值ThA3。
  50. 根据权利要求49所述的装置,其特征在于,所述第二模型编号确定模块具体 用于:
    在所述当前节点的面积大于所述第二面积阈值ThA2时,确定所述第二模型编号为第六值,所述第六值为非负整数;或
    在所述当前节点的面积大于所述第三面积阈值ThA3且小于或等于所述第二面积阈值ThA2时,确定所述第二模型编号为第七值,所述第七值为非负整数;或
    在所述当前节点的面积小于或等于所述第三面积阈值ThA3时,确定所述第二模型编号为第八值,所述第八值为非负整数;
    所述第一值、第六值、第七值和第八值互不相同。
  51. 根据权利要求39所述的装置,其特征在于,所述第二模型编号确定模块具体用于根据所述当前节点所属的编码树的类型,以及所述当前节点的MTT深度与MTT深度阈值ThD的大小关系,确定所述第二模型编号。
  52. 根据权利要求51所述的装置,其特征在于,所述第二模型编号确定模块具体用于:
    在所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定第二模型编号为第九值,所述第九值为非负整数;或
    在所述当前节点所属的编码树为色度编码树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第十值,所述第十值为非负整数;或
    在所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度小于所述MTT深度阈值ThD时,确定所述第二模型编号为第十一值,所述第十一值为非负整数;或
    在所述当前节点所属的编码树为亮度编码树或亮度色度联合树,所述当前节点的MTT深度大于或等于所述MTT深度阈值ThD时,确定所述第二模型编号为第十二值,所述第十二值为非负整数;
    所述第九值、第十值、第十一值和所述第十二值互不相同。
PCT/CN2019/077782 2018-03-16 2019-03-12 划分标志位的上下文建模方法及装置 WO2019174567A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19766770.2A EP3761646A4 (en) 2018-03-16 2019-03-12 PARTITION INDICATOR BIT CONTEXT MODELING METHOD AND DEVICE
US17/021,259 US11323746B2 (en) 2018-03-16 2020-09-15 Context modeling method and apparatus of split flag

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810219551 2018-03-16
CN201810219551.5 2018-03-16
CN201811109475.9 2018-09-21
CN201811109475.9A CN110278443B (zh) 2018-03-16 2018-09-21 划分标志位的上下文建模方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/021,259 Continuation US11323746B2 (en) 2018-03-16 2020-09-15 Context modeling method and apparatus of split flag

Publications (1)

Publication Number Publication Date
WO2019174567A1 true WO2019174567A1 (zh) 2019-09-19

Family

ID=67907438

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077782 WO2019174567A1 (zh) 2018-03-16 2019-03-12 划分标志位的上下文建模方法及装置

Country Status (2)

Country Link
US (1) US11323746B2 (zh)
WO (1) WO2019174567A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112689145A (zh) * 2020-12-07 2021-04-20 中南大学 一种vvc帧内编码的快速帧内模式选择方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1681330A (zh) * 2004-03-08 2005-10-12 三星电子株式会社 自适应2n叉树生成方法及3D体数据编码和解码方法和设备
US20060047501A1 (en) * 2004-09-02 2006-03-02 Gadiell Seroussi Method and system for producing variable length context models
US20120026020A1 (en) * 2010-07-28 2012-02-02 Research In Motion Limited Method and device for compression of binary sequences by grouping multiple symbols
CN102783154A (zh) * 2010-02-26 2012-11-14 捷讯研究有限公司 采用双码集的编码和解码方法和设备
CN107005718A (zh) * 2014-12-10 2017-08-01 联发科技(新加坡)私人有限公司 使用二叉树块分区的视频编码的方法

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996921B (zh) 2006-12-31 2010-11-24 华为技术有限公司 建立业务连接的方法、路由设备、业务网络
ES2954657T3 (es) * 2009-05-29 2023-11-23 Mitsubishi Electric Corp Dispositivo de codificación de imágenes, dispositivo de decodificación de imágenes, método de codificación de imágenes y método de decodificación de imágenes
KR101452860B1 (ko) 2009-08-17 2014-10-23 삼성전자주식회사 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치
KR101442127B1 (ko) 2011-06-21 2014-09-25 인텔렉추얼디스커버리 주식회사 쿼드트리 구조 기반의 적응적 양자화 파라미터 부호화 및 복호화 방법 및 장치
US20130188717A1 (en) 2012-01-20 2013-07-25 Qualcomm Incorporated Motion prediction in svc using partition mode without split flag
LT2940999T (lt) 2013-01-04 2019-07-10 Samsung Electronics Co., Ltd. Išpjovos segmentų entropinio dekodavimo būdai
CN104853220B (zh) 2015-05-18 2017-08-25 武汉随锐亿山科技有限公司 一种hevc编码四叉树的递推译码方法
US10863207B2 (en) * 2015-11-27 2020-12-08 Mediatek Inc. Method and apparatus of entropy coding and context modelling for video and image coding
MX2018011198A (es) 2016-03-16 2019-05-20 Mediatek Inc Metodo y aparato de procesamiento de datos de video con tamaño restringido de bloque en codificacion de video.
US10609423B2 (en) * 2016-09-07 2020-03-31 Qualcomm Incorporated Tree-type coding for video coding
EP3306927A1 (en) * 2016-10-05 2018-04-11 Thomson Licensing Encoding and decoding methods and corresponding devices
WO2018110462A1 (ja) * 2016-12-16 2018-06-21 シャープ株式会社 画像復号装置及び画像符号化装置
US10887594B2 (en) * 2018-07-05 2021-01-05 Mediatek Inc. Entropy coding of coding units in image and video data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1681330A (zh) * 2004-03-08 2005-10-12 三星电子株式会社 自适应2n叉树生成方法及3D体数据编码和解码方法和设备
US20060047501A1 (en) * 2004-09-02 2006-03-02 Gadiell Seroussi Method and system for producing variable length context models
CN102783154A (zh) * 2010-02-26 2012-11-14 捷讯研究有限公司 采用双码集的编码和解码方法和设备
US20120026020A1 (en) * 2010-07-28 2012-02-02 Research In Motion Limited Method and device for compression of binary sequences by grouping multiple symbols
CN107005718A (zh) * 2014-12-10 2017-08-01 联发科技(新加坡)私人有限公司 使用二叉树块分区的视频编码的方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112689145A (zh) * 2020-12-07 2021-04-20 中南大学 一种vvc帧内编码的快速帧内模式选择方法
CN112689145B (zh) * 2020-12-07 2024-02-13 中南大学 一种vvc帧内编码的快速帧内模式选择方法

Also Published As

Publication number Publication date
US20200413103A1 (en) 2020-12-31
US11323746B2 (en) 2022-05-03

Similar Documents

Publication Publication Date Title
TWI674790B (zh) 一種影像資料的編碼、解碼方法及裝置
US11328450B2 (en) Point cloud encoding method, point cloud decoding method, encoder, and decoder
JP5792382B2 (ja) ビデオコーディングにおける最後の有意変換係数のスキャン順序での位置の導出
TWI678104B (zh) 影像編解碼方法、影片編解碼器及影片編解碼系統
BR112019018464A2 (pt) indicador de filtragem intra na codificação de vídeo
TW201906406A (zh) 與視訊寫碼中之變換處理一起應用之內部濾波
TW201843999A (zh) 用於視訊寫碼之框內參考濾波器
TW202143717A (zh) 視頻譯碼中的亮度映射與色度縮放(lmcs)
WO2018219020A1 (zh) 一种视频图像的编解码方法及装置
WO2015180428A1 (zh) 帧内预测编码的视频编码方法及视频编码装置
BR112014009431B1 (pt) Método para codificar dados de vídeo, aparelho para codificar vídeo e memória legível por computador
TW202041017A (zh) 視訊寫碼中之隱式變換選擇
CN110278443B (zh) 划分标志位的上下文建模方法及装置
US11032552B2 (en) Video encoding method, video encoding apparatus, electronic device, and storage medium
US11483561B2 (en) Transform method in picture block encoding, inverse transform method in picture block decoding, and apparatus
WO2022121650A1 (zh) 点云属性的预测方法、编码器、解码器及存储介质
WO2019174567A1 (zh) 划分标志位的上下文建模方法及装置
WO2023044868A1 (zh) 视频编解码方法、设备、系统、及存储介质
WO2020135371A1 (zh) 一种标志位的上下文建模方法及装置
TW202143708A (zh) 用於圖像和視訊解碼的區塊分割
TW202110195A (zh) 具有用於視訊寫碼之選擇性改寫之算術寫碼
WO2023024842A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2023173255A1 (zh) 图像编解码方法、装置、设备、系统、及存储介质
WO2023083263A1 (zh) 视频编解码方法及装置
WO2023272517A1 (zh) 编解码方法、码流、编码器、解码器及计算机存储介质

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019766770

Country of ref document: EP

Effective date: 20200928