WO2012095032A1 - 指示和获取用户流数的方法及通信装置 - Google Patents

指示和获取用户流数的方法及通信装置 Download PDF

Info

Publication number
WO2012095032A1
WO2012095032A1 PCT/CN2012/070387 CN2012070387W WO2012095032A1 WO 2012095032 A1 WO2012095032 A1 WO 2012095032A1 CN 2012070387 W CN2012070387 W CN 2012070387W WO 2012095032 A1 WO2012095032 A1 WO 2012095032A1
Authority
WO
WIPO (PCT)
Prior art keywords
current
stripe
lcu
position information
strip
Prior art date
Application number
PCT/CN2012/070387
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2012095032A1 publication Critical patent/WO2012095032A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/174Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process

Definitions

  • the present invention relates to a codec technology, and specifically relates to a stripe coding method and apparatus, a stripe decoding method and apparatus in a New Generation Video Coding (HEVC). Background technique
  • MPEG-2 Moving Pictures Experts Group 2
  • MPEG-4 Moving Picture Experts Group Series 4
  • H Video coding and decoding technologies such as .264
  • new requirements such as the desire to meet the requirements of high definition and 3D
  • new applications such as home theater, remote monitoring, digital broadcasting, mobile streaming, portable imaging, medical imaging and the like.
  • HEVC High Efficiency Video Coding
  • HEVC uses a new coding structure. Specifically, a video image is divided into an integer number of coding units (CUs, Coding Units), CUs are squares, and the size of the CU is variable.
  • the generation process of the CU is briefly described as follows. First, a video image is divided into an integer number of largest coding units (LCUs) that do not overlap; further, the LCU can be split into four CUs of the same size; further, the The four CUs can be split into four smaller CUs of the same size; the splitting process can be continued until the size of the split CU reaches a specified minimum value, which is the Smallest Coding Unit (SCU).
  • SCU Smallest Coding Unit
  • Each CU has two possibilities of splitting and non-split. Whether the CU continues to split or not split can be identified by an identifier. Therefore, the CU may have different sizes in the actual encoding process.
  • the ⁇ , ⁇ 1 stripe includes an integer number of CUs. Specifically, one stripe may include only one CU, and may also include all CUs of the entire video image, such that one video image may be encoded into one or more strips.
  • an existing method is to carry the absolute position information of the starting SCU of the strip in the strip header, so that the decoding end can determine according to the absolute position information.
  • the starting position of the strip wherein the absolute position information of the starting S CU refers to the position information of the starting S CU in the video image, and the absolute position information may specifically be the serial number of the scu.
  • the sequence number of the starting SCU of the strip may be very large, so that the number of bits required to encode the strip start position information also increases sharply, reducing network utilization efficiency.
  • the embodiment of the invention provides a stripe encoding method and device, a stripe decoding method and a device, which can reduce the number of bits required for encoding stripe start position information and improve network utilization efficiency.
  • an embodiment of the present invention provides a strip coding method, including:
  • the current divided object is divided into strips
  • start position information of the current stripe includes: absolute position information of the starting LCU in the image in the current strip, and the current Relative position information of the starting SCU in the starting LCU in the stripe;
  • the current stripe is encoded, and an encoded code stream is output.
  • another embodiment of the present invention provides a stripe decoding method, including: parsing start position information of a current stripe from a start location information field, where the start location information of the current stripe includes: Absolute position information of the starting LCU in the image in the current stripe, and relative position information of the starting SCU in the starting LCU in the current stripe;
  • another embodiment of the present invention provides a stripe encoding apparatus, including: a dividing unit, configured to divide a current divided object into strips by a CU;
  • a writing unit configured to write, in a start position information field, start position information of a current strip obtained by the dividing unit;
  • the starting position information of the current stripe includes: a starting LCU in the current stripe Absolute position information in the image, and relative position information of the starting SCU in the starting LCU in the current stripe;
  • an encoding processing unit configured to encode the current stripe obtained by the writing unit, and output the encoded code stream.
  • another embodiment of the present invention provides a strip decoding apparatus, including: an parsing unit, configured to parse a starting position information of a current strip from a starting location information field, where the current strip starts The location information includes: absolute location information of the starting LCU in the image in the current stripe, and relative location information of the starting SCU in the starting LCU in the current stripe; a decoding unit, configured to The starting position information obtained by the parsing unit starts decoding the current strip, and determines to complete decoding of the current strip according to a preset processing manner;
  • an output unit configured to output a reconstructed image of the strip obtained by the decoding unit.
  • the start location information field used in the embodiment of the present invention includes a start LCU location information field and a start SCU location information field, so that the start location information of the stripe can be It is determined by the absolute position information of the LCU and the relative position information of the SCU, and the number of LCUs in one video image is less than the number of SCUs, and the number of SCUs in one LCU is also less than the number of SCUs in one image, so the LCU is The number of the serial number and the relative sequence number of the SCU are small, thereby reducing the number of bits required for encoding the strip start position information and improving the network utilization efficiency; and the decoding device can directly parse the starting LCU position during decoding.
  • the information field and the location information in the initial SCU location information field are directly located to the start position of the strip according to the parsed location information, thereby improving decoding efficiency.
  • FIG. 1 is a flowchart of a stripe encoding method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a stripe encoding method according to another embodiment of the present invention.
  • FIG. 3 is a flowchart of a stripe encoding method according to another embodiment of the present invention.
  • FIG. 4 is a flowchart of a stripe decoding method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a stripe decoding method according to another embodiment of the present invention.
  • FIG. 6 is a flowchart of a stripe decoding method according to another embodiment of the present invention.
  • FIG. 7 is a structural diagram of a strip coding apparatus according to an embodiment of the present invention.
  • FIG. 8 is a structural diagram of a strip decoding apparatus according to another embodiment of the present invention.
  • FIG. 9 is a structural diagram of a strip coding apparatus according to another embodiment of the present invention.
  • FIG. 10 is a structural diagram of a strip decoding apparatus according to an embodiment of the present invention. detailed description
  • the absolute position information of the starting LCU may be the sequential absolute position information or the reverse absolute position information of the starting LCU in the image; wherein, the absolute position information of the starting LCU of the current strip in the image is specific. It may be the serial number of the starting LCU in the image. For example, one image includes 10 LCUs, the serial numbers are 0 ⁇ 9, and the starting LCU of the current strip is the 4th LCU in the image, then the order of the starting LCU is absolutely The position information is 3, and the reverse absolute position information of the starting LCU is 5.
  • the relative position information of the starting SCU may be the sequential relative position information or the reverse relative position information of the starting SCU in the starting LCU.
  • the order relative position information of the starting SCU in the starting LCU may specifically be the current strip.
  • Position information of the starting SCU relative to the first SCU in the starting LCU such as the first SCU of the starting LCU in the image
  • the sequence absolute position information or the reverse order absolute position information is used as the absolute position information of the starting LCU; nor when to use the sequential relative position information or the reverse relative position information of the starting SCU in the starting LCU as the relative position information of the starting SCU. .
  • the absolute position information of the ending LCU may be the ending absolute position information or the reverse absolute position information of the ending L CU in the image; the ending position information of the ending SCU may be the ending SCU in the ending LCU.
  • the order relative position information or the reverse relative position information is used as the absolute position information of the ending LCU; nor when the end of the SCU is used to end the relative position information or the reverse relative position information in the LCU as the relative position information of the ending SCU.
  • FIG. 1 is a flowchart of a stripe encoding method according to an embodiment of the present invention.
  • the embodiment includes:
  • the decision information may be at least one of an input configuration, and an input parameter, and a video source, different input configurations, and/or input parameters, and/or video sources may be different.
  • Strip division type In one embodiment of the invention, the strip partition type may be divided by LCU or by CU.
  • the current partitioning object may specifically be a current image sequence, or a current video image, or a current image strip or the like.
  • the start location information field may be located at the head of the current stripe, or at the head of the sequence parameter set, or at the head of the image parameter set.
  • the start location information field includes only one field, that is, the start location information of the current stripe can be directly written into the one field, and the start location information of the current stripe can be The absolute position information of the starting SCU in the image.
  • the start location information field includes a start LCU location information field and a start SCU location information field; at this time, the start location information of the current stripe is written in the start location information field.
  • the starting SCU of the current stripe is the starting SCU of the starting LCU when the current partitioning object is divided by the LCU, and the relative position information of the starting SCU in the starting LCU is 0.
  • the current stripe may be encoded by using a VLC encoding method or a non-VLC encoding method.
  • the step may further include the step of: writing the end position information of the current stripe in the end position information field before encoding the current stripe. It can be understood that when the current stripe is encoded by VLC encoding, the step can also be included before encoding the current stripe.
  • the end position information field can be located at the head of the current stripe, at the head of the sequence parameter set, or at the head of the image parameter set.
  • the end location information field includes only one field, that is, the end position information of the current stripe can be directly written into the one field, for example, the end position information of the current stripe is the length information of the current stripe.
  • the end position of the current strip can be determined by the start position information of the current strip and the length information of the current strip.
  • the length information of the current strip is specifically: the current strip. The number of LCUs included and the relative relative position or reverse relative position of the ending CU in the ending LCU; or the number of CUs included in the current stripe; or the number of SCUs included in the current stripe.
  • the end position information of the current strip may also be the absolute position information of the ending SCU in the image.
  • the end location information field includes an end LCU location information field and an end SCU location information field; at this time, the end location information of the current stripe written in the end location information field is specifically: at the end of the LCU The location information field writes the absolute location information of the end LCU of the current stripe in the image, and ends the SCU location information field write end SCU relative position information in the end LCU.
  • the ending SCU of the current strip is the ending SCU of the ending LCU
  • the relative position information of the ending SCU in the ending LCU is the starting SCU of the SCU relative to the ending LCU. Location information.
  • the step of encoding the current stripe may further include the steps of: assigning a stripe end flag bit of all CUs in the current stripe.
  • the strip end flag is located at the last bit of the data payload of the last SCU of each CU included in the current strip, where the end of the strip end flag in the CU is valid. It can be understood that when the current stripe is encoded by VLC encoding, the step can also be included before encoding the current stripe.
  • the stripe partitioning type of the current partitioning object can be determined according to the judgment information, and the current partitioning object is divided into strips according to the determined stripe partitioning type, so that the data size of the divided stripe can be adapted to the network. And different strips can be used in different networks to enhance network compatibility.
  • the used start location information field includes a start LCU location information field and a start SCU location information field, so that the decoding apparatus can directly parse the start LCU location information field and The location information in the initial SCU location information field is directly located to the start position of the strip according to the parsed location information, thereby improving decoding efficiency.
  • the end position information of the current stripe may be written in the end position information field, so that the decoding apparatus can directly determine the decoding completion according to the end position information, thereby improving while ensuring correct decoding. Decoding efficiency.
  • FIG. 2 is a flowchart of a stripe encoding method according to another embodiment of the present invention. The embodiment includes:
  • the partition type information field may be located at a header of the sequence parameter set, or The head of the image parameter set, or the strip head of the strip, and so on.
  • the start location information field includes only one field, that is, the start location information of the current stripe can be directly written into the one field, and the start location information of the current stripe may be ended. Absolute position information of the SCU in the image.
  • the start location information field includes a start LCU location information field and a start SCU location information field; at this time, the start location information of the current stripe is written in the start location information field.
  • the strip partition type is divided by LCU
  • the absolute position information of the starting LCU of the current stripe in the image is written only in the starting LCU position information field; if the strip partition type is divided by CU, at the start The LCU location information field writes the absolute location information of the starting LCU in the picture, and the relative location information of the starting SCU in the starting LCU is written in the starting SCU location information field.
  • the current stripe may be encoded by using a VLC encoding method or a non-VLC encoding method.
  • the step may further include the step of: writing the end position information of the current stripe in the end position information field before encoding the current stripe. It can be understood that when the current stripe is encoded by VLC encoding, the step can also be included before encoding the current stripe.
  • the end position information field can be located at the head of the current stripe, at the head of the sequence parameter set, or at the head of the image parameter set.
  • the end location information field includes only one field, that is, the end position information of the current stripe can be directly written into the one field, for example, the current stripe.
  • the end position information is the length information of the current strip.
  • the end position of the current strip can be determined by the start position information of the current strip and the length information of the current strip; in one embodiment of the present invention, the current strip
  • the length information of the band is specifically: the number of LCUs included in the current stripe and the sequential relative position or reverse relative position of the ending CU in the ending LCU; or the number of CUs included in the current stripe; or the number of SCUs included in the current stripe .
  • the end position information of the current strip may also be the absolute position information of the ending SCU in the image.
  • the end location information field includes an end LCU location information field and an end SCU location information field; at this time, the end location information of the current stripe written in the end location information field is specifically:
  • the division type is divided into LCUs, and the absolute position information of the end LCU in the image is written only in the end LCU position information field; if the strip division type is divided by CU, the end LCU position information field is written to the end LCU
  • the absolute position information in the image is written at the end SCU position information field to end the relative position information of the SCU in the end LCU.
  • the encoding of the current stripe further includes: The strip end flag of the LCU is assigned, and the strip end flag is located at the last bit of the data payload of the last SCU of each LCU included in the current stripe, where the end of the strip end flag in the LCU is valid.
  • the method further includes: assigning a stripe end flag bit of all CUs in the current stripe, and the stripe end flag bit is located in each CU included in the current stripe.
  • the stripe partitioning type of the current partitioning object can be determined according to the judgment information, and the current partitioning object is divided into strips according to the determined stripe partitioning type, so that the data size of the divided stripe can be adapted to the network. And different strips can be used in different networks to enhance network compatibility.
  • the stripe type information of the current partition object can be written into the partition type information field, so that the decoding device can The division type of the current stripe is known, thereby determining whether the decoding is completed according to the division type information, and improving the decoding efficiency while ensuring correct decoding.
  • the used start location information field includes a start LCU location information field and/or a start SCU location information field, so that the decoding apparatus can directly parse the start LCU location information when decoding.
  • the location information in the field and/or the starting SCU location information field is directly located to the starting position of the strip according to the parsed location information, thereby improving decoding efficiency. Since the decoding device can know the division type of the current stripe, when the current strip is divided by the LCU, data can be written only to the start LCU location information field, and no data needs to be written to the start SCU location information field, so that The amount of data to be written is reduced, and the coding efficiency is improved. The decoding device does not need to parse the initial SCU location information field to further improve the decoding efficiency.
  • the end position information of the current stripe may be written in the end position information field, so that the decoding apparatus can directly determine the decoding completion according to the end position information, thereby improving while ensuring correct decoding. Decoding efficiency.
  • the used end location information field includes an End LCU Location Information field and/or an End SCU Location Information field, such that the decoding device can directly parse the End LCU Location Information field and/or end the SCU when decoding. The location information in the location information field is directly located at the end position of the strip according to the parsed location information, thereby improving decoding efficiency.
  • the decoding device can know the division type of the current stripe, when the current strip is divided by the LCU, data can be written only to the end LCU location information field without writing data to the end SCU location information field, thereby reducing the need
  • the amount of data written increases the coding efficiency; the decoding device can also be configured to further improve the decoding efficiency without parsing the end SCU position information field.
  • the strip end flag bits of all CUs in the current stripe may be assigned, and the strip end flag bit in the ending CU is assigned a value, so that the decoding apparatus can decode Whether the decoding is completed or not is determined according to whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding. If the decoding apparatus can learn the division type of the current stripe, the decoding apparatus can determine whether the decoding is completed or not, and further improve the decoding efficiency, by parsing only the end flag of the last CU of the current stripe when the current strip is divided by the LCU.
  • FIG. 3 is a flowchart of a stripe encoding method according to another embodiment of the present invention, including:
  • the start location information field may be located at the head of the current stripe, or at the head of the sequence parameter set, or at the head of the image parameter set.
  • the starting position information of the current stripe includes: the absolute position information of the starting LCU in the image in the current stripe, and the relative position of the starting SCU in the starting LCU in the current stripe.
  • the current stripe may be encoded by using a VLC encoding method or a non-VLC encoding method.
  • the step may further include the step of: writing the end position information of the current stripe in the end position information field before encoding the current stripe. It can be understood that when the current stripe is encoded by VLC encoding, the step can also be included before encoding the current stripe.
  • the end position information field can be located at the head of the current stripe, at the head of the sequence parameter set, or at the head of the image parameter set.
  • the end location information field includes only one field, that is, the end position information of the current stripe can be directly written into the one field, for example, the end position information of the current stripe is the length information of the current stripe.
  • the end position of the current strip can be determined by the start position information of the current strip and the length information of the current strip.
  • the length information of the current strip is specifically: the current strip. The number of LCUs included and the relative relative position or reverse relative position of the ending CU in the ending LCU; or the number of CUs included in the current stripe; or the number of SCUs included in the current stripe.
  • the end position information of the current strip may also be the absolute position information of the ending SCU in the image.
  • the end location information field includes an end LCU location information field and an end SCU location information field; at this time, the end location information of the current stripe written in the end location information field is specifically: at the end of the LCU
  • the position information field is written to the absolute position information of the end LCU of the current stripe in the image, and the SCU position information word is ended.
  • the segment write ends the relative position information of the SCU at the end of the LCU.
  • the step of encoding the current stripe may further include the steps of: assigning a stripe end flag bit of all CUs in the current stripe.
  • the strip end flag is located at the last bit of the data payload of the last SCU of each CU included in the current strip, where the end of the strip end flag in the CU is valid. It can be understood that when the current stripe is encoded by VLC encoding, the step can also be included before encoding the current stripe.
  • the start location information field that can be used in this embodiment includes a start LCU location information field and a start SCU location information field, so that the decoding apparatus can directly parse the start LCU location information field and the start SCU location when decoding.
  • the location information in the information field is directly located to the starting position of the strip according to the parsed location information, thereby improving decoding efficiency.
  • the end position information of the current stripe may be written in the end position information field, so that the decoding apparatus can directly determine the decoding completion according to the end position information, thereby improving while ensuring correct decoding. Decoding efficiency.
  • the strip end flag bits of all CUs in the current stripe may be assigned, and the strip end flag bit in the ending CU is assigned a value, so that the decoding apparatus can decode Whether the decoding is completed or not is determined according to whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding.
  • the location information of the current CU in the first LCU may be further determined whether the split flag is set for the current CU. . Specifically, if the current CU is not within the current partitioning target or the size of the current CU is the size of the SCU, the split flag of the current CU may not be encoded.
  • the split flag of the current CU is encoded when the current CU is within the current partition target and the size of the current CU is larger than the size of the SCU, and the current CU end position is greater than or equal to the position of the current strip start CU. It can be seen that the splitting flag of some CUs can be encoded in this embodiment, so that the data of the splitting identifiers need not be transmitted, thereby reducing network occupation and improving network utilization efficiency.
  • a flow of a stripe decoding method provided by an embodiment includes:
  • the start location information field includes a start LCU location information field and a start SCU location information field; in this case, the start location information of the current stripe is parsed from the start location information field, specifically : parsing the absolute location information of the starting LCU of the current stripe from the starting LCU location information field, and parsing the relative location information of the starting SCU of the current stripe from the starting SCU location information field.
  • determining, according to the preset processing manner, that the decoding of the current strip is completed is: parsing the end position information of the current strip from the end position information field; determining, according to the end position information, completing the current strip. decoding.
  • the end location information field includes an end LCU location information field and an end SCU location information field; in this case, the end location information of the current stripe is parsed from the end location information field, specifically: from the end LCU location
  • the information field parses the absolute position information of the end LCU of the current stripe, and parses the relative position information of the end SCU of the current stripe from the end SCU position information field.
  • the end position information of the current stripe obtained by the parsing is the length information of the current stripe, and whether the current stripe is completed may be determined according to the length information and the starting position information of the current stripe.
  • Decoding In another embodiment of the present invention, the parsed end position information of the current strip is the absolute position information of the ending S CU, and whether the decoding is completed may be determined directly according to the absolute position information of the ending SCU.
  • determining, according to the preset processing manner, that decoding of the current stripe is completed is: determining whether the value of the strip end flag bit of the current CU is valid, and if valid, determining to complete the current stripe Decode, the strip end flag is located at the last bit of the data payload of the last SCU of the current CU.
  • the current stripe is obtained by using the VLC encoding method. Therefore, determining the completion of decoding the current strip according to the preset processing manner may be: determining whether the current CU has data payload, if If the current CU has no data payload, it can be confirmed that the decoding of the current stripe is completed.
  • the current strip is obtained according to the strip partition type, and the strip partition type is determined according to the decision information, so the stripe size can be adapted to the network, and different networks can be used in different networks. Striping is divided to enhance network compatibility.
  • the used start location information field includes a start LCU location information field and a start SCU location information field, so the start LCU location information field and the start SCU location information can be directly parsed
  • the position information in the field is directly positioned to the starting position of the strip according to the parsed position information, thereby improving decoding efficiency.
  • decoding completion can be directly determined based on the end position information, thereby improving decoding efficiency while ensuring correct decoding.
  • whether the decoding is completed or not can be determined based on whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding.
  • FIG. 5 is a flowchart of a stripe decoding method according to another embodiment of the present invention, including:
  • the strip partition type information is divided by the LCU.
  • the start location information of the current strip is parsed from the start location information field according to the strip partition type information.
  • the LCU location information field parses the absolute location information of the starting LCU of the current stripe, the start location information field including only the starting LCU location information field.
  • the strip partition type information is divided into CUs, and the start position information of the current strip is parsed from the start location information field according to the strip partition type information, specifically: starting LCU location information
  • the field parses the absolute position information of the starting LCU of the current stripe, and parses the relative position information of the starting SCU of the current stripe from the starting SCU position information field, where the starting position information field includes the starting LCU position information field and the starting SCU Location information field.
  • the strip partition type information is divided into CUs, and the start position information of the current strip is parsed from the start location information field according to the strip partition type information, which is specifically: from the start SCU location information.
  • Field parsing of the current strip The absolute position information of the starting SCU, the starting position information field includes only the starting SCU position information field.
  • determining, according to the preset processing manner, that the decoding of the current strip is completed is: parsing the end position information of the current strip from the end position information field; determining, according to the end position information, completing the current strip. decoding.
  • the end position information of the current stripe obtained by the parsing is the length information of the current stripe, and whether the decoding of the current stripe is completed may be determined according to the length information and the starting position information of the current stripe. .
  • the length information of the current stripe may be the number of LCUs included in the current stripe; when the current stripe is partitioned by the CU, the length information of the current stripe may be the LCU of the current stripe.
  • determining, according to the preset processing manner, that the decoding of the current stripe is completed is: parsing the end position information of the current stripe from the end location information field according to the strip partition type information; The location information determines that the decoding of the current stripe is completed.
  • the end position information of the current strip is parsed from the end position information field according to the strip partition type information.
  • the strip partition type information is by LCU.
  • the splitting, parsing the end position information of the current stripe from the end position information field according to the strip partition type information is specifically: parsing the absolute position information of the ending LCU of the current stripe from the ending LCU position information field, and the ending position information field includes only the ending LCU Location information field.
  • the strip partition type information is divided into CUs, and the end position information of the current strip is parsed from the end position information field according to the strip partition type information, specifically: parsing the current LCU location information field from the end The absolute position information of the ending LCU of the stripe, parsing the relative position information of the ending SCU of the current stripe from the ending SCU position information field, the ending position information field including the ending LCU position information field and the ending SCU position information field;
  • the strip partition type information is divided into CUs, and the end position information of the current strip is parsed from the end position information field according to the strip partition type information, specifically: from the end SCU position The information field parses the absolute position information of the end SCU of the current stripe, and the end position information field includes only the end SCU position information field.
  • determining to complete the decoding of the current strip according to the preset processing manner is specifically: if the strip partition type information is divided by the LCU, determining whether the value of the strip end flag of the current LCU is valid. If it is valid, it is determined that the decoding of the current strip is completed. The strip end flag is located at the last bit of the data payload of the last SCU of the current LCU. If the strip partition type information is divided by CU, it is determined whether the value of the strip end flag of the current CU is valid. If it is valid, it is determined that the decoding of the current strip is completed, and the strip end flag is located in the last SCU of the current CU. The last digit of the data payload.
  • the current stripe is obtained by using the VLC encoding method. Therefore, determining the completion of decoding the current strip according to the preset processing manner may be: determining whether the current CU has data payload, if If the current CU has no data payload, it can be confirmed that the decoding of the current stripe is completed.
  • the current strip is obtained according to the strip partition type, and the strip partition type is determined according to the decision information, so the stripe size can be adapted to the network, and different networks can be used in different networks. Striping mode, thereby enhancing network compatibility.
  • the present embodiment can also learn the partition type of the current strip according to the parsed partition type information, so as to determine whether the decoding is completed according to the partition type information, and ensure correct decoding. At the same time improve the decoding efficiency.
  • the used start location information field includes a start LCU location information field and a start SCU location information field, so the start LCU location information field and the start SCU location information can be directly parsed
  • the position information in the field is directly positioned to the starting position of the strip according to the parsed position information, thereby improving decoding efficiency. Since the division type of the current stripe can be known, when the current strip is divided by the LCU, data can be written only to the start LCU location information field without writing data to the start SCU location information field, thereby reducing the need The amount of data written increases the coding efficiency; it also does not need to parse the starting SCU location information field to further improve the decoding efficiency.
  • decoding completion can be determined directly based on the end position information, thereby improving decoding efficiency while ensuring correct decoding.
  • the used end location information field includes an ending LCU location information field and an ending SCU location information field, so that the location information in the ending LCU location information field and the ending SCU location information field can be directly parsed, and then obtained according to the parsing.
  • the position information is directly positioned to the end position of the strip, thereby improving decoding efficiency. Since the division type of the current stripe can be known, it is not necessary to parse the end SCU location information field, thereby further improving the decoding efficiency.
  • whether the decoding is completed or not can be determined based on whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding. Since the division type of the current stripe can be known, when the current strip is divided by the LCU, only the end flag of the last CU of the current stripe is parsed to determine whether the decoding is completed, and the decoding efficiency is further improved.
  • FIG. 6 is a flowchart of a stripe decoding method according to another embodiment of the present invention, including: 601. Parse a starting location information of a current stripe from a start location information field.
  • the starting position information of the current stripe includes: absolute position information of the starting LCU in the image in the current stripe, and relative position information of the starting SCU in the starting LCU in the current stripe.
  • the start location information field includes a start LCU location information field and a start SCU location information field; in this case, the start location information of the current stripe is parsed from the start location information field, specifically : parsing the absolute location information of the starting LCU of the current stripe from the starting LCU location information field, and parsing the relative location information of the starting SCU of the current stripe from the starting SCU location information field.
  • determining, according to the preset processing manner, that the decoding of the current strip is completed is: parsing the end position information of the current strip from the end position information field; determining, according to the end position information, that the current strip is completed. decoding.
  • the ending location information field includes an ending LCU location information field and an ending SCU location information field.
  • parsing the ending location information of the current stripe from the ending location information field is specifically: parsing the current stripe from the ending LCU location information field Ending the absolute position information of the LCU, and parsing the relative position information of the end SCU of the current stripe from the end SCU position information field.
  • the end position information of the current stripe obtained by the parsing is the length information of the current stripe, and whether the decoding of the current stripe is completed may be determined according to the length information and the starting position information of the current stripe.
  • the length information of the current stripe may be the number of LCUs included in the current stripe and the sequential relative position or reverse relative position of the ending CU in the ending LCU; or the number of CUs included in the current stripe; or the current strip includes The number of SCUs.
  • the parsed end position information of the current strip is the absolute position information of the ending SCU, and whether the decoding is completed may be directly determined according to the absolute position information of the ending SCU.
  • the start location information field that can be used in this embodiment includes a start LCU location information field and a start SCU location information field, so that the location in the start LCU location information field and the start SCU location information field can be directly parsed.
  • the information is directly located at the starting position of the strip according to the parsed position information, thereby improving decoding efficiency.
  • decoding completion can be determined directly based on the end position information, thereby improving decoding efficiency while ensuring correct decoding.
  • whether the decoding is completed or not can be determined based on whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding.
  • the process of starting decoding of the current stripe according to the starting location information may include: if the current CU is not in the current partitioning object range or the size of the current CU is the size of the SCU The current CU is not decoded in the current CU; if the current CU is within the current partitioning range and the current CU size is larger than the SCU size, and the current CU starting position is greater than or equal to the strip starting CU, the current CU is The split flag bit is decoded. It can be seen that the splitting flag of some CUs can be encoded in this embodiment, so that the data of the splitting identifiers need not be transmitted, thereby reducing the occupation of the network and improving the utilization efficiency of the network.
  • the HEVC syntax structure provided by the embodiment of the present invention is further described as follows.
  • the C field in the table indicates the classification of the syntax element; Descripter formulates the description of the corresponding syntax.
  • start location information field include the start LCU location information field and the starting SCU
  • syntax structure of the HEVC strip header starting position is as shown in Table 1.
  • the first_ leu— is — zero — flag is used to indicate whether the LCU at the beginning of the strip is the first LCU in the image. If first— leu — is — zero — flag is equal to 1, the strip starts. The LCU bit is set to 0 and the stripe decoding will start from a CU in the first LCU of the image.
  • First— scu — is — zero — flag
  • the CU used to indicate the start position of the strip is the first CU in the starting LCU. If first— scu — is — zero — flag is equal to 1, the strip starts.
  • the CU bit is set to 0 and the stripe decoding begins with the first CU of the starting LCU.
  • First— scu — in — slice — minus — 1 is used to indicate the specific location of the first CU of the stripe in the starting LCU ( SliceStartSCUAddress ), ie the upper left corner of the first CU of the strip, the SCU in the associated LCU Relative position offset, stripe decoding starts from the CU, and SliceStartSCUAddress is calculated as shown in Equation 2.
  • Step 1 Firstly, according to the information of the first level, the LCU to which the strip start position belongs is obtained: first parsing first_leu—is—zero — flag to determine whether the strip start LCU is the first LCU of the image. If not, then further parse first— leu — in — slice — minus — 1 to calculate the specific position of the strip starting LCU. The above formula one is shown.
  • Step 2 Re-parse the first_scu_is_zero_flag to determine if the strip start CU is the first CU in the LCU.
  • the value of first_scu_is_zero_flag must be 1 , so there is no need to further parse the information of the second level.
  • the strip decoding starts from the first CU of the strip starting LCU.
  • first_scu_is_zero_flag may be 0, then the second level information needs to be further parsed to accurately locate the starting position of stripe decoding (SliceStartSCUAddress), the specific calculation process As shown in Equation 2 above, the stripe decoding begins with the CU whose relative position is SliceStartSCUAddress in the strip start LCU.
  • last_leu— is—zero—flag is used to indicate whether the LCU at the end of the strip is the first LCU in the image. If last— leu— is—zero—flag is equal to 1, the strip ends the LCU. With the bit set to 0, the stripe decoding will end at one of the CUs in the first LCU.
  • Last— leu— in — slice—minus— 1 The position of the last LCU used to mark the strip is bundled with a CU in the LCU.
  • SliceEndLCUAddress last leu in slice minus 1 + 1 (Formula last_scu_is_end_flag is used to indicate whether the CU at the end of the strip ends the last CU in the LCU, if last_scu_is_end_flag Equal to 1, the CU position at the end of the strip is set to the last CU of the LCU, and the strip is decoded to the last CU of the end LCU.
  • Last— scu — in — slice — minus — 1 is used to indicate the specific position of the last CU of the strip in the end LCU ( SliceEndSCUAddress ), that is, the relative position of the SCU in the lower right corner of the last CU of the strip in the associated LCU Shift, stripe decoding to the CU cutoff.
  • the SliceEndSCUAddress calculation is shown in Equation 4.
  • the NumSCUsInLCU in Equation 4 is the total number of SCUs included in one LCU.
  • Step 1 Firstly, according to the information of the first level, the LCU to which the end position of the strip belongs is obtained: First parsing last_leu—is—zero—flag To determine whether the LCU is the first LCU of the image at the end of the strip, if not, then further analysis of last_leu_in_slice_subtract-1 to calculate the specific position of the starting LCU of the stripe.
  • the specific calculation process is as shown in the above formula IV. Shown.
  • Step 2 Re-parse last_scu_is_end_flag to determine if the end of the strip is the last CU in the LCU.
  • the value of last_scu_is_end_flag must be 1, so that no further parsing of the second-level information is required, and the stripe is decoded to the end of the stripe and the last CU of the LCU ends;
  • the last_scu_is_end_flag may be 0, and the second level information needs to be further parsed to accurately locate the end position of the stripe decoding (SliceEndSCUAddress).
  • the specific calculation process is as above. As shown in the fourth, the stripe is decoded to the end of the CU ending in the LCU with the relative position of SliceEndSCUAddress.
  • end location information field includes the end LCU location information field and the end SCU location information field
  • ending the LCU location information is ending the LCU in the reverse order absolute position in the image
  • ending the SCU location information is ending the SCU in the ending LCU
  • Table 3 The grammatical structure of the end position of the HEVC strip header provided by one embodiment of the present invention is shown in Table 3.
  • last_leu_ is_end_flag is used to indicate whether the LCU at the end of the strip is the last LCU in the image. If last_leu- is_end_flag is equal to 1, the LCU position at the end of the stripe Set to NumLCUsInPicture-1, where NumLCUsInPicture is the total number of LCUs included in a video image. Stripe decoding will end at one of the CUs in the last LCU of the image.
  • SliceEndLCUAddress Used to mark the position of the last LCU of the stripe ( SliceEndLCUAddress ), the stripe decoding will end at a certain CU in the LCU. SliceEndLCUAddress is calculated as shown in Equation 5.
  • the syntax structure of the HEVC coding unit end flag provided by an embodiment of the present invention is as shown in Table 4.
  • the split-coding_unit_flag is used to indicate whether the current CU is to be further split. If the split-coding_unit_flag is equal to 1, the current CU will continue to split into four CUs of the same level; split-coding-unit-flag is equal to 0, then the current CU is no longer split, and is encoded. The last level of CU.
  • moreDataFlag is used to indicate whether there is data for the current strip. If moreDataFlag is equal to 1, then the current stripe has more data waiting for decoding, stripe decoding will continue; moreDataFlag is equal to 0, then the current stripe data has been completely decoded, and the stripe decoding will end.
  • rbsp data is used to determine if the data payload is over. This operation returns 0 if the current strip has no more data payload, otherwise it returns 1.
  • Entropy— coding— mode—flag is used to select the entropy encoding of the syntax elements.
  • Entropy-coding_mode_flag is equal to 0, indicating that the encoding method can infer the end of the strip by judging the end of the stream data, and does not need to write the strip end flag;
  • entropy_coding_mode_flag is equal to 1 This kind of encoding method cannot infer the end of the strip by judging the end of the stream data, and some strip end flags are needed.
  • End_of_ slice_flag is the strip end marker bit. End_of_ slice_flag is equal to 1, indicating that the current CU is the last CU in the stripe, and the stripe decoding ends; end_of_slice_flag is equal to 0, indicating that the current CU is not the last CU in the stripe, the current strip The band needs to continue decoding the next CU.
  • each CU When decoding, each CU will first determine whether to continue splitting according to the split-coding_unit_flag. If the split-coding_unit_flag is equal to 1, the current CU is split into four smaller CUs, and each The CU performs the same CU parsing operation; until the split-coding_unit_flag of a certain CU is equal to 0, the current CU is the unit that actually decodes, enters the decoding reconstruction process, and parses the end of the strip after the current decoding reconstruction ends. Sign bit. The process is to first determine the entropy coding type of the current strip according to the entropy_coding_mode_flag.
  • the shell 1 J assigns a value to moreDataFlag according to the operation more_rbsp_data(); entropy- coding- mode- flag is equal to 1, J 1 shellfish need To parse the flag end_ of_ slice_flag and assign moreDataFlag equal to 1 to moreDataFlag, the stripe decoding will continue; if moreDataFlag is equal to 0, the stripe decoding will end.
  • the syntax structure of the HEVC strip header start location provided by one embodiment of the present invention is as shown in Table 5 or Table 6. .
  • first-leu-is_zero-flag is used to indicate whether the LCU at the beginning of the strip is the first LCU in the image. If first-leu-is_zero-flag is equal to 1, then The start LCU position is set to 0 and the stripe decoding will start from a CU in the first LCU of the image.
  • the leu_slice_flag is used to indicate the partition type of the current stripe.
  • the leu_slice_flag equal to 1 indicates that the current stripe partition is based on the LCU, so there is no need to further specify the location of the stripe starting CU; leu_slice- A flag equal to 0 indicates that the current strip partition is based on the CU, and the position of the CU starting from the strip needs to be further written.
  • the value of the identifier is generally parsed by the method as shown in the first embodiment, and may also be set by default.
  • first_scu_is_zero_flag is used to indicate whether the CU at the beginning of the strip is the first CU in the starting LCU.
  • first-scu_is_zero-flag is equal to 1
  • the start CU bit is set to 0 and the stripe decoding starts from the first CU of the starting LCU.
  • first— scu — is — zero — flag is used to indicate whether the CU at the beginning of the strip is the first CU in the image. If first— scu — is — zero — flag is equal to 1, the strip starts from The initial CU position is set to 0 and strip decoding begins with the first CU of the image.
  • first—scu—in_slice—minus—1 is used to indicate the specific location of the first CU of the stripe in the starting LCU (SliceStartSCUAddress), ie the first CU offset of the stripe, stripe Decoding begins with the CU.
  • first—scu—in_slice—minus—1 is used to indicate the specific position of the first CU of the stripe in the image (SliceStartSCUAddress), that is, the upper left corner of the first CU of the strip, the SCU in the image.
  • the absolute position offset in , strip decoding begins with the CU.
  • the SliceStartSCUAddress calculation is also shown in Equation 7.
  • Step 1 Firstly, according to the information of the first level, the LCU to which the strip start position belongs is obtained: first parsing first_leu—is—zero — flag to determine whether the strip start LCU is the first LCU of the image. If not, then further parse first— leu — in — slice — minus — 1 to calculate the specific position of the strip starting LCU.
  • first_leu—is—zero — flag to determine whether the strip start LCU is the first LCU of the image. If not, then further parse first— leu — in — slice — minus — 1 to calculate the specific position of the strip starting LCU.
  • the above formula 6 is shown.
  • Step 2 Determine the strip partition type according to leu_slice_flag.
  • Leu-slice_flag is equal to 1, indicating that the LCU-based stripe division does not require further parsing of the second-level information.
  • Stripe decoding starts from the first CU of the strip-start LCU;
  • leu_slice_flag is equal to 0 , indicating that the CU is based on strip partitioning, the second level information needs to be further parsed to accurately locate the starting position of the strip decoding ( SliceStartSCUAddress ;).
  • First parse first_scu_is_zero_flag to determine whether the strip start CU is the first CU of the LCU.
  • Step 1 Determine the strip partition type according to lcu_slice_flag.
  • Step 2 If lcu_slice_flag is equal to 1, indicating that the LCU is based on strip partitioning, only the position of the starting LCU of the stripe is parsed. First parse the first-lcu-is_zero-flag to determine if the stripe start LCU is the first LCU of the image. If not, then further parsing first-lcu-in-slice-next-1 is needed to calculate the strip start. The specific location of the LCU, the specific calculation process is as shown in the above formula 6. If the lcu_slice_flag is equal to 0, indicating that the CU is based on the stripe division, the position of the strip starting SCU needs to be parsed.
  • first_scu_is_zero_flag First parse first_scu_is_zero_flag to determine whether the stripe start CU is the first CU of the LCU. If not, then further parse first_scu_in_slice_subtract_1 to calculate the stripe
  • the specific location of the starting CU, the specific calculation process is as shown in the above formula 7, the strip decoding starts from the CU whose relative position in the strip starting LCU is SliceStartSCUAddress.
  • end location information field includes the end LCU location information field and the end SCU location information field
  • ending the LCU location information is ending the LCU in the order of the absolute position in the image
  • ending the SCU location information is ending the SCU in the ending LCU
  • Table 7 or Table 8 The grammatical structure of the end position of the HEVC strip header provided by one embodiment of the present invention is shown in Table 7 or Table 8.
  • the last_ leu — is — zero — flag is used to indicate whether the LCU at the end of the strip is the first LCU in the image. If last— leu — is — zero — flag is equal to 1, the strip Knot The bundle's LCU position is set to 0 and the stripe decoding will end at one of the CUs in the first LCU.
  • SliceEndLCUAddress is calculated as shown in Equation 8.
  • the leu_slice_flag is used to indicate the division type of the current stripe.
  • the leu_slice_flag is equal to 1 to indicate that the current stripe partition is based on the LCU, so there is no need to further specify the position of the stripe ending CU; leu_slice_flag If the value is equal to 0, the current strip partition is based on the CU, and the position of the strip end CU needs to be further written.
  • the value of the identifier is generally parsed by the method as shown in the first embodiment, and may also be set by default.
  • last_scu_is_zero_flag is used to indicate whether the CU at the end of the strip ends the first CU in the LCU. If last_scu_is_zero_flag is equal to 1, the strip ends. The CU position is set to 0, and the stripe is decoded to the end of the first CU of the LCU. In Table 8, last_scu_is_zero_flag is used to indicate whether the CU at the end of the strip is the first CU in the image. If last_scu_is_zero_flag is equal to 1, the strip ends. The CU position is set to 0 and the stripe is decoded to the first CU of the image.
  • last_scu_in_slice_min-1 is used to indicate the specific location of the last CU of the stripe in the end LCU (SliceEndSCUAddress), that is, the SCU in the lower right corner of the last CU of the stripe is in the associated LCU.
  • the relative position offset, the stripe is decoded to the CU cutoff.
  • SliceEndSCUAddress is calculated as shown in Equation 9.
  • last_scu_in_slicture-minus-1 is used to indicate the specific position of the last CU of the stripe in the image (SliceEndSCUAddress), that is, the lower right corner of the last CU of the strip, the SCU in the image. Absolute position, the stripe is decoded to the CU cutoff. SliceEndSCUAddress is calculated as shown in Equation 9.
  • Step 1 Firstly, according to the information of the first level, the LCU to which the end position of the strip belongs is obtained: First parsing last_leu—is—zero—flag To determine if the strip ends the LCU is the first image LCU, if not, need to further parse last_lcu_in_slice_next-1 to calculate the specific location of the LCU starting stripe. The specific calculation process is shown in Equation 8 above.
  • Step 2 Determine the strip partition type based on lcu_slice_flag.
  • Lcu_ slice_flag is equal to 1, indicating that the LCU-based stripe division does not require further parsing of the second-level information, and the stripe is decoded to the end of the last CU of the stripe end LCU;
  • lcu_slice_flag is equal to 0.
  • First parse the last_scu_is_zero_flag to determine whether the strip ends the CU. Is the first CU of the LCU to which it belongs.
  • last_scu_in_slice_next-1 it needs to further parse last_scu_in_slice_next-1 to calculate the specific position of the CU at the end of the strip.
  • the specific calculation process is as shown in the above formula IX, and the stripe is decoded to The end of the CU ending in the LCU with the relative position of SliceEndSCUAddress ends.
  • Step 1 Determine the strip partition type according to lcu_slice_flag.
  • Step 2 If lcu_slice_flag is equal to 1, indicating that the LCU is based on stripe partitioning, only the stripe is parsed to end the location of the LCU. First parse the first-lcu-is_zero-flag to determine whether the strip end LCU is the first LCU of the image. If not, then further parsing first-lcu-in-slice-next-1 is needed to calculate the strip end LCU. The specific calculation process is as shown in the above formula 8. If the lcu_slice_flag is equal to 0, indicating that the CU is based on the stripe division, the stripe needs to be parsed to end the position of the SCU.
  • first_scu_is_zero_flag First parse first_scu_is_zero_flag to determine whether the strip end CU is the first CU of the LCU. If not, then further parsing first_scu_in_slice_subtract_1 is needed to calculate the strip end CU.
  • the specific location, the specific calculation process is as shown in the above formula 9, the strip decoding starts from the CU in the strip end LCU whose relative position is SliceStartSCUAddress.
  • the end LCU location information is the end LCU in the reverse order absolute position in the image
  • the end SCU location information is the end SCU at the end LCU
  • leu_slice_flag is used to indicate the partition type of the current stripe. If leu_slice_flag is equal to 1, it indicates that the current stripe partition is based on LCU, so there is no need to further write the strip to end the location of the CU; — slice—flag equal to 0 indicates that the current strip partition is CU-based, and further writes the location of the strip end CU.
  • the value of the identifier is generally parsed by the method as shown in the first embodiment, and may also be set by default.
  • Last_scu_ is_end_flag is used to indicate whether the CU at the end of the strip ends the last CU in the LCU. If last_scu_is_end_flag is equal to 1, the CU position at the end of the strip is set to The last CU of the LCU, the stripe is decoded to the end of the last CU of the LCU.
  • Last— scu — in — slice — minus — 1 is used to indicate the specific position of the last CU of the strip in the end LCU ( SliceEndSCUAddress ), that is, the relative position of the SCU in the lower right corner of the last CU of the strip in the associated LCU Shift, stripe decoding to the CU cutoff.
  • SliceEndSCUAddress is calculated as Equation 10.
  • NumSCUsInLCU is the total number of SCUs included in one LCU. 8)
  • the syntax structure of the HEVC coding unit end flag provided by one embodiment of the present invention is as shown in Table 10 or Table 11. Table 10
  • leu_slice_flag is used to indicate the partition type of the current stripe. If leu_slice_flag is equal to 1, the current stripe partition is based on the LCU, so there is no need to further write the strip to end the CU. Position; leu_slice_flag equal to 0 indicates that the current stripe partition is based on CU, and further needs to write the strip to end the location of the CU.
  • the value of the identifier is generally parsed by the method as shown in the first embodiment, and may also be set by default.
  • Split—coding— unit—flag is used to indicate whether the current CU is to be further split. If the split-coding_unit_flag is equal to 1, the current CU will continue to split into four CUs of the same level; split-coding-unit-flag is equal to 0, then the current CU is no longer split, and is encoded. The last level of CU. MoreDataFlag is used to indicate whether there is data for the current stripe. If moreDataFlag is equal to 1, then the current stripe has more data to wait for decoding, stripe decoding will continue; if moreDataFlag is equal to 0, the current stripe data has all been decoded, and stripe decoding will end.
  • rbsp data is used to determine if the data payload is over. If the current strip has no more data payload, the operation returns 0, otherwise it returns 1.
  • Entropy— coding— mode—flag is used to select the entropy encoding of the syntax elements.
  • Entropy-coding_mode_flag is equal to 0, indicating that the encoding method can infer the end of the strip by judging the end of the stream data, and does not need to write the strip end flag;
  • entropy_coding_mode_flag is equal to 1 This kind of encoding method cannot infer the end of the strip by judging the end of the stream data, and some strip end flags are needed.
  • End_of_ slice_flag is the strip end marker bit. End_of_ slice_flag is equal to 1, indicating that the current CU is the last CU in the stripe, and the stripe decoding ends; end_of_slice_flag is equal to 0, indicating that the current CU is not the last CU in the stripe, the current strip The band needs to continue decoding the next CU.
  • each CU When decoding, each CU will first determine whether to continue splitting according to the split-coding_unit_flag. If the split-coding_unit_flag is equal to 1, the current CU is split into four smaller CUs, and each The CU performs the same CU parsing operation; until the split-coding_unit_flag of a certain CU is equal to 0, the current CU is the unit that actually decodes, enters the decoding reconstruction process, and judges whether it is based on the CU at the end of the current decoding reconstruction. Striping, if yes, parsing the strip end flag, otherwise it will not parse.
  • the stripe end flag parsing process is to first determine the entropy encoding type of the current strip according to entropy_coding_mode_flag. If entropy_coding_mode_flag is equal to 0, then moreDataFlag is assigned according to the operation more_rbsp_data(); if entropy- Coding_mode_flag is equal to 1, and Baye 1 J needs to parse the flag end_of_slice_flag, and assign moreDataFlag to moreDataFlag equal to 1, then the stripe decoding will continue; if moreDataFlag is equal to 0, the stripe decoding will end.
  • each LCU is looped, and the end of each loop is also judged whether it is based on CU striping, and if not, the striping end flag is parsed, and if not, it is not parsed.
  • the parsing process is the same as above. 9)
  • the end position information of the strip is the length information of the stripe
  • the LCU length information of the stripe may be added in the strip header, and the strip length syntax provided by one embodiment of the present invention is provided. The structure is shown in Table 12.
  • Slice_length— leu is used to indicate the total number of LCUs included in the current stripe.
  • the end of the strip LCU ( SliceEndLCUAddress ) can be calculated according to the value and the position of the starting LCU ( SliceStartLCUAddress ) according to Equation 11.
  • the strip decoding ends in the LCU corresponding to SliceEndLCUAddress.
  • the end position information of the strip is the strip length information
  • the LCU length information of the stripe may be added in the strip header and the relative position information of the SCU in the ending LCU may be ended.
  • the stripe length syntax structure provided by one embodiment of the present invention is shown in Table 13.
  • the relative position information of the ending SCU in the ending LCU is sequential relative position information.
  • Slice_length— leu is used to indicate the total number of LCUs included in the current stripe.
  • the position of the strip end LCU ( SliceEndLCUAddress ) can be calculated according to the value and the position of the starting LCU ( SliceStartLCUAddress ) according to the formula 12, the strip decoding will end A CU in the LCU corresponding to SliceEndLCUAddress.
  • Last_scu_in_segment-minus-1 is used to indicate the specific location of the last CU of the stripe in the end LCU (SliceEndSCUAddress), ie the relative position of the SCU in the lower right corner of the last CU of the strip in the associated LCU.
  • the stripe is decoded to the CU cutoff corresponding to SliceEndSCUAddress.
  • the SliceEndSCUAddress calculation can be as shown in Equation 13.
  • the end position information of the strip is the length information of the stripe
  • the CU length information of the stripe may be added in the strip header, and the strip length syntax provided by one embodiment of the present invention is provided.
  • the structure is shown in Table 14.
  • Slice_length— cu— minus 1 is used to indicate the total number of CUs ( NumCUInSlice ) contained in the current stripe.
  • the calculation of NumCUInSlice can be as shown in Equation 14.
  • the number of decoded CUs is recorded.
  • the strip decoding is ended.
  • the SCU length information of the stripe may be added to the strip header.
  • the syntax of the stripe length provided by an embodiment of the present invention is shown in Table 15.
  • Slice_length— scu — minus 1 is used to indicate the total number of SCUs included in the current stripe, and based on this value and the position of the strip starting LCU ( SliceStartLCUAddress ), the relative start of the stripe CU in the associated LCU
  • the location ( SliceStartSCUAddress ) and the LCU contain the total number of SCUs ( NumSCUInLCU ) to calculate the specific location of the end CU of the stripe, which can be represented by the location of the LCU where the CU is located ( SliceEndLCUAddress ) and the location of the CU in the LCU ( SliceEndSCUAddress ), SliceEndLCUAddress
  • the calculation can be as shown in Equation 15, and the calculation of SliceEndSCUAddress can be as shown in Equation 16.
  • SliceEndLCUAddress SliceStartLCUAddress + ( SliceStartSCUAddress+slice_length— scu— minusl + 1 ) / NumSCUInLCU (Formula 15)
  • SliceEndSCUAddress (SliceStartSCUAddress+slice_length_scu_min us l + 1 ) %NumSCUInLCU
  • the split flag grammar structure provided by one embodiment of the present invention is shown in Table 16 when the splitting of each layer CU of the LCU can be inferred according to the relative position of the CU in the LCU.
  • CurrentCUInPicRange is used to indicate whether the current CU is in the video image area.
  • CurrentCUInPicRange is equal to 1 indicating that all pixels of the current CU are in the video image area;
  • CurrentCUInPicRange is equal to 0 indicating that some pixels of the current CU are outside the video image area.
  • CurrCodingUnitSize marks the size of the current CU.
  • MinCodingUnitSize represents the minimum size of the CU.
  • LCUAddress is used to mark the location of the LCU in the image as described by the current CU.
  • SliceStartLCUAddress is used to mark the position of the stripe starting LCU in the image.
  • Split-coding—unit—flag Identifies whether the current CU is split further. If the split-coding_unit_flag is equal to 1, the current CU will be split into four equal-sized CUs; if the split-coding_unit_flag is equal to 0, the current CU will not split anymore, which is a final CU to be actually decoded. .
  • StartSCUAddress is used to mark the starting position of the current CU in the LCU.
  • SliceStartSCUAddress is used to mark the position of the strip starting SCU in the LCU. Therefore, in the decoding process, it is first confirmed that the current CU is within the video image range and larger than the minimum CU size, and then the split flag bit is parsed; otherwise, the split flag bit does not need to be parsed.
  • the split flag is directly parsed; otherwise, the following steps are performed to determine.
  • the split flag bit is parsed; otherwise, the split flag bit does not need to be parsed.
  • the relationship between the start position of the current CU and the position of the strip start CU is determined. If the starting position of the current CU is greater than or equal to the position of the starting CU of the stripe, the split flag bit needs to be further parsed; if the current CU end position is less than the position of the strip starting CU, the split flag bit does not need to be further parsed, and its value 0; In other cases, there is no need to further resolve the split flag, which has a value of 1.
  • the split flag is 0, the current CU is no longer split, and the final CU that needs to be actually decoded enters the decoding reconstruction process. If the split flag is 1, the current CU splits into four deeper CUs. And complete processing for each deep CU, that is, whether to further split or directly decode.
  • the absolute position of the starting LCU, the relative position of the starting SCU, the absolute position of the ending LCU, the relative position of the ending SCU, etc. can be directly encoded for the values of the respective positions.
  • the encoding method of the numerical value is not limited.
  • FIG. 7 is a diagram showing the structure of a stripe encoding apparatus according to an embodiment of the present invention, including:
  • the determining unit 701 is configured to determine, according to the decision information, a strip partitioning type of the currently divided object.
  • the dividing unit 702 is configured to divide the current divided object into strips according to the strip partition type determined by the determining unit 701.
  • the writing unit 703 is configured to write the start position information of the current stripe divided by the dividing unit 702 in the start position information field.
  • the encoding processing unit 704 is configured to encode the current stripe obtained by the writing unit 703, and output the encoded code stream.
  • the writing unit 703 is further configured to write the stripping type information of the current divided object determined by the determining unit 702 into the partition type information field.
  • the writing unit 703 is specifically configured to: when the striping partition type is divided by the LCU, write the absolute LCU of the current stripe in the initial LCU position information field in the image.
  • the location information, the start location information field includes only the start LCU location information field; when the slice partition type is divided by CU, the absolute location information of the start LCU in the image is written in the start LCU location information field,
  • the initial SCU location information field writes relative location information of the starting SCU in the starting LCU, and the starting location information field includes a starting LCU location information field and a starting SCU location information field; or in the strip partitioning type is divided by CU
  • the start SCU location information field the absolute location information of the initiating SCU in the starting LCU is written, and the starting location information field includes only the starting SCU location information field.
  • the writing unit 703 is further configured to write the end position information of the current stripe in the end position information field.
  • the writing unit 703 is specifically configured to: when the strip partition type is divided by the LCU, write the absolute position information of the end LCU in the image in the end LCU position information field.
  • the end location information field includes only the end LCU location information field; when the strip partition type is divided by CU, the LCU location information field is written to end the absolute location information of the LCU in the image, and the SCU location information field is written.
  • the ending location information field includes an ending LCU location information field and an ending SCU location information field; or when the stripping partition type is divided by CU, ending the SCU location information field
  • the end position information of the end SCU in the end LCU is written, and the end position information field includes only the end SCU position information field.
  • the writing unit 703 is further configured to: when the striping partition type determined by the determining unit 702 is divided by the LCU, is a stripe of all the LCUs in the current stripe. End flag assignment, the slice end flag is located at the last bit of the data payload of the last SCU of each LCU included in the current strip, where the end of the strip end flag in the LCU is valid; in decision unit 702 The determined striping partition type is assigned to the strip end flag bits of all CUs in the current stripe when divided by CU, and the stripe end flag bit is located in the data payload of the last SCU of each CU included in the current stripe. The last bit, where the end of the stripe flag in the end CU is valid.
  • the encoding processing unit 704 is further configured to determine, according to location information of the current CU in the first LCU, whether the current CU is used when encoding the first LCU of the current stripe.
  • the split flag is encoded.
  • the stripe partitioning type of the current partitioning object can be determined according to the judgment information, and the current partitioning object is divided into strips according to the determined stripe partitioning type, so that the data size of the divided stripe can be adapted to the network. And different strips can be used in different networks to enhance network compatibility.
  • the stripping type information of the current partitioning object may be written into the partitioning type information field, so that the decoding apparatus can learn the partitioning type of the current stripe, thereby determining according to the partitioning type information. Whether the decoding is completed, and the decoding efficiency is improved while ensuring correct decoding.
  • the used start location information field includes a start LCU location information field and a start SCU location information field, so that the decoding apparatus can directly parse the start LCU location information field and The location information in the initial SCU location information field is directly located to the start position of the strip according to the parsed location information, thereby improving decoding efficiency.
  • the decoding device can know the division type of the current stripe, when the current strip is divided by the LCU, data can be written only to the start LCU location information field, and no data needs to be written to the start SCU location information field, so that The amount of data to be written is reduced, and the coding efficiency is improved.
  • the decoding device does not need to parse the initial SCU location information field to further improve the decoding efficiency.
  • the end position information of the current stripe may be written in the end position information field, so that the decoding apparatus can directly determine the decoding completion according to the end position information, thereby improving while ensuring correct decoding. Decoding efficiency.
  • the end location information field used includes an end LCU location information word. Segment and end SCU location information field, so that the decoding device can directly parse the end when decoding
  • the LCU location information field and the location information in the end SCU location information field are directly located at the end position of the strip according to the location information obtained by the parsing, thereby improving decoding efficiency. Since the decoding apparatus can know the division type of the current stripe, when the current stripe is divided by the LCU, data can be written only to the end LCU location information field without writing data to the end SCU location information field, thereby reducing the need The amount of data written increases the coding efficiency; the decoding device can also be configured to further improve the decoding efficiency without parsing the end SCU position information field.
  • the strip end flag bits of all CUs in the current stripe may be assigned, and the strip end flag bit in the ending CU is assigned a value, so that the decoding apparatus can decode Whether the decoding is completed or not is determined according to whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding. Since the decoding apparatus can learn the division type of the current stripe, the decoding apparatus can determine whether the decoding is completed or not, and further improve the decoding efficiency, by parsing only the end flag of the last CU of the current stripe when the current strip is divided by the LCU.
  • FIG. 8 is a diagram of a structure of a stripe decoding apparatus according to another embodiment of the present invention, including: an parsing unit 801, configured to parse a starting position information of a current stripe from a start location information field.
  • the decoding unit 802 is configured to start decoding the current strip according to the initial position information obtained by the parsing unit 801, and determine to complete the decoding of the current strip according to the preset processing manner.
  • the output unit 803 is configured to output a reconstructed image of the strip obtained by the decoding unit 802.
  • the start location information field includes a start LCU location information field and a start SCU location information field.
  • the parsing unit 801 is specifically configured to parse the current stripe from the start LCU location information field.
  • the absolute position information of the starting LCU is used to parse the relative position information of the starting SCU of the current strip from the starting SCU position information field.
  • the parsing unit 801 is further configured to parse the end position information of the current stripe from the end position information field
  • the decoding unit 802 is configured to determine, according to the end position information obtained by the parsing unit 801, the completion of the current strip. The decoding of the band.
  • the end location information field includes an end LCU bit Set information field and end SCU location information field; parsing unit 801, specifically for ending
  • the LCU position information field parses the absolute position information of the end LCU of the current stripe, and parses the relative position information of the end SCU of the current stripe from the end SCU position information field.
  • the parsing unit 801 is further configured to parse and obtain the strip partition type information of the current stripe from the header information.
  • the parsing unit 801 is specifically configured to: When the LCU is divided, the absolute position information of the starting LCU of the current stripe is parsed from the starting LCU position information field, and the starting position information field includes only the starting LCU position information field; the striping type of the current stripe is CU When dividing, the absolute position information of the starting LCU of the current stripe is parsed from the starting LCU position information field, and the relative position information of the starting SCU of the current stripe is parsed from the starting SCU position information field, and the starting position information field is included.
  • the start location information field includes only the start SCU location information field.
  • the parsing unit 801 is further configured to parse the end position information of the current stripe from the end position information field according to the stripe partition type information obtained by the parsing; the decoding unit 802 is configured to use the parsing unit 801. The obtained end position information determines that the decoding of the current strip is completed.
  • the parsing unit 801 is specifically configured to parse the absolute location information of the absolute LCU of the current stripe from the absolute LCU location information field when the striping type of the current stripe is divided by the LCU.
  • the absolute position information field includes only the absolute LCU position information field; when the striping type of the current strip is divided by CU, the absolute LCU absolute position information of the current strip is parsed from the absolute LCU position information field, and the absolute SCU position information is obtained.
  • the field parses the relative position information of the absolute SCU of the current stripe, and the absolute position information field includes an absolute LCU position information field and an absolute SCU position information field; or when the striping type of the current stripe is divided by CU, from the absolute SCU position
  • the information field parses the absolute position information of the absolute SCU of the current stripe, and the absolute position information field includes only the absolute SCU position information field.
  • the current stripe is obtained according to the strip partition type, and the strip partition type is determined according to the decision information, so the data size of the stripe can be divided into Adapt to the network, and different stripe division methods can be adopted in different networks to enhance network compatibility.
  • the partition type of the current stripe may be learned according to the parsed strip partition type information, thereby determining whether the decoding is completed according to the partition type information, and improving decoding while ensuring correct decoding. effectiveness.
  • the used start location information field includes a start LCU location information field and a start SCU location information field, so the start LCU location information field and the start SCU location information can be directly parsed
  • the position information in the field is directly positioned to the starting position of the strip according to the parsed position information, thereby improving decoding efficiency. Since the division type of the current stripe can be known, when the current strip is divided by the LCU, data can be written only to the start LCU location information field without writing data to the start SCU location information field, thereby reducing the need The amount of data written increases the coding efficiency; it also does not need to parse the starting SCU location information field to further improve the decoding efficiency.
  • decoding completion can be directly determined based on the end position information, thereby improving decoding efficiency while ensuring correct decoding.
  • the used end location information field includes an end LCU location information field and an end SCU location information field, so that the location information in the end LCU location information field and the end SCU location information field can be directly parsed, and then The position information obtained by the analysis is directly positioned to the end position of the strip, thereby improving the decoding efficiency. Since the division type of the current stripe can be known, it is not necessary to parse the end SCU location information field to further improve the decoding efficiency.
  • whether the decoding is completed or not can be determined based on whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding. Since the division type of the current stripe can be known, when the current strip is divided by the LCU, only the end flag of the last CU of the current stripe is parsed to determine whether the decoding is completed, and the decoding efficiency is further improved.
  • FIG. 9 illustrates a structure of a stripe encoding apparatus according to another embodiment of the present invention, including: a dividing unit 901, configured to divide a current divided object into strips by a CU.
  • the writing unit 902 is configured to write the starting position information of the current strip obtained by the dividing unit 901 in the starting position information field; the starting position information of the current stripe includes: the current stripe The absolute position information of the starting LCU in the image, and the starting SCU in the current stripe at the beginning
  • the encoding processing unit 903 is configured to encode the current stripe obtained by the writing unit 902, and output the encoded code stream.
  • the writing unit 902 is further configured to write the end position information of the current stripe in the end position information field.
  • the writing unit 902 is further configured to assign a strip end flag bit of all CUs in the current stripe, and the strip end flag is located at the last one of each CU included in the current stripe. The last bit of the data payload of the SCU, where the end of the stripe flag in the CU is valid.
  • the encoding processing unit 903 is further configured to determine, according to location information of the current CU in the first LCU, whether the current CU is used when encoding the first LCU of the current stripe.
  • the split flag is encoded.
  • the splitting flag bits of some CUs are not encoded, so the data of the splitting flag bits need not be transmitted, thereby reducing network occupation and improving network utilization efficiency.
  • the start location information field that can be used in this embodiment includes a start LCU location information field and a start SCU location information field, so that the decoding apparatus can directly parse the start LCU location information field and the start SCU location when decoding.
  • the location information in the information field is directly located to the starting position of the strip according to the parsed location information, thereby improving decoding efficiency.
  • the end position information of the current stripe may be written in the end position information field, so that the decoding apparatus can directly determine the decoding completion according to the end position information, thereby improving while ensuring correct decoding. Decoding efficiency.
  • the strip end flag bits of all CUs in the current stripe may be assigned, and the strip end flag bit in the ending CU is assigned a value, so that the decoding apparatus can decode Whether the decoding is completed or not is determined according to whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding.
  • Figure 10 is a diagram showing the structure of a stripe decoding apparatus according to another embodiment of the present invention, including:
  • the parsing unit 1001 is configured to parse the starting position information of the current strip from the starting position information field, where the starting position information of the current stripe includes: absolute position information of the starting LCU in the image in the current strip, and the current strip Relative position information of the starting SCU in the starting LCU.
  • the decoding unit 1002 is configured to start decoding the current strip according to the start position information obtained by the parsing unit 1001, and determine to complete decoding of the current strip according to the preset processing manner.
  • the output unit 1003 is configured to output a reconstructed image of the strip obtained by the decoding unit 1002.
  • the parsing unit 1001 is further configured to parse the end position information of the current stripe from the end location information field.
  • the decoding unit 1002 is configured to determine, according to the end location information obtained by the parsing unit 1001, the completion of the current Strip decoding.
  • the start location information field that can be used in this embodiment includes a start LCU location information field and a start SCU location information field, so that the location in the start LCU location information field and the start SCU location information field can be directly parsed.
  • the information is directly located at the starting position of the strip according to the parsed position information, thereby improving decoding efficiency.
  • decoding completion can be determined directly based on the end position information, thereby improving decoding efficiency while ensuring correct decoding.
  • whether the decoding is completed or not can be determined based on whether the value of the stripe end flag bit obtained by decoding is valid, thereby improving decoding efficiency while ensuring correct decoding.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM: Read Random Memory), or a random access memory (RAM).
  • ROM Read Random Memory
  • RAM random access memory

Landscapes

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

Description

指示和获取用户流数的方法及通信装置
本申请要求于 2011 年 1 月 14 日提交中国专利局、 申请号为 201110008133.X, 发明名称为 "条带编码方法及装置、 条带解码方法及装置" 的中国专利申请优先权, 上述专利的全部内容通过引用结合在本申请中。 技术领域
本发明涉及编解码技术, 具体涉及新一代视频编码标准 (HEVC, High Efficiency Video Coding ) 中的条带编码方法及装置、 条带解码方法及装置。 背景技术
随着网络技术和终端处理能力的不断提高, 人们对目前广泛使用的 运动图像专家组系列 2 ( MPEG-2 , Moving Pictures Experts Group -2 ), 运动图像专家组系列 4 ( MPEG-4 ), H.264等视频编解码技术提出了新的 要求, 例如希望能够满足高清、 3D的要求, 从而满足新的家庭影院、 远 程监控、 数字广播、 移动流媒体、 便携摄像、 医学成像等新领域的应用, 为了满足这些应用 ,新一代视频编码标准( HEVC , High Efficiency Video Coding ) 应运而生。
HEVC为了提高压缩效率, 使用了一种新的编码结构, 具体地, 将 一个视频图像划分成为由整数个编码单元 ( CU, Coding Unit ) 组成, CU为方形, 并且 CU的尺寸大小可变。 CU的产生过程简述如下, 首先, 将一个视频图像划分成为不重叠的整数个最大编码单元(LCU, Largest Coding Unit ); 进一步, 可以将 LCU可分裂为四个相同尺寸的 CU; 进一 步, 该四个 CU可以分裂为更小四个相同尺寸的 CU; 分裂过程可以一直 进行, 直到分裂得到的 CU的尺寸达到规定的最小值, 该最小值即为最 小编码单元 ( SCU, Smallest Coding Unit )。 每个 CU都存在分裂和不分 裂两种可能, CU是否继续分裂或不分裂可以通过一个标识符进行标识, 因此, 在实际的编码过程中 CU可能具有不同的 尺寸大小。
为了限制误码的扩散和传输引入了条带 ( Slice ) 的概念, 条带的应 用可以使条带间的编码是独立的,一个条带的预测不能以另一个条带中 的图像为参考图像, 因此一个条带中的预测误差也不会传播到另一个条 带。 π 、 ^ 1 条带包括整数个 CU, 具体地, 一个条带可以只包括一个 CU, 也可以包 括整个视频图像的所有 CU, 从而使得一个视频图像可编码成一个或多 个条带。 其中, 为了使解码端能够确定条带的开始位置从而开始解码, 现有的一种方式是在条带头中携带条带的起始 SCU的绝对位置信息, 使 解码端可以根据该绝对位置信息确定条带的开始位置, 其中起始 S CU的 绝对位置信息是指该起始 S CU在视频图像中的位置信息, 该绝对位置信 息具体可以是 scu的序号。
由于使用的是起始 S CU的绝对位置信息作为条带的起始位置信息, 而视频图像中的 SCU的数量会随着图像尺寸的增加而呈指数增长, 因此 条带的起始 SCU的序号的值可能会非常大, 使得对条带起始位置信息进 行编码所需的比特数也急剧增加, 降低了网络利用效率。 发明内容
本发明实施例提供了条带编码方法及装置、条带解码方法及装置,可以减 少对条带起始位置信息进行编码所需的比特数, 提高网络利用效率。
一方面,本发明一个实施例提供了一种条带编码方法, 包括:
按 CU将当前划分对象划分成条带;
在起始位置信息字段写入当前条带的起始位置信息,所述当前条带的起始 位置信息包括: 所述当前条带中起始 LCU在图像中的绝对位置信息、 以及所 述当前条带中起始 SCU在所述起始 LCU中的相对位置信息;
对所述当前条带进行编码, 输出编码码流。
另一方面,本发明另一个实施例提供了一种条带解码方法, 包括: 从起始位置信息字段解析当前条带的起始位置信息,所述当前条带的起始 位置信息包括: 所述当前条带中起始 LCU在图像中的绝对位置信息、 以及所 述当前条带中起始 SCU在所述起始 LCU中的相对位置信息;
根据所述起始位置信息开始对所述当前条带的解码,并根据预置处理方式 确定完成对所述当前条带的解码; 输出解码得到的当前条带的重建图像。
另一方面,本发明另一个实施例提供了一种条带编码装置, 包括: 划分单元, 用于按 CU将当前划分对象划分成条带;
写入单元,用于在起始位置信息字段写入所述划分单元获得的当前条带的 起始位置信息;所述当前条带的起始位置信息包括:所述当前条带中起始 LCU 在图像中的绝对位置信息、以及所述当前条带中起始 SCU在所述起始 LCU中 的相对位置信息;
编码处理单元, 用于对所述写入单元获得的当前条带进行编码,输出编码 码流。
另一方面,本发明另一个实施例提供了一种条带解码装置, 包括: 解析单元, 用于从起始位置信息字段解析当前条带的起始位置信息, 所述 当前条带的起始位置信息包括: 所述当前条带中起始 LCU在图像中的绝对位 置信息、 以及所述当前条带中起始 SCU在所述起始 LCU中的相对位置信息; 解码单元,用于根据所述解析单元获得的起始位置信息开始对所述当前条 带的解码, 并根据预置处理方式确定完成对所述当前条带的解码;
输出单元, 用于输出所述解码单元获得的条带的重建图像。
从本发明实施例提供的以上技术方案可以看出,由于本发明实施例使用的 起始位置信息字段包括起始 LCU位置信息字段和起始 SCU位置信息字段,使 条带的起始位置信息可以用 LCU的绝对位置信息和 SCU的相对位置信息确 定, 而一个视频图像中 LCU的数量要少于 SCU的数量, 一个 LCU中的 SCU 的数量也少于一个图像中的 SCU的数量, 因此对 LCU的序号以及 SCU的相 对序号进行编码的比特数较少,从而减少对条带起始位置信息进行编码所需的 比特数, 提高网络利用效率; 并且解码装置在解码时可以直接解析起始 LCU 位置信息字段和起始 SCU位置信息字段中的位置信息, 再根据解析得到的位 置信息直接定位到条带的起始位置, 从而提高解码效率。 附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提 下, 还可以根据这些附图获得其他的附图。
图 1为本发明一个实施例提供的条带编码方法的流程图;
图 2为本发明另一个实施例提供的条带编码方法的流程图;
图 3为本发明另一个实施例提供的条带编码方法的流程图;
图 4为本发明一个实施例提供的条带解码方法的流程图;
图 5为本发明另一个实施例提供的条带解码方法的流程图;
图 6为本发明另一个实施例提供的条带解码方法的流程图;
图 7为本发明一个实施例提供的条带编码装置的结构图;
图 8为本发明另一个实施例提供的条带解码装置的结构图;
图 9为本发明另一个实施例提供的条带编码装置的结构图;
图 10为本发明一个实施例提供的条带解码装置的结构图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案 进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实 施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术 人员在没有作出创造性劳动前提下所获得的所有其他实施例, 都属于本 发明保护的范围。
在本发明实施例中, 起始 LCU的绝对位置信息可以为起始 LCU在 图像中的顺序绝对位置信息或倒序绝对位置信息; 其中, 当前条带的起 始 LCU 在图像中的绝对位置信息具体可以是起始 LCU在图像中的序 号, 例如一个图像包括 10个 LCU, 序号分别是 0 ~ 9, 当前条带的起始 LCU是图像中的第 4个 LCU,则该起始 LCU的顺序绝对位置信息为 3 , 该起始 LCU的倒序绝对位置信息为 5。
起始 SCU的相对位置信息可以为起始 SCU在起始 LCU中的顺序 相对位置信息或倒序相对位置信息; 其中, 起始 SCU在起始 LCU中的 顺序相对位置信息具体可以是, 当前条带的起始 SCU相对于起始 LCU 中的第一个 SCU的位置信息, 例如起始 LCU的第一个 SCU在图像中 的序号为 1000, 但是当前条带的起始 SCU在图像中的序号为 1010, 则 起始 SCU在起始 LCU中的相对位置信息为 1010-1000=10; 起始 SCU 在起始 LCU中的倒序相对位置信息具体可以是, 当前条带的起始 SCU 相对于起始 LCU中的最后一个 SCU的位置信息, 例如起始 LCU的最 后一个 SCU在图像中的序号为 1010 ,但是当前条带的起始 SCU在图像 中的序号为 1000, 则起始 SCU在起始 LCU 中的倒序相对位置信息为 1010-1000=10。 顺序绝对位置信息或倒序绝对位置信息作为起始 LCU的绝对位置信息; 也不限定何时使用起始 SCU在起始 LCU中的顺序相对位置信息或倒序 相对位置信息作为起始 SCU的相对位置信息。
同样的, 在本发明的实施例中, 结束 LCU 的绝对位置信息可以为 结束 L CU在图像中的顺序绝对位置信息或倒序绝对位置信息;结束 S C U 的相对位置信息可以为结束 SCU在结束 LCU中的顺序相对位置信息或 倒序相对位置信息。 顺序绝对位置信息或倒序绝对位置信息作为结束 LCU的绝对位置信息; 也不限定何时使用结束 SCU在结束 LCU中的顺序相对位置信息或倒序 相对位置信息作为结束 SCU的相对位置信息。
先介绍本发明实施例提供的条带编码方法, 图 1描述了本发明一个 实施例提供的条带编码方法的流程, 该实施例包括:
101、 根据判决信息确定当前划分对象的条带划分类型, 按照确定 的条带划分类型将当前划分对象划分成条带。
其中, 在本发明的一个实施例中, 判决信息可以是输入配置、 和输 入参数、 和视频源中的至少一个, 不同的输入配置、 和 /或输入参数、 和 /或视频源可以采用不同的条带划分类型。 在本发明的一个实施例中, 条带划分类型可以是按 LCU划分或按 CU划分。
当前划分对象具体可以是当前图像序列、 或当前视频图像、 或当前 图像条带等。
102、 在起始位置信息字段写入当前条带的起始位置信息。 其中, 起始位置信息字段可以位于当前条带的条带头, 也可以位于 序列参数集的头, 也可以位于图像参数集的头等。
在本发明的一个实施例中, 起始位置信息字段只包括一个字段, 即 可以直接将当前条带的起始位置信息写入该一个字段, 此时当前条带的 起始位置信息可以为起始 SCU在图像中的绝对位置信息。
在本发明的另一个实施例中, 起始位置信息字段包括起始 LCU位 置信息字段和起始 SCU位置信息字段; 此时, 在起始位置信息字段写 入当前条带的起始位置信息具体为: 在起始 LCU位置信息字段写入当 前条带的起始 LCU在图像中的绝对位置信息, 在起始 SCU位置信息字 段写入起始 SCU在起始 LCU中的相对位置信息。 其中, 在按 LCU对 当前划分对象进行划分时, 当前条带的起始 SCU即为起始 LCU的起始 SCU, 则起始 SCU在起始 LCU中的相对位置信息就是 0。
103、 对写入了起始位置信息的当前条带进行编码, 输出编码码流。 其中, 具体可以采用 VLC编码方式或非 VLC编码方式对当前条带 进行编码。
在本发明的一个实施例中, 如果采用非 VLC编码方式对当前条带 进行编码, 在对当前条带进行编码前可以进一步包括步骤: 在结束位置 信息字段写入当前条带的结束位置信息。 可以理解的是, 在采用 VLC 编码方式对当前条带进行编码时, 也可以在对当前条带进行编码前包括 该步骤。 结束位置信息字段可以位于当前条带的条带头, 也可以位于序 列参数集的头, 也可以位于图像参数集的头等。
在本发明的一个实施例中, 结束位置信息字段只包括一个字段, 即 可以直接将当前条带的结束位置信息写入该一个字段, 例如当前条带的 结束位置信息为当前条带的长度信息, 此时, 当前条带的结束位置可以 通过当前条带的起始位置信息以及当前条带的长度信息共同确定; 在本 发明的一个实施例中当前条带的长度信息具体为:当前条带包括的 LCU 的数量以及结束 CU在结束 LCU 中的顺序相对位置或倒序相对位置; 或当前条带包括的 CU的数量; 或当前条带包括的 SCU的数量。 在本 发明的另一个实施例中, 当前条带的结束位置信息也可以为结束 SCU 在图像中的绝对位置信息。 在本发明的另一个实施例中, 结束位置信息字段包括结束 LCU位 置信息字段和结束 SCU位置信息字段; 此时, 在结束位置信息字段写 入当前条带的结束位置信息具体为: 在结束 LCU位置信息字段写入当 前条带的结束 LCU在图像中的绝对位置信息, 在结束 SCU位置信息字 段写入结束 SCU在结束 LCU中的相对位置信息。 其中, 在按 LCU对 当前划分对象进行划分时, 当前条带的结束 SCU即为结束 LCU的结束 SCU,则结束 SCU在结束 LCU中的相对位置信息即为该 SCU相对于结 束 LCU中起始 SCU的位置信息。
在本发明的另一个实施例中, 如果采用非 VLC编码方式对当前条 带进行编码, 在对当前条带进行编码前可以进一步包括步骤: 为当前条 带中所有 CU的条带结束标志位赋值, 该条带结束标志位位于当前条带 包括的每一个 CU的最后一个 SCU的数据净载的最后一位, 其中结束 CU中的条带结束标志位赋值为有效。 可以理解的是, 在采用 VLC编码 方式对当前条带进行编码时, 也可以在对当前条带进行编码前包括该步 骤。
从上可知, 本实施例可以根据判决信息确定当前划分对象的条带划 分类型, 按照确定的条带划分类型将当前划分对象划分成条带, 使划分 成的条带的数据量大小能够适应网络, 并且在不同的网络可以采用不同 的条带划分方式, 从而增强网络兼容性。
进一步, 在本发明的另一个实施例中, 使用的起始位置信息字段包 括起始 LCU位置信息字段和起始 SCU位置信息字段, 使解码装置在解 码时可以直接解析起始 LCU位置信息字段和起始 SCU位置信息字段中 的位置信息, 再根据解析得到的位置信息直接定位到条带的起始位置, 从而提高解码效率。
进一步, 在本发明的另一个实施例中, 可以在结束位置信息字段写 入当前条带的结束位置信息,使解码装置可以直接根据该结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 可以为当前条带中所有 CU 的条带结束标志位赋值, 并且将结束 CU中的条带结束标志位赋值为有 效, 使解码装置在解码时可以根据解码得到的条带结束标志位的值是否 有效确定解码是否完成, 从而在确保正确解码的同时提高解码效率。 图 2描述了本发明另一个实施例提供的条带编码方法的流程, 该实 施例包括:
201、 根据判决信息确定当前划分对象的条带划分类型, 按照确定 的条带划分类型将当前划分对象划分成条带。
202、 在起始位置信息字段写入当前条带的起始位置信息, 将当前 划分对象的条带划分类型信息写入划分类型信息字段; 该划分类型信息 字段可以位于序列参数集的头、或图像参数集的头、或条带的条带头等。
在本发明的一个实施例中, 起始位置信息字段只包括一个字段, 即 可以直接将当前条带的起始位置信息写入该一个字段, 此时当前条带的 起始位置信息可以为结束 SCU在图像中的绝对位置信息。
在本发明的另一个实施例中, 起始位置信息字段包括起始 LCU位 置信息字段和起始 SCU位置信息字段; 此时, 在起始位置信息字段写 入当前条带的起始位置信息具体为: 如果条带划分类型为按 LCU划分, 仅在起始 LCU位置信息字段写入当前条带的起始 LCU在图像中的绝对 位置信息; 如果条带划分类型为按 CU划分, 在起始 LCU位置信息字 段写入起始 LCU在图像中的绝对位置信息, 在起始 SCU位置信息字段 写入起始 SCU在起始 LCU中的相对位置信息。
203、 对写入了起始位置信息和条带划分类型信息的当前条带进行 编码, 输出编码码流。
其中, 具体可以采用 VLC编码方式或非 VLC编码方式对当前条带 进行编码。
在本发明的一个实施例中, 如果采用非 VLC编码方式对当前条带 进行编码, 在对当前条带进行编码前可以进一步包括步骤: 在结束位置 信息字段写入当前条带的结束位置信息。 可以理解的是, 在采用 VLC 编码方式对当前条带进行编码时, 也可以在对当前条带进行编码前包括 该步骤。 结束位置信息字段可以位于当前条带的条带头, 也可以位于序 列参数集的头, 也可以位于图像参数集的头等。
在本发明的一个实施例中, 结束位置信息字段只包括一个字段, 即 可以直接将当前条带的结束位置信息写入该一个字段, 例如当前条带的 结束位置信息为当前条带的长度信息, 此时, 当前条带的结束位置可以 通过当前条带的起始位置信息以及当前条带的长度信息共同确定; 在本 发明的一个实施例中当前条带的长度信息具体为:当前条带包括的 LCU 的数量以及结束 CU在结束 LCU 中的顺序相对位置或倒序相对位置; 或当前条带包括的 CU的数量; 或当前条带包括的 SCU的数量。 在本 发明的另一个实施例中, 当前条带的结束位置信息也可以为结束 SCU 在图像中的绝对位置信息。
在本发明的另一个实施例中, 结束位置信息字段包括结束 LCU位 置信息字段和结束 SCU位置信息字段; 此时, 在结束位置信息字段写 入当前条带的结束位置信息具体为: 如果条带划分类型为按 LCU划分, 仅在结束 LCU位置信息字段写入当前条带的结束 LCU在图像中的绝对 位置信息; 如果条带划分类型为按 CU划分, 在结束 LCU位置信息字 段写入结束 LCU在图像中的绝对位置信息, 在结束 SCU位置信息字段 写入结束 SCU在结束 LCU中的相对位置信息。
在本发明的另一个实施例中, 如果采用非 VLC编码方式对当前条 带进行编码, 在条带划分类型为按 LCU划分时, 对当前条带进行编码 前进一步包括: 为当前条带中所有 LCU 的条带结束标志位赋值, 条带 结束标志位位于当前条带包括的每一个 LCU的最后一个 SCU的数据净 载的最后一位, 其中结束 LCU 中的条带结束标志位赋值为有效。 在条 带划分类型为按 CU划分时, 对当前条带进行编码前进一步包括: 为当 前条带中所有 CU的条带结束标志位赋值, 条带结束标志位位于当前条 带包括的每一个 CU的最后一个 SCU的数据净载的最后一位, 其中结 束 CU 中的条带结束标志位赋值为有效。 可以理解的是, 在采用 VLC 编码方式对当前条带进行编码时, 也可以在对当前条带进行编码前包括 该步骤。
从上可知, 本实施例可以根据判决信息确定当前划分对象的条带划 分类型, 按照确定的条带划分类型将当前划分对象划分成条带, 使划分 成的条带的数据量大小能够适应网络, 并且在不同的网络可以采用不同 的条带划分方式, 从而增强网络兼容性; 同时, 本实施例还可以将当前 划分对象的条带划分类型信息写入划分类型信息字段,使解码装置可以 获知当前条带的划分类型, 从而根据该划分类型信息确定解码是否完 成, 在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 使用的起始位置信息字段包 括起始 LCU位置信息字段和 /或起始 SCU位置信息字段,使解码装置在 解码时可以直接解析起始 LCU位置信息字段和 /或起始 SCU位置信息字 段中的位置信息, 再根据解析得到的位置信息直接定位到条带的起始位 置, 从而提高解码效率。 由于解码装置可以获知当前条带的划分类型, 在当前条带按 LCU划分时,可以仅向起始 LCU位置信息字段写入数据, 而不需要向起始 SCU位置信息字段写入数据, 从而可以减少需要写入 的数据量, 提高编码效率; 也可以使解码装置不需要解析起始 SCU位 置信息字段, 进一步提高解码效率。
进一步, 在本发明的另一个实施例中, 可以在结束位置信息字段写 入当前条带的结束位置信息,使解码装置可以直接根据该结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。 在本发明的 另一个实施例中, 使用的结束位置信息字段包括结束 LCU位置信息字 段和 /或结束 SCU位置信息字段, 使解码装置在解码时可以直接解析结 束 LCU位置信息字段和 /或结束 SCU位置信息字段中的位置信息,再根 据解析得到的位置信息直接定位到条带的结束位置, 从而提高解码效 率。 如果解码装置可以获知当前条带的划分类型, 在当前条带按 LCU 划分时, 可以仅向结束 LCU位置信息字段写入数据, 而不需要向结束 SCU位置信息字段写入数据, 从而可以减少需要写入的数据量, 提高编 码效率; 也可以使解码装置不需要解析结束 SCU位置信息字段, 进一 步提高解码效率。
进一步, 在本发明的另一个实施例中, 可以为当前条带中所有 CU 的条带结束标志位赋值, 并且将结束 CU中的条带结束标志位赋值为有 效, 使解码装置在解码时可以根据解码得到的条带结束标志位的值是否 有效确定解码是否完成, 从而在确保正确解码的同时提高解码效率。 如 果解码装置可以获知当前条带的划分类型, 因此解码装置可以在当前条 带按 LCU划分时, 仅解析当前条带最后一个 CU的结束标志位就可以 确定解码是否完成, 进一步提高解码效率。 图 3描述了本发明另一个实施例提供的条带编码方法的流程,包括:
301、 按 CU将当前划分对象划分成条带。
302、 在起始位置信息字段写入当前条带的起始位置信息。
其中, 起始位置信息字段可以位于当前条带的条带头, 也可以位于 序列参数集的头, 也可以位于图像参数集的头等。
当前条带的起始位置信息包括: 当前条带中起始 LCU在图像中的 绝对位置信息、 以及当前条带中起始 SCU在起始 LCU中的相对位置信 自
303、 对当前条带进行编码, 输出编码码流。
其中, 具体可以采用 VLC编码方式或非 VLC编码方式对当前条带 进行编码。
在本发明的一个实施例中, 如果采用非 VLC编码方式对当前条带 进行编码, 在对当前条带进行编码前可以进一步包括步骤: 在结束位置 信息字段写入当前条带的结束位置信息。 可以理解的是, 在采用 VLC 编码方式对当前条带进行编码时, 也可以在对当前条带进行编码前包括 该步骤。 结束位置信息字段可以位于当前条带的条带头, 也可以位于序 列参数集的头, 也可以位于图像参数集的头等。
在本发明的一个实施例中, 结束位置信息字段只包括一个字段, 即 可以直接将当前条带的结束位置信息写入该一个字段, 例如当前条带的 结束位置信息为当前条带的长度信息, 此时, 当前条带的结束位置可以 通过当前条带的起始位置信息以及当前条带的长度信息共同确定; 在本 发明的一个实施例中当前条带的长度信息具体为:当前条带包括的 LCU 的数量以及结束 CU在结束 LCU 中的顺序相对位置或倒序相对位置; 或当前条带包括的 CU的数量; 或当前条带包括的 SCU的数量。 在本 发明的另一个实施例中, 当前条带的结束位置信息也可以为结束 SCU 在图像中的绝对位置信息。
在本发明的另一个实施例中, 结束位置信息字段包括结束 LCU位 置信息字段和结束 SCU位置信息字段; 此时, 在结束位置信息字段写 入当前条带的结束位置信息具体为: 在结束 LCU位置信息字段写入当 前条带的结束 LCU在图像中的绝对位置信息, 在结束 SCU位置信息字 段写入结束 SCU在结束 LCU中的相对位置信息。
在本发明的另一个实施例中, 如果采用非 VLC编码方式对当前条 带进行编码, 在对当前条带进行编码前可以进一步包括步骤: 为当前条 带中所有 CU的条带结束标志位赋值, 该条带结束标志位位于当前条带 包括的每一个 CU的最后一个 SCU的数据净载的最后一位, 其中结束 CU中的条带结束标志位赋值为有效。 可以理解的是, 在采用 VLC编码 方式对当前条带进行编码时, 也可以在对当前条带进行编码前包括该步 骤。
从上可知, 本实施例可以使用的起始位置信息字段包括起始 LCU 位置信息字段和起始 SCU位置信息字段, 使解码装置在解码时可以直 接解析起始 LCU 位置信息字段和起始 SCU位置信息字段中的位置信 息, 再根据解析得到的位置信息直接定位到条带的起始位置, 从而提高 解码效率。
进一步, 在本发明的另一个实施例中, 可以在结束位置信息字段写 入当前条带的结束位置信息,使解码装置可以直接根据该结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 可以为当前条带中所有 CU 的条带结束标志位赋值, 并且将结束 CU中的条带结束标志位赋值为有 效, 使解码装置在解码时可以根据解码得到的条带结束标志位的值是否 有效确定解码是否完成, 从而在确保正确解码的同时提高解码效率。
在本发明实施例提供的条带编码方法中, 在对当前条带的第一个 LCU进行编码时, 可以进一步根据当前 CU在第一个 LCU中的位置信 息确定是否为当前 CU设置分裂标识位。 具体地, 如果当前 CU不在当 前划分对象范围内或当前 CU的尺寸为 SCU的尺寸, 可以不对当前 CU 的分裂标识位进行编码。 在当前 CU在当前划分对象范围内且当前 CU 的尺寸大于 SCU的尺寸, 且当前 CU结束位置大于等于当前条带起始 CU的位置时, 才对当前 CU的分裂标识位进行编码。 由此可见, 本实 施例可以不对某些 CU的分裂标识位进行编码, 因此不需要传输这些分 裂标识位的数据, 从而可以降低网络的占用, 提高网络的利用效率。
如下再介绍本发明实施例提供的条带解码方法, 图 4描述了本发明 一个实施例提供的条带解码方法的流程, 包括:
401、 从起始位置信息字段解析当前条带的起始位置信息。
在本发明的一个实施例中, 起始位置信息字段包括起始 LCU位置 信息字段和起始 SCU位置信息字段; 该情况下, 从起始位置信息字段 解析当前条带的起始位置信息具体为: 从起始 LCU位置信息字段解析 当前条带的起始 LCU的绝对位置信息, 从起始 SCU位置信息字段解析 当前条带的起始 SCU的相对位置信息。
402、 根据起始位置信息开始对当前条带的解码, 并根据预置处理 方式确定完成对当前条带的解码。
在本发明的一个实施例中, 根据预置处理方式确定完成对当前条带 的解码具体为: 从结束位置信息字段解析当前条带的结束位置信息; 根 据结束位置信息确定完成对当前条带的解码。 在本发明的一个实施例 中, 结束位置信息字段包括结束 LCU位置信息字段和结束 SCU位置信 息字段; 该情况下, 从结束位置信息字段解析当前条带的结束位置信息 具体为: 从结束 LCU位置信息字段解析当前条带的结束 LCU的绝对位 置信息, 从结束 SCU位置信息字段解析当前条带的结束 SCU的相对位 置信息。 在本发明的另一个实施例中, 解析得到的当前条带的结束位置 信息是当前条带的长度信息, 可以根据该长度信息以及当前条带的起始 位置信息确定是否完成对当前条带的解码; 在本发明的另一个实施例 中, 解析得到的当前条带的结束位置信息是结束 S CU的绝对位置信息, 可以直接根据结束 SCU的绝对位置信息确定是否完成解码。
在本发明的另一个实施例中,根据预置处理方式确定完成对当前条 带的解码具体为: 判断当前 CU的条带结束标志位的值是否有效, 如果 有效, 确定完成对当前条带的解码, 该条带结束标志位位于当前 CU的 最后一个 SCU的数据净载的最后一位。
在本发明的另一个实施例中, 当前条带是采用 VLC编码方式编码 获得, 因此根据预置处理方式确定完成对当前条带的解码具体可以是: 判断当前 CU是否还有数据净载, 如果当前 CU没有数据净载, 则可以 确认完成对当前条带的解码。
403、 输出解码得到的当前条带的重建图像。 从上可知, 本实施例中当前条带按照条带划分类型划分获得, 并且 条带划分类型根据判决信息确定, 因此划分成的条带的尺寸能够适应网 络, 并且在不同的网络可以采用不同的条带划分方式, 从而增强网络兼 容性。
进一步, 在本发明的另一个实施例中, 使用的起始位置信息字段包 括起始 LCU位置信息字段和起始 SCU位置信息字段, 因此可以直接解 析起始 LCU位置信息字段和起始 SCU位置信息字段中的位置信息, 再 根据解析得到的位置信息直接定位到条带的起始位置,从而提高解码效 率。
进一步, 在本发明的另一个实施例中, 可以直接根据结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 可以根据解码得到的条带结 束标志位的值是否有效确定解码是否完成,从而在确保正确解码的同时 提高解码效率。
图 5描述了本发明另一个实施例提供的条带解码方法的流程,包括:
501、 从头信息中解析获得当前条带的条带划分类型信息。
502、 根据条带划分类型信息从起始位置信息字段解析当前条带的 起始位置信息。
在本发明的一个实施例中, 条带划分类型信息为按 LCU划分, 该 情况下,根据条带划分类型信息从起始位置信息字段解析当前条带的起 始位置信息具体为: 从起始 LCU 位置信息字段解析当前条带的起始 LCU的绝对位置信息, 该起始位置信息字段仅包括所述起始 LCU位置 信息字段。 在本发明的另一个实施例中, 条带划分类型信息为按 CU划 分, 根据条带划分类型信息从起始位置信息字段解析当前条带的起始位 置信息具体为: 从起始 LCU位置信息字段解析当前条带的起始 LCU的 绝对位置信息, 从起始 SCU位置信息字段解析当前条带的起始 SCU的 相对位置信息, 起始位置信息字段包括起始 LCU位置信息字段和起始 SCU位置信息字段。 在本发明的另一个实施例中, 条带划分类型信息为 按 C U划分, 根据条带划分类型信息从起始位置信息字段解析当前条带 的起始位置信息具体为: 从起始 SCU位置信息字段解析当前条带的起 始 SCU的绝对位置信息, 起始位置信息字段仅包括起始 SCU位置信息 字段。
503、 根据起始位置信息开始对当前条带的解码, 并根据预置处理 方式确定完成对当前条带的解码。
在本发明的一个实施例中, 根据预置处理方式确定完成对当前条带 的解码具体为: 从结束位置信息字段解析当前条带的结束位置信息; 根 据结束位置信息确定完成对当前条带的解码。 在本发明的一个实施例 中, 解析得到的当前条带的结束位置信息是当前条带的长度信息, 可以 根据该长度信息以及当前条带的起始位置信息确定是否完成对当前条 带的解码。 在当前条带按 LCU划分时, 当前条带的长度信息可以为当 前条带包括的 LCU的数量; 在当前条带按 CU划分时, 当前条带的长 度信息可以为当前条带包括的 LCU的数量以及结束 CU在结束 LCU中 的顺序相对位置或倒序相对位置; 或当前条带包括的 CU的数量; 或当 前条带包括的 SCU的数量。
在本发明的另一个实施例中,根据预置处理方式确定完成对所述当 前条带的解码具体为: 根据条带划分类型信息从结束位置信息字段解析 当前条带的结束位置信息; 根据结束位置信息确定完成对当前条带的解 码。 在本发明的一个实施例中, 是根据条带划分类型信息从结束位置信 息字段解析当前条带的结束位置信息, 具体地: 在本发明的一个实施例 中, 条带划分类型信息为按 LCU划分, 根据条带划分类型信息从结束 位置信息字段解析当前条带的结束位置信息具体为: 从结束 LCU位置 信息字段解析当前条带的结束 LCU的绝对位置信息, 结束位置信息字 段仅包括结束 LCU位置信息字段。 在本发明的另一个实施例中, 条带 划分类型信息为按 CU划分, 根据条带划分类型信息从结束位置信息字 段解析当前条带的结束位置信息具体为: 从结束 LCU位置信息字段解 析当前条带的结束 LCU的绝对位置信息, 从结束 SCU位置信息字段解 析当前条带的结束 SCU 的相对位置信息, 结束位置信息字段包括结束 LCU位置信息字段和结束 SCU位置信息字段; 在本发明的另一个实施 例中, 条带划分类型信息为按 CU划分, 根据条带划分类型信息从结束 位置信息字段解析当前条带的结束位置信息具体为: 从结束 SCU位置 信息字段解析当前条带的结束 SCU 的绝对位置信息, 结束位置信息字 段仅包括结束 SCU位置信息字段。
在本发明的另一个实施例中,根据预置处理方式确定完成对当前条 带的解码具体为:如果条带划分类型信息为按 LCU划分,判断当前 LCU 的条带结束标志位的值是否有效, 如果有效, 确定完成对当前条带的解 码, 条带结束标志位位于当前 LCU的最后一个 SCU的数据净载的最后 一位。 如果条带划分类型信息为按 CU划分, 判断当前 CU的条带结束 标志位的值是否有效, 如果有效, 确定完成对当前条带的解码, 条带结 束标志位位于当前 CU的最后一个 SCU的数据净载的最后一位。
在本发明的另一个实施例中, 当前条带是采用 VLC编码方式编码 获得, 因此根据预置处理方式确定完成对当前条带的解码具体可以是: 判断当前 CU是否还有数据净载, 如果当前 CU没有数据净载, 则可以 确认完成对当前条带的解码。
504、 输出解码得到的当前条带的重建图像。
从上可知, 本实施例中当前条带按照条带划分类型划分获得, 并且 条带划分类型根据判决信息确定, 因此划分成的条带的尺寸能够适应网 络, 并且在不同的网络可以采用不同的条带划分方式, 从而增强网络兼 容性; 同时, 本实施例还可以根据解析到的条带划分类型信息获知当前 条带的划分类型, 从而根据该划分类型信息确定解码是否完成, 在确保 正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 使用的起始位置信息字段包 括起始 LCU位置信息字段和起始 SCU位置信息字段, 因此可以直接解 析起始 LCU位置信息字段和起始 SCU位置信息字段中的位置信息, 再 根据解析得到的位置信息直接定位到条带的起始位置,从而提高解码效 率。 由于可以获知当前条带的划分类型, 在当前条带按 LCU划分时, 可以仅向起始 LCU位置信息字段写入数据, 而不需要向起始 SCU位置 信息字段写入数据, 从而可以减少需要写入的数据量, 提高编码效率; 也不需要解析起始 SCU位置信息字段, 进一步提高解码效率。
进一步, 在本发明的另一个实施例中, 可以直接根据结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。 在本发明的 另一个实施例中, 使用的结束位置信息字段包括结束 LCU位置信息字 段和结束 SCU位置信息字段, 因此可以直接解析结束 LCU位置信息字 段和结束 SCU位置信息字段中的位置信息, 再根据解析得到的位置信 息直接定位到条带的结束位置, 从而提高解码效率。 由于可以获知当前 条带的划分类型, 因此不需要解析结束 SCU位置信息字段, 进一步提 高解码效率。
进一步, 在本发明的另一个实施例中, 可以根据解码得到的条带结 束标志位的值是否有效确定解码是否完成,从而在确保正确解码的同时 提高解码效率。 由于可以获知当前条带的划分类型, 因此可以在当前条 带按 LCU划分时, 仅解析当前条带最后一个 CU的结束标志位就可以 确定解码是否完成, 进一步提高解码效率。
图 6描述了本发明另一个实施例提供的条带解码方法的流程,包括: 601、 从起始位置信息字段解析当前条带的起始位置信息。
其中, 当前条带的起始位置信息包括: 当前条带中起始 LCU在图 像中的绝对位置信息、 以及当前条带中起始 SCU在起始 LCU中的相对 位置信息。
在本发明的一个实施例中, 起始位置信息字段包括起始 LCU位置 信息字段和起始 SCU位置信息字段; 该情况下, 从起始位置信息字段 解析当前条带的起始位置信息具体为: 从起始 LCU位置信息字段解析 当前条带的起始 LCU的绝对位置信息, 从起始 SCU位置信息字段解析 当前条带的起始 SCU的相对位置信息。
602、 根据起始位置信息开始对当前条带的解码, 并根据预置处理 方式确定完成对当前条带的解码。
在本发明的一个实施例中,根据预置处理方式确定完成对当前条带 的解码具体为: 从结束位置信息字段解析当前条带的结束位置信息; 根 据结束位置信息确定完成对当前条带的解码。 其中, 结束位置信息字段 包括结束 LCU位置信息字段和结束 SCU位置信息字段; 该情况下, 从 结束位置信息字段解析当前条带的结束位置信息具体为: 从结束 LCU 位置信息字段解析当前条带的结束 LCU的绝对位置信息, 从结束 SCU 位置信息字段解析当前条带的结束 SCU 的相对位置信息。 在本发明的 另一个实施例中, 解析得到的当前条带的结束位置信息是当前条带的长 度信息, 可以根据该长度信息以及当前条带的起始位置信息确定是否完 成对当前条带的解码。 其中, 当前条带的长度信息可以为当前条带包括 的 LCU的数量以及结束 CU在结束 LCU中的顺序相对位置或倒序相对 位置; 或当前条带包括的 CU的数量; 或当前条带包括的 SCU的数量。 在本发明的另一个实施例中, 解析得到的当前条带的结束位置信息是结 束 SCU的绝对位置信息, 可以直接根据结束 SCU的绝对位置信息确定 是否完成解码。
603、 输出解码得到的当前条带的重建图像。
从上可知, 本实施例可以使用的起始位置信息字段包括起始 LCU 位置信息字段和起始 SCU位置信息字段, 因此可以直接解析起始 LCU 位置信息字段和起始 SCU位置信息字段中的位置信息, 再根据解析得 到的位置信息直接定位到条带的起始位置, 从而提高解码效率。
进一步, 在本发明的另一个实施例中, 可以直接根据该结束位置信 息确定解码完成, 从而在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 可以根据解码得到的条带结 束标志位的值是否有效确定解码是否完成,从而在确保正确解码的同时 提高解码效率。
在本发明实施例提供的条带解码方法中,根据起始位置信息开始对 当前条带的解码的过程可以包括: 如果当前 CU不在所述当前划分对象 范围内或当前 CU的尺寸为 SCU的尺寸,不对当前 CU的分裂标识位解 码;如果当前 CU在当前划分对象范围内且当前 CU的尺寸大于 SCU的 尺寸, 且当前 CU的起始位置大于等于条带起始 CU的位置, 才对当前 CU的分裂标识位进行解码。 由此可见, 本实施例可以不对某些 CU的 分裂标识位进行编码, 因此不需要传输这些分裂标识位的数据, 从而可 以降低网络的占用, 提高网络的利用效率。
如下再介绍本发明实施例提供的 HEVC语法结构。
表中 C字段表示该语法元素的分类; Descripter制定对应语法的描 述子。
1 ) 在起始位置信息字段包括起始 LCU位置信息字段和起始 SCU 位置信息字段时,本发明一个实施例提供的 HEVC条带头起始位置的语 法结构如表一所示。
表 1
Figure imgf000021_0001
表 1 中, first— leu— is— zero— flag用于标示条带起始位置的 LCU是不 是图像内第一个 LCU, 如果 first— leu— is— zero— flag等于 1 , 则条带起始 的 LCU位置设为 0 ,条带解码将从图像第一个 LCU中的某个 CU开始。
first— leu— in— slice— minus— 1 用于标示条带的第一个 LCU 的位置 ( SliceStartLCUAddress ), 条带解码将从该 LCU 中的某个 CU开始。 SliceStartLCUAddress的计算如公式一所示。
SliceStartLCUAddress = first— leu— in— slice— minus— 1 + 1 (公式一)
first— scu— is— zero— flag 用于标示条带起始位置的 CU 是不是起始 LCU中的第一个 CU, 如果 first— scu— is— zero— flag等于 1 , 则条带起始的 CU位置设为 0 , 条带解码从起始 LCU的第一个 CU开始。 first— scu— in— slice— minus— 1用于标示条带的第一个 CU在起始 LCU 中的具体位置 ( SliceStartSCUAddress ), 即条带的第一个 CU的左上角 SCU 在所属 LCU 中的相对位置偏移, 条带解码从该 CU 开始, SliceStartSCUAddress的计算如公式二所示。
SliceStartSCUAddress = first— scu— in— slice— minus— 1 + 1 (公 式二)
解码时, 在解析条带头的过程中分两步获取起始位置信息: 第一步: 先根据第一级的信息来得到条带起始位置所属的 LCU: 先 解析 first— leu— is— zero— flag 来确定条带起始 LCU是否是图像的第一个 LCU, 如果不是则需要进一步解析 first— leu— in— slice— minus— 1 来计算条 带起始 LCU的具体位置, 具体计算过程如上述公式一所示。
第二步: 再解析 first— scu— is— zero— flag来确定条带起始 CU是否是 LCU中的第一个 CU。在基于 LCU的条带划分中, first— scu— is— zero— flag 的值必然为 1 , 则不需要进一步解析第二级的信息, 条带解码从条带起 始 LCU 的第 一个 CU 开始 ; 在基于 CU 的条带划分中 , first— scu— is— zero— flag可能为 0 ,则需要进一步解析第二级的信息来精确 的定位条带解码的起始位置 ( SliceStartSCUAddress ), 具体计算过程如 上述公式二所示, 条带解码从条带起始 LCU 中相对位置为 SliceStartSCUAddress的 CU开始。
2 ) 在结束位置信息字段包括结束 LCU位置信息字段和结束 SCU 位置信息字段时, 在结束 L C U位置信息为结束 L C U在图像中的顺序绝 对位置、 且结束 SCU位置信息为结束 SCU在结束 LCU中的顺序相对 位置时,本发明一个实施例提供的 HEVC条带头结束位置的语法结构如 表 2所示。
表 2
Figure imgf000022_0001
if(last_lcu_is_zero_flag==0) { last— leu— in— slice— minus— 1 2 u(v)
}
last— scu— is— end— flag 2 u(l) if(last_scu_is_end_flag==0) { last— scu— in— slice— minus— 1 2 u(v)
}
...
}
表 2 中, last— leu— is— zero— flag用于标示条带结束位置的 LCU是不 是图像内第一个 LCU, 如果 last— leu— is— zero— flag等于 1 , 则条带结束的 LCU位置设为 0 , 条带解码将结束于第一个 LCU中的某个 CU。
last— leu— in— slice— minus— 1 用于标示条带的最后一个 LCU 的位置 束于该 LCU 中的某个 CU ,
Figure imgf000023_0001
SliceEndLCUAddress = last leu in slice minus 1 + 1 (公式 last— scu— is— end— flag用于标示条带结束位置的 CU是不是结束 LCU 中的最后一个 CU, 如果 last— scu— is— end— flag等于 1 , 则条带结束的 CU 位置设为 LCU的最后一个 CU, 条带解码至结束 LCU的最后一个 CU 截止。
last— scu— in— slice— minus— 1用于标示条带的最后一个 CU在结束 LCU 中的具体位置( SliceEndSCUAddress ), 即条带的最后一个 CU的右下角 SCU 在所属 LCU 中的相对位置偏移, 条带解码至该 CU 截止。 SliceEndSCUAddress计算如公式四所示。
SliceEndSCUAddress NumSCUsInLCU-2
last scu in slice minus 1 (公式四)
其中, 公式四中 NumSCUsInLCU为一个 LCU所包含的 SCU的总 个数。
解码时, 在解析条带头的过程中分两步获取结束位置信息: 第一步: 先根据第一级的信息来得到条带结束位置所属的 LCU: 先 解析 last— leu— is— zero— flag 来确定条带结束 LCU 是否是图像的第一个 LCU, 如果不是则需要进一步解析 last— leu— in— slice— minus— 1 来计算条 带起始 LCU的具体位置, 具体计算过程如上述公式四所示。
第二步: 再解析 last— scu— is— end— flag 来确定条带结束 CU是否是 LCU中的最后一个 CU。在基于 LCU的条带划分中, last— scu— is— end— flag 的值必然为 1 , 则不需要进一步解析第二级的信息, 条带解码至条带结 束 LCU 的最后一个 CU 结束; 在基于 CU 的条带划分中 , last— scu— is— end— flag可能为 0 , 则需要进一步解析第二级的信息来精确 的定位条带解码的结束位置 ( SliceEndSCUAddress ) , 具体计算过程如 上述公式四所示, 条带解码至条带结束 LCU 中相对位置为 SliceEndSCUAddress的 CU结束。
3 ) 在结束位置信息字段包括结束 LCU位置信息字段和结束 SCU 位置信息字段时, 在结束 L C U位置信息为结束 L C U在图像中的倒序绝 对位置、 且结束 SCU位置信息为结束 SCU在结束 LCU中的倒序相对 位置时,本发明一个实施例提供的 HEVC条带头结束位置的语法结构如 表 3所示。
表 3
slice_header( ) { C Descriptor last— leu— is— end— flag 2 u(l) if(last_lcu_is_end_flag==0) { last— leu— in— slice— minus— 1 2 u(v)
}
} 表 3中, last— leu— is— end— flag用于标示条带结束位置的 LCU是不是 图像内最后一个 LCU, 如果 last— leu— is— end— flag等于 1 , 则条带结束的 LCU位置设为 NumLCUsInPicture- 1 , 其中 NumLCUsInPicture为一个视 频图像所包含的 LCU的总个数。 条带解码将结束于图像最后一个 LCU 中的某个 CU。
last— leu— in— slice— minus— 1 用于标示条带的最后一个 LCU 的位置 ( SliceEndLCUAddress ) , 条带解码将结束于该 LCU 中的某个 CU。 SliceEndLCUAddress计算如公式五所示。
SliceEndLCUAddress = NumLCUsInPicture-2-last— leu— in— slice— minus— 1
(公式五)
4 )在 CU具有条带结束标志位时, 本发明一个实施例提供的 HEVC 编码单元结束标志位的语法结构如表 4所示。
表 4
coding_unit( .. · , &moreDataFlag ) { C Descriptor
... if( split— coding— unit— flag ) {
...
}else {
... if( !entropy— coding— mode— flag ) 2 u(v) moreDataFlag=more rbsp data( ) else { end— of— slice— flag moreDataFlag=! end of slice flag
} }
}
表 4 中, split— coding— unit— flag用于标示当前的 CU是否要进一步 分裂。 split— coding— unit— flag等于 1 , 则当前 CU将继续分裂为四个等大 的更深一级的 CU; split— coding— unit— flag等于 0 , 则当前 CU不再进行 分裂, 是进行编码的最后一级的 CU。
moreDataFlag 用 于标示后续是否还有 当 前条带的数据。 moreDataFlag等于 1 , 则当前条带还有更多数据等待解码, 条带解码将 继续; moreDataFlag等于 0 , 则当前条带的数据已经全部解码完毕, 条 带解码将结束。
more— rbsp— data用于判断数据净载是否结束。 如果当前条带没有更 多数据净载, 该操作返回 0 , 否则返回 1。
entropy— coding— mode— flag 用于选取语法元素的熵编码方式。 entropy— coding— mode— flag等于 0 ,表示该种编码方法可以通过判断码流 数据结束来推断条带的结束, 则不需要写条带结束标志位; entropy— coding— mode— flag等于 1 ,表示该种编码方法不能通过判断码流 数据结束来推断条带的结束, 则需要些条带结束标志位。
end— of— slice— flag是条带结束标记位。 end— of— slice— flag等于 1 , 表 示当前 CU是条带中的最后一个 CU, 条带解码结束; end— of— slice— flag 等于 0 , 表示当前 CU不是条带中最后一个 CU, 当前条带需继续解码下 一个 CU。
解码时, 对每个 CU都会先根据 split— coding— unit— flag判断是否继 续分裂, 如果 split— coding— unit— flag等于 1 , 则将当前 CU分裂为四个 更小的 CU, 并对每个 CU都进行相同的 CU解析操作; 直到某个 CU的 split— coding— unit— flag等于 0 , 则当前 CU为实际进行解码的单元, 进入 解码重建过程, 并在当前解码重建结束之后解析条带结束标志位。 其过 程是,先根据 entropy_coding_mode_flag来判断当前条带的熵编码类型, 如果 entropy— coding— mode— flag等于 0 , 贝1 J才艮据操作 more— rbsp— data( ) 来给 moreDataFlag赋值; ^口果 entropy— coding— mode— flag等于 1 , 贝1 J需 要解析标志位 end— of— slice— flag , 并给 moreDataFlag赋值 moreDataFlag 等于 1 , 则条带解码将继续; moreDataFlag等于 0 , 则条带解码将结束。
5 )在起始位置信息字段包括起始 LCU位置信息字段和 /或起始 SCU 位置信息字段时,本发明一个实施例提供的 HEVC条带头起始位置的语 法结构如表 5或表 6所示。
表 5
Figure imgf000027_0001
表 6
slice_header( ) { C Descriptor
... if(lcu_slice_flag==l) { first leu is zero flag 2 u(l) if(first_lcu_is_zero_flag==0) { first leu in slice minus 1 2 u(v)
}
}else { first scu is zero flag 2 u(l) if(first_scu_is_zero_flag==0) { first scu in slice minus 1 2 u(v)
}
}
....
}
表 5和表 6中, first— leu— is— zero— flag用于标示条带起始位置的 LCU 是不是图像内第一个 LCU, 如果 first— leu— is— zero— flag等于 1 , 则条带 起始的 LCU位置设为 0 , 条带解码将从图像第一个 LCU中的某个 CU 开始。
first— leu— in— slice— minus— 1 用于标示条带的第一个 LCU 的位置 ( SliceStartLCUAddress ), 条带解码将从该 LCU 中的某个 CU开始。 SliceStartLCUAddress计算如公式六所示。
SliceStartLCUAddress = first leu in slice minus 1 + 1
(公式六)
leu— slice— flag用于标示当前条带的划分类型, leu— slice— flag等于 1 表示当前条带划分是基于 LCU 的, 则不需要进一步写明条带起始 CU 的位置; leu— slice— flag等于 0表示当前条带划分是基于 CU的, 则需要 进一步写明条带起始的 CU的位置。 该标识符的值一般通过如实施例一 所示方法解析得到, 也可能通过默认值进行设置。 表 5中, first— scu— is— zero— flag用于标示条带起始位置的 CU是不是 起始 LCU中的第一个 CU, 如果 first— scu— is— zero— flag等于 1 , 则条带 起始的 CU位置设为 0 , 条带解码从起始 LCU的第一个 CU开始。 表 6 中, first— scu— is— zero— flag用于标示条带起始位置的 CU是不是图像中的 第一个 CU, 如果 first— scu— is— zero— flag等于 1 , 则条带起始的 CU位置 设为 0 , 条带解码从图像的第一个 CU开始。
表 5 中, first— scu— in— slice— minus— 1 用于标示条带的第一个 CU在 起始 LCU中的具体位置 ( SliceStartSCUAddress ), 即条带的第一个 CU 偏移,条带解码从该 CU开始。
Figure imgf000029_0001
SliceStartSCUAddress = first scu in slice minus 1 + 1
式七)
表 6 中, first— scu— in— slice— minus— 1 用于标示条带的第一个 CU在 图像中的具体位置 ( SliceStartSCUAddress ), 即条带的第一个 CU的左 上角 SCU 在所属图像中的绝对位置偏移, 条带解码从该 CU 开始。 SliceStartSCUAddress计算也如公式七所示。
解码时, 在解析条带头的过程中分两步获取起始位置信息: 第一步: 先根据第一级的信息来得到条带起始位置所属的 LCU: 先 解析 first— leu— is— zero— flag 来确定条带起始 LCU是否是图像的第一个 LCU, 如果不是则需要进一步解析 first— leu— in— slice— minus— 1 来计算条 带起始 LCU的具体位置, 具体计算过程如上述公式六所示。
第二步: 再根据 leu— slice— flag 判断条带划分类型。 leu— slice— flag 等于 1 , 表明是基于 LCU的条带划分, 则不需要进一步解析第二级的信 息,条带解码从条带起始 LCU的第一个 CU开始; leu— slice— flag等于 0 , 表明是基于 CU的条带划分, 则需要进一步解析第二级的信息来精确的 定位条带解码 的起始位置 ( SliceStartSCUAddress ;)。 先解析 first— scu— is— zero— flag 来确定条带起始 CU 是否是所属 LCU 的第一个 CU,如果不是则需要进一步解析 first— scu— in— slice— minus— 1来计算条带 起始 CU 的具体位置,, 具体计算过程如上述公式七所示, 条带解码从 条带起始 LCU中相对位置为 SliceStartSCUAddress的 CU开始。 或
第一步: 根据 lcu— slice— flag判断条带划分类型。
第二步: 若 lcu— slice— flag等于 1 , 表明是基于 LCU的条带划分, 则只需解析条带起始 LCU的位置。 先解析 first— lcu— is— zero— flag来确定 条带起始 LCU是否是图像的第一个 LCU, 如果不是则需要进一步解析 first— lcu— in— slice— minus— 1来计算条带起始 LCU的具体位置, 具体计算 过程如上述公式六所示; 若 lcu— slice— flag等于 0 , 表明是基于 CU的条 带划分,则需要解析条带起始 SCU的位置。先解析 first— scu— is— zero— flag 来确定条带起始 CU是否是所属 LCU的第一个 CU, 如果不是则需要进 一步解析 first— scu— in— slice— minus— 1来计算条带起始 CU的具体位置 , , 具体计算过程如上述公式七所示, 条带解码从条带起始 LCU 中相对位 置为 SliceStartSCUAddress的 CU开始。
6 ) 在结束位置信息字段包括结束 LCU位置信息字段和结束 SCU 位置信息字段时, 在结束 L C U位置信息为结束 L C U在图像中的顺序绝 对位置、 且结束 SCU位置信息为结束 SCU在结束 LCU中的顺序相对 位置时,本发明一个实施例提供的 HEVC条带头结束位置的语法结构如 表 7或表 8所示。
表 7
slice_header( ) { C Descriptor
... last— lcu— is— zero— flag 2 u(l) if(last_lcu_is_zero_flag==0) { last— lcu— in— slice— minus— 1 2 u(v)
}
if(lcu— slice— flag==0) { last— scu— is— zero— flag 2 u(l) if(last— scu— is— zero— flag == 0) { last— scu— in— slice— minus— 1 2 u(v)
}
}
...
}
表 8
Figure imgf000031_0001
表 7和表 8中, last— leu— is— zero— flag用于标示条带结束位置的 LCU 是不是图像内第一个 LCU, 如果 last— leu— is— zero— flag等于 1 , 则条带结 束的 LCU位置设为 0 , 条带解码将结束于第一个 LCU中的某个 CU。 last— leu— in— slice— minus— 1 用于标示条带的最后一个 LCU 的位置 ( SliceEndLCUAddress ) , 条带解码将结束于该 LCU 中的某个 CU。 SliceEndLCUAddress计算如公式八所示。
SliceEndLCUAddress = last— leu— in— slice— minus— 1 + 1
(公式八)
leu— slice— flag用于标示当前条带的划分类型, leu— slice— flag等于 1 表示当前条带划分是基于 LCU 的, 则不需要进一步写明条带结束 CU 的位置; leu— slice— flag等于 0表示当前条带划分是基于 CU的, 则需要 进一步写明条带结束 CU的位置。 该标识符的值一般通过如实施例一所 示方法解析得到, 也可能通过默认值进行设置。
表 7中, last— scu— is— zero— flag用于标示条带结束位置的 CU是不是 结束 LCU中的第一个 CU, 如果 last— scu— is— zero— flag等于 1 , 则条带结 束的 CU位置设为 0 ,条带解码至结束 LCU的第一个 CU截止。表 8中, last— scu— is— zero— flag用于标示条带结束位置的 CU是不是图像中的第一 个 CU, 如果 last— scu— is— zero— flag等于 1 , 则条带结束的 CU位置设为 0 , 条带解码至图像的第一个 CU截止。
表 7中, last— scu— in— slice— minus— 1用于标示条带的最后一个 CU在 结束 LCU中的具体位置( SliceEndSCUAddress ), 即条带的最后一个 CU 的右下角 SCU在所属 LCU中的相对位置偏移,条带解码至该 CU截止。 SliceEndSCUAddress计算如公式九所示。
SliceEndSCUAddress = last— scu— in— slice— minus— 1 + 1 (公 式九)
表 8中, last— scu— in— slice— minus— 1用于标示条带的最后一个 CU在 图像中的具体位置( SliceEndSCUAddress ), 即条带的最后一个 CU的右 下角 SCU 在所属图像中的绝对位置, 条带解码至该 CU 截止。 SliceEndSCUAddress计算如公式九所示。
解码时, 在解析条带头的过程中分两步获取结束位置信息: 第一步: 先根据第一级的信息来得到条带结束位置所属的 LCU: 先 解析 last— leu— is— zero— flag 来确定条带结束 LCU 是否是图像的第一个 LCU, 如果不是则需要进一步解析 last— lcu— in— slice— minus— 1 来计算条 带起始 LCU的具体位置, 具体计算过程如上述公式八所示。
第二步: 再根据 lcu— slice— flag 判断条带划分类型。 lcu— slice— flag 等于 1 , 表明是基于 LCU的条带划分, 则不需要进一步解析第二级的信 息, 条带解码至条带结束 LCU的最后一个 CU结束; lcu— slice— flag等 于 0 , 表明是基于 CU的条带划分, 则需要进一步解析第二级的信息来 精确的定位条带解码的结束位置 ( SliceEndSCUAddress ) , 先解析 last— scu— is— zero— flag来确定条带结束 CU是否是所属 LCU的第一个 CU , 如果不是则需要进一步解析 last— scu— in— slice— minus— 1 来计算条带结束 CU 的具体位置, 具体计算过程如上述公式九所示, 条带解码至条带结 束 LCU中相对位置为 SliceEndSCUAddress的 CU结束。
第一步: 根据 lcu— slice— flag判断条带划分类型。
第二步: 若 lcu— slice— flag等于 1 , 表明是基于 LCU的条带划分, 则只需解析条带结束 LCU的位置。 先解析 first— lcu— is— zero— flag来确定 条带结束 LCU是否是图像的第一个 LCU, 如果不是则需要进一步解析 first— lcu— in— slice— minus— 1来计算条带结束 LCU的具体位置, 具体计算 过程如上述公式八所示; 若 lcu— slice— flag等于 0 , 表明是基于 CU的条 带划分,则需要解析条带结束 SCU的位置。先解析 first— scu— is— zero— flag 来确定条带结束 CU是否是所属 LCU的第一个 CU, 如果不是则需要进 一步解析 first— scu— in— slice— minus— 1来计算条带结束 CU的具体位置, 具体计算过程如上述公式九所示, 条带解码从条带结束 LCU 中相对位 置为 SliceStartSCUAddress的 CU开始。
7 )在结束位置信息字段包括结束 LCU位置信息字段和 /或结束 SCU 位置信息字段时, 在结束 LCU位置信息为结束 LCU在图像中的倒序绝 对位置、 且结束 SCU位置信息为结束 SCU在结束 LCU中的倒序相对 位置时,本发明一个实施例提供的 HEVC条带头结束位置的语法结构如 表 9所示。
表 9 slice_header( ) { C Descriptor if(lcu— slice— flag==0) { last— scu— is— end— flag 2 u(l) if(last— scu— is— end— flag == 0) { last— scu— in— slice— minus— 1 2 u(v)
}
}
}
表 9中, leu— slice— flag用于标示当前条带的划分类型, leu— slice— flag 等于 1表示当前条带划分是基于 LCU的, 则不需要进一步写明条带结 束 CU的位置; leu— slice— flag等于 0表示当前条带划分是基于 CU的, 则需要进一步写明条带结束 CU的位置。 该标识符的值一般通过如实施 例一所示方法解析得到, 也可能通过默认值进行设置。
last— scu— is— end— flag用于标示条带结束位置的 CU是不是结束 LCU 中的最后一个 CU, 如果 last— scu— is— end— flag等于 1 , 则条带结束的 CU 位置设为 LCU的最后一个 CU, 条带解码至结束 LCU的最后一个 CU 截止。
last— scu— in— slice— minus— 1用于标示条带的最后一个 CU在结束 LCU 中的具体位置( SliceEndSCUAddress ), 即条带的最后一个 CU的右下角 SCU 在所属 LCU 中的相对位置偏移, 条带解码至该 CU 截止。 SliceEndSCUAddress计算如公式十。
SliceEndSCUAddress NumSCUsInLCU-2
last scu in slice minus 1
(公式十)
公式十中, NumSCUsInLCU为一个 LCU所包含的 SCU的总个数。 8 ) 在 CU 具有条带结束标志位时时, 本发明一个实施例提供的 HEVC编码单元结束标志位的语法结构如表 10或表 11所示。 表 10
Figure imgf000035_0001
表 11
Figure imgf000035_0002
do {
... coding_unit( ... , moreDataFlag) 2 1
3 1 4 if(last_lcu_is_end_flag== 1) { if( !entropy— coding— mode— flag ) moreDataFlag = more rbsp data( ) else { end— of— slice— flag 2 ae(v) moreDataFlag
= !end— of— slice— flag
}
}
....
} while( moreDataFlag )
}
表 10 和表 11 中, leu— slice— flag用于标示当前条带的划分类型, leu— slice— flag等于 1表示当前条带划分是基于 LCU的, 则不需要进一 步写明条带结束 CU的位置; leu— slice— flag等于 0表示当前条带划分是 基于 CU的, 则需要进一步写明条带结束 CU的位置。 该标识符的值一 般通过如实施例一所示方法解析得到, 也可能通过默认值进行设置。
split— coding— unit— flag 用于标示当前的 CU 是否要进一步分裂。 split— coding— unit— flag等于 1 ,则当前 CU将继续分裂为四个等大的更深 一级的 CU; split— coding— unit— flag等于 0 , 则当前 CU不再进行分裂, 是进行编码的最后一级的 CU。 moreDataFlag 用 于标示后续是否还有 当 前条带的数据。 moreDataFlag等于 1 , 则当前条带还有更多数据等待解码, 条带解码将 继续; moreDataFlag等于 0 , 则当前条带的数据已经全部解码完毕, 条 带解码将结束。
more— rbsp— data用于判断数据净载是否结束。 如果当前条带没有更 多数据净载, 该操作返回 0 , 否则返回 1.
entropy— coding— mode— flag 用于选取语法元素的熵编码方式。 entropy— coding— mode— flag等于 0 ,表示该种编码方法可以通过判断码流 数据结束来推断条带的结束, 则不需要写条带结束标志位; entropy— coding— mode— flag等于 1 ,表示该种编码方法不能通过判断码流 数据结束来推断条带的结束, 则需要些条带结束标志位。
end— of— slice— flag是条带结束标记位。 end— of— slice— flag等于 1 , 表 示当前 CU是条带中的最后一个 CU, 条带解码结束; end— of— slice— flag 等于 0 , 表示当前 CU不是条带中最后一个 CU, 当前条带需继续解码下 一个 CU。
解码时, 对每个 CU都会先根据 split— coding— unit— flag判断是否继 续分裂, 如果 split— coding— unit— flag等于 1 , 则将当前 CU分裂为四个 更小的 CU, 并对每个 CU都进行相同的 CU解析操作; 直到某个 CU的 split— coding— unit— flag等于 0 , 则当前 CU为实际进行解码的单元, 进入 解码重建过程,并在当前解码重建结束判断是否是基于 CU的条带划分, 若是则解析条带结束标志, 否则不解析。
条带结束标志解析过程是, 先根据 entropy_coding_mode_flag来判 断当前条带的熵编码类型, 如果 entropy— coding— mode— flag等于 0 , 则 根据操作 more— rbsp— data( )来给 moreDataFlag 赋值 ; 如 果 entropy— coding— mode— flag等于 1 ,贝1 J需要解析标志位 end— of— slice— flag , 并给 moreDataFlag 赋值 moreDataFlag 等于 1 , 则条带解码将继续; moreDataFlag等于 0 , 则条带解码将结束。
条带数据解码语法中, 对每一个 LCU进行循环, 每次循环的结束 也会判断是否是基于 CU条带划分, 若不是则解析条带结束标志, 若是 则不解析。 解析过程同上。 9 )在条带的结束位置信息为条带的长度信息时,如果条带是按 LCU 划分, 则可以在条带头中增加条带的 LCU长度信息, 本发明一个实施 例提供的条带长度语法结构如表 12所示。
表 12
Figure imgf000038_0001
slice— length— leu用于标示当前条带所包含的 LCU总个数。 条带结 束 LCU的位置 ( SliceEndLCUAddress ) 可以根据该值以及起始 LCU的 位置( SliceStartLCUAddress )可以按照公式十一计算, 条带解码结束于 SliceEndLCUAddress 对应的 LCU。
SliceEndLCUAddress = SliceStartLCUAddress + slice— length— leu
(公式十一)
10 ) 在条带的结束位置信息为条带的长度信息时, 如果条带是按 CU划分, 则可以在条带头中增加条带的 LCU长度信息以及结束 SCU 在结束 LCU 中的相对位置信息, 本发明一个实施例提供的条带长度语 法结构如表 13所示, 该实施例中, 结束 SCU在结束 LCU中的相对位 置信息为顺序相对位置信息。
表 13
Figure imgf000038_0002
slice— length— leu用于标示当前条带所包含的 LCU总个数。 条带结 束 LCU的位置 ( SliceEndLCUAddress ) 可以根据该值以及起始 LCU的 位置( SliceStartLCUAddress )可以按照公式十二计算, 条带解码将结束 于 SliceEndLCUAddress 对应的 LCU中的某个 CU。
SliceEndLCUAddress = SliceStartLCUAddress + slice— length— leu (公式十二)
last— scu— in— slice— minus— 1用于标示条带的最后一个 CU在结束 LCU 中的具体位置( SliceEndSCUAddress ), 即条带的最后一个 CU的右下角 SCU在所属 LCU中的相对位置, 条带解码至 SliceEndSCUAddress对应 的 CU截止。 SliceEndSCUAddress计算可以如公式十三所示。
SliceEndSCUAddress = last— scu— in— slice— minus— 1 + 1 (公式 十三)
11 ) 在条带的结束位置信息为条带的长度信息时, 如果条带是按 CU划分, 则可以在条带头中增加条带的 CU长度信息, 本发明一个实 施例提供的条带长度语法结构如表 14所示。
表 14
Figure imgf000039_0001
slice— length— cu— minus 1 用于标示当前条带所包含的 CU 总个数 ( NumCUInSlice ) , NumCUInSlice的计算可以如公式十四所示。 解码时 记录已解码 CU个数, 当解码 CU个数达到条带 CU总个数, 则结束条 带解码。
NumCUInSlice= slice— length— cu—minusl + 1 (公式 十四)
12 ) 在条带的结束位置信息为条带的长度信息时, 如果条带是按
CU划分, 则可以在条带头中增加条带的 SCU长度信息, 本发明一个实 施例提供的条带长度语法结构如表 15所示。
表 15
Figure imgf000039_0002
slice— length— scu— minus 1用于标示当前条带所包含的 SCU总个数, 并可以根据该值以及条带起始 LCU的位置( SliceStartLCUAddress ) , 条 带起始 CU在所属 LCU中的相对位置 ( SliceStartSCUAddress ) 和 LCU 包含 SCU的总数 ( NumSCUInLCU ) 来计算条带结束 CU的具体位置, 可以分别用该 CU所在 LCU的位置 ( SliceEndLCUAddress ) 以及该 CU 在 LCU 中的位置 ( SliceEndSCUAddress ) 表示, SliceEndLCUAddress 的计算可以如公式十五所示, SliceEndSCUAddress的计算可以如公式十 六所示。
SliceEndLCUAddress = SliceStartLCUAddress + ( SliceStartSCUAddress+slice— length— scu— minusl + 1 ) / NumSCUInLCU (公式十五)
SliceEndSCUAddress=(SliceStartSCUAddress+slice_length_scu_min us l + 1 ) %NumSCUInLCU
( 公 式十六)
13 ) 在可以根据 CU在 LCU中的相对位置推断 LCU每一层 CU的 分裂情况时, 本发明一个实施例提供的分裂标识位语法结构如表 16所 示。
表 16
Figure imgf000040_0001
split— coding— unit— flag
} else { if(StartAddress>=SliceStartSCUAddress ) split— coding— unit— flag 2 u(l) ae(v) else if(StartAddress+ MinCodingUnitSize
< SliceStartSCUAddress) split— coding— unit— flag=0 else split— coding— unit— flag= 1
}
}
}
CurrentCUInPicRange 用于表示当前 CU是否在视频图像区域内, CurrentCUInPicRange等于 1表示当前 CU所有像素都在视频图像区域 内; CurrentCUInPicRange等于 0表示当前 CU有部分像素在视频图像区 域外。
CurrCodingUnitSize 标记当前 CU的尺寸。
MinCodingUnitSize 表示 CU的最小尺寸。
LCUAddress 用于标记当前 CU所述 LCU在图像中位置。
SliceStartLCUAddress 用于标记条带起始 LCU在图像中的位置。 split— coding— unit— flag 标识当前 CU 是否进行进一步的分裂。 split— coding— unit— flag 等于 1 , 则当前 CU 将分裂为四个等大的 CU; split— coding— unit— flag等于 0 , 则当前 CU不再进行分裂, 是一个最终的 需实际解码的 CU。
StartSCUAddress 用于标记当前 CU在 LCU中的起始位置。
SliceStartSCUAddress用于标记条带起始 SCU在 LCU中的位置。 因此, 解码过程中先确认当前 CU是在视频图像范围内且大于最小 的 CU尺寸, 再解析分裂标志位; 否则, 则不需要解析分裂标识位。
在判断当前 CU是不是处于条带的第一个 LCU 中, 如果不是则直 接解析分裂标识位; 否则进入以下步骤进行判断。
解码过程中先确认当前 CU是在视频图像范围内且大于最小的 CU 尺寸, 再解析分裂标志位; 否则, 则不需要解析分裂标识位。
进一步判断当前 CU的起始位置与条带起始 CU的位置的关系。 如 果当前 CU的起始位置大于等于条带起始 CU的位置, 则需要进一步解 析分裂标志位; 如果当前 CU结束位置小于条带起始 CU的位置, 则不 需要进一步解析分裂标识位, 其值为 0; 其他情况, 也不需要进一步解 析分裂标识位, 其值为 1。
若分裂标志位为 0 , 则当前 CU不再进行分裂, 为最终的需实际解 码的 CU, 进入解码重建过程; 若分裂标志位为 1 , 则当前 CU分裂为四 个等大的深一层 CU, 且对每一个深一层 CU都进行完整的处理过程, 即判断是否进一步分裂或直接解码。
在以上各实施例中描述位置信息时, 包括起始 LCU 的绝对位置、 起始 SCU的相对位置、 结束 LCU的绝对位置、 结束 SCU的相对位置 等, 可直接对各位置的数值进行编码。 其中, 不限定数值的编码方式。
需要说明的是, 对于前述的各方法实施例, 为了简单描述, 故将其 都表述为一系列的动作组合, 但是本领域技术人员应该知悉, 本发明并 不受所描述的动作顺序的限制, 因为依据本发明, 某些步骤可以采用其 他顺序或者同时进行。 其次, 本领域技术人员也应该知悉, 说明书中所 描述的实施例均属于优选实施例, 所涉及的动作和模块并不一定是本发 明所必须的。
如下再介绍本发明实施例提供的装置, 图 7描述了本发明一个实施 例提供的条带编码装置的结构, 包括:
确定单元 701 , 用于根据判决信息确定当前划分对象的条带划分类 型。
划分单元 702, 用于按照确定单元 701确定的条带划分类型将当前 划分对象划分成条带。 写入单元 703 , 用于在起始位置信息字段写入划分单元 702划分的 当前条带的起始位置信息。
编码处理单元 704,用于对写入单元 703获得的当前条带进行编码, 输出编码码流。
在本发明的另一个实施例中, 写入单元 703 , 还可以用于将 702确 定单元确定的当前划分对象的条带划分类型信息写入划分类型信息字 段。
在本发明的另一个实施例中, 写入单元 703 , 具体用于在条带划分 类型为按 LCU划分时, 在起始 LCU位置信息字段写入当前条带的起始 LCU在图像中的绝对位置信息, 起始位置信息字段仅包括起始 LCU位 置信息字段; 在条带划分类型为按 CU划分时, 在起始 LCU位置信息 字段写入起始 LCU在图像中的绝对位置信息, 在起始 SCU位置信息字 段写入起始 SCU在起始 LCU中的相对位置信息, 起始位置信息字段包 括起始 LCU位置信息字段和起始 SCU位置信息字段; 或在条带划分类 型为按 CU划分时,在起始 SCU位置信息字段写入起始 SCU在起始 LCU 中的绝对位置信息, 起始位置信息字段仅包括起始 SCU位置信息字段。
在本发明的另一个实施例中, 写入单元 703还用于在结束位置信息 字段写入当前条带的结束位置信息。
在本发明的另一个实施例中, 写入单元 703 , 具体用于在条带划分 类型为按 LCU划分时, 在结束 LCU位置信息字段写入当前条带的结束 LCU在图像中的绝对位置信息, 结束位置信息字段仅包括结束 LCU位 置信息字段; 在条带划分类型为按 CU划分时, 在结束 LCU位置信息 字段写入结束 L C U在图像中的绝对位置信息, 在结束 S C U位置信息字 段写入所述结束 SCU在所述结束 LCU中的相对位置信息, 结束位置信 息字段包括结束 LCU位置信息字段和结束 SCU位置信息字段; 或在条 带划分类型为按 CU划分时, 在结束 SCU位置信息字段写入结束 SCU 在所述结束 L C U中的绝对位置信息,结束位置信息字段仅包括结束 S C U 位置信息字段。
在本发明的另一个实施例中,写入单元 703 ,还用于在确定单元 702 确定的条带划分类型为按 LCU划分时, 为当前条带中所有 LCU的条带 结束标志位赋值, 条带结束标志位位于当前条带包括的每一个 LCU的 最后一个 SCU的数据净载的最后一位, 其中结束 LCU中的条带结束标 志位赋值为有效;在确定单元 702确定的条带划分类型为按 CU划分时, 为当前条带中所有 CU的条带结束标志位赋值, 条带结束标志位位于当 前条带包括的每一个 CU的最后一个 SCU的数据净载的最后一位, 其 中结束 CU中的条带结束标志位赋值为有效。
在本发明的另一个实施例中, 编码处理单元 704, 还用于在对当前 条带的第一个 LCU进行编码时, 根据当前 CU在第一个 LCU中的位置 信息确定是否对当前 CU的分裂标识位进行编码。
从上可知, 本实施例可以根据判决信息确定当前划分对象的条带划 分类型, 按照确定的条带划分类型将当前划分对象划分成条带, 使划分 成的条带的数据量大小能够适应网络, 并且在不同的网络可以采用不同 的条带划分方式, 从而增强网络兼容性。
进一步, 在本发明的另一个实施例中, 还可以将当前划分对象的条 带划分类型信息写入划分类型信息字段,使解码装置可以获知当前条带 的划分类型, 从而根据该划分类型信息确定解码是否完成, 在确保正确 解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 使用的起始位置信息字段包 括起始 LCU位置信息字段和起始 SCU位置信息字段, 使解码装置在解 码时可以直接解析起始 LCU位置信息字段和起始 SCU位置信息字段中 的位置信息, 再根据解析得到的位置信息直接定位到条带的起始位置, 从而提高解码效率。 由于解码装置可以获知当前条带的划分类型, 在当 前条带按 LCU划分时, 可以仅向起始 LCU位置信息字段写入数据, 而 不需要向起始 SCU位置信息字段写入数据, 从而可以减少需要写入的 数据量, 提高编码效率; 也可以使解码装置不需要解析起始 SCU位置 信息字段, 进一步提高解码效率。
进一步, 在本发明的另一个实施例中, 可以在结束位置信息字段写 入当前条带的结束位置信息,使解码装置可以直接根据该结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。 在本发明的 另一个实施例中, 使用的结束位置信息字段包括结束 LCU位置信息字 段和结束 SCU位置信息字段, 使解码装置在解码时可以直接解析结束
LCU位置信息字段和结束 SCU位置信息字段中的位置信息, 再根据解 析得到的位置信息直接定位到条带的结束位置, 从而提高解码效率。 由 于解码装置可以获知当前条带的划分类型, 在当前条带按 LCU划分时, 可以仅向结束 LCU位置信息字段写入数据, 而不需要向结束 SCU位置 信息字段写入数据, 从而可以减少需要写入的数据量, 提高编码效率; 也可以使解码装置不需要解析结束 SCU位置信息字段, 进一步提高解 码效率。
进一步, 在本发明的另一个实施例中, 可以为当前条带中所有 CU 的条带结束标志位赋值, 并且将结束 CU中的条带结束标志位赋值为有 效, 使解码装置在解码时可以根据解码得到的条带结束标志位的值是否 有效确定解码是否完成, 从而在确保正确解码的同时提高解码效率。 由 于解码装置可以获知当前条带的划分类型, 因此解码装置可以在当前条 带按 LCU划分时, 仅解析当前条带最后一个 CU的结束标志位就可以 确定解码是否完成, 进一步提高解码效率。
图 8描述了本发明另一个实施例提供的条带解码装置的结构,包括: 解析单元 801 , 用于从起始位置信息字段解析当前条带的起始位置 信息。
解码单元 802, 用于根据解析单元 801解析获得的起始位置信息开 始对当前条带的解码, 并根据预置处理方式确定完成对当前条带的解 码。
输出单元 803 , 用于输出解码单元 802获得的条带的重建图像。 在本发明的另一个实施例中, 起始位置信息字段包括起始 LCU位 置信息字段和起始 SCU位置信息字段; 解析单元 801 , 具体用于从起始 LCU位置信息字段解析当前条带的起始 LCU的绝对位置信息, 从起始 SCU位置信息字段解析当前条带的起始 SCU的相对位置信息。
在本发明的另一个实施例中, 解析单元 801还用于从结束位置信息 字段解析当前条带的结束位置信息; 解码单元 802 , 用于根据解析单元 801获得的结束位置信息确定完成对当前条带的解码。
在本发明的另一个实施例中, 结束位置信息字段包括结束 LCU位 置信息字段和结束 SCU位置信息字段; 解析单元 801 , 具体用于从结束
LCU位置信息字段解析当前条带的结束 LCU的绝对位置信息, 从结束 SCU位置信息字段解析当前条带的结束 SCU的相对位置信息。
在本发明的另一个实施例中, 解析单元 801 , 还用于从头信息中解 析获得当前条带的条带划分类型信息; 解析单元 801 , 具体用于在当前 条带的条带划分类型为按 LCU划分时, 从起始 LCU位置信息字段解析 当前条带的起始 LCU 的绝对位置信息, 起始位置信息字段仅包括起始 LCU位置信息字段; 在当前条带的条带划分类型为按 CU划分时, 从起 始 LCU位置信息字段解析当前条带的起始 LCU的绝对位置信息, 从起 始 SCU位置信息字段解析当前条带的起始 SCU的相对位置信息, 起始 位置信息字段包括起始 LCU位置信息字段和起始 SCU位置信息字段; 或在当前条带的条带划分类型为按 CU划分时, 从起始 SCU位置信息 字段解析当前条带的起始 SCU 的绝对位置信息, 起始位置信息字段仅 包括起始 SCU位置信息字段。
在本发明的另一个实施例中, 解析单元 801 , 还用于根据解析获得 的条带划分类型信息从结束位置信息字段解析当前条带的结束位置信 息; 解码单元 802, 用于根据解析单元 801获得的结束位置信息确定完 成对当前条带的解码。
在本发明的另一个实施例中, 解析单元 801 , 具体用于在当前条带 的条带划分类型为按 LCU划分时, 从绝对 LCU位置信息字段解析当前 条带的绝对 LCU的绝对位置信息, 绝对位置信息字段仅包括绝对 LCU 位置信息字段;在当前条带的条带划分类型为按 CU划分时,从绝对 LCU 位置信息字段解析当前条带的绝对 LCU的绝对位置信息, 从绝对 SCU 位置信息字段解析当前条带的绝对 SCU 的相对位置信息, 绝对位置信 息字段包括绝对 LCU位置信息字段和绝对 SCU位置信息字段; 或在当 前条带的条带划分类型为按 CU划分时, 从绝对 SCU位置信息字段解 析当前条带的绝对 SCU 的绝对位置信息, 绝对位置信息字段仅包括绝 对 SCU位置信息字段。
从上可知, 本实施例中当前条带按照条带划分类型划分获得, 并且 条带划分类型根据判决信息确定, 因此划分成的条带的数据量大小能够 适应网络, 并且在不同的网络可以采用不同的条带划分方式, 从而增强 网络兼容性。
进一步, 在本发明的另一个实施例中, 还可以根据解析到的条带划 分类型信息获知当前条带的划分类型,从而根据该划分类型信息确定解 码是否完成, 在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 使用的起始位置信息字段包 括起始 LCU位置信息字段和起始 SCU位置信息字段, 因此可以直接解 析起始 LCU位置信息字段和起始 SCU位置信息字段中的位置信息, 再 根据解析得到的位置信息直接定位到条带的起始位置,从而提高解码效 率。 由于可以获知当前条带的划分类型, 在当前条带按 LCU划分时, 可以仅向起始 LCU位置信息字段写入数据, 而不需要向起始 SCU位置 信息字段写入数据, 从而可以减少需要写入的数据量, 提高编码效率; 也不需要解析起始 SCU位置信息字段, 进一步提高解码效率。
进一步, 在本发明的另一个实施例中, 可以直接根据结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。 在本发明的 另一个实施例中, 使用的结束位置信息字段包括结束 LCU位置信息字 段和结束 SCU位置信息字段, 因此可以直接解析结束 LCU位置信息字 段和结束 SCU位置信息字段中的位置信息, 再根据解析得到的位置信 息直接定位到条带的结束位置, 从而提高解码效率。 由于可以获知当前 条带的划分类型, 因此不需要解析结束 SCU位置信息字段, 进一步提 高解码效率。
进一步, 在本发明的另一个实施例中, 可以根据解码得到的条带结 束标志位的值是否有效确定解码是否完成,从而在确保正确解码的同时 提高解码效率。 由于可以获知当前条带的划分类型, 因此可以在当前条 带按 LCU划分时, 仅解析当前条带最后一个 CU的结束标志位就可以 确定解码是否完成, 进一步提高解码效率。
图 9描述了本发明另一个实施例提供的条带编码装置的结构,包括: 划分单元 901 , 用于按 CU将当前划分对象划分成条带。
写入单元 902, 用于在起始位置信息字段写入划分单元 901获得的 当前条带的起始位置信息; 当前条带的起始位置信息包括: 当前条带中 起始 LCU在图像中的绝对位置信息、 以及当前条带中起始 SCU在起始
LCU中的相对位置信息。
编码处理单元 903 ,用于对写入单元 902获得的当前条带进行编码, 输出编码码流。
在本发明的另一个实施例中, 写入单元 902还用于在结束位置信息 字段写入当前条带的结束位置信息。
在本发明的另一个实施例中, 写入单元 902 , 还用于为当前条带中 所有 CU的条带结束标志位赋值, 条带结束标志位位于当前条带包括的 每一个 CU的最后一个 SCU的数据净载的最后一位,其中结束 CU中的 条带结束标志位赋值为有效。
在本发明的另一个实施例中, 编码处理单元 903 , 还用于在对当前 条带的第一个 LCU进行编码时, 根据当前 CU在第一个 LCU中的位置 信息确定是否对当前 CU的分裂标识位进行编码。 本实施例可以不对某 些 CU的分裂标识位进行编码,因此不需要传输这些分裂标识位的数据 , 从而可以降低网络的占用, 提高网络的利用效率。
从上可知, 本实施例可以使用的起始位置信息字段包括起始 LCU 位置信息字段和起始 SCU位置信息字段, 使解码装置在解码时可以直 接解析起始 LCU 位置信息字段和起始 SCU位置信息字段中的位置信 息, 再根据解析得到的位置信息直接定位到条带的起始位置, 从而提高 解码效率。
进一步, 在本发明的另一个实施例中, 可以在结束位置信息字段写 入当前条带的结束位置信息,使解码装置可以直接根据该结束位置信息 确定解码完成, 从而在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 可以为当前条带中所有 CU 的条带结束标志位赋值, 并且将结束 CU中的条带结束标志位赋值为有 效, 使解码装置在解码时可以根据解码得到的条带结束标志位的值是否 有效确定解码是否完成, 从而在确保正确解码的同时提高解码效率。 图 10描述了本发明另一个实施例提供的条带解码装置的结构, 包 括: 解析单元 1001 ,用于从起始位置信息字段解析当前条带的起始位置 信息, 当前条带的起始位置信息包括: 当前条带中起始 LCU在图像中 的绝对位置信息、 以及当前条带中起始 SCU在起始 LCU中的相对位置 信息。
解码单元 1002 , 用于根据解析单元 1001获得的起始位置信息开始 对当前条带的解码, 并根据预置处理方式确定完成对当前条带的解码。
输出单元 1003 , 用于输出解码单元 1002获得的条带的重建图像。 在本发明的另一个实施例中, 解析单元 1001 ,还用于从结束位置信 息字段解析当前条带的结束位置信息; 解码单元 1002 , 用于根据解析单 元 1001获得的结束位置信息确定完成对当前条带的解码。
从上可知, 本实施例可以使用的起始位置信息字段包括起始 LCU 位置信息字段和起始 SCU位置信息字段, 因此可以直接解析起始 LCU 位置信息字段和起始 SCU位置信息字段中的位置信息, 再根据解析得 到的位置信息直接定位到条带的起始位置, 从而提高解码效率。
进一步, 在本发明的另一个实施例中, 可以直接根据该结束位置信 息确定解码完成, 从而在确保正确解码的同时提高解码效率。
进一步, 在本发明的另一个实施例中, 可以根据解码得到的条带结 束标志位的值是否有效确定解码是否完成,从而在确保正确解码的同时 提高解码效率。
上述装置和系统内的各模块之间的信息交互、 执行过程等内容, 由 于与本发明方法实施例基于同一构思, 具体内容可参见本发明方法实施 例中的叙述, 此处不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部 分流程, 是可以通过计算机程序来指令相关的硬件来完成, 上述的程序 可存储于一计算机可读取存储介质中, 该程序在执行时, 可包括如上述 各方法的实施例的流程。 其中, 上述的存储介质可为磁碟、 光盘、 只读 存储记忆体 ( ROM: Read-Only Memory ) 或随机存储记忆体 (RAM: Random Access Memory ) 等。 上实施例的说明只是用于帮助理解本发明的方法及其思想; 同时, 对于 本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范 围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的 限制。

Claims

权 利 要 求
1、 一种条带编码方法, 其特征在于, 包括:
按 CU将当前划分对象划分成条带;
在起始位置信息字段写入当前条带的起始位置信息,所述当前条带的起始 位置信息包括: 所述当前条带中起始 LCU在图像中的绝对位置信息、 以及所 述当前条带中起始 SCU在所述起始 LCU中的相对位置信息;
对所述当前条带进行编码, 输出编码码流。
2、 如权利要求 1所述的条带编码方法, 其特征在于,
所述起始 LCU在图像中的绝对位置信息为:所述起始 LCU在图像中的顺 序绝对位置信息或倒序绝对位置信息;
所述起始 SCU在所述起始 LCU中的相对位置信息为: 所述起始 SCU在 所述起始 LCU中的顺序相对位置信息或倒序相对位置信息。
3、 如权利要求 1或 2所述的条带编码方法, 其特征在于, 对所述当前条 带进行编码前, 进一步包括:
在结束位置信息字段写入当前条带的结束位置信息。
4、 如权利要求 3所述的条带编码方法, 其特征在于, 所述结束位置信息 包括所述当前条带中结束 LCU在图像中的绝对位置信息、 以及所述当前条带 中结束 SCU在所述结束 LCU中的相对位置信息;
所述结束 LCU在图像中的绝对位置信息具体为:所述结束 LCU在图像中 的顺序绝对位置信息或倒序绝对位置信息;
所述结束 SCU在所述结束 LCU中的相对位置信息为: 所述结束 SCU在 所述结束 LCU中的顺序相对位置信息或倒序相对位置信息。
5、 如权利要求 3所述的条带编码方法, 其特征在于, 所述结束位置信息 为所述当前条带的长度信息 , 所述当前条带的长度信息具体为:
所述当前条带包括的 LCU的数量、以及结束 CU在结束 LCU中的相对位 置;
所述当前条带包括的 CU的数量;
或 所述当前条带包括的 SCU的数量。
6、 如权利要求 1或 2所述的条带编码方法, 其特征在于, 对所述当前条 带进行编码前, 进一步包括:
为所述当前条带中所有 CU的条带结束标志位赋值,所述条带结束标志位 位于所述当前条带包括的每一个 CU的最后一个 SCU的数据净载的最后一位, 其中所述结束 CU中的条带结束标志位赋值为有效。
7、 如权利要求 1或 2所述的条带编码方法, 其特征在于, 在对当前条带 的第一个 LCU进行编码时,根据当前 CU在当前 LCU中的位置信息确定是否 对当前 CU的分裂标识位进行编码;
如果当前 CU不在所述当前划分对象范围内或所述当前 CU的尺寸为 SCU 的尺寸, 不对当前 CU的分裂标识位编码;
如果所述当前 CU在所述当前划分对象范围内且所述当前 CU的尺寸大于
SCU的尺寸,且所述当前 CU的起始位置大于等于条带起始 CU的位置, 才对 所述当前 CU的分裂标识位进行编码。
8、 一种条带解码方法, 其特征在于, 包括:
从起始位置信息字段解析当前条带的起始位置信息,所述当前条带的起始 位置信息包括: 所述当前条带中起始 LCU在图像中的绝对位置信息、 以及所 述当前条带中起始 SCU在所述起始 LCU中的相对位置信息;
根据所述起始位置信息开始对所述当前条带的解码,并根据预置处理方式 确定完成对所述当前条带的解码;
输出解码得到的当前条带的重建图像。
9、 如权利要求 8所述的条带解码方法, 其特征在于, 所述根据预置处理 方式确定完成对所述当前条带的解码具体为:
从结束位置信息字段解析所述当前条带的结束位置信息;
根据所述结束位置信息确定完成对所述当前条带的解码。
10、 如权利要求 9所述的条带解码方法, 其特征在于, 所述结束位置信息 包括所述当前条带中结束 LCU在图像中的绝对位置信息、 以及所述当前条带 中结束 SCU在所述结束 LCU中的相对位置信息;
所述结束 LCU在图像中的绝对位置信息具体为:所述结束 LCU在图像中 的顺序绝对位置信息或倒序绝对位置信息;
所述结束 SCU在所述结束 LCU中的相对位置信息为: 所述结束 SCU在 所述结束 LCU中的顺序相对位置信息或倒序相对位置信息。
11、 如权利要求 9所述的条带解码方法, 其特征在于, 所述当前条带的结 束位置信息为所述当前条带的长度信息, 所述当前条带的长度信息具体为: 所述当前条带包括的 LCU的数量、以及结束 CU在结束 LCU中的顺序相 对位置或倒序相对位置;
所述当前条带包括的 CU的数量;
所述当前条带包括的 SCU的数量。
12、 如权利要求 8所述的条带解码方法, 其特征在于, 在对当前条带的第 一个 LCU进行解码时,根据当前 CU在所述第一个 LCU中的位置信息确定是 否对当前 CU的分裂标识位进行解码;
如果当前 CU不在所述当前划分对象范围内或所述当前 CU的尺寸为 SCU 的尺寸, 不对当前 CU的分裂标识位进行解码;
如果所述当前 CU在所述当前划分对象范围内且所述当前 CU的尺寸大于 SCU的尺寸,且所述当前 CU的起始位置大于等于条带起始 CU的位置, 才对 所述当前 CU的分裂标识位进行解码。
13、 一种条带编码装置, 其特征在于, 包括:
划分单元, 用于按 CU将当前划分对象划分成条带;
写入单元,用于在起始位置信息字段写入所述划分单元获得的当前条带的 起始位置信息;所述当前条带的起始位置信息包括:所述当前条带中起始 LCU 在图像中的绝对位置信息、以及所述当前条带中起始 SCU在所述起始 LCU中 的相对位置信息;
编码处理单元, 用于对所述写入单元获得的当前条带进行编码,输出编码 码流。
14、 如权利要求 13所述的条带编码装置, 其特征在于, 所述写入单元, 还用于在结束位置信息字段写入当前条带的结束位置信息。
15、 如权利要求 13所述的条带编码装置, 其特征在于, 所述写入单元, 还用于为所述当前条带中所有 CU的条带结束标志位赋值,所述条带结束标志 位位于所述当前条带包括的每一个 CU的最后一个 SCU的数据净载的最后一 位, 其中所述结束 CU中的条带结束标志位赋值为有效。
16、 如权利要求 13至 15任一所述的条带编码装置, 其特征在于, 所述编 码处理单元, 还用于在对当前条带的第一个 LCU进行编码时, 根据当前 CU 在所述第一个 LCU中的位置信息确定是否对当前 CU的分裂标识位进行编码。
17、 一种条带解码装置, 其特征在于, 包括:
解析单元, 用于从起始位置信息字段解析当前条带的起始位置信息, 所述 当前条带的起始位置信息包括: 所述当前条带中起始 LCU在图像中的绝对位 置信息、 以及所述当前条带中起始 SCU在所述起始 LCU中的相对位置信息; 解码单元,用于根据所述解析单元获得的起始位置信息开始对所述当前条 带的解码, 并根据预置处理方式确定完成对所述当前条带的解码;
输出单元, 用于输出所述解码单元获得的条带的重建图像。
18、 如权利要求 17所述的条带解码装置, 其特征在于, 所述解析单元, 还用于从结束位置信息字段解析所述当前条带的结束位置信息;
所述解码单元,用于根据所述解析单元获得的结束位置信息确定完成对所 述当前条带的解码。
PCT/CN2012/070387 2011-01-14 2012-01-16 指示和获取用户流数的方法及通信装置 WO2012095032A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110008133.X 2011-01-14
CN201110008133.XA CN102595119B (zh) 2011-01-14 2011-01-14 条带编码方法及装置、条带解码方法及装置

Publications (1)

Publication Number Publication Date
WO2012095032A1 true WO2012095032A1 (zh) 2012-07-19

Family

ID=46483276

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/070387 WO2012095032A1 (zh) 2011-01-14 2012-01-16 指示和获取用户流数的方法及通信装置

Country Status (2)

Country Link
CN (1) CN102595119B (zh)
WO (1) WO2012095032A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DK3297284T3 (da) 2012-06-11 2019-09-23 Samsung Electronics Co Ltd Indkodning og afkodning af videoer, der deler sao-parametre, ifølge en farvekomponent
RU2608465C1 (ru) * 2013-01-04 2017-01-18 Самсунг Электроникс Ко., Лтд. Способ энтропийного кодирования сегмента слайса и устройство для него и способ энтропийного декодирования сегмента слайса и устройство для него
CN103813169B (zh) * 2014-02-19 2017-07-21 北京大学 视频编解码器中可伸缩的对象表示方法和装置
CN105791868B (zh) * 2016-04-07 2019-03-12 中星技术股份有限公司 视频编码的方法和设备
CN110022481B (zh) * 2018-01-10 2023-05-02 中兴通讯股份有限公司 视频码流的解码、生成方法及装置、存储介质、电子装置
CN109862357A (zh) * 2019-01-09 2019-06-07 深圳威尔视觉传媒有限公司 低延迟的云游戏图像编码方法、装置、设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101389021A (zh) * 2007-09-14 2009-03-18 华为技术有限公司 视频编解码方法及装置
CN101394550A (zh) * 2007-09-17 2009-03-25 华为技术有限公司 视频数据的打包方法及装置
CN101453656A (zh) * 2007-11-29 2009-06-10 华为技术有限公司 视频编码、解码方法及装置和视频编解码系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101389021A (zh) * 2007-09-14 2009-03-18 华为技术有限公司 视频编解码方法及装置
CN101394550A (zh) * 2007-09-17 2009-03-25 华为技术有限公司 视频数据的打包方法及装置
CN101453656A (zh) * 2007-11-29 2009-06-10 华为技术有限公司 视频编码、解码方法及装置和视频编解码系统

Also Published As

Publication number Publication date
CN102595119A (zh) 2012-07-18
CN102595119B (zh) 2014-03-12

Similar Documents

Publication Publication Date Title
JP6395667B2 (ja) 多視点映像符号化及び復号化用の、ハイレベルシンタックスを使用した改善されたシグナリングのための方法及び装置
JP6422849B2 (ja) マルチビュー・ビデオ符号化においてビューのスケーラビリティを信号伝達する方法および装置
AU2007243933B2 (en) Multi-view video coding method and device
US9774927B2 (en) Multi-layer video stream decoding
US20200413042A1 (en) Multi-Layer Video Stream Encoding and Decoding
CN104685886B (zh) 用于视频处理的装置及其方法
WO2012095032A1 (zh) 指示和获取用户流数的方法及通信装置
US10873751B2 (en) Video parameter set (VPS) syntax re-ordering for easy access of extension parameters
TW202133616A (zh) 視訊編解碼中的畫面標頭訊框內隨機存取畫面和漸進解碼器刷新訊號傳遞
WO2015196710A1 (zh) 一种设备能力协商的方法、装置和计算机存储介质
CN112166606B (zh) 用于处理图像的方法及其设备
TW202110187A (zh) 用於視訊寫碼之改寫參數集合之記憶體約束
WO2013159705A1 (zh) 编解码方法、视频序列码流的编解码方法及其对应的装置
JP2024112926A (ja) 符号化及び復号化方法並びに装置
KR20130116815A (ko) Hevc nal 유닛 구문 구조의 확장
WO2012095030A1 (zh) 条带编码方法及装置、条带解码方法及装置
CN116866604A (zh) 一种图像处理方法及装置
JP2015510354A (ja) 仮想参照復号器の超低遅延モードを用いるための方法および装置
EP2936809B1 (en) Multi-layer video stream decoding
WO2023174076A1 (zh) 编码方法及装置、解码方法及装置、存储介质、电子装置
CN112351284A (zh) 视频编码、解码方法和装置、电子设备和存储介质
CN114513658A (zh) 一种视频加载方法、装置、设备及介质
CN118714324A (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: 12734147

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12734147

Country of ref document: EP

Kind code of ref document: A1