WO2024149182A1 - 变换系数编码方法、变换系数解码方法及终端 - Google Patents
变换系数编码方法、变换系数解码方法及终端 Download PDFInfo
- Publication number
- WO2024149182A1 WO2024149182A1 PCT/CN2024/071030 CN2024071030W WO2024149182A1 WO 2024149182 A1 WO2024149182 A1 WO 2024149182A1 CN 2024071030 W CN2024071030 W CN 2024071030W WO 2024149182 A1 WO2024149182 A1 WO 2024149182A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- coefficient
- order
- context probability
- decoding
- probability models
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/18—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
Definitions
- the present application belongs to the field of coding and decoding technology, and specifically relates to a transform coefficient encoding method, a transform coefficient decoding method and a terminal.
- Point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface attributes of a three-dimensional object or scene.
- attribute information encoding is involved. After the attribute information of point cloud is encoded to obtain transformation coefficients, the transformation coefficients are quantized, and then the quantized transformation coefficients are transformed and encoded to obtain the code stream.
- the embodiments of the present application provide a transform coefficient encoding method, a transform coefficient decoding method and a terminal, which can solve the problem of a large number of bits in a code stream generated by encoding.
- a transform coefficient encoding method comprising:
- the encoding end obtains the transformation coefficient corresponding to the point cloud;
- the transformation coefficient includes a direct current (DC) coefficient and at least two alternating current (AC) coefficients;
- the encoding end encodes the DC coefficient according to a first order corresponding to the DC coefficient and a context probability model corresponding to the DC coefficient;
- the encoding end encodes each AC coefficient according to a second order corresponding to each AC coefficient and a context probability model corresponding to each AC coefficient; the second order is determined based on the first order and an index of a coding point corresponding to the AC coefficient;
- the encoding end generates a target bit stream based on the encoding result of the DC coefficient and the encoding result of each AC coefficient.
- a transform coefficient decoding method comprising:
- the decoding end obtains a target code stream;
- the target code stream includes the encoding result of the DC coefficient in the transform coefficient and the encoding result of at least two AC coefficients in the transform coefficient;
- the decoding end decodes the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient to obtain the DC coefficient;
- the decoding end decodes the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient to obtain at least two AC coefficients; the second order is determined based on the first order and the index of the coding point corresponding to the AC coefficient, or based on the ratio information included in the attribute information parameter set of the target code stream;
- the decoding end determines a transform coefficient according to the DC coefficient and the at least two AC coefficients.
- a transform coefficient encoding device comprising:
- An acquisition module used to acquire transformation coefficients corresponding to the point cloud;
- the transformation coefficients include a direct current (DC) coefficient and at least two alternating current (AC) coefficients;
- a first encoding module configured to encode the DC coefficient according to a first order corresponding to the DC coefficient and a context probability model corresponding to the DC coefficient;
- a second encoding module configured to encode each AC coefficient according to a second order corresponding to each AC coefficient and a context probability model corresponding to each AC coefficient; the second order is determined based on the first order and an index of a coding point corresponding to the AC coefficient;
- a generating module is used to generate a target bit stream based on the encoding result of the DC coefficient and the encoding result of each AC coefficient.
- a transform coefficient decoding device comprising:
- a first acquisition module is used to acquire a target bit stream;
- the target bit stream includes an encoding result of a DC coefficient in a transform coefficient and an encoding result of at least two AC coefficients in the transform coefficient;
- a first decoding module configured to decode the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient, so as to obtain the DC coefficient;
- a second decoding module configured to decode the encoding result of each AC coefficient according to a second order corresponding to each AC coefficient and a context probability model corresponding to each AC coefficient, to obtain at least two AC coefficients; the second order is determined based on the first order and the index of the coding point corresponding to the AC coefficient, or based on the ratio information included in the attribute information parameter set of the target code stream;
- the first determination module is used to determine a transformation coefficient according to the DC coefficient and the at least two AC coefficients.
- a terminal which includes a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
- a readable storage medium on which a program or instruction is stored.
- the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
- a chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect, or to implement the method described in the second aspect.
- a computer program/program product is provided, wherein the computer program/program product is stored in a storage device.
- the computer program/program product is executed by at least one processor to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.
- the transformation coefficients corresponding to the point cloud are obtained; the transformation coefficients include a direct current (DC) coefficient and at least two alternating current (AC) coefficients; the DC coefficient is encoded according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient; each AC coefficient is encoded according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient; the second order is determined based on the index of the encoding point corresponding to the first order and the AC coefficient; based on the encoding result of the DC coefficient and the encoding result of each AC coefficient, a target bitstream is generated.
- DC direct current
- AC alternating current
- the transformation coefficient encoding method provided in the embodiment of the present application directly encodes the DC coefficient and the AC coefficient included in the transformation coefficient through the context probability model after obtaining the transformation coefficient, so that the transformation coefficient encoding of the transformation coefficient can be achieved through fewer context probability models, thereby reducing the number of bits of the bitstream.
- FIG1 is a partial schematic diagram of a G-PCC point cloud encoding device
- FIG2 is a schematic diagram of a partial framework of a G-PCC point cloud decoding device
- FIG3 is a schematic diagram of a flow chart of a transform coefficient encoding method provided in an embodiment of the present application.
- FIG4 is a schematic diagram of a flow chart of a transform coefficient decoding method provided in an embodiment of the present application.
- FIG5 is a structural diagram of a transform coefficient encoding device provided in an embodiment of the present application.
- FIG6 is a structural diagram of a transform coefficient decoding device provided in an embodiment of the present application.
- FIG7 is a structural diagram of a communication device provided in an embodiment of the present application.
- FIG8 is a schematic diagram of the hardware structure of a terminal provided in an embodiment of the present application.
- first, second, etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by “first” and “second” are generally of the same type, and the number of objects is not limited.
- the first object can be one or more.
- “and/or” in the specification and claims represents at least one of the connected objects, and the character “/" generally represents that the objects associated with each other are in an "or” relationship.
- the list construction device corresponding to the list construction method in the embodiment of the present application can be a terminal, which can also be called a terminal device or a user terminal (User Equipment, UE).
- the terminal can be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer) or a notebook computer, a personal digital assistant (Personal Digital Assistant, PDA), PDA, netbook, ultra-mobile personal computer (UMPC), mobile Internet device (MID), augmented reality (AR)/virtual reality (VR) equipment, robot, wearable device (Wearable Device) or vehicle-mounted equipment (VUE), pedestrian terminal (Pedestrian User Equipment, PUE), smart home (home equipment with wireless communication function, such as refrigerator, TV, washing machine or furniture, etc.), game console, personal computer (personal computer, PC), teller machine or self-service machine and other terminal side equipment, wearable devices include: smart watch, smart bracelet, smart headset, smart glasses, smart jewelry (smart bracelet, smart bracelet, smart ring, smart necklace, smart ankle
- a point cloud encoding device based on geometry point cloud compression can be used to encode the attribute information of the point cloud.
- the attribute information of the point cloud can be color converted and recolored, and then the attribute information after recoloring can be subjected to a regional adaptive transformation based on upsampling prediction based on the reconstructed geometry information, or a lifting transformation based on hierarchical structure division to obtain a transformation coefficient, and the transformation coefficient is quantized to obtain a quantization coefficient; finally, the quantization coefficient is arithmetically encoded to obtain an attribute bit stream.
- the operation steps of the above-mentioned regional adaptive transformation based on upsampling prediction include: constructing a transformation tree structure of the point cloud; then, performing upsampling prediction and regional adaptive transformation (RAHT) layer by layer from the root node of the transformation tree structure, if the current node is a root node, then directly performing RAHT transformation on the attribute information of the node to obtain the direct current (DC) coefficient and the alternating current (AC) coefficient; if the current node is not a root node, then judging whether to predict the current node according to the grandfather node and the parent node of the current node.
- RAHT regional adaptive transformation
- the attribute information of the current node is predicted to obtain the attribute prediction value, and then the attribute prediction value and the original attribute value of the current node are respectively RAHT transformed to calculate the AC coefficient residual; if the current node does not need to be predicted, then the original attribute value of the current node is directly RAHT transformed to obtain the AC coefficient.
- the operation steps of the above-mentioned lifting transformation based on hierarchical structure division include: first, hierarchically dividing the point cloud through level of detail division (Level of Detail, LoD) to establish a hierarchical structure of the point cloud;
- level of Detail, LoD level of Detail division
- the nodes at the bottom level and the nodes at the same level as the current node are used as reference points.
- the current node searches within the reference points, selects multiple nearest reference points as prediction reference points, and uses the reconstructed attribute values of these multiple prediction reference points to perform linear interpolation prediction; the predicted values are lifted and transformed.
- the above arithmetic coding includes zero-run coding and transform coefficient coding.
- the quantized transform coefficients are firstly subjected to zero-run coding, and then the transform coefficients are subjected to transform coefficient coding, so as to generate a bit stream.
- the implementation process of zero-run coding is briefly described below: (1)
- the context probability model 1 is used to determine whether the run (length) value of the transform coefficient is 0. If it is 0, a bit 0 is encoded and the current coding is terminated; if it is not 0, a bit 1 is encoded and the following determination is continued.
- the updated run value is encoded using the second-order exponential Golomb coding through the context probability model 5.
- the prefix code of the code stream is encoded by the first group of context probability models (including context probability model 3, context probability model 4 and context probability model 5), and the suffix code of the code stream is encoded by the second group of context probability models (including context probability model 6, context probability model 7 and context probability model 8).
- a point cloud decoding device based on geometry point cloud compression can be used to decode the attribute information of the point cloud.
- G-PCC geometry point cloud compression
- the implementation process of the above-mentioned G-PCC point cloud decoding device to decode the attribute information of the point cloud is the inverse process of its encoding process, and will not be repeated here. From the above content, it can be obtained that in the process of transform coefficient encoding, it is necessary to first encode the transform coefficient according to the numerical value through context probability model 1 and context probability model 2, and then encode the transform coefficient through two sets of context probability models. A large number of context probability models are needed to encode the transform coefficient, which results in a large number of bits in the bit stream generated by the encoding.
- the present application provides a transform coefficient coding method, which can be applied to the encoding end.
- the transform coefficient coding method provided by the embodiment of the present application is described in detail below through some embodiments and application scenarios in conjunction with the accompanying drawings.
- FIG. 3 is a flow chart of a transform coefficient encoding method according to an embodiment of the present application.
- the coefficient conversion encoding method comprises the following steps:
- the encoding end obtains the transformation coefficients corresponding to the point cloud.
- the above transformation coefficients are the transformation coefficients corresponding to the point cloud, that is, the quantized transformation coefficients obtained by performing a regional adaptive transformation based on upsampling prediction or a lifting transformation based on hierarchical structure division on the attribute information of the point cloud, wherein the transformation coefficients include DC coefficients and AC coefficients.
- the attribute information includes color information and reflectance information. If the transformation coefficient is obtained by performing a regional adaptive transformation based on upsampling prediction of the color information, or performing a lifting transformation based on hierarchical structure division, then it is determined that the transformation coefficient is determined based on the color information.
- the above-mentioned transformation coefficient includes a Y component, a U component and a V component.
- the transformation coefficient is obtained by performing a region adaptive transformation based on upsampling prediction of the reflectivity information, or performing a lifting transformation based on hierarchical structure division, it is determined that the transformation coefficient is determined based on the reflectivity information.
- the encoding end obtains the transformation coefficients corresponding to the point cloud, wherein the above-mentioned transformation coefficients include a DC coefficient and at least two AC coefficients.
- the encoding end encodes the DC coefficient according to a first order corresponding to the DC coefficient and a context probability model corresponding to the DC coefficient.
- the encoding end encodes the DC coefficient according to the context probability model corresponding to the first order and the DC coefficient.
- the specific implementation method please refer to the subsequent embodiments.
- S303 The encoding end encodes each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient.
- the second order may be determined based on the first order and the index of the coding point corresponding to the AC coefficient, and each AC coefficient may be encoded according to the second order and the context probability model corresponding to each AC coefficient.
- the encoding end generates a target bitstream based on the encoding result of the DC coefficient and the encoding result of each AC coefficient.
- the encoder After the encoder encodes the DC coefficient, a binary array is obtained, which can be understood as the encoding result of the DC coefficient; after the encoder encodes each AC coefficient, a binary array is obtained, which can be understood as the encoding result of the AC coefficient. In other words, the encoder generates the target bit stream by encoding the DC coefficient and the AC coefficient in one encoding process.
- the transform coefficient encoding method provided in the embodiment of the present application directly encodes the DC coefficient and AC coefficient included in the transform coefficients through the context probability model after obtaining the transform coefficients, so that the transform coefficient encoding of the transform coefficients can be achieved through fewer context probability models, thereby reducing the number of bits of the code stream.
- the DC coefficient is determined based on color information, and before encoding the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient, the method further includes:
- the first order corresponding to the DC coefficient is determined according to the Golomb order corresponding to at least part of the components of the DC coefficient.
- the first order corresponding to the DC coefficient can be determined based on the Golomb order corresponding to at least part of the component of the DC coefficient.
- the Golomb orders corresponding to the Y component, the U component and the V component of the DC coefficient are obtained respectively, and the Golomb order corresponding to any component is determined as the first order.
- determining the first order corresponding to the DC coefficient according to the Golomb order corresponding to at least part of the components of the DC coefficient comprises:
- the Golomb order with the highest occurrence frequency among the Golomb orders corresponding to each component is determined as the first order corresponding to the DC coefficient.
- the Golomb orders corresponding to the Y component, U component, and V component of the DC coefficient may be obtained.
- the logarithm of the Y component of the DC coefficient may be taken to obtain the Golomb order corresponding to the Y component.
- the Golomb order with the highest frequency among the three Golomb orders is then determined as the first order.
- the Golomb order corresponding to any component may be determined as the first order.
- determining the first order corresponding to the DC coefficient according to the Golomb order corresponding to at least part of the components of the DC coefficient comprises:
- the average value of the Golomb order corresponding to each component of the DC coefficient is rounded to obtain the first order corresponding to the DC coefficient.
- the average values of the three Golomb orders are rounded to obtain the first order:
- encoding the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient includes:
- the DC coefficient is Golomb coded by using a first set of context probability models and a second set of context probability models.
- the DC coefficient is obtained by performing a regional adaptive transformation based on upsampling prediction of the reflectivity information, or performing a lifting transformation based on hierarchical structure division
- the DC coefficient is Golomb encoded through a first set of context probability models and a second set of context probability models, wherein the coding order of the Golomb encoding of the DC coefficient is the same as the first order.
- the DC coefficient is obtained by performing a regional adaptive transformation based on upsampling prediction of color information, or by performing a lifting transformation based on hierarchical structure division
- the U component and the V component in the DC coefficient are Golomb encoded through the first set of context probability models
- the Y component in the DC coefficient is Golomb encoded through the second set of context probability models, wherein the coding order of the Golomb encoding of the DC coefficient is the same as the first order.
- the first group of context probability models includes multiple context probability models.
- the first group of context probability models includes multiple context probability models.
- the first group of context probability models includes 3 context probability models; the second group of context probability models includes multiple context probability models, and optionally, the second group of context probability models includes 3 context probability models.
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the DC coefficient is encoded by the first group of context probability models to generate a prefix code corresponding to the DC coefficient, and the DC coefficient is encoded by the second group of context probability models to generate a suffix code corresponding to the DC coefficient.
- high-order exponential Golomb coding is performed on the DC coefficient according to the first order, the first group of context probability models and the second group of context probability models, so as to reduce the number of bits of the code stream generated by the coding.
- the method before encoding each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient, the method further includes:
- the second order can be determined by the following formula:
- color_ExpGolomb_order_AC represents the second order
- color_ExpGolomb_order_DC represents the first order
- n represents the index of the code point
- voxelcnt represents the total number of code points
- knum represents the preset amplitude control parameter.
- the DC coefficient is determined based on color information, the DC coefficient includes a Y component, a U component, and a V component, and encoding the DC coefficient according to a first order corresponding to the DC coefficient and a context probability model corresponding to the DC coefficient includes:
- each component of the DC coefficient is Golomb coded by a first set of context probability models and a second set of context probability models.
- each component of the DC coefficient can be Golomb encoded through the first set of context probability models and the second set of context probability models.
- the first order corresponding to the DC coefficient is greater than the third preset value and less than or equal to the fourth preset value.
- the coding order of Golomb coding the Y component in the DC coefficient is the first order
- the coding order of Golomb coding the U component and the V component in the DC coefficient is 1.
- the coding order of Golomb coding of the U component and the V component in the DC coefficient is the difference between the first order and the fourth preset value, and the coding order of Golomb coding of the Y component in the DC coefficient is 1.
- Another possible situation is that the first order corresponding to the DC coefficient is less than or equal to the third preset value.
- the coding order of Golomb coding for each component of the DC coefficient is 1.
- the third preset value is 1, and the fourth preset value is 2.
- high-order exponential Golomb coding is performed on at least part of the components in the DC coefficient according to the first order, the first group of context probability models and the second group of context probability models, so as to reduce the number of bits of the code stream generated by the coding.
- the AC coefficient is determined based on color information, the AC coefficient includes a Y component, a U component, and a V component, and encoding each AC coefficient according to a second order corresponding to each AC coefficient and a context probability model corresponding to each AC coefficient includes:
- each component of the AC coefficient is Golomb coded by a first set of context probability models and a second set of context probability models.
- the first group of context probability models includes multiple context probability models, optionally, the context probability models include 3 context probability models; the second group of context probability models includes multiple context probability models, optionally, the second group of context probability models includes 3 context probability models.
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficients are encoded by the first group of context probability models to generate prefix codes corresponding to the AC coefficients, and the AC coefficients are encoded by the second group of context probability models to generate suffix codes corresponding to the AC coefficients.
- each component of the AC coefficient can be Golomb encoded using a first set of context probability models and a second set of context probability models.
- the second order corresponding to the AC coefficient is greater than the third preset value and less than or equal to the fourth preset value.
- the coding order of Golomb coding the Y component in the AC coefficient is the second order
- the coding order of Golomb coding the U component and the V component in the AC coefficient is 1.
- the second order corresponding to the AC coefficient is greater than the fourth preset value.
- the coding order of Golomb coding the U component and the V component in the AC coefficient is the difference between the second order and the fourth preset value, and the coding order of Golomb coding the Y component in the AC coefficient is 1.
- Another possible situation is that the second order corresponding to the AC coefficient is less than or equal to the third preset value.
- the coding order of Golomb coding for each component of the AC coefficient is 1.
- the third preset value is 1, and the fourth preset value is 2.
- high-order exponential Golomb coding is performed on at least part of the components in the AC coefficients according to the second order, the first group of context probability models and the second group of context probability models, so as to reduce the number of bits of the bit stream generated by the coding.
- the AC coefficient is determined based on color information, the AC coefficient includes a Y component, a U component, and a V component, and encoding each AC coefficient according to a second order corresponding to each AC coefficient and a context probability model corresponding to each AC coefficient includes:
- the Y component in the AC coefficient is Golomb coded using a second set of context probability models.
- the U component and the V component in the AC coefficient are Golomb encoded by a first set of context probability models
- the Y component in the AC coefficient is Golomb encoded by a second set of context probability models, wherein the coding order of the Golomb encoding of the AC coefficient is the same as the second order.
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficients are encoded by the first group of context probability models to generate prefix codes corresponding to the AC coefficients, and the AC coefficients are encoded by the second group of context probability models to generate suffix codes corresponding to the AC coefficients.
- high-order exponential Golomb coding is performed on the AC coefficients according to the second order, the first set of context probability models and the second set of context probability models, so as to reduce the number of bits of the code stream generated by the coding.
- the AC coefficient is determined based on reflectivity information, and encoding each AC coefficient according to a second order corresponding to each AC coefficient and a context probability model corresponding to each AC coefficient includes:
- Each AC coefficient is Golomb coded by the first set of context probability models and the second set of context probability models.
- the first group of context probability models includes multiple context probability models, optionally, the context probability models include 3 context probability models; the second group of context probability models includes multiple context probability models, optionally, the second group of context probability models includes 3 context probability models.
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficient can be Golomb encoded using a first set of context probability models and a second set of context probability models.
- the second order corresponding to the AC coefficient is greater than the fifth preset value.
- the coding order of Golomb coding of the AC coefficient is the same as the second order.
- Another possible situation is that the second order corresponding to the AC coefficient is less than or equal to the fifth preset value.
- the coding order of Golomb coding for the AC coefficient is 1.
- the fifth preset value is 1.
- high-order exponential Golomb coding is performed on the AC coefficients according to the second order, the first set of context probability models and the second set of context probability models, so as to reduce the number of bits of the code stream generated by the coding.
- the initial probability of the context probability model is a preset probability value.
- the initial probability of the context probability model is 0.5, that is, the number of bits required for the context probability model to encode 1 is the same as the number of bits required to encode 0, which makes the convergence speed of the arithmetic coding process slower and the coding efficiency lower.
- the user can customize the initial probability of the context probability model by modifying the relevant parameters of the encoder, so as to set the initial probability that conforms to the data distribution characteristics according to the data distribution law of the point cloud, thereby facilitating faster convergence of arithmetic coding and improving coding efficiency.
- the attribute information parameter set of the target code stream includes the first order and ratio information, and the ratio information is used to determine the second order.
- the first order can be represented by the parameter attr_golomb_num.
- the parameter is passed in the attribute information parameter set of the target bitstream, so that the decoder can decode the transform coefficients according to the parameter.
- the ratio information can also be passed in the attribute information parameter set, and the ratio information represents the range of the Golomb order.
- the decoder can determine the second order through the ratio information.
- encoding the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient includes:
- the DC coefficient is encoded according to a first order corresponding to the DC coefficient and a context probability model corresponding to the DC coefficient.
- the target identifier can also be obtained in the attribute information parameter set.
- the target identifier is a target value, it indicates that the encoding end enables the transform coefficient encoding method provided in the embodiment of the present application, that is, the step of encoding the DC coefficient by executing the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient.
- the target identifier is not a target value, it indicates that the encoding end enables the transform coefficient encoding method in the related art.
- the target value is 1, and the target flag can be represented as adaptiveExpGolombFlag.
- the target flag can be represented as adaptiveExpGolombFlag.
- Table 1 and Table 2 are used to characterize the bit rate ratio between the bit stream generated by the transform coefficient encoding provided by the embodiment of the present application and the bit stream generated using the related technology when the peak signal-to-noise ratio is the same. It should be understood that the lower the value, the more the bit rate is reduced.
- bit rate of the Y component generated by the transform coefficient encoding provided in the embodiment of the present application is reduced by 0.1% compared with the bit rate of the Y component generated using the related technology.
- FIG 4 is a schematic diagram of the flow chart of the transform coefficient decoding method provided in an embodiment of the present application.
- the transform coefficient decoding method provided in this embodiment includes the following steps:
- the decoding end obtains the target bit stream.
- the target code stream includes the encoding results of the direct current (DC) coefficients in the transform coefficients and the encoding results of at least two alternating current (AC) coefficients in the transform coefficients.
- DC direct current
- AC alternating current
- the decoding end decodes the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient to obtain the DC coefficient.
- the decoding end may decode the encoding result of the DC coefficient using the context probability model corresponding to the first order and the DC coefficient.
- the decoding end decodes the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient to obtain at least two AC coefficients.
- the decoding end may determine the second order based on the first order and the index of the coding point corresponding to the AC coefficient, or determine the second order based on the ratio information included in the attribute information parameter set of the target bitstream.
- the decoding end may determine the second order based on the first order and the index of the coding point corresponding to the AC coefficient, or determine the second order based on the ratio information included in the attribute information parameter set of the target bitstream.
- the decoding end decodes the encoding result of each AC coefficient according to the second order and the context probability model corresponding to each AC coefficient.
- the decoding end determines a transform coefficient according to the DC coefficient and the at least two AC coefficients.
- transform coefficient decoding method is the inverse process of the above-mentioned transform coefficient encoding method, which will not be repeated here.
- the method before decoding the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient, the method further includes:
- the first order is obtained from a property information parameter set of the target code stream.
- the decoder can obtain the first order from the attribute information parameter set.
- decoding the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient includes:
- the encoding result of the DC coefficient is subjected to Golomb decoding by using the first set of context probability models and the second set of context probability models.
- the decoding order of the Columbus decoding of the encoding result of the DC coefficient is the same as the first order.
- the first group of context probability models includes multiple context probability models, and optionally, the first group of context probability models includes 3 context probability models;
- the second group of context probability models includes multiple context probability models, and optionally, the second group of context probability models includes 3 context probability models.
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the method before decoding the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient, the method further includes:
- the difference between the first order and the first value is determined as the second order.
- the decoder may substitute the first order into the calculation formula involved in the above-mentioned encoder to determine the second order.
- the decoder calculates the second order in the same manner as the encoder, and will not be described again here.
- the method before decoding the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient, the method further includes:
- the second order is determined according to the ratio information and the total number of preset code points.
- the decoding end obtains proportion information from the attribute information parameter set.
- the proportion information is used to characterize the range of the Golomb order, and then the second order can be determined based on the relationship between the proportion information and the total number of preset coding points.
- the method before decoding the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient, the method further includes:
- a second order is determined according to the ratio information and the total number of the code points.
- the encoding end does not need to transmit the ratio information, and the decoding end determines the ratio information based on the ratio between the index of the coding point corresponding to the AC coefficient and the total number of preset coding points; and then determines the second order based on the ratio information and the total number of coding points.
- the DC coefficient is determined based on color information, the DC coefficient includes a Y component, a U component, and a V component, and decoding the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient includes:
- the encoding result of the DC coefficient is Columbus decoded through a first context probability model and a second context probability model.
- the encoding result of the DC coefficient can be Columbus decoded using the first set of context probability models and the second set of context probability models.
- a possible situation is that the first order corresponding to the DC coefficient is greater than the third preset value and less than or equal to the fourth preset value.
- the decoding order of Golomb decoding of the Y component in the DC coefficient is the first order
- the decoding order of Golomb decoding of the U component and the V component in the DC coefficient is 1.
- the decoding order of Golomb decoding of the U component and the V component in the DC coefficient is the difference between the first order and the fourth preset value, and the decoding order of Golomb decoding of the Y component in the DC coefficient is 1.
- Another possible situation is that the first order corresponding to the DC coefficient is less than or equal to the third preset value.
- the decoding order of Golomb decoding performed on each component of the DC coefficient is 1.
- the AC coefficient is determined based on color information
- the AC coefficient includes a Y component, a U component, and a V component
- the decoding of the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient includes:
- the encoding result of the AC coefficient is subjected to Golomb decoding through a first set of context probability models and a second set of context probability models.
- Golomb decoding can be performed on each component of the AC coefficient using the first set of context probability models and the second set of context probability models.
- the second order corresponding to the AC coefficient is greater than the third preset value and less than or equal to the fourth preset value.
- the decoding order of Golomb decoding of the Y component in the AC coefficient is the second order
- the decoding order of Golomb decoding of the U component and the V component in the AC coefficient is 1.
- the decoding order of Golomb decoding of the U component and the V component in the AC coefficient is the difference between the second order and the fourth preset value, and the decoding order of Golomb decoding of the Y component in the AC coefficient is 1.
- Another possible situation is that the second order corresponding to the AC coefficient is less than or equal to the third preset value.
- the decoding order of Golomb decoding performed on each component of the AC coefficient is 1.
- the third preset value is 1, and the fourth preset value is 2.
- the AC coefficient is determined based on color information
- the AC coefficient includes a Y component, a U component, and a V component
- the decoding of the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient includes:
- the encoding result of the AC coefficient is subjected to Golomb decoding by using the first set of context probability models and the second set of context probability models.
- the AC coefficient is determined based on reflectivity information, and decoding the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient includes:
- the encoding result of each AC coefficient is subjected to Golomb decoding by using the first set of context probability models and the second set of context probability models.
- the encoding result of the AC coefficient can be Columbus decoded using the first set of context probability models and the second set of context probability models.
- the decoding order of the Golomb decoding performed on the coding result of the AC coefficient is the same as the second order.
- Another possible situation is that the second order corresponding to the AC coefficient is less than or equal to the fifth preset value.
- the decoding order of performing Golomb decoding on the coding result of the AC coefficient is 1.
- the fifth preset value is 1.
- the initial probability of the context probability model is a preset probability value.
- the initial probability of the context probability model can be customized, so that the initial probability that conforms to the data distribution characteristics can be set according to the data distribution law of the point cloud, which facilitates faster convergence of arithmetic decoding and improves decoding efficiency.
- decoding the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient to obtain the DC coefficient includes:
- the encoding result of the DC coefficient is decoded according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient to obtain the DC coefficient.
- the decoding end obtains the target identifier in the attribute information parameter set, and the target identifier is the target value, it means that the decoding end enables the transform coefficient decoding method provided in the embodiment of the present application, that is, performs the step of decoding the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient. If the target identifier is not the target value, it means that the decoding end enables the transform coefficient decoding method in the related art.
- the target value is 1, and the target flag can be expressed as adaptiveExpGolombFlag.
- the transform coefficient coding method provided in the embodiment of the present application may be executed by a transform coefficient coding device.
- the transform coefficient coding device executing the transform coefficient coding method is taken as an example to illustrate the transform coefficient coding device provided in the embodiment of the present application.
- the embodiment of the present application further provides a transform coefficient encoding device 500, comprising:
- An acquisition module 501 is used to acquire transformation coefficients corresponding to the point cloud; the transformation coefficients include a direct current (DC) coefficient and at least two alternating current (AC) coefficients;
- DC direct current
- AC alternating current
- a first encoding module 502 configured to encode the DC coefficient according to a first order corresponding to the DC coefficient and a context probability model corresponding to the DC coefficient;
- a second encoding module 503, configured to encode each AC coefficient according to a second order corresponding to each AC coefficient and a context probability model corresponding to each AC coefficient; the second order is determined based on the first order and an index of a coding point corresponding to the AC coefficient;
- the generating module 504 is configured to generate a target bitstream based on the encoding result of the DC coefficient and the encoding result of each AC coefficient.
- the DC coefficient is determined based on color information
- the transform coefficient encoding device 500 further includes:
- the first determination module is used to determine a first order corresponding to the DC coefficient according to a Golomb order corresponding to at least a part of the components of the DC coefficient.
- the first determining module is specifically configured to:
- the Golomb order with the highest occurrence frequency among the Golomb orders corresponding to each component is determined as the first order corresponding to the DC coefficient.
- the first determining module is further specifically configured to:
- the average value of the Golomb order corresponding to each component of the DC coefficient is taken to obtain the value corresponding to the DC coefficient.
- First order number The average value of the Golomb order corresponding to each component of the DC coefficient is taken to obtain the value corresponding to the DC coefficient.
- the first encoding module 502 is specifically configured to:
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the transform coefficient encoding device 500 further includes:
- a second determining module configured to determine a difference between the first order and the first value as a second order
- the first value is the product of the second value and the preset amplitude control parameter
- the second value is the calculation result after performing logarithmic calculation on the third value
- the third value is the maximum value between the first preset value and the fourth value
- the fourth value is the multiplication result between the fifth value and the second preset value
- the fifth value is the division result between the index of the coding point and the total number of coding points.
- the DC coefficient is determined based on color information
- the DC coefficient includes a Y component, a U component and a V component
- the first encoding device 502 is further specifically configured to:
- each component of the DC coefficient is Golomb coded by a first set of context probability models and a second set of context probability models;
- the coding order of Golomb coding of the Y component in the DC coefficient is the first order, and the coding order of Golomb coding of the U component and the V component in the DC coefficient is 1; or,
- the coding order of Golomb coding of the U component and the V component in the DC coefficient is the difference between the first order and the fourth preset value, and the coding order of Golomb coding of the Y component in the DC coefficient is 1; or
- the coding order of Golomb coding performed on each component of the DC coefficient is 1;
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficient is determined based on color information
- the AC coefficient includes a Y component, a U component and a V component
- the second encoding module 503 is specifically configured to:
- the coding order of Golomb coding the Y component in the AC coefficient is the second order, and the coding order of Golomb coding the U component and the V component in the AC coefficient is 1; or,
- the coding order of Golomb coding of the U component and the V component in the AC coefficient is the difference between the second order and the fourth preset value, and the coding order of Golomb coding of the Y component in the AC coefficient is 1; or
- the coding order of Golomb coding performed on each component of the AC coefficient is 1;
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficient is determined based on color information
- the AC coefficient includes a Y component, a U component and a V component
- the second encoding module 503 is further specifically configured to:
- Golomb coding is performed on a U component and a V component in the AC coefficient by using a first group of context probability models; the coding order of the Golomb coding of the U component and the V component is the same as the second order, and the first group of context probability models includes a plurality of context probability models;
- the Y component in the AC coefficient is Golomb encoded through a second group of context probability models; the encoding order of the Golomb encoding of the Y component is the same as the second order, the second group of context probability models includes multiple context probability models, and the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficient is determined based on reflectivity information, and the second encoding module 503 is further specifically configured to:
- the coding order of Golomb coding performed on the AC coefficient is the same as the second order;
- the coding order of Golomb coding for the AC coefficient is 1;
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the initial probability of the context probability model is a preset probability value.
- the attribute information parameter set of the target code stream includes the first order and ratio information, and the ratio information is used to determine the second order.
- the first encoding module 502 is further specifically configured to:
- the DC coefficient is encoded according to a first order corresponding to the DC coefficient and a context probability model corresponding to the DC coefficient.
- the transform coefficient encoding method provided in the embodiment of the present application directly encodes the DC coefficient and AC coefficient included in the transform coefficients through the context probability model after obtaining the transform coefficients, so that the transform coefficient encoding of the transform coefficients can be achieved through fewer context probability models, thereby reducing the number of bits of the code stream.
- This device embodiment corresponds to the transform coefficient encoding method embodiment shown in FIG. 3 above. All implementation processes and implementation methods on the encoding end in the above method embodiment are applicable to this device embodiment and can achieve the same technical effect.
- the transform coefficient decoding method provided in the embodiment of the present application may be executed by a transform coefficient decoding device.
- the transform coefficient decoding device provided in the embodiment of the present application is described by taking the transform coefficient decoding method executed by the transform coefficient decoding device as an example.
- the embodiment of the present application further provides a transform coefficient decoding device 600, comprising:
- the first acquisition module 601 is used to acquire a target bit stream;
- the target bit stream includes the encoding result of the DC coefficient in the transform coefficient and the encoding result of at least two AC coefficients in the transform coefficient;
- a first decoding module 602 configured to decode the encoding result of the DC coefficient according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient, so as to obtain the DC coefficient;
- a second decoding module 603 is used to decode the encoding result of each AC coefficient according to the second order corresponding to each AC coefficient and the context probability model corresponding to each AC coefficient, so as to obtain at least two AC coefficients; the second order is determined based on the first order and the index of the coding point corresponding to the AC coefficient, or based on the ratio information included in the attribute information parameter set of the target code stream;
- the first determination module 604 is configured to determine a transform coefficient according to the DC coefficient and the at least two AC coefficients.
- the transform coefficient decoding device 600 further includes:
- the second acquisition module is used to acquire the first order from the attribute information parameter set of the target code stream.
- the first decoding module 602 is specifically configured to:
- the decoding order of Columbus decoding on the encoding result of the DC coefficient is the same as the first order
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the transform coefficient decoding device 600 further includes:
- a second determining module configured to determine a difference between the first order and the first value as a second order
- the first value is the product of the second value and the preset amplitude control parameter
- the second value is the calculation result of performing logarithmic calculation on the third value
- the third value is the maximum value between the first preset value and the fourth value
- the fourth value is the multiplication result between the fifth value and the second preset value
- the fifth value is the division result between the index of the current coding point corresponding to the AC coefficient and the total number of coding points.
- the DC coefficient is determined based on color information
- the DC coefficient includes a Y component, a U component and a V component
- the first decoding module 602 is further specifically configured to:
- the decoding order of Golomb decoding of the Y component in the DC coefficient is the first order, and the decoding order of Golomb decoding of the U component and the V component in the DC coefficient is 1; or,
- the decoding order of Golomb decoding of the U component and the V component in the DC coefficient is the difference between the first order and the fourth preset value, and the decoding order of Golomb decoding of the Y component in the DC coefficient is 1; or
- the decoding order of Golomb decoding performed on the encoding result of the DC coefficient is 1.
- the transform coefficient decoding device 600 further includes:
- a third acquisition module used to acquire the ratio information from the attribute information parameter set of the target bitstream
- the third determination module is used to determine the second order according to the ratio information and the total number of preset code points.
- the transform coefficient decoding device 600 further includes:
- a fourth determination module configured to determine ratio information according to a ratio between an index of a code point corresponding to the AC coefficient and a total number of preset code points
- a fifth determination module is used to determine a second order according to the ratio information and the total number of the encoding points.
- the AC coefficient is determined based on color information
- the AC coefficient includes a Y component, a U component and a V component
- the second decoding module 603 is specifically configured to:
- the decoding order of Golomb decoding of the Y component in the AC coefficient is the second order, and the decoding order of Golomb decoding of the U component and the V component in the AC coefficient is 1; or,
- the decoding order of Golomb decoding of the U component and the V component in the AC coefficient is the difference between the second order and the fourth preset value, and the decoding order of Golomb decoding of the Y component in the AC coefficient is 1; or
- the decoding order of performing Golomb decoding on the encoding result of the AC coefficient is 1;
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficient is determined based on color information
- the AC coefficient includes a Y component, a U component and a V component
- the second decoding module 603 is further specifically configured to:
- the decoding order of Columbus decoding on the encoding result of the AC coefficient is the same as the second order
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the AC coefficient is determined based on reflectivity information
- the second decoding module 603 is further specifically configured to:
- the decoding order of Golomb decoding performed on the encoding result of the AC coefficient is the same as the second order;
- the decoding order of performing Golomb decoding on the encoding result of the AC coefficient is 1;
- the first group of context probability models includes multiple context probability models
- the second group of context probability models includes multiple context probability models
- the multiple context probability models included in the second group of context probability models are different from the multiple context probability models included in the first group of context probability models.
- the initial probability of the context probability model is a preset probability value.
- the first decoding module 602 is further specifically configured to:
- the encoding result of the DC coefficient is decoded according to the first order corresponding to the DC coefficient and the context probability model corresponding to the DC coefficient to obtain the DC coefficient.
- the transform coefficient decoding device provided in the embodiment of the present application can implement the various processes implemented by the method embodiment of Figure 4 and achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the transform coefficient encoding device and the transform coefficient decoding device in the embodiment of the present application may be electronic devices, for example,
- the electronic device of the operating system may also be a component in the electronic device, such as an integrated circuit or a chip.
- the electronic device may be a terminal or other device other than a terminal.
- the terminal may include but is not limited to the types of terminals listed above, and other devices may be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiments of the present application.
- an embodiment of the present application also provides a communication device 700, including a processor 701 and a memory 702, and the memory 702 stores programs or instructions that can be executed on the processor 701.
- the communication device 700 is a terminal
- the program or instruction is executed by the processor 701 to implement the various steps of the above-mentioned transform coefficient encoding method embodiment, or to implement the various steps of the above-mentioned transform coefficient decoding method embodiment, and can achieve the same technical effect.
- the embodiment of the present application further provides a terminal, including a processor and a communication interface, wherein the processor is configured to perform the following operations:
- a target code stream is generated based on the encoding result of the DC coefficient and the encoding result of each AC coefficient.
- the processor is used to perform the following operations:
- a transform coefficient is determined based on the DC coefficient and the at least two AC coefficients.
- the terminal embodiment corresponds to the above-mentioned encoding end or decoding end method embodiment, and each implementation process and implementation mode of the above-mentioned method embodiment can be applied to the terminal embodiment and can achieve the same technical effect.
- Figure 8 is a schematic diagram of the hardware structure of a terminal implementing the embodiment of the present application.
- the terminal 800 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
- the terminal 800 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 810 through a power management system, so as to implement functions such as managing charging, discharging, and power consumption management through the power management system.
- a power source such as a battery
- the terminal structure shown in FIG8 does not constitute a limitation on the terminal, and the terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently, which will not be described in detail here.
- the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042.
- the graphics processing unit 8041 is used for the video capture mode or the image capture mode.
- the image data of the static picture or video obtained by the image capture device (such as a camera) is processed.
- the display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
- the user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072.
- the touch panel 8071 is also called a touch screen.
- the touch panel 8071 may include two parts: a touch detection device and a touch controller.
- Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
- the RF unit 801 after receiving downlink data from the network side device, the RF unit 801 can transmit the data to the processor 88 for processing; the RF unit 801 can send uplink data to the network side device.
- the RF unit 801 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
- the memory 809 can be used to store software programs or instructions and various data.
- the memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
- the memory 809 may include a volatile memory or a non-volatile memory, or the memory 809 may include both volatile and non-volatile memories.
- the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
- the volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM).
- the memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
- the processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 810.
- the processor 801 is used to perform the following operations:
- a target code stream is generated based on the encoding result of the DC coefficient and the encoding result of each AC coefficient.
- processor 801 is further configured to perform the following operations:
- a transform coefficient is determined based on the DC coefficient and the at least two AC coefficients.
- An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
- a program or instruction is stored.
- the various processes of the above-mentioned transform coefficient encoding method embodiment are implemented, or the various processes of the above-mentioned transform coefficient decoding method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
- the processor is the processor in the terminal described in the above embodiment.
- the readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
- An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned transform coefficient encoding method embodiment, or to implement the various processes of the above-mentioned transform coefficient decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
- An embodiment of the present application further provides a computer program/program product, which is stored in a storage medium, and is executed by at least one processor to implement the various processes of the above-mentioned transform coefficient encoding method embodiment, or to implement the various processes of the above-mentioned transform coefficient decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the disclosed part may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present application.
- a storage medium such as ROM/RAM, magnetic disk, optical disk
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请实施例提供了一种变换系数编码方法、变换系数解码方法及终端,属于编解码技术领域。上述变换系数编码方法包括:获取点云对应的变换系数;变换系数包括直流DC系数和至少两个交流AC系数(S301);根据DC系数对应的第一阶数和DC系数对应的上下文概率模型,对DC系数进行编码(S302);根据每个AC系数对应的第二阶数和每个AC系数对应的上下文概率模型,对每个AC系数进行编码;第二阶数基于第一阶数和AC系数对应的编码点的索引确定(S303);基于对DC系数的编码结果和对每个AC系数的编码结果,生成目标码流(S304)。
Description
相关申请的交叉引用
本申请主张在2023年1月11日在中国提交的中国专利申请No.202310039876.6的优先权,其全部内容通过引用包含于此。
本申请属于编解码技术领域,具体涉及一种变换系数编码方法、变换系数解码方法及终端。
点云是空间中一组无规则分布的、表达三维物体或场景的空间结构及表面属性的离散点集。在点云的编码过程中,涉及属性信息编码,在对点云进行属性信息编码得到变换系数之后,对变换系数进行量化,进而对量化后的变换系数进行变换系数编码,获得码流。
在相关技术中,需要使用数量较多的上下文概率模型对变换系数进行编码,这导致编码生成的码流的比特数较多。
发明内容
本申请实施例提供一种变换系数编码方法、变换系数解码方法及终端,能够解决编码生成的码流的比特数较多的问题。
第一方面,提供了一种变换系数编码方法,包括:
编码端获取点云对应的变换系数;所述变换系数包括直流DC系数和至少两个交流AC系数;
所述编码端根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码;
所述编码端根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定;
所述编码端基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
第二方面,提供了一种变换系数解码方法,包括:
解码端获取目标码流;所述目标码流包括变换系数中的直流DC系数的编码结果和所述变换系数中的至少两个交流AC系数的编码结果;
所述解码端根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数;
所述解码端根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定,或者基于目标码流的属性信息参数集包括的比例信息确定;
所述解码端根据所述DC系数和所述至少两个AC系数,确定变换系数。
第三方面,提供了一种变换系数编码装置,包括:
获取模块,用于获取点云对应的变换系数;所述变换系数包括直流DC系数和至少两个交流AC系数;
第一编码模块,用于根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码;
第二编码模块,用于根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定;
生成模块,用于基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
第四方面,提供了一种变换系数解码装置,包括:
第一获取模块,用于获取目标码流;所述目标码流包括变换系数中的直流DC系数的编码结果和所述变换系数中的至少两个交流AC系数的编码结果;
第一解码模块,用于根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数;
第二解码模块,用于根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定,或者基于目标码流的属性信息参数集包括的比例信息确定;
第一确定模块,用于根据所述DC系数和所述至少两个AC系数,确定变换系数。
第五方面,提供了一种终端,该终端包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第六方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第七方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法,或者实现如第二方面所述的方法。
第八方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存
储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
本申请实施例中,获取点云对应的变换系数;变换系数包括直流DC系数和至少两个交流AC系数;根据DC系数对应的第一阶数和DC系数对应的上下文概率模型,对DC系数进行编码;根据每个AC系数对应的第二阶数和每个AC系数对应的上下文概率模型,对每个AC系数进行编码;第二阶数基于第一阶数和AC系数对应的编码点的索引确定;基于对DC系数的编码结果和对每个AC系数的编码结果,生成目标码流。在相关技术中,需要在通过上下文概率模型根据变换系数的数值大小进行编码之后,再对变换系数进行编码;本申请实施例提供的变换系数编码方法相比于相关技术,在获取变换系数之后,直接通过上下文概率模型对变换系数包括的DC系数和AC系数进行变换系数编码,以此通过较少的上下文概率模型即可实现对变换系数的变换系数编码,进而降低了码流的比特数。
图1是G-PCC点云编码装置的部分框架示意图;
图2是G-PCC点云解码装置的部分框架示意图;
图3是本申请实施例提供的变换系数编码方法的流程示意图;
图4是本申请实施例提供的变换系数解码方法的流程示意图;
图5是本申请实施例提供的变换系数编码装置的结构图;
图6是本申请实施例提供的变换系数解码装置的结构图;
图7是本申请实施例提供的通信设备的结构图;
图8是本申请实施例提供的终端的硬件结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。
本申请实施例中的列表构建方法对应的列表构建装置可以为终端,该终端也可以称作终端设备或者用户终端(User Equipment,UE),终端可以是手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)或称为笔记本电脑、个人数字助理(Personal
Digital Assistant,PDA)、掌上电脑、上网本、超级移动个人计算机(ultra-mobile personal computer,UMPC)、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴式设备(Wearable Device)或车载设备(Vehicle User Equipment,VUE)、行人终端(Pedestrian User Equipment,PUE)、智能家居(具有无线通信功能的家居设备,如冰箱、电视、洗衣机或者家具等)、游戏机、个人计算机(personal computer,PC)、柜员机或者自助机等终端侧设备,可穿戴式设备包括:智能手表、智能手环、智能耳机、智能眼镜、智能首饰(智能手镯、智能手链、智能戒指、智能项链、智能脚镯、智能脚链等)、智能腕带、智能服装等。需要说明的是,在本申请实施例并不限定终端的具体类型。
为了方便理解,以下对本申请实施例涉及的一些内容进行说明:
请参阅图1,如图1所示,目前,在数字音视频编解码技术标准中,可以使用基于几何的点云压缩(Geometry Point Cloud Compression,G-PCC)点云编码装置对点云的属性信息进行编码。具体而言,可以对点云的属性信息进行颜色转换和重着色,进而基于重建几何信息对重着色后的属性信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换,获得变换系数,对变换系数进行量化得到量化系数;最后对量化系数进行算术编码,获得属性比特流。
其中,上述基于上采样预测的区域自适应变换的操作步骤包括:构建点云的变换树结构;然后,从变换树结构的根节点逐层进行上采样预测和区域自适应变换(Region Adaptive Harr Transform,RAHT),若当前节点为根节点,则直接对该节点的属性信息进行RAHT变换,获得直流(Direct Current,DC)系数和交流(Alternating Current,AC)系数;若当前节点不为根节点,则根据当前节点的祖父节点和父节点判断是否对当前节点进行预测。若需要对当前节点进行预测,则对当前节点的属性信息进行预测获得属性预测值,然后对当前节点的属性预测值和原始属性值分别进行RAHT变换,计算得到的AC系数残差;若不需要对当前节点进行预测,则直接对当前节点的原始属性值进行RAHT变换,获得AC系数。
其中,上述基于层级结构划分的提升变换的操作步骤包括:首先,通过细节层次划分(Level of Detail,LoD)对点云进行层次划分,建立点云的层级结构;
然后,将底层级的节点和与当前节点位于同一层级的节点作为参考点,当前节点在参考点内进行搜索,选择最近的多个参考点作为预测参考点,利用这多个预测参考点的重建属性值进行线性插值预测;对预测得到的预测值进行提升变换。
应理解,上述算术编码包括零游程编码和变换系数编码,先对量化后的变换系数进行零游程编码,再对变换系数进行变换系数编码,以此生成码流。以下简要阐述零游程编码的实施过程:(1)通过上下文概率模型1判断变换系数的游程(length)值是否为0,若为0,则编码一位0,结束当前编码;若不为0,则编码一位1,继续进行以下判断。
(2)通过上下文概率模型2判断变换系数的游程值是否为1,若为1,则编码一位0,
结束当前编码;若不为1,则编码一位1,继续进行以下判断。
(3)通过上下文概率模型3判断变换系数的游程值是否为2,若为2,则编码一位0,结束当前编码;若不为2,则编码一位1,继续进行以下判断。
(4)更新游程值,将游程值减3,获得更新后的游程值。
(5)对游程值除以2,获得前缀(prefix)值;
(6)通过上下文概率模型4对prefix值进行一元码编码;
判断prefix值是否为0,若为0,则编码一位0,并使用旁路编码方式编码游程值取2的余数;若不为0,则编码一位1,继续进行以下判断;
判断prefix值是否为1,若为1,则编码一位0,并使用旁路编码方式编码游程值取2的余数;若不为1,则编码一位1,继续进行以下判断;
判断prefix值是否为2,若为2,则编码一位0,并使用旁路编码方式编码游程值取2的余数;若不为2,则编码一位1,继续进行以下判断;
判断prefix值是否为3,若为3,则编码一位0,并使用旁路编码方式编码游程值取2的余数;若不为3,则编码一位1,结束本次编码。
(7)更新游程值,将游程值减8,获得更新后的游程值。
(8)通过上下文概率模型5,使用二阶指数哥伦布编码更新后的游程值。
以下简要阐述变换系数编码的实施过程:
(1)通过上下文概率模型1判断变换系数的数值(value)是否等于0,若为0,则结束编码;若不为0,则编码1,并继续以下编码;
(2)通过上下文概率模型1判断变换系数的数值(value)是否等于1,若为1,则结束编码;若不为1,则编码1,并继续以下编码;
(3)通过第一组上下文概率模型(包括上下文概率模型3、上下文概率模型4和上下文概率模型5)编码生成码流的前缀码,通过第二组上下文概率模型(包括上下文概率模型6、上下文概率模型7和上下文概率模型8)编码生成码流的后缀码。
请参阅图2,如图2所示,目前,在数字音视频编解码技术标准中,可以使用基于几何的点云压缩(Geometry Point Cloud Compression,G-PCC)点云解码装置对点云的属性信息进行解码。应理解,上述G-PCC点云解码装置对点云的属性信息进行解码的实施过程为其编码过程的逆过程,在此不做重复阐述。从上述内容中可以得到,在变换系数编码的过程中,需要先通过上下文概率模型1和上下文概率模型2根据变换系数的数值进行编码,再通过两组上下文概率模型对变换系数进行编码,需要使用数量较多的上下文概率模型对变换系数进行编码,这导致编码生成的码流的比特数较多。
为了解决上述存在的技术问题,本申请提供了一种变换系数编码方法,该变换系数编码方法可以应用于编码端。下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的变换系数编码方法进行详细地说明。
请参阅图3,图3是本申请实施例中变换系数编码方法的流程图。本实施例提供的变
换系数编码方法包括以下步骤:
S301,编码端获取点云对应的变换系数。
上述变换系数为点云对应的变换系数,即对点云的属性信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的量化后的变换系数。其中,变换系数包括DC系数和AC系数。
应理解,属性信息包括颜色信息和反射率信息,若变换系数是颜色信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则确定该变换系数是基于颜色信息确定的。上述变换系数包括Y分量、U分量和V分量。
若变换系数是反射率信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则确定该变换系数是基于反射率信息确定的。
本步骤中,编码端获取点云对应的变换系数,其中,上述变换系数包括DC系数和至少两个AC系数。
S302,所述编码端根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码。
本步骤中,编码端根据第一阶数和DC系数对应的上下文概率模型,对DC系数进行编码,具体的实施方式,请参阅后续实施例。
S303,所述编码端根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码。
本步骤中,可以基于第一阶数和AC系数对应的编码点的索引确定第二阶数,并根据上述第二阶数和每个AC系数对应的上下文概率模型,对每个AC系数进行编码。
S304,所述编码端基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
编码端对DC系数进行编码之后,得到二进制数组,上述二进制数组可以理解为是DC系数的编码结果;编码端对每个AC系数进行编码之后,得到二进制数组,上述二进制数组可以理解为是AC系数的编码结果。也就是说,编码端在一次编码过程中通过对DC系数和AC系数进行编码,生成目标码流。
在相关技术中,需要在通过上下文概率模型根据变换系数的数值大小进行编码之后,再对变换系数进行编码;本申请实施例提供的变换系数编码方法相比于相关技术,在获取变换系数之后,直接通过上下文概率模型对变换系数包括的DC系数和AC系数进行变换系数编码,以此通过较少的上下文概率模型即可实现对变换系数的变换系数编码,进而降低了码流的比特数。
可选地,所述DC系数是基于颜色信息确定的,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码之前,所述方法还包括:
根据所述DC系数的至少部分分量对应的哥伦布阶数,确定所述DC系数对应的第一阶数。
本实施例中,若变换系数是颜色信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则可以根据DC系数的至少部分分量对应的哥伦布阶数,确定DC系数对应的第一阶数。
可选地,获取DC系数的Y分量、U分量和V分量分别对应的哥伦布阶数,将任一分量对应的哥伦布阶数确定为第一阶数。
可选地,所述根据所述DC系数的至少部分分量对应的哥伦布阶数,确定所述DC系数对应的第一阶数包括:
获取所述DC系数的每个分量对应的哥伦布阶数;
将所述每个分量对应的哥伦布阶数中出现频率最高的哥伦布阶数,确定为所述DC系数对应的第一阶数。
本实施例中,可以获取DC系数的Y分量、U分量和V分量分别对应的哥伦布阶数,例如,可以对DC系数的Y分量取log2的对数,获得Y分量对应的哥伦布阶数。进而将3个哥伦布阶数中出现频率最高的哥伦布阶数,确定为第一阶数。
在一实施例中,若每个分量对应的哥伦布阶数的出现频率相同,则可以将任一分量对应的哥伦布阶数确定为第一阶数。
可选地,所述根据所述DC系数的至少部分分量对应的哥伦布阶数,确定所述DC系数对应的第一阶数包括:
获取DC系数的每个分量对应的哥伦布阶数;
对所述DC系数的每个分量对应的哥伦布阶数的平均值取整,获得所述DC系数对应的第一阶数。
本实施例中,在获取到DC系数的Y分量、U分量和V分量分别对应的哥伦布阶数之后,对这3个哥伦布阶数的平均值取整,获得第一阶数
可选地,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码包括:
通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数进行哥伦布编码。
本实施例中,若DC系数是反射率信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则通过第一组上下文概率模型和第二组上下文概率模型,对DC系数进行哥伦布编码,其中,对DC系数进行哥伦布编码的编码阶数与第一阶数相同。
若DC系数是颜色信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则通过第一组上下文概率模型对DC系数中的U分量和V分量进行哥伦布编码,通过第二组上下文概率模型对DC系数中的Y分量进行哥伦布编码,其中,对DC系数进行哥伦布编码的编码阶数与第一阶数相同。
需要说明的是,上述第一组上下文概率模型包括多个上下文概率模型,可选地,上述
第一组上下文概率模型包括3个上下文概率模型;上述第二组上下文概率模型包括多个上下文概率模型,可选地,上述第二组上下文概率模型包括3个上下文概率模型。
需要说明的是,第二组上下文概率模型包括的多个上下文概率模型与第一组上下文概率模型包括的多个上下文概率模型不同,通过第一组上下文概率模型对DC系数进行编码,生成DC系数对应的前缀码,通过第二组上下文概率模型对DC系数进行编码,生成DC系数对应的后缀码。
本实施例中,根据第一阶数、第一组上下文概率模型和第二组上下文概率模型对DC系数进行高阶指数哥伦布编码,以此降低编码产生的码流的比特数。
可选地,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码之前,所述方法还包括:
将所述第一阶数与第一数值之间的差值,确定为第二阶数;
本实施例中,可以通过以下公式确定第二阶数:
其中,color_ExpGolomb_order_AC表示第二阶数,color_ExpGolomb_order_DC表示第一阶数,n表示编码点的索引,voxelcnt表示编码点的总数量,knum表示预设的幅度控制参数。
可选地,所述DC系数是基于颜色信息确定的,所述DC系数包括Y分量、U分量和V分量,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码包括:
根据所述DC系数对应的第一阶数,确定对所述DC系数的每个分量进行哥伦布编码的编码阶数;
基于所述编码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数的每个分量进行哥伦布编码。
本实施例中,若DC系数是颜色信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则在确定DC系数对应的第一阶数之后,可以通过第一组上下文概率模型和第二组上下文概率模型,对DC系数的每个分量进行哥伦布编码。
一种可能存在的情况为,DC系数对应的第一阶数大于第三预设值,且小于或等于第四预设值。这种情况下,对DC系数中的Y分量进行哥伦布编码的编码阶数为第一阶数,对DC系数中的U分量和V分量进行哥伦布编码的编码阶数为1。
另一种可能存在的情况为,DC系数对应的第一阶数大于第四预设值。这种情况下,对DC系数中的U分量和V分量进行哥伦布编码的编码阶数为第一阶数与第四预设值之间的差值,对所述DC系数中的Y分量进行哥伦布编码的编码阶数为1。
另一种可能存在的情况为,DC系数对应的第一阶数小于或等于第三预设值。这种情况下,对DC系数的每个分量进行哥伦布编码的编码阶数为1。
可选地,上述第三预设值为1,第四预设值为2。
本实施例中,根据第一阶数、第一组上下文概率模型和第二组上下文概率模型对DC系数中的至少部分分量进行高阶指数哥伦布编码,以此降低编码产生的码流的比特数。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码包括:
根据每个AC系数对应的第二阶数,确定对所述AC系数的每个分量进行哥伦布编码的编码阶数;
基于所述编码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的每个分量进行哥伦布编码。
如上所述,第一组上下文概率模型包括多个上下文概率模型,可选地,上下文概率模型包括3个上下文概率模型;第二组上下文概率模型包括多个上下文概率模型,可选地,第二组上下文概率模型包括3个上下文概率模型。
需要说明的是,第二组上下文概率模型包括的多个上下文概率模型与第一组上下文概率模型包括的多个上下文概率模型不同,通过第一组上下文概率模型对AC系数进行编码,生成AC系数对应的前缀码,通过第二组上下文概率模型对AC系数进行编码,生成AC系数对应的后缀码。
本实施例中,若AC系数是颜色信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则可以通过第一组上下文概率模型和第二组上下文概率模型,对AC系数的每个分量进行哥伦布编码。
一种可能存在的情况为,AC系数对应的第二阶数大于第三预设值,且小于或等于第四预设值。这种情况下,对AC系数中的Y分量进行哥伦布编码的编码阶数为第二阶数,对AC系数中的U分量和V分量进行哥伦布编码的编码阶数为1。
另一种可能存在的情况为,AC系数对应的第二阶数大于第四预设值。这种情况下,对AC系数中的U分量和V分量进行哥伦布编码的编码阶数为第二阶数与第四预设值之间的差值,对所述AC系数中的Y分量进行哥伦布编码的编码阶数为1。
另一种可能存在的情况为,AC系数对应的第二阶数小于或等于第三预设值。这种情况下,对AC系数的每个分量进行哥伦布编码的编码阶数为1。
可选地,上述第三预设值为1,第四预设值为2。
本实施例中,根据第二阶数、第一组上下文概率模型和第二组上下文概率模型对AC系数中的至少部分分量进行高阶指数哥伦布编码,以此降低编码产生的码流的比特数。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码包括:
通过第一组上下文概率模型,对所述AC系数中的U分量和V分量进行哥伦布编码;
通过第二组上下文概率模型,对所述AC系数中的Y分量进行哥伦布编码。
本实施例中,通过第一组上下文概率模型对AC系数中的U分量和V分量进行哥伦布编码,通过第二组上下文概率模型对AC系数中的Y分量进行哥伦布编码,其中,对AC系数进行哥伦布编码的编码阶数与第二阶数相同。
需要说明的是,第二组上下文概率模型包括的多个上下文概率模型与第一组上下文概率模型包括的多个上下文概率模型不同,通过第一组上下文概率模型对AC系数进行编码,生成AC系数对应的前缀码,通过第二组上下文概率模型对AC系数进行编码,生成AC系数对应的后缀码。
本实施例中,根据第二阶数、第一组上下文概率模型和第二组上下文概率模型对AC系数进行高阶指数哥伦布编码,以此降低编码产生的码流的比特数。
可选地,所述AC系数是基于反射率信息确定的,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码包括:
通过第一组上下文概率模型和第二组上下文概率模型对每个AC系数进行哥伦布编码。
如上所述,第一组上下文概率模型包括多个上下文概率模型,可选地,上下文概率模型包括3个上下文概率模型;第二组上下文概率模型包括多个上下文概率模型,可选地,第二组上下文概率模型包括3个上下文概率模型。第二组上下文概率模型包括的多个上下文概率模型与第一组上下文概率模型包括的多个上下文概率模型不同。
本实施例中,若AC系数是反射率信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则可以通过第一组上下文概率模型和第二组上下文概率模型,对AC系数进行哥伦布编码。
一种可能存在的情况为,AC系数对应的第二阶数大于第五预设值。这种情况下,对AC系数进行哥伦布编码的编码阶数与第二阶数相同。
另一种可能存在的情况为,AC系数对应的第二阶数小于或等于第五预设值。这种情况下,对AC系数进行哥伦布编码的编码阶数为1。
可选地,上述第五预设值为1。
本实施例中,根据第二阶数、第一组上下文概率模型和第二组上下文概率模型对AC系数进行高阶指数哥伦布编码,以此降低编码产生的码流的比特数。
可选地,所述上下文概率模型的初始概率为预设概率值。
应理解,在相关技术中,上下文概率模型的初始概率均为0.5,即上下文概率模型编码1所需要的比特数和编码0所需要的比特数是相同的,这使得算术编码过程的收敛速度较慢,编码效率较低。
本实施例中,用户可以通过修改编码器的相关参数,自定义设置上下文概率模型的初始概率,以此可以根据点云的数据分布规律,设置符合数据分布特性的初始概率,便于算术编码更快的收敛,提高编码效率。
可选地,所述目标码流的属性信息参数集包括所述第一阶数和比例信息,所述比例信息用于确定第二阶数。
可选地,上述第一阶数可以采用attr_golomb_num这一参数表示。本实施例中,在目标码流的属性信息参数集中传入该参数,便于解码端根据该参数进行变换系数解码。同时,还可以在属性信息参数集中传入比例信息,该比例信息表征哥伦布阶数的范围,解码端可以通过该比例信息确定第二阶数。
可选地,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码包括:
获取目标标识;
在所述目标标识为目标值的情况下,根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码。
本实施例中,还可以在属性信息参数集中获取目标标识,在目标标识为目标值的情况下,表示编码端启用本申请实施例提供的变换系数编码方法,即执行DC系数对应的第一阶数和DC系数对应的上下文概率模型,对DC系数进行编码的步骤。在目标标识不为目标值的情况下,表示编码端启用相关技术中的变换系数编码方法。
可选地,上述目标值为1,上述目标标识可以表示为adaptiveExpGolombFlag。为更为直观的理解本申请实施例提供的变换系数编码的技术效果,请参阅表一和表二。
表一:
表二:
其中,表一和表二中的数值用于表征在峰值信噪比相同的情况下,本申请实施例提供的变换系数编码生成的码流与使用相关技术生成的码流之间的码率比,应理解,数值越低表示降低的码率越多。
例如,表一中第二行第二列的“-0.1%”表示本申请实施例提供的变换系数编码生成的Y分量对应的码流相较于使用相关技术生成的Y分量对应的码流,降低了0.1%的码率。
请参阅图4,图4是本申请实施例提供的变换系数解码方法的流程示意图。本实施例提供的变换系数解码方法包括以下步骤:
S401,解码端获取目标码流。
上述目标码流包括变换系数中的直流DC系数的编码结果和变换系数中的至少两个交流AC系数的编码结果。
S402,所述解码端根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数。
本步骤中,解码端可以第一阶数和DC系数对应的上下文概率模型,对DC系数的编码结果进行解码。
S403,所述解码端根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数。
本步骤中,解码端可以基于第一阶数和AC系数对应的编码点的索引确定第二阶数,或者基于目标码流的属性信息参数集包括的比例信息确定第二阶数,具体的实施方式请参阅后续实施例。
解码端根据第二阶数和每个AC系数对应的上下文概率模型,对每个AC系数的编码结果进行解码。
S404,所述解码端根据所述DC系数和所述至少两个AC系数,确定变换系数。
应理解,本实施例提供的变换系数解码方法是上述变换系数编码方法的逆过程,在此不做重复阐述。
可选地,所述根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码之前,所述方法还包括:
从所述目标码流的属性信息参数集中获取所述第一阶数。
如上所述,由于编码端在属性信息参数中传入了第一阶数,因此解码端可以从属性信息参数集中获取该第一阶数。
可选地,所述根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码包括:
通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数的编码结果进行哥伦布解码。
应理解,对DC系数的编码结果进行哥伦布解码的解码阶数与第一阶数相同。如上所述,第一组上下文概率模型包括多个上下文概率模型,可选地,第一组上下文概率模型包括3个上下文概率模型;第二组上下文概率模型包括多个上下文概率模型,可选地,第二组上下文概率模型包括3个上下文概率模型。第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码之前,所述方法还包括:
将所述第一阶数与第一数值之间的差值,确定为第二阶数。
一种可选地实施方式为,解码端可以将第一阶数代入上述编码端涉及到的计算公式中,确定第二阶数。解码端计算第二阶数的方式与编码端一致,在此不做重复阐述。
可选地,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码之前,所述方法还包括:
从所述目标码流的属性信息参数集中获取比例信息;
根据所述比例信息和预设的编码点的总数量,确定第二阶数。
另一种可选地实施方式为,解码端从属性信息参数集中获取比例信息,如上所述,该比例信息用于表征哥伦布阶数的范围,进而根据比例信息和预设的编码点的总数量的关系,即可确定第二阶数。
可选地,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码之前,所述方法还包括:
根据所述AC系数对应的编码点的索引和预设的编码点的总数量之间的比值,确定比例信息;
根据所述比例信息和所述编码点的总数量,确定第二阶数。
本实施例中,编码端不用传输比例信息,解码端根据AC系数对应的编码点的索引和预设的编码点的总数量之间的比值,确定比例信息;进而根据比例信息和编码点的总数量,确定第二阶数。
可选地,所述DC系数是基于颜色信息确定的,所述DC系数包括Y分量、U分量和V分量,所述根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码包括:
根据每个DC系数对应的第一阶数,确定对所述DC系数的每个分量进行哥伦布解码的解码阶数;
基于所述解码阶数,通过第一上下文概率模型和第二上下文概率模型,对所述DC系数的编码结果进行哥伦布解码。
本实施例中,若DC系数是颜色信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则可以通过第一组上下文概率模型和第二组上下文概率模型,对DC系数的编码结果进行哥伦布解码。
一种可能存在的情况为,DC系数对应的第一阶数大于第三预设值,且小于或等于第四预设值。这种情况下,对DC系数中的Y分量进行哥伦布解码的解码阶数为第一阶数,对DC系数中的U分量和V分量进行哥伦布解码的解码阶数为1。
另一种可能存在的情况为,DC系数对应的第一阶数大于第四预设值。这种情况下,对DC系数中的U分量和V分量进行哥伦布解码的解码阶数为第一阶数与第四预设值之间的差值,对所述DC系数中的Y分量进行哥伦布解码的解码阶数为1。
另一种可能存在的情况为,DC系数对应的第一阶数小于或等于第三预设值。这种情况下,对DC系数的每个分量进行哥伦布解码的解码阶数为1。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码包括:
根据每个AC系数对应的第二阶数,确定对所述AC系数的编码结果进行哥伦布解码
的解码阶数;
基于所述解码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的编码结果进行哥伦布解码。
本实施例中,若AC系数是颜色信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则可以通过第一组上下文概率模型和第二组上下文概率模型,对AC系数的每个分量进行哥伦布解码。
一种可能存在的情况为,AC系数对应的第二阶数大于第三预设值,且小于或等于第四预设值。这种情况下,对AC系数中的Y分量进行哥伦布解码的解码阶数为第二阶数,对AC系数中的U分量和V分量进行哥伦布解码的解码阶数为1。
另一种可能存在的情况为,AC系数对应的第二阶数大于第四预设值。这种情况下,对AC系数中的U分量和V分量进行哥伦布解码的解码阶数为第二阶数与第四预设值之间的差值,对所述AC系数中的Y分量进行哥伦布解码的解码阶数为1。
另一种可能存在的情况为,AC系数对应的第二阶数小于或等于第三预设值。这种情况下,对AC系数的每个分量进行哥伦布解码的解码阶数为1。
可选地,上述第三预设值为1,第四预设值为2。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码包括:
通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的编码结果进行哥伦布解码。
应理解,对AC系数的编码结果进行哥伦布解码的解码阶数与第二阶数相同。
可选地,所述AC系数是基于反射率信息确定的,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码包括:
通过第一组上下文概率模型和第二组上下文概率模型对每个AC系数的编码结果进行哥伦布解码。
本实施例中,若AC系数是反射率信息进行基于上采样预测的区域自适应变换,或者进行基于层级结构划分的提升变换获得的,则可以通过第一组上下文概率模型和第二组上下文概率模型,对AC系数的编码结果进行哥伦布解码。
一种可能存在的情况为,AC系数对应的第二阶数大于第五预设值。这种情况下,对AC系数的编码结果进行哥伦布解码的解码阶数与第二阶数相同。
另一种可能存在的情况为,AC系数对应的第二阶数小于或等于第五预设值。这种情况下,对AC系数的编码结果进行哥伦布解码的解码阶数为1。
可选地,上述第五预设值为1。
可选地,所述上下文概率模型的初始概率为预设概率值。
本实施例中,可以自定义设置上下文概率模型的初始概率,以此可以根据点云的数据分布规律,设置符合数据分布特性的初始概率,便于算术解码更快的收敛,提高解码效率。
可选地,所述根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数包括:
获取目标标识;
在所述目标标识为目标值的情况下,根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数。
本实施例中,若解码端在属性信息参数集中获取到目标标识,且目标标识为目标值,表示解码端启用本申请实施例提供的变换系数解码方法,即执行根据DC系数对应的第一阶数和DC系数对应的上下文概率模型,对DC系数的编码结果进行解码的步骤。若目标标识不为目标值,表示解码端启用相关技术中的变换系数解码方法。
可选地,上述目标值为1,上述目标标识可以表示为adaptiveExpGolombFlag。
本申请实施例提供的变换系数编码方法,执行主体可以为变换系数编码装置。本申请实施例中以变换系数编码装置执行变换系数编码方法为例,说明本申请实施例提供的变换系数编码装置。
如图5所示,本申请实施例还提供了一种变换系数编码装置500,包括:
获取模块501,用于获取点云对应的变换系数;所述变换系数包括直流DC系数和至少两个交流AC系数;
第一编码模块502,用于根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码;
第二编码模块503,用于根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定;
生成模块504,用于基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
可选地,所述DC系数是基于颜色信息确定的,所述变换系数编码装置500还包括:
第一确定模块,用于根据所述DC系数的至少部分分量对应的哥伦布阶数,确定所述DC系数对应的第一阶数。
可选地,所述第一确定模块,具体用于:
获取所述DC系数的每个分量对应的哥伦布阶数;
将所述每个分量对应的哥伦布阶数中出现频率最高的哥伦布阶数,确定为所述DC系数对应的第一阶数。
可选地,所述第一确定模块,还具体用于:
获取DC系数的每个分量对应的哥伦布阶数;
所述DC系数的每个分量对应的哥伦布阶数的平均值取整,获得所述DC系数对应的
第一阶数。
可选地,所述第一编码模块502,具体用于:
通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数进行哥伦布编码;
其中,对所述DC系数进行哥伦布编码的编码阶数与所述第一阶数相同;
所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述变换系数编码装置500还包括:
第二确定模块,用于将所述第一阶数与第一数值之间的差值,确定为第二阶数;
其中,所述第一数值为第二数值与预设的幅度控制参数之间的乘积,所述第二数值为对第三数值执行对数计算后的计算结果,所述第三数值为第一预设值与第四数值之间的最大值,所述第四数值为第五数值与第二预设值之间的乘法结果,所述第五数值为所述编码点的索引与编码点的总数量之间的除法结果。
可选地,所述DC系数是基于颜色信息确定的,所述DC系数包括Y分量、U分量和V分量,所述第一编码装置502,还具体用于:
根据所述DC系数对应的第一阶数,确定对所述DC系数的每个分量进行哥伦布编码的编码阶数;
基于所述编码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数的每个分量进行哥伦布编码;
其中,在所述DC系数对应的第一阶数大于第三预设值,且小于或等于第四预设值的情况下,对DC系数中的Y分量进行哥伦布编码的编码阶数为所述第一阶数,对所述DC系数中的U分量和V分量进行哥伦布编码的编码阶数为1;或,
在所述DC系数对应的第一阶数大于第四预设值的情况下,对所述DC系数中的U分量和V分量进行哥伦布编码的编码阶数为所述第一阶数与所述第四预设值之间的差值,对所述DC系数中的Y分量进行哥伦布编码的编码阶数为1;或,
在所述DC系数对应的第一阶数小于或等于第三预设值的情况下,对所述DC系数的每个分量进行哥伦布编码的编码阶数为1;
所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述第二编码模块503,具体用于:
根据每个AC系数对应的第二阶数,确定对所述AC系数的每个分量进行哥伦布编码的编码阶数;
基于所述编码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的每个分量进行哥伦布编码;
其中,在所述AC系数对应的第二阶数大于第三预设值,且小于或等于第四预设值的情况下,对AC系数中的Y分量进行哥伦布编码的编码阶数为所述第二阶数,对所述AC系数中的U分量和V分量进行哥伦布编码的编码阶数为1;或,
在所述AC系数对应的第二阶数大于第四预设值的情况下,对所述AC系数中的U分量和V分量进行哥伦布编码的编码阶数为所述第二阶数与所述第四预设值之间的差值,对所述AC系数中的Y分量进行哥伦布编码的编码阶数为1;或,
在所述AC系数对应的第二阶数小于或等于第三预设值的情况下,对所述AC系数的每个分量进行哥伦布编码的编码阶数为1;
所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述第二编码模块503,还具体用于:
通过第一组上下文概率模型,对所述AC系数中的U分量和V分量进行哥伦布编码;对所述U分量和V分量进行哥伦布编码的编码阶数与所述第二阶数相同,所述第一组上下文概率模型包括多个上下文概率模型;
通过第二组上下文概率模型,对所述AC系数中的Y分量进行哥伦布编码;对所述Y分量进行哥伦布编码的编码阶数与所述第二阶数相同,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述AC系数是基于反射率信息确定的,所述第二编码模块503,还具体用于:
通过第一组上下文概率模型和第二组上下文概率模型对每个AC系数进行哥伦布编码;
其中,在AC系数对应的第二阶数大于第五预设值的情况下,对所述AC系数进行哥伦布编码的编码阶数与所述第二阶数相同;或,
在AC系数对应的第二阶数小于或等于第五预设值的情况下,对所述AC系数进行哥伦布编码的编码阶数为1;
所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述上下文概率模型的初始概率为预设概率值。
可选地,所述目标码流的属性信息参数集包括所述第一阶数和比例信息,所述比例信息用于确定第二阶数。
可选地,所述第一编码模块502,还具体用于:
获取目标标识;
在所述目标标识为目标值的情况下,根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码。
在相关技术中,需要在通过上下文概率模型根据变换系数的数值大小进行编码之后,再对变换系数进行编码;本申请实施例提供的变换系数编码方法相比于相关技术,在获取变换系数之后,直接通过上下文概率模型对变换系数包括的DC系数和AC系数进行变换系数编码,以此通过较少的上下文概率模型即可实现对变换系数的变换系数编码,进而降低了码流的比特数。
该装置实施例与上述图3所示的变换系数编码方法实施例对应,上述方法实施例中关于编码端的各个实施过程和实现方式均可适用于该装置实施例中,且能达到相同的技术效果。
本申请实施例提供的变换系数解码方法,执行主体可以为变换系数解码装置。本申请实施例中以变换系数解码装置执行变换系数解码方法为例,说明本申请实施例提供的变换系数解码装置。
如图6所示,本申请实施例还提供了一种变换系数解码装置600,包括:
第一获取模块601,用于获取目标码流;所述目标码流包括变换系数中的直流DC系数的编码结果和所述变换系数中的至少两个交流AC系数的编码结果;
第一解码模块602,用于根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数;
第二解码模块603,用于根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定,或者基于目标码流的属性信息参数集包括的比例信息确定;
第一确定模块604,用于根据所述DC系数和所述至少两个AC系数,确定变换系数。
可选地,所述变换系数解码装置600还包括:
第二获取模块,用于从所述目标码流的属性信息参数集中获取所述第一阶数。
可选地,所述第一解码模块602,具体用于:
通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数的编码结果进行哥伦布解码;
其中,对所述DC系数的编码结果进行哥伦布解码的解码阶数与所述第一阶数相同,所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述变换系数解码装置600还包括:
第二确定模块,用于将所述第一阶数与第一数值之间的差值,确定为第二阶数;
其中,所述第一数值为第二数值与预设的幅度控制参数之间的乘积,所述第二数值为对第三数值执行对数计算后的计算结果,所述第三数值为第一预设值与第四数值之间的最大值,所述第四数值为第五数值与第二预设值之间的乘法结果,所述第五数值为所述AC系数对应的当前编码点的索引与编码点的总数量之间的除法结果。
可选地,所述DC系数是基于颜色信息确定的,所述DC系数包括Y分量、U分量和V分量,所述第一解码模块602,还具体用于:
根据每个DC系数对应的第一阶数,确定对所述DC系数的每个分量进行哥伦布解码的解码阶数;
基于所述解码阶数,通过第一上下文概率模型和第二上下文概率模型,对所述DC系数的编码结果进行哥伦布解码;
其中,在所述DC系数对应的第一阶数大于第三预设值,且小于或等于第四预设值的情况下,对DC系数中的Y分量进行哥伦布解码的解码阶数为所述第一阶数,对所述DC系数中的U分量和V分量进行哥伦布解码的解码阶数为1;或,
在所述DC系数对应的第一阶数大于第四预设值的情况下,对所述DC系数中的U分量和V分量进行哥伦布解码的解码阶数为所述第一阶数与所述第四预设值之间的差值,对所述DC系数中的Y分量进行哥伦布解码的解码阶数为1;或,
在所述DC系数对应的第一阶数小于或等于第三预设值的情况下,对所述DC系数的编码结果进行哥伦布解码的解码阶数为1。
可选地,所述变换系数解码装置600还包括:
第三获取模块,用于从所述目标码流的属性信息参数集中获取比例信息;
第三确定模块,用于根据所述比例信息和预设的编码点的总数量,确定第二阶数。
可选地,所述变换系数解码装置600还包括:
第四确定模块,用于根据所述AC系数对应的编码点的索引和预设的编码点的总数量之间的比值,确定比例信息;
第五确定模块,用于根据所述比例信息和所述编码点的总数量,确定第二阶数。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述第二解码模块603,具体用于:
根据每个AC系数对应的第二阶数,确定对所述AC系数的编码结果进行哥伦布解码的解码阶数;
基于所述解码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的编码结果进行哥伦布解码;
其中,在所述AC系数对应的第二阶数大于第三预设值,且小于或等于第四预设值的情况下,对AC系数中的Y分量进行哥伦布解码的解码阶数为所述第二阶数,对所述AC系数中的U分量和V分量进行哥伦布解码的解码阶数为1;或,
在所述AC系数对应的第二阶数大于第四预设值的情况下,对所述AC系数中的U分量和V分量进行哥伦布解码的解码阶数为所述第二阶数与所述第四预设值之间的差值,对所述AC系数中的Y分量进行哥伦布解码的解码阶数为1;或,
在所述AC系数对应的第二阶数小于或等于第三预设值的情况下,对所述AC系数的编码结果进行哥伦布解码的解码阶数为1;
所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述第二解码模块603,还具体用于:
通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的编码结果进行哥伦布解码;
其中,对所述AC系数的编码结果进行哥伦布解码的解码阶数与所述第二阶数相同,所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述AC系数是基于反射率信息确定的,所述第二解码模块603,还具体用于:
通过第一组上下文概率模型和第二组上下文概率模型对每个AC系数的编码结果进行哥伦布解码;
其中,在AC系数对应的第二阶数大于第五预设值的情况下,对所述AC系数的编码结果进行哥伦布解码的解码阶数与所述第二阶数相同;或,
在AC系数对应的第二阶数小于或等于第五预设值的情况下,对所述AC系数的编码结果进行哥伦布解码的解码阶数为1;
所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
可选地,所述上下文概率模型的初始概率为预设概率值。
可选地,所述第一解码模块602,还具体用于:
获取目标标识;
在所述目标标识为目标值的情况下,根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数。
本申请实施例提供的变换系数解码装置能够实现图4的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例中的变换系数编码装置和变换系数解码装置可以是电子设备,例如具有
操作系统的电子设备,也可以是电子设备中的部件、例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,终端可以包括但不限于上述所列举的终端的类型,其他设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)等,本申请实施例不作具体限定。
可选地,如图7所示,本申请实施例还提供一种通信设备700,包括处理器701和存储器702,存储器702上存储有可在所述处理器701上运行的程序或指令,例如,该通信设备700为终端时,该程序或指令被处理器701执行时实现上述变换系数编码方法实施例的各个步骤,或者实现上述变换系数解码方法实施例的各个步骤,且能达到相同的技术效果。
本申请实施例还提供一种终端,包括处理器和通信接口,处理器用于执行以下操作:
获取点云对应的变换系数;
根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码;
根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码;
基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
或者,处理器用于执行以下操作:
获取目标码流;
根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数;
根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数;
根据所述DC系数和所述至少两个AC系数,确定变换系数。
该终端实施例与上述编码端或解码端方法实施例对应,上述方法实施例的各个实施过程和实现方式均可适用于该终端实施例中,且能达到相同的技术效果。具体地,图8为实现本申请实施例的一种终端的硬件结构示意图。
该终端800包括但不限于:射频单元801、网络模块802、音频输出单元803、输入单元804、传感器805、显示单元806、用户输入单元807、接口单元808、存储器809、以及处理器810等部件。
本领域技术人员可以理解,终端800还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器810逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元804可以包括图形处理器(Graphics Processing Unit,GPU)8041和麦克风8042,图形处理器8041对在视频捕获模式或图像捕获模式中
由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元806可包括显示面板8061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板8061。用户输入单元807包括触控面板8071以及其他输入设备8072中的至少一种。触控面板8071,也称为触摸屏。触控面板8071可包括触摸检测装置和触摸控制器两个部分。其他输入设备8072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
本申请实施例中,射频单元801接收来自网络侧设备的下行数据后,可以传输给处理器88进行处理;射频单元801可以向网络侧设备发送上行数据。通常,射频单元801包括但不限于天线、放大器、收发信机、耦合器、低噪声放大器、双工器等。
存储器809可用于存储软件程序或指令以及各种数据。存储器809可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器809可以包括易失性存储器或非易失性存储器,或者,存储器809可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器809包括但不限于这些和任意其它适合类型的存储器。
处理器810可包括一个或多个处理单元;可选的,处理器810集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器810中。
其中,处理器801用于执行以下操作:
获取点云对应的变换系数;
根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码;
根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码;
基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
或者,处理器801还用于执行以下操作:
获取目标码流;
根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数;
根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数;
根据所述DC系数和所述至少两个AC系数,确定变换系数。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述变换系数编码方法实施例的各个过程,或者实现上述变换系数解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述变换系数编码方法实施例的各个过程,或者实现上述变换系数解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现上述变换系数编码方法实施例的各个过程,或者实现上述变换系数解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡
献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
Claims (29)
- 一种变换系数编码方法,包括:编码端获取点云对应的变换系数;所述变换系数包括直流DC系数和至少两个交流AC系数;所述编码端根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码;所述编码端根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定;所述编码端基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
- 根据权利要求1所述的方法,其中,所述DC系数是基于颜色信息确定的,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码之前,所述方法还包括:所述编码端根据所述DC系数的至少部分分量对应的哥伦布阶数,确定所述DC系数对应的第一阶数。
- 根据权利要求2所述的方法,其中,所述根据所述DC系数的至少部分分量对应的哥伦布阶数,确定所述DC系数对应的第一阶数包括:所述编码端获取所述DC系数的每个分量对应的哥伦布阶数;所述编码端将所述每个分量对应的哥伦布阶数中出现频率最高的哥伦布阶数,确定为所述DC系数对应的第一阶数。
- 根据权利要求2所述的方法,其中,所述根据所述DC系数的至少部分分量对应的哥伦布阶数,确定所述DC系数对应的第一阶数包括:所述编码端获取DC系数的每个分量对应的哥伦布阶数;所述编码端对所述DC系数的每个分量对应的哥伦布阶数的平均值取整,获得所述DC系数对应的第一阶数。
- 根据权利要求1-4中任一项所述的方法,其中,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码包括:所述编码端通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数进行哥伦布编码;其中,对所述DC系数进行哥伦布编码的编码阶数与所述第一阶数相同;所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求1-4中任一项所述的方法,其中,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码之前,所述方法还包括:所述编码端将所述第一阶数与第一数值之间的差值,确定为第二阶数;其中,所述第一数值为第二数值与预设的幅度控制参数之间的乘积,所述第二数值为对第三数值执行对数计算后的计算结果,所述第三数值为第一预设值与第四数值之间的最大值,所述第四数值为第五数值与第二预设值之间的乘法结果,所述第五数值为所述编码点的索引与编码点的总数量之间的除法结果。
- 根据权利要求1-4中任一项所述的方法,其中,所述DC系数是基于颜色信息确定的,所述DC系数包括Y分量、U分量和V分量,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码包括:所述编码端根据所述DC系数对应的第一阶数,确定对所述DC系数的每个分量进行哥伦布编码的编码阶数;所述编码端基于所述编码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数的每个分量进行哥伦布编码;其中,在所述DC系数对应的第一阶数大于第三预设值,且小于或等于第四预设值的情况下,对DC系数中的Y分量进行哥伦布编码的编码阶数为所述第一阶数,对所述DC系数中的U分量和V分量进行哥伦布编码的编码阶数为1;或,在所述DC系数对应的第一阶数大于第四预设值的情况下,对所述DC系数中的U分量和V分量进行哥伦布编码的编码阶数为所述第一阶数与所述第四预设值之间的差值,对所述DC系数中的Y分量进行哥伦布编码的编码阶数为1;或,在所述DC系数对应的第一阶数小于或等于第三预设值的情况下,对所述DC系数的每个分量进行哥伦布编码的编码阶数为1;所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求1-4中任一项所述的方法,其中,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码包括:所述编码端根据每个AC系数对应的第二阶数,确定对所述AC系数的每个分量进行哥伦布编码的编码阶数;所述编码端基于所述编码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的每个分量进行哥伦布编码;其中,在所述AC系数对应的第二阶数大于第三预设值,且小于或等于第四预设值的情况下,对AC系数中的Y分量进行哥伦布编码的编码阶数为所述第二阶数,对所述AC 系数中的U分量和V分量进行哥伦布编码的编码阶数为1;或,在所述AC系数对应的第二阶数大于第四预设值的情况下,对所述AC系数中的U分量和V分量进行哥伦布编码的编码阶数为所述第二阶数与所述第四预设值之间的差值,对所述AC系数中的Y分量进行哥伦布编码的编码阶数为1;或,在所述AC系数对应的第二阶数小于或等于第三预设值的情况下,对所述AC系数的每个分量进行哥伦布编码的编码阶数为1;所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求1-4中任一项所述的方法,其中,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码包括:所述编码端通过第一组上下文概率模型,对所述AC系数中的U分量和V分量进行哥伦布编码;对所述U分量和V分量进行哥伦布编码的编码阶数与所述第二阶数相同,所述第一组上下文概率模型包括多个上下文概率模型;所述编码端通过第二组上下文概率模型,对所述AC系数中的Y分量进行哥伦布编码;对所述Y分量进行哥伦布编码的编码阶数与所述第二阶数相同,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求1-4中任一项所述的方法,其中,所述AC系数是基于反射率信息确定的,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码包括:所述编码端通过第一组上下文概率模型和第二组上下文概率模型对每个AC系数进行哥伦布编码;其中,在AC系数对应的第二阶数大于第五预设值的情况下,对所述AC系数进行哥伦布编码的编码阶数与所述第二阶数相同;或,在AC系数对应的第二阶数小于或等于第五预设值的情况下,对所述AC系数进行哥伦布编码的编码阶数为1;所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求1-10中任一项所述的方法,其中,所述上下文概率模型的初始概率为预设概率值。
- 根据权利要求1-10中任一项所述的方法,其中,所述目标码流的属性信息参数集包括所述第一阶数和比例信息,所述比例信息用于确定第二阶数。
- 根据权利要求1-10中任一项所述的方法,其中,所述根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码包括:所述编码端获取目标标识;所述编码端在所述目标标识为目标值的情况下,根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码。
- 一种变换系数解码方法,包括:解码端获取目标码流;所述目标码流包括变换系数中的直流DC系数的编码结果和所述变换系数中的至少两个交流AC系数的编码结果;所述解码端根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数;所述解码端根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定,或者基于目标码流的属性信息参数集包括的比例信息确定;所述解码端根据所述DC系数和所述至少两个AC系数,确定变换系数。
- 根据权利要求14所述的方法,其中,所述根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码之前,所述方法还包括:所述解码端从所述目标码流的属性信息参数集中获取所述第一阶数。
- 根据权利要求14或15所述的方法,其中,所述根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码包括:所述解码端通过第一组上下文概率模型和第二组上下文概率模型,对所述DC系数的编码结果进行哥伦布解码;其中,对所述DC系数的编码结果进行哥伦布解码的解码阶数与所述第一阶数相同,所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求14所述的方法,其中,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码之前,所述方法还包括:所述解码端将所述第一阶数与第一数值之间的差值,确定为第二阶数;其中,所述第一数值为第二数值与预设的幅度控制参数之间的乘积,所述第二数值为对第三数值执行对数计算后的计算结果,所述第三数值为第一预设值与第四数值之间的最大值,所述第四数值为第五数值与第二预设值之间的乘法结果,所述第五数值为所述AC系数对应的当前编码点的索引与编码点的总数量之间的除法结果。
- 根据权利要求14或15所述的方法,其中,所述DC系数是基于颜色信息确定的,所述DC系数包括Y分量、U分量和V分量,所述根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码包括:所述解码端根据每个DC系数对应的第一阶数,确定对所述DC系数的每个分量进行哥伦布解码的解码阶数;所述解码端基于所述解码阶数,通过第一上下文概率模型和第二上下文概率模型,对所述DC系数的编码结果进行哥伦布解码;其中,在所述DC系数对应的第一阶数大于第三预设值,且小于或等于第四预设值的情况下,对DC系数中的Y分量进行哥伦布解码的解码阶数为所述第一阶数,对所述DC系数中的U分量和V分量进行哥伦布解码的解码阶数为1;或,在所述DC系数对应的第一阶数大于第四预设值的情况下,对所述DC系数中的U分量和V分量进行哥伦布解码的解码阶数为所述第一阶数与所述第四预设值之间的差值,对所述DC系数中的Y分量进行哥伦布解码的解码阶数为1;或,在所述DC系数对应的第一阶数小于或等于第三预设值的情况下,对所述DC系数的编码结果进行哥伦布解码的解码阶数为1。
- 根据权利要求14所述的方法,其中,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码之前,所述方法还包括:所述解码端从所述目标码流的属性信息参数集中获取比例信息;所述解码端根据所述比例信息和预设的编码点的总数量,确定第二阶数。
- 根据权利要求14所述的方法,其中,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码之前,所述方法还包括:所述编码端根据所述AC系数对应的编码点的索引和预设的编码点的总数量之间的比值,确定比例信息;所述编码端根据所述比例信息和所述编码点的总数量,确定第二阶数。
- 根据权利要求14、17、19和20中任一项所述的方法,其中,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码包括:所述解码端根据每个AC系数对应的第二阶数,确定对所述AC系数的编码结果进行哥伦布解码的解码阶数;所述解码端基于所述解码阶数,通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的编码结果进行哥伦布解码;其中,在所述AC系数对应的第二阶数大于第三预设值,且小于或等于第四预设值的 情况下,对AC系数中的Y分量进行哥伦布解码的解码阶数为所述第二阶数,对所述AC系数中的U分量和V分量进行哥伦布解码的解码阶数为1;或,在所述AC系数对应的第二阶数大于第四预设值的情况下,对所述AC系数中的U分量和V分量进行哥伦布解码的解码阶数为所述第二阶数与所述第四预设值之间的差值,对所述AC系数中的Y分量进行哥伦布解码的解码阶数为1;或,在所述AC系数对应的第二阶数小于或等于第三预设值的情况下,对所述AC系数的编码结果进行哥伦布解码的解码阶数为1;所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求14、17、19和20中任一项所述的方法,其中,所述AC系数是基于颜色信息确定的,所述AC系数包括Y分量、U分量和V分量,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码包括:所述解码端通过第一组上下文概率模型和第二组上下文概率模型,对所述AC系数的编码结果进行哥伦布解码;其中,对所述AC系数的编码结果进行哥伦布解码的解码阶数与所述第二阶数相同,所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求14、17、19和20中任一项所述的方法,其中,所述AC系数是基于反射率信息确定的,所述根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码包括:所述解码端通过第一组上下文概率模型和第二组上下文概率模型对每个AC系数的编码结果进行哥伦布解码;其中,在AC系数对应的第二阶数大于第五预设值的情况下,对所述AC系数的编码结果进行哥伦布解码的解码阶数与所述第二阶数相同;或,在AC系数对应的第二阶数小于或等于第五预设值的情况下,对所述AC系数的编码结果进行哥伦布解码的解码阶数为1;所述第一组上下文概率模型包括多个上下文概率模型,所述第二组上下文概率模型包括多个上下文概率模型,且所述第二组上下文概率模型包括的多个上下文概率模型与所述第一组上下文概率模型包括的多个上下文概率模型不同。
- 根据权利要求14-23中任一项所述的方法,其中,所述上下文概率模型的初始概率为预设概率值。
- 根据权利要求14-23中任一项所述的方法,其中,所述根据所述DC系数对应的第 一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数包括:所述解码端获取目标标识;所述解码端在所述目标标识为目标值的情况下,根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数。
- 一种变换系数编码装置,包括:获取模块,用于获取点云对应的变换系数;所述变换系数包括直流DC系数和至少两个交流AC系数;第一编码模块,用于根据DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数进行编码;第二编码模块,用于根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数进行编码;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定;生成模块,用于基于对所述DC系数的编码结果和对所述每个AC系数的编码结果,生成目标码流。
- 一种变换系数解码装置,包括:第一获取模块,用于获取目标码流;所述目标码流包括变换系数中的直流DC系数的编码结果和所述变换系数中的至少两个交流AC系数的编码结果;第一解码模块,用于根据所述DC系数对应的第一阶数和所述DC系数对应的上下文概率模型,对所述DC系数的编码结果进行解码,获得所述DC系数;第二解码模块,用于根据每个AC系数对应的第二阶数和所述每个AC系数对应的上下文概率模型,对所述每个AC系数的编码结果进行解码,获得至少两个AC系数;所述第二阶数基于所述第一阶数和所述AC系数对应的编码点的索引确定,或者基于目标码流的属性信息参数集包括的比例信息确定;第一确定模块,用于根据所述DC系数和所述至少两个AC系数,确定变换系数。
- 一种终端,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-13中任一项所述的变换系数编码方法的步骤,或者实现如权利要求14-25中任一项所述的变换系数解码方法的步骤。
- 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-13中任一项所述的变换系数编码方法的步骤,或者实现如权利要求14-25中任一项所述的变换系数解码方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310039876.6 | 2023-01-11 | ||
| CN202310039876.6A CN118338006B (zh) | 2023-01-11 | 2023-01-11 | 变换系数编码方法、变换系数解码方法及终端 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024149182A1 true WO2024149182A1 (zh) | 2024-07-18 |
Family
ID=91780867
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/071030 Ceased WO2024149182A1 (zh) | 2023-01-11 | 2024-01-08 | 变换系数编码方法、变换系数解码方法及终端 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN118338006B (zh) |
| WO (1) | WO2024149182A1 (zh) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110169068A (zh) * | 2017-01-19 | 2019-08-23 | 谷歌有限责任公司 | Dc系数符号代码化方案 |
| US20200099956A1 (en) * | 2018-01-30 | 2020-03-26 | Google Llc | Efficient context model computation design in transform coefficient coding |
| CN112204972A (zh) * | 2018-03-29 | 2021-01-08 | 弗劳恩霍夫应用研究促进协会 | 变换系数块编码 |
| CN112449185A (zh) * | 2019-08-28 | 2021-03-05 | 腾讯科技(深圳)有限公司 | 视频解码方法、编码方法、装置、介质及电子设备 |
| WO2022055165A1 (ko) * | 2020-09-11 | 2022-03-17 | 엘지전자 주식회사 | 포인트 클라우드 데이터 송신 장치, 포인트 클라우드 데이터 송신 방법, 포인트 클라우드 데이터 수신 장치 및 포인트 클라우드 데이터 수신 방법 |
| US20220108484A1 (en) * | 2020-10-07 | 2022-04-07 | Qualcomm Incorporated | Predictive geometry coding in g-pcc |
| CN115379190A (zh) * | 2022-08-19 | 2022-11-22 | 腾讯科技(深圳)有限公司 | 一种点云处理方法、装置及计算机设备、存储介质 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| ATE343302T1 (de) * | 2002-05-02 | 2006-11-15 | Fraunhofer Ges Forschung | Kodierung und dekodierung von transformationskoeffizienten in bild- oder videokodierern |
| US7885473B2 (en) * | 2007-04-26 | 2011-02-08 | Texas Instruments Incorporated | Method of CABAC coefficient magnitude and sign decoding suitable for use on VLIW data processors |
| AU2019275553B2 (en) * | 2019-12-03 | 2022-10-06 | Canon Kabushiki Kaisha | Method, apparatus and system for encoding and decoding a coding tree unit |
| US11683490B2 (en) * | 2020-09-10 | 2023-06-20 | Tencent America LLC | Context adaptive transform set |
-
2023
- 2023-01-11 CN CN202310039876.6A patent/CN118338006B/zh active Active
-
2024
- 2024-01-08 WO PCT/CN2024/071030 patent/WO2024149182A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110169068A (zh) * | 2017-01-19 | 2019-08-23 | 谷歌有限责任公司 | Dc系数符号代码化方案 |
| US20200099956A1 (en) * | 2018-01-30 | 2020-03-26 | Google Llc | Efficient context model computation design in transform coefficient coding |
| CN112204972A (zh) * | 2018-03-29 | 2021-01-08 | 弗劳恩霍夫应用研究促进协会 | 变换系数块编码 |
| CN112449185A (zh) * | 2019-08-28 | 2021-03-05 | 腾讯科技(深圳)有限公司 | 视频解码方法、编码方法、装置、介质及电子设备 |
| WO2022055165A1 (ko) * | 2020-09-11 | 2022-03-17 | 엘지전자 주식회사 | 포인트 클라우드 데이터 송신 장치, 포인트 클라우드 데이터 송신 방법, 포인트 클라우드 데이터 수신 장치 및 포인트 클라우드 데이터 수신 방법 |
| US20220108484A1 (en) * | 2020-10-07 | 2022-04-07 | Qualcomm Incorporated | Predictive geometry coding in g-pcc |
| CN115379190A (zh) * | 2022-08-19 | 2022-11-22 | 腾讯科技(深圳)有限公司 | 一种点云处理方法、装置及计算机设备、存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118338006B (zh) | 2026-02-24 |
| CN118338006A (zh) | 2024-07-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115474051B (zh) | 点云编码方法、点云解码方法及终端 | |
| CN115474059B (zh) | 点云编码方法、解码方法及装置 | |
| WO2022257971A1 (zh) | 点云编码处理方法、点云解码处理方法及相关设备 | |
| CN116233388A (zh) | 点云编、解码处理方法、装置、编码设备及解码设备 | |
| CN116233387A (zh) | 点云编码、解码方法、装置及通信设备 | |
| WO2023025024A1 (zh) | 点云属性编码方法、点云属性解码方法及终端 | |
| WO2024149142A1 (zh) | 变换系数编码方法、变换系数解码方法及终端 | |
| WO2023098802A1 (zh) | 点云属性编码方法、点云属性解码方法及终端 | |
| WO2023098801A1 (zh) | 点云属性编码方法、点云解码方法及终端 | |
| WO2024149182A1 (zh) | 变换系数编码方法、变换系数解码方法及终端 | |
| WO2024120324A1 (zh) | 属性变换解码方法、属性变换编码方法及终端 | |
| CN116233426B (zh) | 属性量化、反量化方法、装置及设备 | |
| CN115474046B (zh) | 点云属性信息编码方法、解码方法、装置及相关设备 | |
| WO2024217303A1 (zh) | 变换系数编码方法、变换系数解码方法及终端 | |
| CN118678075B (zh) | 点云编码处理方法、点云解码处理方法及相关设备 | |
| WO2024120325A1 (zh) | 点云编码方法、点云解码方法及终端 | |
| WO2024120323A1 (zh) | 属性变换编码方法、属性变换解码方法及终端 | |
| WO2024120326A1 (zh) | 几何编码方法、几何解码方法及终端 | |
| WO2024245112A1 (zh) | 点云编码处理方法、点云解码处理方法及相关设备 | |
| WO2024217340A1 (zh) | 点云编码处理方法、点云解码处理方法及相关设备 | |
| WO2024146591A1 (zh) | 列表构建方法及终端 | |
| WO2024217301A1 (zh) | 点云编码处理方法、点云解码处理方法及相关设备 | |
| CN116614623A (zh) | 预测编码方法、预测解码方法及终端 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24741181 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.11.2025) |