Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium
By arranging the transform coefficients of point cloud frames separately according to color channels and using a hybrid run-length encoding method, the problem of reduced compression performance caused by unreasonable arrangement of transform coefficients in existing technologies is solved, and more efficient point cloud compression is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the arrangement of transform coefficients in 3D point cloud compression methods is unreasonable, which affects the efficiency of run-length encoding and leads to a decrease in point cloud compression performance.
The transform coefficients of the point cloud frame are arranged separately according to the color channel. The AC coefficients are pre-encoded using a hybrid run-length encoding method, and the optimal encoding mode is selected through rate-distortion optimization to improve encoding efficiency.
By rationally arranging the transformation coefficients, the efficiency of run-length encoding was improved, thereby enhancing the point cloud compression performance.
Smart Images

Figure CN116320453B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of encoding and decoding technology, and in particular to a point cloud entropy encoding method, decoding method, apparatus, device and readable storage medium. Background Technology
[0002] With the rapid development of 3D information perception and acquisition technologies, high-resolution and high-fidelity 3D point clouds have been widely used in scenarios such as autonomous driving, autonomous navigation, immersive media, and virtual reality. A 3D point cloud consists of a large amount of positional information and corresponding attribute information (color, reflectivity, normal vectors, etc.), which can flexibly represent the spatial structure and surface properties of 3D objects or scenes. However, the massive amount of point cloud data puts enormous pressure on limited bandwidth and storage space. Therefore, how to achieve efficient point cloud data compression is an urgent problem to be solved.
[0003] 3D point cloud compression is mainly divided into geometric compression and attribute compression. Attribute compression is further divided into predictive coding and transform-based compression. Inspired by traditional hybrid video coding (e.g., H.264 / AVC and H.265 / HEVC), various attribute compression methods are available in existing technologies.
[0004] Currently, the China AVS (Audio Video Coding Standard) point cloud compression working group provides the PCEMv5.0 test platform, in which the color point cloud attribute compression method mainly adopts a point cloud transformation method based on DCT (Discrete Cosine Transform). However, in the process of implementing this application, the inventors discovered that the arrangement of the transformation coefficient column obtained by the above method is unreasonable, which affects the efficiency of run-length encoding and thus reduces the point cloud compression performance. Summary of the Invention
[0005] This application provides a point cloud entropy encoding method, decoding method, apparatus, device, and readable storage medium to improve point cloud compression performance.
[0006] In a first aspect, embodiments of this application provide a point cloud entropy encoding method, including:
[0007] Obtain the transform coefficients of the point cloud frame to be encoded;
[0008] The target encoding method is determined based on the transformation coefficients;
[0009] The target encoding method is used to perform entropy encoding on the point cloud frame to be encoded;
[0010] The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels.
[0011] Secondly, embodiments of this application also provide a point cloud entropy decoding method, including:
[0012] Obtain the bitstream to be decoded;
[0013] Obtain the index of the target encoding mode from the bitstream to be decoded;
[0014] Based on the index of the target encoding mode, the transform coefficients in the bitstream to be decoded are decoded using the corresponding decoding mode;
[0015] The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels.
[0016] Thirdly, embodiments of this application also provide a point cloud entropy encoding device, comprising:
[0017] The first acquisition module is used to acquire the transform coefficients of the point cloud frame to be encoded;
[0018] The second acquisition module is used to determine the target encoding method based on the transformation coefficients;
[0019] The first encoding module is used to perform entropy encoding on the point cloud frame to be encoded using the target encoding method;
[0020] The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels.
[0021] Fourthly, embodiments of this application also provide a point cloud entropy decoding device, comprising:
[0022] The first acquisition module is used to acquire the bitstream to be decoded;
[0023] The second acquisition module is used to obtain the index of the target encoding mode from the bitstream to be decoded;
[0024] The first decoding module is used to decode the transform coefficients in the bitstream to be decoded according to the index of the target encoding mode and the corresponding decoding mode.
[0025] The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels.
[0026] Fifthly, embodiments of this application also provide an electronic device, including: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the method described above.
[0027] Sixthly, embodiments of this application also provide a readable storage medium storing a program that, when executed by a processor, implements the steps in the method described above.
[0028] In the embodiments of this application, at least some of the DC coefficients and / or AC coefficients of the transform coefficients are arranged separately according to the color channels. Therefore, by using the scheme of the embodiments of this application, more transform zero coefficients can be arranged together, thereby improving the efficiency of run-length encoding and improving the point cloud compression performance. Attached Figure Description
[0029] Figure 1 This is one of the flowcharts of the point cloud entropy encoding method provided in the embodiments of this application;
[0030] Figure 2 This is the second flowchart of the point cloud entropy encoding method provided in the embodiments of this application;
[0031] Figure 3 This is a schematic diagram of the hybrid run-length encoding method provided in the embodiments of this application;
[0032] Figure 4 This is a flowchart of the outer run-length encoding provided in the embodiments of this application;
[0033] Figure 5 This is a flowchart of the inner run-length encoding provided in the embodiments of this application;
[0034] Figure 6 This is a flowchart of the point cloud entropy decoding method provided in the embodiments of this application;
[0035] Figure 7 This is a schematic diagram of the point cloud entropy encoding device provided in the embodiments of this application;
[0036] Figure 8 This is a schematic diagram of the point cloud entropy decoding device provided in the embodiments of this application. Detailed Implementation
[0037] In the embodiments of this application, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0038] In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0040] See Figure 1 , Figure 1 This is a flowchart of the point cloud entropy encoding method provided in the embodiments of this application, such as... Figure 1 As shown, it includes the following steps:
[0041] Step 101: Obtain the transform coefficients of the point cloud frame to be encoded.
[0042] In this step, the point cloud frame to be encoded after Hilbert reordering can be divided into coding blocks to obtain multiple coding blocks. These multiple coding blocks are then predicted, transformed, and quantized to obtain transform coefficient blocks. Finally, based on the transform coefficient blocks of all coding blocks, the transform coefficients of the point cloud frame to be encoded are obtained.
[0043] Specifically, the geometrically reconstructed point cloud data is reordered in descending order of Hilbert code. Then, the point cloud is adaptively partitioned according to the Hilbert code to obtain sub-blocks to be encoded, i.e., encoding blocks. Next, weighted attribute prediction is performed on the obtained sub-blocks to be encoded, and the prediction residuals are transformed and quantized to obtain transform coefficient blocks. Based on the obtained transform coefficient blocks, the transform coefficients are obtained.
[0044] The transformation coefficients include DC coefficients and AC coefficients. At least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels. For example, some or all of the AC coefficients can be arranged separately according to color channels, while the DC coefficients can be arranged in a mixed arrangement of the three color channels.
[0045] Step 102: Determine the target encoding method based on the transformation coefficients.
[0046] When the AC coefficients are arranged separately according to color channels, the AC coefficients can be pre-encoded using a hybrid run-length encoding method, and this encoding method can be used as the target encoding method.
[0047] This process mainly includes:
[0048] (1) The AC coefficients of the luminance component are precoded using the single-layer run-length encoding method to obtain the luminance component precoding result. This process may include:
[0049] (11) Based on the AC coefficient of the luminance component, the AC coefficient of the target luminance component is obtained.
[0050] When the number of AC coefficients of the luminance component is a multiple of the target value (e.g., 3), the AC coefficients of the luminance component are used as the AC coefficients of the luminance component. When the number of AC coefficients of the luminance component is not a multiple of the target value (e.g., 3), the AC coefficients of the luminance component are expanded to obtain expanded AC coefficients of the luminance component, such that the number of expanded AC coefficients of the luminance component is a multiple of the target value (e.g., 3), and the expanded AC coefficients of the luminance component are used as the AC coefficients of the target luminance component.
[0051] Specifically, for example, taking a preset quantity of three and a target value of 3, let the number of AC coefficients for the luminance component be ACSize. When ACSize%3 = 0, directly perform single-layer run-length encoding on the AC coefficients of the luminance component in groups of three. When ACSize%3 ≠ 0, firstly, the AC coefficients of the luminance component need to be expanded to a multiple of 3. Specifically: according to the formula... Calculate the number of groups in the AC coefficient column of the luminance component and denote it as ACLumaCount. Then, pad the end of the original AC coefficient column of the luminance component with (ACLumaCount×3-ACSize) zeros. Finally, perform single-level run-length encoding on the AC coefficient column of the padded luminance component in groups of three.
[0052] (12) The AC coefficients of the target luminance component are encoded using the single-layer run-length encoding method to obtain the luminance component precoding result.
[0053] For the AC coefficients of the target luminance component, all luminance component AC coefficients are iterated in groups of a preset number (e.g., three). For the current target group, the luminance component precoding result is obtained as follows:
[0054] When the AC coefficients of a preset number of luminance components in the target group are all 0, the current run value is incremented by 1; when the AC coefficients of a preset number of luminance components in the target group are not all 0, the current run value is encoded and the AC coefficients of the preset number of luminance components in the target group are jointly encoded, the current run value is set to 0 and the counting starts again.
[0055] Specifically, taking a preset quantity of three as an example, the AC coefficients (or padded AC coefficients) of the luminance component are traversed in groups of three. The number of runs where all three AC coefficients (ACi-1_L, ACi_L, ACi+1_L) of a group of three luminance components are 0 is counted, where ACi_L represents the i-th AC coefficient of the luminance component. If all three AC coefficients of a group of three luminance components are 0, the run value is incremented by 1; if not all three AC coefficients of a group of three luminance components are 0, the run value is first encoded, then the AC coefficients of the group of three luminance components are jointly encoded, and finally the run value is set to 0 and the counting starts again, until all AC coefficients of the luminance components have been traversed and the encoded bitstream of the luminance components is obtained.
[0056] (2) The AC coefficients of the chrominance component Cb are precoded using the two-layer run-length encoding method to obtain the precoded result of the chrominance component Cb. This process may include:
[0057] (21) Based on the AC coefficient of the chromaticity component Cb, the AC coefficient of the target chromaticity component Cb is obtained.
[0058] When the number of AC coefficients of the chromaticity component Cb is not s i When the value is a multiple of , the AC coefficients of the chromaticity component Cb are expanded to obtain the expanded AC coefficients of the chromaticity component Cb, such that the number of expanded AC coefficients of the chromaticity component Cb is s. i The AC coefficient of the expanded chromaticity component Cb is taken as the AC coefficient of the target chromaticity component Cb.
[0059] Wherein, the s i The first parameter is selected from the first set [s1, s2, ..., s]. n ], wherein the s i It is a multiple of the target value (e.g., 3), where 1 ≤ i ≤ n.
[0060] In practical applications, a series of first sets can be set, denoted as groupCb = [s1, s2, ..., s...]. n ], where s i It is a multiple of 3. Then, according to the first set s... i The AC coefficients of the chromaticity component Cb are expanded.
[0061] The specific expansion method is as follows: Let the number of AC coefficients of the chromaticity component Cb be ACSize, when ACSize%s i When ACSize%s = 0, directly perform two-level run-length encoding on the AC coefficient column of the chromaticity component Cb; when ACSize%s i When ≠0, the AC coefficient column of the chromaticity component Cb is first expanded to include s. iThe multiples are specifically determined by: first, according to the formula... Calculate the number of groups in the AC coefficient column for chromaticity component Cb and denote it as ACCbCount. Then, fill the end of the original AC coefficient column for chromaticity component Cb with (ACCbCount × s). i -ACSize) zeros.
[0062] (22) The AC coefficients of the target chromaticity component Cb are encoded using the two-layer run-length encoding method to obtain the pre-encoding result of the chromaticity component Cb.
[0063] The AC coefficients of the target chrominance component Cb are encoded using a two-layer run-length encoding method to obtain the pre-encoding result of the chrominance component Cb.
[0064] Specifically, the process may include:
[0065] S1: The AC coefficient of the target chromaticity component Cb is expressed as s i The process iterates through the target group in groups. For each group, if all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chroma component Cb in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts.
[0066] For the AC coefficients of the chrominance component Cb in the target group, the AC coefficients of all chrominance components Cb in the target group are traversed in a preset number (e.g., three) group. For the current group, it is processed as follows to obtain the inner run-length precoding result of the target group:
[0067] When the AC coefficients of a preset number of chroma components Cb in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chroma components Cb in the group are 0, the current inner run value is incremented by 1.
[0068] Based on the above, a target first parameter can be determined from the first set according to the encoding results corresponding to different first parameters, and the encoding result of the chrominance component Cb corresponding to the target first parameter can be used as the precoding result of the chrominance component Cb.
[0069] Specifically, RDO (Rate Distortion Optimization) can be used to select the target coding mode, that is, to obtain the optimal first parameter (i.e. the target first parameter), and obtain the coded bitstream corresponding to the optimal first parameter as the shortest coded bitstream of the chroma component Cb.
[0070] That is, we can compare the size of the encoded bitstreams obtained under different first parameters, and select the first parameter corresponding to the encoded bitstream with the smallest bitstream as the target first parameter.
[0071] (3) The AC coefficients of the chrominance component Cr are precoded using a two-layer run-length encoding method to obtain the precoded result of the chrominance component Cr. This process may include:
[0072] (31) Based on the AC coefficient of the chromaticity component Cr, the AC coefficient of the target chromaticity component Cr is obtained.
[0073] When the number of AC coefficients for the chromaticity component Cr is m i When the number of AC coefficients of the chromaticity component Cr is a multiple of s, the AC coefficient of the chromaticity component Cr is used as the AC coefficient of the target chromaticity component Cr; when the number of AC coefficients of the chromaticity component Cr is not s i When the value is a multiple of , the AC coefficients of the chromaticity component Cr are expanded to obtain expanded AC coefficients of the chromaticity component Cr, such that the number of expanded AC coefficients of the chromaticity component Cr is m. i The AC coefficient of the expanded chromaticity component Cr is taken as the AC coefficient of the target chromaticity component Cr.
[0074] Wherein, m i The second parameter is selected from the second set [m1, m2, ..., m]. n ], wherein the m i It is a multiple of the target value (e.g., 3), where 1 ≤ i ≤ n.
[0075] Specifically, we can first obtain a series of first sets, denoted as groupCr = [m1, m2, ..., m n ], where m i It is a multiple of 3. Then, according to the first set m... i The AC coefficient of the chromaticity component Cr is expanded.
[0076] The specific expansion method is as follows: Let the number of AC coefficients for the chromaticity component Cr be ACSize, and when ACSize%m i When = 0, directly perform two-level run-length encoding on the AC coefficient column of the chromaticity component Cr; when ACSize%m i When ≠0, the AC coefficient column of the chromaticity component Cr is expanded to have m coefficients.i Multiples of. Specifically: according to the formula Calculate the number of AC coefficient columns for the chromaticity component Cr and denote it as ACrCount. Then, fill the end of the original AC coefficient column for the chromaticity component Cr with (ACCrCount * m). i -ACSize) zeros.
[0077] (32) The AC coefficients of the target chromaticity component Cr are encoded using the two-layer run-length encoding method to obtain the pre-encoding result of the chromaticity component Cr.
[0078] The AC coefficients of the target chromaticity component Cr are encoded using a two-layer run-length encoding method to obtain the pre-encoded result of the chromaticity component Cr.
[0079] Specifically, the process may include:
[0080] S1: The AC coefficient of the target chromaticity component Cr is expressed in m... i The process iterates through the target group in groups. For each group, if all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chromaticity component Cr in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts.
[0081] For the AC coefficients of the chrominance component Cr in the target group, the AC coefficients of all chrominance components Cr in the target group are traversed in a preset number (e.g., three) group. For the current group, it is processed as follows to obtain the inner run-length precoding result of the target group:
[0082] When the AC coefficients of a preset number of chromaticity components Cr in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chromaticity components Cr in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chromaticity components Cr in the group are 0, the current inner run value is incremented by 1.
[0083] Based on the above, the target second parameter can be determined from the second set according to the encoding results corresponding to different second parameters, and the encoding result of the chromaticity component Cr corresponding to the target second parameter can be used as the pre-encoding result of the chromaticity component Cr.
[0084] Specifically, RDO can be used to select the target coding mode, that is, to obtain the optimal second parameter (i.e., the target second parameter), and obtain the coded bitstream corresponding to the target second parameter as the shortest coded bitstream of the chrominance component Cr.
[0085] That is, we can compare the size of the encoded bitstreams obtained under different second parameters, and select the second parameter corresponding to the encoded bitstream with the smallest bitstream as the target second parameter.
[0086] (4) Add the precoding results of the luminance component, the precoding results of the chrominance component Cb and the precoding results of the chrominance component Cr to obtain the precoding results of the AC coefficients.
[0087] Alternatively, when the DC and AC coefficients result in transformation coefficients under different arrangements, they can be handled as follows:
[0088] Step 1021: Obtain the first transformation coefficient and the second transformation coefficient based on the transformation coefficients.
[0089] The first and second transformation coefficients are transformation coefficients with different arrangements. In this step, the obtained transformation coefficients are decomposed and rearranged to obtain two arrangements: a first transformation coefficient with a first arrangement and a second transformation coefficient with a second arrangement. In the first transformation coefficient, the DC coefficient and AC coefficient are arranged in a mixed manner according to the three color channels; in the second transformation coefficient, the DC coefficient is arranged in a mixed manner according to the three color channels, and the AC coefficient is arranged separately according to each color channel. That is, the first and second transformation coefficients are two different arrangements of the transformation coefficients.
[0090] In practical applications, the obtained transformation coefficients (transformation coefficient column) can be decomposed into DC coefficient column and AC coefficient column. The AC coefficient column is then reordered to obtain the corresponding three-segment coefficients, namely: AC coefficient column of luminance component, AC coefficient column of chromaticity component Cb, and AC coefficient column of chromaticity component Cr.
[0091] For example, taking a four-point transformation as an example, a four-point transformation will generate a total of 3 DC coefficients and 9 AC coefficients. The 3 DC coefficients are the DC coefficients for the luminance component and the two chrominance components, denoted as DC_L, DC_Cb, and DC_Cr, respectively. The 9 AC coefficients are AC1_L, AC2_L, AC3_L, AC1_Cb, AC2_Cb, AC3_Cb, AC1_Cr, AC2_Cr, and AC3_Cr, where ACi_L represents the i-th AC coefficient of the luminance component, ACi_Cb represents the i-th AC coefficient of the chrominance component Cb, and ACi_Cr represents the i-th AC coefficient of the chrominance component Cr, i = 1, 2, 3.
[0092] The DC coefficients in the first transformation coefficient and the second transformation coefficient are arranged in the order of luminance component, chrominance component Cb and chrominance component Cr, specifically as: (DC_L, DC_Cb, DC_Cr).
[0093] The AC coefficients in the first transformation coefficients are arranged in the mixing order of the luminance component, chrominance component Cb, and chrominance component Cr, specifically as follows: (AC1_L, AC1_Cb, AC1_Cr)(AC2_L, AC2_Cb, AC2_Cr)(AC3_L, AC3_Cb, AC3_Cr).
[0094] The AC coefficients in the second variation coefficients are specifically arranged according to the luminance component, chromaticity component Cb, and chromaticity component Cr: (AC1_L, AC2_L, AC3_L)(AC1_Cb, AC2_Cb, AC3_Cb)(AC1_Cr, AC2_Cr, AC3_Cr).
[0095] Step 1022: Pre-encode the first transform coefficient and the second transform coefficient using different encoding methods to obtain the first pre-coding result and the second pre-coding result.
[0096] The first transform coefficient and the second transform coefficient correspond to different encoding methods. Specifically, the AC coefficients are encoded using a single-level run-length encoding method (the first encoding method) to obtain a first precoding result; the AC coefficients in the second transform coefficients are encoded using a hybrid run-length encoding method (the second encoding method) to obtain a second precoding result.
[0097] Since the arrangement of DC coefficients is the same in both arrangements, they can be omitted during precoding, thus improving efficiency. Alternatively, DC coefficients can be precoded. For DC coefficients in different transform coefficients, a single-level run-length encoding method is used. That is, for DC coefficients, all DC coefficients are traversed in a preset number (e.g., three) group. For the current target group, it is processed as follows:
[0098] When a preset number of DC coefficients in the target group are not all 0, the current run value is encoded and the preset number of DC coefficients in the target group are jointly encoded, the current run value is set to 0 and the counting restarts; when the preset number of DC coefficients in the target group are 0, the current run value is incremented by 1. The target group can be any group.
[0099] The following describes in detail the encoding method for the AC coefficients in different transform coefficients.
[0100] 1. Encode the AC coefficients in the first transform coefficients using a single-level run-length encoding method:
[0101] For the AC coefficients in the first transformation coefficients, all AC coefficients are traversed in groups of a preset number (e.g., three). For the current target group, it is processed as follows:
[0102] When a preset number of AC coefficients in the target group are not all 0, the current run value is encoded and the preset number of AC coefficients in the target group are jointly encoded, the current run value is set to 0 and the counting restarts; when the preset number of AC coefficients in the target group are all 0, the current run value is incremented by 1. The target group can be any group.
[0103] That is, all AC coefficients are iterated through in groups of a preset number (e.g., three), and the number of runs where all preset number of AC coefficients (AC_L, AC_Cb, AC_Cr) in a group are 0 is counted. If all preset number of AC coefficients in a group are 0, the run value is incremented by 1; if not all preset number of AC coefficients in a group are 0, the run value is first encoded, then the preset number of AC coefficients in the group are jointly encoded, and finally the run value is set to 0 and the counting starts again, until all AC coefficients have been traversed. The precoded bitstream corresponding to the AC coefficients of the first transform coefficient is finally obtained.
[0104] 2. Encode the AC coefficients in the second transform coefficients using the hybrid run-length encoding method:
[0105] This process mainly includes:
[0106] (1) The AC coefficients of the luminance component are precoded using the single-layer run-length encoding method to obtain the luminance component precoding result. This process may include:
[0107] (11) Based on the AC coefficient of the luminance component, the AC coefficient of the target luminance component is obtained.
[0108] When the number of AC coefficients of the luminance component is a multiple of the target value (e.g., 3), the AC coefficients of the luminance component are used as the AC coefficients of the luminance component. When the number of AC coefficients of the luminance component is not a multiple of the target value (e.g., 3), the AC coefficients of the luminance component are expanded to obtain expanded AC coefficients of the luminance component, such that the number of expanded AC coefficients of the luminance component is a multiple of the target value (e.g., 3), and the expanded AC coefficients of the luminance component are used as the AC coefficients of the target luminance component.
[0109] Specifically, for example, taking a preset quantity of three and a target value of 3, let the number of AC coefficients for the luminance component be ACSize. When ACSize%3 = 0, directly perform single-layer run-length encoding on the AC coefficients of the luminance component in groups of three. When ACSize%3 ≠ 0, firstly, the AC coefficients of the luminance component need to be expanded to a multiple of 3. Specifically: according to the formula... Calculate the number of groups in the AC coefficient column of the luminance component and denote it as ACLumaCount. Then, pad the end of the original AC coefficient column of the luminance component with (ACLumaCount×3-ACSize) zeros. Finally, perform single-level run-length encoding on the AC coefficient column of the padded luminance component in groups of three.
[0110] (12) The AC coefficients of the target luminance component are encoded using the single-layer run-length encoding method to obtain the luminance component precoding result.
[0111] For the AC coefficients of the target luminance component, all luminance component AC coefficients are iterated in groups of a preset number (e.g., three). For the current target group, the luminance component precoding result is obtained as follows:
[0112] When the AC coefficients of a preset number of luminance components in the target group are all 0, the current run value is incremented by 1; when the AC coefficients of a preset number of luminance components in the target group are not all 0, the current run value is encoded and the AC coefficients of the preset number of luminance components in the target group are jointly encoded, the current run value is set to 0 and the counting starts again.
[0113] Specifically, taking a preset quantity of three as an example, the AC coefficients (or padded AC coefficients) of the luminance component are traversed in groups of three. The number of runs where all three AC coefficients (ACi-1_L, ACi_L, ACi+1_L) of a group of three luminance components are 0 is counted, where ACi_L represents the i-th AC coefficient of the luminance component. If all three AC coefficients of a group of three luminance components are 0, the run value is incremented by 1; if not all three AC coefficients of a group of three luminance components are 0, the run value is first encoded, then the AC coefficients of the group of three luminance components are jointly encoded, and finally the run value is set to 0 and the counting starts again, until all AC coefficients of the luminance components have been traversed and the encoded bitstream of the luminance components is obtained.
[0114] (2) The AC coefficients of the chrominance component Cb are precoded using the two-layer run-length encoding method to obtain the precoded result of the chrominance component Cb. This process may include:
[0115] (21) Based on the AC coefficient of the chromaticity component Cb, the AC coefficient of the target chromaticity component Cb is obtained.
[0116] When the number of AC coefficients of the chromaticity component Cb is not s i When the value is a multiple of , the AC coefficients of the chromaticity component Cb are expanded to obtain the expanded AC coefficients of the chromaticity component Cb, such that the number of expanded AC coefficients of the chromaticity component Cb is s. i The AC coefficient of the expanded chromaticity component Cb is taken as the AC coefficient of the target chromaticity component Cb.
[0117] Wherein, the s i The first parameter is selected from the first set [s1, s2, ..., s]. n ], wherein the s i It is a multiple of the target value (e.g., 3), where 1 ≤ i ≤ n.
[0118] In practical applications, a series of first sets can be set, denoted as groupCb = [s1, s2, ..., s...]. n ], where s i It is a multiple of 3. Then, according to the first set s... i The AC coefficients of the chromaticity component Cb are expanded.
[0119] The specific expansion method is as follows: Let the number of AC coefficients of the chromaticity component Cb be ACSize, when ACSize%s i When ACSize%s = 0, directly perform two-level run-length encoding on the AC coefficient column of the chromaticity component Cb; when ACSize%s i When ≠0, the AC coefficient column of the chromaticity component Cb is first expanded to include s. iThe multiples are specifically determined by: first, according to the formula... Calculate the number of groups in the AC coefficient column for chromaticity component Cb and denote it as ACCbCount. Then, fill the end of the original AC coefficient column for chromaticity component Cb with (ACCbCount × s). i -ACSize) zeros.
[0120] (22) The AC coefficients of the target chromaticity component Cb are encoded using the two-layer run-length encoding method to obtain the pre-encoding result of the chromaticity component Cb.
[0121] The AC coefficients of the target chrominance component Cb are encoded using a two-layer run-length encoding method to obtain the pre-encoding result of the chrominance component Cb.
[0122] Specifically, the process may include:
[0123] S1: The AC coefficient of the target chromaticity component Cb is expressed as s i The process iterates through the target group in groups. For each group, if all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chroma component Cb in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts.
[0124] For the AC coefficients of the chrominance component Cb in the target group, the AC coefficients of all chrominance components Cb in the target group are traversed in a preset number (e.g., three) group. For the current group, it is processed as follows to obtain the inner run-length precoding result of the target group:
[0125] When the AC coefficients of a preset number of chroma components Cb in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chroma components Cb in the group are 0, the current inner run value is incremented by 1.
[0126] Based on the above, a target first parameter can be determined from the first set according to the encoding results corresponding to different first parameters, and the encoding result of the chrominance component Cb corresponding to the target first parameter can be used as the precoding result of the chrominance component Cb.
[0127] Specifically, RDO (Rate Distortion Optimization) can be used to select the target coding mode, that is, to obtain the first parameter of the target and obtain the coded bitstream corresponding to the first parameter of the target as the shortest coded bitstream of the chroma component Cb.
[0128] That is, we can compare the size of the encoded bitstreams obtained under different first parameters, and select the first parameter corresponding to the encoded bitstream with the smallest bitstream as the target first parameter.
[0129] (3) The AC coefficients of the chrominance component Cr are precoded using a two-layer run-length encoding method to obtain the precoded result of the chrominance component Cr. This process may include:
[0130] (31) Based on the AC coefficient of the chromaticity component Cr, the AC coefficient of the target chromaticity component Cr is obtained.
[0131] When the number of AC coefficients for the chromaticity component Cr is m i When the number of AC coefficients of the chromaticity component Cr is a multiple of s, the AC coefficient of the chromaticity component Cr is used as the AC coefficient of the target chromaticity component Cr; when the number of AC coefficients of the chromaticity component Cr is not s i When the value is a multiple of , the AC coefficients of the chromaticity component Cr are expanded to obtain expanded AC coefficients of the chromaticity component Cr, such that the number of expanded AC coefficients of the chromaticity component Cr is m. i The AC coefficient of the expanded chromaticity component Cr is taken as the AC coefficient of the target chromaticity component Cr.
[0132] Wherein, m i The second parameter is selected from the second set [m1, m2, ..., m]. n ], wherein the m i It is a multiple of the target value (e.g., 3), where 1 ≤ i ≤ n.
[0133] Specifically, we can first obtain a series of first sets, denoted as groupCr = [m1, m2, ..., m n ], where m i It is a multiple of 3. Then, according to the first set m... i The AC coefficient of the chromaticity component Cr is expanded.
[0134] The specific expansion method is as follows: Let the number of AC coefficients for the chromaticity component Cr be ACSize, and when ACSize%m i When = 0, directly perform two-level run-length encoding on the AC coefficient column of the chromaticity component Cr; when ACSize%m i When ≠0, the AC coefficient column of the chromaticity component Cr is expanded to have m coefficients. iMultiples of. Specifically: according to the formula Calculate the number of AC coefficient columns for the chromaticity component Cr and denote it as ACrCount. Then, fill the end of the original AC coefficient column for the chromaticity component Cr with (ACCrCount * m). i -ACSize) zeros.
[0135] (32) The AC coefficients of the target chromaticity component Cr are encoded using the two-layer run-length encoding method to obtain the pre-encoding result of the chromaticity component Cr.
[0136] The AC coefficients of the target chromaticity component Cr are encoded using a two-layer run-length encoding method to obtain the pre-encoded result of the chromaticity component Cr.
[0137] Specifically, the process may include:
[0138] S1: The AC coefficient of the target chromaticity component Cr is expressed in m... i The process iterates through the target group in groups. For each group, if all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chromaticity component Cr in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts.
[0139] For the AC coefficients of the chrominance component Cr in the target group, the AC coefficients of all chrominance components Cr in the target group are traversed in a preset number (e.g., three) group. For the current group, it is processed as follows to obtain the inner run-length precoding result of the target group:
[0140] When the AC coefficients of a preset number of chromaticity components Cr in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chromaticity components Cr in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chromaticity components Cr in the group are 0, the current inner run value is incremented by 1.
[0141] Based on the above, the target second parameter can be determined from the second set according to the encoding results corresponding to different second parameters, and the encoding result of the chromaticity component Cr corresponding to the target second parameter can be used as the pre-encoding result of the chromaticity component Cr.
[0142] Specifically, RDO can be used to select the target coding mode, that is, to obtain the second parameter of the target and use the coding bitstream corresponding to the second parameter of the target as the shortest coding bitstream of the chrominance component Cr.
[0143] That is, here, the sizes of the encoded bitstreams obtained under different second parameters can be compared, and the second parameter corresponding to the encoded bitstream with the smallest bitstream is selected as the target second parameter.
[0144] (4) Add the pre-encoding results of the luminance component, the pre-encoding result of the chrominance component Cb, and the pre-encoding result of the chrominance component Cr to obtain the pre-encoding result of the AC coefficient.
[0145] Step 1023: Determine the target encoding method from the encoding methods according to the first pre-encoding result and the second pre-encoding result.
[0146] Since the transform coefficient encoding is lossless encoding, in this step, the selection of the target encoding mode by the RDO method can be simplified to comparing the sizes of the pre-encoded bitstreams in two modes. Therefore, the bitstream sizes of the first pre-encoding result and the second pre-encoding result can be obtained. When the bitstream size of the first pre-encoding result is smaller than the bitstream size of the second pre-encoding result, the first encoding method corresponding to the first pre-encoding result is used as the target encoding method; when the bitstream size of the first pre-encoding result is larger than the bitstream size of the second pre-encoding result, the second encoding method corresponding to the second pre-encoding result is used as the target encoding method.
[0147] For example, let R1 be the bitstream length obtained by the first encoding method of the first transform coefficient, and R2 be the bitstream length obtained by the second encoding mode of the second transform coefficient and use 1 bit to encode the mode selection index. When R1 < R2, the first encoding method is used for transform coefficient encoding, and the encoding mode index is 0; otherwise, a certain encoding mode is used for encoding, and the encoding mode index is 1.
[0148] Step 103: Perform entropy encoding on the to-be-encoded point cloud frame using the target encoding method.
[0149] In this step, single-layer run-length encoding is performed on the DC coefficient and the AC coefficient; or, the single-layer run-length encoding method is used to encode the DC coefficient, and the hybrid run-length encoding method is used to encode the AC coefficient. Among them, when performing hybrid run-length encoding, the first parameter and the second parameter used to encode the AC coefficient of the chrominance component Cb and the AC coefficient of the chrominance component Cr are respectively the target first parameter and the target second parameter determined during pre-encoding. At the same time, the index of the target encoding mode, the number of DC coefficients or AC coefficients is encoded. When using hybrid run-length encoding, the index of the target first parameter and the index of the target second parameter can also be encoded.
[0150] Specifically, if the first encoding method is the target encoding mode, a single-layer run-length encoding method (using a preset number of coefficients, such as three, per group) is used to encode all transform coefficient columns (including DC and AC coefficients) to obtain the attribute-encoded bitstream. If the second encoding mode is the target encoding mode, all DC coefficients are encoded using a single-layer run-length encoding method (using a preset number of coefficients, such as three, per group). Then, the AC coefficients of the three reordered color components are mixed run-length encoded. Specifically, the AC coefficients of the luminance component are encoded using a single-layer run-length encoding method using a preset number of coefficients, such as three, and the AC transform coefficients of the two chrominance components (Cb and Cr) are encoded using a two-layer run-length encoding method. The first and second parameters are the target first and target second parameters determined by RDO during the pre-encoding process of the AC coefficients of the chrominance component Cr and the AC coefficients of the chrominance component Cb, respectively. In addition, the index of the encoding mode, the index of the target first and target second parameters, and the number of DC coefficients (or AC coefficients) need to be encoded to obtain the attribute-encoded bitstream.
[0151] In the above embodiments, the preset quantity and target value are both taken as 3. In practical applications, the preset quantity and target value can also be other integers greater than 0, such as 4, as long as they are equal.
[0152] In the embodiments of this application, at least some of the DC coefficients and / or AC coefficients of the transform coefficients are arranged separately according to the color channels. Therefore, by using the scheme of the embodiments of this application, more transform zero coefficients can be arranged together, thereby improving the efficiency of run-length encoding and improving the point cloud compression performance.
[0153] See Figure 2 This application provides a point cloud entropy coding method based on the transform coefficients of RDO. For example... Figure 2 As shown, the method may include the following steps:
[0154] Step 201, dividing the Hilbert-reordered point cloud frame into coded blocks, including:
[0155] The geometrically reconstructed point cloud data is reordered according to the Hilbert code in descending order, and then the point cloud is adaptively divided according to the Hilbert code to obtain the point cloud sub-blocks to be encoded.
[0156] Step 202: Predict, transform, and quantize the current point cloud sub-block to be encoded to obtain a transform coefficient block, including:
[0157] Weighted attribute prediction is performed on the sub-blocks of the point cloud to be encoded obtained by dividing them, and the prediction residuals are transformed and quantized to obtain the transformed coefficient block to be encoded.
[0158] Step 203: After traversing the complete frame point cloud, all transform coefficients are obtained. The transform coefficients are then decomposed and rearranged to obtain transform coefficients under two sorting conditions, including:
[0159] The entire frame of point cloud data is traversed and divided. Prediction, transformation, and quantization are performed on all sub-blocks to be encoded, ultimately obtaining all transform coefficients. This transform coefficient column is then decomposed into DC coefficient columns and AC coefficient columns. The AC coefficient column is reordered to obtain three corresponding coefficient segments: AC coefficients for the luma component, AC coefficients for the chroma component (Cb), and AC coefficients for the chroma component (Cr). This results in transform coefficients under two different sorting methods, corresponding to two encoding modes. In both arrangements, the DC coefficients are a mixed arrangement of the three color channels. The difference in the AC coefficient sorting is specifically: in the first arrangement, the AC coefficients are a mixed arrangement of the three color channels, while in the second arrangement, the AC coefficients are further split into three coefficient columns, with each color channel arranged in a separate sequence.
[0160] Step 204: Encode all AC transform coefficient columns under the first arrangement using a single-level run-length encoding method, including:
[0161] The algorithm iterates through all AC coefficients in groups of three, counting the number of runs where all three AC coefficients (AC_L, AC_Cb, AC_Cr) in a group are zero. If all three AC coefficients in a group are zero, the run value is incremented by 1; if not all three AC coefficients are zero, the run value is first encoded, then the three AC coefficients in the group are jointly encoded, and finally the run value is set to 0 and the counting restarts. This process continues until all AC coefficients have been traversed. The resulting precoded bitstream is the one described in pattern one.
[0162] Step 205: Encode the AC transform coefficients of different components under the second sorting using a hybrid run-length encoding method. Combined with... Figure 3 The process may include the following steps:
[0163] Step 2051: Encode the AC coefficients of the luminance component using the single-layer run-length encoding method, including:
[0164] Let ACSize be the total number of AC coefficients for the luminance component. When ACSize%3 = 0, directly perform single-level run-length encoding on the AC coefficient column, grouping them into three. When ACSize%3 ≠ 0, the AC coefficient column must first be expanded to a multiple of 3. Specifically, this is done by first applying the formula... The number of groups in the luminance component AC coefficient column is calculated and denoted as ACLumaCount. Then, (ACLumaCount*3-ACSize) zeros are padded to the end of the original AC coefficient column. Finally, single-level run-length encoding is performed on the padded AC coefficient column, grouped into threes. This encoding method includes:
[0165] The algorithm iterates through all AC coefficients (or padded AC coefficients) of the luminance component in groups of three, counting the number of runs where all three AC coefficients (ACi-1_L, ACi_L, ACi+1_L) of a group are zero, where ACi_L represents the i-th AC coefficient of the luminance component. If all three AC coefficients of a group are zero, the run value is incremented by 1; if not all three AC coefficients are zero, the run value is first encoded, then the AC coefficients of the group are jointly encoded, and finally the run value is set to 0 and the counting restarts. This process continues until all AC coefficients of the luminance component have been traversed and the encoded bitstream of the luminance component is obtained.
[0166] Step 2052: Encode the AC coefficients of the chrominance component Cb using a two-level run-length encoding method and select the target grouping mode using RDO. The flowchart of the two-level run-length encoding method is shown below. Figure 4 and Figure 5 As shown, where, Figure 4 The flowchart for outer run-length encoding. Figure 5 This is a flowchart of the inner run-length encoding process. Specifically:
[0167] First, set a series of first sets, denoted as groupCb = [s1, s2, ..., s...]. n ], where s i It is a multiple of 3. Then, based on the first set s... i The AC coefficients of the chromaticity component Cb are expanded as follows: Let the total number of AC coefficients for the chromaticity component Cb be ACSize. When ACSize%s i When ACSize%s = 0, directly perform two-level run-length encoding on the AC coefficient column; when ACSize%s i When ≠0, the AC coefficient column must first be expanded to have s. i The multiples are specifically determined by: first, according to the formula... Calculate the number of groups in the AC coefficient column and denote it as ACCbCount. Then, fill the end of the original AC coefficient column with (ACCbCount * s). i -ACSize) zeros, and finally perform two-level run-length encoding on the padded AC coefficient column. The encoding method is as follows:
[0168] First, outer run-length encoding is performed, using s iIterate through all AC coefficients (or filled AC coefficients) of the chromaticity component Cb in groups, and count the s values in each group. i The AC coefficients (AC1_Cb, ..., ACi_Cb, ..., ACs) of each chromaticity component Cb i The number of runs where all values of _Cb are zero, where ACi_Cb represents the i-th AC coefficient of the chromaticity component Cb, i = 1, ..., s i If a set of s i If the AC coefficient of each chromaticity component Cb is not 0, then the outer run value is incremented by 1; if a set of s i If the AC coefficients of each chromaticity component Cb are not all zero, then the outer layer run value is encoded first, and then the group of s is encoded. i The AC coefficients of each chrominance component Cb are encoded using inner run-length encoding. After the inner run-length encoding is completed, the outer run-length value is set to 0 and the counting starts again until all AC coefficients of the chrominance component Cb have been traversed.
[0169] Inner run-length encoding uses groups of three s as units. i The AC coefficients of each chrominance component Cb are iterated through, and the number of runs where all three AC coefficients (ACi-1_Cb, ACi_Cb, ACi+1_Cb) are 0 is counted. If all three AC coefficients in a set are 0, the inner run value is incremented by 1; if not all three AC coefficients are 0, the inner run value is first encoded, then the three AC coefficients in the set are jointly encoded, and finally the inner run value is set to 0 and the counting restarts. This process continues until all s are traversed. i The AC coefficients are then further processed using outer run-length encoding. Finally, RDO is used to select the target encoding mode, that is, to obtain the target first parameter from the first set and obtain the shortest encoded bitstream of the corresponding chrominance component Cb.
[0170] Step 2053: Encode the AC coefficients of the chromaticity component Cr using a two-level run-length encoding method and select the target grouping mode using RDO, including:
[0171] The chromaticity component Cr coefficients are encoded using the same two-level run-length encoding method as the chromaticity component Cb coefficients. The flowchart of this method is shown below. Figure 4 and Figure 5 As shown, where, Figure 4 A flowchart for outer run-length encoding. Figure 5 This is a flowchart for inner run-length encoding. Specifically:
[0172] First, set a series of second sets, denoted as groupCr = [m1, m2, ..., m n ], where m i It is a multiple of 3. Then, according to the second set m... iThe AC coefficients of the chromaticity component Cr are expanded as follows: Let the total number of AC coefficients for the chromaticity component Cr be ACSize. When ACSize%m i When ACSize%m = 0, directly perform two-level run-length encoding on the AC coefficient column; when ACSize%m i When the value is not equal to 0, the AC coefficient column must first be expanded to have m coefficients. i The multiples are specifically determined by: first, according to the formula... Calculate the number of groups in the AC coefficient column and denote it as ACrCount. Then, fill the end of the original AC coefficient column with (ACCrCount * m) i -ACSize) zeros, and finally perform two-level run-length encoding on the padded AC coefficient column. The encoding method is as follows:
[0173] First, outer run-length encoding is performed, with m i Iterate through all AC coefficients (or filled AC coefficients) of the chromaticity component Cr in groups, and count the m values in each group. i AC coefficients (AC1_Cr, ..., ACI_Cr, ..., ACm) for each chromaticity component Cr i The number of runs where all values of _Cr are 0, where ACi_Cr represents the i-th AC coefficient of the chromaticity component Cr, i = 1, ..., m i If a set of m i If the AC coefficients of all chromaticity components Cr are 0, then the outer run value is incremented by 1; if a set of m i If the AC coefficients of each chromaticity component Cr are not all 0, then the outer layer run value is encoded first, and then the m group is encoded. i The AC coefficients of each chromaticity component Cr are encoded using inner run-length encoding. After the inner run-length encoding is completed, the outer run-length value is set to 0 and the counting starts again until all AC coefficients of the chromaticity component Cr have been traversed.
[0174] Inner run-length encoding uses groups of three to encode m. i The AC coefficients of each chromaticity component Cr are iterated through, and the number of runs where all three AC coefficients (ACi-1_Cr, ACi_Cr, ACi+1_Cr) in a set are 0 is counted. If all three AC coefficients in a set are 0, the inner run value is incremented by 1; if not all three AC coefficients are 0, the inner run value is first encoded, then the three AC coefficients in the set are jointly encoded, and finally the inner run value is set to 0 and the counting restarts. This process continues until all m values have been traversed. i The AC coefficients are then further processed using outer run-length encoding. Finally, RDO is used to select the target encoding mode, that is, to obtain the target second parameter from the second set and obtain the shortest encoded bitstream for the corresponding chrominance component Cr.
[0175] Step 2054, adding the three bitstreams of different color components together to obtain the pre-coded bitstream of the final AC coefficient in Mode 2, including:
[0176] Adding the AC coding bitstreams of the above luminance component and two chrominance components (Cb and Cr) together to obtain the pre-coded bitstream of the final AC coefficient of the AC coefficient in Mode 2.
[0177] In the above different coding modes, the DC coefficients are all encoded using the single-layer run-length coding method.
[0178] Step 206, selecting the target coding mode through the RDO method, including:
[0179] Since the transform coefficient coding is lossless coding, selecting the target coding mode through the rate-distortion optimization (RDO) method can be simplified to comparing the sizes of the pre-coded bitstreams in two modes. Let R1 be the bitstream length in Mode 1, R2 be the bitstream length in Mode 2, and use 1 bit to encode the mode selection index. When R1 < R2, the transform coefficient coding is performed using Mode 1, and the coding mode index is 0; otherwise, Mode 2 is used for coding, and the coding mode index is 1.
[0180] Step 207, performing entropy coding using the target coding mode and obtaining the final point cloud attribute coding bitstream, including:
[0181] If Mode 1 is the target coding mode, encode all the transform coefficient columns (including DC coefficients and AC coefficients) using the single-layer run-length coding method (three coefficients in a group) to finally obtain the attribute coding bitstream.
[0182] If Mode 2 is the target coding mode, then encode all the DC coefficients using the single-layer run-length method (three coefficients in a group), and then perform mixed run-length coding on the AC coefficients of the three color components after reordering. Specifically: encode the AC coefficients of the luminance component using the single-layer run-length method in groups of three, and encode the AC transform coefficients of the two chrominance components (Cb and Cr) using the double-layer run-length method respectively. Among them, the first parameter and the second parameter respectively adopt the target first parameter and the target second parameter in RDO. In addition, the index of the target first parameter, the index of the target second parameter, and the number of DC coefficients also need to be encoded additionally to finally obtain the attribute coding bitstream.
[0183] To verify the performance of the embodiments of the present application, the algorithm is implemented on the latest point cloud coding standard platform reference software PCRMv5.0, and the standard test sequences are tested. The coding performances are shown in Table 1 and Table 2, where the negative numbers represent the percentage of bitrate savings after adopting the method of the embodiments of the present application, and the positive numbers represent the percentage of bitrate increase.
[0184] Table 1 compares the performance of the method in this application embodiment with the benchmark results of the latest AVS basic platform PCEMv5.0 under the condition of geometrically finite lossy and attribute lossy (AVS C1_AI). The results show that the attribute luminance component, chrominance component Cb and chrominance component Cr of the embodiment of this application are improved by an average of 0.25% in rate distortion performance.
[0185] Table 2 compares the performance of the embodiments of this application with the benchmark results of the latest AVS basic platform PCEMv5.0 under the condition of geometric lossless but attribute lossy (AVS C2_AI). The results show that the attribute luminance component, chrominance component Cb and chrominance component Cr of the embodiments of this application are improved by an average of 3.1%, 3.35% and 3.35% in rate distortion performance, respectively.
[0186] Table 1
[0187]
[0188] Table 2
[0189]
[0190] In summary, this application proposes a transform coefficient point cloud entropy coding method based on RDO for point cloud color attributes. This method decomposes the transform coefficient block into DC and AC components and reorders the AC coefficients. This method can arrange more zero transform coefficients together, thereby improving the efficiency of run-length encoding. In addition, this application also proposes a two-layer run-length encoding algorithm for chrominance components Cb and Cr, which have a large number of zero coefficients. Finally, it combines the RDO method to effectively improve the efficiency of the latest point cloud encoding standard and effectively improve point cloud compression performance.
[0191] See Figure 6 , Figure 6 The point cloud entropy decoding method provided in this application includes:
[0192] Step 601: Obtain the bitstream to be decoded.
[0193] Step 602: Obtain the index of the target encoding mode from the bitstream to be decoded.
[0194] Step 603: Decode the transform coefficients in the bitstream to be decoded using the corresponding decoding mode according to the index of the target encoding mode;
[0195] The transformation coefficients include DC coefficients and AC coefficients. At least some of the DC coefficients and AC coefficients are arranged separately according to color channels.
[0196] The transformation coefficients are processed into a first transformation coefficient and a second transformation coefficient with two different arrangements. In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed arrangement according to the three color channels. In the second transformation coefficient, the DC coefficient is arranged in a mixed arrangement according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
[0197] Specifically, this step may include the following processes:
[0198] (1) Obtain the index of the target encoding mode, the number of DC coefficients or AC coefficients from the bitstream to be decoded.
[0199] (2) When the index of the target encoding mode indicates that the target encoding mode is the first encoding method, the DC coefficients and the AC coefficients are decoded by using the single-layer run-length decoding method, respectively, in combination with the number of DC coefficients and the number of AC coefficients.
[0200] For example, based on the size of the run value, the number of coefficients that are 0 can be determined, and then the other non-zero coefficients can be decoded.
[0201] When the index of the target encoding mode indicates that the target encoding mode is the second encoding method, the DC coefficients and the AC coefficients of the luminance component are decoded using a single-layer run-length decoding method, based on the number of DC coefficients and the number of AC coefficients. The indexes of the target first parameter and the target second parameter of the chrominance component Cb and the chrominance component Cr are decoded respectively. Based on the obtained target first parameter of the chrominance component Cb and target second parameter of the chrominance component Cr, and the number of DC coefficients or AC coefficients, the AC coefficients of the chrominance component Cb and the chrominance component Cr are decoded using a two-layer run-length decoding method.
[0202] In the first encoding method, single-level run-length encoding is used for both DC and AC coefficients; in the second encoding method, single-level run-length encoding is used for DC coefficients, and mixed run-length encoding is used for AC coefficients.
[0203] In the above decoding process, if the number of DC coefficients is obtained, the number of AC coefficients can be obtained by subtracting the number of DC coefficients from the total number of points in the point cloud frame. Similarly, if the number of AC coefficients is obtained, the number of DC coefficients can be obtained by subtracting the number of AC coefficients from the total number of points in the point cloud frame.
[0204] In this embodiment, since the transform coefficients are decomposed at the encoding end and the target encoding mode is determined using different encoding modes, the encoded bitstream can be obtained more efficiently under the target encoding mode. Correspondingly, at the decoding end, since the decomposition of the transform coefficients results in more coefficients being zero being arranged together, the decoding end can more efficiently determine the coefficients being zero, thereby improving the decoding efficiency of the decoding end.
[0205] This application also provides a point cloud entropy encoding device. For example... Figure 7 As shown, the point cloud entropy encoding device 700 includes:
[0206] A first acquisition module 701 is used to acquire the transform coefficients of the point cloud frame to be encoded; a second acquisition module 702 is used to determine the target encoding method based on the transform coefficients; a first encoding module 703 is used to perform entropy encoding on the point cloud frame to be encoded using the target encoding method; wherein, the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or the AC coefficients are arranged separately according to color channels.
[0207] Optionally, the first acquisition module includes:
[0208] The first submodule is used to divide the Hilbert-reordered point cloud frame to be encoded into multiple coding blocks; the second submodule is used to predict, transform, and quantize the multiple coding blocks to obtain transform coefficient blocks; the third submodule is used to obtain the transform coefficients of the point cloud frame to be encoded based on the transform coefficient blocks of all coding blocks.
[0209] Optionally, the second acquisition module includes:
[0210] The first submodule is used to obtain a first transformation coefficient and a second transformation coefficient based on the transformation coefficients; wherein the first transformation coefficient and the second transformation coefficient are transformation coefficients with different arrangements;
[0211] The second submodule is used to pre-encode the first transform coefficient and the second transform coefficient using different encoding methods to obtain the first pre-coding result and the second pre-coding result.
[0212] The third submodule is used to determine the target encoding method from the encoding methods based on the first precoding result and the second precoding result;
[0213] In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed manner according to the three color channels; in the second transformation coefficient, the DC coefficient is arranged in a mixed manner according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
[0214] Optionally, the second submodule includes:
[0215] The first encoding submodule is used to encode the AC coefficients in the first transform coefficients using a single-layer run-length encoding method to obtain the first pre-encoding result;
[0216] The second encoding submodule is used to encode the AC coefficients in the second transform coefficients using a hybrid run-length encoding method to obtain the second pre-encoding result.
[0217] Optionally, the first encoding submodule is used to, for the AC coefficients, traverse all AC coefficients in a preset number of groups, and process the current target group as follows:
[0218] When a preset number of AC coefficients in the target group are not all 0, the current run value is encoded and the preset number of AC coefficients in the target group are jointly encoded, the current run value is set to 0 and the counting starts again; when the preset number of AC coefficients in the target group are all 0, the current run value is incremented by 1.
[0219] Optionally, when the AC coefficients are arranged separately by color channel, the second acquisition module is used to:
[0220] The AC coefficients of the luminance component are precoded using the single-layer run-length encoding method to obtain the luminance component precoding result.
[0221] The AC coefficients of the chrominance component Cb are precoded using the two-level run-length encoding method to obtain the precoded result of the chrominance component Cb.
[0222] The AC coefficients of the chromaticity component Cr are precoded using the two-layer run method to obtain the precoded result of the chromaticity component Cr.
[0223] The precoding results of the luminance component, the chrominance component Cb, and the chrominance component Cr are added together to obtain the precoding results of the AC coefficients.
[0224] Optionally, the second encoding submodule includes:
[0225] The first coding unit is used to precode the AC coefficients of the luminance component using the single-layer run-length method to obtain the luminance component precoding result.
[0226] The second coding unit is used to precode the AC coefficients of the chrominance component Cb using the two-level run method to obtain the precoded result of the chrominance component Cb.
[0227] The third coding unit is used to precode the AC coefficients of the chromaticity component Cr using the two-layer run method to obtain the precoded result of the chromaticity component Cr.
[0228] The first acquisition unit is used to add the precoding results of the luminance component, the precoding results of the chrominance component Cb, and the precoding results of the chrominance component Cr to obtain the precoding results of the AC coefficients.
[0229] The first encoding unit includes:
[0230] The first acquisition subunit is used to obtain the AC coefficient of the target luminance component based on the AC coefficient of the luminance component.
[0231] The first encoding subunit is used to encode the AC coefficients of the target luminance component using a single-layer run-length encoding method to obtain the luminance component precoding result.
[0232] The first acquisition subunit is configured to: use the AC coefficients of the luminance component as the AC coefficients of the luminance component when the number of AC coefficients of the luminance component is a multiple of the target value; and expand the AC coefficients of the luminance component to obtain expanded AC coefficients of the luminance component when the number of AC coefficients of the luminance component is not a multiple of the target value, such that the number of expanded AC coefficients of the luminance component is a multiple of the target value, and use the expanded AC coefficients of the luminance component as the AC coefficients of the target luminance component.
[0233] The first encoding subunit is used for:
[0234] For the AC coefficients of the target luminance component, all luminance component AC coefficients are iterated in groups of a preset number; for the current target group, the luminance component precoding result is obtained as follows:
[0235] When the AC coefficients of a preset number of luminance components in the target group are all 0, the current run value is incremented by 1; when the AC coefficients of a preset number of luminance components in the target group are not all 0, the current run value is encoded and the AC coefficients of the preset number of luminance components in the target group are jointly encoded, the current run value is set to 0 and the counting starts again.
[0236] The second encoding unit is used for:
[0237] The first acquisition subunit is used to obtain the AC coefficient of the target chromaticity component Cb based on the AC coefficient of the chromaticity component Cb.
[0238] The first encoding subunit is used to encode the AC coefficients of the target chrominance component Cb using a two-layer run-length encoding method to obtain the pre-encoded result of the chrominance component Cb.
[0239] Wherein, the first acquisition subunit is used when the number of AC coefficients of the chromaticity component Cb is s i When the number of AC coefficients of the chromaticity component Cb is a multiple of s, the AC coefficient of the chromaticity component Cb is used as the AC coefficient of the target chromaticity component Cb; when the number of AC coefficients of the chromaticity component Cb is not s i When the AC coefficients of the chromaticity component Cb are multiples of s, the AC coefficients of the chromaticity component Cb are expanded to obtain expanded AC coefficients of the chromaticity component Cb, such that the number of expanded AC coefficients of the chromaticity component Cb is s. i The AC coefficient of the expanded chromaticity component Cb is taken as the AC coefficient of the target chromaticity component Cb; wherein, the s i The first parameter is selected from the first set [s1, s2, ..., s]. n ], wherein the s i The value is a multiple of the target value, where 1 ≤ i ≤ n.
[0240] The first encoding subunit is configured to perform the following process:
[0241] S1: The AC coefficient of the target chromaticity component Cb is expressed as s i The process iterates through the target group in groups. For each group, if all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chroma component Cb in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts.
[0242] For the AC coefficients of the chrominance component Cb in the target group, the AC coefficients of all chrominance components Cb in the target group are traversed in a preset number of groups. For the current group, the inner run-length precoding result of the target group is obtained as follows:
[0243] When the AC coefficients of a preset number of chroma components Cb in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chroma components Cb in the group are 0, the current inner run value is incremented by 1.
[0244] Optionally, the first encoding subunit is further configured to perform the following process:
[0245] S2: Based on the encoding results corresponding to different first parameters, determine the target first parameter from the first set, and use the encoding result of the chrominance component Cb corresponding to the target first parameter as the pre-encoding result of the chrominance component Cb.
[0246] Optionally, the third encoding unit includes:
[0247] The first acquisition subunit is used to obtain the AC coefficient of the target chromaticity component Cr based on the AC coefficient of the chromaticity component Cr.
[0248] The first encoding subunit is used to encode the AC coefficients of the target chromaticity component Cr using a two-layer run-length encoding method to obtain the pre-encoded result of the chromaticity component Cr.
[0249] The first acquisition subunit is used when the number of AC coefficients of the chromaticity component Cr is m. i When the number of AC coefficients of the chromaticity component Cr is a multiple of s, the AC coefficient of the chromaticity component Cr is used as the AC coefficient of the target chromaticity component Cr; when the number of AC coefficients of the chromaticity component Cr is not s i When the value is a multiple of , the AC coefficients of the chromaticity component Cr are expanded to obtain expanded AC coefficients of the chromaticity component Cr, such that the number of expanded AC coefficients of the chromaticity component Cr is m. i The AC coefficient of the expanded chromaticity component Cr is taken as the AC coefficient of the target chromaticity component Cr; wherein, the m i The second parameter is selected from the second set [m1, m2, ..., m]. n ], wherein the m i The value is a multiple of the target value, where 1 ≤ i ≤ n.
[0250] The first encoding subunit is configured to perform the following process:
[0251] S1: The AC coefficient of the target chromaticity component Cr is expressed in m... iThe process iterates through the target group in groups. For each group, if all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chromaticity component Cr in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts.
[0252] For the AC coefficients of the chrominance component Cr in the target group, the AC coefficients of all chrominance components Cr in the target group are traversed in a preset number of groups. For the current group, the processing is performed as follows to obtain the inner run-length precoding result of the target group:
[0253] When the AC coefficients of a preset number of chromaticity components Cr in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chromaticity components Cr in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chromaticity components Cr in the group are 0, the current inner run value is incremented by 1.
[0254] Optionally, the first encoding subunit is further configured to perform the following process:
[0255] S2: Based on the encoding results corresponding to different second parameters, determine the target second parameter from the second set, and use the encoding result of the chromaticity component Cr corresponding to the target second parameter as the pre-encoding result of the chromaticity component Cr.
[0256] Optionally, the third submodule includes:
[0257] The first acquisition unit is used to obtain the bitstream size of the first precoding result and the bitstream size of the second precoding result;
[0258] The second acquisition unit is configured to, when the bitstream size of the first precoding result is less than the bitstream size of the second precoding result, use the first encoding method corresponding to the first precoding result as the target encoding method; and when the bitstream size of the first precoding result is greater than the bitstream size of the second precoding result, use the second encoding method corresponding to the second precoding result as the target encoding method.
[0259] Wherein, the first encoding module is used for:
[0260] Single-level run-length encoding is performed on the DC coefficients and AC coefficients; or, the DC coefficients are encoded using a single-level run-length encoding method, and the AC coefficients are encoded using a hybrid run-length encoding method. In the hybrid run-length encoding, the first parameter and the second parameter used to encode the AC coefficients of the chromaticity component Cb and the AC coefficients of the chromaticity component Cr are the target first parameter and the target second parameter determined during precoding, respectively.
[0261] The index, DC coefficient, or AC coefficient of the target encoding pattern are encoded.
[0262] The first encoding module is further configured to:
[0263] The indexes of the first parameter and the second parameter of the target are encoded.
[0264] The apparatus provided in this application embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0265] This application also provides a point cloud entropy decoding device. For example... Figure 8 As shown, the point cloud entropy decoding device 800 includes:
[0266] The first acquisition module 801 is used to acquire the bitstream to be decoded;
[0267] The second acquisition module 802 is used to obtain the index of the target encoding mode from the bitstream to be decoded;
[0268] The first decoding module 803 is used to decode the transform coefficients in the bitstream to be decoded according to the index of the target encoding mode and the corresponding decoding mode.
[0269] The transformation coefficients include DC coefficients and AC coefficients, and at least some of the DC coefficients and AC coefficients are arranged separately according to the color channels.
[0270] The transformation coefficients are processed into a first transformation coefficient and a second transformation coefficient with two different arrangements. In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed arrangement according to the three color channels. In the second transformation coefficient, the DC coefficient is arranged in a mixed arrangement according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
[0271] The first decoding module includes:
[0272] The acquisition submodule is used to obtain the index of the target encoding mode, the number of DC coefficients, or the number of AC coefficients from the bitstream to be decoded;
[0273] The decoding submodule is used to decode the DC coefficients and the AC coefficients using a single-layer run-length decoding method when the index of the target encoding mode indicates that the target encoding mode is the first encoding method, in combination with the number of DC coefficients and the number of AC coefficients respectively.
[0274] When the index of the target encoding mode indicates that the target encoding mode is the second encoding method, the DC coefficients and the AC coefficients of the luminance component are decoded using a single-layer run-length decoding method, based on the number of DC coefficients and the number of AC coefficients. The indexes of the target first parameter and the target second parameter of the chrominance component Cb and the chrominance component Cr are decoded respectively. Based on the obtained target first parameter of the chrominance component Cb and target second parameter of the chrominance component Cr, and the number of DC coefficients or AC coefficients, the AC coefficients of the chrominance component Cb and the chrominance component Cr are decoded using a two-layer run-length decoding method.
[0275] In the first encoding method, single-level run-length encoding is used for both DC and AC coefficients; in the second encoding method, single-level run-length encoding is used for DC coefficients, and mixed run-length encoding is used for AC coefficients.
[0276] The apparatus provided in this application embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0277] This application also provides an electronic device, including: a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program in the memory to implement the steps in the point cloud entropy encoding method as described above; or to implement the steps in the point cloud entropy decoding method as described above.
[0278] It should be noted that the division of units in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0279] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0280] This application also provides a readable storage medium storing a program. When executed by a processor, this program implements the various processes of the above-described method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The readable storage medium can be any available medium or data storage device that a processor can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).
[0281] 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. Unless otherwise specified, 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.
[0282] Through 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 software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0283] 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 forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method of point cloud entropy coding, the method comprising: include: Obtain the transform coefficients of the point cloud frame to be encoded; The target encoding method is determined based on the transformation coefficients; The target encoding method is used to perform entropy encoding on the point cloud frame to be encoded; The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels. The step of determining the target encoding method based on the transform coefficients includes: Based on the transformation coefficients, a first transformation coefficient and a second transformation coefficient are obtained; wherein the first transformation coefficient and the second transformation coefficient are transformation coefficients with different arrangements. The first transform coefficient and the second transform coefficient are pre-coded using different encoding methods to obtain a first pre-coding result and a second pre-coding result. Based on the first precoding result and the second precoding result, a target encoding method is determined from the encoding methods; In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed manner according to the three color channels; in the second transformation coefficient, the DC coefficient is arranged in a mixed manner according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
2. The method according to claim 1, characterized in that, The process of obtaining the transform coefficients of the point cloud frame to be encoded includes: The point cloud frame to be encoded after Hilbert reordering is divided into coding blocks to obtain multiple coding blocks; The multiple coding blocks are predicted, transformed, and quantized to obtain a transform coefficient block; The transform coefficients of the point cloud frame to be encoded are obtained based on the transform coefficient blocks of all coded blocks.
3. The method according to claim 1, characterized in that, The step of precoding the first transform coefficients and the second transform coefficients using different encoding methods to obtain a first precoding result and a second precoding result includes: The AC coefficients in the first transform coefficients are encoded using a single-layer run-length encoding method to obtain the first precoding result; The AC coefficients in the second transform coefficients are encoded using a hybrid run-length encoding method to obtain the second precoding result.
4. The method according to claim 3, characterized in that, The encoding of the AC coefficients in the first transform coefficients using a single-level run-length encoding method includes: For the AC coefficients, all AC coefficients are traversed in groups of a preset number; for the current target group, they are processed as follows: When a preset number of AC coefficients in the target group are all 0, the current run value is incremented by 1; when a preset number of AC coefficients in the target group are not all 0, the current run value is encoded and the preset number of AC coefficients in the target group are jointly encoded, the current run value is set to 0 and the counting starts again.
5. The method according to claim 1, characterized in that, When the AC coefficients are arranged individually by color channel, the AC coefficients are pre-encoded using a hybrid run-length encoding method, including: The AC coefficients of the luminance component are precoded using the single-layer run-length encoding method to obtain the luminance component precoding result. The AC coefficients of the chrominance component Cb are precoded using the two-level run-length encoding method to obtain the precoded result of the chrominance component Cb. The AC coefficients of the chromaticity component Cr are precoded using the two-layer run method to obtain the precoded result of the chromaticity component Cr. The precoding results of the luminance component, the chrominance component Cb, and the chrominance component Cr are added together to obtain the precoding results of the AC coefficients.
6. The method according to claim 5, characterized in that, The AC coefficients of the luminance component are precoded using a single-layer run-length encoding method to obtain the luminance component precoding result, including: Based on the AC coefficients of the luminance components, the AC coefficients of the target luminance components are obtained; The AC coefficients of the target luminance component are encoded using the single-layer run-length encoding method to obtain the luminance component precoding result.
7. The method according to claim 6, characterized in that, The step of obtaining the AC coefficient of the target luminance component based on the AC coefficient of the luminance component includes: When the number of AC coefficients of the luminance component is a multiple of the target value, the AC coefficients of the luminance component are used as the AC coefficients of the luminance component. When the number of AC coefficients of the luminance component is not a multiple of the target value, the AC coefficients of the luminance component are expanded to obtain expanded AC coefficients of the luminance component, such that the number of expanded AC coefficients of the luminance component is a multiple of the target value, and the expanded AC coefficients of the luminance component are used as the AC coefficients of the target luminance component.
8. The method according to claim 6, characterized in that, The AC coefficients of the target luminance component are encoded using a single-layer run-length encoding method to obtain the luminance component precoding result, including: For the AC coefficients of the target luminance component, all luminance component AC coefficients are iterated in groups of a preset number; for the current target group, the luminance component precoding result is obtained as follows: When the AC coefficients of a preset number of luminance components in the target group are all 0, the current run value is incremented by 1; when the AC coefficients of a preset number of luminance components in the target group are not all 0, the current run value is encoded and the AC coefficients of the preset number of luminance components in the target group are jointly encoded, the current run value is set to 0 and the counting starts again.
9. The method according to claim 5, characterized in that, The AC coefficients of the chrominance component Cb are precoded using a two-level run-length encoding method to obtain the precoded result of the chrominance component Cb, including: Based on the AC coefficients of the chromaticity component Cb, the AC coefficients of the target chromaticity component Cb are obtained. The AC coefficients of the target chrominance component Cb are encoded using a two-layer run-length encoding method to obtain the pre-encoding result of the chrominance component Cb.
10. The method according to claim 9, characterized in that, The step of obtaining the AC coefficient of the target chromaticity component Cb based on the AC coefficient of the chromaticity component Cb includes: When the number of AC coefficients of the chromaticity component Cb is When the value is a multiple of the target chromaticity component Cb, the AC coefficient of the chromaticity component Cb is used as the AC coefficient of the target chromaticity component Cb. When the number of AC coefficients of the chromaticity component Cb is not When the AC coefficients of the chromaticity component Cb are multiples of , the AC coefficients of the chromaticity component Cb are expanded to obtain expanded AC coefficients of the chromaticity component Cb, such that the number of expanded AC coefficients of the chromaticity component Cb is . The AC coefficient of the expanded chromaticity component Cb is taken as the AC coefficient of the target chromaticity component Cb. Among them, the The first parameter is selected from the first set. , wherein The value is a multiple of the target value, where 1 ≤ i ≤ n.
11. The method according to claim 10, characterized in that, The AC coefficients of the target chrominance component Cb are encoded using a two-layer run-length encoding method to obtain the pre-encoded result of the chrominance component Cb, including: The AC coefficient of the target chromaticity component Cb is... The process iterates through the target group in groups. For each group, if all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chroma component Cb in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chroma component Cb in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts. For the AC coefficients of the chrominance component Cb in the target group, the AC coefficients of all chrominance components Cb in the target group are traversed in a preset number of groups. For the current group, the inner run-length precoding result of the target group is obtained as follows: When the AC coefficients of a preset number of chroma components Cb in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chroma components Cb in the group are 0, the current inner run value is incremented by 1.
12. The method according to claim 11, characterized in that, The method further includes: Based on the encoding results corresponding to different first parameters, a target first parameter is determined from the first set, and the encoding result of the chrominance component Cb corresponding to the target first parameter is used as the pre-encoding result of the chrominance component Cb.
13. The method according to claim 5, characterized in that, The AC coefficients of the chromaticity component Cr are precoded using a two-layer run-length encoding method to obtain the precoded result of the chromaticity component Cr, including: The AC coefficient of the target chromaticity component Cr is obtained based on the AC coefficient of the chromaticity component Cr. The AC coefficients of the target chromaticity component Cr are encoded using a two-layer run-length encoding method to obtain the pre-encoded result of the chromaticity component Cr.
14. The method according to claim 13, characterized in that, The step of obtaining the AC coefficient of the target chromaticity component Cr based on the AC coefficient of the chromaticity component Cr includes: When the number of AC coefficients of the chromaticity component Cr is When the value is a multiple of , the AC coefficient of the chromaticity component Cr is used as the AC coefficient of the target chromaticity component Cr. When the number of AC coefficients of the chromaticity component Cr is not When the value is a multiple of , the AC coefficients of the chromaticity component Cr are expanded to obtain expanded AC coefficients of the chromaticity component Cr, such that the number of expanded AC coefficients of the chromaticity component Cr is . The AC coefficient of the expanded chromaticity component Cr is taken as the AC coefficient of the target chromaticity component Cr. Among them, the The second parameter is selected from the second set. , wherein The value is a multiple of the target value, where 1 ≤ i ≤ n.
15. The method according to claim 14, characterized in that, The AC coefficients of the target chromaticity component Cr are encoded using a two-layer run-length encoding method to obtain the pre-encoded result of the chromaticity component Cr, including: The AC coefficient of the target chromaticity component Cr is... The process iterates through the target group in groups. For each group, if all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is incremented by 1. If not all AC coefficients of the chromaticity component Cr in the target group are 0, the current outer run value is encoded, and the AC coefficients of the chromaticity component Cr in the target group are encoded using the inner run value as follows. After the inner run value encoding is completed, the current outer run value is set to 0 and the counting restarts. For the AC coefficients of the chrominance component Cr in the target group, the AC coefficients of all chrominance components Cr in the target group are traversed in a preset number of groups. For the current group, the processing is performed as follows to obtain the inner run-length precoding result of the target group: When the AC coefficients of a preset number of chromaticity components Cr in the group are not all 0, the current inner run value is encoded and the AC coefficients of the preset number of chromaticity components Cr in the group are jointly encoded, the current inner run value is set to 0 and the counting starts again; when the AC coefficients of the preset number of chromaticity components Cr in the group are 0, the current inner run value is incremented by 1.
16. The method according to claim 15, characterized in that, The method further includes: Based on the encoding results corresponding to different second parameters, the target second parameter is determined from the second set, and the encoding result of the chromaticity component Cr corresponding to the target second parameter is used as the pre-encoding result of the chromaticity component Cr.
17. The method according to claim 1, characterized in that, The step of determining the target encoding method from the encoding methods based on the first precoding result and the second precoding result includes: Obtain the bitstream size of the first precoding result and the bitstream size of the second precoding result; When the bitstream size of the first precoding result is smaller than the bitstream size of the second precoding result, the first encoding method corresponding to the first precoding result is used as the target encoding method; when the bitstream size of the first precoding result is larger than the bitstream size of the second precoding result, the second encoding method corresponding to the second precoding result is used as the target encoding method.
18. The method according to claim 1, characterized in that, The entropy encoding of the point cloud frame to be encoded using the target encoding method includes: Single-level run-length encoding is performed on the DC coefficients and AC coefficients; or, the DC coefficients are encoded using a single-level run-length encoding method, and the AC coefficients are encoded using a hybrid run-length encoding method. In the hybrid run-length encoding, the first parameter and the second parameter used to encode the AC coefficients of the chromaticity component Cb and the AC coefficients of the chromaticity component Cr are the target first parameter and the target second parameter determined during precoding, respectively. The index, DC coefficient, or AC coefficient of the target encoding method are encoded.
19. The method according to claim 18, characterized in that, The method further includes: The indexes of the first parameter and the second parameter of the target are encoded.
20. A point cloud entropy decoding method, characterized in that, include: Obtain the bitstream to be decoded; Obtain the index of the target encoding method from the bitstream to be decoded; Based on the index of the target encoding method, the transform coefficients in the bitstream to be decoded are decoded using the corresponding decoding mode; The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels. The target encoding method is determined by the point cloud entropy encoding end in the following manner: Based on the transformation coefficients, a first transformation coefficient and a second transformation coefficient are obtained; wherein the first transformation coefficient and the second transformation coefficient are transformation coefficients with different arrangements. The first transform coefficient and the second transform coefficient are pre-coded using different encoding methods to obtain a first pre-coding result and a second pre-coding result. Based on the first precoding result and the second precoding result, a target encoding method is determined from the encoding methods; In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed manner according to the three color channels; in the second transformation coefficient, the DC coefficient is arranged in a mixed manner according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
21. The method according to claim 20, characterized in that, The transformation coefficients are processed into a first transformation coefficient and a second transformation coefficient with two different arrangements. In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed arrangement according to the three color channels. In the second transformation coefficient, the DC coefficient is arranged in a mixed arrangement according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
22. The method according to claim 21, characterized in that, The step of decoding the transform coefficients in the bitstream to be decoded using the corresponding decoding mode based on the index of the target encoding method includes: Obtain the index of the target encoding method, the number of DC coefficients, or the number of AC coefficients from the bitstream to be decoded; When the index of the target encoding mode indicates that the target encoding mode is the first encoding mode, the DC coefficients and the AC coefficients are decoded using the single-layer run-length decoding method, taking into account the number of DC coefficients and the number of AC coefficients respectively. When the index of the target encoding method indicates that the target encoding mode is the second encoding method, the DC coefficients and the AC coefficients of the luminance component are decoded using a single-layer run-length decoding method, based on the number of DC coefficients and the number of AC coefficients. The indexes of the target first parameter and the target second parameter of the chrominance component Cb and the chrominance component Cr are decoded respectively. Based on the obtained target first parameter of the chrominance component Cb and target second parameter of the chrominance component Cr, and the number of DC coefficients or AC coefficients, the AC coefficients of the chrominance component Cb and the chrominance component Cr are decoded using a two-layer run-length decoding method.
23. A point cloud entropy encoding device, characterized in that, include: The first acquisition module is used to acquire the transform coefficients of the point cloud frame to be encoded; The second acquisition module is used to determine the target encoding method based on the transformation coefficients; The first encoding module is used to perform entropy encoding on the point cloud frame to be encoded using the target encoding method; The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels. The second acquisition module includes: The first submodule is used to obtain a first transformation coefficient and a second transformation coefficient based on the transformation coefficients; wherein the first transformation coefficient and the second transformation coefficient are transformation coefficients with different arrangements; The second submodule is used to pre-encode the first transform coefficient and the second transform coefficient using different encoding methods to obtain the first pre-coding result and the second pre-coding result. The third submodule is used to determine the target encoding method from the encoding methods based on the first precoding result and the second precoding result; In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed manner according to the three color channels; in the second transformation coefficient, the DC coefficient is arranged in a mixed manner according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
24. A point cloud entropy decoding device, characterized in that, include: The first acquisition module is used to acquire the bitstream to be decoded; The second acquisition module is used to obtain the index of the target encoding method from the bitstream to be decoded; The first decoding module is used to decode the transform coefficients in the bitstream to be decoded according to the index of the target encoding method and the corresponding decoding mode. The transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and / or AC coefficients are arranged separately according to color channels. The target encoding method is determined by the point cloud entropy encoding end in the following manner: Based on the transformation coefficients, a first transformation coefficient and a second transformation coefficient are obtained; wherein the first transformation coefficient and the second transformation coefficient are transformation coefficients with different arrangements. The first transform coefficient and the second transform coefficient are pre-coded using different encoding methods to obtain a first pre-coding result and a second pre-coding result. Based on the first precoding result and the second precoding result, a target encoding method is determined from the encoding methods; In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed manner according to the three color channels; in the second transformation coefficient, the DC coefficient is arranged in a mixed manner according to the three color channels, and the AC coefficient is arranged separately according to the color channels.
25. An electronic device, characterized in that, include: Memory, processor, and programs stored in the memory and executable on the processor; The processor is configured to read a program from the memory to implement the steps in the point cloud entropy encoding method as described in any one of claims 1 to 19; or to implement the steps in the point cloud entropy decoding method as described in any one of claims 20 to 22.
26. A readable storage medium, characterized in that, The program is used to store a program that, when executed by a processor, implements the steps of the point cloud entropy encoding method as described in any one of claims 1 to 19; or implements the steps of the point cloud entropy decoding method as described in any one of claims 20 to 22.
Citation Information
Patent Citations
Method and equipment for entropy coding and entropy decoding of point cloud attribute transformation coefficients
CN113489980A