Transform coefficient encoding method, transform coefficient decoding method, and terminal
By dynamically determining the Columbus order based on the amplitudes of the DC and AC coefficients, the problem of low point cloud coding efficiency is solved, and a more efficient coding process is achieved.
Patent Information
- Application Number
- CN202310408592.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2043-04-17
AI Technical Summary
Existing point cloud encoding technologies have low efficiency, especially when using a fixed Columbus order for transform coefficient encoding, resulting in insufficient encoding efficiency.
The first Golomb order is determined based on the magnitude of the DC coefficient in the transform coefficients, and the second Golomb order of each AC coefficient is dynamically adjusted in combination with the magnitude of the AC coefficients to generate the target bitstream.
By dynamically adjusting the Columbus order, the bitstream during the transform coefficient encoding process is reduced, thereby improving encoding efficiency.
Smart Images

Figure CN118828003B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of encoding and decoding technology, specifically relating to a transform coefficient encoding method, a transform coefficient decoding method, and a terminal. Background Technology
[0002] A point cloud is a set of discrete points in space that are randomly distributed and represent the spatial structure and surface attributes of a three-dimensional object or scene. The encoding process of a point cloud involves attribute information encoding. After encoding the attribute information to obtain transform coefficients, these transform coefficients are quantized, and then the quantized transform coefficients are encoded to obtain the bitstream.
[0003] In related technologies, using a fixed Columbus order to encode the transform coefficients has the technical problem of low encoding efficiency. Summary of the Invention
[0004] This application provides a transform coefficient encoding method, a transform coefficient decoding method, and a terminal, which can solve the technical problem of low encoding efficiency.
[0005] Firstly, a transform coefficient encoding method is provided, including:
[0006] The encoder obtains the transformation coefficients corresponding to the point cloud.
[0007] The encoding end determines the first Golomb order corresponding to the DC coefficient based on the amplitude of the DC coefficient in the transform coefficient;
[0008] When the transform coefficients only include DC coefficients, the encoding end generates the target bitstream based on the first Golomb order corresponding to the DC coefficients and the encoding result of the DC coefficients; or,
[0009] When the transformation coefficients include DC coefficients and AC coefficients, perform at least one of the following operations:
[0010] Based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient, a target bitstream is generated; the second Golomb order corresponding to each AC coefficient is a preset order; or,
[0011] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, the second Columbus order corresponding to the AC coefficient is determined, wherein the first AC coefficient is the AC coefficient excluding the last AC coefficient in the sorted transformation coefficients.
[0012] The target bitstream is generated based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient.
[0013] Secondly, a method for decoding transform coefficients is provided, including:
[0014] The decoding end obtains the target bitstream;
[0015] The decoding end decodes the encoding result of the DC coefficients included in the target bitstream according to the first Golomb order included in the target bitstream, and obtains the DC coefficients.
[0016] When the target bitstream includes the encoded result of AC coefficients, the decoding end performs at least one of the following operations:
[0017] Based on the encoding result of each AC coefficient and the DC coefficient, the transform coefficients are determined, wherein the second Golomb order corresponding to each AC coefficient is a preset order; or...
[0018] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, the second Columbus order corresponding to the AC coefficient is determined. The first AC coefficient is the AC coefficient in the transformation coefficients excluding the last AC coefficient in the sorting.
[0019] Based on the DC coefficients and AC coefficients, the transform coefficients are determined; the AC coefficients are obtained by decoding the encoding result of the AC coefficients based on the corresponding second Golomb order.
[0020] Thirdly, a transform coefficient encoding device is provided, comprising:
[0021] The acquisition module is used to acquire the transformation coefficients corresponding to the point cloud.
[0022] The determining module is used to determine the first Golomb order corresponding to the DC coefficient based on the amplitude corresponding to the DC coefficient in the transformation coefficient;
[0023] The encoding module is configured to generate a target bitstream based on the first Golomb order corresponding to the DC coefficients and the encoding result of the DC coefficients, when the transform coefficients only include DC coefficients; or,
[0024] When the transformation coefficients include DC coefficients and AC coefficients, perform at least one of the following operations:
[0025] Based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient, a target bitstream is generated; the second Golomb order corresponding to each AC coefficient is a preset order; or,
[0026] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, the second Columbus order corresponding to the AC coefficient is determined, wherein the first AC coefficient is the AC coefficient excluding the last AC coefficient in the sorted transformation coefficients.
[0027] The target bitstream is generated based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient.
[0028] Fourthly, a transform coefficient decoding device is provided, comprising:
[0029] The acquisition module is used to acquire the target bitstream;
[0030] The first decoding module is used to decode the encoding result of the DC coefficients included in the target bitstream according to the first Golomb order included in the target bitstream, and obtain the DC coefficients.
[0031] The second decoding module is configured to perform at least one of the following operations when the target bitstream includes the encoded result of AC coefficients:
[0032] Based on the encoding result of each AC coefficient and the DC coefficient, the transform coefficients are determined, wherein the second Golomb order corresponding to each AC coefficient is a preset order; or...
[0033] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, the second Columbus order corresponding to the AC coefficient is determined. The first AC coefficient is the AC coefficient in the transformation coefficients excluding the last AC coefficient in the sorting.
[0034] Based on the DC coefficients and AC coefficients, the transform coefficients are determined; the AC coefficients are obtained by decoding the encoding result of the AC coefficients based on the corresponding second Golomb order.
[0035] Fifthly, a terminal is provided, the terminal including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the first aspect, or implementing the steps of the method as described in the second aspect.
[0036] In a sixth aspect, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect, or implement the steps of the method described in the second aspect.
[0037] In a seventh aspect, a chip is provided, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to run programs or instructions to implement the method as described in the first aspect, or to implement the method as described in the second aspect.
[0038] Eighthly, a computer program / program product is provided, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method as described in the first aspect, or to implement the steps of the method as described in the second aspect.
[0039] In this embodiment, the first Golomb order corresponding to the DC coefficient is determined based on the amplitude corresponding to the DC coefficient. Then, when the transform coefficients only include the DC coefficient, a target bitstream is generated based on the encoding result of the first Golomb order corresponding to the DC coefficient and the DC coefficient. When the transform coefficients include both DC and AC coefficients, a target bitstream is generated based on the first Golomb order corresponding to the DC coefficient, the encoding result of the DC coefficient, and the encoding result of each AC coefficient. Alternatively, a target bitstream is generated based on the first Golomb order corresponding to the DC coefficient, the encoding result of the DC coefficient, and the encoding result of each AC coefficient, wherein the encoding result of the AC coefficient is determined based on the amplitude corresponding to the first Golomb order and the first AC coefficient. The first AC coefficient is any AC coefficient in the transform coefficients excluding the last AC coefficient in the sorting. Compared to related technologies that encode transform coefficients based on a fixed Golomb order, this embodiment determines the Golomb order corresponding to the DC coefficient and the Golomb order corresponding to each AC coefficient based on the amplitudes of the DC and AC coefficients, reducing the bitstream size during the transform coefficient encoding process and thus improving encoding efficiency. Attached Figure Description
[0040] Figure 1 This is a partial schematic diagram of the G-PCC point cloud encoding device;
[0041] Figure 2 This is a partial schematic diagram of the G-PCC point cloud decoding device;
[0042] Figure 3 This is a flowchart illustrating the transform coefficient encoding method provided in an embodiment of this application;
[0043] Figure 4 This is a flowchart illustrating the transform coefficient decoding method provided in an embodiment of this application;
[0044] Figure 5 This is a structural diagram of the transform coefficient encoding device provided in the embodiments of this application;
[0045] Figure 6This is a structural diagram of the transform coefficient decoding device provided in the embodiments of this application;
[0046] Figure 7 This is a structural diagram of the communication device provided in the embodiments of this application;
[0047] Figure 8 This is a schematic diagram of the hardware structure of the terminal provided in the embodiments of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0049] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, without limiting the number of objects; for example, the first object can be one or more. Furthermore, "or" in this application indicates at least one of the connected objects. For example, "A or B" covers three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0050] The term "instruction" in this application can be either a direct instruction (or explicit instruction) or an indirect instruction (or implicit instruction). A direct instruction can be understood as one in which the sender explicitly informs the receiver of specific information, the operation to be performed, or the requested result, etc.; an indirect instruction can be understood as one in which the receiver determines the corresponding information based on the instruction sent by the sender, or makes a judgment and determines the operation to be performed or the requested result, etc., based on the judgment result.
[0051] The transform coefficient encoding device corresponding to the transform coefficient encoding method and the transform coefficient decoding device corresponding to the transform coefficient decoding method in the embodiments of this application can be a terminal, which can also be called a terminal device or user equipment (UE). The terminal can be a mobile phone, tablet computer, laptop computer, notebook computer, personal digital assistant (PDA), handheld computer, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR), virtual reality (VR) device, robot, wearable device, flight vehicle, vehicle user equipment (VUE), shipborne equipment, pedestrian user equipment (PUE), smart home (home devices with wireless communication functions, such as refrigerators, televisions, washing machines or furniture, etc.), game console, personal computer (PC), ATM or self-service machine, etc. Wearable devices include: smartwatches, smart bracelets, smart earphones, smart glasses, smart jewelry (smart bracelets, smart necklaces, smart anklets, smart ankle chains, etc.), smart wristbands, smart clothing, etc. Among these, in-vehicle devices can also be referred to as in-vehicle terminals, in-vehicle controllers, in-vehicle modules, in-vehicle components, in-vehicle chips, or in-vehicle units, etc. It should be noted that the embodiments in this application do not limit the specific type of terminal.
[0052] For ease of understanding, the following describes some aspects of the embodiments of this application:
[0053] Please see Figure 1 ,like Figure 1As shown, in current digital audio and video codec technology standards, Geometry Point Cloud Compression (G-PCC) point cloud encoding devices can be used to encode the attribute information of point clouds. Specifically, the attribute information of the point cloud can be color-converted and recolored. Then, based on the reconstructed geometric information, the recolored attribute information can be subjected to region adaptive transformation based on upsampling prediction, or lifting transformation based on hierarchical structure partitioning, to obtain transformation coefficients. The transformation coefficients are then quantized to obtain quantization coefficients. Finally, the quantization coefficients are arithmetically encoded to obtain the attribute bitstream.
[0054] The above-mentioned operation steps of region adaptive transformation based on upsampling prediction include: constructing a transformation tree structure of the point cloud; then, performing upsampling prediction and Region Adaptive Harm Transform (RAHT) layer by layer from the root node of the transformation tree structure. If the current node is the root node, the attribute information of the node is directly subjected to RAHT transformation to obtain the Direct Current (DC) coefficients and Alternating Current (AC) coefficients; if the current node is not the root node, it is determined whether to perform prediction on the current node based on the grandparent and parent nodes of the current node. If prediction is required for the current node, the attribute information of the current node is predicted to obtain the attribute prediction value, and then RAHT transformation is performed on the attribute prediction value and the original attribute value of the current node respectively to calculate the AC coefficient residual; if prediction is not required for the current node, the original attribute value of the current node is directly subjected to RAHT transformation to obtain the AC coefficients.
[0055] The operation steps of the lifting transformation based on hierarchical structure partitioning mentioned above include: First, the point cloud is hierarchically partitioned by Level of Detail (LoD) to establish the hierarchical structure of the point cloud;
[0056] Then, the bottom-level nodes and nodes at the same level as the current node are used as reference points. The current node searches within the reference points and selects the nearest multiple reference points as prediction reference points. The reconstructed attribute values of these multiple prediction reference points are used for linear interpolation prediction. The predicted values are then subjected to lifting transformation.
[0057] It should be understood that the above arithmetic coding includes zero-run coding and transform coefficient coding. First, zero-run coding is performed on the quantized transform coefficients, and then transform coefficient coding is performed on the transform coefficients to generate the bitstream. 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 0 is encoded and the current coding ends; if it is not 0, a 1 is encoded and the following judgment is performed.
[0058] (2) Determine whether the run value of the transformation coefficient is 1 by using the context probability model 2. If it is 1, encode one bit 0 and end the current encoding; if it is not 1, encode one bit 1 and continue to make the following judgment.
[0059] (3) Determine whether the run value of the transformation coefficient is 2 by using the context probability model 3. If it is 2, encode one bit 0 and end the current encoding; if it is not 2, encode one bit 1 and continue to make the following judgment.
[0060] (4) Update the run value by subtracting 3 from the run value to obtain the updated run value.
[0061] (5) Divide the run value by 2 to obtain the prefix value;
[0062] (6) Encode the prefix value using a unary code using context probability model 4;
[0063] Check if the prefix value is 0. If it is 0, encode one bit of 0 and use bypass encoding to encode the remainder of the run value taken as 2. If it is not 0, encode one bit of 1 and continue to perform the following checks.
[0064] Check if the prefix value is 1. If it is 1, encode one bit of 0 and use bypass encoding to encode the remainder of the run value taken as 2. If it is not 1, encode one bit of 1 and continue to perform the following checks.
[0065] Determine if the prefix value is 2. If it is 2, encode one bit of 0 and use bypass encoding to encode the remainder of the run value taken from 2. If it is not 2, encode one bit of 1 and continue with the following judgment.
[0066] Determine if the prefix value is 3. If it is 3, encode one bit of 0 and use bypass encoding to encode the remainder of the run value taken as 2. If it is not 3, encode one bit of 1 and end the current encoding.
[0067] (7) Update the run value by subtracting 8 from the run value to obtain the updated run value.
[0068] (8) Update the run value using second-order exponential Golomb coding through context probability model 5.
[0069] The following is a brief description of the implementation process of transform coefficient encoding:
[0070] (1) Determine whether the value of the transformation coefficient is equal to 0 by using context probability model 1. If it is 0, end the encoding; if it is not 0, encode 1 and continue the following encoding.
[0071] (2) Determine whether the value of the transformation coefficient is equal to 1 by using context probability model 1. If it is 1, end the encoding; if it is not 1, encode 1 and continue the following encoding.
[0072] (3) The prefix code of the bitstream is generated by encoding the first set of context probability models (including context probability model 3, context probability model 4 and context probability model 5), and the suffix code of the bitstream is generated by encoding the second set of context probability models (including context probability model 6, context probability model 7 and context probability model 8).
[0073] Please see Figure 2 ,like Figure 2 As shown, in current digital audio and video codec technology standards, Geometry Point Cloud Compression (G-PCC) point cloud decoding devices can be used to decode the attribute information of point clouds. It should be understood that the implementation process of decoding the attribute information of point clouds using the aforementioned G-PCC point cloud decoding device is the reverse of its encoding process, and will not be repeated here. From the above, it can be seen that in the process of transform coefficient encoding, it is necessary to first encode the transform coefficients based on their values using context probability model 1 and context probability model 2, and then encode the transform coefficients using two sets of context probability models. This requires using a large number of context probability models to encode the transform coefficients, resulting in a large number of bits in the generated bitstream.
[0074] To address the aforementioned technical problems, this application provides a transform coefficient encoding method that can be applied to the encoding end. The transform coefficient encoding method provided in this application will be described in detail below with reference to the accompanying drawings and through some embodiments and application scenarios.
[0075] Please see Figure 3 , Figure 3 This is a flowchart of the transform coefficient encoding method in this embodiment. The transform coefficient encoding method provided in this embodiment includes the following steps:
[0076] S301, the encoder obtains the transformation coefficients corresponding to the point cloud.
[0077] As described above, after quantizing the point cloud's attribute information through either upsampling prediction-based region adaptive transformation or hierarchical structure partitioning-based lifting transformation, the transformation coefficients of the point cloud are obtained. These transformation coefficients may include DC coefficients, or a combination of DC coefficients and one AC coefficient, or a combination of DC coefficients and multiple AC coefficients.
[0078] It should be understood that attribute information includes color information and reflectance information. When the attribute information of the point cloud is color information, the transformation coefficients include Y component, U component and V component.
[0079] S302, the encoding end determines the first Golomb order corresponding to the DC coefficient based on the amplitude of the DC coefficient in the transform coefficient.
[0080] When the attribute information of the point cloud is color information, the first Golomb order corresponding to the DC coefficient can be determined based on the amplitude corresponding to the Y component, the amplitude corresponding to the U component, and the amplitude corresponding to the V component of the DC coefficient.
[0081] When the attribute information of the point cloud is reflectivity information, the first Golomb order corresponding to the DC coefficient can be determined based on the amplitude corresponding to the DC coefficient.
[0082] S303, when the transform coefficients only include DC coefficients, the encoding end generates the target bitstream based on the first Golomb order corresponding to the DC coefficients and the encoding result of the DC coefficients; or,
[0083] When the transformation coefficients include DC coefficients and AC coefficients, perform at least one of the following operations:
[0084] Based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient, a target bitstream is generated; or,
[0085] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, determine the second Columbus order corresponding to the AC coefficient;
[0086] The target bitstream is generated based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient.
[0087] In this step, one optional implementation is to encode the DC coefficients according to the first Golomb order corresponding to the DC coefficients, obtaining the encoded result of the DC coefficients. This encoded result of the DC coefficients can be understood as a binary array. Then, the encoded result of the DC coefficients and the first Golomb order are mixed to generate the target bitstream.
[0088] Another optional implementation involves encoding the DC coefficients and AC coefficients according to the first Golomb order corresponding to the DC coefficients to obtain the encoded DC coefficients; encoding the AC coefficients according to a preset order to obtain the encoded AC coefficients; the encoded DC and AC coefficients can be understood as binary arrays. The encoded DC coefficients, encoded AC coefficients, and the first Golomb order are then mixed to generate the target bitstream. Optionally, the preset order is 1.
[0089] It should be noted that when the first Golomb order corresponding to the DC coefficient is 1, the second Golomb order corresponding to the AC coefficient is also determined to be 1. That is, the AC coefficient is encoded according to the first Golomb order to obtain the encoding result of the AC coefficient.
[0090] Another alternative implementation is that, when the transform coefficients include DC coefficients and multiple AC coefficients, the AC coefficients other than the last AC coefficient in the sorted list can be determined as the first AC coefficients, and then the second Columbus order corresponding to each AC coefficient can be determined according to the first Columbus order and the amplitude corresponding to the first AC coefficient.
[0091] If the transform coefficients include a DC coefficient and an AC coefficient, and the first AC coefficient is not present in the transform coefficients, then the second Golomb order corresponding to this AC coefficient can be determined based on the first Golomb order.
[0092] The second Columbus order mentioned above is a parameter used in the process of Columbus encoding and Columbus decoding of AC coefficients.
[0093] After obtaining the first Golomb order, the DC coefficients are Golomb encoded based on the first Golomb order to obtain the encoded DC coefficients. After obtaining the second Golomb order for each AC coefficient, the AC coefficients are also Golomb encoded based on the second Golomb order to obtain the encoded AC coefficients. The encoded DC and AC coefficients can be understood as binary arrays. Then, the encoded DC and AC coefficients are mixed with the first Golomb order to generate the target bitstream.
[0094] In this embodiment, the first Golomb order corresponding to the DC coefficient is determined based on the amplitude of the DC coefficient, and then the DC coefficient is encoded based on the first Golomb order. The second Golomb order corresponding to each AC coefficient is determined based on the amplitude of the first AC coefficient and the first Golomb order, and then the AC coefficient is encoded based on the second Golomb order. Compared to related technologies that encode transform coefficients based on a fixed Golomb order, this embodiment determines the Golomb order corresponding to the DC coefficient and the Golomb order corresponding to each AC coefficient based on the amplitude of the DC coefficient and the amplitude of the AC coefficient, reducing the bitstream in the transform coefficient encoding process and thus improving encoding efficiency.
[0095] Optionally, determining the second Columbus order corresponding to the AC coefficients based on the amplitudes corresponding to the first Columbus order and the first AC coefficients includes:
[0096] For the second AC coefficient in the transformation coefficients, the second Golomb order corresponding to the second AC coefficient is determined according to the first Golomb order; the second AC coefficient is the AC coefficient that is sorted first in the transformation coefficients;
[0097] For each third AC coefficient in the transformation coefficients, the second Golomb order corresponding to the third AC coefficient is determined based on the sum of the first Golomb order corresponding to the third AC coefficient; the third AC coefficient is the AC coefficient in the transformation coefficients other than the second AC coefficient.
[0098] In an optional embodiment, the transformation coefficients include multiple AC coefficients, namely, the transformation coefficients include a second AC coefficient and a third AC coefficient, wherein the second AC coefficient is the AC coefficient that is ranked first among the transformation coefficients, and the third AC coefficient is the AC coefficient among the transformation coefficients other than the second AC coefficient.
[0099] In this implementation, the second Golomb order corresponding to the second AC coefficient can be determined based on the first Golomb order. For details, please refer to subsequent embodiments. The second Golomb order corresponding to the third AC coefficient is determined based on the sum of the first Golomb orders corresponding to the third AC coefficient. For details on how to determine the sum of the first Golomb orders corresponding to the AC coefficients, please refer to subsequent embodiments.
[0100] In another alternative implementation, the transform coefficients include an AC coefficient, i.e., the transform coefficients include a second AC coefficient. In this implementation, the second Golomb order corresponding to the second AC coefficient can be determined based on the first Golomb order.
[0101] In this embodiment, for the second AC coefficient in the transform coefficients, the second Golomb order corresponding to the second AC coefficient is determined based on the first Golomb order; for the third AC coefficient in the transform coefficients, the second Golomb order corresponding to the third AC coefficient is determined based on the first Golomb order of the third AC coefficient, and then the AC coefficients are encoded according to the optimal Golomb order to improve encoding efficiency.
[0102] Optionally, determining the second Columbus order corresponding to the second AC coefficient based on the first Columbus order includes:
[0103] The difference between the first Columbus order and a preset value is determined as the second Columbus order corresponding to the second AC coefficient, where the preset value is a natural number.
[0104] In this embodiment, the second Columbus order corresponding to the second AC coefficient can be determined by the following formula (1):
[0105] (1)
[0106] in, For the first Columbus order, This represents the second Columbus order corresponding to the second AC coefficient. The preset value is a natural number, and optionally, the preset value is 4.
[0107] In this embodiment, the second Columbus order corresponding to the second AC coefficient is determined based on the first Columbus order, and then the second AC coefficient is encoded based on the optimal Columbus order to improve encoding efficiency.
[0108] Optionally, determining the second Columbus order corresponding to the third AC coefficient based on the sum of the first Columbus orders corresponding to the third AC coefficient includes:
[0109] Based on the order of the third AC coefficient in the transformation coefficients, determine at least one AC coefficient associated with the third AC coefficient;
[0110] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the first Columbus order sum;
[0111] The result of dividing the first Columbus order by the first value is determined as the second Columbus order corresponding to the third AC coefficient, where the first value represents the number of at least one AC coefficient associated with the third AC coefficient.
[0112] In this embodiment, at least one AC coefficient associated with the third AC coefficient is determined according to the order of the third AC coefficient in the transformation coefficients. It should be understood that the AC coefficient associated with the third AC coefficient includes the AC coefficient adjacent to the third AC coefficient.
[0113] After determining at least one AC coefficient associated with the third AC coefficient, the Golomb order of each associated AC coefficient is obtained, and the sum of the Golomb orders of each associated AC coefficient is determined as the first Golomb order sum. It should be noted that when the point cloud's attribute information is color information, the Golomb order of the aforementioned AC coefficients is determined based on the amplitude of the Y component of the AC coefficients; when the point cloud's attribute information is reflectance information, the Golomb order of the aforementioned AC coefficients is determined based on the amplitude of the AC coefficients.
[0114] In this embodiment, the second Columbus order corresponding to the third AC coefficient can be determined by the following formula (2):
[0115] (2)
[0116] in, Denotes the sum of the first Columbus order, Indicates the first value. This represents the second Columbus order.
[0117] In this embodiment, the first Golomb order of the third AC coefficient is determined and the second Golomb order corresponding to the third AC coefficient is determined. Then, the AC coefficient is encoded according to the optimal Golomb order to improve the encoding efficiency.
[0118] Optionally, determining at least one AC coefficient associated with the third AC coefficient based on the order of the third AC coefficients in the transform coefficients includes:
[0119] If the third AC coefficient is ranked Nth or earlier in the transformation coefficients, all AC coefficients preceding the third AC coefficient are identified as at least one AC coefficient associated with the third AC coefficient, where N is a positive integer greater than or equal to 1; or,
[0120] If the third AC coefficient is ranked after the Nth position among the at least two AC coefficients, the N AC coefficients preceding the third AC coefficient are determined as at least one AC coefficient associated with the third AC coefficient.
[0121] In this embodiment, a first sliding window can be used to determine at least one AC coefficient associated with the third AC coefficient, and the first Golomb order and the first value corresponding to the third AC coefficient can be calculated.
[0122] The length of the first sliding window can be represented as WinSize1, and the actual length of the first sliding window can be represented as AWinSize1. WinSize1 represents the maximum number of AC coefficients that the first sliding window can associate, and AWinSize1 represents the actual number of AC coefficients associated with the first sliding window. It should be understood that the value of N is the maximum number of AC coefficients that the first sliding window can associate, and the value represented by AWinSize1 in formula (2) is the actual number of AC coefficients associated with the first sliding window.
[0123] To facilitate understanding of the technical solution provided in this embodiment, please refer to the following example:
[0124] Example 1:
[0125] The value of N is 5, and the third AC coefficient is the fourth in the transformation coefficients. It should be understood that the DC coefficient is the first in the transformation coefficients. In this case, the second and third AC coefficients can be identified as the AC coefficients associated with the third AC coefficient.
[0126] Example 2:
[0127] The value of N is 5, and the third AC coefficient is the 7th in the transformation coefficients. In this case, the second to sixth AC coefficients can be identified as the AC coefficients associated with the third AC coefficient.
[0128] Optionally, the method further includes:
[0129] If the target Columbus order corresponding to the first target AC coefficient is less than the first preset threshold, the second Columbus order corresponding to the first target AC coefficient and the second Columbus order corresponding to the AC coefficient after the first target AC coefficient are both determined to be first order.
[0130] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients.
[0131] In this embodiment, any third AC coefficient among the transform coefficients is determined as the first target AC coefficient. Then, the target Golomb order corresponding to this first target AC coefficient is determined. For specific implementation details, please refer to subsequent embodiments.
[0132] If the target Golomb order corresponding to the first target AC coefficient is less than the first preset threshold, it indicates that the amplitude of the first target AC coefficient is small and the second Golomb order corresponding to the first target AC coefficient is small. In this case, the transformation coding method provided in the embodiments of this application can be used to determine the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient after the first target AC coefficient. Instead, the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient after the first target AC coefficient can be directly determined as first order.
[0133] Optionally, the first preset threshold is 1.
[0134] In this embodiment, the relationship between the target Columbus order and the first preset threshold is correlated with the amplitude of the first target AC coefficient. Therefore, the second Columbus order corresponding to the first target AC coefficient is determined based on the target Columbus order. Thus, the Columbus order corresponding to the AC coefficient is determined based on its amplitude, and the AC coefficient is subsequently encoded based on this Columbus order. This reduces the bitstream generated during the encoding process and improves encoding efficiency.
[0135] The following section details how to determine the target Columbus order:
[0136] Optionally, before determining the second Columbus order corresponding to the first target AC coefficient and the second Columbus order corresponding to the AC coefficients following the first target AC coefficient as first order when the first target AC coefficient is less than a first preset threshold, the method further includes:
[0137] Based on the order of the first target AC coefficients in the transformation coefficients, determine at least one AC coefficient associated with the first target AC coefficients;
[0138] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the second Columbus order sum;
[0139] The result of the division between the second Columbus order and the second value is determined as the target Columbus order, where the second value represents the number of the at least one AC coefficient.
[0140] In an alternative implementation, a second sliding window may be used to determine at least one AC coefficient associated with the first target AC coefficient, and to calculate the second Golomb order and the second numerical value corresponding to the first target AC coefficient.
[0141] The length of the second sliding window can be represented as WinSize2, and the actual length of the second sliding window can be represented as AWinSize2. WinSize2 represents the maximum number of AC coefficients that the second sliding window can associate, and AWinSize2 represents the actual number of AC coefficients associated with the second sliding window.
[0142] For example: if the first target AC coefficient is ranked 5th in the transformation coefficients, and the maximum number of AC coefficients that the second sliding window can associate is 2, then the AC coefficients ranked 3rd and 4th in the transformation coefficients can be determined as the AC coefficients associated with the first target AC coefficient. If the Golomb order corresponding to the 3rd AC coefficient is 3 and the Golomb order corresponding to the 4th AC coefficient is 5, then the sum of the second Golomb orders can be determined to be 8, the second value is 2, and the target Golomb order corresponding to the first target AC coefficient is 4.
[0143] Specifically, the target Columbus order corresponding to the first target AC coefficient can be determined by the following formula (3).
[0144] (3)
[0145] in, Denotes the second Columbus order sum. Indicates the second value. Indicates the target Columbus order.
[0146] In another alternative implementation, the first target AC coefficient is the AC coefficient ranked second in the transformation coefficients. In this implementation, the AC coefficient ranked first is determined as the AC coefficient associated with the first target AC coefficient, and the second Golomb order corresponding to the ranked first AC coefficient is determined as the target Golomb order.
[0147] Optionally, the method further includes:
[0148] If the second Golomb order corresponding to the second target AC coefficient associated with the first target AC coefficient and the second Golomb order corresponding to the third target AC coefficient associated with the first target AC coefficient are both less than or equal to the second preset threshold, the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient located after the first target AC coefficient are both determined to be first order.
[0149] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients, the second target AC coefficient is adjacent to the first target AC coefficient and is located before the third AC coefficient, and the third target AC coefficient is adjacent to the second target AC coefficient and is located before the second target AC coefficient.
[0150] In this embodiment, any third AC coefficient in the transformation coefficients is determined as the first target AC coefficient, the AC coefficients located before the first target AC coefficient are determined as the second target AC coefficients, and the AC coefficients located before the second target AC coefficients are determined as the third target AC coefficients. It should be understood that the first target AC coefficient in this embodiment is the AC coefficient that is ranked third or after the third in the transformation coefficients.
[0151] When the second Golomb order corresponding to the second target AC coefficient and the second Golomb order corresponding to the third target AC coefficient are both less than or equal to the second preset threshold, it indicates that the amplitude of the first target AC coefficient is small and the second Golomb order corresponding to the first target AC coefficient is small. In this case, the transformation coding method provided in this application embodiment can be used to determine the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient after the first target AC coefficient, and the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient after the first target AC coefficient can be directly determined as first order.
[0152] Optionally, the second preset threshold is 1.
[0153] In this embodiment, the relationship between the second Golomb order corresponding to the second target AC coefficient and the second Golomb order corresponding to the third target AC coefficient, and the second preset threshold, is related to the amplitude of the first target AC coefficient. Therefore, the Golomb value of the first target AC coefficient is determined based on the second Golomb order corresponding to the second and third target AC coefficients. Thus, the Golomb order corresponding to the AC coefficient is determined based on its amplitude. Subsequently, the AC coefficient is encoded based on this Golomb order, thereby reducing the bitstream generated during the encoding process and improving encoding efficiency.
[0154] Optionally, the method further includes:
[0155] If the attribute information of the point cloud is color information, and the second Columbus order corresponding to the AC coefficient is less than or equal to a third preset threshold, the AC coefficient is encoded according to the first-order Columbus index; or,
[0156] If the attribute information of the point cloud is color information, and the second Golomb order corresponding to the AC coefficient is greater than a third preset threshold and less than or equal to a fourth preset threshold, then the Y component of the AC coefficient is encoded according to the second Golomb order, and the U and V components of the AC coefficient are encoded according to the first-order Golomb exponent; or...
[0157] When the attribute information of the point cloud is color information, and the second Columbus order corresponding to the AC coefficient is greater than the fourth preset threshold, the Y component of the AC coefficient is encoded according to the second Columbus order, and the U and V components of the AC coefficient are encoded according to the fourth value, where the fourth value is the difference between the second Columbus order and the fourth preset threshold.
[0158] In this embodiment, when the point cloud attribute information is color information, if the second Columbus order corresponding to the AC coefficient is less than or equal to the third preset threshold, the best encoding effect can be obtained by encoding the AC coefficient according to the first-order Columbus index.
[0159] When the point cloud attribute information is color information, if the second Golomb order corresponding to the AC coefficient is greater than the third preset threshold and less than or equal to the fourth preset threshold, the Y component of the AC coefficient can be encoded according to the second Golomb order, and the U and V components of the AC coefficient can be encoded according to the first-order Golomb exponent to obtain the best encoding effect.
[0160] When the point cloud attribute information is color information, if the second Columbus order corresponding to the AC coefficient is greater than the fourth preset threshold, the Y component of the AC coefficient can be encoded according to the second Columbus order, and the U and V components of the AC coefficient can be encoded according to the fourth value to obtain the best encoding effect. Here, the fourth value is the difference between the second Columbus order and the fourth preset threshold.
[0161] Optionally, the third preset threshold is 1, and the fourth preset threshold is 4.
[0162] In this embodiment, when the attribute information of the point cloud is color information, the optimal Columbus index corresponding to each component of the AC coefficient is determined according to the relationship between the second Columbus order, the third preset threshold and the fourth preset threshold. Then, each component of the AC coefficient is encoded according to the optimal Columbus index corresponding to each component to obtain the encoding result of the AC coefficient, thereby improving the encoding efficiency.
[0163] The following explains in detail how to calculate the first Columbus order sum:
[0164] Optionally, the method further includes:
[0165] When the attribute information of the point cloud is color information, the first Columbus order and the amplitude of the Y component based on the corresponding AC coefficients are determined; or,
[0166] When the attribute information of the point cloud is reflectance information, the first Columbus order and the amplitude based on the corresponding AC coefficient are determined.
[0167] As described above, at least one AC coefficient associated with the third AC coefficient can be determined based on the order of the third AC coefficient in the transformation coefficients; the sum of the Columbus orders corresponding to at least one AC coefficient can be calculated to obtain the sum of the first Columbus orders.
[0168] An optional implementation involves taking the logarithm of the amplitude of the Y component of each AC coefficient associated with the third AC coefficient, and rounding the result up to obtain the Columbus order corresponding to the AC coefficient. Then, the sum of the Columbus orders corresponding to each associated AC coefficient is determined as the sum of the first Columbus orders.
[0169] Another alternative implementation is to take the logarithm of the amplitude of each AC coefficient associated with the third AC coefficient when the attribute information of the point cloud is reflectance information, and round the result up to obtain the Columbus order corresponding to the AC coefficient. Then, the sum of the Columbus orders corresponding to each associated AC coefficient is determined as the sum of the first Columbus orders.
[0170] The following explains in detail how to calculate the first Columbus order:
[0171] Optionally, determining the first Golomb order corresponding to the DC coefficient based on the amplitude of the DC coefficient in the transformation coefficients includes:
[0172] When the attribute information of the point cloud is color information, the first Columbus order corresponding to the DC coefficient is determined based on the Columbus order corresponding to the Y component, the Columbus order corresponding to the U component, and the Columbus order corresponding to the V component of the DC coefficient. The Columbus order is determined based on the amplitude of the corresponding component; or,
[0173] When the attribute information of the point cloud is reflectance information, the third value is rounded up to obtain the first Columbus order corresponding to the DC coefficient. The third value is determined based on the logarithm of the amplitude corresponding to the DC coefficient.
[0174] In this embodiment, when the attribute information of the point cloud is color information, the Golomb order corresponding to each component of the DC coefficient is calculated. Optionally, the logarithm of the amplitude of each component of the DC coefficient is taken, and the result is rounded up to obtain the Golomb order corresponding to that component. Then, based on the Golomb order corresponding to the Y component, the Golomb order corresponding to the U component, and the Golomb order corresponding to the V component, the first Golomb order corresponding to the DC coefficient is determined. For specific implementation details, please refer to the following embodiments.
[0175] When the attribute information of the point cloud is reflectance information, the first Golomb order corresponding to the DC coefficient can be determined by the following formula (4):
[0176] (4)
[0177] in, This represents the first Golomb order corresponding to the DC coefficients. This represents the magnitude corresponding to the DC coefficient.
[0178] In this embodiment, the Columbus order corresponding to the DC coefficient is determined based on the magnitude of the DC coefficient, thereby reducing the bitstream in the transform coefficient encoding process and thus improving the encoding efficiency.
[0179] Optionally, determining the first Columbus order corresponding to the DC coefficient based on the Columbus order corresponding to the Y component of the DC coefficient, the Columbus order corresponding to the U component of the DC coefficient, and the Columbus order corresponding to the V component of the DC coefficient includes:
[0180] The average of the Columbus orders corresponding to the Y component, the U component, and the V component is determined as the first Columbus order corresponding to the DC coefficient; or,
[0181] The Columbus order with the highest frequency among the Columbus orders corresponding to the Y component, the U component, and the V component is determined as the first Columbus order corresponding to the DC coefficient; or...
[0182] If the frequency of occurrence of the Columbus order corresponding to the Y component, the frequency of occurrence of the Columbus order corresponding to the U component, and the frequency of occurrence of the Columbus order corresponding to the V component are all the same, then the Columbus order corresponding to the Y component is determined as the first Columbus order corresponding to the DC coefficient.
[0183] When the attribute information of the point cloud is color information, an optional implementation method is to calculate the average value of the Columbus order corresponding to the Y component of the DC coefficient, the Columbus order corresponding to the U component of the DC coefficient, and the Columbus order corresponding to the V component of the DC coefficient, and determine the above average value as the first Columbus order corresponding to the DC coefficient.
[0184] Another optional implementation is to determine the most frequently occurring Columbus order among the Columbus order corresponding to the Y component of the DC coefficient, the Columbus order corresponding to the U component of the DC coefficient, and the Columbus order corresponding to the V component of the DC coefficient as the first Columbus order corresponding to the DC coefficient.
[0185] For example, if the Columbus order corresponding to the Y component is 4, the Columbus order corresponding to the U component is 4, and the Columbus order corresponding to the V component is 6, then the first Columbus order corresponding to the DC coefficient is determined to be 4.
[0186] Another optional implementation is that if the frequency of occurrence of the Columbus order corresponding to the Y component of the DC coefficient, the frequency of occurrence of the Columbus order corresponding to the U component of the DC coefficient, and the frequency of occurrence of the Columbus order corresponding to the V component of the DC coefficient are all the same, then the Columbus order corresponding to the Y component is determined as the first Columbus order corresponding to the DC coefficient.
[0187] For example, if the Columbus order corresponding to the Y component is 4, the Columbus order corresponding to the U component is 5, and the Columbus order corresponding to the V component is 6, then the first Columbus order corresponding to the DC coefficient is determined to be 4.
[0188] Optionally, determining the first Golomb order corresponding to the DC coefficient based on the amplitude of the DC coefficient in the transformation coefficients includes:
[0189] When the attribute parameter set of the point cloud includes the identification information representing the implementation of adaptive Golomb coding, the first Golomb order corresponding to the DC coefficient is determined according to the amplitude corresponding to the DC coefficient in the transform coefficient.
[0190] In this embodiment, the attribute parameter set (APS) of the point cloud can also be obtained. The attribute parameter set is equipped with the identifier adaptiveExpGolombFlag, which is used to indicate whether adaptive Golomb coding is performed.
[0191] Optionally, if the value of adaptiveExpGolombFlag is equal to 1, it indicates that the encoder performs adaptive Golomb coding. In this case, the encoder uses the transform coefficient coding method provided in this application to encode the transform coefficients, that is, it performs the following steps: determine the first Golomb order corresponding to the DC coefficient based on the amplitude of the DC coefficient in the transform coefficient.
[0192] Optionally, if the value of adaptiveExpGolombFlag is equal to 0, it means that adaptive Golomb coding is not performed at the encoder. In this case, the transformation coefficients of the point cloud are encoded according to the first-order Golomb exponent.
[0193] It should be understood that during the encoding process, the aforementioned attribute information parameter set is written into the target bitstream.
[0194] To facilitate understanding of the technical effects of the transform coefficient encoding method provided in the embodiments of this application, please refer to Table 1 and Table 2.
[0195] Table 1:
[0196]
[0197] Table 2:
[0198]
[0199] The values in Tables 1 and 2 are used to characterize the bitrate ratio between the bitstream generated by the transform coefficient encoding provided in the embodiments of this application and the bitstream generated using related technologies, under the condition of the same peak signal-to-noise ratio. It should be understood that the lower the value, the greater the reduction in bitrate.
[0200] For example, "-0.1%" in the second row and second column of Table 1 indicates that the bitstream corresponding to the Y component generated by the transform coefficient encoding provided in this application embodiment has a reduced bitrate of 0.1% compared to the bitstream corresponding to the Y component generated using related technologies.
[0201] Please see Figure 4 , Figure 4 This is a flowchart illustrating the transform coefficient decoding method provided in this embodiment. The transform coefficient decoding method provided in this embodiment includes the following steps:
[0202] S401, the decoding end obtains the target bitstream.
[0203] Optionally, the target bitstream includes the encoding results of the first Golomb order, the DC coefficients, the AC coefficients, and the attribute parameter set of the point cloud.
[0204] S402, the decoding end decodes the encoding result of the DC coefficients included in the target bitstream according to the first Golomb order included in the target bitstream, and obtains the DC coefficients.
[0205] In this step, after the decoding end obtains the first Golomb order by parsing the target bitstream, it can decode the encoding result of the DC coefficients based on the first Golomb order to obtain the DC coefficients.
[0206] S403, if the target bitstream includes the encoding result of AC coefficients, the decoding end performs at least one of the following operations:
[0207] The transform coefficients are determined based on the encoding result of each AC coefficient and the DC coefficient; or,
[0208] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, determine the second Columbus order corresponding to the AC coefficient;
[0209] Based on the DC coefficients and AC coefficients, the transformation coefficients are determined.
[0210] In this step, one optional implementation involves decoding the encoding result of the AC coefficients according to a preset order to obtain the AC coefficients; then, the DC coefficients and AC coefficients are combined and sorted to obtain the transform coefficients. Optionally, the preset order is 1.
[0211] In this step, another optional implementation is that the decoding end can determine the second Golomb order corresponding to the AC coefficients based on the amplitude corresponding to the first Golomb order and the first AC coefficients. For specific implementation details, please refer to subsequent embodiments. Here, the first AC coefficients are the AC coefficients in the transform coefficients excluding the last AC coefficient in the sorting. In this embodiment, the encoding result of the corresponding AC coefficients is decoded based on the second Golomb order to obtain the AC coefficients. Then, the DC coefficients and AC coefficients are combined and sorted to obtain the transform coefficients.
[0212] It should be understood that if the target bitstream does not include AC coefficients, the transform coefficients only include DC coefficients.
[0213] It should be understood that the transform coefficient decoding method provided in this embodiment is the inverse process of the transform coefficient encoding method described above, and will not be repeated here.
[0214] In this embodiment, compared to decoding AC coefficients based on a fixed Columbus order in related technologies, this embodiment can determine the Columbus order corresponding to each AC coefficient based on the first Columbus order corresponding to the DC coefficient and the amplitude of the AC coefficient, thereby improving decoding efficiency.
[0215] Optionally, determining the second Columbus order corresponding to the AC coefficients based on the amplitudes corresponding to the first Columbus order and the first AC coefficients includes:
[0216] For the second AC coefficient in the transformation coefficients, the second Golomb order corresponding to the second AC coefficient is determined according to the first Golomb order; the second AC coefficient is the AC coefficient that is sorted first in the transformation coefficients;
[0217] For each third AC coefficient in the transformation coefficients, the second Golomb order corresponding to the third AC coefficient is determined based on the sum of the first Golomb order corresponding to the third AC coefficient; the third AC coefficient is the AC coefficient in the transformation coefficients other than the second AC coefficient.
[0218] In an optional embodiment, the transform coefficients include multiple AC coefficients, specifically a second AC coefficient and a third AC coefficient. The second AC coefficient is the highest-ranking AC coefficient among the transform coefficients, and the third AC coefficient is any AC coefficient other than the second AC coefficient. In this embodiment, the second Golomb order corresponding to the second AC coefficient can be determined based on the first Golomb order.
[0219] In another alternative implementation, the transform coefficients include an AC coefficient, i.e., the transform coefficients include a second AC coefficient. In this implementation, the second Golomb order corresponding to the second AC coefficient can be determined based on the first Golomb order.
[0220] Optionally, determining the second Columbus order corresponding to the second AC coefficient based on the first Columbus order includes:
[0221] The difference between the first Columbus order and a preset value is determined as the second Columbus order corresponding to the second AC coefficient, where the preset value is a natural number.
[0222] In this embodiment, the second Columbus order corresponding to the second AC coefficient can be determined by the above formula (1), which will not be repeated here.
[0223] Optionally, determining the second Columbus order corresponding to the third AC coefficient based on the sum of the first Columbus orders corresponding to the third AC coefficient includes:
[0224] Based on the order of the third AC coefficient in the transformed AC coefficients, determine at least one AC coefficient associated with the third AC coefficient;
[0225] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the first Columbus order sum;
[0226] The result of dividing the first Columbus order by the first value is determined as the second Columbus order corresponding to the third AC coefficient, where the first value represents the number of at least one AC coefficient associated with the third AC coefficient.
[0227] In this embodiment, at least one AC coefficient associated with the third AC coefficient is determined according to the order of the third AC coefficient in the transformation coefficients. It should be understood that the AC coefficient associated with the third AC coefficient includes the AC coefficient adjacent to the third AC coefficient.
[0228] After determining at least one AC coefficient associated with the third AC coefficient, the Columbus order of each associated AC coefficient is obtained, and the sum of the Columbus orders of each associated AC coefficient is determined as the sum of the first Columbus orders.
[0229] In this embodiment, the second Columbus order corresponding to the third AC coefficient can be determined by the above formula (2), which will not be repeated here.
[0230] Optionally, determining at least one AC coefficient associated with the third AC coefficient based on the order of the third AC coefficients in the transformed AC coefficients includes:
[0231] If the third AC coefficient is ranked Nth or earlier in the transformed AC coefficients, all AC coefficients preceding the third AC coefficient are identified as at least one AC coefficient associated with the third AC coefficient, where N is a positive integer greater than or equal to 1; or,
[0232] If the third AC coefficient is ranked after the Nth position among the at least two AC coefficients, the N AC coefficients preceding the third AC coefficient are determined as at least one AC coefficient associated with the third AC coefficient.
[0233] In this embodiment, a first sliding window can be used to determine at least one AC coefficient associated with the third AC coefficient, and the first Golomb order and first value corresponding to the third AC coefficient can be calculated. For specific implementation details, please refer to the relevant embodiments in the encoding end.
[0234] Optionally, the method further includes:
[0235] If the target Columbus order corresponding to the first target AC coefficient is less than the first preset threshold, the second Columbus order corresponding to the first target AC coefficient and the second Columbus order corresponding to the AC coefficient after the first target AC coefficient are both determined to be first order.
[0236] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients.
[0237] If the target Golomb order corresponding to the first target AC coefficient is less than the first preset threshold, it indicates that the amplitude of the first target AC coefficient is small and the second Golomb order corresponding to the first target AC coefficient is small. In this case, the transformation decoding method provided in this application embodiment can be used to determine the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient after the first target AC coefficient, and both the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient after the first target AC coefficient can be directly determined as first order.
[0238] Optionally, before determining the second Columbus order corresponding to the first target AC coefficient and the second Columbus order corresponding to the AC coefficients following the first target AC coefficient as first order when the first target AC coefficient is less than a first preset threshold, the method further includes:
[0239] Based on the order of the first target AC coefficients in the transformation coefficients, determine at least one AC coefficient associated with the first target AC coefficients;
[0240] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the second Columbus order sum;
[0241] The result of the division between the second Columbus order and the second value is determined as the target Columbus order, where the second value represents the number of the at least one AC coefficient.
[0242] In this embodiment, a second sliding window can be used to determine at least one AC coefficient associated with the first target AC coefficient, and the second Golomb order and second numerical value corresponding to the first target AC coefficient can be calculated. For specific implementation details, please refer to the relevant embodiments in the encoding end.
[0243] Optionally, the method further includes:
[0244] If the second Golomb order corresponding to the second target AC coefficient associated with the first target AC coefficient and the second Golomb order corresponding to the third target AC coefficient associated with the first target AC coefficient are both less than or equal to the second preset threshold, the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient located after the first target AC coefficient are both determined to be first order.
[0245] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients, the second target AC coefficient is adjacent to the first target AC coefficient and is located before the third AC coefficient, and the third target AC coefficient is adjacent to the second target AC coefficient and is located before the second target AC coefficient.
[0246] When the second Golomb order corresponding to both the second and third target AC coefficients is less than or equal to the second preset threshold, it indicates that the amplitude of the first target AC coefficient is small, and the second Golomb order corresponding to the first target AC coefficient is small. In this case, the transform decoding method provided in this application can be skipped from determining the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficients following the first target AC coefficient. Instead, both the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficients following the first target AC coefficient can be directly determined as first order. For specific implementation methods, please refer to the relevant embodiments of the encoding end.
[0247] Optionally, the method further includes:
[0248] If the point cloud's attribute information is color information, and the second Columbus order corresponding to the AC coefficients is less than or equal to a third preset threshold, then the AC coefficients are decoded based on the first-order Columbus exponent; or...
[0249] If the point cloud's attribute information is color information, and the second Golomb order corresponding to the AC coefficients is greater than a third preset threshold and less than or equal to a fourth preset threshold, then the Y component of the AC coefficients is decoded based on the second Golomb order, and the U and V components of the AC coefficients are decoded based on the first-order Golomb exponent; or...
[0250] When the attribute information of the point cloud is color information, and the second Columbus order corresponding to the AC coefficient is greater than the fourth preset threshold, the Y component of the AC coefficient is decoded according to the second Columbus order, and the U and V components of the AC coefficient are decoded according to the fourth value, where the fourth value is the difference between the second Columbus order and the fourth preset threshold.
[0251] In this embodiment, when the point cloud attribute information is color information, if the second Columbus order corresponding to the AC coefficient is less than or equal to the third preset threshold, the best decoding effect can be obtained by decoding the AC coefficient according to the first-order Columbus exponent.
[0252] When the point cloud attribute information is color information, if the second Golomb order corresponding to the AC coefficient is greater than the third preset threshold and less than or equal to the fourth preset threshold, the Y component of the AC coefficient can be decoded according to the second Golomb order, and the U and V components of the AC coefficient can be decoded according to the first-order Golomb exponent to obtain the best decoding effect.
[0253] When the point cloud attribute information is color information, if the second Golomb order corresponding to the AC coefficient is greater than the fourth preset threshold, the Y component of the AC coefficient can be decoded according to the second Golomb order, and the U and V components of the AC coefficient can be decoded according to the fourth value to obtain the best decoding effect. Here, the fourth value is the difference between the second Golomb order and the fourth preset threshold.
[0254] Optionally, the method further includes:
[0255] When the attribute information of the point cloud is color information, the first Columbus order and the amplitude of the Y component based on the corresponding AC coefficients are determined; or,
[0256] When the attribute information of the point cloud is reflectivity information, the first Columbus order and the amplitude based on the corresponding AC coefficient are determined.
[0257] An optional implementation involves taking the logarithm of the amplitude of the Y component of each AC coefficient associated with the third AC coefficient, and rounding the result up to obtain the Columbus order corresponding to the AC coefficient. Then, the sum of the Columbus orders corresponding to each associated AC coefficient is determined as the sum of the first Columbus orders.
[0258] Another alternative implementation is to take the logarithm of the amplitude of each AC coefficient associated with the third AC coefficient when the attribute information of the point cloud is reflectance information, and round the result up to obtain the Columbus order corresponding to the AC coefficient. Then, the sum of the Columbus orders corresponding to each associated AC coefficient is determined as the sum of the first Columbus orders.
[0259] Optionally, the step of decoding the encoding result of the DC coefficients included in the target bitstream based on the first Golomb order included in the target bitstream to obtain the DC coefficients includes:
[0260] When adaptive Columbus decoding is performed based on the identification information represented by the attribute parameter set of the target bitstream, the encoding result of the DC coefficients included in the target bitstream is decoded according to the first Columbus order included in the target bitstream to obtain the DC coefficients.
[0261] In this embodiment, the target bitstream includes a set of attribute information parameters of the point cloud. The attribute information parameter set is set with the identifier adaptiveExpGolombFlag, which is used to characterize whether adaptive Columbus decoding is performed.
[0262] Optionally, if the value of adaptiveExpGolombFlag is equal to 1, it indicates that the decoding end performs adaptive Columbus decoding. In this case, the decoding end applies the transform coefficient decoding method provided in this application to decode the transform coefficients, that is, it performs the following steps: according to the first Columbus order included in the target bitstream, it decodes the encoding result of the DC coefficients included in the target bitstream to obtain the DC coefficients.
[0263] Optionally, if the value of adaptiveExpGolombFlag is equal to 0, it means that the decoder does not perform adaptive Columbus decoding. In this case, the transformation coefficients of the point cloud are decoded according to the first-order Columbus exponent.
[0264] The transform coefficient encoding method provided in this application can be executed by a transform coefficient encoding device. This application uses an example of a transform coefficient encoding device executing the transform coefficient encoding method to illustrate the transform coefficient encoding device provided in this application.
[0265] like Figure 5As shown in the figure, this application embodiment also provides a transform coefficient encoding device 500, including:
[0266] The acquisition module 501 is used to acquire the transformation coefficients corresponding to the point cloud.
[0267] The determining module 502 is used to determine the first Golomb order corresponding to the DC coefficient based on the amplitude corresponding to the DC coefficient in the transformation coefficient;
[0268] Encoding module 503 is configured to generate a target bitstream based on the first Golomb order corresponding to the DC coefficients and the encoding result of the DC coefficients, when the transform coefficients only include DC coefficients; or,
[0269] When the transformation coefficients include DC coefficients and AC coefficients, perform at least one of the following operations:
[0270] Based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient, a target bitstream is generated; the second Golomb order corresponding to each AC coefficient is a preset order; or,
[0271] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, the second Columbus order corresponding to the AC coefficient is determined, wherein the first AC coefficient is the AC coefficient excluding the last AC coefficient in the sorted transformation coefficients.
[0272] The target bitstream is generated based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient.
[0273] Optionally, the encoding module 503 is specifically used for:
[0274] For the second AC coefficient in the transformation coefficients, the second Golomb order corresponding to the second AC coefficient is determined according to the first Golomb order; the second AC coefficient is the AC coefficient that is sorted first in the transformation coefficients;
[0275] For each third AC coefficient in the transformation coefficients, the second Golomb order corresponding to the third AC coefficient is determined based on the sum of the first Golomb order corresponding to the third AC coefficient; the third AC coefficient is the AC coefficient in the transformation coefficients other than the second AC coefficient.
[0276] Optionally, the encoding module 503 is further specifically used for:
[0277] The difference between the first Columbus order and a preset value is determined as the second Columbus order corresponding to the second AC coefficient, where the preset value is a natural number.
[0278] Optionally, the encoding module 503 is further specifically used for:
[0279] Based on the order of the third AC coefficient in the transformation coefficients, determine at least one AC coefficient associated with the third AC coefficient;
[0280] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the first Columbus order sum;
[0281] The result of dividing the first Columbus order by the first value is determined as the second Columbus order corresponding to the third AC coefficient, where the first value represents the number of at least one AC coefficient associated with the third AC coefficient.
[0282] Optionally, the encoding module 503 is further specifically used for:
[0283] If the third AC coefficient is ranked Nth or earlier in the transformation coefficients, all AC coefficients preceding the third AC coefficient are identified as at least one AC coefficient associated with the third AC coefficient, where N is a positive integer greater than or equal to 1; or,
[0284] If the third AC coefficient is ranked after the Nth position among the at least two AC coefficients, the N AC coefficients preceding the third AC coefficient are determined as at least one AC coefficient associated with the third AC coefficient.
[0285] Optionally, the encoding module 503 is further specifically used for:
[0286] If the target Columbus order corresponding to the first target AC coefficient is less than the first preset threshold, the second Columbus order corresponding to the first target AC coefficient and the second Columbus order corresponding to the AC coefficient after the first target AC coefficient are both determined to be first order.
[0287] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients.
[0288] Optionally, the encoding module 503 is further specifically used for:
[0289] Based on the order of the first target AC coefficients in the transformation coefficients, determine at least one AC coefficient associated with the first target AC coefficients;
[0290] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the second Columbus order sum;
[0291] The result of the division between the second Columbus order and the second value is determined as the target Columbus order, where the second value represents the number of the at least one AC coefficient.
[0292] Optionally, the encoding module 503 is further specifically used for:
[0293] If the second Golomb order corresponding to the second target AC coefficient associated with the first target AC coefficient and the second Golomb order corresponding to the third target AC coefficient associated with the first target AC coefficient are both less than or equal to the second preset threshold, the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient located after the first target AC coefficient are both determined to be first order.
[0294] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients, the second target AC coefficient is adjacent to the first target AC coefficient and is located before the third AC coefficient, and the third target AC coefficient is adjacent to the second target AC coefficient and is located before the second target AC coefficient.
[0295] Optionally, the encoding module 503 is further specifically used for:
[0296] If the attribute information of the point cloud is color information, and the second Columbus order corresponding to the AC coefficient is less than or equal to a third preset threshold, the AC coefficient is encoded according to the first-order Columbus index; or,
[0297] If the attribute information of the point cloud is color information, and the second Golomb order corresponding to the AC coefficient is greater than a third preset threshold and less than or equal to a fourth preset threshold, then the Y component of the AC coefficient is encoded according to the second Golomb order, and the U and V components of the AC coefficient are encoded according to the first-order Golomb exponent; or...
[0298] When the attribute information of the point cloud is color information, and the second Columbus order corresponding to the AC coefficient is greater than the fourth preset threshold, the Y component of the AC coefficient is encoded according to the second Columbus order, and the U and V components of the AC coefficient are encoded according to the fourth value, where the fourth value is the difference between the second Columbus order and the fourth preset threshold.
[0299] Optionally, the encoding module 503 is further specifically used for:
[0300] When the attribute information of the point cloud is color information, the first Columbus order and the amplitude of the Y component based on the corresponding AC coefficients are determined; or,
[0301] When the attribute information of the point cloud is reflectance information, the first Columbus order and the amplitude based on the corresponding AC coefficient are determined.
[0302] Optionally, the determining module 502 is specifically used for:
[0303] When the attribute information of the point cloud is color information, the first Columbus order corresponding to the DC coefficient is determined based on the Columbus order corresponding to the Y component, the Columbus order corresponding to the U component, and the Columbus order corresponding to the V component of the DC coefficient. The Columbus order is determined based on the amplitude of the corresponding component; or,
[0304] When the attribute information of the point cloud is reflectance information, the third value is rounded up to obtain the first Columbus order corresponding to the DC coefficient. The third value is determined based on the logarithm of the amplitude corresponding to the DC coefficient.
[0305] Optionally, the determining module 502 is further specifically used for:
[0306] The average of the Columbus orders corresponding to the Y component, the U component, and the V component is determined as the first Columbus order corresponding to the DC coefficient; or,
[0307] The Columbus order with the highest frequency among the Columbus orders corresponding to the Y component, the U component, and the V component is determined as the first Columbus order corresponding to the DC coefficient; or...
[0308] If the frequency of occurrence of the Columbus order corresponding to the Y component, the frequency of occurrence of the Columbus order corresponding to the U component, and the frequency of occurrence of the Columbus order corresponding to the V component are all the same, then the Columbus order corresponding to the Y component is determined as the first Columbus order corresponding to the DC coefficient.
[0309] Optionally, the determining module 502 is further specifically used for:
[0310] When the attribute parameter set of the point cloud includes the identification information representing the implementation of adaptive Golomb coding, the first Golomb order corresponding to the DC coefficient is determined according to the amplitude corresponding to the DC coefficient in the transform coefficient.
[0311] Compared to related technologies that encode transform coefficients based on a fixed Columbus order, this embodiment determines the Columbus order corresponding to the DC coefficient and the Columbus order corresponding to each AC coefficient based on the amplitude of the DC coefficient and the amplitude of the AC coefficient, thereby reducing the bitstream in the transform coefficient encoding process and improving encoding efficiency.
[0312] This device embodiment is the same as the one described above. Figure 3 The transformation coefficient encoding method embodiment shown above corresponds to the various implementation processes and methods of the encoding end in the above method embodiment, which can be applied to this device embodiment and achieve the same technical effect.
[0313] The transform coefficient decoding method provided in this application can be executed by a transform coefficient decoding device. This application uses an example of a transform coefficient decoding device executing the transform coefficient decoding method to illustrate the transform coefficient decoding device provided in this application.
[0314] like Figure 6 As shown in the figure, this application embodiment also provides a transform coefficient decoding device 600, including:
[0315] Module 601 is used to acquire the target bitstream;
[0316] The first decoding module 602 is used to decode the encoding result of the DC coefficients included in the target code stream according to the first Golomb order included in the target code stream, and obtain the DC coefficients.
[0317] The second decoding module 603 is configured to perform at least one of the following operations when the target bitstream includes the encoding result of AC coefficients:
[0318] Based on the encoding result of each AC coefficient and the DC coefficient, the transform coefficients are determined, wherein the second Golomb order corresponding to each AC coefficient is a preset order; or...
[0319] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, the second Columbus order corresponding to the AC coefficient is determined. The first AC coefficient is the AC coefficient in the transformation coefficients excluding the last AC coefficient in the sorting.
[0320] Based on the DC coefficients and AC coefficients, the transform coefficients are determined; the AC coefficients are obtained by decoding the encoding result of the AC coefficients based on the corresponding second Golomb order.
[0321] Optionally, the second decoding module 603 is specifically used for:
[0322] For the second AC coefficient in the transformation coefficients, the second Golomb order corresponding to the second AC coefficient is determined according to the first Golomb order; the second AC coefficient is the AC coefficient that is sorted first in the transformation coefficients;
[0323] For each third AC coefficient in the transformation coefficients, the second Golomb order corresponding to the third AC coefficient is determined based on the sum of the first Golomb order corresponding to the third AC coefficient; the third AC coefficient is the AC coefficient in the transformation coefficients other than the second AC coefficient.
[0324] Optionally, the second decoding module 603 is further specifically used for:
[0325] The difference between the first Columbus order and a preset value is determined as the second Columbus order corresponding to the second AC coefficient, where the preset value is a natural number.
[0326] Optionally, the second decoding module 603 is further specifically used for:
[0327] Based on the order of the third AC coefficient in the transformed AC coefficients, determine at least one AC coefficient associated with the third AC coefficient;
[0328] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the first Columbus order sum;
[0329] The result of dividing the first Columbus order by the first value is determined as the second Columbus order corresponding to the third AC coefficient, where the first value represents the number of at least one AC coefficient associated with the third AC coefficient.
[0330] Optionally, the second decoding module 603 is further specifically used for:
[0331] If the third AC coefficient is ranked Nth or earlier in the transformed AC coefficients, all AC coefficients preceding the third AC coefficient are identified as at least one AC coefficient associated with the third AC coefficient, where N is a positive integer greater than or equal to 1; or,
[0332] If the third AC coefficient is ranked after the Nth position among the at least two AC coefficients, the N AC coefficients preceding the third AC coefficient are determined as at least one AC coefficient associated with the third AC coefficient.
[0333] Optionally, the second decoding module 603 is further specifically used for:
[0334] If the target Columbus order corresponding to the first target AC coefficient is less than the first preset threshold, the second Columbus order corresponding to the first target AC coefficient and the second Columbus order corresponding to the AC coefficient after the first target AC coefficient are both determined to be first order.
[0335] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients.
[0336] Optionally, the second decoding module 603 is further specifically used for:
[0337] Based on the order of the first target AC coefficients in the transformation coefficients, determine at least one AC coefficient associated with the first target AC coefficients;
[0338] Calculate the sum of the Columbus orders corresponding to the at least one AC coefficient to obtain the second Columbus order sum;
[0339] The result of the division between the second Columbus order and the second value is determined as the target Columbus order, where the second value represents the number of the at least one AC coefficient.
[0340] Optionally, the second decoding module 603 is further specifically used for:
[0341] If the second Golomb order corresponding to the second target AC coefficient associated with the first target AC coefficient and the second Golomb order corresponding to the third target AC coefficient associated with the first target AC coefficient are both less than or equal to the second preset threshold, the second Golomb order corresponding to the first target AC coefficient and the second Golomb order corresponding to the AC coefficient located after the first target AC coefficient are both determined to be first order.
[0342] Wherein, the first target AC coefficient is any third AC coefficient among the transformation coefficients, the second target AC coefficient is adjacent to the first target AC coefficient and is located before the third AC coefficient, and the third target AC coefficient is adjacent to the second target AC coefficient and is located before the second target AC coefficient.
[0343] Optionally, the second decoding module 603 is further specifically used for:
[0344] If the point cloud's attribute information is color information, and the second Columbus order corresponding to the AC coefficients is less than or equal to a third preset threshold, then the AC coefficients are decoded based on the first-order Columbus exponent; or...
[0345] If the point cloud's attribute information is color information, and the second Golomb order corresponding to the AC coefficients is greater than a third preset threshold and less than or equal to a fourth preset threshold, then the Y component of the AC coefficients is decoded based on the second Golomb order, and the U and V components of the AC coefficients are decoded based on the first-order Golomb exponent; or...
[0346] When the attribute information of the point cloud is color information, and the second Columbus order corresponding to the AC coefficient is greater than the fourth preset threshold, the Y component of the AC coefficient is decoded according to the second Columbus order, and the U and V components of the AC coefficient are decoded according to the fourth value, where the fourth value is the difference between the second Columbus order and the fourth preset threshold.
[0347] Optionally, the second decoding module 603 is further specifically used for:
[0348] When the attribute information of the point cloud is color information, the first Columbus order and the amplitude of the Y component based on the corresponding AC coefficients are determined; or,
[0349] When the attribute information of the point cloud is reflectivity information, the first Columbus order and the amplitude based on the corresponding AC coefficient are determined.
[0350] Optionally, the first decoding module 602 is specifically used for:
[0351] When adaptive Columbus decoding is performed based on the identification information represented by the attribute parameter set of the target bitstream, the encoding result of the DC coefficients included in the target bitstream is decoded according to the first Columbus order included in the target bitstream to obtain the DC coefficients.
[0352] Compared to related technologies that decode AC coefficients based on a fixed Columbus order, this embodiment can determine the Columbus order corresponding to each AC coefficient based on the first Columbus order corresponding to the DC coefficient and the amplitude of the AC coefficient, thereby improving decoding efficiency.
[0353] The transform coefficient decoding device provided in this application embodiment can achieve... Figure 4 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0354] The transform coefficient encoding device and transform coefficient decoding device in the embodiments of this application can be electronic devices, such as electronic devices with an operating system, or components in electronic devices, such as integrated circuits or chips. The electronic device can be a terminal or other devices besides a terminal. For example, the terminal can include, but is not limited to, the types of terminals listed above, and other devices can be servers, network attached storage (NAS), etc., and the embodiments of this application do not specifically limit them.
[0355] The transform coefficient encoding device provided in this application embodiment can achieve... Figure 3 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0356] The transform coefficient decoding device provided in this application embodiment can achieve... Figure 4 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0357] Optionally, such as Figure 7 As shown, this application embodiment also provides a communication device 700, including a processor 701 and a memory 702. The memory 702 stores a program or instructions that can be executed on the processor 701. For example, when the communication device 700 is a terminal, when the program or instructions are executed by the processor 701, they implement the various steps of the above-described transform coefficient encoding method embodiment, or implement the various steps of the above-described transform coefficient decoding method embodiment, and can achieve the same technical effect.
[0358] This application embodiment also provides a terminal, including 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, for example... Figure 3 The steps in the method embodiments shown, or implementations such as Figure 4 The steps in the method embodiment shown are illustrated. This terminal embodiment corresponds to the above-described terminal-side method embodiment. All implementation processes and methods of the above-described method embodiments can be applied to this terminal embodiment and achieve the same technical effect. Specifically, Figure 8 A schematic diagram of the hardware structure of a terminal to implement an embodiment of this application.
[0359] The terminal 800 includes, but is not limited to, components such as: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, and processor 810.
[0360] Those skilled in the art will understand that the terminal 800 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 810 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The terminal structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0361] It should be understood that, in this embodiment, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042. The GPU 8041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0362] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 801 can transmit it to the processor 810 for processing; the radio frequency unit 801 can also send uplink data to the network-side device. Typically, the radio frequency unit 801 includes, but is not limited to, antennas, amplifiers, transceivers, couplers, low-noise amplifiers, and duplexers.
[0363] The memory 809 can be used to store software programs or instructions, as well as various data. The memory 809 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 809 may include volatile memory or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 809 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0364] Processor 810 may include one or more processing units; optionally, processor 810 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 810.
[0365] The processor 810 is used to perform the following operations:
[0366] Obtain the transformation coefficients corresponding to the point cloud;
[0367] Based on the amplitude corresponding to the DC coefficient in the transformation coefficients, determine the first Golomb order corresponding to the DC coefficient;
[0368] When the transform coefficients only include DC coefficients, the target bitstream is generated based on the first Golomb order corresponding to the DC coefficients and the encoding result of the DC coefficients; or,
[0369] When the transformation coefficients include DC coefficients and AC coefficients, perform at least one of the following operations:
[0370] Based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient, a target bitstream is generated; or,
[0371] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, determine the second Columbus order corresponding to the AC coefficient;
[0372] The target bitstream is generated based on the first Golomb order corresponding to the DC coefficients, the encoding result of the DC coefficients, and the encoding result of each AC coefficient.
[0373] Alternatively, processor 810 may also be used to perform the following operations:
[0374] Obtain the target bitstream;
[0375] Based on the first Golomb order included in the target bitstream, the encoding result of the DC coefficients included in the target bitstream is decoded to obtain the DC coefficients;
[0376] If the target bitstream includes the encoding result of AC coefficients, perform at least one of the following operations:
[0377] The transform coefficients are determined based on the encoding result of each AC coefficient and the DC coefficient; or,
[0378] Based on the amplitude corresponding to the first Columbus order and the first AC coefficient, determine the second Columbus order corresponding to the AC coefficient;
[0379] Based on the DC coefficients and AC coefficients, the transformation coefficients are determined.
[0380] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described transform coefficient encoding method embodiment or the various processes of the above-described transform coefficient decoding method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0381] The processor mentioned above is the processor in the terminal described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk. In some examples, the readable storage medium may be a non-transient readable storage medium.
[0382] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described transform coefficient encoding method embodiment, or to implement the various processes of the above-described transform coefficient decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0383] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0384] This application also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described transform coefficient encoding method embodiment or the various processes of the above-described transform coefficient decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0385] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0386] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of computer software products plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes several instructions to cause the terminal or network-side device to execute the methods described in the various embodiments of this application.
[0387] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other implementations under the guidance of this application without departing from the spirit and scope of the claims. All of these implementations are within the protection scope of this application.
Claims
1. A method of transform coefficient coding, characterized by, The method comprises: A coding end obtains transform coefficients corresponding to a point cloud; The coding end determines a first Columb order corresponding to a DC coefficient according to an amplitude value of the DC coefficient in the transform coefficients; In a case where the transform coefficients comprise a DC coefficient and an AC coefficient, the coding end performs the following operations: determining a second Columb order corresponding to an AC coefficient according to the first Columb order and an amplitude value of a first AC coefficient, the first AC coefficient being an AC coefficient other than an AC coefficient at the last in the order of the transform coefficients; generating a target code stream based on the first Columb order corresponding to the DC coefficient, an encoding result of the DC coefficient, and an encoding result of each AC coefficient, wherein the encoding result of the AC coefficient is obtained by Columb encoding the AC coefficient based on the corresponding second Columb order.
2. The method of claim 1, wherein, The determining of the second Columb order corresponding to the AC coefficient according to the first Columb order and the amplitude value of the first AC coefficient comprises: For a second AC coefficient in the transform coefficients, the coding end determines a second Columb order corresponding to the second AC coefficient according to the first Columb order, the second AC coefficient being an AC coefficient at the first in the order of the transform coefficients; For each third AC coefficient in the transform coefficients, the coding end determines a second Columb order corresponding to the third AC coefficient according to the first Columb order corresponding to the third AC coefficient and, the third AC coefficient being an AC coefficient other than the second AC coefficient.
3. The method of claim 2, wherein, The determining of the second Columb order corresponding to the second AC coefficient according to the first Columb order comprises: The coding end determines a difference value between the first Columb order and a preset numerical value as the second Columb order corresponding to the second AC coefficient, the preset numerical value being a natural number.
4. The method of claim 2, wherein, The determining of the second Columb order corresponding to the third AC coefficient according to the first Columb order corresponding to the third AC coefficient and comprises: The coding end determines at least one AC coefficient associated with the third AC coefficient according to an order of the third AC coefficient in the transform coefficients; The coding end calculates a sum value of Columb orders corresponding to the at least one AC coefficient to obtain the first Columb order and; The coding end determines a division result between the first Columb order and a first numerical value as the second Columb order corresponding to the third AC coefficient, the first numerical value representing a quantity of the at least one AC coefficient associated with the third AC coefficient.
5. The method of claim 4, wherein, The determining of the at least one AC coefficient associated with the third AC coefficient according to the order of the third AC coefficient in the transform coefficients comprises: In a case where the order of the third AC coefficient in the transform coefficients is the Nth or before the Nth, the coding end determines all AC coefficients before the third AC coefficient as the at least one AC coefficient associated with the third AC coefficient, N being a positive integer greater than or equal to 1; or, In a case that the third AC coefficient is the Nth in the order of the AC coefficients, N AC coefficients before the third AC coefficient are determined as at least one AC coefficient associated with the third AC coefficient.
6. The method of claim 1, wherein, The method further comprises: In a case that the target Columb order corresponding to the first target AC coefficient is less than a first preset threshold, the second Columb order corresponding to the first target AC coefficient and the second Columb order corresponding to the AC coefficient after the first target AC coefficient are both determined as one order by the encoding end. The first target AC coefficient is any third AC coefficient in the transform coefficients, the third AC coefficient is an AC coefficient other than a second AC coefficient in the transform coefficients, and the second AC coefficient is the first AC coefficient in the order of the transform coefficients.
7. The method of claim 6, wherein, Before the case that the second Columb order corresponding to the first target AC coefficient is less than a first preset threshold, the method further comprises: The encoding end determines at least one AC coefficient associated with the first target AC coefficient according to the order of the first target AC coefficient in the transform coefficients; The encoding end calculates a sum value of the Columb orders corresponding to the at least one AC coefficient to obtain a second Columb order sum; The encoding end determines a division result between the second Columb order sum and a second value as the target Columb order, and the second value represents the number of the at least one AC coefficient.
8. The method of claim 1, wherein, The method further comprises: In a case that the second Columb order corresponding to the second target AC coefficient associated with the first target AC coefficient and the second Columb order corresponding to the third target AC coefficient associated with the first target AC coefficient are both less than or equal to a second preset threshold, the second Columb order corresponding to the first target AC coefficient and the second Columb order corresponding to the AC coefficient after the first target AC coefficient are both determined as one order by the encoding end. The first target AC coefficient is any third AC coefficient in the transform coefficients, the second target AC coefficient is adjacent to the first target AC coefficient and before the third AC coefficient, the third target AC coefficient is adjacent to the second target AC and before the second target AC coefficient, the third AC coefficient is an AC coefficient other than a second AC coefficient in the transform coefficients, and the second AC coefficient is the first AC coefficient in the order of the transform coefficients.
9. The method of claim 1, wherein, The method further comprises: In a case that the attribute information of the point cloud is color information and the second Columb order corresponding to the AC coefficient is less than or equal to a third preset threshold, the encoding end encodes the AC coefficient according to a first Columb index; or, In a case where the attribute information of the point cloud is color information and a second Columb order corresponding to the AC coefficient is greater than a third preset threshold and less than or equal to a fourth preset threshold, a Y component of the AC coefficient is encoded according to the second Columb order, and U and V components of the AC coefficient are encoded according to a first Columb order; or In a case where the attribute information of the point cloud is color information and a second Columb order corresponding to the AC coefficient is greater than a fourth preset threshold, a Y component of the AC coefficient is encoded according to the second Columb order, and U and V components of the AC coefficient are encoded according to a fourth value, which is a difference between the second Columb order and the fourth preset threshold.
10. The method of claim 2, wherein, The method further comprises: In a case where the attribute information of the point cloud is color information, the first Columb order is determined based on a magnitude of a Y component corresponding to the AC coefficient; or In a case where the attribute information of the point cloud is reflectivity information, the first Columb order is determined based on a magnitude of the AC coefficient.
11. The method of claim 1, wherein, The first Columb order corresponding to the DC coefficient is determined based on a magnitude of the DC coefficient. In a case where the attribute information of the point cloud is color information, the first Columb order corresponding to the DC coefficient is determined based on a Columb order corresponding to a Y component of the DC coefficient, a Columb order corresponding to a U component of the DC coefficient, and a Columb order corresponding to a V component of the DC coefficient, and the Columb order is determined based on a magnitude of a corresponding component; or In a case where the attribute information of the point cloud is reflectivity information, a third value is rounded up to obtain the first Columb order corresponding to the DC coefficient, and the third value is determined based on a logarithm of the magnitude of the DC coefficient.
12. The method of claim 11, wherein, The first Columb order corresponding to the DC coefficient is determined based on a Columb order corresponding to a Y component of the DC coefficient, a Columb order corresponding to a U component of the DC coefficient, and a Columb order corresponding to a V component of the DC coefficient, and the Columb order is determined based on a magnitude of a corresponding component; or The first Columb order corresponding to the DC coefficient is determined based on an average of the Columb order corresponding to the Y component, the Columb order corresponding to the U component, and the Columb order corresponding to the V component; or The first Columb order corresponding to the DC coefficient is determined based on a Columb order with the highest frequency among the Columb order corresponding to the Y component, the Columb order corresponding to the U component, and the Columb order corresponding to the V component; or In a case where the frequency of the Columb order corresponding to the Y component, the frequency of the Columb order corresponding to the U component, and the frequency of the Columb order corresponding to the V component are all the same, the Columb order corresponding to the Y component is determined as the first Columb order corresponding to the DC coefficient.
13. The method of claim 1, wherein, The first Columb order corresponding to the DC coefficient is determined based on a magnitude of the DC coefficient. The coding end determines a first Golomb order corresponding to a DC coefficient in the transform coefficients according to an amplitude value corresponding to the DC coefficient, in a case that the coding end represents a situation of performing adaptive Golomb coding by identity information included in an attribute parameter set of the point cloud.
14. A method of decoding transform coefficients, the method comprising: The method comprises: A decoding end acquires a target code stream; The decoding end decodes a coding result of a DC coefficient included in the target code stream according to a first Golomb order included in the target code stream, to obtain the DC coefficient; In a case that the target code stream includes a coding result of an AC coefficient, the decoding end performs the following operations: determines a second Golomb order corresponding to an AC coefficient according to the first Golomb order and an amplitude value corresponding to a first AC coefficient, the first AC coefficient being an AC coefficient other than an AC coefficient at the last in the order in the transform coefficients; determines the transform coefficients based on the DC coefficient and the AC coefficient, the coding result of the AC coefficient being decoded based on the second Golomb order corresponding to the AC coefficient.
15. The method of claim 14, wherein, The determining of the second Golomb order corresponding to the AC coefficient according to the first Golomb order and the amplitude value corresponding to the first AC coefficient comprises: The decoding end determines a second Golomb order corresponding to a second AC coefficient in the transform coefficients according to the first Golomb order, the second AC coefficient being an AC coefficient at the first in the order in the transform coefficients; The decoding end determines a second Golomb order corresponding to a third AC coefficient in the transform coefficients according to the first Golomb order corresponding to the third AC coefficient and a sum value of Golomb orders corresponding to at least one AC coefficient associated with the third AC coefficient, the third AC coefficient being an AC coefficient other than the second AC coefficient.
16. The method of claim 15, wherein, The determining of the second Golomb order corresponding to the second AC coefficient according to the first Golomb order comprises: The decoding end determines a difference value between the first Golomb order and a preset numerical value as the second Golomb order corresponding to the second AC coefficient, the preset numerical value being a natural number.
17. The method of claim 15, wherein, The determining of the second Golomb order corresponding to the third AC coefficient according to the first Golomb order corresponding to the third AC coefficient and the sum value of Golomb orders corresponding to at least one AC coefficient associated with the third AC coefficient comprises: The decoding end determines at least one AC coefficient associated with the third AC coefficient according to an order of the third AC coefficient in the transform coefficients; The decoding end calculates a sum value of Golomb orders corresponding to the at least one AC coefficient to obtain the first Golomb order and; The decoding end determines a division result between the first Golomb order and a first numerical value as the second Golomb order corresponding to the third AC coefficient, the first numerical value representing a number of the at least one AC coefficient associated with the third AC coefficient.
18. The method of claim 17, wherein, The determining of the at least one AC coefficient associated with the third AC coefficient according to the order of the third AC coefficient in the transform coefficients comprises: The decoding end determines all AC coefficients before the third AC coefficient as at least one AC coefficient associated with the third AC coefficient, in a case that the third AC coefficient is in an Nth position or before the Nth position in the order of the transform coefficients, N being a positive integer greater than or equal to 1; or The decoding end determines N AC coefficients before the third AC coefficient as at least one AC coefficient associated with the third AC coefficient, in a case that the third AC coefficient is after an Nth position in the order of the AC coefficients.
19. The method of claim 15, wherein, The method further comprises: The decoding end determines the second Golomb order corresponding to the first target AC coefficient and the second Golomb orders corresponding to the AC coefficients after the first target AC coefficient as first order, in a case that a target Golomb order corresponding to the first target AC coefficient is less than a first preset threshold. The first target AC coefficient is any third AC coefficient in the transform coefficients.
20. The method of claim 19, wherein, Before the first target AC coefficient corresponding to the target Golomb order is less than the first preset threshold, the method further comprises: The decoding end determines at least one AC coefficient associated with the first target AC coefficient according to the order of the first target AC coefficient in the transform coefficients; The decoding end calculates a sum value of Golomb orders corresponding to the at least one AC coefficient to obtain a second Golomb order sum; The decoding end determines a division result between the second Golomb order sum and a second value as the target Golomb order, the second value representing the number of the at least one AC coefficient.
21. The method of claim 15, wherein, The method further comprises: The decoding end determines the second Golomb order corresponding to the first target AC coefficient and the second Golomb orders corresponding to the AC coefficients after the first target AC coefficient as first order, in a case that a second Golomb order corresponding to a second target AC coefficient associated with the first target AC coefficient and a second Golomb order corresponding to a third target AC coefficient associated with the first target AC coefficient are both less than or equal to a second preset threshold. The first target AC coefficient is any third AC coefficient in the transform coefficients, the second target AC coefficient is adjacent to the first target AC coefficient and before the third AC coefficient, and the third target AC coefficient is adjacent to the second target AC and before the second target AC.
22. The method of claim 14, wherein, The method further comprises: The decoding end decodes the AC coefficient according to a first Golomb index, in a case that attribute information of a point cloud is color information and a second Golomb order corresponding to the AC coefficient is less than or equal to a third preset threshold; or The decoding end decodes the AC coefficient according to a first Golomb index, in a case that attribute information of a point cloud is color information and a second Golomb order corresponding to the AC coefficient is less than or equal to a third preset threshold; or In a case where the attribute information of the point cloud is color information, and the second Columb order corresponding to the AC coefficient is greater than a third preset threshold and less than or equal to a fourth preset threshold, the Y component of the AC coefficient is decoded according to the second Columb order, and the U component and the V component of the AC coefficient are decoded according to a first Columb index; or In a case where the attribute information of the point cloud is color information, and the second Columb order corresponding to the AC coefficient is greater than a fourth preset threshold, the Y component of the AC coefficient is decoded according to the second Columb order, and the U component and the V component of the AC coefficient are decoded according to a fourth value, which is a difference between the second Columb order and the fourth preset threshold.
23. The method of any one of claims 15-22, wherein, The method further comprises: In a case where the attribute information of the point cloud is color information, the first Columb order is determined based on the amplitude of the Y component of the corresponding AC coefficient; or In a case where the attribute information of the point cloud is reflectivity information, the first Columb order is determined based on the amplitude of the corresponding AC coefficient.
24. The method of claim 14, wherein, The method further comprises: In a case where the attribute information of the point cloud is color information, the first Columb order is determined based on the amplitude of the Y component of the corresponding AC coefficient; or 25. A transform coefficient encoding apparatus characterized by comprising: In a case where the attribute information of the point cloud is reflectivity information, the first Columb order is determined based on the amplitude of the corresponding AC coefficient. The method further comprises: The decoding end obtains the DC coefficient by decoding the coding result of the DC coefficient included in the target code stream according to the first Columb order included in the target code stream in a case where the identification information included in the attribute parameter set of the target code stream represents that the adaptive Columb decoding is performed. The method further comprises: The obtaining module is configured to obtain the transform coefficient corresponding to the point cloud; The determining module is configured to determine the first Columb order corresponding to the DC coefficient according to the amplitude of the DC coefficient in the transform coefficient; 26. A transform coefficient decoding apparatus, comprising: The encoding module is configured to perform the following operations in a case where the transform coefficient includes the DC coefficient and the AC coefficient: determine the second Columb order corresponding to the AC coefficient according to the first Columb order and the amplitude of the first AC coefficient, the first AC coefficient being the AC coefficient except the last AC coefficient in the transform coefficient; generate the target code stream based on the first Columb order corresponding to the DC coefficient, the coding result of the DC coefficient, and the coding result of each AC coefficient, wherein the coding result of the AC coefficient is obtained by performing the Columb encoding on the AC coefficient based on the corresponding second Columb order. The method further comprises: The obtaining module is configured to obtain the target code stream; The first decoding module is configured to obtain the DC coefficient by decoding the coding result of the DC coefficient included in the target code stream according to the first Columb order included in the target code stream; The second decoding module is configured to perform the following operations in a case where the target code stream includes the coding result of the AC coefficient: determine the second Columb order corresponding to the AC coefficient according to the first Columb order and the amplitude of the first AC coefficient, the first AC coefficient being the AC coefficient except the last AC coefficient in the transform coefficient; determining transform coefficients based on the DC coefficients and the AC coefficients; the AC coefficients are obtained by decoding the encoded results of the AC coefficients based on corresponding second Golomb order numbers.
27. A terminal, characterized by A processor and a memory, the memory stores programs or instructions executable on the processor, the programs or instructions are executed by the processor to implement the steps of the transform coefficient encoding of any one of claims 1-13, or implement the steps of the transform coefficient decoding of any one of claims 14-24.
28. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, the programs or instructions are executed by the processor to implement the steps of the transform coefficient encoding of any one of claims 1-13, or implement the steps of the transform coefficient decoding of any one of claims 14-24.
Citation Information
Patent Citations
Point cloud data decoding method, point cloud data coding method, point cloud data decoding device, point cloud data coding device, storage medium and equipment
CN115396668A