WO2022188164A1 - Point cloud attribute decoding method and point cloud attribute encoding method - Google Patents

Point cloud attribute decoding method and point cloud attribute encoding method Download PDF

Info

Publication number
WO2022188164A1
WO2022188164A1 PCT/CN2021/080539 CN2021080539W WO2022188164A1 WO 2022188164 A1 WO2022188164 A1 WO 2022188164A1 CN 2021080539 W CN2021080539 W CN 2021080539W WO 2022188164 A1 WO2022188164 A1 WO 2022188164A1
Authority
WO
WIPO (PCT)
Prior art keywords
quantization parameter
chrominance
chrominance channel
channel
offset
Prior art date
Application number
PCT/CN2021/080539
Other languages
French (fr)
Chinese (zh)
Inventor
李璞
郑萧桢
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2021/080539 priority Critical patent/WO2022188164A1/en
Priority to CN202180083707.1A priority patent/CN116601672A/en
Publication of WO2022188164A1 publication Critical patent/WO2022188164A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation

Definitions

  • the present application relates to the technical field of point cloud processing, and in particular, to a point cloud attribute decoding method and a point cloud attribute encoding method.
  • a point cloud is a representation of a three-dimensional object or scene, which is composed of a set of discrete points that are randomly distributed in space and express the spatial structure and surface properties of a three-dimensional object or scene. To accurately reflect information in space, the number of discrete points required is enormous. In order to reduce the bandwidth occupied by point cloud data storage and transmission, the point cloud data needs to be encoded and compressed.
  • the embodiments of the present application provide a point cloud attribute decoding method and a point cloud attribute encoding method, one of which is to reduce the number of bits used for point cloud data transmission.
  • a first aspect of the embodiments of the present application provides a point cloud attribute decoding method, including:
  • the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
  • a second aspect of the embodiments of the present application provides a point cloud attribute encoding method, including:
  • the offset of the quantization parameter of the chrominance channel is encoded to the code stream
  • the offset of the quantization parameter of the chrominance channel is not encoded.
  • a third aspect of the embodiments of the present application provides a point cloud attribute decoding method, including:
  • each chrominance channel in the plurality of chrominance channels calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
  • each chrominance channel use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
  • a fourth aspect of the embodiments of the present application provides a point cloud attribute encoding method, including:
  • each chrominance channel in the plurality of chrominance channels calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
  • the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  • a fifth aspect of the embodiments of the present application provides a point cloud attribute decoding method, including:
  • the offset of the quantization parameter of the chrominance channel is a signed number
  • the chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
  • a sixth aspect of the embodiments of the present application provides a point cloud attribute encoding method, including:
  • the offset of the quantization parameter of the chrominance channel being a signed number
  • the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  • a seventh aspect of an embodiment of the present application provides a point cloud attribute decoding device, comprising: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
  • the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
  • An eighth aspect of an embodiment of the present application provides a point cloud attribute encoding device, including: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
  • the offset of the quantization parameter of the chrominance channel is encoded to the code stream
  • the offset of the quantization parameter of the chrominance channel is not encoded.
  • a ninth aspect of an embodiment of the present application provides a point cloud attribute decoding device, comprising: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
  • each chrominance channel in the plurality of chrominance channels calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
  • each chrominance channel use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
  • a tenth aspect of the embodiments of the present application provides a point cloud attribute encoding device, including: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
  • each chrominance channel in the plurality of chrominance channels calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
  • the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  • An eleventh aspect of the embodiments of the present application provides a point cloud attribute decoding device, including: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
  • the offset of the quantization parameter of the chrominance channel is a signed number
  • the chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
  • a twelfth aspect of an embodiment of the present application provides a point cloud attribute encoding device, comprising: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
  • the offset of the quantization parameter of the chrominance channel being a signed number
  • the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  • a thirteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute decoding method of the first aspect.
  • a fourteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding method of the second aspect.
  • a fifteenth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program implements the point cloud attribute decoding method of the third aspect when the computer program is executed by a processor.
  • a sixteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding method of the fourth aspect.
  • a seventeenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute decoding method of the fifth aspect.
  • An eighteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding method of the sixth aspect.
  • the point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded
  • the offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
  • FIG. 1 is a first flowchart of a point cloud attribute decoding method provided by an embodiment of the present application.
  • FIG. 2 is a first flowchart of a point cloud attribute encoding method provided by an embodiment of the present application.
  • FIG. 3 is a second flowchart of a point cloud attribute decoding method provided by an embodiment of the present application.
  • FIG. 4 is a second flowchart of a point cloud attribute encoding method provided by an embodiment of the present application.
  • FIG. 5 is a third flowchart of a point cloud attribute decoding method provided by an embodiment of the present application.
  • FIG. 6 is a third flowchart of a point cloud attribute encoding method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a point cloud attribute decoding apparatus provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for encoding a point cloud attribute provided by an embodiment of the present application.
  • a point cloud is a representation of a three-dimensional object or scene, which is composed of a set of discrete points that are randomly distributed in space and express the spatial structure and surface properties of a three-dimensional object or scene. To accurately reflect information in space, the number of discrete points required is enormous. In order to reduce the bandwidth occupied by point cloud data storage and transmission, the point cloud data needs to be encoded and compressed.
  • Point cloud data can include geometric data and attribute data.
  • the geometric data of the point cloud point may be the geometric coordinates of the point cloud point in three-dimensional space
  • the attribute data of the point cloud point may include one or more of the following: color, reflectance, Timestamps, transparency, normals corresponding to the slices where they are located, etc.
  • the geometric data and attribute data of the point cloud are usually encoded and decoded separately.
  • the point cloud geometry encoding and decoding may be performed first, and then the point cloud attribute encoding and decoding is performed after the point cloud geometry encoding and decoding is completed.
  • each point cloud point can be sorted according to the size of Morton code.
  • each point cloud point can also be sorted according to the size of Hilbert code. sort.
  • each point cloud point can calculate the corresponding Morton code and Hilbert code according to its geometric coordinates, so that according to the size of Morton code or Hilbert code, it can be divided into large to small or small to large. Sequential Sorts individual point cloud points.
  • each point cloud point is encoded and decoded in sequence according to Morton order or Hilbert order when performing geometric encoding and decoding on the point cloud, then each point cloud point after reconstructing the geometric data has Arranged in Morton order or Hilbert order, there is no need to reorder the point cloud first when encoding and decoding the point cloud attributes.
  • attribute prediction means that when the decoding end reconstructs the attribute value of the current point cloud point, the attribute value of the point cloud point that has been reconstructed (encoded and decoded) can be used to calculate the attribute prediction value of the current point cloud point. It is necessary to encode the difference between the actual value of the attribute of the current point cloud point and the predicted value of the attribute of the current point cloud point (that is, the attribute residual) into the code stream, and the decoding end can decode the attribute residual from the code stream. The attribute value of the current point cloud point is reconstructed by using the attribute residual and the attribute prediction value of the current point cloud point.
  • the encoding and decoding of point cloud attributes is carried out by means of attribute prediction, and the attribute residuals can be transmitted between the encoding end and the decoding end, which greatly reduces the amount of data to be transmitted and has the effect of data compression.
  • the attribute value of the point cloud point may be the attribute value of any of the aforementioned color, reflectivity, transparency, etc.
  • the point clouds can be arranged in Morton order, and the encoding end can traverse the point cloud points in the point cloud in Morton order.
  • the predicted value of its attribute can be set to 0, and the true value of the attribute of the current point cloud point can be recorded as A 0 , then
  • the current point cloud point can be calculated according to the attribute reconstruction value of several point cloud points before the Morton sequence (these point cloud points have been encoded and decoded)
  • the attribute prediction value of the point cloud point is A' i
  • the real value of the attribute of the current point cloud point can be recorded as A i
  • the encoding end may quantize the attribute residual before encoding the calculated attribute residual into the code stream.
  • Quantization can realize the compression of attribute residuals, thereby further reducing the amount of data transmitted. Specifically, quantization can map attribute residuals with similar numerical values to the same numerical value, that is, the attribute residuals with similar numerical values are no longer distinguished, but the numerical values of these attribute residuals are considered to be the same.
  • the values in the interval [1,3] can be mapped to 0, and the values in the interval [4, 6] is mapped to 1, then the quantized sequence can be changed to ⁇ 1,0,1,1,0,0 ⁇ , that is, ignoring the difference between 1, 2, 3 and between 4, 5, and 6 difference.
  • encoderShiftBit can be set according to requirements, for example, it can be set to 14.
  • QP is the quantization parameter. It can be seen that as long as the quantization parameter QP is determined, the quantization formula can be determined.
  • the quantization step size is negatively correlated with the accuracy of the quantized data, that is, the larger the quantization step size, the lower the accuracy of the quantized data, and the smaller the quantization step size, the higher the accuracy of the quantized data.
  • the larger the quantization step size is, the larger the difference between the ignored data will be. In this way, the compression rate of the data will be higher, and the accuracy of the data will be lost during the quantization process.
  • the accuracy of the data obtained after quantization will be higher.
  • the lower the value, the smaller the quantization step size the smaller the difference between the ignored data. In this way, the compression rate of the data will be lower, and the data will lose less precision during the quantization process, and the data obtained after quantization will be lower.
  • the quantization step size attrQuantStep is positively correlated with the quantization parameter QP. Therefore, the larger the quantization parameter, the lower the accuracy of the quantized data, and the smaller the quantization parameter, the lower the accuracy of the quantized data. higher.
  • the encoder can determine the MF corresponding to different QPs by looking up a table.
  • Table 1 is a table of quantization coefficients.
  • the encoder can use the quantization parameter QP as an index (the value of QP ranges from 0 to 63), and obtain the corresponding quantization coefficient MF through the above-mentioned quantization coefficient table query, so that the attribute residual can be quantified by MF. quantify.
  • the encoder can encode the quantized attribute residual into the code stream.
  • the decoding end can decode the quantized attribute residual from the code stream, and can perform inverse quantization on the quantized attribute residual.
  • the inverse quantized attribute residual can be compared with the attribute prediction value of the currently decoded point cloud point. Add up to reconstruct the attribute reconstruction value of the currently decoded point cloud point.
  • the encoding end may perform inverse quantization on the quantized attribute residual after completing the quantization of the attribute residual, and The attribute reconstruction value of the currently coded point cloud point is reconstructed by using the inverse quantized attribute residual and the attribute prediction value of the currently coded point cloud point.
  • the attribute prediction value of the current point cloud point is calculated according to the attribute reconstruction value of the point cloud point that has been encoded and decoded before the current point cloud point. After encoding and decoding, the attribute reconstruction value of the point cloud point can be reconstructed like the decoding end, and the attribute reconstruction value of the point cloud point can be used to calculate the attribute prediction value of the next point cloud point.
  • inverse quantization may be performed by the following inverse quantization formula:
  • the encoding end or the decoding end may determine the IMFs corresponding to different QPs by looking up a table.
  • Table 2 is an inverse quantization coefficient table.
  • the encoding end or the decoding end may use the quantization parameter QP as an index (the value of QP ranges from 0 to 63), and query the inverse quantization coefficient table to obtain the corresponding inverse quantization coefficient. IMF, so that IMF can be used to inverse quantize the quantized attribute residual.
  • point cloud properties include one or more properties such as color, reflectivity, timestamp, transparency, etc.
  • point cloud attributes different attributes of the point cloud are encoded and decoded separately.
  • the color property of the point cloud in one embodiment, the color of the point cloud can be represented on the YUV color space. In one example, if the color of the point cloud is represented in the RGB color space, the color can be converted from the RGB color space to the YUV color space.
  • the color of the point cloud can include a luminance channel and a chrominance channel. In this way, when encoding and decoding the color data of the point cloud, the luminance data of the luminance channel and the chrominance data of the chrominance channel of the color of the point cloud can be separately encoded and decoded.
  • the encoding end can use the chroma reconstruction value of the point cloud point that has been encoded and decoded to calculate the current encoded point cloud point.
  • the chrominance prediction value, and the chrominance residual of the currently coded point cloud point can be calculated by using the chrominance real value of the currently coded point cloud point and the chrominance prediction value.
  • the chrominance residual can be quantized. Specifically, the chrominance residual can be quantized by using the quantization parameter of the chrominance channel.
  • the quantization parameter of the chrominance channel can be used to quantize the chrominance residual.
  • the quantization parameter of the chrominance channel can be used to determine the quantization formula, so that the quantization formula can be used to quantize the chrominance residual.
  • the quantization parameter of the chrominance channel when performing inverse quantization on the quantized chrominance residual, can also be used to determine an inverse quantization formula, and the quantized chrominance residual can be inversely quantized by using the inverse quantization formula.
  • the quantization parameter of the chrominance channel may be obtained by adding the offset of the quantization parameter of the luminance channel and the quantization parameter of the chrominance channel.
  • the quantization parameter of the channel may be denoted as lumaQp
  • the offset of the quantization parameter of the chrominance channel can be used as a fixed syntax element to be encoded in the header information of the point cloud attribute.
  • Table 3 is the point cloud attribute provided by the embodiment of the present application. The first example of the header information.
  • Table 3 The first embodiment of header information of point cloud attributes
  • withColor color identification, used to indicate whether the point cloud attribute contains color data, its data type is a binary variable, in an example, when the value of withColor is '1', it means that the point cloud attribute contains color data, when A withColor value of '0' indicates that the point cloud attribute does not contain color data.
  • withRef reflectivity identifier, which is used to indicate whether the point cloud attribute contains reflectivity data. Its data type is a binary variable. In an example, when the value of withRef is '1', it means that the point cloud attribute contains reflectivity. Data, when the withRef value is '0', it means that the point cloud attribute does not contain reflectivity data.
  • cross_component_pred secondary prediction of attribute residual, its data type is a binary variable. In an example, when the value of cross_component_pred is '1', it means that secondary prediction of attribute residual is allowed, when the value of cross_component_pred is '0' ', it means that secondary prediction of attribute residuals is not allowed.
  • maxNumOfNeighbour The maximum number of neighbor points to be searched, whose data type is an unsigned integer, is used to control the search range of neighbor candidate points and the number of points cached by hardware during attribute prediction. In an example, maxNumOfNeighbours should not be greater than 1024.
  • maxNumOfPredictNeighbours The maximum number of neighbors selected for prediction, whose data type is an unsigned integer, is used to limit the number of neighbors selected during attribute prediction. In one example, maxNumOfPredictNeighbours should not be greater than 16.
  • numOflevelOfDetail the number of LoD layers, whose data type is an unsigned integer, used to control the number of LOD layers divided during attribute prediction. In an example, numOflevelOfDetail should not be greater than 32.
  • intraLodFlag LoD intra-layer prediction flag, its data type is a binary variable, which is used to control whether to enable intra-layer prediction. When the value of intraLodFlag is '1', intra-layer prediction is enabled, and when the value of intraLodFlag is '0' , turns off intra-layer prediction.
  • Transform The attribute transformation algorithm flag, whose data type is a binary variable, is used to control whether to use wavelet transform to encode attributes. When the value of Transform is '1', wavelet transform is used, and when the value of Transform is '0' , which encodes the attribute using the prediction method.
  • outputBitDepth The attribute output bit depth, whose data type is an unsigned integer, is used to control the attribute output bit depth.
  • the offset of the quantization parameter of the chrominance channel is fixed to be encoded into the code stream.
  • the point cloud attribute does not necessarily contain color data.
  • the point cloud attribute does not contain color data, since the point cloud color does not need to be encoded and decoded, it is also not necessary to use the offset of the quantization parameter of the chrominance channel. , if the offset of the quantization parameter of the chrominance channel is still encoded into the code stream, it will cause a certain bit waste.
  • FIG. 1 is a first flowchart of the point cloud attribute decoding method provided by the embodiment of the present application, and the method includes the following steps:
  • S108A Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel.
  • the encoding end can obtain the point cloud to be encoded.
  • the point cloud to be encoded can be any point cloud.
  • the point cloud to be encoded may be a point cloud obtained by scanning a lidar.
  • the point cloud to be encoded may be a point cloud obtained by three-dimensional reconstruction using an image.
  • the point cloud to be encoded may also be obtained by Point clouds obtained by other means.
  • the point cloud attributes of the point cloud to be encoded can have various attributes, but they do not necessarily include color attributes. For example, if the point cloud to be encoded is a point cloud scanned by a lidar, since the lidar cannot obtain color information, the point cloud attribute of the point cloud to be encoded may not include color data. For another example, if the point cloud to be encoded is a point cloud obtained by three-dimensional reconstruction of an image, since the image includes color information, the point cloud attribute of the point cloud to be encoded may include color data.
  • the encoding end can generate a corresponding color identification according to whether the point cloud attribute of the point cloud to be encoded includes color data, and can encode the generated color identification into the code stream.
  • the color identification can be used to indicate whether the point cloud attribute of the point cloud to be encoded includes color data.
  • the color identifier can be the syntax element withColor in the point cloud attribute header information, then when the point cloud attribute of the point cloud to be encoded includes color data, a color identifier withColor with a value of '1' can be generated. When the point cloud attribute of the point cloud does not include color data, a color flag withColor with a value of '0' can be generated.
  • the encoder can calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel. Specifically, as described above, the encoding end may add the quantization parameter chromaQpOffset of the chrominance channel and the quantization parameter lumaQp of the luminance channel to calculate the quantization parameter chromaQp of the chrominance channel. After calculating the quantization parameter of the chrominance channel, the quantization parameter can be used to quantize the chrominance residual, and the quantized chrominance residual can be encoded into the code stream.
  • the chrominance residual may be obtained by the coding end using the difference between the actual chrominance value of the currently coded point cloud point and the chrominance predicted value of the currently coded point cloud point, and the chrominance prediction of the currently coded point cloud point
  • the value can be calculated by using the chroma reconstruction value of the point cloud point that has been encoded and decoded.
  • the offset of the quantization parameter of the chrominance channel is encoded into the code stream, so that the decoding end can decode the offset of the quantization parameter of the chrominance channel from the code stream.
  • the encoding end does not encode the offset of the quantization parameter of the chroma channel to the code stream, and the decoding end can determine There is no offset of the quantization parameter of the chrominance channel in the code stream, so there is no need to decode the offset of the quantization parameter of the chrominance channel.
  • the decoding end may calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel.
  • the calculation method is the same as the above, that is, the offset chromaQpOffset of the quantization parameter of the chroma channel and the quantization parameter lumaQp of the luminance channel can be added to obtain the quantization parameter chromaQp of the chroma channel.
  • the quantization parameter can be used to inversely quantize the quantized chrominance residual at the coding end decoded from the code stream, so that the inverse quantized chrominance residual can be used to reconstruct the current
  • the chrominance value of the decoded point cloud point specifically, the chroma residual error after inverse quantization can be added to the chroma prediction value of the currently decoded point cloud point, so as to obtain the chroma reconstruction of the currently decoded point cloud point value.
  • the point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded
  • the offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
  • Table 4 is the second example of the header information of the point cloud attribute provided by the embodiment of the present application.
  • Table 4 Second embodiment of header information of point cloud attributes
  • chromaQpOffset is the offset of the quantization parameter of the chroma channel, which can be used to calculate the quantization parameter chromaQp of the chroma channel. Specifically, it can be calculated by the following formula:
  • chromaQp attribute_qp+chromaQpOffset
  • the quantization parameter chromaQp of the chrominance channel is obtained by adding the offset chromaQpOffset of the quantization parameter of the chrominance channel and the quantization parameter lumaQp of the luminance channel, and in the above embodiment of the header information of the point cloud attribute, the data of chromaQpOffset
  • the type is ue(v), and ue(v) represents the syntax element of the unsigned integer exponent Columbus encoding.
  • the result of adding chromaQpOffset and lumaQp chromaQp can only be greater than or equal to lumaQp, that is, the accuracy of the point cloud chroma after encoding and decoding is at most only The accuracy is the same as that of luminance, which cannot meet the need for higher accuracy of the chromaticity of the point cloud.
  • the data type of chromaQpOffset can be adjusted to a signed number, for example, the data type of chromaQpOffset can be set to se(v), where se(v) represents a signed integer exponential Golomb coding syntax element , so, chromaQpOffset can be a negative number, the result of adding chromaQpOffset and lumaQp chromaQp can be smaller than lumaQp, the quantization parameter of chrominance channel can be adjusted down, which expands the adjustable range of precision of point cloud chrominance data.
  • the offsets of the quantization parameters of the chrominance channel may be binarized using signed exponential Golomb.
  • Table 5 is the third example of the header information of the point cloud attribute provided by the embodiment of the present application.
  • Table 5 The third embodiment of header information of point cloud attributes
  • chromaQpOffset is the offset of the quantization parameter of the chrominance channel, but in some color representations, the color may include multiple chrominance channels, for example, may include a first chrominance channel and a second chrominance channel.
  • the first chrominance channel and the second chrominance channel may be a U chrominance channel and the other a V chrominance channel.
  • the first chrominance channel and the second chrominance channel may be a Cr chrominance channel and a Cb chrominance channel.
  • the first chrominance channel and the second chrominance channel may be a Pr chrominance channel and a Pb chrominance channel.
  • the first chrominance channel and the second chrominance channel may be a Pr chrominance channel and a Pb chrominance channel.
  • the offset of the quantization parameter of the chroma channel will be shared by multiple chroma channels, so that in the point cloud During color encoding and decoding, the chroma residuals corresponding to each chroma channel will be quantized using the same quantization parameters, which results in insufficient flexibility in point cloud color encoding and decoding.
  • the encoding end can encode the offset of the quantization parameter corresponding to the chrominance channel to the code stream for different chrominance channels, and can for each chrominance channel, according to its The offset of the corresponding quantization parameter is used to calculate the corresponding quantization parameter, so that the chrominance residual corresponding to different chrominance channels can be quantized by using different quantization parameters during quantization.
  • the decoding end can decode the offset of the quantization parameter corresponding to each chrominance channel from the code stream, and can use the offset of the corresponding quantization parameter to calculate the corresponding quantization parameter for each chrominance channel. , so that the chroma residuals of different chroma channels can be inversely quantized using different quantization parameters.
  • Table 6 is a fourth example of the header information of the point cloud attribute provided by this embodiment of the present application.
  • Table 6 Fourth embodiment of header information of point cloud attributes
  • the offset of the quantization parameter of the chrominance channel includes the offset of the quantization parameter of the Cb chrominance channel chromaQpOffsetCb and the offset of the quantization parameter of the Cr chrominance channel chromaQpOffsetCr, then the encoding end is in
  • both the offsets chromaQpOffsetCb and chromaQpOffsetCr of the quantization parameters of the two chrominance channels may be encoded into the code stream.
  • the decoding end decodes the offsets of the quantization parameters of the chrominance channel from the codestream
  • the offsets chromaQpOffsetCb and chromaQpOffsetCr of the quantization parameters of the two chrominance channels can also be decoded from the codestream.
  • the quantization parameter chromaQpCb of the Cb chrominance channel can be calculated. Specifically, it can be calculated by the following formula:
  • chromaQpCb attribute_qp+chromaQpOffsetCb;
  • the quantization parameter chromaQpCr of the Cr chrominance channel can be calculated. Specifically, it can be calculated by the following formula:
  • chromaQpCr attribute_qp+chromaQpOffsetCr;
  • the encoding end can use the quantization parameters corresponding to the chrominance channel itself when quantizing the chrominance residuals of different chrominance channels;
  • the terminal can use the quantization parameters corresponding to the chroma channels themselves, which improves the flexibility of point cloud color coding and decoding.
  • the encoder can encode a switch flag corresponding to the closed state into the code stream, and no longer encode the offsets of the quantization parameters of each chrominance channel.
  • the decoding end can decode the switch identification from the code stream.
  • the decoding end can determine that there is no offset of the quantization parameter of each chroma channel in the code stream, and can directly determine
  • the offsets of the quantization parameters of each chrominance channel are all preset values.
  • the preset value can be set according to actual requirements. In an example, the preset value can be 0, that is, when both chromaQpOffsetCb and chromaQpOffsetCr are 0, the encoder can encode the switch identifier corresponding to the off state to the code stream.
  • the encoding end can encode a corresponding open state.
  • the switch is identified to the code stream, and the offsets of the quantization parameters corresponding to each chrominance channel are also encoded into the code stream.
  • the decoding end can decode the code stream to obtain the switch identifier. Since the switch identifier corresponds to the ON state, the decoding end can continue to decode the code stream to obtain the offsets of the quantization parameters of each chrominance channel.
  • Table 7 is the fifth embodiment of the header information of the point cloud attribute provided by the embodiment of the present application.
  • Table 7 Fifth embodiment of header information of point cloud attributes
  • chromaQpOffsetEnableFlag may be the switch flag.
  • the quantization parameter of the chrominance channel when used to quantize or inversely quantize the chrominance residual, the quantization parameter of the chrominance channel can be used to determine the quantization formula or the inverse quantization formula.
  • the encoder when determining the quantization formula, the encoder can query the corresponding quantization coefficient MF in the quantization coefficient table (Table 1) according to the quantization parameter chromaQp of the chroma channel, and when determining the inverse quantization formula, the encoder or decoder can The corresponding inverse quantization coefficient IMF is queried in the inverse quantization coefficient table (Table 2) according to the quantization parameter chromaQp of the chrominance channel.
  • the value range of the quantization parameter chromaQp of the chrominance channel is 0-63.
  • the value of chromaQp may fall outside this range, resulting in data overflow.
  • the encoding end or the decoding end can calculate the quantization parameter of the chrominance channel. It is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel, and the quantization parameter of the chrominance channel after the limiting operation is used to quantize the chrominance residual.
  • the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel can be set according to the actual situation.
  • the minimum quantization parameter of can be 0, and the maximum quantization parameter corresponding to the chrominance channel can be 63. Of course, 0 and 63 here are only exemplary values.
  • the value range of the quantization parameter of the chroma channel may be independent of the value range of the quantization parameter of the luma channel, that is, the value range of chromaQp and the value range of lumaQp may be the same or different.
  • chromaMinQp the minimum quantization parameter corresponding to the chroma channel is recorded as chromaMinQp
  • maximum quantization parameter corresponding to the chroma channel is recorded as chromaMaxQp
  • minimum quantization parameter corresponding to the luma channel is recorded as lumaMinQp
  • maximum quantization parameter corresponding to the luma channel is recorded as lumaMaxQp
  • chromaMinQp Can be the same or different from lumaMinQp and can be the same or different from chromaMaxQp and lumaMaxQp.
  • Limiting the quantization parameters of the chroma channels can be implemented in various ways.
  • a clip operation can be performed on the calculated quantization parameters of the chrominance channel, and the following formula can be referred to:
  • chromaQp clip3(chromaMinQp, chromaMaxQp, attribute_qp+chromaQpOffset);
  • the meaning of clip3 is to truncate the third parameter (attribute_qp+chromaQpOffset) between the first parameter (chromaMinQp) and the second parameter (chromaMaxQp), that is, if the third parameter is smaller than the first parameter parameter, the output is the first parameter, if the third parameter is greater than the second parameter, the output is the second parameter, if the third parameter is between the first parameter and the second parameter, that is, the first parameter If the three parameters are greater than or equal to the first parameter and less than or equal to the second parameter, the third parameter is output.
  • the third parameter is output.
  • the limiting operation may be performed separately on the quantization parameters of each chrominance channel.
  • the quantization parameters of the chroma channel include chromaQpCb and chromaQpCr
  • the clip operation can be performed on chromaQpCb and chromaQpCr respectively, and the following formula can be referred to:
  • chromaQpCb clip3(chromaMinQp, chromaMaxQp, attribute_qp+chromaQpOffsetCb);
  • chromaQpCr clip3(chromaMinQp, chromaMaxQp, attribute_qp+chromaQpOffsetCr);
  • the quantization parameter of the chroma channel By limiting the quantization parameter of the chroma channel to be between the minimum quantization parameter and the maximum quantization parameter before using the quantization parameter of the chroma channel to quantize the chroma residual, the occurrence of data overflow can be prevented, and the subsequent quantization of the chroma residual quantification guarantees.
  • the point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded
  • the offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
  • FIG. 2 is a first flowchart of a point cloud attribute encoding method provided by an embodiment of the present application, and the method includes:
  • the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  • the offset of the quantization parameter of the encoded chrominance channel to the code stream includes:
  • the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  • the method further includes:
  • the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • the method before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further includes:
  • the quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the method further includes:
  • the chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  • the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
  • the point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded
  • the offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
  • FIG. 3 is a second flowchart of a point cloud attribute decoding method provided by an embodiment of the present application, and the method includes:
  • S302 Decode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream.
  • the plurality of chrominance channels include two chrominance channels.
  • the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
  • the offsets of the quantization parameters corresponding to each of the decoding multiple chrominance channels from the code stream include:
  • the offsets of the quantization parameters corresponding to each of the plurality of chrominance channels are decoded from the code stream.
  • the method further includes:
  • the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  • the offsets of the quantization parameters corresponding to each of the decoding multiple chrominance channels from the code stream include:
  • the switch flag corresponds to an on state
  • the offsets of the quantization parameters corresponding to each of the multiple chrominance channels are decoded from the code stream.
  • the method further includes:
  • the switch identifier corresponds to an off state, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  • the method further includes:
  • the switch identifier corresponds to an off state, it is determined that the offsets of the quantization parameters corresponding to the plurality of chrominance channels are all preset values.
  • the method before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the method further includes:
  • the quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
  • the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
  • syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma
  • the chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
  • FIG. 4 is a second flowchart of a point cloud attribute encoding method provided by an embodiment of the present application, and the method includes:
  • S402 Encode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels into a code stream.
  • the plurality of chrominance channels include two chrominance channels.
  • the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
  • encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream includes:
  • the offsets of the quantization parameters corresponding to the multiple chrominance channels are encoded into the code stream.
  • the method further includes:
  • the offset of the quantization parameter corresponding to each of the plurality of chrominance channels is not encoded.
  • encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream includes:
  • any of the offsets of the quantization parameters corresponding to the multiple chroma channels is not a preset value, encode the switch flag corresponding to the on state to the code stream, and quantize the corresponding quantization parameters of the multiple chroma channels
  • the offset of the parameter is encoded into the codestream.
  • the method further includes:
  • the offsets of the quantization parameters corresponding to the multiple chrominance channels are all preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the offsets of the quantization parameters corresponding to the multiple chrominance channels. shift.
  • the method before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further includes:
  • the quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the method further includes:
  • the chrominance residuals corresponding to each of the quantized chrominance channels are encoded into the code stream.
  • the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
  • syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma
  • the chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
  • FIG. 5 is a third flowchart of a point cloud attribute decoding method provided by an embodiment of the present application, and the method includes:
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  • the offset of the quantization parameter of the decoded chrominance channel from the code stream includes:
  • the switch identifier corresponds to an on state
  • the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
  • the method further includes:
  • the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
  • the method further includes:
  • the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
  • the offset of the quantization parameter of the decoded chrominance channel from the code stream includes:
  • the offset of the quantization parameter of the chrominance channel is decoded from the code stream.
  • the method further includes:
  • the color identifier indicates that the point cloud attribute does not contain color data, it is determined that the offset of the quantization parameter of the chrominance channel does not exist in the code stream.
  • the color identifier is decoded from the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is decoded from the code stream.
  • the method before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the method further includes:
  • the quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
  • the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
  • the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
  • FIG. 6 is a third flowchart of a point cloud attribute encoding method provided by an embodiment of the present application, and the method includes:
  • S602. Encode the offset of the quantization parameter of the chrominance channel into a code stream.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  • encoding the offset of the quantization parameter of the chrominance channel into the code stream includes:
  • the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  • the method further includes:
  • the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • encoding the offset of the quantization parameter of the chrominance channel into the code stream includes:
  • the offset of the quantization parameter of the chrominance channel is encoded into the code stream.
  • the method further includes:
  • the offset of the quantization parameter of the chrominance channel is not encoded.
  • the color identifier is encoded into the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is encoded into the code stream.
  • the method before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further includes:
  • the quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the method further includes:
  • the chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  • the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
  • the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
  • FIG. 7 is a schematic structural diagram of a point cloud attribute decoding device provided by an embodiment of the present application, and the device includes:
  • the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
  • the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  • the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream, it is used for:
  • the switch identifier corresponds to an on state
  • the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
  • the processor is also used for:
  • the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
  • the processor is also used for:
  • the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
  • the processor is also used for:
  • the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
  • the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
  • the point cloud attribute encoding and decoding device provided in the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded includes color data, and can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded
  • the offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
  • FIG. 8 is a schematic structural diagram of a point cloud attribute encoding device provided by an embodiment of the present application, and the device includes:
  • the offset of the quantization parameter of the chrominance channel is encoded to the code stream
  • the offset of the quantization parameter of the chrominance channel is not encoded.
  • the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  • the processor when encoding the offset of the quantization parameter of the chrominance channel to the code stream, the processor is used for:
  • the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  • the processor is also used for:
  • the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • the processor is also used for:
  • the quantization parameter of the chrominance channel Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. between the maximum quantization parameters corresponding to the chroma channels.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the processor is also used for:
  • the chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  • the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
  • the point cloud attribute encoding and decoding device provided in the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded includes color data, and can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded
  • the offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
  • the embodiment of the present application also provides a point cloud attribute decoding device, the structure of which can be referred to FIG. 7 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
  • each chrominance channel in the plurality of chrominance channels calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
  • each chrominance channel use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
  • the plurality of chrominance channels include two chrominance channels.
  • the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
  • the processor decodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream, it is used for:
  • the offsets of the quantization parameters corresponding to each of the plurality of chrominance channels are decoded from the code stream.
  • the processor is also used for:
  • the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  • the processor decodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream, it is used for:
  • the switch flag corresponds to an on state
  • the offsets of the quantization parameters corresponding to each of the multiple chrominance channels are decoded from the code stream.
  • the processor is also used for:
  • the switch identifier corresponds to an off state, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  • the processor is also used for:
  • the switch identifier corresponds to an off state, it is determined that the offsets of the quantization parameters corresponding to the plurality of chrominance channels are all preset values.
  • the processor is also used for:
  • the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
  • the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
  • syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma
  • the chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
  • An embodiment of the present application also provides a point cloud attribute encoding device, the structure of which can be referred to FIG. 8 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
  • each chrominance channel in the plurality of chrominance channels calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
  • the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  • the plurality of chrominance channels include two chrominance channels.
  • the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
  • the processor encodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels into the code stream, it is used for:
  • the offsets of the quantization parameters corresponding to the multiple chrominance channels are encoded into the code stream.
  • the processor is also used for:
  • the offset of the quantization parameter corresponding to each of the plurality of chrominance channels is not encoded.
  • the processor encodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels into the code stream, it is used for:
  • any of the offsets of the quantization parameters corresponding to the multiple chroma channels is not a preset value, encode the switch flag corresponding to the on state to the code stream, and quantize the corresponding quantization parameters of the multiple chroma channels
  • the offset of the parameter is encoded into the codestream.
  • the processor is also used for:
  • the offsets of the quantization parameters corresponding to the multiple chrominance channels are all preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the offsets of the quantization parameters corresponding to the multiple chrominance channels. shift.
  • the processor is also used for:
  • the quantization parameter of the chrominance channel Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. between the maximum quantization parameters corresponding to the chroma channels.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the offset of the quantization parameter of the chrominance channel is a signed number.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the processor is also used for:
  • the chrominance residuals corresponding to each of the quantized chrominance channels are encoded into the code stream.
  • the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
  • syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma
  • the chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
  • the embodiment of the present application also provides a point cloud attribute decoding device, the structure of which can be referred to FIG. 7 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
  • the offset of the quantization parameter of the chrominance channel is a signed number
  • the chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  • the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream, it is used for:
  • the switch identifier corresponds to an on state
  • the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
  • the processor is also used for:
  • the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
  • the processor is also used for:
  • the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
  • the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream, it is used for:
  • the offset of the quantization parameter of the chrominance channel is decoded from the code stream.
  • the processor is also used for:
  • the color identifier indicates that the point cloud attribute does not contain color data, it is determined that the offset of the quantization parameter of the chrominance channel does not exist in the code stream.
  • the color identifier is decoded from the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is decoded from the code stream.
  • the processor is also used for:
  • the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
  • the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
  • the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
  • An embodiment of the present application also provides a point cloud attribute encoding device, the structure of which can be referred to FIG. 8 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
  • the offset of the quantization parameter of the chrominance channel being a signed number
  • the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  • the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  • the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  • the processor encodes the offset of the quantization parameter of the chrominance channel into the code stream, it is used for:
  • the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  • the processor is also used for:
  • the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  • the processor encodes the offset of the quantization parameter of the chrominance channel into the code stream, it is used for:
  • the offset of the quantization parameter of the chrominance channel is encoded into the code stream.
  • the processor is also used for:
  • the offset of the quantization parameter of the chrominance channel is not encoded.
  • the color identifier is encoded into the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is encoded into the code stream.
  • the processor is also used for:
  • the quantization parameter of the chrominance channel Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. Between the maximum quantization parameters corresponding to the chroma channels.
  • the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel
  • the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
  • the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  • the processor is also used for:
  • the chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  • the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
  • the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the point cloud attribute decoding methods provided by the embodiments of the present application is implemented .
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the point cloud attribute encoding methods provided by the embodiments of the present application is implemented .
  • Embodiments of the present application may take the form of a computer program product implemented on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein.
  • Computer-usable storage media includes permanent and non-permanent, removable and non-removable media, and storage of information can be accomplished by any method or technology.
  • Information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • PRAM phase-change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM Electrically Erasable Programmable Read Only Memory
  • Flash Memory or other memory technology
  • CD-ROM Compact Disc Read Only Memory
  • CD-ROM Compact Disc Read Only Memory
  • DVD Digital Versatile Disc
  • Magnetic tape cassettes magnetic tape magnetic disk storage or other magnetic storage devices or any other non-

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Color Television Systems (AREA)

Abstract

Disclosed in embodiments of the present application is a point cloud attribute decoding method, comprising: decoding a color identifier of a point cloud attribute from a code stream; when the color identifier indicates that the point cloud attribute includes color data, decoding, from the code stream, an offset of a quantization parameter of a chrominance channel; calculating the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel; performing, by using the quantization parameter of the chrominance channel, inverse quantization on a chrominance residual corresponding to the chrominance channel; and when the color identifier indicates that the point cloud attribute does not include color data, determining that there is no offset of the quantization parameter of the chrominance channel in the code stream. According to the method disclosed in the embodiments of the present application, the number of bits used for point cloud data transmission is reduced.

Description

点云属性解码方法和点云属性编码方法Point cloud attribute decoding method and point cloud attribute encoding method 技术领域technical field
本申请涉及点云处理技术领域,尤其涉及点云属性解码方法和点云属性编码方法。The present application relates to the technical field of point cloud processing, and in particular, to a point cloud attribute decoding method and a point cloud attribute encoding method.
背景技术Background technique
点云是三维物体或场景的一种表现形式,是由空间中一组无规则分布、表达三维物体或场景空间结构和表面属性的离散点集所构成。为了准确反映空间中的信息,所需离散点的数量是巨大的。为了减少点云数据存储和传输时所占用的带宽,需要对点云数据进行编码压缩处理。A point cloud is a representation of a three-dimensional object or scene, which is composed of a set of discrete points that are randomly distributed in space and express the spatial structure and surface properties of a three-dimensional object or scene. To accurately reflect information in space, the number of discrete points required is enormous. In order to reduce the bandwidth occupied by point cloud data storage and transmission, the point cloud data needs to be encoded and compressed.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请实施例提供了点云属性解码方法和点云属性编码方法,目的之一是降低点云数据传输所使用的比特数。In view of this, the embodiments of the present application provide a point cloud attribute decoding method and a point cloud attribute encoding method, one of which is to reduce the number of bits used for point cloud data transmission.
本申请实施例第一方面提供一种点云属性解码方法,包括:A first aspect of the embodiments of the present application provides a point cloud attribute decoding method, including:
从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
当所述颜色标识指示所述点云属性包含颜色数据时,从码流中解码色度通道的量化参数的偏移量;When the color identifier indicates that the point cloud attribute contains color data, decoding the offset of the quantization parameter of the chrominance channel from the code stream;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化;Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel;
当所述颜色标识指示所述点云属性未包含颜色数据时,确定所述码流中未存在色度通道的量化参数的偏移量。When the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
本申请实施例第二方面提供一种点云属性编码方法,包括:A second aspect of the embodiments of the present application provides a point cloud attribute encoding method, including:
获取待编码点云;Get the point cloud to be encoded;
生成用于指示所述待编码点云的点云属性是否包含颜色数据的颜色标识,并编码所述颜色标识到码流;generating a color identifier for indicating whether the point cloud attribute of the point cloud to be encoded contains color data, and encoding the color identifier into a code stream;
当所述颜色标识指示所述待编码点云的点云属性包含颜色数据时,编码色度通道的量化参数的偏移量到码流;When the color identifier indicates that the point cloud attribute of the to-be-coded point cloud contains color data, the offset of the quantization parameter of the chrominance channel is encoded to the code stream;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化;Using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel;
当所述颜色标识指示所述待编码点云的点云属性未包含颜色数据时,不编码所述色度通道的量化参数的偏移量。When the color identification indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
本申请实施例第三方面提供一种点云属性解码方法,包括:A third aspect of the embodiments of the present application provides a point cloud attribute decoding method, including:
从码流中解码多个色度通道各自对应的量化参数的偏移量;Decode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream;
对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。For each chrominance channel, use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
本申请实施例第四方面提供一种点云属性编码方法,包括:A fourth aspect of the embodiments of the present application provides a point cloud attribute encoding method, including:
将多个色度通道各自对应的量化参数的偏移量编码到码流;encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream;
对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。For each chrominance channel, the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
本申请实施例第五方面提供一种点云属性解码方法,包括:A fifth aspect of the embodiments of the present application provides a point cloud attribute decoding method, including:
从码流中解码色度通道的量化参数的偏移量,所述色度通道的量化参数的偏移量是有符号数;Decode the offset of the quantization parameter of the chrominance channel from the code stream, the offset of the quantization parameter of the chrominance channel is a signed number;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。The chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
本申请实施例第六方面提供一种点云属性编码方法,包括:A sixth aspect of the embodiments of the present application provides a point cloud attribute encoding method, including:
将色度通道的量化参数的偏移量编码到码流,所述色度通道的量化参数的偏移量是有符号数;encoding the offset of the quantization parameter of the chrominance channel into the code stream, the offset of the quantization parameter of the chrominance channel being a signed number;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。The chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
本申请实施例第七方面提供一种点云属性解码装置,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A seventh aspect of an embodiment of the present application provides a point cloud attribute decoding device, comprising: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
当所述颜色标识指示所述点云属性包含颜色数据时,从码流中解码色度通道的量化参数的偏移量;When the color identifier indicates that the point cloud attribute contains color data, decoding the offset of the quantization parameter of the chrominance channel from the code stream;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化;Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel;
当所述颜色标识指示所述点云属性未包含颜色数据时,确定所述码流中未存在色度通道的量化参数的偏移量。When the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
本申请实施例第八方面提供一种点云属性编码装置,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:An eighth aspect of an embodiment of the present application provides a point cloud attribute encoding device, including: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
获取待编码点云;Get the point cloud to be encoded;
生成用于指示所述待编码点云的点云属性是否包含颜色数据的颜色标识,并编码所述颜色标识到码流;generating a color identifier for indicating whether the point cloud attribute of the point cloud to be encoded contains color data, and encoding the color identifier into a code stream;
当所述颜色标识指示所述待编码点云的点云属性包含颜色数据时,编码色度通道的量化参数的偏移量到码流;When the color identifier indicates that the point cloud attribute of the to-be-coded point cloud contains color data, the offset of the quantization parameter of the chrominance channel is encoded to the code stream;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化;Using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel;
当所述颜色标识指示所述待编码点云的点云属性未包含颜色数据时,不编码所述色度通道的量化参数的偏移量。When the color identification indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
本申请实施例第九方面提供一种点云属性解码装置,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A ninth aspect of an embodiment of the present application provides a point cloud attribute decoding device, comprising: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
从码流中解码多个色度通道各自对应的量化参数的偏移量;Decode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream;
对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。For each chrominance channel, use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
本申请实施例第十方面提供一种点云属性编码装置,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A tenth aspect of the embodiments of the present application provides a point cloud attribute encoding device, including: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
将多个色度通道各自对应的量化参数的偏移量编码到码流;encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream;
对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。For each chrominance channel, the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
本申请实施例第十一方面提供一种点云属性解码装置,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:An eleventh aspect of the embodiments of the present application provides a point cloud attribute decoding device, including: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
从码流中解码色度通道的量化参数的偏移量,所述色度通道的量化参数的偏移量是有符号数;Decode the offset of the quantization parameter of the chrominance channel from the code stream, the offset of the quantization parameter of the chrominance channel is a signed number;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。The chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
本申请实施例第十二方面提供一种点云属性编码装置,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A twelfth aspect of an embodiment of the present application provides a point cloud attribute encoding device, comprising: a processor and a memory storing a computer program, where the processor implements the following steps when executing the computer program:
将色度通道的量化参数的偏移量编码到码流,所述色度通道的量化参数的偏移量是有符号数;encoding the offset of the quantization parameter of the chrominance channel into the code stream, the offset of the quantization parameter of the chrominance channel being a signed number;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。The chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
本申请实施例第十三方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面的点云属性解码方法。A thirteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute decoding method of the first aspect.
本申请实施例第十四方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第二方面的点云属性编码方法。A fourteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding method of the second aspect.
本申请实施例第十五方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第三方面的点云属性解码方法。A fifteenth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program implements the point cloud attribute decoding method of the third aspect when the computer program is executed by a processor.
本申请实施例第十六方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第四方面的点云属性编码方法。A sixteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding method of the fourth aspect.
本申请实施例第十七方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第五方面的点云属性解码方法。A seventeenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute decoding method of the fifth aspect.
本申请实施例第十八方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第六方面的点云属性编码方法。An eighteenth aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding method of the sixth aspect.
本申请实施例提供的点云属性编解码方法,可以在待编码点云的点云属性包含颜色数据时才编码色度通道的量化参数的偏移量,而在待编码点云的点云属性不包括颜色数据时可以不编码色度通道的量化参数的偏移量,从而可以节省比特。The point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded The offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.
图1是本申请实施例提供的点云属性解码方法的第一流程图。FIG. 1 is a first flowchart of a point cloud attribute decoding method provided by an embodiment of the present application.
图2是本申请实施例提供的点云属性编码方法的第一流程图。FIG. 2 is a first flowchart of a point cloud attribute encoding method provided by an embodiment of the present application.
图3是本申请实施例提供的点云属性解码方法的第二流程图。FIG. 3 is a second flowchart of a point cloud attribute decoding method provided by an embodiment of the present application.
图4是本申请实施例提供的点云属性编码方法的第二流程图。FIG. 4 is a second flowchart of a point cloud attribute encoding method provided by an embodiment of the present application.
图5是本申请实施例提供的点云属性解码方法的第三流程图。FIG. 5 is a third flowchart of a point cloud attribute decoding method provided by an embodiment of the present application.
图6是本申请实施例提供的点云属性编码方法的第三流程图。FIG. 6 is a third flowchart of a point cloud attribute encoding method provided by an embodiment of the present application.
图7是本申请实施例提供的点云属性解码装置的结构示意图。FIG. 7 is a schematic structural diagram of a point cloud attribute decoding apparatus provided by an embodiment of the present application.
图8是本申请实施例提供的点云属性编码装置的结构示意图。FIG. 8 is a schematic structural diagram of an apparatus for encoding a point cloud attribute provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
点云是三维物体或场景的一种表现形式,是由空间中一组无规则分布、表达三维物体或场景空间结构和表面属性的离散点集所构成。为了准确反映空间中的信息,所需离散点的数量是巨大的。为了减少点云数据存储和传输时所占用的带宽,需要对点云数据进行编码压缩处理。A point cloud is a representation of a three-dimensional object or scene, which is composed of a set of discrete points that are randomly distributed in space and express the spatial structure and surface properties of a three-dimensional object or scene. To accurately reflect information in space, the number of discrete points required is enormous. In order to reduce the bandwidth occupied by point cloud data storage and transmission, the point cloud data needs to be encoded and compressed.
点云数据可以包括几何数据和属性数据。对一个点云点而言,该点云点的几何数据可以是该点云点在三维空间中的几何坐标,该点云点的属性数据可以包括以下一种或多种:颜色、反射率、时间戳、透明度、所在切面对应的法线等。Point cloud data can include geometric data and attribute data. For a point cloud point, the geometric data of the point cloud point may be the geometric coordinates of the point cloud point in three-dimensional space, and the attribute data of the point cloud point may include one or more of the following: color, reflectance, Timestamps, transparency, normals corresponding to the slices where they are located, etc.
点云的几何数据和属性数据通常是分开进行编解码的。在一种实施方式中,由于点云属性的编解码需要利用点云的几何数据,因此可以先进行点云几何编解码,在点云几何编解码完成后再进行点云属性的编解码。The geometric data and attribute data of the point cloud are usually encoded and decoded separately. In one embodiment, since the point cloud attribute encoding and decoding needs to use the point cloud geometric data, the point cloud geometry encoding and decoding may be performed first, and then the point cloud attribute encoding and decoding is performed after the point cloud geometry encoding and decoding is completed.
在完成点云几何编解码后,在一种实施方式中,可以先对点云进行重排序。点云 排序的方式有多种,在一些例子中,可以将各个点云点按莫顿码的大小进行排序,在一些例子中,也可以将各个点云点按希尔伯特码的大小进行排序。这里,每个点云点都可以根据其几何坐标计算出对应的莫顿码和希尔伯特码,从而可以按照莫顿码或希尔伯特码的大小,以大到小或小到大的顺序对各个点云点进行排序。在一种实施方式中,若在对点云进行几何编解码时是按照莫顿序或希尔伯特序依次对各个点云点进行编解码的,则重建几何数据后的各个点云点已经按照莫顿序或希尔伯特序的方式排列,在进行点云属性编解码时就无需先对点云进行重排序。After completing the point cloud geometry encoding and decoding, in one embodiment, the point cloud may be reordered first. There are many ways to sort point clouds. In some examples, each point cloud point can be sorted according to the size of Morton code. In some examples, each point cloud point can also be sorted according to the size of Hilbert code. sort. Here, each point cloud point can calculate the corresponding Morton code and Hilbert code according to its geometric coordinates, so that according to the size of Morton code or Hilbert code, it can be divided into large to small or small to large. Sequential Sorts individual point cloud points. In one embodiment, if each point cloud point is encoded and decoded in sequence according to Morton order or Hilbert order when performing geometric encoding and decoding on the point cloud, then each point cloud point after reconstructing the geometric data has Arranged in Morton order or Hilbert order, there is no need to reorder the point cloud first when encoding and decoding the point cloud attributes.
对于点云属性的编解码,在一种实施方式中,可以通过属性预测的方式进行。所谓属性预测,即解码端在重建当前点云点的属性值时,可以利用已重建(已完成编解码)得到的点云点的属性值计算当前点云点的属性预测值,则编码端只需要将当前点云点的属性真实值与该当前点云点的属性预测值的差值(即属性残差)编码到码流,解码端便可以从码流中解码得到的该属性残差,利用该属性残差和当前点云点的属性预测值重建出当前点云点的属性值。通过属性预测的方式进行点云属性的编解码,在编码端和解码端之间传输属性残差即可,大大降低了要传输的数据量,起到数据压缩的效果。这里,点云点的属性值可以是前文所述的颜色、反射率、透明度等任一方面的属性值。For the encoding and decoding of point cloud attributes, in one embodiment, it can be performed by means of attribute prediction. The so-called attribute prediction means that when the decoding end reconstructs the attribute value of the current point cloud point, the attribute value of the point cloud point that has been reconstructed (encoded and decoded) can be used to calculate the attribute prediction value of the current point cloud point. It is necessary to encode the difference between the actual value of the attribute of the current point cloud point and the predicted value of the attribute of the current point cloud point (that is, the attribute residual) into the code stream, and the decoding end can decode the attribute residual from the code stream. The attribute value of the current point cloud point is reconstructed by using the attribute residual and the attribute prediction value of the current point cloud point. The encoding and decoding of point cloud attributes is carried out by means of attribute prediction, and the attribute residuals can be transmitted between the encoding end and the decoding end, which greatly reduces the amount of data to be transmitted and has the effect of data compression. Here, the attribute value of the point cloud point may be the attribute value of any of the aforementioned color, reflectivity, transparency, etc.
为便于理解,可以举个例子,在该例子中,点云可以以莫顿序排列,编码端可以对该点云中的点云点按莫顿序的顺序进行遍历。具体的,对于第一个点云点,由于在其之前没有已完成编解码的点云点,因此可以设其属性预测值为0,可以记当前点云点的属性真实值为A 0,则第一个点云点对应的属性残差R 0为:R 0=A 0。对于第一个点云点以外的其它点云点,可以根据当前点云点在莫顿序下序前的若干个点云点(这些点云点已完成编解码)的属性重建值计算出当前点云点的属性预测值即A′ i,可以记当前点云点的属性真实值为A i,则属性残差R i为:R i=A i-A′ iFor ease of understanding, an example can be given. In this example, the point clouds can be arranged in Morton order, and the encoding end can traverse the point cloud points in the point cloud in Morton order. Specifically, for the first point cloud point, since there is no point cloud point that has been encoded and decoded before it, the predicted value of its attribute can be set to 0, and the true value of the attribute of the current point cloud point can be recorded as A 0 , then The attribute residual R 0 corresponding to the first point cloud point is: R 0 =A 0 . For other point cloud points other than the first point cloud point, the current point cloud point can be calculated according to the attribute reconstruction value of several point cloud points before the Morton sequence (these point cloud points have been encoded and decoded) The attribute prediction value of the point cloud point is A' i , and the real value of the attribute of the current point cloud point can be recorded as A i , then the attribute residual R i is: R i =A i -A' i .
在一种实施方式中,编码端在将计算出的属性残差编码到码流之前,可以先对属性残差进行量化。量化可以实现对属性残差的压缩,从而进一步降低传输的数据量。具体的,量化可以将数值相近的属性残差映射成同一个数值,即不再对这些数值相近的属性残差进行区分,而是认为这些属性残差的数值相同。可以举个例子,比如数列{6,2,5,4,3,1},在一种量化方式中,可以将位于区间[1,3]的数值都映射为0,将位于区间[4,6]的数值都映射为1,则量化后的数列可以变为{1,0,1,1,0,0},即无视了1、2、3之间和4、5、6之间的差异。In an implementation manner, the encoding end may quantize the attribute residual before encoding the calculated attribute residual into the code stream. Quantization can realize the compression of attribute residuals, thereby further reducing the amount of data transmitted. Specifically, quantization can map attribute residuals with similar numerical values to the same numerical value, that is, the attribute residuals with similar numerical values are no longer distinguished, but the numerical values of these attribute residuals are considered to be the same. For example, such as the sequence {6,2,5,4,3,1}, in a quantization method, the values in the interval [1,3] can be mapped to 0, and the values in the interval [4, 6] is mapped to 1, then the quantized sequence can be changed to {1,0,1,1,0,0}, that is, ignoring the difference between 1, 2, 3 and between 4, 5, and 6 difference.
在对属性残差进行量化时,在一种实施方式中,可以通过下面的量化公式进行:When quantizing the attribute residual, in one embodiment, the following quantization formula can be used:
Figure PCTCN2021080539-appb-000001
Figure PCTCN2021080539-appb-000001
其中,
Figure PCTCN2021080539-appb-000002
表示量化后的属性残差,encoderShiftBit可以根据需求进行设定,比如可以设为14。offset表示控制舍入的参数,在量化时其可以通过式子:offset=1<<(encoderShift-1)计算得到,量化系数MF可以通过量化步长attrQuantStep得到:
in,
Figure PCTCN2021080539-appb-000002
Indicates the quantized attribute residual, and encoderShiftBit can be set according to requirements, for example, it can be set to 14. Offset represents the parameter that controls rounding, which can be calculated by the formula: offset=1<<(encoderShift-1) during quantization, and the quantization coefficient MF can be obtained by the quantization step size attrQuantStep:
Figure PCTCN2021080539-appb-000003
Figure PCTCN2021080539-appb-000003
Figure PCTCN2021080539-appb-000004
Figure PCTCN2021080539-appb-000004
其中,QP是量化参数。可见,只要量化参数QP确定,量化公式就可以确定。where QP is the quantization parameter. It can be seen that as long as the quantization parameter QP is determined, the quantization formula can be determined.
可以理解的,量化步长与量化后的数据的精度是负相关的,即量化步长越大,量化后的数据的精度越低,量化步长越小,量化后的数据的精度越高。具体的,量化步长越大,意味着被无视的数据之间的差异越大,这样,数据的压缩率就越高,数据在量化过程中损失的精度越多,量化后得到的数据的精度越低,反之,量化步长越小,意味着被无视的数据之间的差异越小,这样,数据的压缩率就越低,数据在量化过程中损失的精度越少,量化后得到的数据的精度越高。而由上述量化步长的计算公式可知,量化步长attrQuantStep与量化参数QP是正相关的,因此,量化参数越大,量化后的数据的精度越低,量化参数越小,量化后的数据的精度越高。It can be understood that the quantization step size is negatively correlated with the accuracy of the quantized data, that is, the larger the quantization step size, the lower the accuracy of the quantized data, and the smaller the quantization step size, the higher the accuracy of the quantized data. Specifically, the larger the quantization step size is, the larger the difference between the ignored data will be. In this way, the compression rate of the data will be higher, and the accuracy of the data will be lost during the quantization process. The accuracy of the data obtained after quantization will be higher. The lower the value, the smaller the quantization step size, the smaller the difference between the ignored data. In this way, the compression rate of the data will be lower, and the data will lose less precision during the quantization process, and the data obtained after quantization will be lower. the higher the accuracy. It can be seen from the above calculation formula of the quantization step size that the quantization step size attrQuantStep is positively correlated with the quantization parameter QP. Therefore, the larger the quantization parameter, the lower the accuracy of the quantized data, and the smaller the quantization parameter, the lower the accuracy of the quantized data. higher.
在通过量化参数QP确定量化系数MF时,在一种实施方式中,编码端可以通过查表的方式确定不同的QP所对应的MF。这里,量化参数QP与量化系数MF之间的关系可以参考表一,表一是量化系数表。When the quantization coefficient MF is determined by using the quantization parameter QP, in one embodiment, the encoder can determine the MF corresponding to different QPs by looking up a table. Here, for the relationship between the quantization parameter QP and the quantization coefficient MF, reference may be made to Table 1, and Table 1 is a table of quantization coefficients.
表一:量化系数表Table 1: Quantization coefficient table
QP的值value of QP MF的值value of MF QP的值value of QP MF的值value of MF QP的值value of QP MF的值value of MF QP的值value of QP MF的值value of MF
00 1638416384 11 1502415024 22 1377713777 33 1263412634
44 1158511585 55 1062410624 66 97429742 77 89338933
88 81928192 99 75127512 1010 68896889 1111 63176317
1212 57935793 1313 53125312 1414 48714871 1515 44674467
1616 40964096 1717 37563756 1818 34443444 1919 31583158
2020 28962896 21twenty one 26562656 22twenty two 24352435 23twenty three 22332233
24twenty four 20482048 2525 18781878 2626 17221722 2727 15791579
2828 14481448 2929 13281328 3030 12181218 3131 11171117
3232 10241024 3333 939939 3434 861861 3535 790790
3636 724724 3737 664664 3838 609609 3939 558558
4040 512512 4141 470470 4242 431431 4343 395395
4444 362362 4545 332332 4646 304304 4747 279279
4848 256256 4949 235235 5050 215215 5151 197197
5252 181181 5353 166166 5454 152152 5555 140140
5656 128128 5757 117117 5858 108108 5959 9999
6060 9191 6161 8383 6262 7676 6363 7070
在对属性残差进行量化时,编码端可以以量化参数QP为索引(QP的取值范围0~63),通过上述量化系数表查询得到对应的量化系数MF,从而可以利用MF对属性残差进行量化。When quantizing the attribute residual, the encoder can use the quantization parameter QP as an index (the value of QP ranges from 0 to 63), and obtain the corresponding quantization coefficient MF through the above-mentioned quantization coefficient table query, so that the attribute residual can be quantified by MF. quantify.
编码端在完成属性残差的量化后,可以将量化后的属性残差编码到码流。而解码端可以从码流中解码得到量化后的属性残差,并可以对该量化后的属性残差进行反量化,反量化后的属性残差可以与当前解码的点云点的属性预测值相加,重建出当前解码的点云点的属性重建值。After completing the quantization of the attribute residual, the encoder can encode the quantized attribute residual into the code stream. The decoding end can decode the quantized attribute residual from the code stream, and can perform inverse quantization on the quantized attribute residual. The inverse quantized attribute residual can be compared with the attribute prediction value of the currently decoded point cloud point. Add up to reconstruct the attribute reconstruction value of the currently decoded point cloud point.
为减少解码端重建出的属性重建值与属性真实值之间的误差,在一种实施方式中,编码端可以在完成属性残差的量化后,对量化后的属性残差进行反量化,并利用反量化后的属性残差与当前编码的点云点的属性预测值重建出当前编码的点云点的属性重建值。在前文已有提及,当前点云点的属性预测值是根据当前点云点之前已经完成编解码的点云点的属性重建值计算得到的,因此,编码端在完成一个点云点的属性编解码后,可以和解码端一样重建出该点云点的属性重建值,该点云点的属性重建值可以用于计算下一个点云点的属性预测值。In order to reduce the error between the reconstructed attribute value reconstructed by the decoding end and the real value of the attribute, in one embodiment, the encoding end may perform inverse quantization on the quantized attribute residual after completing the quantization of the attribute residual, and The attribute reconstruction value of the currently coded point cloud point is reconstructed by using the inverse quantized attribute residual and the attribute prediction value of the currently coded point cloud point. As mentioned above, the attribute prediction value of the current point cloud point is calculated according to the attribute reconstruction value of the point cloud point that has been encoded and decoded before the current point cloud point. After encoding and decoding, the attribute reconstruction value of the point cloud point can be reconstructed like the decoding end, and the attribute reconstruction value of the point cloud point can be used to calculate the attribute prediction value of the next point cloud point.
在编码端或解码端对量化后的属性残差进行反量化时,在一种实施方式中,可以通过以下反量化公式进行反量化:When performing inverse quantization on the quantized attribute residual at the encoding end or the decoding end, in one embodiment, inverse quantization may be performed by the following inverse quantization formula:
Figure PCTCN2021080539-appb-000005
Figure PCTCN2021080539-appb-000005
其中,
Figure PCTCN2021080539-appb-000006
表示反量化后的属性残差,也可以称为重构残差。decoderShiftBit可以根据需求进行设定,比如可以设为6;offset表示控制舍入的参数,在反量化时其可以通过式子:offset=1<<(decoderShift-1)计算得到;反量化系数IMF可以通过量化步长attrQuantStep得到:
in,
Figure PCTCN2021080539-appb-000006
Represents the attribute residual after inverse quantization, which can also be called reconstruction residual. decoderShiftBit can be set according to requirements, for example, it can be set to 6; offset represents a parameter that controls rounding, which can be calculated by the formula: offset=1<<(decoderShift-1) during inverse quantization; the inverse quantization coefficient IMF can be Obtained by the quantization step size attrQuantStep:
IMF=(1<<decoderShift)×attrQuantStepIMF=(1<<decoderShift)×attrQuantStep
Figure PCTCN2021080539-appb-000007
Figure PCTCN2021080539-appb-000007
见,只要量化参数QP确定,反量化公式就可以确定。See, as long as the quantization parameter QP is determined, the inverse quantization formula can be determined.
在通过量化参数QP确定反量化系数IMF时,在一种实施方式中,编码端或解码端可以通过查表的方式确定不同的QP所对应的IMF。这里,量化参数QP与反量化系数IMF之间的关系可以参考表二,表二是反量化系数表。When the inverse quantization coefficient IMF is determined by the quantization parameter QP, in one embodiment, the encoding end or the decoding end may determine the IMFs corresponding to different QPs by looking up a table. Here, for the relationship between the quantization parameter QP and the inverse quantization coefficient IMF, reference may be made to Table 2, which is an inverse quantization coefficient table.
表二:反量化系数表Table 2: Inverse quantization coefficient table
QP的值value of QP IMF的值IMF value QP的值value of QP IMF的值IMF value QP的值value of QP IMF的值IMF value QP的值value of QP IMF的值IMF value
00 6464 11 7070 22 7676 33 8383
44 9191 55 9999 66 108108 77 117117
88 128128 99 140140 1010 152152 1111 166166
1212 181181 1313 197197 1414 215215 1515 235235
1616 256256 1717 279279 1818 304304 1919 332332
2020 362362 21twenty one 395395 22twenty two 431431 23twenty three 470470
24twenty four 512512 2525 558558 2626 609609 2727 664664
2828 724724 2929 790790 3030 861861 3131 939939
3232 10241024 3333 11171117 3434 12181218 3535 13281328
3636 14481448 3737 15791579 3838 17221722 3939 18781878
4040 20482048 4141 22332233 4242 24352435 4343 26562656
4444 28962896 4545 31583158 4646 34443444 4747 37563756
4848 40964096 4949 44674467 5050 48714871 5151 53125312
5252 57935793 5353 63176317 5454 68896889 5555 75127512
5656 81928192 5757 89338933 5858 97429742 5959 1062410624
6060 1158511585 6161 1263412634 6262 1377713777 6363 1502415024
在对量化后的属性残差进行反量化时,编码端或解码端可以以量化参数QP为索引(QP的取值范围0~63),通过所述反量化系数表查询得到对应的反量化系数IMF,从而可以利用IMF对量化后的属性残差进行反量化。When performing inverse quantization on the quantized attribute residual, the encoding end or the decoding end may use the quantization parameter QP as an index (the value of QP ranges from 0 to 63), and query the inverse quantization coefficient table to obtain the corresponding inverse quantization coefficient. IMF, so that IMF can be used to inverse quantize the quantized attribute residual.
如前所述,点云属性包括颜色、反射率、时间戳、透明度等一种或多种属性。在点云属性编解码时,点云的不同属性是分别进行编解码的。对于点云的颜色属性,在一种实施方式中,点云的颜色可以在YUV的颜色空间上表示。在一个例子中,若点云的颜色在RGB的颜色空间上表示,则可以将该颜色从RGB的颜色空间转化到YUV的颜色空间。当点云的颜色在YUV的颜色空间上表示时,点云的颜色可以包括亮度通道和色度通道。如此,在对点云的颜色数据进行编解码时,对点云颜色的亮度通道的亮度数据和色度通道的色度数据可以分别进行编解码。As mentioned earlier, point cloud properties include one or more properties such as color, reflectivity, timestamp, transparency, etc. When encoding and decoding point cloud attributes, different attributes of the point cloud are encoded and decoded separately. For the color property of the point cloud, in one embodiment, the color of the point cloud can be represented on the YUV color space. In one example, if the color of the point cloud is represented in the RGB color space, the color can be converted from the RGB color space to the YUV color space. When the color of the point cloud is represented on the YUV color space, the color of the point cloud can include a luminance channel and a chrominance channel. In this way, when encoding and decoding the color data of the point cloud, the luminance data of the luminance channel and the chrominance data of the chrominance channel of the color of the point cloud can be separately encoded and decoded.
在对点云的色度数据进行编解码时,由于色度也是点云属性的一种,因此编码端可以利用已完成编解码的点云点的色度重建值计算当前编码的点云点的色度预测值, 并可以利用当前编码的点云点的色度真实值与所述色度预测值计算当前编码的点云点的色度残差。在计算得到当前编码的点云点的色度残差后,可以对色度残差进行量化,具体的,可以利用色度通道的量化参数对色度残差进行量化。When encoding and decoding the chrominance data of the point cloud, since the chrominance is also a kind of point cloud attribute, the encoding end can use the chroma reconstruction value of the point cloud point that has been encoded and decoded to calculate the current encoded point cloud point. The chrominance prediction value, and the chrominance residual of the currently coded point cloud point can be calculated by using the chrominance real value of the currently coded point cloud point and the chrominance prediction value. After the chrominance residual of the currently encoded point cloud point is calculated, the chrominance residual can be quantized. Specifically, the chrominance residual can be quantized by using the quantization parameter of the chrominance channel.
色度通道的量化参数可以用于对色度残差进行量化,具体的,色度通道的量化参数可以用于确定量化公式,从而利用量化公式可以对色度残差进行量化。相应的,在对量化后的色度残差进行反量化时,也可以利用色度通道的量化参数确定反量化公式,利用该反量化公式可以对量化后的色度残差进行反量化。The quantization parameter of the chrominance channel can be used to quantize the chrominance residual. Specifically, the quantization parameter of the chrominance channel can be used to determine the quantization formula, so that the quantization formula can be used to quantize the chrominance residual. Correspondingly, when performing inverse quantization on the quantized chrominance residual, the quantization parameter of the chrominance channel can also be used to determine an inverse quantization formula, and the quantized chrominance residual can be inversely quantized by using the inverse quantization formula.
在一种实施方式中,色度通道的量化参数可以是亮度通道的量化参数与色度通道的量化参数的偏移量相加得到的,这里,色度通道的量化参数可以记为chromaQp,亮度通道的量化参数可以记为lumaQp,色度通道的量化参数的偏移量可以记为chromaQpOffset,则三者之间可以满足以下关系:chromaQp=lumaQp+chromaQpOffset。In one embodiment, the quantization parameter of the chrominance channel may be obtained by adding the offset of the quantization parameter of the luminance channel and the quantization parameter of the chrominance channel. The quantization parameter of the channel may be denoted as lumaQp, and the offset of the quantization parameter of the chroma channel may be denoted as chromaQpOffset, and the following relationship may be satisfied between the three: chromaQp=lumaQp+chromaQpOffset.
在一种实施方式中,色度通道的量化参数的偏移量可以作为点云属性的头信息中固定要编码的语法元素,可以参考表三,表三是本申请实施例提供的点云属性的头信息的第一实施例。In one embodiment, the offset of the quantization parameter of the chrominance channel can be used as a fixed syntax element to be encoded in the header information of the point cloud attribute. Reference can be made to Table 3. Table 3 is the point cloud attribute provided by the embodiment of the present application. The first example of the header information.
表三:点云属性的头信息的第一实施例Table 3: The first embodiment of header information of point cloud attributes
Figure PCTCN2021080539-appb-000008
Figure PCTCN2021080539-appb-000008
表三中的点云属性的头信息包含的各个语法元素的含义如下:The meanings of each syntax element included in the header information of the point cloud attributes in Table 3 are as follows:
1、withColor:颜色标识,用于指示点云属性是否包含颜色数据,其数据类型为二 值变量,在一个例子中,当withColor的值为‘1’时,表示点云属性包含颜色数据,当withColor值为‘0’时表示点云属性不包含颜色数据。1. withColor: color identification, used to indicate whether the point cloud attribute contains color data, its data type is a binary variable, in an example, when the value of withColor is '1', it means that the point cloud attribute contains color data, when A withColor value of '0' indicates that the point cloud attribute does not contain color data.
2、withRef:反射率标识,用于指示点云属性是否包含反射率数据,其数据类型为二值变量,在一个例子中,当withRef的值为‘1’时,表示点云属性包含反射率数据,当withRef值为‘0’时表示点云属性不包含反射率数据。2. withRef: reflectivity identifier, which is used to indicate whether the point cloud attribute contains reflectivity data. Its data type is a binary variable. In an example, when the value of withRef is '1', it means that the point cloud attribute contains reflectivity. Data, when the withRef value is '0', it means that the point cloud attribute does not contain reflectivity data.
3、cross_component_pred:属性残差二次预测,其数据类型为二值变量,在一个例子中,当cross_component_pred的值为‘1’时,表示允许属性残差二次预测,当cross_component_pred的值为‘0’时,表示不允许属性残差二次预测。3. cross_component_pred: secondary prediction of attribute residual, its data type is a binary variable. In an example, when the value of cross_component_pred is '1', it means that secondary prediction of attribute residual is allowed, when the value of cross_component_pred is '0' ', it means that secondary prediction of attribute residuals is not allowed.
4、maxNumOfNeighbour:最大搜索的邻居点数,其数据类型为无符号整数,用于控制在属性预测时邻居候选点的搜索范围及硬件缓存的点的数目,在一个例子中,maxNumOfNeighbours不应大于1024。4. maxNumOfNeighbour: The maximum number of neighbor points to be searched, whose data type is an unsigned integer, is used to control the search range of neighbor candidate points and the number of points cached by hardware during attribute prediction. In an example, maxNumOfNeighbours should not be greater than 1024.
5、maxNumOfPredictNeighbours:最大选取的用于预测的邻居点数,其数据类型为无符号整数,用于限制在属性预测时所选邻居点的点数,在一个例子中,maxNumOfPredictNeighbours不应大于16。5. maxNumOfPredictNeighbours: The maximum number of neighbors selected for prediction, whose data type is an unsigned integer, is used to limit the number of neighbors selected during attribute prediction. In one example, maxNumOfPredictNeighbours should not be greater than 16.
6、numOflevelOfDetail:LoD层数,其数据类型为无符号整数,用于控制在属性预测时划分的LOD的层数,在一个例子中,numOflevelOfDetail不应大于32。6. numOflevelOfDetail: the number of LoD layers, whose data type is an unsigned integer, used to control the number of LOD layers divided during attribute prediction. In an example, numOflevelOfDetail should not be greater than 32.
7、intraLodFlag:LoD层内预测标志,其数据类型为二值变量,用于控制是否开启层内的预测,当intraLodFlag的值为‘1’时,开启层内预测,当intraLodFlag值为‘0’时,关闭层内预测。7. intraLodFlag: LoD intra-layer prediction flag, its data type is a binary variable, which is used to control whether to enable intra-layer prediction. When the value of intraLodFlag is '1', intra-layer prediction is enabled, and when the value of intraLodFlag is '0' , turns off intra-layer prediction.
8、Transform:属性变换算法标志,其数据类型为二值变量,用于控制是否使用小波变换对属性编码,当Transform值为‘1’时,使用小波变换,当Transform的值为‘0’时,使用预测方法对属性编码。8. Transform: The attribute transformation algorithm flag, whose data type is a binary variable, is used to control whether to use wavelet transform to encode attributes. When the value of Transform is '1', wavelet transform is used, and when the value of Transform is '0' , which encodes the attribute using the prediction method.
9、chromaQpOffset:色度通道的量化参数的偏移量,其数据类型为无符号整数,用于控制色度通道的量化参数chromaQp,chromaQp=attribute_qp+chromaQpOffset,亮度通道的量化参数lumaQp=attribute_qp。9. chromaQpOffset: the offset of the quantization parameter of the chroma channel, whose data type is an unsigned integer, used to control the quantization parameter chromaQp of the chroma channel, chromaQp=attribute_qp+chromaQpOffset, and the quantization parameter lumaQp=attribute_qp of the luminance channel.
10、outputBitDepth:属性输出比特深度,其数据类型为无符号整数,用于控制属性输出比特深度。10. outputBitDepth: The attribute output bit depth, whose data type is an unsigned integer, is used to control the attribute output bit depth.
由点云属性的头信息的第一实施例可知,色度通道的量化参数的偏移量作为其中的一个语法元素是固定要编码到码流中的。但点云属性并不一定包含颜色数据,当点云属性不包含颜色数据时,由于不需要对点云颜色进行编解码,因此也不需要使用色度通道的量化参数的偏移量,此时,若仍然将色度通道的量化参数的偏移量编码到码 流,将造成一定的比特浪费。It can be known from the first embodiment of the header information of the point cloud attribute that the offset of the quantization parameter of the chrominance channel, as one of the syntax elements, is fixed to be encoded into the code stream. However, the point cloud attribute does not necessarily contain color data. When the point cloud attribute does not contain color data, since the point cloud color does not need to be encoded and decoded, it is also not necessary to use the offset of the quantization parameter of the chrominance channel. , if the offset of the quantization parameter of the chrominance channel is still encoded into the code stream, it will cause a certain bit waste.
为解决该问题,本申请实施例提供了一种点云属性解码方法,可以参考图1,图1是本申请实施例提供的点云属性解码方法的第一流程图,该方法包括以下步骤:To solve this problem, an embodiment of the present application provides a point cloud attribute decoding method. Referring to FIG. 1, FIG. 1 is a first flowchart of the point cloud attribute decoding method provided by the embodiment of the present application, and the method includes the following steps:
S102、从码流中解码点云属性的颜色标识。S102. Decode the color identification of the point cloud attribute from the code stream.
S104A、当所述颜色标识指示所述点云属性包含颜色数据时,从码流中解码色度通道的量化参数的偏移量。S104A. When the color identifier indicates that the point cloud attribute contains color data, decode the offset of the quantization parameter of the chrominance channel from the code stream.
S106A、根据所述色度通道的量化参数的偏移量计算色度通道的量化参数。S106A. Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel.
S108A、利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。S108A. Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel.
S104B、当所述颜色标识指示所述点云属性未包含颜色数据时,确定所述码流中未存在色度通道的量化参数的偏移量。S104B. When the color identifier indicates that the point cloud attribute does not contain color data, determine that there is no offset of the quantization parameter of the chrominance channel in the code stream.
可以先从编码端进行说明。编码端可以获取待编码点云。这里,待编码点云可以是任何点云。在一个例子中,待编码点云可以是激光雷达扫描得到的点云,在一个例子中,待编码点云可以是利用图像进行三维重建得到的点云,当然,待编码点云也可以是通过其他方式获得的点云。It can be explained from the coding side first. The encoding end can obtain the point cloud to be encoded. Here, the point cloud to be encoded can be any point cloud. In one example, the point cloud to be encoded may be a point cloud obtained by scanning a lidar. In one example, the point cloud to be encoded may be a point cloud obtained by three-dimensional reconstruction using an image. Of course, the point cloud to be encoded may also be obtained by Point clouds obtained by other means.
待编码点云的点云属性可以有多种,但其中不一定包括颜色属性。比如,若待编码点云是激光雷达扫描得到的点云,由于激光雷达无法获取颜色信息,因此待编码点云的点云属性可以不包括颜色数据。又比如,若待编码点云是基于图像三维重建得到的点云,由于图像包括颜色信息,因此待编码点云的点云属性可以包括颜色数据。The point cloud attributes of the point cloud to be encoded can have various attributes, but they do not necessarily include color attributes. For example, if the point cloud to be encoded is a point cloud scanned by a lidar, since the lidar cannot obtain color information, the point cloud attribute of the point cloud to be encoded may not include color data. For another example, if the point cloud to be encoded is a point cloud obtained by three-dimensional reconstruction of an image, since the image includes color information, the point cloud attribute of the point cloud to be encoded may include color data.
编码端可以根据待编码点云的点云属性是否包括颜色数据生成相应的颜色标识,并可以将生成的颜色标识编码到码流。这里,颜色标识可以用于指示待编码点云的点云属性是否包括颜色数据。在一个例子中,颜色标识可以是点云属性头信息中的语法元素withColor,则当待编码点云的点云属性包括颜色数据时,可以生成值为‘1’的颜色标识withColor,当待编码点云的点云属性不包括颜色数据时,可以生成值为‘0’的颜色标识withColor。The encoding end can generate a corresponding color identification according to whether the point cloud attribute of the point cloud to be encoded includes color data, and can encode the generated color identification into the code stream. Here, the color identification can be used to indicate whether the point cloud attribute of the point cloud to be encoded includes color data. In one example, the color identifier can be the syntax element withColor in the point cloud attribute header information, then when the point cloud attribute of the point cloud to be encoded includes color data, a color identifier withColor with a value of '1' can be generated. When the point cloud attribute of the point cloud does not include color data, a color flag withColor with a value of '0' can be generated.
若生成的颜色标识指示待编码点云的点云属性包括颜色数据(比如withColor=1),则需要对待编码点云的颜色数据进行编解码,需要使用到色度通道的量化参数的偏移量,因此,编码端可以编码色度通道的量化参数的偏移量到码流。若生成的颜色标识指示待编码点云的点云属性不包括颜色数据(比如withColor=0),则后续的编解码过程中将不需要使用到色度通道的量化参数的偏移量,因此,编码端可以不编码色度通道的量化参数的偏移量,从而可以节省比特。If the generated color identifier indicates that the point cloud attribute of the point cloud to be encoded includes color data (for example, withColor=1), the color data of the point cloud to be encoded needs to be encoded and decoded, and the offset of the quantization parameter of the chrominance channel needs to be used , therefore, the encoder can encode the offset of the quantization parameter of the chroma channel to the code stream. If the generated color identifier indicates that the point cloud attribute of the point cloud to be encoded does not include color data (for example, withColor=0), the offset of the quantization parameter of the chrominance channel will not be used in the subsequent encoding and decoding process. Therefore, The encoding end may not encode the offset of the quantization parameter of the chrominance channel, thereby saving bits.
在对点云进行颜色编码时,编码端可以根据色度通道的量化参数的偏移量计算色度通道的量化参数。具体的,如前文所述,编码端可以将色度通道的量化参数的偏移量chromaQpOffset与亮度通道的量化参数lumaQp相加,计算出色度通道的量化参数chromaQp。在计算得到色度通道的量化参数后,可以利用该量化参数对色度残差进行量化,并可以将量化后的色度残差编码到码流。这里,色度残差可以是编码端利用当前编码的点云点的色度真实值与当前编码的点云点的色度预测值做差得到的,而当前编码的点云点的色度预测值可以利用当前已完成编解码的点云点的色度重建值计算得到。When color-coding the point cloud, the encoder can calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel. Specifically, as described above, the encoding end may add the quantization parameter chromaQpOffset of the chrominance channel and the quantization parameter lumaQp of the luminance channel to calculate the quantization parameter chromaQp of the chrominance channel. After calculating the quantization parameter of the chrominance channel, the quantization parameter can be used to quantize the chrominance residual, and the quantized chrominance residual can be encoded into the code stream. Here, the chrominance residual may be obtained by the coding end using the difference between the actual chrominance value of the currently coded point cloud point and the chrominance predicted value of the currently coded point cloud point, and the chrominance prediction of the currently coded point cloud point The value can be calculated by using the chroma reconstruction value of the point cloud point that has been encoded and decoded.
对于解码端,解码端可以先从码流中解码得到点云属性的颜色标识,若确定该颜色标识指示待编码点云的点云属性包括颜色数据(比如withColor=1),则意味着编码端编码了色度通道的量化参数的偏移量到码流,从而解码端可以从码流中解码色度通道的量化参数的偏移量。若确定该颜色标识指示待编码点云的点云属性不包括颜色数据(比如withColor=0),则意味着编码端没有编码色度通道的量化参数的偏移量到码流,解码端可以确定码流中不存在色度通道的量化参数的偏移量,从而无需解码色度通道的量化参数的偏移量。For the decoding end, the decoding end can first decode the code stream to obtain the color identification of the point cloud attribute. If the color identification indicates that the point cloud attribute of the point cloud to be encoded includes color data (for example, withColor=1), it means that the encoding end The offset of the quantization parameter of the chrominance channel is encoded into the code stream, so that the decoding end can decode the offset of the quantization parameter of the chrominance channel from the code stream. If it is determined that the color identifier indicates that the point cloud attribute of the point cloud to be encoded does not include color data (for example, withColor=0), it means that the encoding end does not encode the offset of the quantization parameter of the chroma channel to the code stream, and the decoding end can determine There is no offset of the quantization parameter of the chrominance channel in the code stream, so there is no need to decode the offset of the quantization parameter of the chrominance channel.
从码流中解码得到色度通道的量化参数的偏移量后,解码端可以根据该色度通道的量化参数的偏移量计算色度通道的量化参数。这里,计算的方式与前文相同,即可以将色度通道的量化参数的偏移量chromaQpOffset与亮度通道的量化参数lumaQp相加,得到色度通道的量化参数chromaQp。在计算得到色度通道的量化参数后,可以利用该量化参数对从码流中解码得到的编码端量化过的色度残差进行反量化,从而可以利用反量化后的色度残差重建当前解码的点云点的色度值,具体的,可以将反量化后的色度残差与当前解码的点云点的色度预测值相加,从而得到当前解码的点云点的色度重建值。After decoding the offset of the quantization parameter of the chrominance channel from the code stream, the decoding end may calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel. Here, the calculation method is the same as the above, that is, the offset chromaQpOffset of the quantization parameter of the chroma channel and the quantization parameter lumaQp of the luminance channel can be added to obtain the quantization parameter chromaQp of the chroma channel. After the quantization parameter of the chrominance channel is calculated, the quantization parameter can be used to inversely quantize the quantized chrominance residual at the coding end decoded from the code stream, so that the inverse quantized chrominance residual can be used to reconstruct the current The chrominance value of the decoded point cloud point, specifically, the chroma residual error after inverse quantization can be added to the chroma prediction value of the currently decoded point cloud point, so as to obtain the chroma reconstruction of the currently decoded point cloud point value.
本申请实施例提供的点云属性编解码方法,可以在待编码点云的点云属性包含颜色数据时才编码色度通道的量化参数的偏移量,而在待编码点云的点云属性不包括颜色数据时可以不编码色度通道的量化参数的偏移量,从而可以节省比特。The point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded The offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
可以参考表四,表四是本申请实施例提供的点云属性的头信息的第二实施例。Reference can be made to Table 4. Table 4 is the second example of the header information of the point cloud attribute provided by the embodiment of the present application.
表四:点云属性的头信息的第二实施例Table 4: Second embodiment of header information of point cloud attributes
Figure PCTCN2021080539-appb-000009
Figure PCTCN2021080539-appb-000009
Figure PCTCN2021080539-appb-000010
Figure PCTCN2021080539-appb-000010
由表四可知,语法元素chromaQpOffset位于if语句的执行语句中,因此,只有withColor=1的条件成立,编码端才会编码语法元素chromaQpOffset,而当withColor=0时,编码端将不编码chromaQpOffset,节省了比特。It can be seen from Table 4 that the syntax element chromaQpOffset is located in the execution statement of the if statement. Therefore, the encoder will encode the syntax element chromaQpOffset only if the condition of withColor=1 is satisfied. When withColor=0, the encoder will not encode the chromaQpOffset, saving up bits.
在前文已有提及,chromaQpOffset是色度通道的量化参数的偏移量,其可以用于计算色度通道的量化参数chromaQp,具体的,可以通过以下式子进行计算:As mentioned above, chromaQpOffset is the offset of the quantization parameter of the chroma channel, which can be used to calculate the quantization parameter chromaQp of the chroma channel. Specifically, it can be calculated by the following formula:
chromaQp=attribute_qp+chromaQpOffset;chromaQp=attribute_qp+chromaQpOffset;
lumaQp=attribute_qp。lumaQp=attribute_qp.
可见,色度通道的量化参数chromaQp是色度通道的量化参数的偏移量chromaQpOffset与亮度通道的量化参数lumaQp相加得到的,而在点云属性的头信息的以上实施例中,chromaQpOffset的数据类型是ue(v),ue(v)表示无符号整数指数哥伦布编码的语法元素,因此chromaQpOffset和lumaQp相加的结果chromaQp只能大于或等于lumaQp,即编解码后点云色度的精度最多只能和亮度的精度相同,无法满足需要点云的色度保留更高的精度的需求。It can be seen that the quantization parameter chromaQp of the chrominance channel is obtained by adding the offset chromaQpOffset of the quantization parameter of the chrominance channel and the quantization parameter lumaQp of the luminance channel, and in the above embodiment of the header information of the point cloud attribute, the data of chromaQpOffset The type is ue(v), and ue(v) represents the syntax element of the unsigned integer exponent Columbus encoding. Therefore, the result of adding chromaQpOffset and lumaQp chromaQp can only be greater than or equal to lumaQp, that is, the accuracy of the point cloud chroma after encoding and decoding is at most only The accuracy is the same as that of luminance, which cannot meet the need for higher accuracy of the chromaticity of the point cloud.
针对上述问题,在一种实施方式中,可以调整chromaQpOffset的数据类型为有符号数,比如可以将chromaQpOffset的数据类型设置为se(v),se(v)表示有符号整数指数哥伦布编码的语法元素,如此,chromaQpOffset可以是负数,chromaQpOffset和lumaQp相加的结果chromaQp可以小于lumaQp,色度通道的量化参数可以下调,扩大了点云色度数据的精度的可调范围。在一种实施方式中,色度通道的量化参数的偏移量可以采用有符号指数哥伦布进行二值化。In response to the above problem, in one embodiment, the data type of chromaQpOffset can be adjusted to a signed number, for example, the data type of chromaQpOffset can be set to se(v), where se(v) represents a signed integer exponential Golomb coding syntax element , so, chromaQpOffset can be a negative number, the result of adding chromaQpOffset and lumaQp chromaQp can be smaller than lumaQp, the quantization parameter of chrominance channel can be adjusted down, which expands the adjustable range of precision of point cloud chrominance data. In one embodiment, the offsets of the quantization parameters of the chrominance channel may be binarized using signed exponential Golomb.
可以参考表五,表五是本申请实施例提供的点云属性的头信息的第三实施例。Reference can be made to Table 5. Table 5 is the third example of the header information of the point cloud attribute provided by the embodiment of the present application.
表五:点云属性的头信息的第三实施例Table 5: The third embodiment of header information of point cloud attributes
Figure PCTCN2021080539-appb-000011
Figure PCTCN2021080539-appb-000011
在表五中,chromaQpOffset的数据类型变更为se(v),是有符号数,因此色度通道的量化参数具备了下调的可能,编解码后的点云色度可以保留更高的精度。In Table 5, the data type of chromaQpOffset is changed to se(v), which is a signed number. Therefore, the quantization parameters of the chroma channel can be lowered, and the encoded and decoded point cloud chroma can retain higher precision.
chromaQpOffset是色度通道的量化参数的偏移量,但在一些颜色的表示方式中,颜色可以包括多个色度通道,比如可以包括第一色度通道和第二色度通道。在一个例子中,若点云的颜色用YUV的格式表示,则第一色度通道和第二色度通道可以一个是U色度通道,一个是V色度通道。在一个例子中,若点云的颜色用YCbCr的格式表示,则第一色度通道和第二色度通道可以一个是Cr色度通道,一个是Cb色度通道。在一个例子中,若点云的颜色用YPbPr的格式表示,则第一色度通道和第二色度通道可以一个是Pr色度通道,一个是Pb色度通道。当然,颜色还有其他的颜色空间或格式可以表示,这里不一一举例。chromaQpOffset is the offset of the quantization parameter of the chrominance channel, but in some color representations, the color may include multiple chrominance channels, for example, may include a first chrominance channel and a second chrominance channel. In one example, if the color of the point cloud is represented by the YUV format, the first chrominance channel and the second chrominance channel may be a U chrominance channel and the other a V chrominance channel. In one example, if the color of the point cloud is represented by the YCbCr format, the first chrominance channel and the second chrominance channel may be a Cr chrominance channel and a Cb chrominance channel. In one example, if the color of the point cloud is represented by the YPbPr format, the first chrominance channel and the second chrominance channel may be a Pr chrominance channel and a Pb chrominance channel. Of course, there are other color spaces or formats that can represent colors, and we will not give examples here.
当点云颜色的色度通道有多个,而色度通道的量化参数的偏移量只有一个时,多个色度通道将共用该色度通道的量化参数的偏移量,从而在点云颜色编解码时,各个色度通道对应的色度残差将利用相同的量化参数进行量化,这造成点云颜色编解码的灵活性不足。比如,在一个例子中,若期望对Cr色度通道对应的色度残差采用更高的压缩力度,对Cb色度通道的色度残差保留更高的精度,则在只编码一个色度通道的 量化参数的偏移量时,这样的期望将难以实现。When there are multiple chroma channels for the color of the point cloud, and the offset of the quantization parameter of the chroma channel is only one, the offset of the quantization parameter of the chroma channel will be shared by multiple chroma channels, so that in the point cloud During color encoding and decoding, the chroma residuals corresponding to each chroma channel will be quantized using the same quantization parameters, which results in insufficient flexibility in point cloud color encoding and decoding. For example, in an example, if it is desired to use higher compression strength for the chrominance residual corresponding to the Cr chrominance channel and retain higher precision for the chrominance residual of the Cb chrominance channel, then only one chrominance Such expectations will be difficult to achieve when offsetting the channel's quantization parameters.
为解决上述问题,在一种实施方式中,编码端可以针对不同的色度通道分别编码该色度通道对应的量化参数的偏移量到码流,并可以针对每个色度通道,根据其对应的量化参数的偏移量计算对应的量化参数,从而在量化时可以对不同色度通道对应的色度残差采用不同的量化参数进行量化。相应的,解码端可以从码流中解码得到各个色度通道各自对应的量化参数的偏移量,并可以针对每个色度通道,利用其对应的量化参数的偏移量计算对应的量化参数,从而可以对不同色度通道的色度残差采用不同的量化参数进行反量化。In order to solve the above problem, in one embodiment, the encoding end can encode the offset of the quantization parameter corresponding to the chrominance channel to the code stream for different chrominance channels, and can for each chrominance channel, according to its The offset of the corresponding quantization parameter is used to calculate the corresponding quantization parameter, so that the chrominance residual corresponding to different chrominance channels can be quantized by using different quantization parameters during quantization. Correspondingly, the decoding end can decode the offset of the quantization parameter corresponding to each chrominance channel from the code stream, and can use the offset of the corresponding quantization parameter to calculate the corresponding quantization parameter for each chrominance channel. , so that the chroma residuals of different chroma channels can be inversely quantized using different quantization parameters.
可以参考表六,表六是本申请实施例提供的点云属性的头信息的第四实施例。Reference may be made to Table 6. Table 6 is a fourth example of the header information of the point cloud attribute provided by this embodiment of the present application.
表六:点云属性的头信息的第四实施例Table 6: Fourth embodiment of header information of point cloud attributes
Figure PCTCN2021080539-appb-000012
Figure PCTCN2021080539-appb-000012
在表六所示的例子中,色度通道的量化参数的偏移量包括Cb色度通道的量化参数的偏移量chromaQpOffsetCb和Cr色度通道的量化参数的偏移量chromaQpOffsetCr,则编码端在编码色度通道的量化参数的偏移量时,可以将两个色度通道的量化参数的偏移量chromaQpOffsetCb和chromaQpOffsetCr都编码到码流。相应的,解码端从码流中解码色度通道的量化参数的偏移量时,也可以从码流中解码得到两个色度通道的量化参数的偏移量chromaQpOffsetCb和chromaQpOffsetCr。In the example shown in Table 6, the offset of the quantization parameter of the chrominance channel includes the offset of the quantization parameter of the Cb chrominance channel chromaQpOffsetCb and the offset of the quantization parameter of the Cr chrominance channel chromaQpOffsetCr, then the encoding end is in When encoding the offsets of the quantization parameters of the chrominance channel, both the offsets chromaQpOffsetCb and chromaQpOffsetCr of the quantization parameters of the two chrominance channels may be encoded into the code stream. Correspondingly, when the decoding end decodes the offsets of the quantization parameters of the chrominance channel from the codestream, the offsets chromaQpOffsetCb and chromaQpOffsetCr of the quantization parameters of the two chrominance channels can also be decoded from the codestream.
利用Cb色度通道的量化参数的偏移量chromaQpOffsetCb可以计算得到Cb色度通道的量化参数chromaQpCb,具体的,可以通过以下式子进行计算:Using the offset chromaQpOffsetCb of the quantization parameter of the Cb chrominance channel, the quantization parameter chromaQpCb of the Cb chrominance channel can be calculated. Specifically, it can be calculated by the following formula:
chromaQpCb=attribute_qp+chromaQpOffsetCb;chromaQpCb=attribute_qp+chromaQpOffsetCb;
lumaQp=attribute_qp。lumaQp=attribute_qp.
利用Cr色度通道的量化参数的偏移量chromaQpOffsetCr可以计算得到Cr色度通道的量化参数chromaQpCr,具体的,可以通过以下式子进行计算:Using the offset chromaQpOffsetCr of the quantization parameter of the Cr chrominance channel, the quantization parameter chromaQpCr of the Cr chrominance channel can be calculated. Specifically, it can be calculated by the following formula:
chromaQpCr=attribute_qp+chromaQpOffsetCr;chromaQpCr=attribute_qp+chromaQpOffsetCr;
lumaQp=attribute_qp。lumaQp=attribute_qp.
由于不同的色度通道有各自对应的量化参数,因此编码端在对不同色度通道的色度残差进行量化时,可以利用该色度通道自身对应的量化参数;同样的,编码端或解码端在对不同色度通道的色度残差进行反量化时,可以利用该色度通道自身对应的量化参数,提高了点云颜色编解码的灵活性。Since different chrominance channels have their corresponding quantization parameters, the encoding end can use the quantization parameters corresponding to the chrominance channel itself when quantizing the chrominance residuals of different chrominance channels; When inverse quantizing the chroma residuals of different chroma channels, the terminal can use the quantization parameters corresponding to the chroma channels themselves, which improves the flexibility of point cloud color coding and decoding.
考虑到在不同色度通道有各自对应的量化参数的偏移量时,要编码到码流中的语法元素增加,消耗的比特数也会增加,因此,在一种实施方式中,若各个色度通道各自对应的量化参数的偏移量均为预设值,则编码端可以编码一个对应关闭状态的开关标识到码流,并且不再对各个色度通道的量化参数的偏移量进行编码。相应的,解码端可以从码流中解码得到该开关标识,由于该开关标识对应关闭状态,因此解码端可以确定码流中不存在各个色度通道的量化参数的偏移量,并且可以直接确定各个色度通道的量化参数的偏移量均为预设值。Considering that when different chroma channels have their corresponding offsets of quantization parameters, the number of syntax elements to be encoded into the code stream increases, and the number of bits consumed will also increase. If the offsets of the quantization parameters corresponding to the chrominance channels are all preset values, the encoder can encode a switch flag corresponding to the closed state into the code stream, and no longer encode the offsets of the quantization parameters of each chrominance channel. . Correspondingly, the decoding end can decode the switch identification from the code stream. Since the switch identification corresponds to the off state, the decoding end can determine that there is no offset of the quantization parameter of each chroma channel in the code stream, and can directly determine The offsets of the quantization parameters of each chrominance channel are all preset values.
可见,通过设置开关标识的语法元素,在各个色度通道各自对应的量化参数的偏移量均为预设值时,可以仅编码一个对应关闭状态的开关标识而无需编码各个色度通道的量化参数的偏移量,从而节省了比特。这里,所述预设值可以根据实际需求进行设定,在一个例子中,预设值可以是0,即chromaQpOffsetCb和chromaQpOffsetCr均为0时编码端可以编码对应关闭状态的开关标识到码流。It can be seen that by setting the syntax element of the switch identifier, when the offsets of the quantization parameters corresponding to each chroma channel are all preset values, only one switch identifier corresponding to the off state can be encoded without encoding the quantization of each chroma channel. The offset of the parameter, thus saving bits. Here, the preset value can be set according to actual requirements. In an example, the preset value can be 0, that is, when both chromaQpOffsetCb and chromaQpOffsetCr are 0, the encoder can encode the switch identifier corresponding to the off state to the code stream.
若各个色度通道各自对应的量化参数的偏移量不均为预设值,即存在不为预设值的色度通道的量化参数的偏移量,则编码端可以编码一个对应开启状态的开关标识到码流,并将各个色度通道各自对应的量化参数的偏移量也编码到码流。相应的,解码端可以从码流中解码得到开关标识,由于该开关标识对应开启状态,因此解码端可以继续从码流中解码得到各个色度通道的量化参数的偏移量。If the offsets of the quantization parameters corresponding to each chrominance channel are not all preset values, that is, there are offsets of the quantization parameters of the chrominance channels that are not preset values, the encoding end can encode a corresponding open state. The switch is identified to the code stream, and the offsets of the quantization parameters corresponding to each chrominance channel are also encoded into the code stream. Correspondingly, the decoding end can decode the code stream to obtain the switch identifier. Since the switch identifier corresponds to the ON state, the decoding end can continue to decode the code stream to obtain the offsets of the quantization parameters of each chrominance channel.
可以参考表七,表七是本申请实施例提供的点云属性的头信息的第五实施例。Reference may be made to Table 7. Table 7 is the fifth embodiment of the header information of the point cloud attribute provided by the embodiment of the present application.
表七:点云属性的头信息的第五实施例Table 7: Fifth embodiment of header information of point cloud attributes
Figure PCTCN2021080539-appb-000013
Figure PCTCN2021080539-appb-000013
上述表七中,语法元素chromaQpOffsetEnableFlag可以是所述开关标识,在一个例子中,chromaQpOffsetEnableFlag=1可以对应开启状态,chromaQpOffsetEnableFlag=0可以对应关闭状态,如此,当chromaQpOffsetEnableFlag=1时,编码端可以将该chromaQpOffsetEnableFlag编码到码流,并将两个色度通道的量化参数的偏移量chromaQpOffsetCb和chromaQpOffsetCr编码到码流;当chromaQpOffsetEnableFlag=0时,编码端可以将该chromaQpOffsetEnableFlag编码到码流,并可以不编码chromaQpOffsetCb和chromaQpOffsetCr。In the above Table 7, the syntax element chromaQpOffsetEnableFlag may be the switch flag. In an example, chromaQpOffsetEnableFlag=1 may correspond to an on state, and chromaQpOffsetEnableFlag=0 may correspond to an off state. Thus, when chromaQpOffsetEnableFlag=1, the encoder can set the chromaQpOffsetEnableFlag Encode into the code stream, and encode the offsets chromaQpOffsetCb and chromaQpOffsetCr of the quantization parameters of the two chroma channels into the code stream; when chromaQpOffsetEnableFlag=0, the encoder can encode the chromaQpOffsetEnableFlag into the code stream, and can not encode chromaQpOffsetCb and chromaQpOffsetCb and chromaQpOffsetCr.
参见表七可知,在编解码过程中,编码端可以先编码颜色标识withColor到码流,若颜色标识withColor=1,则编码端才会编码开关标识chromaQpOffsetEnableFlag,否则,若颜色标识withColor=0,则编码端无需编码开关标识chromaQpOffsetEnableFlag。相应的,解码端可以从码流中解码得到颜色标识withColor,只有当颜色标识withColor=1时,解码端才会继续从码流中解码开关标识chromaQpOffsetEnableFlag, 若颜色标识withColor=0,解码端无需解码开关标识chromaQpOffsetEnableFlag。Referring to Table 7, it can be seen that in the encoding and decoding process, the encoding end can first encode the color flag withColor to the code stream. If the color flag withColor=1, the encoding end will encode the switch flag chromaQpOffsetEnableFlag, otherwise, if the color flag withColor=0, then The encoding end does not need the encoding switch flag chromaQpOffsetEnableFlag. Correspondingly, the decoding end can decode the color flag withColor from the code stream. Only when the color flag withColor=1, the decoding end will continue to decode the switch flag chromaQpOffsetEnableFlag from the code stream. If the color flag withColor=0, the decoding end does not need to decode. The switch flags chromaQpOffsetEnableFlag.
由前文可知,在利用色度通道的量化参数对色度残差进行量化或反量化时,色度通道的量化参数可以用于确定量化公式或反量化公式。具体的,在确定量化公式时,编码端可以根据色度通道的量化参数chromaQp在量化系数表(表一)中查询对应的量化系数MF,而在确定反量化公式时,编码端或解码端可以根据色度通道的量化参数chromaQp在反量化系数表(表二)中查询对应的反量化系数IMF。这里,无论是查询量化系数MF还是反量化系数IMF,色度通道的量化参数chromaQp的取值范围都是0~63。但在一些情况中,chromaQp的值可能落在该取值范围之外,从而发生数据溢出。As can be seen from the foregoing, when the quantization parameter of the chrominance channel is used to quantize or inversely quantize the chrominance residual, the quantization parameter of the chrominance channel can be used to determine the quantization formula or the inverse quantization formula. Specifically, when determining the quantization formula, the encoder can query the corresponding quantization coefficient MF in the quantization coefficient table (Table 1) according to the quantization parameter chromaQp of the chroma channel, and when determining the inverse quantization formula, the encoder or decoder can The corresponding inverse quantization coefficient IMF is queried in the inverse quantization coefficient table (Table 2) according to the quantization parameter chromaQp of the chrominance channel. Here, regardless of whether the quantization coefficient MF or the inverse quantization coefficient IMF is queried, the value range of the quantization parameter chromaQp of the chrominance channel is 0-63. However, in some cases, the value of chromaQp may fall outside this range, resulting in data overflow.
针对上述数据溢出的问题,在一种实施方式中,编码端或解码端在根据色度通道的量化参数的偏移量计算得到色度通道的量化参数后,可以将该色度通道的量化参数限制在色度通道对应的最小量化参数与色度通道对应的最大量化参数之间,经过限制操作后的色度通道的量化参数再用于对色度残差进行量化。这里,色度通道对应的最小量化参数与色度通道对应的最大量化参数可以根据实际情况进行设定,例如,在前文的例子中,chromaQp的取值范围是0~63,则色度通道对应的最小量化参数可以是0,色度通道对应的最大量化参数可以是63,当然,这里的0和63仅是一种示例性的取值。In view of the above-mentioned problem of data overflow, in an embodiment, after calculating the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel, the encoding end or the decoding end can calculate the quantization parameter of the chrominance channel. It is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel, and the quantization parameter of the chrominance channel after the limiting operation is used to quantize the chrominance residual. Here, the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel can be set according to the actual situation. The minimum quantization parameter of can be 0, and the maximum quantization parameter corresponding to the chrominance channel can be 63. Of course, 0 and 63 here are only exemplary values.
在一种实施方式中,色度通道的量化参数的取值范围可以与亮度通道的量化参数的取值范围相互独立,即chromaQp的取值范围与lumaQp的取值范围可以相同或不同。若将色度通道对应的最小量化参数记为chromaMinQp,色度通道对应的最大量化参数记为chromaMaxQp,亮度通道对应的最小量化参数记为lumaMinQp,亮度通道对应的最大量化参数记为lumaMaxQp,则chromaMinQp与lumaMinQp可以相同或不同,chromaMaxQp与lumaMaxQp可以相同或不同。In one embodiment, the value range of the quantization parameter of the chroma channel may be independent of the value range of the quantization parameter of the luma channel, that is, the value range of chromaQp and the value range of lumaQp may be the same or different. If the minimum quantization parameter corresponding to the chroma channel is recorded as chromaMinQp, the maximum quantization parameter corresponding to the chroma channel is recorded as chromaMaxQp, the minimum quantization parameter corresponding to the luma channel is recorded as lumaMinQp, and the maximum quantization parameter corresponding to the luma channel is recorded as lumaMaxQp, then chromaMinQp Can be the same or different from lumaMinQp and can be the same or different from chromaMaxQp and lumaMaxQp.
对色度通道的量化参数进行限制可以有多种实现方式。在一种实施方式中,可以对计算得到的色度通道的量化参数进行clip操作,可以参考下面的式子:Limiting the quantization parameters of the chroma channels can be implemented in various ways. In one embodiment, a clip operation can be performed on the calculated quantization parameters of the chrominance channel, and the following formula can be referred to:
chromaQp=clip3(chromaMinQp,chromaMaxQp,attribute_qp+chromaQpOffset);chromaQp=clip3(chromaMinQp, chromaMaxQp, attribute_qp+chromaQpOffset);
lumaQp=attribute_qp。lumaQp=attribute_qp.
上述式子中,clip3的含义为,将第三个参数(attribute_qp+chromaQpOffset)截断到第一个参数(chromaMinQp)和第二个参数(chromaMaxQp)之间,即如果第三个参数小于第一个参数,则输出为第一个参数,如果第三个参数大于第二个参数,则输出为第二个参数,如果第三个参数介于第一个参数和第二个参数之间,即第三个参 数大于等于第一个参数且小于等于第二个参数,则输出第三个参数。In the above formula, the meaning of clip3 is to truncate the third parameter (attribute_qp+chromaQpOffset) between the first parameter (chromaMinQp) and the second parameter (chromaMaxQp), that is, if the third parameter is smaller than the first parameter parameter, the output is the first parameter, if the third parameter is greater than the second parameter, the output is the second parameter, if the third parameter is between the first parameter and the second parameter, that is, the first parameter If the three parameters are greater than or equal to the first parameter and less than or equal to the second parameter, the third parameter is output.
在一种实施方式中,若色度通道的量化参数有多个,则可以对各个色度通道的量化参数分别进行所述限制操作。比如,若色度通道的量化参数包括chromaQpCb和chromaQpCr,则对chromaQpCb和chromaQpCr可以分别进行clip操作,可以参考以下式子:In an implementation manner, if there are multiple quantization parameters of the chrominance channel, the limiting operation may be performed separately on the quantization parameters of each chrominance channel. For example, if the quantization parameters of the chroma channel include chromaQpCb and chromaQpCr, the clip operation can be performed on chromaQpCb and chromaQpCr respectively, and the following formula can be referred to:
chromaQpCb=clip3(chromaMinQp,chromaMaxQp,attribute_qp+chromaQpOffsetCb);chromaQpCb=clip3(chromaMinQp, chromaMaxQp, attribute_qp+chromaQpOffsetCb);
chromaQpCr=clip3(chromaMinQp,chromaMaxQp,attribute_qp+chromaQpOffsetCr);chromaQpCr=clip3(chromaMinQp, chromaMaxQp, attribute_qp+chromaQpOffsetCr);
lumaQp=attribute_qp。lumaQp=attribute_qp.
通过在利用色度通道的量化参数对色度残差进行量化之前将色度通道的量化参数限制在最小量化参数和最大量化参数之间,可以防止数据溢出的发生,为后续对色度残差的量化提供保障。By limiting the quantization parameter of the chroma channel to be between the minimum quantization parameter and the maximum quantization parameter before using the quantization parameter of the chroma channel to quantize the chroma residual, the occurrence of data overflow can be prevented, and the subsequent quantization of the chroma residual quantification guarantees.
本申请实施例提供的点云属性编解码方法,可以在待编码点云的点云属性包含颜色数据时才编码色度通道的量化参数的偏移量,而在待编码点云的点云属性不包括颜色数据时可以不编码色度通道的量化参数的偏移量,从而可以节省比特。The point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded The offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
下面可以参考图2,图2是本申请实施例提供的点云属性编码方法的第一流程图,该方法包括:Referring to FIG. 2 below, FIG. 2 is a first flowchart of a point cloud attribute encoding method provided by an embodiment of the present application, and the method includes:
S202、获取待编码点云。S202. Obtain a point cloud to be encoded.
S204、生成用于指示所述待编码点云的点云属性是否包含颜色数据的颜色标识,并编码所述颜色标识到码流。S204. Generate a color identifier for indicating whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color identifier into a code stream.
S206A、当所述颜色标识指示所述待编码点云的点云属性包含颜色数据时,编码色度通道的量化参数的偏移量到码流。S206A. When the color identifier indicates that the point cloud attribute of the point cloud to be encoded contains color data, encode the offset of the quantization parameter of the chrominance channel to the code stream.
S208A、根据所述色度通道的量化参数的偏移量计算色度通道的量化参数。S208A. Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel.
S210A、利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。S210A. Quantize the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel.
S206B、当所述颜色标识指示所述待编码点云的点云属性未包含颜色数据时,不编码所述色度通道的量化参数的偏移量。S206B, when the color identifier indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, do not encode the offset of the quantization parameter of the chrominance channel.
可选的,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。Optionally, the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。Optionally, one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
可选的,所述编码色度通道的量化参数的偏移量到码流,包括:Optionally, the offset of the quantization parameter of the encoded chrominance channel to the code stream includes:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,所述方法还包括:Optionally, before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further includes:
将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数的偏移量是有符号数。Optionally, the offset of the quantization parameter of the chrominance channel is a signed number.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,所述方法还包括:Optionally, the method further includes:
将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
可选的,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。Optionally, the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
以上本申请实施例提供的点云属性编码方法的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute encoding method provided by the above embodiments of the present application, the specific implementation thereof may refer to the relevant descriptions in the foregoing, which will not be repeated here.
本申请实施例提供的点云属性编解码方法,可以在待编码点云的点云属性包含颜色数据时才编码色度通道的量化参数的偏移量,而在待编码点云的点云属性不包括颜色数据时可以不编码色度通道的量化参数的偏移量,从而可以节省比特。The point cloud attribute encoding and decoding method provided by the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded The offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
下面可以参考图3,图3是本申请实施例提供的点云属性解码方法的第二流程图,该方法包括:Referring to FIG. 3 below, FIG. 3 is a second flowchart of a point cloud attribute decoding method provided by an embodiment of the present application, and the method includes:
S302、从码流中解码多个色度通道各自对应的量化参数的偏移量。S302: Decode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream.
S304、对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数。S304. For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel.
S306、对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。S306. For each chrominance channel, perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel.
可选的,所述多个色度通道包括两个色度通道。Optionally, the plurality of chrominance channels include two chrominance channels.
可选的,所述两个色度通道包括:Cb色度通道和Cr色度通道。Optionally, the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
可选的,所述从码流中解码多个色度通道各自对应的量化参数的偏移量,包括:Optionally, the offsets of the quantization parameters corresponding to each of the decoding multiple chrominance channels from the code stream include:
从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute contains color data, the offsets of the quantization parameters corresponding to each of the plurality of chrominance channels are decoded from the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
可选的,所述从码流中解码多个色度通道各自对应的量化参数的偏移量,包括:Optionally, the offsets of the quantization parameters corresponding to each of the decoding multiple chrominance channels from the code stream include:
从码流中解码开关标识;Decode the switch ID from the code stream;
若所述开关标识对应开启状态,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the switch flag corresponds to an on state, the offsets of the quantization parameters corresponding to each of the multiple chrominance channels are decoded from the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述开关标识对应关闭状态,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the switch identifier corresponds to an off state, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述开关标识对应关闭状态,确定所述多个色度通道各自对应的量化参数的偏移量均为预设值。If the switch identifier corresponds to an off state, it is determined that the offsets of the quantization parameters corresponding to the plurality of chrominance channels are all preset values.
可选的,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,所述方法还包括:Optionally, before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the method further includes:
将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数的偏移量是有符号数。Optionally, the offset of the quantization parameter of the chrominance channel is a signed number.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。Optionally, the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
可选的,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。Optionally, the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
以上本申请实施例提供的点云属性解码方法的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute decoding method provided by the above embodiments of the present application, the specific implementation thereof may refer to the relevant descriptions in the foregoing, which will not be repeated here.
本申请实施例提供的点云属性编解码方法,给各个色度通道分别配置了各自的量化参数的偏移量的语法元素,从而使得不同的色度通道有各自对应的量化参数,不同色度通道的色度残差可以通过不同的量化参数进行量化或反量化,提高了点云颜色编解码的灵活性。In the point cloud attribute encoding and decoding method provided by the embodiments of the present application, syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma The chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
下面可以参考图4,图4是本申请实施例提供的点云属性编码方法的第二流程图,该方法包括:Referring to FIG. 4 below, FIG. 4 is a second flowchart of a point cloud attribute encoding method provided by an embodiment of the present application, and the method includes:
S402、将多个色度通道各自对应的量化参数的偏移量编码到码流。S402: Encode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels into a code stream.
S404、对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数。S404. For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel.
S406、对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。S406. For each chrominance channel, use the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel.
可选的,所述多个色度通道包括两个色度通道。Optionally, the plurality of chrominance channels include two chrominance channels.
可选的,所述两个色度通道包括:Cb色度通道和Cr色度通道。Optionally, the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
可选的,所述将多个色度通道各自对应的量化参数的偏移量编码到码流,包括:Optionally, encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream includes:
根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded includes color data, the offsets of the quantization parameters corresponding to the multiple chrominance channels are encoded into the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the to-be-encoded point cloud does not contain color data, the offset of the quantization parameter corresponding to each of the plurality of chrominance channels is not encoded.
可选的,所述将多个色度通道各自对应的量化参数的偏移量编码到码流,包括:Optionally, encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream includes:
若所述多个色度通道各自对应的量化参数的偏移量中任一不为预设值,编码对应开启状态的开关标识到码流,并将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If any of the offsets of the quantization parameters corresponding to the multiple chroma channels is not a preset value, encode the switch flag corresponding to the on state to the code stream, and quantize the corresponding quantization parameters of the multiple chroma channels The offset of the parameter is encoded into the codestream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述多个色度通道各自对应的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述多个色度通道各自对应的量化参数的偏移量。If the offsets of the quantization parameters corresponding to the multiple chrominance channels are all preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the offsets of the quantization parameters corresponding to the multiple chrominance channels. shift.
可选的,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,所述方法还包括:Optionally, before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further includes:
将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数的偏移量是有符号数。Optionally, the offset of the quantization parameter of the chrominance channel is a signed number.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,所述方法还包括:Optionally, the method further includes:
将量化后的各个所述色度通道对应的色度残差编码到码流。The chrominance residuals corresponding to each of the quantized chrominance channels are encoded into the code stream.
可选的,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。Optionally, the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
以上本申请实施例提供的点云属性编码方法的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute encoding method provided by the above embodiments of the present application, the specific implementation thereof may refer to the relevant descriptions in the foregoing, which will not be repeated here.
本申请实施例提供的点云属性编解码方法,给各个色度通道分别配置了各自的量化参数的偏移量的语法元素,从而使得不同的色度通道有各自对应的量化参数,不同色度通道的色度残差可以通过不同的量化参数进行量化或反量化,提高了点云颜色编解码的灵活性。In the point cloud attribute encoding and decoding method provided by the embodiments of the present application, syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma The chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
下面可以参考图5,图5是本申请实施例提供的点云属性解码方法的第三流程图,该方法包括:Reference may be made to FIG. 5 below. FIG. 5 is a third flowchart of a point cloud attribute decoding method provided by an embodiment of the present application, and the method includes:
S502、从码流中解码色度通道的量化参数的偏移量。S502. Decode the offset of the quantization parameter of the chrominance channel from the code stream.
其中,所述色度通道的量化参数的偏移量是有符号数。Wherein, the offset of the quantization parameter of the chrominance channel is a signed number.
S504、根据所述色度通道的量化参数的偏移量计算色度通道的量化参数。S504. Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel.
S506、利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。S506. Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel.
可选的,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。Optionally, the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。Optionally, one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
可选的,所述从码流中解码色度通道的量化参数的偏移量,包括:Optionally, the offset of the quantization parameter of the decoded chrominance channel from the code stream includes:
从码流中解码开关标识;Decode the switch ID from the code stream;
若所述开关标识对应开启状态,从码流中解码所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch identifier corresponds to an on state, the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述开关标识对应关闭状态,确定所述码流中未存在所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述开关标识对应关闭状态,确定所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量均为预设值。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
可选的,所述从码流中解码色度通道的量化参数的偏移量,包括:Optionally, the offset of the quantization parameter of the decoded chrominance channel from the code stream includes:
从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码色度通道的量化参数的偏移量。If the color flag indicates that the point cloud attribute contains color data, the offset of the quantization parameter of the chrominance channel is decoded from the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that the offset of the quantization parameter of the chrominance channel does not exist in the code stream.
可选的,先从码流中解码所述颜色标识,若所述颜色标识指示所述点云属性包含颜色数据,再从码流中解码所述开关标识。Optionally, the color identifier is decoded from the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is decoded from the code stream.
可选的,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,所述方法还包括:Optionally, before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the method further includes:
将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同 或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。Optionally, the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
可选的,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。Optionally, the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
以上本申请实施例提供的点云属性解码方法的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute decoding method provided by the above embodiments of the present application, the specific implementation thereof may refer to the relevant descriptions in the foregoing, which will not be repeated here.
本申请实施例提供的点云属性编解码方法,色度通道的量化参数的偏移量是有符号数,因此,通过调整色度通道的量化参数的偏移量,可以使色度通道的量化参数的数值下调,扩大了点云色度数据的精度的可调范围。In the point cloud attribute encoding and decoding method provided by the embodiment of the present application, the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
下面可以参考图6,图6是本申请实施例提供的点云属性编码方法的第三流程图,该方法包括:Referring to FIG. 6 below, FIG. 6 is a third flowchart of a point cloud attribute encoding method provided by an embodiment of the present application, and the method includes:
S602、将色度通道的量化参数的偏移量编码到码流。S602. Encode the offset of the quantization parameter of the chrominance channel into a code stream.
其中,所述色度通道的量化参数的偏移量是有符号数。Wherein, the offset of the quantization parameter of the chrominance channel is a signed number.
S604、根据所述色度通道的量化参数的偏移量计算色度通道的量化参数。S604. Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel.
S606、利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。S606. Quantize the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。Optionally, the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。Optionally, one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
可选的,所述将色度通道的量化参数的偏移量编码到码流,包括:Optionally, encoding the offset of the quantization parameter of the chrominance channel into the code stream includes:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量 化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述将色度通道的量化参数的偏移量编码到码流,包括:Optionally, encoding the offset of the quantization parameter of the chrominance channel into the code stream includes:
根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将色度通道的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded contains color data, the offset of the quantization parameter of the chrominance channel is encoded into the code stream.
可选的,所述方法还包括:Optionally, the method further includes:
若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
可选的,先编码所述颜色标识到码流,若所述颜色标识指示所述点云属性包含颜色数据,再编码所述开关标识到码流。Optionally, the color identifier is encoded into the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is encoded into the code stream.
可选的,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,所述方法还包括:Optionally, before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further includes:
将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,所述方法还包括:Optionally, the method further includes:
将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
可选的,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。Optionally, the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
以上本申请实施例提供的点云属性编码方法的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute encoding method provided by the above embodiments of the present application, the specific implementation thereof may refer to the relevant descriptions in the foregoing, which will not be repeated here.
本申请实施例提供的点云属性编解码方法,色度通道的量化参数的偏移量是有符号数,因此,通过调整色度通道的量化参数的偏移量,可以使色度通道的量化参数的数值下调,扩大了点云色度数据的精度的可调范围。In the point cloud attribute encoding and decoding method provided by the embodiment of the present application, the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
下面可以参考图7,图7是本申请实施例提供的点云属性解码装置的结构示意图,该装置包括:Referring to FIG. 7 below, FIG. 7 is a schematic structural diagram of a point cloud attribute decoding device provided by an embodiment of the present application, and the device includes:
处理器710和存储有计算机程序的存储器720,所述处理器在执行所述计算机程序时实现以下步骤:A processor 710 and a memory 720 storing a computer program, the processor implements the following steps when executing the computer program:
从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
当所述颜色标识指示所述点云属性包含颜色数据时,从码流中解码色度通道的量化参数的偏移量;When the color identifier indicates that the point cloud attribute contains color data, decoding the offset of the quantization parameter of the chrominance channel from the code stream;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化;Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel;
当所述颜色标识指示所述点云属性未包含颜色数据时,确定所述码流中未存在色度通道的量化参数的偏移量。When the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
可选的,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。Optionally, the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。Optionally, one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
可选的,所述处理器从码流中解码色度通道的量化参数的偏移量时用于:Optionally, when the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream, it is used for:
从码流中解码开关标识;Decode the switch ID from the code stream;
若所述开关标识对应开启状态,从码流中解码所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch identifier corresponds to an on state, the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述开关标识对应关闭状态,确定所述码流中未存在所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述开关标识对应关闭状态,确定所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量均为预设值。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
可选的,所述处理器还用于:Optionally, the processor is also used for:
在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数的偏移量是有符号数。Optionally, the offset of the quantization parameter of the chrominance channel is a signed number.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。Optionally, the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
可选的,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。Optionally, the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
以上本申请实施例提供的点云属性解码装置的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute decoding apparatus provided in the above embodiments of the present application, for the specific implementation, reference may be made to the relevant descriptions above, which will not be repeated here.
本申请实施例提供的点云属性编解码装置,可以在待编码点云的点云属性包含颜色数据时才编码色度通道的量化参数的偏移量,而在待编码点云的点云属性不包括颜色数据时可以不编码色度通道的量化参数的偏移量,从而可以节省比特。The point cloud attribute encoding and decoding device provided in the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded includes color data, and can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded The offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
下面可以参考图8,图8是本申请实施例提供的点云属性编码装置的结构示意图,该装置包括:Referring to FIG. 8 below, FIG. 8 is a schematic structural diagram of a point cloud attribute encoding device provided by an embodiment of the present application, and the device includes:
处理器810和存储有计算机程序的存储器820,所述处理器在执行所述计算机程序时实现以下步骤:A processor 810 and a memory 820 storing a computer program that implements the following steps when executing the computer program:
获取待编码点云;Get the point cloud to be encoded;
生成用于指示所述待编码点云的点云属性是否包含颜色数据的颜色标识,并编码所述颜色标识到码流;generating a color identifier for indicating whether the point cloud attribute of the point cloud to be encoded contains color data, and encoding the color identifier into a code stream;
当所述颜色标识指示所述待编码点云的点云属性包含颜色数据时,编码色度通道的量化参数的偏移量到码流;When the color identifier indicates that the point cloud attribute of the to-be-coded point cloud contains color data, the offset of the quantization parameter of the chrominance channel is encoded to the code stream;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化;Using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel;
当所述颜色标识指示所述待编码点云的点云属性未包含颜色数据时,不编码所述色度通道的量化参数的偏移量。When the color identification indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
可选的,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。Optionally, the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。Optionally, one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
可选的,所述处理器在编码色度通道的量化参数的偏移量到码流时用于:Optionally, when encoding the offset of the quantization parameter of the chrominance channel to the code stream, the processor is used for:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移 量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述处理器还用于:Optionally, the processor is also used for:
在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. between the maximum quantization parameters corresponding to the chroma channels.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数的偏移量是有符号数。Optionally, the offset of the quantization parameter of the chrominance channel is a signed number.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,所述处理器还用于:Optionally, the processor is also used for:
将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
可选的,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。Optionally, the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
以上本申请实施例提供的点云属性编码装置的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute encoding apparatus provided in the above embodiments of the present application, reference may be made to the relevant descriptions in the foregoing for the specific implementation, which will not be repeated here.
本申请实施例提供的点云属性编解码装置,可以在待编码点云的点云属性包含颜色数据时才编码色度通道的量化参数的偏移量,而在待编码点云的点云属性不包括颜色数据时可以不编码色度通道的量化参数的偏移量,从而可以节省比特。The point cloud attribute encoding and decoding device provided in the embodiment of the present application can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded includes color data, and can encode the offset of the quantization parameter of the chrominance channel only when the point cloud attribute of the point cloud to be encoded contains color data, and the point cloud attribute of the point cloud to be encoded The offsets of the quantization parameters of the chroma channels may not be encoded when color data is not included, thereby saving bits.
本申请实施例还提供一种点云属性解码装置,其结构可以参考图7,该装置包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:The embodiment of the present application also provides a point cloud attribute decoding device, the structure of which can be referred to FIG. 7 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
从码流中解码多个色度通道各自对应的量化参数的偏移量;Decode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream;
对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量 计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。For each chrominance channel, use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
可选的,所述多个色度通道包括两个色度通道。Optionally, the plurality of chrominance channels include two chrominance channels.
可选的,所述两个色度通道包括:Cb色度通道和Cr色度通道。Optionally, the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
可选的,所述处理器从码流中解码多个色度通道各自对应的量化参数的偏移量时用于:Optionally, when the processor decodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream, it is used for:
从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute contains color data, the offsets of the quantization parameters corresponding to each of the plurality of chrominance channels are decoded from the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
可选的,所述处理器从码流中解码多个色度通道各自对应的量化参数的偏移量时用于:Optionally, when the processor decodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream, it is used for:
从码流中解码开关标识;Decode the switch ID from the code stream;
若所述开关标识对应开启状态,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the switch flag corresponds to an on state, the offsets of the quantization parameters corresponding to each of the multiple chrominance channels are decoded from the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述开关标识对应关闭状态,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the switch identifier corresponds to an off state, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述开关标识对应关闭状态,确定所述多个色度通道各自对应的量化参数的偏移量均为预设值。If the switch identifier corresponds to an off state, it is determined that the offsets of the quantization parameters corresponding to the plurality of chrominance channels are all preset values.
可选的,所述处理器还用于:Optionally, the processor is also used for:
在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数的偏移量是有符号数。Optionally, the offset of the quantization parameter of the chrominance channel is a signed number.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。Optionally, the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
可选的,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。Optionally, the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
以上本申请实施例提供的点云属性解码装置的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute decoding apparatus provided in the above embodiments of the present application, for the specific implementation, reference may be made to the relevant descriptions above, which will not be repeated here.
本申请实施例提供的点云属性编解码装置,给各个色度通道分别配置了各自的量化参数的偏移量的语法元素,从而使得不同的色度通道有各自对应的量化参数,不同色度通道的色度残差可以通过不同的量化参数进行量化或反量化,提高了点云颜色编解码的灵活性。In the point cloud attribute encoding and decoding device provided by the embodiment of the present application, syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma The chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
本申请实施例还提供一种点云属性编码装置,其结构可以参考图8,该装置包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:An embodiment of the present application also provides a point cloud attribute encoding device, the structure of which can be referred to FIG. 8 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
将多个色度通道各自对应的量化参数的偏移量编码到码流;encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream;
对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。For each chrominance channel, the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
可选的,所述多个色度通道包括两个色度通道。Optionally, the plurality of chrominance channels include two chrominance channels.
可选的,所述两个色度通道包括:Cb色度通道和Cr色度通道。Optionally, the two chrominance channels include: a Cb chrominance channel and a Cr chrominance channel.
可选的,所述处理器将多个色度通道各自对应的量化参数的偏移量编码到码流时用于:Optionally, when the processor encodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels into the code stream, it is used for:
根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded includes color data, the offsets of the quantization parameters corresponding to the multiple chrominance channels are encoded into the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the to-be-encoded point cloud does not contain color data, the offset of the quantization parameter corresponding to each of the plurality of chrominance channels is not encoded.
可选的,所述处理器将多个色度通道各自对应的量化参数的偏移量编码到码流时用于:Optionally, when the processor encodes the offsets of the quantization parameters corresponding to each of the multiple chrominance channels into the code stream, it is used for:
若所述多个色度通道各自对应的量化参数的偏移量中任一不为预设值,编码对应开启状态的开关标识到码流,并将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If any of the offsets of the quantization parameters corresponding to the multiple chroma channels is not a preset value, encode the switch flag corresponding to the on state to the code stream, and quantize the corresponding quantization parameters of the multiple chroma channels The offset of the parameter is encoded into the codestream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述多个色度通道各自对应的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述多个色度通道各自对应的量化参数的偏移量。If the offsets of the quantization parameters corresponding to the multiple chrominance channels are all preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the offsets of the quantization parameters corresponding to the multiple chrominance channels. shift.
可选的,所述处理器还用于:Optionally, the processor is also used for:
在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. between the maximum quantization parameters corresponding to the chroma channels.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数的偏移量是有符号数。Optionally, the offset of the quantization parameter of the chrominance channel is a signed number.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,所述处理器还用于:Optionally, the processor is also used for:
将量化后的各个所述色度通道对应的色度残差编码到码流。The chrominance residuals corresponding to each of the quantized chrominance channels are encoded into the code stream.
可选的,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。Optionally, the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
以上本申请实施例提供的点云属性编码装置的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute encoding apparatus provided in the above embodiments of the present application, reference may be made to the relevant descriptions in the foregoing for the specific implementation, which will not be repeated here.
本申请实施例提供的点云属性编解码装置,给各个色度通道分别配置了各自的量化参数的偏移量的语法元素,从而使得不同的色度通道有各自对应的量化参数,不同色度通道的色度残差可以通过不同的量化参数进行量化或反量化,提高了点云颜色编解码的灵活性。In the point cloud attribute encoding and decoding device provided by the embodiment of the present application, syntax elements of offsets of respective quantization parameters are configured for each chroma channel, so that different chroma channels have their corresponding quantization parameters, and different chroma The chroma residual of the channel can be quantized or inverse quantized by different quantization parameters, which improves the flexibility of point cloud color coding and decoding.
本申请实施例还提供一种点云属性解码装置,其结构可以参考图7,该装置包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:The embodiment of the present application also provides a point cloud attribute decoding device, the structure of which can be referred to FIG. 7 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
从码流中解码色度通道的量化参数的偏移量,所述色度通道的量化参数的偏移量是有符号数;Decode the offset of the quantization parameter of the chrominance channel from the code stream, the offset of the quantization parameter of the chrominance channel is a signed number;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。The chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。Optionally, the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。Optionally, one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
可选的,所述处理器从码流中解码色度通道的量化参数的偏移量时用于:Optionally, when the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream, it is used for:
从码流中解码开关标识;Decode the switch ID from the code stream;
若所述开关标识对应开启状态,从码流中解码所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch identifier corresponds to an on state, the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述开关标识对应关闭状态,确定所述码流中未存在所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述开关标识对应关闭状态,确定所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量均为预设值。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
可选的,所述处理器从码流中解码色度通道的量化参数的偏移量时用于:Optionally, when the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream, it is used for:
从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码色度通道的量化参数的偏移量。If the color flag indicates that the point cloud attribute contains color data, the offset of the quantization parameter of the chrominance channel is decoded from the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that the offset of the quantization parameter of the chrominance channel does not exist in the code stream.
可选的,先从码流中解码所述颜色标识,若所述颜色标识指示所述点云属性包含颜色数据,再从码流中解码所述开关标识。Optionally, the color identifier is decoded from the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is decoded from the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。Optionally, the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma reconstruction value corresponding to the chroma channel of the currently decoded point cloud point.
可选的,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。Optionally, the chroma reconstruction value corresponding to the chroma channel is the chroma residual corresponding to the inverse quantized chroma channel and the chroma prediction value corresponding to the chroma channel of the currently decoded point cloud point. obtained by adding.
以上本申请实施例提供的点云属性解码装置的各种实施方式,其具体实现可以参考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute decoding apparatus provided in the above embodiments of the present application, for the specific implementation, reference may be made to the relevant descriptions above, which will not be repeated here.
本申请实施例提供的点云属性编解码装置,色度通道的量化参数的偏移量是有符号数,因此,通过调整色度通道的量化参数的偏移量,可以使色度通道的量化参数的数值下调,扩大了点云色度数据的精度的可调范围。In the point cloud attribute encoding and decoding device provided by the embodiment of the present application, the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
本申请实施例还提供一种点云属性编码装置,其结构可以参考图8,该装置包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:An embodiment of the present application also provides a point cloud attribute encoding device, the structure of which can be referred to FIG. 8 , the device includes: a processor and a memory storing a computer program, and the processor implements the following steps when executing the computer program:
将色度通道的量化参数的偏移量编码到码流,所述色度通道的量化参数的偏移量是有符号数;encoding the offset of the quantization parameter of the chrominance channel into the code stream, the offset of the quantization parameter of the chrominance channel being a signed number;
根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。The chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
可选的,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。Optionally, the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
可选的,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。Optionally, the offset of the quantization parameter of the chrominance channel includes: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。Optionally, one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
可选的,所述处理器将色度通道的量化参数的偏移量编码到码流时用于:Optionally, when the processor encodes the offset of the quantization parameter of the chrominance channel into the code stream, it is used for:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
可选的,所述处理器将色度通道的量化参数的偏移量编码到码流时用于:Optionally, when the processor encodes the offset of the quantization parameter of the chrominance channel into the code stream, it is used for:
根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将色度通道的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded contains color data, the offset of the quantization parameter of the chrominance channel is encoded into the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
可选的,先编码所述颜色标识到码流,若所述颜色标识指示所述点云属性包含颜色数据,再编码所述开关标识到码流。Optionally, the color identifier is encoded into the code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is encoded into the code stream.
可选的,所述处理器还用于:Optionally, the processor is also used for:
在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. Between the maximum quantization parameters corresponding to the chroma channels.
可选的,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。Optionally, the minimum quantization parameter corresponding to the chrominance channel is the same or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same or different from the maximum quantization parameter corresponding to the luminance channel.
可选的,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。Optionally, the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
可选的,所述处理器还用于:Optionally, the processor is also used for:
将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
可选的,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。Optionally, the chrominance residual corresponding to the chrominance channel is obtained by making a difference between the actual chrominance value corresponding to the chrominance channel of the currently encoded point cloud point and the predicted chrominance value corresponding to the chrominance channel. .
以上本申请实施例提供的点云属性编码装置的各种实施方式,其具体实现可以参 考前文中的相关说明,在此不再赘述。For the various implementation manners of the point cloud attribute encoding apparatus provided in the above embodiments of the present application, the specific implementation thereof may refer to the relevant descriptions in the foregoing, which will not be repeated here.
本申请实施例提供的点云属性编解码装置,色度通道的量化参数的偏移量是有符号数,因此,通过调整色度通道的量化参数的偏移量,可以使色度通道的量化参数的数值下调,扩大了点云色度数据的精度的可调范围。In the point cloud attribute encoding and decoding device provided by the embodiment of the present application, the offset of the quantization parameter of the chrominance channel is a signed number. Therefore, by adjusting the offset of the quantization parameter of the chrominance channel, the quantization of the chrominance channel can be The value of the parameter is lowered to expand the adjustable range of the precision of the point cloud chromaticity data.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例提供的任一种点云属性解码方法。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the point cloud attribute decoding methods provided by the embodiments of the present application is implemented .
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例提供的任一种点云属性编码方法。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the point cloud attribute encoding methods provided by the embodiments of the present application is implemented .
以上针对每个保护主题均提供了多种实施方式,在不存在冲突或矛盾的基础上,本领域技术人员可以根据实际情况自由对各种实施方式进行组合,由此构成各种不同的技术方案。而本申请文件限于篇幅,未能对所有组合而得的技术方案展开说明,但可以理解的是,这些未能展开的技术方案也属于本申请实施例公开的范围。Various implementations are provided above for each protection subject. On the basis of no conflict or contradiction, those skilled in the art can freely combine various implementations according to the actual situation, thereby forming various technical solutions. . However, this application document is limited in space and cannot describe all the technical solutions obtained by combination, but it can be understood that these technical solutions that cannot be developed also belong to the scope disclosed in the embodiments of this application.
本申请实施例可采用在一个或多个其中包含有程序代码的存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机可用存储介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括但不限于:相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。Embodiments of the present application may take the form of a computer program product implemented on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-usable storage media includes permanent and non-permanent, removable and non-removable media, and storage of information can be accomplished by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的 相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. The terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also other not expressly listed elements, or also include elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
以上对本发明实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The methods and devices provided by the embodiments of the present invention have been described in detail above. The principles and implementations of the present invention are described with specific examples in this paper. The descriptions of the above embodiments are only used to help understand the methods of the present invention and its implementation. At the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. To sum up, the content of this description should not be construed as a limitation to the present invention. .

Claims (172)

  1. 一种点云属性解码方法,其特征在于,包括:A method for decoding point cloud attributes, comprising:
    从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
    当所述颜色标识指示所述点云属性包含颜色数据时,从码流中解码色度通道的量化参数的偏移量;When the color identifier indicates that the point cloud attribute contains color data, decoding the offset of the quantization parameter of the chrominance channel from the code stream;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化;Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel;
    当所述颜色标识指示所述点云属性未包含颜色数据时,确定所述码流中未存在色度通道的量化参数的偏移量。When the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
  2. 根据权利要求1所述的方法,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The method according to claim 1, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  3. 根据权利要求2所述的方法,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The method according to claim 2, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  4. 根据权利要求2所述的方法,其特征在于,所述从码流中解码色度通道的量化参数的偏移量,包括:The method according to claim 2, wherein the decoding the offset of the quantization parameter of the chrominance channel from the code stream comprises:
    从码流中解码开关标识;Decode the switch ID from the code stream;
    若所述开关标识对应开启状态,从码流中解码所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch identifier corresponds to an on state, the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    若所述开关标识对应关闭状态,确定所述码流中未存在所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
  6. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    若所述开关标识对应关闭状态,确定所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量均为预设值。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,所述方法还包括:The method according to any one of claims 1-6, wherein before performing inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel, the method further comprises: :
    将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  8. 根据权利要求7所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 7, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述色度通道的量化参数的偏移量是有符号数。The method according to any one of claims 1-8, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  10. 根据权利要求9所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 9, wherein the offset of the quantization parameter of the chrominance channel is binarized by using a signed exponential Golomb.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The method according to any one of claims 1-10, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。The method according to any one of claims 1-11, wherein the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma residual corresponding to the chroma channel of the currently decoded point cloud point Chroma reconstruction value.
  13. 根据权利要求12所述的方法,其特征在于,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。The method according to claim 12, wherein the chrominance reconstruction value corresponding to the chrominance channel is the chrominance residual corresponding to the inverse quantized chrominance channel and the currently decoded point cloud point. The chrominance prediction values corresponding to the chrominance channels are added together.
  14. 一种点云属性编码方法,其特征在于,包括:A point cloud attribute encoding method, comprising:
    获取待编码点云;Get the point cloud to be encoded;
    生成用于指示所述待编码点云的点云属性是否包含颜色数据的颜色标识,并编码所述颜色标识到码流;generating a color identifier for indicating whether the point cloud attribute of the point cloud to be encoded contains color data, and encoding the color identifier into a code stream;
    当所述颜色标识指示所述待编码点云的点云属性包含颜色数据时,编码色度通道的量化参数的偏移量到码流;When the color identifier indicates that the point cloud attribute of the to-be-coded point cloud contains color data, the offset of the quantization parameter of the chrominance channel is encoded to the code stream;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化;Using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel;
    当所述颜色标识指示所述待编码点云的点云属性未包含颜色数据时,不编码所述色度通道的量化参数的偏移量。When the color identification indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
  15. 根据权利要求14所述的方法,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The method according to claim 14, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  16. 根据权利要求15所述的方法,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The method according to claim 15, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  17. 根据权利要求15所述的方法,其特征在于,所述编码色度通道的量化参数的偏移量到码流,包括:The method according to claim 15, wherein the offset of the quantization parameter of the encoded chrominance channel to the code stream comprises:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method of claim 17, wherein the method further comprises:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  19. 根据权利要求14-18任一项所述的方法,其特征在于,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,所述方法还包括:The method according to any one of claims 14-18, characterized in that before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further comprises:
    将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  20. 根据权利要求19所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 19, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  21. 根据权利要求14-20任一项所述的方法,其特征在于,所述色度通道的量化参数的偏移量是有符号数。The method according to any one of claims 14-20, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  22. 根据权利要求21所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 21, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  23. 根据权利要求14-22任一项所述的方法,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The method according to any one of claims 14-22, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  24. 根据权利要求14-23任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 14-23, wherein the method further comprises:
    将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  25. 根据权利要求14-24任一项所述的方法,其特征在于,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。The method according to any one of claims 14-24, wherein the chroma residual corresponding to the chroma channel is the chroma true value corresponding to the chroma channel of the currently encoded point cloud point and the The chrominance prediction value corresponding to the chrominance channel is obtained by doing the difference.
  26. 一种点云属性解码方法,其特征在于,包括:A method for decoding point cloud attributes, comprising:
    从码流中解码多个色度通道各自对应的量化参数的偏移量;Decode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream;
    对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。For each chrominance channel, use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
  27. 根据权利要求26所述的方法,其特征在于,所述多个色度通道包括两个色度通道。27. The method of claim 26, wherein the plurality of chrominance channels comprises two chrominance channels.
  28. 根据权利要求27所述的方法,其特征在于,所述两个色度通道包括:Cb色度通道和Cr色度通道。The method of claim 27, wherein the two chrominance channels comprise: a Cb chrominance channel and a Cr chrominance channel.
  29. 根据权利要求26-28任一项所述的方法,其特征在于,所述从码流中解码多个色度通道各自对应的量化参数的偏移量,包括:The method according to any one of claims 26-28, wherein the decoding the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream comprises:
    从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
    若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute contains color data, the offsets of the quantization parameters corresponding to each of the plurality of chrominance channels are decoded from the code stream.
  30. 根据权利要求29所述的方法,其特征在于,所述方法还包括:The method of claim 29, wherein the method further comprises:
    若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  31. 根据权利要求26-30任一项所述的方法,其特征在于,所述从码流中解码多个色度通道各自对应的量化参数的偏移量,包括:The method according to any one of claims 26-30, wherein the decoding the offsets of the quantization parameters corresponding to the multiple chrominance channels from the code stream comprises:
    从码流中解码开关标识;Decode the switch ID from the code stream;
    若所述开关标识对应开启状态,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the switch flag corresponds to an on state, the offsets of the quantization parameters corresponding to each of the multiple chrominance channels are decoded from the code stream.
  32. 根据权利要求31所述的方法,其特征在于,所述方法还包括:The method of claim 31, wherein the method further comprises:
    若所述开关标识对应关闭状态,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the switch identifier corresponds to an off state, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  33. 根据权利要求31所述的方法,其特征在于,所述方法还包括:The method of claim 31, wherein the method further comprises:
    若所述开关标识对应关闭状态,确定所述多个色度通道各自对应的量化参数的偏移量均为预设值。If the switch identifier corresponds to an off state, it is determined that the offsets of the quantization parameters corresponding to the plurality of chrominance channels are all preset values.
  34. 根据权利要求26-33任一项所述的方法,其特征在于,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,所述方法还包括:The method according to any one of claims 26-33, wherein before performing inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel, the method further comprises: :
    将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  35. 根据权利要求34所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 34, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  36. 根据权利要求26-35任一项所述的方法,其特征在于,所述色度通道的量化参数的偏移量是有符号数。The method according to any one of claims 26-35, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  37. 根据权利要求36所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 36, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  38. 根据权利要求26-37任一项所述的方法,其特征在于,所述色度通道的量化 参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The method according to any one of claims 26-37, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  39. 根据权利要求26-38任一项所述的方法,其特征在于,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。The method according to any one of claims 26-38, wherein the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma residual corresponding to the chroma channel of the currently decoded point cloud point Chroma reconstruction value.
  40. 根据权利要求39所述的方法,其特征在于,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。The method according to claim 39, wherein the chrominance reconstruction value corresponding to the chrominance channel is the chrominance residual corresponding to the inverse quantized chrominance channel and the currently decoded point cloud point. The chrominance prediction values corresponding to the chrominance channels are added together.
  41. 一种点云属性编码方法,其特征在于,包括:A point cloud attribute encoding method, comprising:
    将多个色度通道各自对应的量化参数的偏移量编码到码流;encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream;
    对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。For each chrominance channel, the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  42. 根据权利要求41所述的方法,其特征在于,所述多个色度通道包括两个色度通道。41. The method of claim 41, wherein the plurality of chrominance channels comprises two chrominance channels.
  43. 根据权利要求42所述的方法,其特征在于,所述两个色度通道包括:Cb色度通道和Cr色度通道。The method of claim 42, wherein the two chrominance channels comprise: a Cb chrominance channel and a Cr chrominance channel.
  44. 根据权利要求41-43任一项所述的方法,其特征在于,所述将多个色度通道各自对应的量化参数的偏移量编码到码流,包括:The method according to any one of claims 41-43, wherein the encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream comprises:
    根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
    若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded includes color data, the offsets of the quantization parameters corresponding to the multiple chrominance channels are encoded into the code stream.
  45. 根据权利要求44所述的方法,其特征在于,所述方法还包括:The method of claim 44, wherein the method further comprises:
    若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the to-be-encoded point cloud does not contain color data, the offset of the quantization parameter corresponding to each of the plurality of chrominance channels is not encoded.
  46. 根据权利要求41-45任一项所述的方法,其特征在于,所述将多个色度通道各自对应的量化参数的偏移量编码到码流,包括:The method according to any one of claims 41-45, wherein the encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream comprises:
    若所述多个色度通道各自对应的量化参数的偏移量中任一不为预设值,编码对应开启状态的开关标识到码流,并将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If any of the offsets of the quantization parameters corresponding to the multiple chroma channels is not a preset value, encode the switch flag corresponding to the on state to the code stream, and quantize the corresponding quantization parameters of the multiple chroma channels The offset of the parameter is encoded into the codestream.
  47. 根据权利要求46所述的方法,其特征在于,所述方法还包括:The method of claim 46, wherein the method further comprises:
    若所述多个色度通道各自对应的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述多个色度通道各自对应的量化参数的偏移量。If the offsets of the quantization parameters corresponding to the multiple chrominance channels are all preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the offsets of the quantization parameters corresponding to the multiple chrominance channels. shift.
  48. 根据权利要求41-47任一项所述的方法,其特征在于,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,所述方法还包括:The method according to any one of claims 41-47, wherein before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further comprises:
    将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  49. 根据权利要求48所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 48, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  50. 根据权利要求41-49任一项所述的方法,其特征在于,所述色度通道的量化参数的偏移量是有符号数。The method according to any one of claims 41-49, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  51. 根据权利要求50所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 50, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  52. 根据权利要求41-51任一项所述的方法,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The method according to any one of claims 41-51, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  53. 根据权利要求41-52任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 41-52, wherein the method further comprises:
    将量化后的各个所述色度通道对应的色度残差编码到码流。The chrominance residuals corresponding to each of the quantized chrominance channels are encoded into the code stream.
  54. 根据权利要求41-53任一项所述的方法,其特征在于,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。The method according to any one of claims 41-53, wherein the chroma residual corresponding to the chroma channel is the chroma true value corresponding to the chroma channel of the currently encoded point cloud point and the The chrominance prediction value corresponding to the chrominance channel is obtained by doing the difference.
  55. 一种点云属性解码方法,其特征在于,包括:A method for decoding point cloud attributes, comprising:
    从码流中解码色度通道的量化参数的偏移量,所述色度通道的量化参数的偏移量是有符号数;Decode the offset of the quantization parameter of the chrominance channel from the code stream, the offset of the quantization parameter of the chrominance channel is a signed number;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。The chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
  56. 根据权利要求55所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 55, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  57. 根据权利要求55所述的方法,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The method according to claim 55, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  58. 根据权利要求57所述的方法,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The method of claim 57, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel and the other is a Cr chrominance channel.
  59. 根据权利要求57所述的方法,其特征在于,所述从码流中解码色度通道的量化参数的偏移量,包括:The method according to claim 57, wherein the decoding the offset of the quantization parameter of the chrominance channel from the code stream comprises:
    从码流中解码开关标识;Decode the switch ID from the code stream;
    若所述开关标识对应开启状态,从码流中解码所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch identifier corresponds to an on state, the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
  60. 根据权利要求59所述的方法,其特征在于,所述方法还包括:The method of claim 59, wherein the method further comprises:
    若所述开关标识对应关闭状态,确定所述码流中未存在所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
  61. 根据权利要求60所述的方法,其特征在于,所述方法还包括:The method of claim 60, wherein the method further comprises:
    若所述开关标识对应关闭状态,确定所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量均为预设值。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
  62. 根据权利要求55-61任一项所述的方法,其特征在于,所述从码流中解码色度通道的量化参数的偏移量,包括:The method according to any one of claims 55-61, wherein the decoding the offset of the quantization parameter of the chrominance channel from the code stream comprises:
    从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
    若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码色度通道的量化参数的偏移量。If the color flag indicates that the point cloud attribute contains color data, the offset of the quantization parameter of the chrominance channel is decoded from the code stream.
  63. 根据权利要求62所述的方法,其特征在于,所述方法还包括:The method of claim 62, wherein the method further comprises:
    若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that the offset of the quantization parameter of the chrominance channel does not exist in the code stream.
  64. 根据权利要求62所述的方法,其特征在于,先从码流中解码所述颜色标识,若所述颜色标识指示所述点云属性包含颜色数据,再从码流中解码所述开关标识。The method according to claim 62, wherein the color identifier is first decoded from a code stream, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is decoded from the code stream.
  65. 根据权利要求55-64任一项所述的方法,其特征在于,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,所述方法还包括:The method according to any one of claims 55-64, wherein before performing inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel, the method further comprises: :
    将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  66. 根据权利要求65所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 65, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  67. 根据权利要求55-66任一项所述的方法,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The method according to any one of claims 55-66, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  68. 根据权利要求55-67任一项所述的方法,其特征在于,反量化后的所述色度 通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。The method according to any one of claims 55-67, wherein the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma residual corresponding to the chroma channel of the currently decoded point cloud point Chroma reconstruction value.
  69. 根据权利要求68所述的方法,其特征在于,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。The method according to claim 68, wherein the chrominance reconstruction value corresponding to the chrominance channel is the chrominance residual corresponding to the inverse quantized chrominance channel and the currently decoded point cloud point. The chrominance prediction values corresponding to the chrominance channels are added together.
  70. 一种点云属性编码方法,其特征在于,包括:A point cloud attribute encoding method, comprising:
    将色度通道的量化参数的偏移量编码到码流,所述色度通道的量化参数的偏移量是有符号数;encoding the offset of the quantization parameter of the chrominance channel into the code stream, the offset of the quantization parameter of the chrominance channel being a signed number;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。The chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  71. 根据权利要求70所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 70, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  72. 根据权利要求70所述的方法,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The method according to claim 70, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  73. 根据权利要求72所述的方法,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The method of claim 72, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel and the other is a Cr chrominance channel.
  74. 根据权利要求72所述的方法,其特征在于,所述将色度通道的量化参数的偏移量编码到码流,包括:The method according to claim 72, wherein the encoding the offset of the quantization parameter of the chrominance channel into the code stream comprises:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  75. 根据权利要求74所述的方法,其特征在于,所述方法还包括:The method of claim 74, wherein the method further comprises:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  76. 根据权利要求70-75任一项所述的方法,其特征在于,所述将色度通道的量化参数的偏移量编码到码流,包括:The method according to any one of claims 70-75, wherein the encoding the offset of the quantization parameter of the chrominance channel into the code stream comprises:
    根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
    若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将色度通道的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded contains color data, the offset of the quantization parameter of the chrominance channel is encoded into the code stream.
  77. 根据权利要求76所述的方法,其特征在于,所述方法还包括:The method of claim 76, wherein the method further comprises:
    若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
  78. 根据权利要求76所述的方法,其特征在于,先编码所述颜色标识到码流,若所述颜色标识指示所述点云属性包含颜色数据,再编码所述开关标识到码流。The method according to claim 76, wherein the color identifier is encoded into a code stream first, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is encoded into the code stream.
  79. 根据权利要求70-78任一项所述的方法,其特征在于,在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,所述方法还包括:The method according to any one of claims 70-78, wherein before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, the method further comprises:
    将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  80. 根据权利要求79所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 79, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  81. 根据权利要求70-80任一项所述的方法,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The method according to any one of claims 70-80, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  82. 根据权利要求70-81任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 70-81, wherein the method further comprises:
    将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  83. 根据权利要求70-82任一项所述的方法,其特征在于,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。The method according to any one of claims 70-82, wherein the chroma residual corresponding to the chroma channel is the true chroma value corresponding to the chroma channel of the currently encoded point cloud point and the The chrominance prediction value corresponding to the chrominance channel is obtained by doing the difference.
  84. 一种点云属性解码装置,其特征在于,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A point cloud attribute decoding device, comprising: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
    从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
    当所述颜色标识指示所述点云属性包含颜色数据时,从码流中解码色度通道的量化参数的偏移量;When the color identifier indicates that the point cloud attribute contains color data, decoding the offset of the quantization parameter of the chrominance channel from the code stream;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化;Perform inverse quantization on the chrominance residual corresponding to the chrominance channel by using the quantization parameter of the chrominance channel;
    当所述颜色标识指示所述点云属性未包含颜色数据时,确定所述码流中未存在色度通道的量化参数的偏移量。When the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter of the chrominance channel in the code stream.
  85. 根据权利要求84所述的装置,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The apparatus according to claim 84, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  86. 根据权利要求85所述的装置,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The apparatus of claim 85, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel and the other is a Cr chrominance channel.
  87. 根据权利要求85所述的装置,其特征在于,所述处理器从码流中解码色度通道的量化参数的偏移量时用于:The apparatus according to claim 85, wherein when the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream:
    从码流中解码开关标识;Decode the switch ID from the code stream;
    若所述开关标识对应开启状态,从码流中解码所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch identifier corresponds to an on state, the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
  88. 根据权利要求87所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 87, wherein the processor is further configured to:
    若所述开关标识对应关闭状态,确定所述码流中未存在所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
  89. 根据权利要求87所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 87, wherein the processor is further configured to:
    若所述开关标识对应关闭状态,确定所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量均为预设值。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
  90. 根据权利要求84-89任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 84-89, wherein the processor is further configured to:
    在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
  91. 根据权利要求90所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 90, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  92. 根据权利要求84-91任一项所述的装置,其特征在于,所述色度通道的量化参数的偏移量是有符号数。The apparatus according to any one of claims 84-91, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  93. 根据权利要求92所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 92, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  94. 根据权利要求84-93任一项所述的装置,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The apparatus according to any one of claims 84-93, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  95. 根据权利要求84-94任一项所述的装置,其特征在于,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。The apparatus according to any one of claims 84 to 94, wherein the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma residual corresponding to the chroma channel of the currently decoded point cloud point Chroma reconstruction value.
  96. 根据权利要求95所述的装置,其特征在于,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。The apparatus according to claim 95, wherein the chrominance reconstruction value corresponding to the chrominance channel is the inverse quantized chrominance residual corresponding to the chrominance channel and the value of the currently decoded point cloud point. The chrominance prediction values corresponding to the chrominance channels are added together.
  97. 一种点云属性编码装置,其特征在于,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A point cloud attribute encoding device, comprising: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
    获取待编码点云;Get the point cloud to be encoded;
    生成用于指示所述待编码点云的点云属性是否包含颜色数据的颜色标识,并编码所述颜色标识到码流;generating a color identifier for indicating whether the point cloud attribute of the point cloud to be encoded contains color data, and encoding the color identifier into a code stream;
    当所述颜色标识指示所述待编码点云的点云属性包含颜色数据时,编码色度通道的量化参数的偏移量到码流;When the color identifier indicates that the point cloud attribute of the to-be-coded point cloud contains color data, the offset of the quantization parameter of the chrominance channel is encoded to the code stream;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化;Using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel;
    当所述颜色标识指示所述待编码点云的点云属性未包含颜色数据时,不编码所述色度通道的量化参数的偏移量。When the color identification indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
  98. 根据权利要求97所述的装置,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The apparatus according to claim 97, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  99. 根据权利要求98所述的装置,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The apparatus of claim 98, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel and the other is a Cr chrominance channel.
  100. 根据权利要求98所述的装置,其特征在于,所述处理器在编码色度通道的量化参数的偏移量到码流时用于:The apparatus according to claim 98, wherein when encoding the offset of the quantization parameter of the chrominance channel to the code stream, the processor is configured to:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  101. 根据权利要求100所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 100, wherein the processor is further configured to:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  102. 根据权利要求97-101任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 97-101, wherein the processor is further configured to:
    在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. between the maximum quantization parameters corresponding to the chroma channels.
  103. 根据权利要求102所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 102, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  104. 根据权利要求97-103任一项所述的装置,其特征在于,所述色度通道的量化参数的偏移量是有符号数。The apparatus according to any one of claims 97-103, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  105. 根据权利要求104所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 104, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  106. 根据权利要求97-105任一项所述的装置,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The apparatus according to any one of claims 97-105, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  107. 根据权利要求97-106任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 97-106, wherein the processor is further configured to:
    将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  108. 根据权利要求97-107任一项所述的装置,其特征在于,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。The apparatus according to any one of claims 97-107, wherein the chroma residual corresponding to the chroma channel is the true chroma value corresponding to the chroma channel of the currently encoded point cloud point and the The chrominance prediction value corresponding to the chrominance channel is obtained by doing the difference.
  109. 一种点云属性解码装置,其特征在于,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A point cloud attribute decoding device, comprising: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
    从码流中解码多个色度通道各自对应的量化参数的偏移量;Decode the offsets of the quantization parameters corresponding to each of the multiple chrominance channels from the code stream;
    对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。For each chrominance channel, use the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel.
  110. 根据权利要求109所述的装置,其特征在于,所述多个色度通道包括两个色度通道。109. The apparatus of claim 109, wherein the plurality of chrominance channels includes two chrominance channels.
  111. 根据权利要求110所述的装置,其特征在于,所述两个色度通道包括:Cb色度通道和Cr色度通道。The apparatus of claim 110, wherein the two chrominance channels comprise: a Cb chrominance channel and a Cr chrominance channel.
  112. 根据权利要求109-111任一项所述的装置,其特征在于,所述处理器从码流中解码多个色度通道各自对应的量化参数的偏移量时用于:The apparatus according to any one of claims 109-111, wherein when the processor decodes the offsets of the quantization parameters corresponding to the multiple chrominance channels from the code stream, it is used for:
    从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
    若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute contains color data, the offsets of the quantization parameters corresponding to each of the plurality of chrominance channels are decoded from the code stream.
  113. 根据权利要求112所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 112, wherein the processor is further configured to:
    若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  114. 根据权利要求109-113任一项所述的装置,其特征在于,所述处理器从码流中解码多个色度通道各自对应的量化参数的偏移量时用于:The apparatus according to any one of claims 109-113, wherein when the processor decodes the offsets of the quantization parameters corresponding to the multiple chrominance channels from the code stream, it is used for:
    从码流中解码开关标识;Decode the switch ID from the code stream;
    若所述开关标识对应开启状态,从码流中解码多个色度通道各自对应的量化参数的偏移量。If the switch flag corresponds to an on state, the offsets of the quantization parameters corresponding to each of the multiple chrominance channels are decoded from the code stream.
  115. 根据权利要求114所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 114, wherein the processor is further configured to:
    若所述开关标识对应关闭状态,确定所述码流中未存在所述多个色度通道各自对应的量化参数的偏移量。If the switch identifier corresponds to an off state, it is determined that there is no offset of the quantization parameter corresponding to each of the plurality of chrominance channels in the code stream.
  116. 根据权利要求114所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 114, wherein the processor is further configured to:
    若所述开关标识对应关闭状态,确定所述多个色度通道各自对应的量化参数的偏移量均为预设值。If the switch identifier corresponds to an off state, it is determined that the offsets of the quantization parameters corresponding to the plurality of chrominance channels are all preset values.
  117. 根据权利要求109-116任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 109-116, wherein the processor is further configured to:
    在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
  118. 根据权利要求117所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 117, wherein the minimum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  119. 根据权利要求109-117任一项所述的装置,其特征在于,所述色度通道的量化参数的偏移量是有符号数。The apparatus according to any one of claims 109-117, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  120. 根据权利要求119所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 119, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  121. 根据权利要求109-120任一项所述的装置,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The apparatus according to any one of claims 109-120, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  122. 根据权利要求109-120任一项所述的装置,其特征在于,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。The apparatus according to any one of claims 109-120, wherein the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma residual corresponding to the chroma channel of the currently decoded point cloud point Chroma reconstruction value.
  123. 根据权利要求122所述的装置,其特征在于,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。The apparatus according to claim 122, wherein the chroma reconstruction value corresponding to the chroma channel is the inverse quantized chroma residual corresponding to the chroma channel and the value of the currently decoded point cloud point. The chrominance prediction values corresponding to the chrominance channels are added together.
  124. 一种点云属性编码装置,其特征在于,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A point cloud attribute encoding device, comprising: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
    将多个色度通道各自对应的量化参数的偏移量编码到码流;encoding the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream;
    对所述多个色度通道中的每个色度通道,根据所述色度通道的量化参数的偏移量计算所述色度通道的量化参数;For each chrominance channel in the plurality of chrominance channels, calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    对每个色度通道,利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。For each chrominance channel, the chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  125. 根据权利要求124所述的装置,其特征在于,所述多个色度通道包括两个色度通道。124. The apparatus of claim 124, wherein the plurality of chrominance channels comprises two chrominance channels.
  126. 根据权利要求125所述的装置,其特征在于,所述两个色度通道包括:Cb色度通道和Cr色度通道。The apparatus of claim 125, wherein the two chrominance channels comprise: a Cb chrominance channel and a Cr chrominance channel.
  127. 根据权利要求124-126任一项所述的装置,其特征在于,所述处理器将多个色度通道各自对应的量化参数的偏移量编码到码流时用于:The apparatus according to any one of claims 124 to 126, wherein when the processor encodes the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream:
    根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
    若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded includes color data, the offsets of the quantization parameters corresponding to the multiple chrominance channels are encoded into the code stream.
  128. 根据权利要求127所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 127, wherein the processor is further configured to:
    若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述多个色度通道各自对应的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the to-be-encoded point cloud does not contain color data, the offset of the quantization parameter corresponding to each of the plurality of chrominance channels is not encoded.
  129. 根据权利要求124-128任一项所述的装置,其特征在于,所述处理器将多个色度通道各自对应的量化参数的偏移量编码到码流时用于:The apparatus according to any one of claims 124-128, wherein when the processor encodes the offsets of the quantization parameters corresponding to the multiple chrominance channels into the code stream, the processor is used for:
    若所述多个色度通道各自对应的量化参数的偏移量中任一不为预设值,编码对应开启状态的开关标识到码流,并将所述多个色度通道各自对应的量化参数的偏移量编码到码流。If any of the offsets of the quantization parameters corresponding to the multiple chroma channels is not a preset value, encode the switch flag corresponding to the on state to the code stream, and quantize the corresponding quantization parameters of the multiple chroma channels The offset of the parameter is encoded into the codestream.
  130. 根据权利要求129所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 129, wherein the processor is further configured to:
    若所述多个色度通道各自对应的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述多个色度通道各自对应的量化参数的偏移量。If the offsets of the quantization parameters corresponding to the multiple chrominance channels are all preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the offsets of the quantization parameters corresponding to the multiple chrominance channels. shift.
  131. 根据权利要求124-130任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 124-130, wherein the processor is further configured to:
    在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel, limit the quantization parameter of the chrominance channel to the minimum quantization parameter corresponding to the chrominance channel and the chrominance channel. between the maximum quantization parameters corresponding to the chroma channels.
  132. 根据权利要求131所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 131, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  133. 根据权利要求124-132任一项所述的装置,其特征在于,所述色度通道的量 化参数的偏移量是有符号数。The apparatus according to any one of claims 124-132, wherein the offset of the quantization parameter of the chrominance channel is a signed number.
  134. 根据权利要求133所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 133, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  135. 根据权利要求124-134任一项所述的装置,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The apparatus according to any one of claims 124-134, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  136. 根据权利要求124-135任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 124-135, wherein the processor is further configured to:
    将量化后的各个所述色度通道对应的色度残差编码到码流。The chrominance residuals corresponding to each of the quantized chrominance channels are encoded into the code stream.
  137. 根据权利要求124-136任一项所述的装置,其特征在于,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。The apparatus according to any one of claims 124-136, wherein the chroma residual corresponding to the chroma channel is the true chroma value corresponding to the chroma channel of the currently encoded point cloud point and the The chrominance prediction value corresponding to the chrominance channel is obtained by doing the difference.
  138. 一种点云属性解码装置,其特征在于,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A point cloud attribute decoding device, comprising: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
    从码流中解码色度通道的量化参数的偏移量,所述色度通道的量化参数的偏移量是有符号数;Decode the offset of the quantization parameter of the chrominance channel from the code stream, the offset of the quantization parameter of the chrominance channel is a signed number;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化。The chrominance residual corresponding to the chrominance channel is inversely quantized by using the quantization parameter of the chrominance channel.
  139. 根据权利要求138所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 138, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  140. 根据权利要求138所述的装置,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The apparatus according to claim 138, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  141. 根据权利要求140所述的装置,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The apparatus of claim 140, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel, and the other is a Cr chrominance channel.
  142. 根据权利要求140所述的装置,其特征在于,所述处理器从码流中解码色度通道的量化参数的偏移量时用于:The apparatus according to claim 140, wherein when the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream:
    从码流中解码开关标识;Decode the switch ID from the code stream;
    若所述开关标识对应开启状态,从码流中解码所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch identifier corresponds to an on state, the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are decoded from the code stream.
  143. 根据权利要求142所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 142, wherein the processor is further configured to:
    若所述开关标识对应关闭状态,确定所述码流中未存在所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel do not exist in the code stream.
  144. 根据权利要求142所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 142, wherein the processor is further configured to:
    若所述开关标识对应关闭状态,确定所述第一色度通道的量化参数的偏移量和所述第二色度通道的量化参数的偏移量均为预设值。If the switch flag corresponds to an off state, it is determined that the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values.
  145. 根据权利要求138-144任一项所述的装置,其特征在于,所述处理器从码流中解码色度通道的量化参数的偏移量时用于:The apparatus according to any one of claims 138-144, wherein when the processor decodes the offset of the quantization parameter of the chrominance channel from the code stream:
    从码流中解码点云属性的颜色标识;Decode the color identification of point cloud attributes from the code stream;
    若所述颜色标识指示所述点云属性包含颜色数据,从码流中解码色度通道的量化参数的偏移量。If the color flag indicates that the point cloud attribute contains color data, the offset of the quantization parameter of the chrominance channel is decoded from the code stream.
  146. 根据权利要求145所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 145, wherein the processor is further configured to:
    若所述颜色标识指示所述点云属性未包含颜色数据,确定所述码流中未存在所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute does not contain color data, it is determined that the offset of the quantization parameter of the chrominance channel does not exist in the code stream.
  147. 根据权利要求145所述的装置,其特征在于,先从码流中解码所述颜色标识,若所述颜色标识指示所述点云属性包含颜色数据,再从码流中解码所述开关标识。The apparatus according to claim 145, wherein the color identifier is first decoded from a code stream, and if the color identifier indicates that the point cloud attribute contains color data, then the switch identifier is decoded from the code stream.
  148. 根据权利要求138-147任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 138-147, wherein the processor is further configured to:
    在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行反量化之前,将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。Before using the quantization parameter of the chrominance channel to perform inverse quantization on the chrominance residual corresponding to the chrominance channel, the quantization parameter of the chrominance channel is limited to the minimum quantization parameter corresponding to the chrominance channel and the between the maximum quantization parameters corresponding to the chrominance channels.
  149. 根据权利要求148所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 148, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  150. 根据权利要求138-149任一项所述的装置,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The apparatus according to any one of claims 138-149, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  151. 根据权利要求138-150任一项所述的装置,其特征在于,反量化后的所述色度通道对应的色度残差用于计算当前解码的点云点的所述色度通道对应的色度重建值。The apparatus according to any one of claims 138 to 150, wherein the inverse quantized chroma residual corresponding to the chroma channel is used to calculate the chroma residual corresponding to the chroma channel of the currently decoded point cloud point Chroma reconstruction value.
  152. 根据权利要求151所述的装置,其特征在于,所述色度通道对应的色度重建值是反量化后的所述色度通道对应的色度残差和当前解码的点云点的所述色度通道对应的色度预测值相加得到的。The apparatus according to claim 151, wherein the chroma reconstruction value corresponding to the chroma channel is the inverse quantized chroma residual corresponding to the chroma channel and the value of the currently decoded point cloud point. The chrominance prediction values corresponding to the chrominance channels are added together.
  153. 一种点云属性编码装置,其特征在于,包括:处理器和存储有计算机程序的存储器,所述处理器在执行所述计算机程序时实现以下步骤:A point cloud attribute encoding device, comprising: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
    将色度通道的量化参数的偏移量编码到码流,所述色度通道的量化参数的偏移量是有符号数;encoding the offset of the quantization parameter of the chrominance channel into the code stream, the offset of the quantization parameter of the chrominance channel being a signed number;
    根据所述色度通道的量化参数的偏移量计算色度通道的量化参数;Calculate the quantization parameter of the chrominance channel according to the offset of the quantization parameter of the chrominance channel;
    利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化。The chrominance residual corresponding to the chrominance channel is quantized by using the quantization parameter of the chrominance channel.
  154. 根据权利要求153所述的方法,其特征在于,所述色度通道的量化参数的偏移量采用有符号指数哥伦布进行二值化。The method according to claim 153, wherein the offset of the quantization parameter of the chrominance channel is binarized by using signed exponential Golomb.
  155. 根据权利要求153所述的装置,其特征在于,所述色度通道的量化参数的偏移量包括:第一色度通道的量化参数的偏移量和第二色度通道的量化参数的偏移量。The apparatus according to claim 153, wherein the offset of the quantization parameter of the chrominance channel comprises: the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel shift.
  156. 根据权利要求155所述的装置,其特征在于,所述第一色度通道与所述第二色度通道中,一个是Cb色度通道,另一个是Cr色度通道。The apparatus of claim 155, wherein one of the first chrominance channel and the second chrominance channel is a Cb chrominance channel and the other is a Cr chrominance channel.
  157. 根据权利要求155所述的装置,其特征在于,所述处理器将色度通道的量化参数的偏移量编码到码流时用于:The apparatus according to claim 155, wherein when the processor encodes the offset of the quantization parameter of the chrominance channel into the code stream:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量任一不为预设值,编码对应开启状态的开关标识到码流,并编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量到码流。If either the offset of the quantization parameter of the first chrominance channel or the offset of the quantization parameter of the second chrominance channel is not a preset value, encode the switch flag corresponding to the ON state into the code stream, and The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are encoded into the code stream.
  158. 根据权利要求157所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 157, wherein the processor is further configured to:
    若所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量均为预设值,编码对应关闭状态的开关标识到码流,不编码所述第一色度通道的量化参数的偏移量与所述第二色度通道的量化参数的偏移量。If the offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel are both preset values, encode the switch flag corresponding to the off state to the code stream, and do not encode the The offset of the quantization parameter of the first chrominance channel and the offset of the quantization parameter of the second chrominance channel.
  159. 根据权利要求153-158任一项所述的装置,其特征在于,所述处理器将色度通道的量化参数的偏移量编码到码流时用于:The apparatus according to any one of claims 153-158, wherein when the processor encodes the offset of the quantization parameter of the chrominance channel into the code stream:
    根据待编码点云的点云属性是否包含颜色数据生成对应的颜色标识,并编码所述颜色标识到码流;Generate a corresponding color mark according to whether the point cloud attribute of the point cloud to be encoded contains color data, and encode the color mark to the code stream;
    若所述颜色标识指示所述待编码点云的点云属性包含颜色数据,将色度通道的量化参数的偏移量编码到码流。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded contains color data, the offset of the quantization parameter of the chrominance channel is encoded into the code stream.
  160. 根据权利要求159所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 159, wherein the processor is further configured to:
    若所述颜色标识指示所述待编码点云的点云属性未包含颜色数据,不编码所述色度通道的量化参数的偏移量。If the color identifier indicates that the point cloud attribute of the point cloud to be encoded does not contain color data, the offset of the quantization parameter of the chrominance channel is not encoded.
  161. 根据权利要求159所述的装置,其特征在于,先编码所述颜色标识到码流,若所述颜色标识指示所述点云属性包含颜色数据,再编码所述开关标识到码流。The apparatus according to claim 159, wherein the color flag is encoded into a code stream first, and if the color flag indicates that the point cloud attribute contains color data, then the switch flag is encoded into the code stream.
  162. 根据权利要求153-161任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 153-161, wherein the processor is further configured to:
    在利用所述色度通道的量化参数对所述色度通道对应的色度残差进行量化之前,Before using the quantization parameter of the chrominance channel to quantize the chrominance residual corresponding to the chrominance channel,
    将所述色度通道的量化参数限制在所述色度通道对应的最小量化参数与所述色度通道对应的最大量化参数之间。The quantization parameter of the chrominance channel is limited between the minimum quantization parameter corresponding to the chrominance channel and the maximum quantization parameter corresponding to the chrominance channel.
  163. 根据权利要求162所述的方法,其特征在于,所述色度通道对应的最小量化参数与亮度通道对应的最小量化参数相同或不同,所述色度通道对应的最大量化参数与亮度通道对应的最大量化参数相同或不同。The method according to claim 162, wherein the minimum quantization parameter corresponding to the chrominance channel and the minimum quantization parameter corresponding to the luminance channel are the same or different, and the maximum quantization parameter corresponding to the chrominance channel is the same as or different from the minimum quantization parameter corresponding to the luminance channel. The maximum quantization parameter is the same or different.
  164. 根据权利要求153-163任一项所述的装置,其特征在于,所述色度通道的量化参数是所述色度通道的量化参数的偏移量和亮度通道的量化参数相加得到的。The apparatus according to any one of claims 153-163, wherein the quantization parameter of the chrominance channel is obtained by adding the offset of the quantization parameter of the chrominance channel and the quantization parameter of the luminance channel.
  165. 根据权利要求153-164任一项所述的装置,其特征在于,所述处理器还用于:The apparatus according to any one of claims 153-164, wherein the processor is further configured to:
    将量化后的所述色度通道对应的色度残差编码到码流。The chrominance residual corresponding to the quantized chrominance channel is encoded into the code stream.
  166. 根据权利要求153-165任一项所述的装置,其特征在于,所述色度通道对应的色度残差是当前编码的点云点的所述色度通道对应的色度真实值和所述色度通道对应的色度预测值做差得到的。The apparatus according to any one of claims 153-165, wherein the chroma residual corresponding to the chroma channel is the true chroma value corresponding to the chroma channel of the currently encoded point cloud point and the The chrominance prediction value corresponding to the chrominance channel is obtained by doing the difference.
  167. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-13任一项所述的点云属性解码方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the point cloud attribute decoding according to any one of claims 1-13 is implemented method.
  168. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求14-25任一项所述的点云属性编码方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding according to any one of claims 14-25 method.
  169. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求26-40任一项所述的点云属性解码方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the point cloud attribute decoding according to any one of claims 26-40 is implemented method.
  170. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求41-54任一项所述的点云属性编码方法。A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the point cloud attribute encoding according to any one of claims 41-54 is implemented method.
  171. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求55-69任一项所述的点云属性解码方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the point cloud attribute decoding according to any one of claims 55-69 is implemented method.
  172. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求70-83任一项所述的点云属性编码方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the point cloud attribute encoding according to any one of claims 70-83 method.
PCT/CN2021/080539 2021-03-12 2021-03-12 Point cloud attribute decoding method and point cloud attribute encoding method WO2022188164A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/080539 WO2022188164A1 (en) 2021-03-12 2021-03-12 Point cloud attribute decoding method and point cloud attribute encoding method
CN202180083707.1A CN116601672A (en) 2021-03-12 2021-03-12 Point cloud attribute decoding method and point cloud attribute encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/080539 WO2022188164A1 (en) 2021-03-12 2021-03-12 Point cloud attribute decoding method and point cloud attribute encoding method

Publications (1)

Publication Number Publication Date
WO2022188164A1 true WO2022188164A1 (en) 2022-09-15

Family

ID=83226236

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/080539 WO2022188164A1 (en) 2021-03-12 2021-03-12 Point cloud attribute decoding method and point cloud attribute encoding method

Country Status (2)

Country Link
CN (1) CN116601672A (en)
WO (1) WO2022188164A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220407716A1 (en) * 2021-06-21 2022-12-22 Motional Ad Llc Authenticated point cloud data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110870311A (en) * 2017-07-12 2020-03-06 华为技术有限公司 Fractional quantization parameter offset in video compression
CN112188197A (en) * 2019-07-05 2021-01-05 腾讯美国有限责任公司 Method and device for decoding point cloud attributes between channels and readable storage medium
US20210029187A1 (en) * 2019-07-03 2021-01-28 Lg Electronics Inc. Point cloud data transmission apparatus, point cloud data transmission method, point cloud data reception apparatus and point cloud data reception method
CN112368743A (en) * 2018-09-11 2021-02-12 松下电器(美国)知识产权公司 Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110870311A (en) * 2017-07-12 2020-03-06 华为技术有限公司 Fractional quantization parameter offset in video compression
CN112368743A (en) * 2018-09-11 2021-02-12 松下电器(美国)知识产权公司 Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device
US20210029187A1 (en) * 2019-07-03 2021-01-28 Lg Electronics Inc. Point cloud data transmission apparatus, point cloud data transmission method, point cloud data reception apparatus and point cloud data reception method
CN112188197A (en) * 2019-07-05 2021-01-05 腾讯美国有限责任公司 Method and device for decoding point cloud attributes between channels and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"ISO/IEC Norm", 15 April 2020, ISO/IEC, CH, article ANONYMOUS: "ISO/IEC 23090-9:2020(E) Information technology - MPEG-I (Coded Representation of Immersive Media) - Part 9: Geometry-based Point Cloud Compression", pages: 1 - 120, XP009540213 *

Also Published As

Publication number Publication date
CN116601672A (en) 2023-08-15

Similar Documents

Publication Publication Date Title
US10264271B2 (en) Coded-block-flag coding and derivation
US20150229933A1 (en) Adaptive screen and video coding scheme
JP2017522839A (en) Alignment palette encoding
US8948530B2 (en) Adaptive image compression system and method
WO2021196029A1 (en) Method and device for encoding and decoding point cloud
WO2019085942A1 (en) Sao mode decision-making method, apparatus, electronic device and readable storage medium
JP2014531819A (en) Context-Adaptive Binary Arithmetic Coding Method and Apparatus for Syntax Element Context-Adaptive Binary Arithmetic Coding
WO2021062768A1 (en) Data encoding method, data decoding method, device, and storage medium
CN116193130B (en) Method and system for improving transmission efficiency of image data in network
WO2022188164A1 (en) Point cloud attribute decoding method and point cloud attribute encoding method
US9979969B2 (en) Method and system for image compression using image block characteristics
US11936850B2 (en) Methods for intra prediction, and encoder
TW202106013A (en) Clipping indices coding for adaptive loop filter in video coding
CN110944179B (en) Video data decoding method and device
CN112514397A (en) Point cloud encoding and decoding method and device
US20230351639A1 (en) Point cloud encoding and decoding method, encoder and decoder
US11006133B2 (en) Image compression technique
WO2021062771A1 (en) Color component prediction method, encoder, decoder, and computer storage medium
JP2015023506A (en) Image encoding apparatus and image decoding apparatus
GB2624835A (en) Point cloud data frames compression
CN115315950A (en) Global scaling of point cloud data
WO2024082153A1 (en) Encoding method, decoding method, code stream, encoder, decoder and storage medium
WO2022188070A1 (en) Image encoding method and apparatus, and image decoding method and apparatus
WO2023240662A1 (en) Encoding method, decoding method, encoder, decoder, and storage medium
WO2024011739A1 (en) Point cloud encoding method, point cloud decoding method, codec and computer storage medium

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180083707.1

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21929637

Country of ref document: EP

Kind code of ref document: A1