CN116320453A - Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium - Google Patents

Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN116320453A
CN116320453A CN202111467830.1A CN202111467830A CN116320453A CN 116320453 A CN116320453 A CN 116320453A CN 202111467830 A CN202111467830 A CN 202111467830A CN 116320453 A CN116320453 A CN 116320453A
Authority
CN
China
Prior art keywords
coefficients
coefficient
target
component
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111467830.1A
Other languages
Chinese (zh)
Inventor
李琳
顾明
周冰
付荣
冯亚楠
王飞
邢刚
李辰帅
柳建龙
尹茜
王苫社
马思伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
Peking University
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, China Mobile Communications Group Co Ltd, MIGU Culture Technology Co Ltd filed Critical Peking University
Priority to CN202111467830.1A priority Critical patent/CN116320453A/en
Priority to PCT/CN2022/136534 priority patent/WO2023098917A1/en
Publication of CN116320453A publication Critical patent/CN116320453A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • H04N19/64Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets characterised by ordering of coefficients or of bits for transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/93Run-length coding

Abstract

The application discloses a point cloud entropy coding method, a decoding method, a device, equipment and a readable storage medium, and relates to the technical field of point cloud coding and decoding so as to improve the compression performance of point clouds. The method comprises the following steps: obtaining a transformation coefficient of a point cloud frame to be encoded; determining a target coding mode according to the transformation coefficient; entropy coding is carried out on the point cloud frame to be coded by utilizing the target coding mode; wherein the transform coefficients include direct current DC coefficients and alternating current AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel. The embodiment of the application can improve the compression performance of the point cloud.

Description

Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium
Technical Field
The present disclosure relates to the field of encoding and decoding technologies, and in particular, to a point cloud entropy encoding method, a decoding method, a device, equipment, and a readable storage medium.
Background
Along with the rapid development of three-dimensional information sensing and obtaining technology, the three-dimensional point cloud with high resolution and high fidelity is widely applied to scenes such as automatic driving, autonomous navigation, immersive media, virtual reality and the like. The three-dimensional point cloud is composed of a series of a great amount of position information and attribute information (color, reflectivity, normal vector and the like) corresponding to the position information, and can flexibly represent the spatial structure and surface attribute of a three-dimensional object or scene. However, the vast amount of point cloud data places tremendous pressure on limited bandwidth and storage space. Therefore, how to achieve efficient point cloud data compression is an urgent issue to be addressed.
Three-dimensional point cloud compression is largely divided into geometric compression and attribute compression. Wherein, the attribute compression is mainly divided into two branches of predictive coding and transform transformation. Inspired by conventional hybrid video coding (e.g., h.264/AVC and h.265/HEVC), various attribute compression methods are provided in the prior art.
At present, a test platform PCEMv5.0 is provided by a Chinese AVS (Audio Video coding Standard, digital audio video coding standard) point cloud compression working group, wherein a color point cloud attribute compression method mainly adopts a point cloud transformation method based on DCT (Discrete Cosine Transform, discrete cosine transformation). However, in the process of implementing the application, the inventor finds that the arrangement of the transformation coefficient sequences obtained by the method is unreasonable, so that the efficiency of run length coding is affected, and the compression performance of the point cloud is further reduced.
Disclosure of Invention
The embodiment of the application provides a point cloud entropy coding method, a decoding method, a device, equipment and a readable storage medium, so as to improve the compression performance of point clouds.
In a first aspect, an embodiment of the present application provides a point cloud entropy encoding method, including:
obtaining a transformation coefficient of a point cloud frame to be encoded;
determining a target coding mode according to the transformation coefficient;
Entropy coding is carried out on the point cloud frame to be coded by utilizing the target coding mode;
wherein the transform coefficients include direct current DC coefficients and alternating current AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel.
In a second aspect, an embodiment of the present application further provides a point cloud entropy decoding method, including:
acquiring a code stream to be decoded;
obtaining an index of a target coding mode from the code stream to be decoded;
decoding the transformation coefficients in the code stream to be decoded by using the corresponding decoding mode according to the index of the target coding mode;
wherein the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or AC coefficients are arranged individually in color channels.
In a third aspect, an embodiment of the present application further provides a point cloud entropy encoding device, including:
the first acquisition module is used for acquiring the transformation coefficient of the point cloud frame to be encoded;
the second acquisition module is used for determining a target coding mode according to the transformation coefficient;
the first coding module is used for entropy coding the point cloud frame to be coded by utilizing the target coding mode;
wherein the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel.
In a fourth aspect, an embodiment of the present application further provides a point cloud entropy decoding device, including:
the first acquisition module is used for acquiring a code stream to be decoded;
the second acquisition module is used for acquiring an index of a target coding mode from the code stream to be decoded;
the first decoding module is used for decoding the transformation coefficients in the code stream to be decoded by utilizing the corresponding decoding mode according to the index of the target coding mode;
wherein the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel.
In a fifth aspect, embodiments of the present application further provide an electronic device, including: a transceiver, a memory, a processor and a program stored on the memory and executable on the processor, which processor implements the steps of the method as described above when executing the program.
In a sixth aspect, embodiments of the present application also provide a readable storage medium having stored thereon a program which, when executed by a processor, implements the steps of the method as described above.
In the embodiment of the application, at least part of the DC coefficients and/or the AC coefficients of the transformation coefficients are arranged independently according to the color channels, so that more transformation zero coefficients can be arranged together by utilizing the scheme of the embodiment of the application, thereby improving the efficiency of run-length coding and the compression performance of point clouds.
Drawings
FIG. 1 is one of the flowcharts of a point cloud entropy encoding method provided in an embodiment of the present application;
FIG. 2 is a second flowchart of a point cloud entropy encoding method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a hybrid run length encoding method according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of outer run length encoding provided in an embodiment of the present application;
FIG. 5 is a flowchart of inner layer run length encoding according to an embodiment of the present application;
fig. 6 is a flowchart of a point cloud entropy decoding method provided in an embodiment of the present application;
fig. 7 is a schematic diagram of a point cloud entropy encoding device provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a point cloud entropy decoding device provided in an embodiment of the present application.
Detailed Description
In the embodiment of the application, the term "and/or" describes the association relationship of the association objects, which means that three relationships may exist, for example, a and/or B may be represented: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The term "plurality" in the embodiments of the present application means two or more, and other adjectives are similar thereto.
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of a point cloud entropy encoding method provided in an embodiment of the present application, as shown in fig. 1, including the following steps:
and step 101, obtaining a transformation coefficient of the point cloud frame to be encoded.
In this step, the point cloud frame to be encoded after hilbert reordered may be subjected to coding block division to obtain a plurality of coding blocks, and the plurality of coding blocks may be predicted, transformed, and quantized to obtain a transform coefficient block. And obtaining the transformation coefficients of the point cloud frame to be encoded according to the transformation coefficient blocks of all the encoding blocks.
Specifically, the geometrically reconstructed point cloud data are reordered from big to small according to the Hilbert codes, and then the point cloud to be encoded is obtained by self-adaptive division according to the Hilbert codes, namely the encoding blocks. And then, carrying out weighted attribute prediction on the obtained sub-block to be coded, and carrying out transformation and quantization on the prediction residual error to obtain a transformation coefficient block. And obtaining the transformation coefficient according to the obtained transformation coefficient block.
Wherein the transform coefficients include direct current DC coefficients and alternating current AC coefficients. At least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel. For example, some or all of the AC coefficients may be arranged individually in color channels and the DC coefficients arranged in a color three-channel mix.
And 102, determining a target coding mode according to the transformation coefficient.
When the AC coefficients are arranged individually in color channels, the AC coefficients may be precoded using a hybrid run-length coding method, and the coding scheme is taken as a target coding scheme.
In this process, mainly includes:
(1) And pre-coding the AC coefficient of the brightness component by using a single-layer run method to obtain a brightness component pre-coding result. The process may include:
(11) And obtaining the AC coefficient of the target brightness component according to the AC coefficient of the brightness component.
When the number of AC coefficients of the luminance component is a multiple of a target value (e.g., 3), the AC coefficients of the luminance component are utilized as the AC coefficients of the luminance component. When the number of the AC coefficients of the brightness component is not a multiple of a target value (such as 3), expanding the AC coefficients of the brightness component to obtain the AC coefficients of the expanded brightness component, enabling the number of the AC coefficients of the expanded brightness component to be a multiple of the target value (such as 3), and taking the AC coefficients of the expanded brightness component as the AC coefficients of the target brightness component.
Specifically, for example, taking a preset number of three and a target value of 3 as an example, setting the number of AC coefficients of the luminance component as ACSize, and directly performing single-layer run coding of a triplet on the AC coefficients of the luminance component when ACSize% 3=0; when ACSize%3 is not equal to 0, the AC coefficients of the luminance components are first expanded to a multiple of 3. The method comprises the following steps: according to the formula
Figure BDA0003392278230000041
The number of groups of the AC series of the luminance component is calculated and recorded as ACLumaCount, then 0 is filled (ACLumaCount multiplied by 3-ACSize) at the end of the AC series of the original luminance component, and finally, the single-layer run-length coding of the AC series of the luminance component after filling is performed in a group of three.
(12) And encoding the AC coefficient of the target brightness component by using a single-layer run method to obtain a brightness component precoding result.
For the AC coefficients of the target brightness components, traversing the AC coefficients of all the brightness components by taking a group of preset quantity (such as three) as a unit, and for the current target group, processing in the following manner to obtain a brightness component precoding result:
when the AC coefficients of the preset number of brightness components in the target group are all 0, adding 1 to the current run value; when the AC coefficients of the preset number of brightness components in the target group are not all 0, the current run value is coded, the AC coefficients of the preset number of brightness components in the target group are coded in a combined mode, the current run value is set to be 0, and counting is restarted.
Specifically, taking a preset number of three as an example, traversing the AC coefficients (or the filled AC coefficients) of the luminance components in a unit of three groups, and counting the number of runs of which the AC coefficients (ACi-1_l, aci_l, aci+1_l) of the three luminance components in a group are all 0, wherein ACi _l represents the ith AC coefficient of the luminance component. If the AC coefficients of a group of three brightness components are all 0, adding 1 to the run value; if the AC coefficients of a group of three brightness components are not all 0, firstly encoding the run value, then carrying out joint encoding on the AC coefficients of the group of three brightness components, finally setting the run value to 0 and restarting counting until all the AC coefficients of the brightness components are traversed and obtaining the encoding code stream of the brightness components.
(2) And pre-encoding the AC coefficient of the chrominance component Cb by using a double-layer run method to obtain a pre-encoding result of the chrominance component Cb. The process may include:
(21) And obtaining the AC coefficient of the target chrominance component Cb according to the AC coefficient of the chrominance component Cb.
When the number of AC coefficients of the chrominance component Cb is not s i Expanding the AC coefficient of the chrominance component Cb to obtain the AC coefficient of the extended chrominance component Cb, so that the number of the AC coefficients of the extended chrominance component Cb is s i And taking the AC coefficient of the extended chrominance component Cb as the AC coefficient of the target chrominance component Cb.
Wherein said s i Represents a first parameter selected from a first set s 1 ,s 2 ,…,s n ]Wherein the s i Is a multiple of the target value (such as 3), i is more than or equal to 1 and n is more than or equal to n.
In a specific application, a series of first sets can be set up and denoted groupcb= [ s ] 1 ,s 2 ,…,s n ]Wherein s is i Is a multiple of 3. Thereafter, according to the first set s i Color matchingThe AC coefficients of the degree component Cb are extended.
The expansion mode is specifically as follows: the number of AC coefficients of the chrominance component Cb is ACSize, and when ACSize% s i When=0, the AC coefficient column of the chrominance component Cb is directly double-layer run-length encoded; when ACSize% s i When not equal to 0, firstly expanding the AC coefficient column of the chrominance component Cb to s i Is specifically: firstly according to the formula
Figure BDA0003392278230000061
The number of groups of the AC series of the chrominance component Cb is calculated and noted as ACCbCount, and then the end of the AC series of the original chrominance component Cb is padded (accbcount×s i ACSize) 0.
(22) And encoding the AC coefficient of the target chrominance component Cb by using a double-layer run method to obtain a precoding result of the chrominance component Cb.
And encoding the AC coefficient of the target chrominance component Cb by using a double-layer run method to obtain a precoding result of the chrominance component Cb.
Specifically, the process may include:
s1: the AC coefficient of the target chrominance component Cb is expressed as s i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chrominance component Cb in the target group is 0; when the AC coefficient of the chrominance component Cb in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chrominance component Cb in the target group as follows; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
for the AC coefficients of the chrominance components Cb in the target packet, traversing the AC coefficients of all the chrominance components Cb in the target packet in a preset number (e.g., three) of a set of units, and for the current packet, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target packet:
When the AC coefficients of the preset number of the chrominance components Cb in the group are not all 0, coding the current inner layer run value and jointly coding the AC coefficients of the preset number of the chrominance components Cb in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cb in the packet is 0, the current inner layer run value is increased by 1.
On the basis of the above, the target first parameter may be determined from the first set according to the encoding results corresponding to the different first parameters, and the encoding result of the chrominance component Cb corresponding to the target first parameter may be used as the precoding result of the chrominance component Cb.
Specifically, RDO (Rate Distortion Optimation, rate distortion optimization) may be used to select a target coding mode, i.e., obtain an optimal first parameter (i.e., a target first parameter), and obtain a coded code stream corresponding to the optimal first parameter as a shortest coded code stream of the chrominance component Cb.
That is, the sizes of the encoded streams obtained under different first parameters may be compared, and the first parameter corresponding to the encoded stream having the smallest stream may be selected as the target first parameter.
(3) And pre-encoding the AC coefficient of the chroma component Cr by using a double-layer run method to obtain a pre-encoding result of the chroma component Cr. The process may include:
(31) And obtaining the AC coefficient of the target chroma component Cr according to the AC coefficient of the chroma component Cr.
When the number of AC coefficients of the chrominance component Cr is m i Using the AC coefficient of the chrominance component Cr as the AC coefficient of the target chrominance component Cr; when the number of AC coefficients of the chrominance component Cr is not s i Expanding the AC coefficient of the chroma component Cr to obtain the AC coefficient of the expanded chroma component Cr, so that the number of the AC coefficients of the expanded chroma component Cr is m i And taking the AC coefficient of the extended chrominance component Cr as the AC coefficient of the target chrominance component Cr.
Wherein said m i Represents a second parameter selected from a second set [ m ] 1 ,m 2 ,…,m n ]Wherein, saidM is as follows i Is a multiple of the target value (such as 3), i is more than or equal to 1 and n is more than or equal to n.
Specifically, a series of first sets may be first obtained and denoted as groupcr= [ m ] 1 ,m 2 ,…,m n ]Wherein m is i Is a multiple of 3. Thereafter, according to the first set m i The AC coefficients of the chrominance components Cr are extended.
The specific expansion mode is as follows: the number of AC coefficients of the color component Cr is ACSize, and when ACSize% m i When=0, directly performing double-layer run-length encoding on the AC coefficient column of the chrominance component Cr; when ACSize% m i When not equal to 0, the AC coefficient column of the chroma component Cr is expanded to m i Is a multiple of (2). The method comprises the following steps: according to the formula
Figure BDA0003392278230000071
The number of groups of the AC series of the chrominance component Cr is calculated and noted as ACCrCount, and then the end of the AC series of the original chrominance component Cr is padded (ACCrCount x m i ACSize) 0.
(32) And encoding the AC coefficient of the target chroma component Cr by using a double-layer run method to obtain a precoding result of the chroma component Cr.
And encoding the AC coefficient of the target chroma component Cr by using a double-layer run method to obtain a precoding result of the chroma component Cr.
Specifically, the process may include:
s1: the AC coefficient of the target chromaticity component Cr is set to m i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chromaticity component Cr in the target group is 0; when the AC coefficient of the chroma component Cr in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chroma component Cr in the target group in the following manner; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
For the AC coefficients of the chrominance components Cr in the target group, traversing the AC coefficients of all the chrominance components Cr in the target group by taking a group of a preset number (such as three) as a unit, and for the current group, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target group:
when the AC coefficients of the preset number of the chrominance components Cr in the group are not all 0, coding the current inner layer run value, and jointly coding the AC coefficients of the preset number of the chrominance components Cr in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cr in the packet is 0, the current inner layer run value is added by 1.
On the basis of the above, the target second parameter may be determined from the second set according to the encoding results corresponding to the different second parameters, and the encoding result of the chrominance component Cr corresponding to the target second parameter may be used as the precoding result of the chrominance component Cr.
Specifically, RDO may be used to select the target coding mode, that is, obtain the optimal second parameter (i.e., the target second parameter), and obtain the coded code stream corresponding to the target second parameter as the shortest coded code stream of the chroma component Cr.
That is, the sizes of the encoded streams obtained under the different second parameters may be compared, and the second parameter corresponding to the encoded stream having the smallest stream may be selected as the target second parameter.
(4) And adding the pre-coding result of the brightness component, the pre-coding result of the chromaticity component Cb and the pre-coding result of the chromaticity component Cr to obtain the pre-coding result of the AC coefficient.
Alternatively, when the DC coefficient and the AC coefficient obtain the transform coefficients in different arrangements according to the arrangement, the following may be processed:
and 1021, obtaining a first transformation coefficient and a second transformation coefficient according to the transformation coefficient.
Wherein the first transform coefficient and the second transform coefficient are the transform coefficients having different arrangements. In this step, the obtained transform coefficients are disassembled and rearranged to obtain two kinds of transform coefficients, namely, a first transform coefficient having a first arrangement and a second transform coefficient having a second arrangement. In the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed mode according to three color channels; in the second transform coefficient, the DC coefficients are arranged in a color three-channel mixture, and the AC coefficients are arranged individually in color channels. I.e. the first transform coefficient and the second transform coefficient are two different arrangements of transform coefficients.
In practical application, the obtained transform coefficient (transform coefficient sequence) is disassembled to obtain a DC coefficient sequence and an AC coefficient sequence, and the AC coefficient sequence is reordered to obtain corresponding three segments of coefficients, which are respectively: an AC series of luminance components, an AC series of chrominance components Cb, and an AC series of chrominance components Cr.
For example, taking a four-point one-set transform as an example, a four-point transform would produce a total of 3 DC coefficients and 9 AC coefficients. Wherein, the 3 DC coefficients are respectively the DC coefficients of the luminance component and the two chrominance components, which are respectively represented by DC_L, DC_Cb and DC_Cr. The 9 AC coefficients are AC1_l, AC2_l, AC3_l, AC1_cb, AC2_cb, AC3_cb, AC1_cr, AC2_cr, AC3_cr, respectively, wherein 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, ACi _cr represents the i-th AC coefficient of the chrominance component Cr, i=1, 2,3.
The DC coefficients in the first transform coefficient and the second transform coefficient are arranged in the order of the luminance component, the chrominance component Cb, and the chrominance component Cr, specifically: (DC_L, DC_Cb, DC_Cr).
The AC coefficients in the first transform coefficient are arranged in the mixed order of the luminance component, the chrominance component Cb, and the chrominance component Cr, specifically: (ac1_l, ac1_cb, ac1_cr) (ac2_l, ac2_cb, ac2_cr) (ac3_l, ac3_cb, ac3_cr).
The AC coefficient ordering in the second variation coefficient is specifically arranged in terms of luminance component, chrominance component Cb, and chrominance component Cr individually: (ac1_l, ac2_l, ac3_l) (ac1_cb, ac2_cb, ac3_cb) (ac1_cr, ac2_cr, ac3_cr).
Step 1022, respectively precoding the first transform coefficient and the second transform coefficient by using different coding modes to obtain a first precoding result and a second precoding result.
Wherein the first transform coefficient and the second transform coefficient correspond to different coding modes. Specifically, the AC coefficient is encoded by a single-layer run length encoding method (a first encoding mode) to obtain a first precoding result; and encoding the AC coefficients in the second transformation coefficients by using a mixed run coding method (a second coding mode) to obtain a second precoding result.
Since the arrangement modes of the DC coefficients are the same in the two arrangement modes, the DC coefficients can not be encoded in the precoding process, so that the efficiency can be further improved. Of course, the DC coefficients may also be precoded. The DC coefficients in different transformation coefficients are all encoded according to a single-layer run-length encoding method. That is, for DC coefficients, all DC coefficients are traversed in a set of units of a preset number (e.g., three), and for the current target group, processing is performed as follows:
When the preset number of DC coefficients in the target group is not all 0, coding the current run value and jointly coding the preset number of DC coefficients in the target group, setting the current run value to 0 and restarting counting; and when the preset number of DC coefficients in the target packet is 0, adding 1 to the current run value. Wherein the target packet is any one packet.
Hereinafter, a method of encoding AC coefficients among different transform coefficients is described in detail.
1. Encoding the AC coefficients in the first transformation coefficients by using a single-layer run length encoding method:
for the AC coefficients in the first transform coefficient, traversing all AC coefficients in a preset number (e.g., three) of groups, and for the current target group, processing as follows:
when the preset number of AC coefficients in the target group is not all 0, coding the current run value and jointly coding the preset number of AC coefficients in the target group, setting the current run value to 0 and restarting counting; when the preset number of AC coefficients in the target packet is all 0, the current run value is added by 1. Wherein the target packet is any one packet.
That is, all AC coefficients are traversed in a set of a predetermined number (e.g., three), and the number of runs in which the predetermined number of AC coefficients (ac_l, ac_cb, ac_cr) in the set are all 0 is counted. If a group of preset number of AC coefficients are all 0, adding 1 to the run value; if a set of preset number of AC coefficients is not all 0, firstly encoding the run value, then carrying out joint encoding on the set of preset number of AC coefficients, finally setting the run value to 0 and restarting counting until all the AC coefficients are traversed. And finally obtaining a precoding code stream corresponding to the AC coefficient of the first transformation coefficient.
2. Encoding the AC coefficients in the second transform coefficients using a hybrid run-length encoding method:
in this process, mainly includes:
(1) And pre-coding the AC coefficient of the brightness component by using a single-layer run method to obtain a brightness component pre-coding result. The process may include:
(11) And obtaining the AC coefficient of the target brightness component according to the AC coefficient of the brightness component.
When the number of AC coefficients of the luminance component is a multiple of a target value (e.g., 3), the AC coefficients of the luminance component are utilized as the AC coefficients of the luminance component. When the number of the AC coefficients of the brightness component is not a multiple of a target value (such as 3), expanding the AC coefficients of the brightness component to obtain the AC coefficients of the expanded brightness component, enabling the number of the AC coefficients of the expanded brightness component to be a multiple of the target value (such as 3), and taking the AC coefficients of the expanded brightness component as the AC coefficients of the target brightness component.
Specifically, for example, taking a preset number of three and a target value of 3 as an example, setting the number of AC coefficients of the luminance component as ACSize, and directly performing single-layer run coding of a triplet on the AC coefficients of the luminance component when ACSize% 3=0; when ACSize%3 is not equal to 0, the AC coefficients of the luminance component are first expanded and the number thereof is increasedExpansion is a multiple of 3. The method comprises the following steps: according to the formula
Figure BDA0003392278230000111
The number of groups of the AC series of the luminance component is calculated and recorded as ACLumaCount, then 0 is filled (ACLumaCount multiplied by 3-ACSize) at the end of the AC series of the original luminance component, and finally, the single-layer run-length coding of the AC series of the luminance component after filling is performed in a group of three.
(12) And encoding the AC coefficient of the target brightness component by using a single-layer run method to obtain a brightness component precoding result.
For the AC coefficients of the target brightness components, traversing the AC coefficients of all the brightness components by taking a group of preset quantity (such as three) as a unit, and for the current target group, processing in the following manner to obtain a brightness component precoding result:
when the AC coefficients of the preset number of brightness components in the target group are all 0, adding 1 to the current run value; when the AC coefficients of the preset number of brightness components in the target group are not all 0, the current run value is coded, the AC coefficients of the preset number of brightness components in the target group are coded in a combined mode, the current run value is set to be 0, and counting is restarted.
Specifically, taking a preset number of three as an example, traversing the AC coefficients (or the filled AC coefficients) of the luminance components in a unit of three groups, and counting the number of runs of which the AC coefficients (ACi-1_l, aci_l, aci+1_l) of the three luminance components in a group are all 0, wherein ACi _l represents the ith AC coefficient of the luminance component. If the AC coefficients of a group of three brightness components are all 0, adding 1 to the run value; if the AC coefficients of a group of three brightness components are not all 0, firstly encoding the run value, then carrying out joint encoding on the AC coefficients of the group of three brightness components, finally setting the run value to 0 and restarting counting until all the AC coefficients of the brightness components are traversed and obtaining the encoding code stream of the brightness components.
(2) And pre-encoding the AC coefficient of the chrominance component Cb by using a double-layer run method to obtain a pre-encoding result of the chrominance component Cb. The process may include:
(21) And obtaining the AC coefficient of the target chrominance component Cb according to the AC coefficient of the chrominance component Cb.
When the number of AC coefficients of the chrominance component Cb is not s i Expanding the AC coefficient of the chrominance component Cb to obtain the AC coefficient of the extended chrominance component Cb, so that the number of the AC coefficients of the extended chrominance component Cb is s i And taking the AC coefficient of the extended chrominance component Cb as the AC coefficient of the target chrominance component Cb.
Wherein said s i Represents a first parameter selected from a first set s 1 ,s 2 ,…,s n ]Wherein the s i Is a multiple of the target value (such as 3), i is more than or equal to 1 and n is more than or equal to n.
In a specific application, a series of first sets can be set up and denoted groupcb= [ s ] 1 ,s 2 ,…,s n ]Wherein s is i Is a multiple of 3. Thereafter, according to the first set s i The AC coefficients of the chrominance components Cb are extended.
The expansion mode is specifically as follows: the number of AC coefficients of the chrominance component Cb is ACSize, and when ACSize% s i When=0, the AC coefficient column of the chrominance component Cb is directly double-layer run-length encoded; when ACSize% s i When not equal to 0, firstly expanding the AC coefficient column of the chrominance component Cb to s i Is specifically: firstly according to the formula
Figure BDA0003392278230000121
The number of groups of the AC series of the chrominance component Cb is calculated and noted as ACCbCount, and then the end of the AC series of the original chrominance component Cb is padded (accbcount×s i ACSize) 0.
(22) And encoding the AC coefficient of the target chrominance component Cb by using a double-layer run method to obtain a precoding result of the chrominance component Cb.
And encoding the AC coefficient of the target chrominance component Cb by using a double-layer run method to obtain a precoding result of the chrominance component Cb.
Specifically, the process may include:
s1: the AC coefficient of the target chrominance component Cb is expressed as s i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chrominance component Cb in the target group is 0; when the AC coefficient of the chrominance component Cb in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chrominance component Cb in the target group as follows; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
for the AC coefficients of the chrominance components Cb in the target packet, traversing the AC coefficients of all the chrominance components Cb in the target packet in a preset number (e.g., three) of a set of units, and for the current packet, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target packet:
when the AC coefficients of the preset number of the chrominance components Cb in the group are not all 0, coding the current inner layer run value and jointly coding the AC coefficients of the preset number of the chrominance components Cb in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cb in the packet is 0, the current inner layer run value is increased by 1.
On the basis of the above, the target first parameter may be determined from the first set according to the encoding results corresponding to the different first parameters, and the encoding result of the chrominance component Cb corresponding to the target first parameter may be used as the precoding result of the chrominance component Cb.
Specifically, RDO (Rate Distortion Optimation, rate distortion optimization) may be used to select a target coding mode, i.e. obtain a target first parameter, and obtain a coded code stream corresponding to the target first parameter as the shortest coded code stream of the chrominance component Cb.
That is, the sizes of the encoded streams obtained under different first parameters may be compared, and the first parameter corresponding to the encoded stream having the smallest stream may be selected as the target first parameter.
(3) And pre-encoding the AC coefficient of the chroma component Cr by using a double-layer run method to obtain a pre-encoding result of the chroma component Cr. The process may include:
(31) And obtaining the AC coefficient of the target chroma component Cr according to the AC coefficient of the chroma component Cr.
When the number of AC coefficients of the chrominance component Cr is m i Using the AC coefficient of the chrominance component Cr as the AC coefficient of the target chrominance component Cr; when the number of AC coefficients of the chrominance component Cr is not s i Expanding the AC coefficient of the chroma component Cr to obtain the AC coefficient of the expanded chroma component Cr, so that the number of the AC coefficients of the expanded chroma component Cr is m i And taking the AC coefficient of the extended chrominance component Cr as the AC coefficient of the target chrominance component Cr.
Wherein said m i Represents a second parameter selected from a second set [ m ] 1 ,m 2 ,…,m n ]Wherein said m i Is a multiple of the target value (such as 3), i is more than or equal to 1 and n is more than or equal to n.
Specifically, a series of first sets may be first obtained and denoted as groupcr= [ m ] 1 ,m 2 ,…,m n ]Wherein m is i Is a multiple of 3. Thereafter, according to the first set m i The AC coefficients of the chrominance components Cr are extended.
The specific expansion mode is as follows: the number of AC coefficients of the color component Cr is ACSize, and when ACSize% m i When=0, directly performing double-layer run-length encoding on the AC coefficient column of the chrominance component Cr; when ACSize% m i When not equal to 0, the AC coefficient column of the chroma component Cr is expanded to m i Is a multiple of (2). The method comprises the following steps: according to the formula
Figure BDA0003392278230000141
The number of groups of the AC series of the chrominance component Cr is calculated and noted as ACCrCount, and then the end of the AC series of the original chrominance component Cr is padded (ACCrCount x m i ACSize) 0.
(32) And encoding the AC coefficient of the target chroma component Cr by using a double-layer run method to obtain a precoding result of the chroma component Cr.
And encoding the AC coefficient of the target chroma component Cr by using a double-layer run method to obtain a precoding result of the chroma component Cr.
Specifically, the process may include:
s1: the AC coefficient of the target chromaticity component Cr is set to m i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chromaticity component Cr in the target group is 0; when the AC coefficient of the chroma component Cr in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chroma component Cr in the target group in the following manner; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
for the AC coefficients of the chrominance components Cr in the target group, traversing the AC coefficients of all the chrominance components Cr in the target group by taking a group of a preset number (such as three) as a unit, and for the current group, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target group:
when the AC coefficients of the preset number of the chrominance components Cr in the group are not all 0, coding the current inner layer run value, and jointly coding the AC coefficients of the preset number of the chrominance components Cr in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cr in the packet is 0, the current inner layer run value is added by 1.
On the basis of the above, the target second parameter may be determined from the second set according to the encoding results corresponding to the different second parameters, and the encoding result of the chrominance component Cr corresponding to the target second parameter may be used as the precoding result of the chrominance component Cr.
Specifically, RDO may be used to select the target coding mode, that is, obtain the target second parameter, and use the coded code stream corresponding to the target second parameter as the shortest coded code stream of the chroma component Cr.
That is, the sizes of the encoded streams obtained under the different second parameters may be compared, and the second parameter corresponding to the encoded stream having the smallest stream may be selected as the target second parameter.
(4) And adding the pre-coding result of the brightness component, the pre-coding result of the chromaticity component Cb and the pre-coding result of the chromaticity component Cr to obtain the pre-coding result of the AC coefficient.
Step 1023, determining a target coding mode from the coding modes according to the first precoding result and the second precoding result.
Since the transform coefficient coding is lossless coding, in this step, the selection of the target coding mode by the RDO method can be simplified to compare the pre-encoded stream sizes in the two modes. Thus, the code stream size of the first precoding result and the code stream size of the second precoding result can be obtained. When the code stream size of the first precoding result is smaller than the code stream size of the second precoding result, taking a first coding mode corresponding to the first precoding result as the target coding mode; and when the code stream size of the first precoding result is larger than the code stream size of the second precoding result, taking a second coding mode corresponding to the second precoding result as the target coding mode.
For example, let R 1 A code stream length obtained for a first coding mode of a first transform coefficient, R 2 The mode selection index is encoded using 1bit for the code stream length obtained for the second coding mode of the second transform coefficient. When R is 1 <R 2 And when the coding mode is adopted, the coding mode index is 0, and otherwise, the coding mode index is 1.
And 103, entropy encoding the point cloud frame to be encoded by utilizing the target encoding mode.
In this step, the DC coefficients and the AC coefficients are single-layer run-length encoded; or, the DC coefficient is encoded by adopting a single-layer run length encoding method, and the AC coefficient is encoded by adopting a mixed run length encoding method, wherein when the mixed run length encoding is carried out, a first parameter and a second parameter adopted for encoding the AC coefficient of the chrominance component Cb and the AC coefficient of the chrominance component Cr are respectively a target first parameter and a target second parameter which are determined during precoding, and meanwhile, the index of the target encoding mode, the DC coefficient or the number of the AC coefficients are encoded. When hybrid run-length encoding is employed, the index of the target first parameter and the index of the target second parameter may also be encoded.
Specifically, if the first coding mode is the target coding mode, a single-layer run-length coding method (a group of a preset number (e.g., three) of coefficients) is adopted to code all the transform coefficient sequences (including the DC coefficient and the AC coefficient), and finally the attribute coding code stream is obtained. If the second coding mode is the target coding mode, coding all DC coefficients by adopting a single-layer run method (a group of preset numbers (such as three) coefficients), and then performing mixed run coding on the AC coefficients of the three reordered color components, wherein the specific steps are as follows: the method comprises the steps of encoding an AC coefficient of a luminance component by adopting a single-layer run method with a preset number (such as three) in a group, and encoding AC conversion coefficients of two chrominance components (Cb and Cr) by adopting a double-layer run method respectively, wherein a first parameter and a second parameter respectively adopt a target first parameter and a target second parameter which are determined by RDO in the process of pre-encoding the AC coefficient of the chrominance component Cr and the AC coefficient of the chrominance component Cb. In addition, the index of the coding mode, the index of the target first parameter and the index of the target second parameter, and the number of the DC coefficients (or AC coefficients) are additionally encoded, and finally the attribute coding code stream is obtained.
In the above embodiment, the preset number and the target value are each exemplified by a value of 3. In practical applications, the preset number and the target value may also be other integers greater than 0, for example, 4, so long as they are equal.
In the embodiment of the application, at least part of the DC coefficients and/or the AC coefficients of the transformation coefficients are arranged independently according to the color channels, so that more transformation zero coefficients can be arranged together by utilizing the scheme of the embodiment of the application, thereby improving the efficiency of run-length coding and the compression performance of point clouds.
Referring to fig. 2, an embodiment of the present application provides a point cloud entropy encoding method of a transform coefficient based on RDO. As shown in fig. 2, the method may include the steps of:
step 201, performing coding block division on the point cloud frame after hilbert reordering, including:
and reordering the geometrically reconstructed point cloud data according to the sequence from big to small of the Hilbert codes, and then carrying out self-adaptive division on the point cloud according to the Hilbert codes to obtain the point cloud sub-blocks to be encoded.
Step 202, predicting, transforming and quantizing the current point cloud sub-block to be encoded to obtain a transform coefficient block, including:
and carrying out weighted attribute prediction on the partitioned point cloud sub-blocks to be coded, and carrying out transformation and quantization on prediction residues to obtain a transformation coefficient block to be coded.
Step 203, obtaining all the transform coefficients after traversing the complete frame point cloud, and disassembling and rearranging the transform coefficients to obtain two kinds of ordered transform coefficients, including:
and carrying out traversal division on the whole frame of point cloud data, and carrying out prediction, transformation and quantization on all sub-blocks to be coded to finally obtain all transformation coefficients. The transformation coefficient sequence is disassembled and then divided into a DC coefficient sequence and an AC coefficient sequence, and the AC coefficient sequence in the transformation coefficient sequence is reordered to obtain corresponding three segments of coefficients, namely: the AC series of the luminance component, the AC series of the chrominance component Cb and the AC series of the chrominance component Cr, thereby obtaining two ordered transform coefficients, corresponding to the two coding modes, respectively. The DC coefficients in the two arrangement modes are mixed arrangement of three color channels; the difference of the AC coefficient sequence is expressed as follows: the AC coefficients in the first arrangement are color three-channel mixed arrangements, and the AC coefficients in the second arrangement are further split into three coefficient columns, i.e. the different color channels are arranged individually in a sequence.
Step 204, encoding all AC transform coefficient columns in the first arrangement mode by using a single-layer run length encoding method, including:
All AC coefficients are traversed in triples, and the number of runs for which the three AC coefficients (ac_l, ac_cb, ac_cr) in a group are all 0 is counted. If a group of three AC coefficients are all 0, adding 1 to the run value; if a set of three AC coefficients is not all 0, the run value is first encoded, then the set of three AC coefficients is jointly encoded, and finally the run value is set to 0 and counting is restarted until all AC coefficients are traversed. Finally, the pre-coding stream under the mode is obtained.
In step 205, the AC transform coefficients of the different components in the second order are encoded by using a hybrid run-length encoding method. In connection with fig. 3, the process may include the steps of:
step 2051, encoding the AC coefficients of the luminance component by a single-layer run method, including:
setting the number of all AC coefficients of the brightness component as ACSize, and directly performing single-layer run-length coding of a triplet on the AC coefficient row when ACSize% is 3=0; when ACSize%3 is not equal to 0, the AC coefficient columns are first expanded, and the number of the AC coefficient columns is expanded to be a multiple of 3, specifically: firstly according to the formula
Figure BDA0003392278230000171
The number of groups of the AC coefficient series of the brightness component is calculated and recorded as ACLumaCount, then 0 is filled (ACLumaCount is 3-ACSize) at the tail end of the original AC coefficient series, and finally, the filled AC coefficient series is subjected to single-layer run-length coding in a triplet mode. The encoding method comprises the following steps:
All AC coefficients (or filled AC coefficients) of the luminance components are traversed in a triplet, and the run numbers for which the AC coefficients (ACi-1_l, aci_l, aci+1_l) of the three luminance components in the triplet are all 0 are counted, wherein ACi _l represents the ith AC coefficient of the luminance component. If the AC coefficients of a group of three brightness components are all 0, adding 1 to the run value; if the AC coefficients of a group of three brightness components are not all 0, firstly encoding the run value, then carrying out joint encoding on the AC coefficients of the group of three brightness components, finally setting the run value to 0 and restarting counting until all the AC coefficients of the brightness components are traversed and obtaining the encoding code stream of the brightness components.
In step 2052, the AC coefficients of the chrominance components Cb are encoded using a two-layer run method and the RDO is used to select the target packet mode. The flow chart of the double-layer run length encoding method is shown in fig. 4 and 5, wherein fig. 4 is an outer layer run length encoding flow chart, and fig. 5 is an inner layer run length encoding flow chart. The method comprises the following steps:
a series of first sets is first set and denoted groupcb= [ s ] 1 ,s 2 ,…,s n ]Wherein s is i Is a multiple of 3. Then according to the first set s i The AC coefficient of the chrominance component Cb is extended, specifically: the number of AC coefficients of the set chrominance component Cb is ACSize, and when ACSize% s i When=0, directly performing double-layer run-length coding on the AC coefficient column; when ACSize% s i When not equal to 0, the AC coefficient column is first expanded to s i Is specifically: firstly according to the formula
Figure BDA0003392278230000181
The number of groups of the AC series is calculated and noted as ACCbCount, and then the end of the original AC series is padded (ACCbCount x s i ACSize) 0, and finally double-layer run-length encoding is performed on the filled AC coefficient columns. The coding method specifically comprises the following steps:
first, outer run length coding is performed to s i Traversing all AC coefficients (or filled AC coefficients) of the chrominance components Cb in units of one group, and counting s in one group i The AC coefficients of the chrominance components Cb (ac1_cb, …, ACi _cb, …, ACs) i _cb) is all 0, wherein ACi _cb represents the i-th AC coefficient of the chrominance component Cb, i=1, …, s i . If a group s i The AC coefficient of each chrominance component Cb is not 0, the outer run value is added by 1; if a group s i If the AC coefficients of the chrominance components Cb are not all 0, the outer run-length values are encoded first, and then the set s i And (3) performing inner-layer run coding on the AC coefficients of the chrominance components Cb, setting the outer-layer run value to 0 after the inner-layer run coding is finished, and restarting counting until all the AC coefficients of the chrominance components Cb are traversed.
Wherein, the inner layer run-length code is formed by three stepsA group of unit pairs s i The AC coefficients of the chrominance components Cb are traversed and the number of runs for which the three AC coefficients (ACi-1_cb, aci_cb, aci+1_cb) in a group are all 0 is counted. If a group of three AC coefficients are all 0, adding 1 to the inner layer run value; if a set of three AC coefficients is not all 0, the inner layer run value is first encoded, then the set of three AC coefficients is jointly encoded, and finally the inner layer run value is set to 0 and counting is restarted. Until the traversal is completed s i The AC coefficients continue with the run-length encoding of the outer layer. Finally, RDO is adopted to select a target coding mode, namely, a target first parameter is obtained from the first set, and the shortest coding code stream of the corresponding chroma component Cb is obtained.
Step 2053, encoding the AC coefficient of the chrominance component Cr using a double-layer run method and selecting a target grouping mode using RDO, comprising:
the processing of the chroma component Cr coefficients is encoded by a double-layer run-length encoding method which is the same as that of the chroma component Cb coefficients. The flow chart of the method is shown in fig. 4 and 5, wherein fig. 4 is a flow chart of the outer layer run length coding, and fig. 5 is a flow chart of the inner layer run length coding. The method comprises the following steps:
A series of second sets is first set and denoted groupcr= [ m ] 1 ,m 2 ,…,m n ]Wherein m is i Is a multiple of 3. And then according to the second set m i The AC coefficient of the chrominance component Cr is extended, specifically: the number of AC coefficients of the color component Cr is ACSize, and when ACSize% m i When=0, directly performing double-layer run-length coding on the AC coefficient column; when ACSize% m i When not equal to 0, the AC coefficient column is first expanded to m i Is specifically: firstly according to the formula
Figure BDA0003392278230000191
The number of groups of the AC series is calculated and noted as ACCrCount, and then the end of the original AC series is filled (accrcount×m i ACSize) 0, and finally double-layer run-length encoding is performed on the filled AC coefficient columns. The coding method specifically comprises the following steps:
first, outer run length encoding is performed tom i Traversing all AC coefficients (or filled AC coefficients) of the chrominance components Cr in units of one group, and counting m in one group i The AC coefficients of the chrominance components Cr (ac1_cr, …, ACi _cr, …, ACm i _cr) is all 0, wherein ACi _cr represents the i-th AC coefficient of the chrominance component Cr, i=1, …, m i . If a group m i The AC coefficients of the chrominance components Cr are all 0, and then the outer layer run value is added with 1; if a group m i The AC coefficients of the chrominance components Cr are not all 0, the outer run-length values are encoded first, and then the set of m i And (3) performing inner-layer run coding on the AC coefficients of the chrominance components Cr, setting the outer-layer run value to 0 after the inner-layer run coding is finished, and restarting counting until all the AC coefficients of the chrominance components Cr are traversed.
Wherein the inner layer run length code is formed by combining m in a unit of three i The AC coefficients of the chrominance components Cr are traversed, and the number of runs of which the three AC coefficients (ACi-1_Cr, ACi_Cr, ACi+1_Cr) in a group are all 0 is counted. If a group of three AC coefficients are all 0, adding 1 to the inner layer run value; if a set of three AC coefficients is not all 0, the inner layer run value is first encoded, then the set of three AC coefficients is jointly encoded, and finally the inner layer run value is set to 0 and counting is restarted. Until the m is traversed i The AC coefficients continue with the run-length encoding of the outer layer. Finally, RDO is adopted to select a target coding mode, namely, a target second parameter is obtained from the second set, and the shortest coding code stream of the corresponding chroma component Cr is obtained.
Step 2054, adding together the three code streams of different color components to obtain a pre-encoded code stream of the final AC coefficient in mode two, including:
and adding the AC coding code streams of the brightness component and the two chroma components (Cb and Cr) to obtain a final AC coding code stream of the AC coefficient in the mode II.
In the above different coding modes, the DC coefficients are coded using a single-layer run-length coding scheme.
Step 206, selecting a target coding mode by an RDO method, including:
due to the coding of transform coefficientsThe code is lossless coding, and selecting the target coding mode by a Rate Distortion Optimization (RDO) method can be simplified to compare the precoding stream sizes in the two modes. Let R be 1 For the code stream length in mode, R 2 The mode select index is encoded for the code stream length in mode two and using 1 bit. When R is 1 <R 2 And when the coding mode is adopted to carry out the coding of the transformation coefficient, the coding mode index is 0, and otherwise, the coding mode index is 1.
Step 207, performing entropy encoding by using the target encoding mode and obtaining a final point cloud attribute encoding code stream, including:
if the mode one is the target coding mode, a single-layer run-length coding method (a group of three coefficients) is adopted to code all transformation coefficient sequences (including DC coefficients and AC coefficients), and finally the attribute coding code stream is obtained.
If the second mode is the target coding mode, all DC coefficients are coded by adopting a single-layer run method (a group of three coefficients), and then the AC coefficients of the three reordered color components are mixed run-length coded, specifically: the AC coefficients of the luminance component are encoded by adopting a single-layer run method of a triplet, and the AC transform coefficients of the two chrominance components (Cb and Cr) are respectively encoded by adopting a double-layer run method, wherein the first parameter and the second parameter respectively adopt a target first parameter and a target second parameter in RDO. In addition, the index of the first parameter of the target, the index of the second parameter of the target and the number of DC coefficients are additionally encoded, and finally the attribute encoding code stream is obtained.
In order to verify the performance of the embodiment of the application, the algorithm is implemented on the latest point cloud coding standard platform reference software PCRMv5.0, and standard through sequence is tested to obtain coding performance as shown in tables 1 and 2, wherein the negative number represents the percentage of saving the code rate after adopting the method of the embodiment of the application, and the positive number represents the percentage of increasing the code rate.
Table 1 is a performance comparison table of the reference results of the current latest basic platform pcemv5.0 of AVS under the condition of geometrically limited impairment and attribute impairment (avsc1_ai), and the results indicate that the attribute luminance component, chrominance component Cb and chrominance component Cr of the embodiment of the present application are respectively improved by 0.25% on average in rate-distortion performance.
Table 2 is a performance comparison table of the reference results of the present embodiment with the current latest basic platform pcemv5.0 of AVS under geometrically lossless, property lossy (avsc2_ai) conditions, which shows that the properties of the present embodiment, luminance component, chrominance component Cb and chrominance component Cr, are improved by 3.1%, 3.35% and 3.35% on average in rate-distortion performance, respectively.
TABLE 1
Figure BDA0003392278230000211
TABLE 2
Figure BDA0003392278230000212
/>
In summary, according to the embodiment of the application, for the color attribute of the point cloud, a transformation coefficient point cloud entropy coding method based on RDO is provided, in which a direct current component (DC coefficient) and an alternating current component (AC coefficient) are disassembled for a transformation coefficient block, and a reordering operation is performed for the AC coefficient. In addition, the embodiment of the application also provides a double-layer run-length coding algorithm for the chrominance components Cb and Cr with more zero coefficients, and finally, the RDO method is combined, so that the efficiency of the latest point cloud coding standard is effectively improved, and the point cloud compression performance is effectively improved.
Referring to fig. 6, fig. 6 is a point cloud entropy decoding method provided in an embodiment of the present application, including:
step 601, obtaining a code stream to be decoded.
Step 602, obtaining an index of a target coding mode from the code stream to be decoded.
Step 603, decoding the transform coefficients in the code stream to be decoded by using the corresponding decoding mode according to the index of the target encoding mode;
wherein the transform coefficients include DC coefficients and AC coefficients. At least some of the DC coefficients and the alternating current AC coefficients are arranged individually according to the color channel.
Wherein the transform coefficients are processed into a first transform coefficient and a second transform coefficient having two different arrangements, in which the DC coefficient and the AC coefficient are arranged in a color three-channel mixture; in the second transform coefficient, the DC coefficients are arranged in a color three-channel mixture, and the AC coefficients are arranged individually in color channels.
Specifically, in this step, the following procedure may be included:
(1) And obtaining the index of the target coding mode, the number of DC coefficients or the number of AC coefficients from the code stream to be decoded.
(2) And when the index of the target coding mode indicates that the target coding mode is the first coding mode, respectively combining the number of DC coefficients and the number of AC coefficients, and respectively decoding the DC coefficients and the AC coefficients by using a single-layer run length decoding method.
For example, according to the size of the run value, it can be determined how many coefficients are 0, and then, other coefficients other than 0 are decoded.
When the index of the target coding mode represents that the target coding mode is a second coding mode, the DC coefficient and the AC coefficient of the brightness component are decoded by a single-layer run decoding method by combining the number of the DC coefficients and the number of the AC coefficients, and the indexes of the target first parameters and the indexes of the target second parameters of the chroma components Cb and Cr are respectively decoded; and respectively performing double-layer run-length decoding on the chrominance component Cb and the AC coefficient of the chrominance component Cr according to the obtained target first parameter of the chrominance component Cb, the obtained target second parameter of the chrominance component Cr and the number of the DC coefficients or the AC coefficients.
In the first coding mode, single-layer run-length coding is carried out on the DC coefficient and the AC coefficient; in the second coding mode, a single-layer run-length coding method is adopted for coding the DC coefficient, and a hybrid run-length coding method is adopted for coding the AC coefficient.
In the above decoding process, if the number of DC coefficients is obtained by decoding, the number of AC coefficients may 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 by decoding, the number of DC coefficients may be obtained by subtracting the number of AC coefficients from the total number of points in the point cloud frame.
In the embodiment of the application, the transform coefficient is disassembled at the encoding end and the target encoding mode is determined by utilizing different encoding modes, so that the encoded code stream can be more efficiently obtained in the target encoding mode. Accordingly, at the decoding end, as the transform coefficients are disassembled so that more coefficients with 0 are arranged together, the decoding end can more efficiently determine the coefficient with 0, and the decoding efficiency of the decoding end can be correspondingly improved.
The embodiment of the application also provides a point cloud entropy coding device. As shown in fig. 7, the point cloud entropy encoding apparatus 700 includes:
a first obtaining module 701, configured to obtain a transform coefficient of a point cloud frame to be encoded; a second obtaining module 702, configured to determine a target coding mode according to the transform coefficient; the first encoding module 703 is configured to entropy encode the point cloud frame to be encoded by using the target encoding mode; wherein the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel. At least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel.
Optionally, the first obtaining module includes:
the dividing sub-module is used for dividing the coding blocks of the point cloud frames to be coded after the Hilbert reordering to obtain a plurality of coding blocks; the first acquisition submodule is used for predicting, transforming and quantizing the plurality of coding blocks to obtain a transformation coefficient block; and the second acquisition sub-module is used for obtaining the transformation coefficients of the point cloud frame to be encoded according to the transformation coefficient blocks of all the encoding blocks.
Optionally, the second obtaining module includes:
the first sub-module is used for obtaining a first transformation coefficient and a second transformation coefficient according to the transformation coefficient; wherein the first transform coefficient and the second transform coefficient are the transform coefficients with different arrangements;
the second sub-module is used for respectively pre-coding the first transformation coefficient and the second transformation coefficient by utilizing different coding modes to obtain a first pre-coding result and a second pre-coding result;
a third sub-module, configured to determine a target coding mode from the coding modes according to the first precoding result and the second precoding result;
wherein, in the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed mode according to three color channels; in the second transform coefficient, the DC coefficients are arranged in a color three-channel mixture, and the AC coefficients are arranged individually in color channels.
Optionally, the second submodule includes:
the first coding submodule is used for coding the AC coefficients in the first transformation coefficients by using a single-layer run coding method to obtain a first precoding result;
and the second coding submodule is used for coding the AC coefficients in the second transformation coefficients by using a mixed run coding method to obtain a second precoding result.
Optionally, the first encoding submodule is configured to traverse all AC coefficients in a preset number of groups for the AC coefficients, and process for the current target group as follows:
when the preset number of AC coefficients in the target group is not all 0, coding the current run value and jointly coding the preset number of AC coefficients in the target group, setting the current run value to 0 and restarting counting; when the preset number of AC coefficients in the target packet is all 0, the current run value is added by 1.
Optionally, when the AC coefficients are arranged individually in color channels, the second obtaining module is configured to:
pre-coding the AC coefficient of the brightness component by using a single-layer run method to obtain a brightness component pre-coding result;
Pre-coding the AC coefficient of the chrominance component Cb by using a double-layer run method to obtain a pre-coding result of the chrominance component Cb;
pre-coding the AC coefficient of the chroma component Cr by using a double-layer run method to obtain a pre-coding result of the chroma component Cr;
and adding the pre-coding result of the brightness component, the pre-coding result of the chromaticity component Cb and the pre-coding result of the chromaticity component Cr to obtain the pre-coding result of the AC coefficient.
Optionally, the second encoding submodule includes:
the first coding unit is used for pre-coding the AC coefficient of the brightness component by using a single-layer run method to obtain a brightness component pre-coding result;
the second coding unit is used for precoding the AC coefficient of the chrominance component Cb by using a double-layer run method to obtain a precoding result of the chrominance component Cb;
a third encoding unit, configured to perform precoding on the AC coefficient of the chrominance component Cr by using a double-layer run method, so as to obtain a precoding result of the chrominance component Cr;
and the first acquisition unit is used for adding the pre-coding result of the brightness component, the pre-coding result of the chromaticity component Cb and the pre-coding result of the chromaticity component Cr to obtain the pre-coding result of the AC coefficient.
Wherein the first encoding unit includes:
a first obtaining subunit, configured to obtain an AC coefficient of the target luminance component according to the AC coefficient of the luminance component;
and the first coding subunit is used for coding the AC coefficient of the target brightness component by using a single-layer run method to obtain a brightness component precoding result.
Wherein the first obtaining subunit is configured to use, when the number of AC coefficients of the luminance component is a multiple of a target value, the AC coefficients of the luminance component as AC coefficients of the luminance component; when the number of the AC coefficients of the brightness component is not a multiple of the target value, expanding the AC coefficients of the brightness component to obtain the AC coefficients of the expanded brightness component, enabling the number of the AC coefficients of the expanded brightness component to be a multiple of the target value, and taking the AC coefficients of the expanded brightness component as the AC coefficients of the target brightness component.
The first coding subunit is configured to:
traversing the AC coefficients of all the brightness components by taking a group of preset quantity as a unit for the AC coefficients of the target brightness components; for the current target packet, processing is performed as follows to obtain a brightness component precoding result:
When the AC coefficients of the preset number of brightness components in the target group are all 0, adding 1 to the current run value; when the AC coefficients of the preset number of brightness components in the target group are not all 0, the current run value is coded, the AC coefficients of the preset number of brightness components in the target group are coded in a combined mode, the current run value is set to be 0, and counting is restarted.
Wherein the second encoding unit is configured to:
a first obtaining subunit, configured to obtain an AC coefficient of the target chrominance component Cb according to the AC coefficient of the chrominance component Cb;
and the first coding subunit is used for coding the AC coefficient of the target chroma component Cb by using a double-layer run method to obtain a precoding result of the chroma component Cb.
Wherein the first acquisition subunit is configured to, when the number of AC coefficients of the chrominance component Cb is s i Using the AC coefficient of the chrominance component Cb as the AC coefficient of the target chrominance component Cb; when the number of AC coefficients of the chrominance component Cb is not s i Expanding the AC coefficient of the chrominance component Cb to obtain the AC coefficient of the extended chrominance component Cb, so that the number of the AC coefficients of the extended chrominance component Cb is s i And taking the AC coefficient of the extended chrominance component Cb as the AC coefficient of the target chrominance component Cb; wherein said s i Represents a first parameter selected from a first set s 1 ,s 2 ,…,s n ]Wherein the s i I is more than or equal to 1 and less than or equal to n which are multiples of the target value.
The first coding subunit is configured to perform the following procedure:
s1: the AC coefficient of the target chrominance component Cb is expressed as s i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chrominance component Cb in the target group is 0; when the AC coefficient of the chrominance component Cb in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chrominance component Cb in the target group as follows; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
for the AC coefficients of the chrominance components Cb in the target group, traversing the AC coefficients of all the chrominance components Cb in the target group by taking a preset number as a group, and for the current group, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target group:
When the AC coefficients of the preset number of the chrominance components Cb in the group are not all 0, coding the current inner layer run value and jointly coding the AC coefficients of the preset number of the chrominance components Cb in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cb in the packet is 0, the current inner layer run value is increased by 1.
Optionally, the first coding subunit is further configured to perform the following procedure:
s2: and determining a target first parameter from the first set according to the coding results corresponding to different first parameters, and taking the coding result of the chroma component Cb corresponding to the target first parameter as the precoding result of the chroma component Cb.
Optionally, the third encoding unit includes:
a first obtaining subunit, configured to obtain an AC coefficient of the target chrominance component Cr according to the AC coefficient of the chrominance component Cr;
and the first coding subunit is used for coding the AC coefficient of the target chroma component Cr by using a double-layer run method to obtain a precoding result of the chroma component Cr.
Wherein the first acquisition subunit is configured to, when the number of AC coefficients of the chrominance component Cr is m i Using the AC coefficient of the chrominance component Cr as the AC coefficient of the target chrominance component Cr; when the number of AC coefficients of the chrominance component Cr is not s i Expanding the AC coefficient of the chroma component Cr to obtain the AC coefficient of the expanded chroma component Cr, so that the number of the AC coefficients of the expanded chroma component Cr is m i And taking the AC coefficient of the expanded chrominance component Cr as the AC coefficient of the target chrominance component Cr; wherein said m i Represents a second parameter selected from a second set [ m ] 1 ,m 2 ,…,m n ]Wherein said m i I is more than or equal to 1 and less than or equal to n which are multiples of the target value.
Wherein the first coding subunit is configured to perform the following procedure:
s1: the AC coefficient of the target chromaticity component Cr is set to m i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chromaticity component Cr in the target group is 0; when the AC coefficient of the chroma component Cr in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chroma component Cr in the target group in the following manner; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
For the AC coefficients of the chrominance components Cr in the target group, traversing the AC coefficients of all the chrominance components Cr in the target group by taking a preset number as a group, and for the current group, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target group:
when the AC coefficients of the preset number of the chrominance components Cr in the group are not all 0, coding the current inner layer run value, and jointly coding the AC coefficients of the preset number of the chrominance components Cr in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cr in the packet is 0, the current inner layer run value is added by 1.
Optionally, the first coding subunit is further configured to perform the following procedure:
s2: and determining a target second parameter from the second set according to the coding results corresponding to different second parameters, and taking the coding result of the chroma component Cr corresponding to the target second parameter as the precoding result of the chroma component Cr.
Optionally, the third submodule includes:
a first obtaining unit, configured to obtain a code stream size of the first precoding result and a code stream size of the second precoding result;
A second obtaining unit, configured to, when the size of the code stream of the first precoding result is smaller than the size of the code stream of the second precoding result, take a first coding mode corresponding to the first precoding result as the target coding mode; and when the code stream size of the first precoding result is larger than the code stream size of the second precoding result, taking a second coding mode corresponding to the second precoding result as the target coding mode.
Wherein the first encoding module is configured to:
performing single-layer run length coding on the DC coefficient and the AC coefficient; or, the DC coefficient is encoded by adopting a single-layer run length encoding method, and the AC coefficient is encoded by adopting a mixed run length encoding method, wherein when the mixed run length encoding is carried out, a first parameter and a second parameter adopted for encoding the AC coefficient of the chrominance component Cb and the AC coefficient of the chrominance component Cr are respectively a target first parameter and a target second parameter which are determined during precoding;
and encoding the index of the target encoding mode, the number of DC coefficients or AC coefficients.
Wherein the first encoding module is further configured to:
and encoding the index of the target first parameter and the index of the target second parameter.
The device provided in the embodiment of the present application may execute the above method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
The embodiment of the application also provides a point cloud entropy decoding device. As shown in fig. 8, the point cloud entropy decoding apparatus 800 includes:
a first obtaining module 801, configured to obtain a code stream to be decoded;
a second obtaining module 802, configured to obtain an index of a target coding mode from the code stream to be decoded;
a first decoding module 803, configured to decode, according to the index of the target coding mode, the transform coefficient in the code stream to be decoded using a corresponding decoding mode;
wherein the transform coefficients include DC coefficients and AC coefficients, at least some of which are arranged individually according to the color channel.
Wherein the transform coefficients are processed into a first transform coefficient and a second transform coefficient having two different arrangements, in which the DC coefficient and the AC coefficient are arranged in a color three-channel mixture; in the second transform coefficient, the DC coefficients are arranged in a color three-channel mixture, and the AC coefficients are arranged individually in color channels.
Wherein the first decoding module includes:
the acquisition submodule is used for acquiring the index of the target coding mode, the number of DC coefficients or the number of AC coefficients from the code stream to be decoded;
a decoding submodule, configured to decode the DC coefficient and the AC coefficient by using a single-layer run decoding method when the index of the target coding mode indicates that the target coding mode is the first coding mode, by respectively combining the number of DC coefficients and the number of AC coefficients;
when the index of the target coding mode represents that the target coding mode is a second coding mode, the DC coefficient and the AC coefficient of the brightness component are decoded by a single-layer run decoding method by combining the number of the DC coefficients and the number of the AC coefficients, and the indexes of the target first parameters and the indexes of the target second parameters of the chroma components Cb and Cr are respectively decoded; respectively performing double-layer run-length decoding on the chrominance component Cb and the AC coefficient of the chrominance component Cr according to the obtained target first parameter of the chrominance component Cb, the obtained target second parameter of the chrominance component Cr and the number of the DC coefficients or the AC coefficients;
in the first coding mode, single-layer run-length coding is carried out on the DC coefficient and the AC coefficient; in the second coding mode, a single-layer run-length coding method is adopted for coding the DC coefficient, and a hybrid run-length coding method is adopted for coding the AC coefficient.
The device provided in the embodiment of the present application may execute the above method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
The embodiment of the application also provides electronic equipment, which comprises: a memory, a processor, and a program stored on the memory and executable on the processor; the method is characterized by comprising the steps of a point cloud entropy coding method, wherein the processor is used for reading a program in a memory to realize the point cloud entropy coding method; or steps in a point cloud entropy decoding method as described above.
It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice. In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a processor-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiment of the present application further provides a readable storage medium, on which a program is stored, where the program, when executed by a processor, implements each process of the foregoing method embodiment, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here. The readable storage medium may be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic memories (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical memories (e.g., CD, DVD, BD, HVD, etc.), semiconductor memories (e.g., ROM, EPROM, EEPROM, nonvolatile memories (NAND FLASH), solid State Disks (SSD)), etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. In light of such understanding, the technical solutions of the present application may be embodied essentially or in part in the form of a software product stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and including instructions for causing a terminal (which may be a cell phone, computer, server, air conditioner, or network device, etc.) to perform the methods described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (27)

1. A method of point cloud entropy encoding, comprising:
obtaining a transformation coefficient of a point cloud frame to be encoded;
determining a target coding mode according to the transformation coefficient;
entropy coding is carried out on the point cloud frame to be coded by utilizing the target coding mode;
wherein the transform coefficients include direct current DC coefficients and alternating current AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel.
2. The method of claim 1, wherein determining a target coding scheme based on the transform coefficients comprises:
obtaining a first transformation coefficient and a second transformation coefficient according to the transformation coefficient; wherein the first transform coefficient and the second transform coefficient are the transform coefficients with different arrangements;
respectively precoding the first transformation coefficient and the second transformation coefficient by utilizing different coding modes to obtain a first precoding result and a second precoding result;
determining a target coding mode from the coding modes according to the first precoding result and the second precoding result;
wherein, in the first transformation coefficient, the DC coefficient and the AC coefficient are arranged in a mixed mode according to three color channels; in the second transform coefficient, the DC coefficients are arranged in a color three-channel mixture, and the AC coefficients are arranged individually in color channels.
3. The method according to claim 1, wherein the obtaining transform coefficients of the point cloud frame to be encoded comprises:
dividing coding blocks of the point cloud frames to be coded after the Hilbert reordering to obtain a plurality of coding blocks;
predicting, transforming and quantizing the plurality of coding blocks to obtain a transformation coefficient block;
and obtaining the transformation coefficients of the point cloud frame to be encoded according to the transformation coefficient blocks of all the encoding blocks.
4. The method of claim 2, wherein the precoding the first transform coefficient and the second transform coefficient with different coding modes to obtain a first precoding result and a second precoding result, respectively, includes:
encoding the AC coefficient in the first transformation coefficient by using a single-layer run encoding method to obtain a first precoding result;
and encoding the AC coefficients in the second transformation coefficients by using a mixed run coding method to obtain a second precoding result.
5. The method of claim 4, wherein said encoding AC coefficients in said first transform coefficients using a single layer run length encoding method comprises:
traversing all the AC coefficients by taking a group of preset quantity as a unit for the AC coefficients; for the current target packet, processing is performed as follows:
When the preset number of AC coefficients in the target group are all 0, adding 1 to the current run value; when the preset number of AC coefficients in the target group is not all 0, the current run value is encoded, the preset number of AC coefficients in the target group is encoded in a joint mode, the current run value is set to 0, and counting is restarted.
6. The method according to claim 1 or 2, wherein when the AC coefficients are arranged individually in color channels, pre-encoding the AC coefficients using a hybrid run length encoding method, comprising:
pre-coding the AC coefficient of the brightness component by using a single-layer run method to obtain a brightness component pre-coding result;
pre-coding the AC coefficient of the chrominance component Cb by using a double-layer run method to obtain a pre-coding result of the chrominance component Cb;
pre-coding the AC coefficient of the chroma component Cr by using a double-layer run method to obtain a pre-coding result of the chroma component Cr;
and adding the pre-coding result of the brightness component, the pre-coding result of the chromaticity component Cb and the pre-coding result of the chromaticity component Cr to obtain the pre-coding result of the AC coefficient.
7. The method of claim 6, wherein pre-encoding the AC coefficients of the luminance component using a single-layer run method to obtain a luminance component pre-encoding result comprises:
Obtaining the AC coefficient of the target brightness component according to the AC coefficient of the brightness component;
and encoding the AC coefficient of the target brightness component by using a single-layer run method to obtain a brightness component precoding result.
8. The method of claim 7, wherein the deriving the AC coefficients of the target luminance component from the AC coefficients of the luminance component comprises:
when the number of the AC coefficients of the luminance component is a multiple of a target value, using the AC coefficients of the luminance component as the AC coefficients of the luminance component;
when the number of the AC coefficients of the brightness component is not a multiple of the target value, expanding the AC coefficients of the brightness component to obtain the AC coefficients of the expanded brightness component, enabling the number of the AC coefficients of the expanded brightness component to be a multiple of the target value, and taking the AC coefficients of the expanded brightness component as the AC coefficients of the target brightness component.
9. The method of claim 7, wherein encoding the AC coefficients of the target luminance component using a single-layer run method results in a luminance component precoding result, comprising:
traversing the AC coefficients of all the brightness components by taking a group of preset quantity as a unit for the AC coefficients of the target brightness components; for the current target packet, processing is performed as follows to obtain a brightness component precoding result:
When the AC coefficients of the preset number of brightness components in the target group are all 0, adding 1 to the current run value; when the AC coefficients of the preset number of brightness components in the target group are not all 0, the current run value is coded, the AC coefficients of the preset number of brightness components in the target group are coded in a combined mode, the current run value is set to be 0, and counting is restarted.
10. The method of claim 6, wherein the pre-encoding the AC coefficients of the chrominance components Cb using a double-layer run length method to obtain the pre-encoding result of the chrominance components Cb comprises:
obtaining the AC coefficient of the target chrominance component Cb according to the AC coefficient of the chrominance component Cb;
and encoding the AC coefficient of the target chrominance component Cb by using a double-layer run method to obtain a precoding result of the chrominance component Cb.
11. The method according to claim 10, wherein the deriving the AC coefficient of the target chrominance component Cb from the AC coefficient of the chrominance component Cb includes:
when the number of AC coefficients of the chrominance component Cb is s i Using the AC coefficient of the chrominance component Cb as the AC coefficient of the target chrominance component Cb;
When the number of AC coefficients of the chrominance component Cb is not s i Expanding the AC coefficient of the chrominance component Cb to obtain the AC coefficient of the extended chrominance component Cb, so that the number of the AC coefficients of the extended chrominance component Cb is s i And taking the AC coefficient of the extended chrominance component Cb as the AC coefficient of the target chrominance component Cb;
wherein said s i Represents a first parameter selected from a first set s 1 ,s 2 ,…,s n ]Wherein the s i I is more than or equal to 1 and less than or equal to n which are multiples of the target value.
12. The method according to claim 11, wherein the encoding the AC coefficient of the target chroma component Cb using the double-layer run method to obtain the precoding result of the chroma component Cb includes:
the AC coefficient of the target chrominance component Cb is expressed as s i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chrominance component Cb in the target group is 0; when the AC coefficient of the chrominance component Cb in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chrominance component Cb in the target group as follows; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
For the AC coefficients of the chrominance components Cb in the target group, traversing the AC coefficients of all the chrominance components Cb in the target group by taking a preset number as a group, and for the current group, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target group:
when the AC coefficients of the preset number of the chrominance components Cb in the group are not all 0, coding the current inner layer run value and jointly coding the AC coefficients of the preset number of the chrominance components Cb in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cb in the packet is 0, the current inner layer run value is increased by 1.
13. The method according to claim 12, wherein the method further comprises:
and determining a target first parameter from the first set according to the coding results corresponding to different first parameters, and taking the coding result of the chroma component Cb corresponding to the target first parameter as the precoding result of the chroma component Cb.
14. The method according to claim 6, wherein the precoding the AC coefficient of the chrominance component Cr by using a double-layer run length method to obtain a precoding result of the chrominance component Cr includes:
Obtaining the AC coefficient of the target chroma component Cr according to the AC coefficient of the chroma component Cr;
and encoding the AC coefficient of the target chroma component Cr by using a double-layer run method to obtain a precoding result of the chroma component Cr.
15. The method according to claim 14, wherein the deriving the AC coefficient of the target chrominance component Cr from the AC coefficient of the chrominance component Cr comprises:
when the number of AC coefficients of the chrominance component Cr is m i Using the AC coefficient of the chrominance component Cr as the AC coefficient of the target chrominance component Cr;
when the number of AC coefficients of the chrominance component Cr is not s i Expanding the AC coefficient of the chroma component Cr to obtain the AC coefficient of the expanded chroma component Cr, so that the number of the AC coefficients of the expanded chroma component Cr is m i And takes the AC coefficient of the expanded chroma component Cr as the target colorAn AC coefficient of the degree component Cr;
wherein said m i Represents a second parameter selected from a second set [ m ] 1 ,m 2 ,…,m n ]Wherein said m i I is more than or equal to 1 and less than or equal to n which are multiples of the target value.
16. The method according to claim 15, wherein the encoding the AC coefficients of the target chrominance component Cr using a double-layer run length method results in a precoding result of the chrominance component Cr, comprising:
The AC coefficient of the target chromaticity component Cr is set to m i Traversing a group of units, and for each group, adding 1 to the current outer layer run value when the AC coefficient of the chromaticity component Cr in the target group is 0; when the AC coefficient of the chroma component Cr in the target group is not 0, encoding the current outer-layer run value, and performing inner-layer run encoding on the AC coefficient of the chroma component Cr in the target group in the following manner; when the inner layer run coding is finished, the current outer layer run value is set to 0 and counting is restarted:
for the AC coefficients of the chrominance components Cr in the target group, traversing the AC coefficients of all the chrominance components Cr in the target group by taking a preset number as a group, and for the current group, processing in the following manner to obtain an inner layer run Cheng Yubian code result of the target group:
when the AC coefficients of the preset number of the chrominance components Cr in the group are not all 0, coding the current inner layer run value, and jointly coding the AC coefficients of the preset number of the chrominance components Cr in the group, setting the current inner layer run value to 0 and restarting counting; when the AC coefficient of the preset number of chrominance components Cr in the packet is 0, the current inner layer run value is added by 1.
17. The method of claim 16, wherein the method further comprises:
and determining a target second parameter from the second set according to the coding results corresponding to different second parameters, and taking the coding result of the chroma component Cr corresponding to the target second parameter as the precoding result of the chroma component Cr.
18. The method of claim 2, wherein the determining a target coding scheme from the coding schemes based on the first precoding result and the second precoding result comprises:
obtaining the code stream size of the first precoding result and the code stream size of the second precoding result;
when the code stream size of the first precoding result is smaller than the code stream size of the second precoding result, taking a first coding mode corresponding to the first precoding result as the target coding mode; and when the code stream size of the first precoding result is larger than the code stream size of the second precoding result, taking a second coding mode corresponding to the second precoding result as the target coding mode.
19. The method according to claim 1 or 2, wherein entropy encoding the point cloud frame to be encoded using the target encoding method comprises:
Performing single-layer run length coding on the DC coefficient and the AC coefficient; or, the DC coefficient is encoded by adopting a single-layer run length encoding method, and the AC coefficient is encoded by adopting a mixed run length encoding method, wherein when the mixed run length encoding is carried out, a first parameter and a second parameter adopted for encoding the AC coefficient of the chrominance component Cb and the AC coefficient of the chrominance component Cr are respectively a target first parameter and a target second parameter which are determined during precoding;
and encoding the index of the target encoding mode, the number of DC coefficients or AC coefficients.
20. The method of claim 19, wherein the method further comprises:
and encoding the index of the target first parameter and the index of the target second parameter.
21. A method for point cloud entropy decoding, comprising:
acquiring a code stream to be decoded;
obtaining an index of a target coding mode from the code stream to be decoded;
decoding the transformation coefficients in the code stream to be decoded by using the corresponding decoding mode according to the index of the target coding mode;
wherein the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or AC coefficients are arranged individually in color channels.
22. The method of claim 21, wherein the transform coefficients are processed into a first transform coefficient and a second transform coefficient having two different arrangements, the first transform coefficient having DC coefficients and AC coefficients arranged in a color three-channel mixture; in the second transform coefficient, the DC coefficients are arranged in a color three-channel mixture, and the AC coefficients are arranged individually in color channels.
23. The method of claim 22, wherein decoding the transform coefficients in the code stream to be decoded using the corresponding decoding mode according to the index of the target coding mode, comprises:
obtaining the index of a target coding mode, the number of DC coefficients or the number of AC coefficients from the code stream to be decoded;
when the index of the target coding mode indicates that the target coding mode is a first coding mode, respectively combining the number of DC coefficients and the number of AC coefficients, and decoding the DC coefficients and the AC coefficients by using a single-layer run length decoding method;
when the index of the target coding mode represents that the target coding mode is a second coding mode, the DC coefficient and the AC coefficient of the brightness component are decoded by a single-layer run decoding method by combining the number of the DC coefficients and the number of the AC coefficients, and the indexes of the target first parameters and the indexes of the target second parameters of the chroma components Cb and Cr are respectively decoded; and respectively performing double-layer run-length decoding on the chrominance component Cb and the AC coefficient of the chrominance component Cr according to the obtained target first parameter of the chrominance component Cb, the obtained target second parameter of the chrominance component Cr and the number of the DC coefficients or the AC coefficients.
24. A point cloud entropy encoding device, comprising:
the first acquisition module is used for acquiring the transformation coefficient of the point cloud frame to be encoded;
the second acquisition module is used for determining a target coding mode according to the transformation coefficient;
the first coding module is used for entropy coding the point cloud frame to be coded by utilizing the target coding mode;
wherein the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged individually according to a color channel.
25. A point cloud entropy decoding device, comprising:
the first acquisition module is used for acquiring a code stream to be decoded;
the second acquisition module is used for acquiring an index of a target coding mode from the code stream to be decoded;
the first decoding module is used for decoding the transformation coefficients in the code stream to be decoded by utilizing the corresponding decoding mode according to the index of the target coding mode;
wherein the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or AC coefficients are arranged individually in color channels.
26. An electronic device, comprising: a memory, a processor, and a program stored on the memory and executable on the processor; the processor for reading a program in a memory to implement the steps in the point cloud entropy encoding method according to any one of claims 1 to 20; or to implement the steps in a point cloud entropy decoding method as claimed in any of claims 21 to 23.
27. A readable storage medium for storing a program which when executed by a processor performs the steps in the point cloud entropy encoding method according to any one of claims 1 to 20; or to implement the steps in a point cloud entropy decoding method as claimed in any of claims 21 to 23.
CN202111467830.1A 2021-12-03 2021-12-03 Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium Pending CN116320453A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111467830.1A CN116320453A (en) 2021-12-03 2021-12-03 Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium
PCT/CN2022/136534 WO2023098917A1 (en) 2021-12-03 2022-12-05 Point cloud entropy coding method and apparatus, point cloud entropy decoding method and apparatus, and device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111467830.1A CN116320453A (en) 2021-12-03 2021-12-03 Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116320453A true CN116320453A (en) 2023-06-23

Family

ID=86611575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111467830.1A Pending CN116320453A (en) 2021-12-03 2021-12-03 Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN116320453A (en)
WO (1) WO2023098917A1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11450031B2 (en) * 2020-04-14 2022-09-20 Apple Inc. Significant coefficient flag encoding for point cloud attribute compression
CN112565734B (en) * 2020-12-03 2022-04-19 西安电子科技大学 Point cloud attribute coding and decoding method and device based on hybrid coding
CN113489980B (en) * 2021-08-13 2022-10-25 北京大学深圳研究生院 Method and equipment for entropy coding and entropy decoding of point cloud attribute transformation coefficient

Also Published As

Publication number Publication date
WO2023098917A1 (en) 2023-06-08

Similar Documents

Publication Publication Date Title
US11750809B2 (en) Encoding and decoding methods and apparatuses with multiple image block division manners
CN111937400B (en) Method and apparatus for processing video signal by using reduced transform
CN112565734B (en) Point cloud attribute coding and decoding method and device based on hybrid coding
CN112166613B (en) Method and apparatus for processing video signal using reduced quadratic transform
US9641855B2 (en) Method and apparatus for encoding and decoding video by using pattern information in hierarchical data unit
CN100417229C (en) Coding apparatus, coding method, coding method program, and recording medium recording the coding method program
US20230319311A1 (en) Method for performing transform index coding on basis of intra prediction mode, and device therefor
KR20220016232A (en) Coding and decoding method, apparatus and storage medium
US9106897B2 (en) Picture encoding and decoding method, picture encoding and decoding device and network system
CN113302942A (en) Image coding method based on quadratic transformation and apparatus thereof
JP2018533284A (en) Method and apparatus for processing video signals using coefficient induced prediction
US20230396787A1 (en) Video compression method and apparatus, computer device, and storage medium
CN110944179B (en) Video data decoding method and device
CN111083474A (en) Filtering method for inter-frame prediction, electronic device and computer-readable storage medium
US20160050426A1 (en) Lossless-coding-mode video encoding method and device, and decoding method and device
WO2017196127A1 (en) Method for processing video signal on basis of arbitrary partition transform
CN114930847A (en) Image coding method and device based on transformation
CN114946189A (en) Transform-based image encoding method and apparatus thereof
CN116320453A (en) Point cloud entropy encoding method, decoding method, device, equipment and readable storage medium
CN112104875B (en) Video encoding method, video encoding device and storage medium
CN107409216B (en) Image encoding and decoding method, encoding and decoding device and corresponding computer program
WO2023083239A1 (en) Image decoding method and apparatus, and image encoding method and apparatus
KR20170120634A (en) Encoding of images by vector quantization
KR20230008881A (en) Encoding and decoding methods and apparatus
CN116233449A (en) Video encoding and decoding methods, devices, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination