WO2023098917A1 - 点云熵编码方法、解码方法、装置、设备及计算机可读存储介质 - Google Patents
点云熵编码方法、解码方法、装置、设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2023098917A1 WO2023098917A1 PCT/CN2022/136534 CN2022136534W WO2023098917A1 WO 2023098917 A1 WO2023098917 A1 WO 2023098917A1 CN 2022136534 W CN2022136534 W CN 2022136534W WO 2023098917 A1 WO2023098917 A1 WO 2023098917A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- coefficients
- target
- component
- coefficient
- encoding
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 290
- 230000009466 transformation Effects 0.000 claims description 109
- 239000010410 layer Substances 0.000 claims description 79
- 239000002356 single layer Substances 0.000 claims description 59
- 241000023320 Luma <angiosperm> Species 0.000 claims description 17
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 claims description 17
- 239000000203 mixture Substances 0.000 claims description 6
- 238000007906 compression Methods 0.000 abstract description 23
- 230000006835 compression Effects 0.000 abstract description 23
- 238000005457 optimization Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000002310 reflectometry Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/63—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
- H04N19/64—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/88—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods 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/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods 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/93—Run-length coding
Definitions
- the present application relates to the field of coding and decoding technologies, and in particular to a point cloud entropy coding method, a decoding method, a device, a device, and a computer-readable storage medium.
- 3D point cloud is composed of a series of a large number of position information and corresponding attribute information (color, reflectivity, normal vector, etc.), which can flexibly represent the spatial structure and surface properties of 3D objects or scenes.
- attribute information color, reflectivity, normal vector, etc.
- 3D point cloud compression is mainly divided into geometric compression and attribute compression.
- attribute compression is mainly divided into two branches: predictive coding and transform transformation.
- traditional hybrid video coding such as H.264/AVC (Advanced Video Coding, Advanced Video Coding) and H.265/HEVC (High Efficiency Video Coding, High Efficiency Video Coding)
- H.264/AVC Advanced Video Coding, Advanced Video Coding
- H.265/HEVC High Efficiency Video Coding, High Efficiency Video Coding
- the Chinese AVS Audio Video coding Standard, digital audio and video codec standard
- the color point cloud attribute compression method is mainly based on DCT (Discrete Cosine Transform, discrete cosine transformation) point cloud transformation method.
- DCT Discrete Cosine Transform, discrete cosine transformation
- Embodiments of the present application provide a point cloud entropy encoding method, a decoding method, a device, a device, and a computer-readable storage medium, so as to improve point cloud compression performance.
- the embodiment of the present application provides a point cloud entropy coding method, including:
- Entropy encoding is performed on the point cloud frame to be encoded by using the target encoding method
- the transformation 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 separately according to color channels.
- determining the target encoding method according to the transformation coefficient includes:
- a first transformation coefficient and a second transformation coefficient are obtained; wherein, the first transformation coefficient and the second transformation coefficient are the transformation coefficients having different arrangements;
- DC coefficients and AC coefficients are mixed and arranged according to the three color channels; in the second transformation coefficient, the DC coefficients are arranged according to the three color channels mixed, and the AC coefficients are arranged separately according to the color channels.
- the acquisition of the transformation coefficient of the point cloud frame to be encoded includes:
- the transformation coefficient blocks of all coding blocks are obtained.
- the precoding of the first transformation coefficient and the second transformation coefficient by using different coding methods to obtain the first precoding result and the second precoding result includes:
- the encoding of the AC coefficients in the first transform coefficients using a single-layer run-length encoding method includes:
- the AC coefficients are pre-encoded using a hybrid run-length coding method, including:
- the AC coefficient of the chrominance component Cr is precoded by using the double-layer run length method, and the precoding result of the chrominance component Cr is obtained;
- the precoding result of the luma component, the precoding result of the chrominance component Cb, and the precoding result of the chrominance component Cr are added to obtain the precoding result of the AC coefficient.
- the AC coefficient of the luminance component is precoded using a single-layer run-length method to obtain the precoding result of the luminance component, including:
- the AC coefficient of the target brightness component is obtained according to the AC coefficient of the brightness component, including:
- the AC coefficients of the luminance component are expanded to obtain the AC coefficients of the expanded luminance component, so that the number of AC coefficients of the expanded luminance component The number is a multiple of the target value, and the AC coefficient of the expanded brightness component is used as the AC coefficient of the target brightness component.
- the AC coefficient of the target luminance component is encoded using a single-layer run-length method to obtain a precoding result of the luminance component, including:
- the AC coefficients of the target luminance component For the AC coefficients of the target luminance component, the AC coefficients of all luminance components are traversed in units of a preset number of groups; for the current target group, the processing is performed as follows to obtain the precoding result of the luminance component:
- the AC coefficient of the chrominance component Cb is precoded using a double-layer run length method to obtain the precoding result of the chrominance component Cb, including:
- the AC coefficients of the target chrominance component Cb are encoded using a double-layer run length method to obtain a pre-encoding result of the chrominance component Cb.
- the AC coefficient of the target chroma component Cb is obtained according to the AC coefficient of the chroma component Cb, including:
- the AC coefficients of the chroma component Cb are expanded to obtain the AC coefficients of the expanded chroma component Cb, so that the expanded chroma component Cb
- the number of AC coefficients is a multiple of si
- the AC coefficients of the expanded chroma component Cb are used as the AC coefficients of the target chroma component Cb;
- the s i represents a first parameter selected from the first set [s 1 , s 2 ,...,s n ], wherein the s i is a multiple of the target value, 1 ⁇ i ⁇ n.
- the AC coefficient of the target chrominance component Cb is encoded using a double-layer run length method to obtain a precoding result of the chrominance component Cb, including:
- the AC coefficients of the chrominance component Cb in the target group are traversed in units of a preset number of groups, and the current group is processed as follows to obtain The inner run-length precoding result of the target group:
- the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are encoded.
- the current inner run value For joint encoding, set the current inner run value to 0 and start counting again; when the AC coefficients of the preset number of chrominance components Cb in the group are 0, add 1 to the current inner run value.
- the method further includes:
- the target first parameter determines the target first parameter from the first set, and use the encoding result of the chrominance component Cb corresponding to the target first parameter as a predictor of the chrominance component Cb Encode the result.
- the AC coefficient of the chrominance component Cr is precoded using the double-layer run length method to obtain the precoding result of the chrominance component Cr, including:
- the AC coefficient of the target chrominance component Cr is encoded using a double-layer run length method to obtain a pre-encoding result of the chrominance component Cr.
- the AC coefficient of the target chroma component Cr is obtained according to the AC coefficient of the chroma component Cr, including:
- the AC coefficients of the chroma component Cr are expanded to obtain the AC coefficients of the expanded chroma component Cr, so that the expanded chroma component Cr
- the number of AC coefficients is a multiple of mi
- the AC coefficient of the expanded chroma component Cr is used as the AC coefficient of the target chroma component Cr;
- the m i represents a second parameter selected from the second set [m 1 , m 2 ,...,m n ], wherein the m i is a multiple of the target value, 1 ⁇ i ⁇ n.
- the AC coefficient of the target chrominance component Cr is encoded using a double-layer run length method to obtain a precoding result of the chrominance component Cr, including:
- the method further includes:
- the target second parameter determines the target second parameter from the second set, and use the encoding result of the chrominance component Cr corresponding to the target second parameter as a prediction of the chrominance component Cr. Encode the result.
- determining the target coding method from the coding methods according to the first precoding result and the second precoding result includes:
- the code stream size of the first precoding result is smaller than the code stream size of the second precoding result, use the first coding mode corresponding to the first precoding result as the target coding mode; when the When the code stream size of the first precoding result is larger than the code stream size of the second precoding result, the second coding mode corresponding to the second precoding result is used as the target coding mode.
- the entropy encoding of the point cloud frame to be encoded by using the target encoding method includes:
- the first parameter and the second parameter used for encoding the AC coefficient of Cb and the AC coefficient of the chrominance component Cr are respectively the target first parameter and the target second parameter determined during precoding;
- the method further includes:
- the index of the target first parameter and the index of the target second parameter are encoded.
- the embodiment of the present application also provides a point cloud entropy decoding method, including:
- the transform coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or AC coefficients are arranged separately according to color channels.
- the transform coefficients are processed into first transform coefficients and second transform coefficients having two different arrangements, and in the first transform coefficients, the DC coefficients and AC coefficients are classified according to the color three-channel Mixed arrangement; in the second transformation coefficient, the DC coefficients are mixed and arranged according to the three color channels, and the AC coefficients are arranged separately according to the color channels.
- the decoding of the transform coefficients in the code stream to be decoded using the corresponding decoding mode according to the index of the target coding mode includes:
- the index of the target coding mode indicates that the target coding mode is the first coding method
- combining the number of DC coefficients and the number of AC coefficients respectively, the DC coefficient and the AC coefficient are decoded using a single-layer run-length decoding method decoding
- the index of the target encoding mode indicates that the target encoding mode is the second encoding mode
- combining the number of DC coefficients and the number of AC coefficients use a single-layer run-length decoding method to perform AC encoding on the DC coefficients and luminance components
- the coefficients are decoded, and the index of the target first parameter and the index of the target second parameter of the chroma component Cb and the chroma component Cr are respectively decoded; according to the obtained target first parameter of the chroma component Cb and the index of the chroma component Cr
- the target second parameter and the number of DC coefficients or AC coefficients respectively perform double-layer run-length decoding on the AC coefficients of the chrominance component Cb and the chrominance component Cr.
- the embodiment of the present application also provides a point cloud entropy encoding device, including:
- the first obtaining module is configured to obtain the transformation coefficient of the point cloud frame to be encoded
- the second obtaining module is configured to determine a target encoding method according to the transformation coefficient
- the first coding module is configured to use the target coding method to perform entropy coding on the point cloud frame to be coded;
- the transformation coefficients include DC coefficients and AC coefficients; at least some coefficients in the DC coefficients and/or the AC coefficients are arranged separately according to color channels.
- the embodiment of the present application also provides a point cloud entropy decoding device, including:
- the third obtaining module is configured to obtain the code stream to be decoded
- a fourth obtaining module configured to obtain an index of a target coding mode from the code stream to be decoded
- the second decoding module is configured to decode the transform coefficients in the to-be-decoded code stream by using a corresponding decoding mode according to the index of the target coding mode;
- the transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged separately according to color channels.
- the embodiment of the present application also provides an electronic device, including: a memory, a processor, and a program stored in the memory and operable on the processor.
- a program stored in the memory and operable on the processor.
- the embodiments of the present application further provide a computer-readable storage medium, where a program is stored on the computer-readable storage medium, and when the program is executed by a processor, the steps in the above method are implemented.
- At least some of the DC coefficients and/or AC coefficients of the transformation coefficients are arranged separately according to the color channel. Therefore, using the solution of the embodiment of the present application, more transformation zero coefficients can be arranged together , which can improve the efficiency of run-length encoding and improve the performance of point cloud compression.
- Fig. 1 is one of the flowcharts of the point cloud entropy encoding method provided by the embodiment of the present application;
- Fig. 2 is the second flow chart of the point cloud entropy encoding method provided by the embodiment of the present application
- FIG. 3 is a schematic diagram of a hybrid run-length coding method provided by an embodiment of the present application.
- FIG. 4 is a flow chart of the outer run-length encoding provided by the embodiment of the present application.
- FIG. 5 is a flowchart of the inner run-length encoding provided by the embodiment of the present application.
- Fig. 6 is a flow chart of the point cloud entropy decoding method provided by the embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a point cloud entropy encoding device provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a point cloud entropy decoding device provided by an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a point cloud entropy encoding device provided by an embodiment of the present application.
- Fig. 10 is a schematic structural diagram of a point cloud entropy decoding device provided by an embodiment of the present application.
- 3D point cloud compression is mainly divided into geometric compression and attribute compression.
- point cloud attribute compression is mainly divided into two branches: predictive coding and transformation.
- traditional hybrid video coding e.g., H.264/AVC and H.265/HEVC
- the octree-based 3D point cloud intra-frame prediction method is to project the reconstructed attributes in adjacent blocks to the relative on the adjacent edge plane, and use the projected values as reference information for predicting attributes.
- the distribution of point clouds occupied within a voxel will have a certain impact on the final attribute prediction performance.
- an enhanced attribute intra prediction method based on point cloud geometric distribution.
- the conversion coefficient column obtained by the above method is sorted by mixing three color channels, that is, arranged according to the coefficients of brightness, chroma Cb and chroma Cr (taking AC coefficients as an example: AC_L, AC_Cb, AC_Cr).
- AC_L, AC_Cb, AC_Cr the coefficients of brightness
- this application proposes a point cloud entropy encoding method. Aiming at the point cloud color attribute information, the DC component (DC coefficient) and AC component (AC coefficient) are disassembled for the transformation coefficient block and the AC coefficient is reassessed. Sorting operation, this method can arrange more transformation zero coefficients together to improve the efficiency of run-length coding and effectively improve the performance of point cloud compression.
- Fig. 1 is a flow chart of the point cloud entropy encoding method provided by the embodiment of the present application, as shown in Fig. 1, comprising the following steps:
- Step 101 Obtain transformation coefficients of point cloud frames to be encoded.
- the Hilbert-reordered point cloud frame to be encoded can be divided into encoding blocks to obtain multiple encoding blocks, and the multiple encoding blocks can be predicted, transformed and quantized to obtain transform coefficient blocks. Afterwards, according to the transformation coefficient blocks of all coding blocks, the transformation coefficients of the point cloud frame to be coded are obtained.
- the geometrically reconstructed point cloud data is reordered according to the Hilbert code from large to small, and then the point cloud is adaptively divided according to the Hilbert code to obtain the point cloud to be encoded block, that is, the encoding block. Afterwards, weighted attribute prediction is performed on the obtained sub-block to be coded, and the prediction residual is transformed and quantized to obtain a transformation coefficient block. Transform coefficients are obtained according to the obtained transform coefficient block.
- the transformation coefficient includes a direct current DC (Direct Current, direct current) coefficient and an alternating current AC (Alternating Current, alternating current) coefficient.
- DC Direct Current, direct current
- AC Alternating Current, alternating current
- At least some of the DC coefficients and/or AC coefficients are individually arranged according to color channels.
- some or all of the AC coefficients can be arranged separately according to the color channels, and the DC coefficients can be arranged according to the mixture of the three color channels.
- Step 102 Determine the target coding mode according to the transform coefficients.
- the AC coefficients When the AC coefficients are arranged separately by color channels, the AC coefficients can be pre-coded using a hybrid run-length coding method, and this coding method can be used as a target coding method.
- Precoding the AC coefficients of the luminance component using a single-layer run-length method to obtain a precoding result of the luminance component can include:
- the AC coefficients of the luminance component are used as the AC coefficients of the luminance component.
- the number of AC coefficients of the luminance component is not a multiple of the target value (such as 3)
- the AC coefficients of the luminance component are expanded to obtain the AC coefficients of the expanded luminance component, so that the number of AC coefficients of the expanded luminance component
- the number is a multiple of the target value (such as 3)
- the AC coefficient of the expanded brightness component is used as the AC coefficient of the target brightness component.
- the AC coefficients of the target luminance component are traversed in units of a preset number (such as three) groups, and for the current target group, the processing is performed as follows to obtain the precoding result of the luminance component:
- AC coefficients (or filled AC coefficients) of the luminance components are traversed in units of three groups, and the statistics of the three luminance components in one group are calculated.
- AC coefficients (ACi-1_L, ACi_L, ACi+1_L) are all 0 run lengths, where ACi_L represents the ith AC coefficient of the luminance component.
- AC coefficients of a group of three luminance components are all 0, add 1 to the run length value; if the AC coefficients of a group of three luminance components are not all 0, first encode the run length value, and then The AC coefficients of the components are jointly encoded, and finally the run length value is set to 0 and counting is restarted until all the AC coefficients of the luminance component are traversed and the coded stream of the luminance component is obtained.
- the process can include:
- the AC coefficients of the chroma component Cb are expanded to obtain the AC coefficients of the expanded chroma component Cb, so that the AC coefficients of the expanded chroma component Cb
- the number of coefficients is a multiple of si
- the AC coefficients of the expanded chroma component Cb are used as the AC coefficients of the target chroma component Cb.
- s i represents the first parameter, selected from the first set [s 1 , s 2 , ..., s n ], where s i is a multiple of the target value (such as 3), 1 ⁇ i ⁇ n.
- the AC coefficients of the chrominance component Cb are expanded according to the first set si .
- the AC coefficient of the target chrominance component Cb is coded by using the double-layer run length method to obtain the precoding result of the chrominance component Cb.
- the process may include:
- S1 Traversing the AC coefficients of the target chroma component Cb in units of s i groups, for each group, when the AC coefficients of the chroma component Cb in the target group are all 0, the current outer layer Add 1 to the run length value; when the AC coefficients of the chrominance component Cb in the target grouping are not all 0, encode the current outer layer run length value, and perform inner AC coefficients of the chrominance component Cb in the target grouping as follows Layer run-length encoding; when the inner-layer run-length encoding ends, set the current outer-layer run-length value to 0 and start counting again:
- the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are jointly encoded, and the The current inner run value is set to 0 and counting is restarted; when the AC coefficients of the preset number of chrominance components Cb in the group are 0, the current inner run value is increased by 1.
- the target first parameter can also be determined from the first set according to the encoding results corresponding to different first parameters, and the encoding result of the chrominance component Cb corresponding to the target first parameter can be used as the chrominance component Cb precoding results.
- RDO Rate Distortion Optimization, rate-distortion optimization
- the target coding mode that is, to obtain the best first parameter (ie, the target first parameter), and to obtain the best first parameter corresponding to
- the coded code stream of is used as the shortest coded code stream of the chrominance component Cb.
- the sizes of coded code streams obtained under different first parameters may be compared, and the first parameter corresponding to the coded code stream with the smallest code stream may be selected as the target first parameter.
- the process can include:
- the number of AC coefficients of chroma component Cr is a multiple of mi
- the AC coefficient of the chroma component Cr is expanded to obtain the AC coefficient of the expanded chroma component Cr, so that the number of AC coefficients of the expanded chroma component Cr is a multiple of mi , and the expanded
- the final AC coefficient of the chroma component Cr is used as the AC coefficient of the target chroma component Cr.
- m i represents the second parameter, selected from the second set [m 1 , m 2 , ..., m n ], where m i is a multiple of the target value (such as 3), 1 ⁇ i ⁇ n.
- the AC coefficient of the target chrominance component Cr is coded by the double-layer run length method, and the precoding result of the chrominance component Cr is obtained.
- the process may include:
- the AC coefficients of the chrominance components Cr in the target grouping are traversed in units of a preset number (such as three), and for the current grouping, it is processed as follows, Get the inner run-length precoding result of the target group:
- the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cr in the group are jointly encoded, and the The current inner run value is set to 0 and counting is restarted; when the AC coefficients of the preset number of chrominance components Cr in the group are 0, the current inner run value is increased by 1.
- the target second parameter can also be determined from the second set according to the encoding results corresponding to different second parameters, and the encoding result of the chrominance component Cr corresponding to the target second parameter can be used as the chrominance component Cr precoding results.
- RDO can be used to select the target coding mode, that is, to obtain the best second parameter (ie, the target second parameter), and obtain the code stream corresponding to the target second parameter as the shortest value of the chrominance component Cr code stream.
- the sizes of coded code streams obtained under different second parameters may be compared, and the second parameter corresponding to the coded code stream with the smallest code stream may be selected as the target second parameter.
- Step 1021 Obtain a first transformation coefficient and a second transformation coefficient according to the transformation coefficient.
- the first transformation coefficient and the second transformation coefficient are transformation coefficients with different arrangements.
- the obtained transform coefficients are disassembled and rearranged to obtain transform coefficients in two arrangements, ie, first transform coefficients with a first arrangement and second transform coefficients with a second arrangement.
- first transform coefficient DC coefficients and AC coefficients are arranged according to the three color channels;
- second transformation coefficient the DC coefficients are arranged according to the three color channels, and the AC coefficients are arranged separately according to the color channels. That is to say, the first transform coefficient and the second transform coefficient are two different arrangements of transform coefficients.
- the DC coefficient column and the AC coefficient column can be obtained, and then the AC coefficient columns are reordered to obtain the corresponding three-section coefficients, which are: brightness The AC coefficient sequence of the component, the AC coefficient sequence of the chroma component Cb, and the AC coefficient sequence of the chroma component Cr.
- the four-point transformation will generate 3 DC coefficients and 9 AC coefficients in total.
- the three DC coefficients are the DC coefficients of the luma component and the two chrominance components respectively, represented by DC_L, DC_Cb and DC_Cr respectively.
- the DC coefficients in the first transformation coefficient and the second variation 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 transformation coefficient are arranged according to the mixing order of luma component, chrominance component Cb and chrominance component Cr, specifically: (AC1_L, AC1_Cb, AC1_Cr) (AC2_L, AC2_Cb, AC2_Cr) (AC3_L, AC3_Cb, AC3_Cr ).
- the ordering of the AC coefficients in the second variation coefficient is specifically arranged separately according to the luminance component, the chrominance component Cb and the chrominance component Cr: (AC1_L, AC2_L, AC3_L)(AC1_Cb, AC2_Cb, AC3_Cb)(AC1_Cr, AC2_Cr, AC3_Cr).
- Step 1022 Perform precoding on the first transformation coefficient and the second transformation coefficient respectively by using different coding methods to obtain a first precoding result and a second precoding result.
- the first transform coefficient and the second transform coefficient correspond to different coding modes.
- the AC coefficients are coded using a single-layer run-length coding method (the first coding method) to obtain the first precoding result; the AC coefficients in the second transform coefficients are coded using the hybrid run-length coding method (the first coding method) Two encoding methods) to obtain the second precoding result.
- DC coefficients Since the arrangement manners of the DC coefficients are the same in the two arrangement manners, the DC coefficients may not be encoded during the precoding process, thereby further improving efficiency. Of course, DC coefficients can also be precoded.
- the DC coefficients in different transform coefficients are coded according to a single-layer run-length coding method. That is, for DC coefficients, all DC coefficients are traversed in units of a preset number (such as three), and the current target grouping is processed as follows:
- the target group is any group.
- the target group is any group.
- Precoding the AC coefficients of the luminance component using a single-layer run-length method to obtain a precoding result of the luminance component can include:
- the AC coefficients of the luminance component are used as the AC coefficients of the luminance component.
- the number of AC coefficients of the luminance component is not a multiple of the target value (such as 3)
- the AC coefficients of the luminance component are expanded to obtain the AC coefficients of the expanded luminance component, so that the number of AC coefficients of the expanded luminance component
- the number is a multiple of the target value (such as 3)
- the AC coefficient of the expanded brightness component is used as the AC coefficient of the target brightness component.
- the AC coefficients of the luminance component are directly Perform single-layer run-length coding in groups of three; when ACSize%3 ⁇ 0, firstly expand the AC coefficients of the luminance component to a multiple of 3.
- the AC coefficients of the target luminance component are traversed in units of a preset number (such as three) groups, and for the current target group, the processing is performed as follows to obtain the precoding result of the luminance component:
- AC coefficients (or filled AC coefficients) of the luminance components are traversed in units of three groups, and the statistics of the three luminance components in one group are calculated.
- AC coefficients (ACi-1_L, ACi_L, ACi+1_L) are all 0 run lengths, where ACi_L represents the ith AC coefficient of the luminance component.
- AC coefficients of a group of three luminance components are all 0, add 1 to the run length value; if the AC coefficients of a group of three luminance components are not all 0, first encode the run length value, and then The AC coefficients of the components are jointly encoded, and finally the run length value is set to 0 and counting is restarted until all the AC coefficients of the luminance component are traversed and the coded stream of the luminance component is obtained.
- the process can include:
- the AC coefficients of the chroma component Cb are expanded to obtain the AC coefficients of the expanded chroma component Cb, so that the AC coefficients of the expanded chroma component Cb
- the number of coefficients is a multiple of si
- the AC coefficients of the expanded chroma component Cb are used as the AC coefficients of the target chroma component Cb.
- s i represents the first parameter, selected from the first set [s 1 , s 2 , ..., s n ], where s i is a multiple of the target value (such as 3), 1 ⁇ i ⁇ n.
- the AC coefficients of the chrominance component Cb are expanded according to the first set si .
- the AC coefficient of the target chrominance component Cb is coded by using the double-layer run length method to obtain the precoding result of the chrominance component Cb.
- the process may include:
- S1 Traversing the AC coefficients of the target chroma component Cb in units of s i groups, for each group, when the AC coefficients of the chroma component Cb in the target group are all 0, the current outer layer Add 1 to the run length value; when the AC coefficients of the chrominance component Cb in the target grouping are not all 0, encode the current outer layer run length value, and perform inner AC coefficients of the chrominance component Cb in the target grouping as follows Layer run-length encoding; when the inner-layer run-length encoding ends, set the current outer-layer run-length value to 0 and start counting again:
- the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are jointly encoded, and the The current inner run value is set to 0 and counting is restarted; when the AC coefficients of the preset number of chrominance components Cb in the group are 0, the current inner run value is increased by 1.
- the target first parameter can also be determined from the first set according to the encoding results corresponding to different first parameters, and the encoding result of the chrominance component Cb corresponding to the target first parameter can be used as the chrominance component Cb precoding results.
- RDO Rate Distortion Optimization, rate-distortion optimization
- the target coding mode that is, to obtain the target first parameter, and obtain the code stream corresponding to the target first parameter as the shortest value of the chrominance component Cb code stream.
- the sizes of coded code streams obtained under different first parameters may be compared, and the first parameter corresponding to the coded code stream with the smallest code stream may be selected as the target first parameter.
- the process can include:
- the number of AC coefficients of chroma component Cr is a multiple of mi
- the AC coefficient of the chroma component Cr is expanded to obtain the AC coefficient of the expanded chroma component Cr, so that the number of AC coefficients of the expanded chroma component Cr is a multiple of mi , and the expanded
- the final AC coefficient of the chroma component Cr is used as the AC coefficient of the target chroma component Cr.
- m i represents the second parameter, selected from the second set [m 1 , m 2 , ..., m n ], where m i is a multiple of the target value (such as 3), 1 ⁇ i ⁇ n.
- the AC coefficient of the target chrominance component Cr is coded by the double-layer run length method, and the precoding result of the chrominance component Cr is obtained.
- the process may include:
- the AC coefficients of the chrominance components Cr in the target grouping are traversed in units of a preset number (such as three), and for the current grouping, it is processed as follows, Get the inner run-length precoding result of the target group:
- the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cr in the group are jointly encoded, and the The current inner run value is set to 0 and counting is restarted; when the AC coefficients of the preset number of chrominance components Cr in the group are 0, the current inner run value is increased by 1.
- the target second parameter can also be determined from the second set according to the encoding results corresponding to different second parameters, and the encoding result of the chrominance component Cr corresponding to the target second parameter can be used as the chrominance component Cr precoding results.
- RDO may be used to select the target coding mode, that is, to obtain the target second parameter, and use the code stream corresponding to the target second parameter as the shortest code stream of the chrominance component Cr.
- the size of the coded code stream obtained under different second parameters can be compared, and the second parameter corresponding to the coded code stream with the smallest code stream can be selected as the target second parameter.
- Step 1023 according to the first precoding result and the second precoding result, determine the target coding method from the coding methods.
- the selection of the target coding mode through the RDO method can be simplified as comparing the sizes of the pre-coded code streams in the two modes. Therefore, the code stream size of the first precoding result and the code stream size of the second precoding result can be obtained.
- the code stream size of the first precoding result is smaller than the code stream size of the second precoding result
- the first encoding method corresponding to the first precoding result is used as the target encoding method; when the code stream size of the first precoding result is greater than
- the second coding mode corresponding to the second precoding result is used as the target coding mode.
- R 1 be the code stream length obtained by the first encoding mode of the first transform coefficient
- R 2 be the code stream length obtained by the second encoding mode of the second transform coefficient and use 1 bit to select the encoding mode index.
- Step 103 Entropy encoding is performed on the point cloud frame to be encoded using the target encoding method.
- single-layer run-length encoding is performed on the DC coefficients and AC coefficients; or, the DC coefficients are encoded using a single-layer run-length encoding method, and the AC coefficients are encoded using a mixed run-length encoding method, wherein when performing mixed run-length encoding , the first parameter and the second parameter used to encode the AC coefficient of the chrominance component Cb and the AC coefficient of the chrominance component Cr are respectively the target first parameter and the target second parameter determined during precoding, and at the same time, the target The index of the encoding mode, the number of DC coefficients or AC coefficients are encoded. When using hybrid run-length encoding, the index of the target first parameter and the index of the target second parameter can also be encoded.
- a single-layer run-length encoding method (a set of preset number (such as three) coefficients) is used to perform all transform coefficient columns (including DC coefficients and AC coefficients) ) to encode, and finally get the attribute code stream.
- the second encoding mode is the target encoding mode
- all DC coefficients are encoded using a single-layer run-length method (a set of preset number (such as three) coefficients), and then the AC of the three color components after reordering Mixed run-length encoding of the coefficients, specifically: the AC coefficients of the luminance component are encoded using a single-layer run-length method with a preset number (such as three) in groups, and the AC transformation coefficients of the two chrominance components (Cb and Cr)
- the two-layer run-length method is adopted for encoding respectively, wherein the first parameter and the second parameter respectively adopt the target No. One parameter and target second parameter.
- the index of the coding mode, the index of the target first parameter and the target second parameter, and the number of DC coefficients (or AC coefficients) need to be additionally coded to finally obtain the attribute coded code stream.
- both the preset quantity and the target value take a value of 3 as an example. In practical applications, other integers greater than 0, such as 4, may be used for the preset quantity and the target value, as long as they are equal.
- At least some of the DC coefficients and/or AC coefficients of the transformation coefficients are arranged separately according to the color channel. Therefore, using the solution of the embodiment of the present application, more transformation zero coefficients can be arranged together , which can improve the efficiency of run-length encoding and improve the performance of point cloud compression.
- an embodiment of the present application provides a point cloud entropy encoding method based on RDO transformation coefficients. As shown in Figure 2, the method may include the following steps:
- Step 201 dividing the Hilbert-reordered point cloud frame into coding blocks, including:
- the geometrically reconstructed point cloud data is reordered according to the Hilbert code from large to small, and then the point cloud is adaptively divided according to the Hilbert code to obtain the point cloud sub-blocks to be encoded.
- Step 202 Predict, transform and quantize the current point cloud sub-block to be encoded to obtain a transform coefficient block, including:
- the weighted attribute prediction is performed on the divided point cloud sub-blocks to be coded, and the prediction residual is transformed and quantized to obtain the transform coefficient block to be coded.
- Step 203 obtain all the transformation coefficients after traversing the complete frame point cloud, disassemble and rearrange the transformation coefficients to obtain transformation coefficients in two sorts, including:
- the entire frame of point cloud data is traversed and divided, and all sub-blocks to be coded are predicted, transformed and quantized, and finally all transformation coefficients are obtained.
- the transformation coefficient column is disassembled, it is divided into a DC coefficient column and an AC coefficient column, and the AC coefficient column is reordered to obtain corresponding three-section coefficients, which are: the AC coefficient column of the luminance component, and the AC coefficient column of the chrominance component Cb.
- the AC coefficient sequence and the AC coefficient sequence of the chrominance component Cr thereby obtaining transformation coefficients in two sorts, corresponding to two encoding modes.
- the DC coefficients in the two arrangements are arranged in a mixture of three color channels; the difference in the ordering of the AC coefficients is as follows: the AC coefficients in the first arrangement (corresponding to the first encoding mode) are a mixture of three color channels Arrangement, the AC coefficients in the second arrangement (corresponding to the second encoding mode) are further split into three coefficient columns, that is, different color channels are separately arranged into a sequence.
- the four-point transform will generate 3 DC coefficients and 9 AC coefficients in total.
- the three DC coefficients are the DC coefficients of the luma component and the two chrominance components respectively, represented by DC_L, DC_Cb and DC_Cr respectively.
- the DC coefficients in the two coding modes are arranged in the order of the brightness component, the chrominance component Cb, and the chrominance component Cr, specifically: (DC_L, DC_Cb, DC_Cr).
- the AC coefficients in the first encoding mode are arranged according to the mixing order of the luminance component, the chrominance component Cb and the chrominance component Cr, specifically: (AC3_L, AC3_Cb, AC3_Cr)( AC2_L, AC2_Cb, AC2_Cr) (AC1_L, AC1_Cb, AC1_Cr).
- the ordering of the three segments of AC coefficients in the second coding mode is specifically: (AC1_L, AC2_L, AC3_L)(AC1_Cb, AC2_Cb, AC3_Cb)(AC1_Cr, AC2_Cr, AC3_Cr).
- Step 204 encoding all the AC transform coefficient columns in the first arrangement using a single-layer run-length encoding method, including:
- All AC coefficients are traversed in groups of three, and the number of runs in 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, add 1 to the run length value; if a group of three AC coefficients are not all 0, first encode the run length value, and then jointly encode the group of three AC coefficients, and finally Set the run value to 0 and start counting again until all AC coefficients have been traversed. Finally, the pre-encoded code stream of mode 1 is obtained.
- Step 205 Encode the AC transform coefficients of different components under the second sorting by using a hybrid run-length encoding method.
- the process may include the following steps:
- Step 2051 encoding the AC coefficients of the luminance component using a single-layer run-length method, including:
- AC coefficients of a group of three luminance components are all 0, add 1 to the run length value; if the AC coefficients of a group of three luminance components are not all 0, first encode the run length value, and then The AC coefficients of the components are jointly encoded, and finally the run length value is set to 0 and counting is restarted until all the AC coefficients of the luminance component are traversed and the coded stream of the luminance component is obtained.
- Step 2052 encode the AC coefficients of the chrominance component Cb using the double-layer run length method and use RDO to select a target grouping mode.
- the flow chart of the two-layer run-length coding method is shown in Fig. 4 and Fig. 5, wherein Fig. 4 is a flow chart of the outer run-length coding, and Fig. 5 is a flow chart of the inner run-length coding. Specifically:
- the AC coefficients of the chroma component Cb are expanded according to the first set si , specifically: set the number of all AC coefficients of the chroma component Cb as ACSize.
- set a series of first-level run group numbers, and initialize i 1.
- the outer run length value is coded first, and then the inner run length coding is performed on the AC coefficients of the group s i chrominance components Cb, and the outer run length value is set to 0 after the inner run length coding is completed. And start counting again until all the AC coefficients of the chrominance component Cb are traversed.
- the inner run-length coding is to traverse the AC coefficients of the s i chrominance components Cb in units of three, and the three AC coefficients (ACi-1_Cb, ACi_Cb, ACi+1_Cb) in a group are all 0 number of runs. If a group of three AC coefficients are all 0, add 1 to the inner run length value; if a group of three AC coefficients are not all 0, first encode the inner run length value, and then encode the three AC coefficients in the group Joint encoding, finally setting the inner run value to 0 and restarting counting. The run-length coding of the outer layer is continued until the s i AC coefficients have been traversed. Finally, RDO is used to select the target coding mode, that is, the target first parameter is obtained from the first set, and the shortest code stream of the corresponding chrominance component Cb is obtained.
- Step 2053 encoding the AC coefficients of the chrominance component Cr using a double-layer run length method and using RDO to select a target grouping mode, including:
- Fig. 4 is a flowchart of the outer run-length encoding
- Fig. 5 is a flowchart of the inner run-length encoding.
- groupCr [m 1 , m 2 , . . . , m n ], where m i is a multiple of 3.
- the AC coefficient column should be expanded first, and its number should be expanded to a multiple of m i , specifically: first according to the formula Calculate the number of groups of the AC coefficient column and record it as ACCrCount, then fill (ACCrCount*m i -ACSize) 0s at the end of the original AC coefficient column, and finally perform double-layer run-length encoding on the filled AC coefficient column.
- the encoding method is specifically:
- the outer layer run-length coding is performed, and all AC coefficients (or filled AC coefficients) of the chrominance components Cr are traversed in units of m i groups, and the AC coefficients ( AC1_Cr, . . . , ACi_Cr , .
- AC coefficients of a group of m i chroma components Cr are all 0, then add 1 to the outer run value; if the AC coefficients of a group m i chroma components Cr are not all 0, then first perform coding, and then perform inner run-length coding on the AC coefficients of the m i chrominance components Cr, and after the inner run-length coding ends, set the outer run-length value to 0 and start counting again until the chrominance component Cr is traversed All AC coefficients.
- the inner run-length coding is to traverse the AC coefficients of m i chrominance components Cr in units of three, and the three AC coefficients (ACi-1_Cr, ACi_Cr, ACi+1_Cr) in a group are all 0 number of runs. If a group of three AC coefficients are all 0, add 1 to the inner run length value; if a group of three AC coefficients are not all 0, first encode the inner run length value, and then encode the three AC coefficients in the group Joint encoding, finally setting the inner run value to 0 and restarting counting. The run-length coding of the outer layer is continued until the m i AC coefficients have been traversed. Finally, RDO is used to select the target coding mode, that is, the target second parameter is obtained from the second set, and the shortest code stream of the corresponding chrominance component Cr is obtained.
- step 2054 the three code streams of different color components are added together to obtain the precoded code stream of the final AC coefficient in mode 2, including:
- the DC coefficients are all encoded in a single-layer run-length encoding manner.
- Step 206 select the target encoding mode through the RDO method, including:
- RDO rate-distortion optimization
- Step 207 using the target encoding mode to perform entropy encoding and obtain the final point cloud attribute encoding code stream, including:
- mode 1 is the target coding mode
- a single-layer run-length coding method (one set of three coefficients) is used to code all transformation coefficient columns (including DC coefficients and AC coefficients), and finally an attribute coded stream is obtained.
- mode 2 is the target coding mode
- use the single-layer run-length method three coefficients in one group to encode all DC coefficients, and then perform mixed run-length coding on the reordered AC coefficients of the three color components
- the AC coefficients of the luminance component are encoded by a single-layer run-length method in groups of three
- the AC transformation coefficients of the two chrominance components (Cb and Cr) are encoded by a double-layer run-length method, wherein the first parameter and the second
- the second parameter adopts the target first parameter and the target second parameter in the RDO respectively.
- the algorithm is implemented on the latest point cloud coding standard platform reference software PCRMv5.0, and the standard pass-through test sequence is tested, and the coding performance is obtained as shown in Table 1 and Table 2, where negative numbers After adopting the method of the embodiment of the present application, it represents the percentage of code rate saving, and a positive number represents the percentage of code rate increase.
- Table 1 is a performance comparison table of the method of the embodiment of the present application and the benchmark result of the current latest basic platform PCEMv5.0 of AVS under the condition of geometrically limited loss and attribute loss (AVS C1_AI), and the results show the attributes of the embodiment of the application
- the rate-distortion performance of luma component, chrominance component Cb and chrominance component Cr has been improved by an average of 0.25% respectively.
- Table 2 is a performance comparison table of the embodiment of the present application and the benchmark results of the latest basic platform PCEMv5.0 of AVS under the condition of lossless geometry and loss of attributes (AVS C2_AI).
- the rate-distortion performance of the chroma component Cb and the chroma component Cr has been improved by an average of 3.1%, 3.35% and 3.35%, respectively.
- the embodiment of the present application proposes an RDO-based point cloud entropy coding method for transform coefficients for point cloud color attributes. Solved and reordered the AC coefficients, this method can arrange more transform zero coefficients together to improve the efficiency of run-length coding.
- the embodiment of the present application also proposes a double-layer run-length coding algorithm for the chrominance components Cb and Cr with more zero coefficients, and finally combines the RDO method to effectively improve the efficiency of the latest point cloud coding standard and effectively improve the Point cloud compression performance.
- FIG. 6 is a point cloud entropy decoding method provided by an embodiment of the present application, including:
- Step 601. Obtain a code stream to be decoded.
- Step 602. Obtain the index of the target coding mode from the code stream to be decoded.
- Step 603 According to the index of the target coding mode, use the corresponding decoding mode to decode the transform coefficients in the code stream to be decoded.
- the transform coefficients include DC coefficients and AC coefficients. At least some of the DC coefficients and the AC coefficients are individually arranged according to color channels.
- the transform coefficients are processed into first transform coefficients and second transform coefficients having two different arrangements.
- the DC coefficients and AC coefficients are mixed and arranged according to three color channels; in the second transform coefficients , the DC coefficients are arranged according to the color three-channel mixture, and the AC coefficients are arranged separately according to the color channels.
- this step may include the following processes:
- the DC coefficients and the AC coefficients are respectively decoded using a single-layer run-length decoding method in combination with the numbers of the DC coefficients and the numbers of the AC coefficients.
- the size of the run value it can be determined how many coefficients are 0, and then, other non-zero coefficients are decoded.
- the DC coefficient and the AC coefficient of the luminance component are decoded by using the single-layer run-length decoding method in combination with the number of DC coefficients and the number of AC coefficients, respectively.
- the index of the target first parameter and the index of the target second parameter of the chroma component Cb and the chroma component Cr are decoded; according to the obtained target first parameter of the chroma component Cb and the target second parameter of the chroma component Cr and DC Coefficients or the number of AC coefficients, perform double-layer run-length decoding on the AC coefficients of the chrominance component Cb and the chrominance component Cr respectively.
- single-layer run-length coding is performed on DC coefficients and AC coefficients; in the second coding method, single-layer run-length coding is used for coding DC coefficients, and hybrid run-length coding is used for coding AC coefficients .
- the number of AC coefficients can be obtained by subtracting the number of DC coefficients from the total number of points in the point cloud frame.
- the number of DC coefficients can be obtained by subtracting the number of AC coefficients from the total number of points in the point cloud frame.
- the transform coefficients are disassembled at the coding end and different coding modes are used to determine the target coding mode, it can be ensured that the coded stream can be obtained more efficiently in the target coding mode.
- the decoding end due to the dismantling of the transform coefficients, more coefficients that are 0 are arranged together, so the decoding end can more efficiently determine the coefficients that are 0, which can correspondingly improve the decoding efficiency of the decoding end.
- an RDO-based method for entropy encoding of transform coefficients mainly includes: dividing the point cloud frame after Hilbert reordering into coding blocks; predicting, transforming and quantizing the current coding block to obtain the transformation coefficient block; after traversing the complete frame point cloud, all the transformation coefficients are obtained, The coefficient column is disassembled and rearranged to obtain transformation coefficients in two sorts, corresponding to two encoding modes.
- all the AC transform coefficient columns in the first type of luminance-chrominance mixed sorting are coded by a single-layer run-length coding method; the AC transform coefficients of different components in the second sorting are coded by a mixed run-length coding method.
- the method also includes: encoding the AC transform coefficients of the luminance component using a single-layer run-length method; and encoding the AC transform coefficients of the two chrominance components using a double-layer run-length method respectively.
- the best coding mode is selected by the rate-distortion optimization (RDO) method; in the first selection mode, the single-layer run-length coding method is used to encode all the transformation coefficient columns (including DC coefficients and AC coefficients) to obtain the coded stream; in the second selection mode
- RDO rate-distortion optimization
- the DC component (DC coefficient) and the AC component (AC coefficient) are disassembled for the transformation coefficient block, and the AC coefficients are reordered.
- This method can transform more The zero coefficients are arranged together to improve the efficiency of run-length encoding and effectively improve the point cloud compression performance.
- the embodiment of the present application also provides a point cloud entropy encoding device.
- the point cloud entropy encoding device 700 includes:
- the first acquisition module 701 is configured to acquire the transformation coefficient of the point cloud frame to be encoded; the second acquisition module 702 is configured to determine the target encoding method according to the transformation coefficient; the first encoding module 703 is configured to use the The target encoding method performs entropy encoding on the point cloud frame to be encoded; wherein the transformation coefficients include DC coefficients and AC coefficients; at least some of the DC coefficients and/or the AC coefficients are arranged separately according to color channels . At least some of the DC coefficients and/or the AC coefficients are arranged individually according to color channels.
- the first acquisition module 701 includes a division submodule (not shown in the figure), a first acquisition submodule (not shown in the figure) and a second acquisition submodule (not shown in the figure) );
- the division submodule (not shown in the figure) is configured to divide the encoding block of the point cloud frame to be encoded after Hilbert reordering to obtain a plurality of encoding blocks; the first acquisition submodule is configured to Predict, transform and quantize the plurality of coding blocks to obtain transformation coefficient blocks; the second acquisition sub-module is configured to obtain the transformation coefficients of the point cloud frame to be coded according to the transformation coefficient blocks of all coding blocks.
- the second acquisition module 702 includes a first submodule (not shown in the figure), a second submodule (not shown in the figure) and a third submodule (not shown in the figure) :
- the first sub-module (not shown in the figure) is configured to obtain a first transformation coefficient and a second transformation coefficient according to the transformation coefficient; wherein, the first transformation coefficient and the second transformation coefficient have different said transformation coefficients in an arrangement;
- the second sub-module (not shown in the figure) is configured to respectively pre-encode the first transform coefficient and the second transform coefficient by using different encoding methods to obtain a first pre-encoding result and a second pre-encoding result result;
- a third submodule (not shown in the figure), configured to determine a target coding method from the coding methods according to the first precoding result and the second precoding result;
- DC coefficients and AC coefficients are mixed and arranged according to the three color channels; in the second transformation coefficient, the DC coefficients are arranged according to the three color channels mixed, and the AC coefficients are arranged separately according to the color channels.
- the second submodule (not shown in the figure) includes a first encoding submodule (not shown in the figure) and a second encoding submodule (not shown in the figure);
- the first encoding submodule (not shown in the figure) is configured to encode the AC coefficients in the first transform coefficients using a single-layer run-length encoding method to obtain a first pre-encoding result;
- the second encoding submodule (not shown in the figure) is configured to encode the AC coefficients in the second transform coefficients using a hybrid run-length encoding method to obtain a second pre-encoding result.
- the first encoding submodule (not shown in the figure) is further configured to, for the AC coefficients, traverse all the AC coefficients in units of a preset number of groups, and for the current target group , are processed as follows:
- the second acquisition module 702 is further configured to:
- the AC coefficient of the chrominance component Cb is precoded using the double-layer run length method, and the precoding result of the chrominance component Cb is obtained;
- the AC coefficient of the chrominance component Cr is precoded by using the double-layer run length method, and the precoding result of the chrominance component Cr is obtained;
- the precoding result of the luma component, the precoding result of the chrominance component Cb, and the precoding result of the chrominance component Cr are added to obtain the precoding result of the AC coefficient.
- the second coding submodule (not shown in the figure) includes a first coding unit (not shown in the figure), a second coding unit (not shown in the figure), a third coding unit (not shown in the figure) Not shown in the figure) and the first acquisition unit (not shown in the figure);
- the first encoding unit (not shown in the figure) is configured to pre-encode the AC coefficients of the luminance component using a single-layer run-length method to obtain a pre-encoding result of the luminance component;
- the second encoding unit (not shown in the figure) is configured to pre-encode the AC coefficient of the chrominance component Cb using a double-layer run length method to obtain a pre-encoding result of the chrominance component Cb;
- the third encoding unit (not shown in the figure) is configured to pre-encode the AC coefficient of the chrominance component Cr using a double-layer run length method to obtain a pre-encoding result of the chrominance component Cr;
- the first acquisition unit (not shown in the figure) is configured to add the precoding result of the luminance component, the precoding result of the chrominance component Cb, and the precoding result of the chrominance component Cr to obtain AC The precoding result of the coefficients.
- the first encoding unit includes:
- the first obtaining subunit (not shown in the figure) is further configured to obtain the AC coefficient of the target luminance component according to the AC coefficient of the luminance component;
- the first encoding subunit (not shown in the figure) is further configured to encode the AC coefficients of the target luminance component using a single-level run-length method to obtain a pre-encoding result of the luminance component.
- the first acquisition subunit (not shown in the figure) is further configured to use the AC coefficients of the brightness components as the The AC coefficient of the luminance component; when the number of the AC coefficients of the luminance component is not a multiple of the target value, the AC coefficient of the luminance component is expanded to obtain the AC coefficient of the expanded luminance component, so that the expanded luminance
- the number of AC coefficients of the components is a multiple of the target value, and the AC coefficients of the expanded brightness components are used as the AC coefficients of the target brightness components.
- the first encoding subunit (not shown in the figure) is further configured to, for the AC coefficients of the target luminance component, traverse the AC coefficients of all luminance components in units of a preset number of groups; for the current target group , proceed as follows to obtain the luma component precoding result: when the AC coefficients of the preset number of luma components in the target group are all 0, add 1 to the current run length value; The AC coefficients of the preset number of luminance components are not all 0, the current run length value is encoded and the AC coefficients of the preset number of luminance components in the target group are jointly encoded, and the current run length value is set to 0 and restart counting.
- the second encoding unit (not shown in the figure) includes a second acquisition subunit (not shown in the figure) and a second encoding subunit (not shown in the figure):
- the second acquiring subunit (not shown in the figure) is configured to obtain the AC coefficient of the target chroma component Cb according to the AC coefficient of the chroma component Cb;
- the second encoding subunit (not shown in the figure) is configured to encode the AC coefficient of the target chrominance component Cb using a double-layer run length method to obtain a pre-encoding result of the chrominance component Cb.
- the second acquiring subunit (not shown in the figure) is further configured to use the AC coefficients of the chrominance component Cb as The AC coefficient of the target chroma component Cb; when the number of AC coefficients of the chroma component Cb is not a multiple of si , the AC coefficient of the chroma component Cb is expanded to obtain the AC of the expanded chroma component Cb Coefficients, so that the number of AC coefficients of the expanded chroma component Cb is a multiple of si , and the AC coefficients of the expanded chroma component Cb are used as the AC coefficients of the target chroma component Cb; wherein, the s i represents the first parameter, selected from the first set [s 1 , s 2 ,...,s n ], wherein the s i is a multiple of the target value, 1 ⁇ i ⁇ n.
- the second encoding subunit (not shown in the figure) is also configured to perform the following process:
- the AC coefficients of the chrominance component Cb in the target group are traversed in units of a preset number of groups, and the current group is processed as follows to obtain The inner run-length precoding result of the target group:
- the current inner run value is encoded and the AC coefficients of the preset number of chroma components Cb in the group are encoded.
- the current inner run value For joint encoding, set the current inner run value to 0 and start counting again; when the AC coefficients of the preset number of chrominance components Cb in the group are 0, add 1 to the current inner run value.
- the second encoding subunit (not shown in the figure) is further configured to perform the following process:
- S2 Determine the target first parameter from the first set according to the encoding results corresponding to different first parameters, and use the encoding result of the chrominance component Cb corresponding to the target first parameter as the chrominance component Cb precoding results.
- the third encoding unit (not shown in the figure) includes a third acquisition subunit (not shown in the figure) and a third encoding subunit (not shown in the figure):
- the third obtaining subunit (not shown in the figure) is configured to obtain the AC coefficient of the target chroma component Cr according to the AC coefficient of the chroma component Cr;
- the third encoding subunit (not shown in the figure) is configured to encode the AC coefficient of the target chrominance component Cr using a double-layer run length method to obtain a pre-encoding result of the chrominance component Cr.
- the third acquisition subunit (not shown in the figure) is further configured to use the AC coefficients of the chroma component Cr as The AC coefficient of the target chroma component Cr; when the number of AC coefficients of the chroma component Cr is not a multiple of si , the AC coefficient of the chroma component Cr is expanded to obtain the AC of the expanded chroma component Cr Coefficients, so that the number of AC coefficients of the expanded chroma component Cr is a multiple of mi , and the AC coefficients of the expanded chroma component Cr are used as the AC coefficients of the target chroma component Cr; wherein the m i represents a second parameter selected from the second set [m 1 ,, 2 ,...,m n ], wherein, m i is a multiple of the target value, 1 ⁇ i ⁇ n.
- the third coding subunit (not shown in the figure) is further configured to perform the following process:
- the third encoding subunit (not shown in the figure) is further configured to perform the following process:
- S2 Determine the target second parameter from the second set according to the encoding results corresponding to different second parameters, and use the encoding result of the chrominance component Cr corresponding to the target second parameter as the chrominance component Cr precoding results.
- the third submodule includes a second acquisition unit (not shown in the figure) and a third acquisition unit (not shown in the figure):
- the second obtaining unit (not shown in the figure) is configured to obtain the code stream size of the first precoding result and the code stream size of the second precoding result;
- the third obtaining unit (not shown in the figure) is configured to, when the code stream size of the first precoding result is smaller than the code stream size of the second precoding result, corresponding to the first precoding result
- the first coding method is used as the target coding method; when the code stream size of the first precoding result is larger than the code stream size of the second precoding result, the second precoding result corresponding to the second
- the coding method is used as the target coding method.
- the first coding module 703 is also configured as:
- the first coding module 703 is also configured as:
- the index of the target first parameter and the index of the target second parameter are encoded.
- the device provided in the embodiment of the present application can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here in this embodiment.
- the embodiment of the present application also provides a point cloud entropy decoding device.
- the point cloud entropy decoding device 800 includes:
- the third obtaining module 801 is configured to obtain the code stream to be decoded
- the fourth obtaining module 802 is configured to obtain an index of a target coding mode from the code stream to be decoded
- the second decoding module 803 is configured to decode the transform coefficients in the to-be-decoded code stream by using the corresponding decoding mode according to the index of the target coding mode;
- the conversion coefficients include DC coefficients and AC coefficients, and at least some of the DC coefficients and AC coefficients are arranged separately according to color channels.
- the transform coefficients are processed into first transform coefficients and second transform coefficients having two different arrangements, in the first transform coefficients, DC coefficients and AC coefficients are mixed and arranged according to three color channels; in the Among the above-mentioned second transformation coefficients, the DC coefficients are mixed and arranged according to the three color channels, and the AC coefficients are arranged separately according to the color channels.
- the second decoding module 803 includes an acquisition submodule (not shown in the figure) and a decoding submodule (not shown in the figure):
- An acquisition submodule (not shown in the figure), configured to obtain the index of the target encoding mode, the number of DC coefficients or the number of AC coefficients from the code stream to be decoded;
- the decoding sub-module (not shown in the figure) is configured to combine the number of DC coefficients and the number of AC coefficients respectively when the index of the target coding mode indicates that the target coding mode is the first coding mode, and calculate the The DC coefficients and the AC coefficients are decoded using a single-layer run-length decoding method;
- the index of the target encoding mode indicates that the target encoding mode is the second encoding mode
- combining the number of DC coefficients and the number of AC coefficients use a single-layer run-length decoding method to perform AC encoding on the DC coefficients and luminance components
- the coefficients are decoded, and the index of the target first parameter and the index of the target second parameter of the chroma component Cb and the chroma component Cr are respectively decoded; according to the obtained target first parameter of the chroma component Cb and the index of the chroma component Cr
- the target second parameter and the number of DC coefficients or AC coefficients respectively perform double-layer run-length decoding on the AC coefficients of the chrominance component Cb and the chrominance component Cr;
- the DC coefficient is encoded using a single-layer run-length encoding method
- the AC coefficient is encoded using a mixed run length encoding method to encode.
- the device provided in the embodiment of the present application can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here in this embodiment.
- the embodiment of the present application also provides an electronic device, the electronic device includes a point cloud entropy encoding device 1000 and a point cloud entropy decoding device 2000, wherein:
- the point cloud entropy encoding device 1000 includes: a first memory 1001, a first processor 1002, and a program stored on the first memory 1001 and operable on the first processor; Wherein, the first processor is configured to read the program in the memory to implement the steps in the point cloud entropy encoding method as mentioned above.
- the point cloud entropy encoding device 2000 includes: a second memory 2001, a second processor 2002, and a program stored on the second memory 2001 and operable on the second processor; Wherein, the second processor is configured to read the program in the memory to implement the steps in the above-mentioned point cloud entropy decoding method.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
- the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a processor-readable storage medium.
- the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
- the embodiment of the present application also provides a computer-readable storage medium, on which a program is stored.
- the program is executed by a processor, each process of the above-mentioned method embodiment can be achieved, and the same technical effect can be achieved.
- the readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid state drive (SSD)), etc.
- magnetic storage such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.
- optical storage such as CD, DVD, BD, HVD, etc.
- semiconductor memory such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid state drive (
- the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
- the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk, etc.) ) includes several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present application.
- a terminal which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.
- the embodiment of the present application discloses a point cloud entropy encoding method, decoding method, device, equipment, and computer-readable storage medium, including: first obtaining the transformation coefficient of the point cloud frame to be encoded; and then determining the target encoding method according to the transformation coefficient ; Finally, use the target encoding method to perform entropy encoding on the point cloud frame to be encoded.
- the conversion coefficients include direct current DC coefficients and alternating current AC coefficients; at least some of the DC coefficients and/or AC coefficients are arranged separately according to color channels.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
本申请公开了一种点云熵编码方法、解码方法、装置、设备及计算机可读存储介质,涉及点云编解码技术领域,以提高点云压缩性能。该方法包括:获取待编码点云帧的变换系数;根据变换系数,确定目标编码方式;利用目标编码方式对待编码点云帧进行熵编码;其中,变换系数包括直流DC系数和交流AC系数;DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列。本申请能够提高点云压缩性能。
Description
相关申请的交叉引用
本申请基于申请号为202111467830.1、申请日为2021年12月03日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本申请涉及编解码技术领域,尤其涉及一种点云熵编码方法、解码方法、装置、设备及计算机可读存储介质。
随着三维信息感知和获取技术的飞速发展,高分辨率和高保真度的三维点云在自动驾驶、自主导航、沉浸式媒体、虚拟现实等场景中得到了广泛的应用。三维点云是由一系列大量的位置信息和与之相对应的属性信息(颜色、反射率、法向量等)构成,能灵活地表征三维物体或场景的空间结构和表面属性。然而,海量的点云数据给有限的带宽和存储空间带来了极大的压力。因此,如何实现高效的点云数据压缩是一个急需解决的问题。
三维点云压缩主要分为几何压缩和属性压缩。其中,属性压缩主要分为预测编码和变换变换两个分支。受传统混合视频编码的启发,例如,H.264/AVC(Advanced Video Coding,高级视频编码)和H.265/HEVC(High Efficiency Video Coding,高效率视频编码),现有技术中提供了多种属性压缩方法。
目前,中国AVS(Audio Video coding Standard,数字音视频编解码标准)点云压缩工作组提供了测试平台PCEMv5.0,其中颜色点云属性压缩方法主要是采用了基于DCT(Discrete Cosine Transform,离散余弦变换)的点云变换方法。但是,在实现本申请的过程中发明人发现,上述方法得到的变换系数列的排列不合理,从而影响了游程编码的效率,进而降低了点云压缩性能。
发明内容
本申请实施例提供一种点云熵编码方法、解码方法、装置、设备及计算机可读存储介质,以提高点云压缩性能。
第一方面,本申请实施例提供了一种点云熵编码方法,包括:
获取待编码点云帧的变换系数;
根据所述变换系数,确定目标编码方式;
利用所述目标编码方式对所述待编码点云帧进行熵编码;
其中,所述变换系数包括直流DC系数和交流AC系数;所述DC系数和/或所述AC系数中的至少部分系数按照颜色通道单独排列。
在本申请实施例中,所述根据所述变换系数,确定目标编码方式,包括:
根据所述变换系数,得到第一变换系数和第二变换系数;其中,所述第一变换系数和所述第二变换系数为具有不同排列方式的所述变换系数;
利用不同的编码方式分别对所述第一变换系数和所述第二变换系数进行预编码,得到第一预编码结果和第二预编码结果;
根据所述第一预编码结果和所述第二预编码结果,从所述编码方式中确定目标编码方式;
其中,在所述第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在所述第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。
在本申请实施例中,所述获取待编码点云帧的变换系数,包括:
对希尔伯特重排序后的待编码点云帧进行编码块划分,得到多个编码块;
对所述多个编码块进行预测、变换和量化,得到变换系数块;
根据所有编码块的变换系数块,得到所述待编码点云帧的变换系数。
在本申请实施例中,所述利用不同的编码方式分别对所述第一变换系数和所述第二变换系数进行预编码,得到第一预编码结果和第二预编码结果,包括:
对所述第一变换系数中的AC系数利用单层游程编码方法进行编码,得到第一预编码结果;
对所述第二变换系数中的AC系数利用混合游程编码方法进行编码,得到第二预编码结果。
在本申请实施例中,所述对所述第一变换系数中的AC系数利用单层游程编码方法进行编码,包括:
对于所述AC系数,以预设数量一组为单位遍历所有AC系数;对于当前的目标分组,按如下方式进行处理:
当所述目标分组中的预设数量个AC系数全为0时,则将当前的游程值加1;当所述目标分组中的预设数量个AC系数不全为0时,对当前的游程值进行编码以及对所述目标分组中的预设数量个AC系数进行联合编码,将当前的游程值设置为0并重新开始计数。
在本申请实施例中,当所述AC系数按颜色通道单独排列时,对所述AC系数利用混合游程编码方法进行预编码,包括:
对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果;
对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码结果;
对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预编码结果;
将所述亮度分量预编码结果、所述色度分量Cb的预编码结果以及所述色度分量Cr的预编码结果相加,得到AC系数的预编码结果。
在本申请实施例中,所述对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果,包括:
根据所述亮度分量的AC系数,得到目标亮度分量的AC系数;
对所述目标亮度分量的AC系数利用单层游程方法进行编码,得到亮度分量预编码结果。
在本申请实施例中,所述根据所述亮度分量的AC系数,得到目标亮度分量的AC系 数,包括:
当所述亮度分量的AC系数的个数是目标数值的倍数时,利用所述亮度分量的AC系数作为所述亮度分量的AC系数;
当所述亮度分量的AC系数的个数不是目标数值的倍数时,对所述亮度分量的AC系数进行扩充,得到扩充后的亮度分量的AC系数,使得扩充后的亮度分量的AC系数的个数为目标数值的倍数,并将扩充后的亮度分量的AC系数作为所述目标亮度分量的AC系数。
在本申请实施例中,所述对所述目标亮度分量的AC系数利用单层游程方法进行编码,得到亮度分量预编码结果,包括:
对于所述目标亮度分量的AC系数,以预设数量一组为单位遍历所有亮度分量的AC系数;对于当前的目标分组,按如下方式进行处理,得到亮度分量预编码结果:
当所述目标分组中的预设数量个亮度分量的AC系数全为0时,则将当前的游程值加1;当所述目标分组中的预设数量个亮度分量的AC系数不全为0,对当前的游程值进行编码以及对所述目标分组中的预设数量个亮度分量的AC系数进行联合编码,将当前的游程值设置为0并重新开始计数。
在本申请实施例中,所述对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码结果,包括:
根据所述色度分量Cb的AC系数,得到目标色度分量Cb的AC系数;
对所述目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果。
在本申请实施例中,所述根据所述色度分量Cb的AC系数,得到目标色度分量Cb的AC系数,包括:
当色度分量Cb的AC系数的个数是s
i的倍数时,利用所述色度分量Cb的AC系数作为所述目标色度分量Cb的AC系数;
当色度分量Cb的AC系数的个数不是s
i的倍数时,对色度分量Cb的AC系数进行扩充,得到扩充后的色度分量Cb的AC系数,使得扩充后的色度分量Cb的AC系数的个数为s
i的倍数,并将扩充后的色度分量Cb的AC系数作为所述目标色度分量Cb的AC系数;
其中,所述s
i表示第一参数,选自于第一集合[s
1,s
2,…,s
n],其中,所述s
i为目标数值的倍数,1≤i≤n。
在本申请实施例中,所述对所述目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果,包括:
将目标色度分量Cb的AC系数以s
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cb的AC系数全为0时,则将当前的外层游程值加1;当所述目标分组中的色度分量Cb的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对所述目标分组中的色度分量Cb的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于所述目标分组中的色度分量Cb的AC系数,以预设数量一组为单位遍历所述目标分组中的所有色度分量Cb的AC系数,对于当前分组,按如下方式进行处理,得到所述目标分组的内层游程预编码结果:
当所述分组中的预设数量个色度分量Cb的AC系数不全为0时,对当前的内层游程 值进行编码以及对所述分组中的预设数量个色度分量Cb的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当所述分组中的预设数量个色度分量Cb的AC系数为0时,则将当前的内层游程值加1。
在本申请实施例中,所述方法还包括:
根据不同第一参数对应的编码结果,从所述第一集合中确定目标第一参数,并将所述目标第一参数对应的色度分量Cb的编码结果,作为所述色度分量Cb的预编码结果。
在本申请实施例中,所述对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预编码结果,包括:
根据所述色度分量Cr的AC系数,得到目标色度分量Cr的AC系数;
对所述目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果。
在本申请实施例中,所述根据所述色度分量Cr的AC系数,得到目标色度分量Cr的AC系数,包括:
当色度分量Cr的AC系数的个数是m
i的倍数时,利用所述色度分量Cr的AC系数作为所述目标色度分量Cr的AC系数;
当色度分量Cr的AC系数的个数不是s
i的倍数时,对色度分量Cr的AC系数进行扩充,得到扩充后的色度分量Cr的AC系数,使得扩充后的色度分量Cr的AC系数的个数为m
i的倍数,并将扩充后的色度分量Cr的AC系数作为所述目标色度分量Cr的AC系数;
其中,所述m
i表示第二参数,选自于第二集合[m
1,m
2,…,m
n],其中,所述m
i为目标数值的倍数,1≤i≤n。
在本申请实施例中,所述对所述目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果,包括:
将目标色度分量Cr的AC系数以m
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cr的AC系数全为0时,则将当前的外层游程值加1;当所述目标分组中的色度分量Cr的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对所述目标分组中的色度分量Cr的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于所述目标分组中的色度分量Cr的AC系数,以预设数量一组为单位遍历所述目标分组中的所有色度分量Cr的AC系数,对于当前分组,按如下方式进行处理,得到所述目标分组的内层游程预编码结果:
当所述分组中的预设数量个色度分量Cr的AC系数不全为0时,对当前的内层游程值进行编码以及对所述分组中的预设数量个色度分量Cr的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当所述分组中的预设数量个色度分量Cr的AC系数为0时,则将当前的内层游程值加1。
在本申请实施例中,所述方法还包括:
根据不同第二参数对应的编码结果,从所述第二集合中确定目标第二参数,并将所述目标第二参数对应的色度分量Cr的编码结果,作为所述色度分量Cr的预编码结果。
在本申请实施例中,所述根据所述第一预编码结果和所述第二预编码结果,从所述编码方式中确定目标编码方式,包括:
获得所述第一预编码结果的码流大小以及所述第二预编码结果的码流大小;
当所述第一预编码结果的码流大小小于所述第二预编码结果的码流大小时,将所述第一预编码结果对应的第一编码方式作为所述目标编码方式;当所述第一预编码结果的码流大小大于所述第二预编码结果的码流大小时,将所述第二预编码结果对应的第二编码方式作为所述目标编码方式。
在本申请实施例中,所述利用所述目标编码方式对所述待编码点云帧进行熵编码,包括:
对DC系数和AC系数进行单层游程编码;或者,对DC系数采用单层游程编码方法进行编码,对AC系数采用混合游程编码方法进行编码,其中,在进行混合游程编码时,对色度分量Cb的AC系数和色度分量Cr的AC系数进行编码所采用的第一参数和第二参数分别为预编码时确定的目标第一参数以及目标第二参数;
对所述目标编码模式的索引、DC系数或AC系数的个数进行编码。
在本申请实施例中,其中,所述方法还包括:
对所述目标第一参数的索引以及目标第二参数的索引进行编码。
第二方面,本申请实施例还提供一种点云熵解码方法,包括:
获取待解码码流;
从所述待解码码流中获得目标编码模式的索引;
根据所述目标编码模式的索引,利用对应的解码模式对所述待解码码流中的变换系数进行解码;
其中,所述变换系数包括DC系数和AC系数;所述DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列。
在本申请实施例中,所述变换系数被处理成具有两种不同的排列方式的第一变换系数和第二变换系数,在所述第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在所述第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。
在本申请实施例中,所述根据所述目标编码模式的索引,利用对应的解码模式对所述待解码码流中的变换系数进行解码,包括:
从所述待解码码流中获得目标编码模式的索引、DC系数或AC系数的个数;
当所述目标编码模式的索引表示目标编码模式为第一编码方式时,分别结合DC系数的个数和AC系数的个数,对所述DC系数和所述AC系数利用单层游程解码方法进行解码;
当所述目标编码模式的索引表示目标编码模式为第二编码方式时,结合所述DC系数的个数和AC系数的个数,利用单层游程解码方法对所述DC系数和亮度分量的AC系数进行解码,分别对色度分量Cb和色度分量Cr的目标第一参数的索引和目标第二参数的索引进行解码;根据获得的色度分量Cb的目标第一参数和色度分量Cr的目标第二参数以及所述DC系数或AC系数的个数,分别对色度分量Cb和色度分量Cr的AC系数进行双层游程解码。
第三方面,本申请实施例还提供一种点云熵编码装置,包括:
第一获取模块,被配置为获取待编码点云帧的变换系数;
第二获取模块,被配置为根据所述变换系数,确定目标编码方式;
第一编码模块,被配置为利用所述目标编码方式对所述待编码点云帧进行熵编码;
其中,所述变换系数包括DC系数和AC系数;所述DC系数和/或所述AC系数中的 至少部分系数按照颜色通道单独排列。
第四方面,本申请实施例还提供一种点云熵解码装置,包括:
第三获取模块,被配置为获取待解码码流;
第四获取模块,被配置为从所述待解码码流中获得目标编码模式的索引;
第二解码模块,被配置为根据所述目标编码模式的索引,利用对应的解码模式对所述待解码码流中的变换系数进行解码;
其中,所述变换系数包括DC系数和AC系数;所述DC系数和/或所述AC系数中的至少部分系数按照颜色通道单独排列。
第五方面,本申请实施例还提供一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的程序,所述处理器执行所述程序时实现如上所述方法中的步骤。
第六方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储程序,所述程序被处理器执行时实现如上所述方法中的步骤。
在本申请实施例中,对变换系数的DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列,因此,利用本申请实施例的方案,可将更多的变换零系数排列在一起,从而可提高游程编码的效率,并提高点云压缩性能。
图1是本申请实施例提供的点云熵编码方法的流程图之一;
图2是本申请实施例提供的点云熵编码方法的流程图之二;
图3是本申请实施例提供的混合游程编码方法的示意图;
图4是本申请实施例提供的外层游程编码流程图;
图5是本申请实施例提供的内层游程编码流程图;
图6是本申请实施例提供的点云熵解码方法的流程图;
图7是本申请实施例提供的点云熵编码装置的结构示意图;
图8是本申请实施例提供的点云熵解码装置的结构示意图;
图9是本申请实施例提供的点云熵编码设备的结构示意图;
图10是本申请实施例提供的点云熵解码设备的结构示意图。
本申请实施例中术语“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
本申请实施例中术语“多个”是指两个或两个以上,其它量词与之类似。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,并不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
目前,三维点云压缩主要分为几何压缩和属性压缩。其中,点云属性压缩主要分为预测编码和变换两个分支。在传统混合视频编码(例如,H.264/AVC和H.265/HEVC)中,基于八叉树的三维点云帧内预测方法是将相邻块中的重构属性投影到当前块的相邻边缘平面上,并将投影值用作预测属性的参考信息。但是,体素内占用的点云分布情况会对最终的属性预测性能产生一定的影响。另外,基于点云几何分布的增强属性帧内预测方法。它通过引入了基于点云质心的标准,来衡量预测参考点云在空间中的分布均匀性。从而最终通过优化预测参考点集来提高属性编码性能。除上述的属性预测编码方法外,还有一些采用基于变换的方法进行属性压缩。比如,基于区域自适应分层变换(Region-Adaptive Hierarchical Transform,RAHT),它是基于类似于小波自适应变化的分层子带变换。在此基础上,基于局部平面分析的三维小波变换的属性压缩方法,通过对编码块的平面度分析自适应地选择三维小波变换的方向顺序从而提高属性编码性能。
但是,上述方法得到的变换系数列是颜色三通道混合排序的,即按照亮度、色度Cb和色度Cr的系数排列(以AC系数为例:AC_L,AC_Cb,AC_Cr)。但是大部分亮度分量的AC值还是比较大的,而两个色度分量的AC值较多为零,原排序下的变换系数列限制了游程编码的性能。
基于此,本申请提出了一种点云熵编码方法,针对点云颜色属性信息,对变换系数块进行直流分量(DC系数)和交流分量(AC系数)的拆解并对AC系数进行了重排序操作,该方法能将更多的变换零系数排列在一起从而提高游程编码的效率,有效提高了点云压缩性能。
参见图1,图1是本申请实施例提供的点云熵编码方法的流程图,如图1所示,包括以下步骤:
步骤101、获取待编码点云帧的变换系数。
在此步骤中,可对希尔伯特重排序后的待编码点云帧进行编码块划分,得到多个编码块,并对多个编码块进行预测、变换和量化,得到变换系数块。之后,根据所有编码块的变换系数块,得到待编码点云帧的变换系数。
在本申请实施例中,对几何重构后的点云数据按照希尔伯特码由大到小进行重排序,然后根据希尔伯特码对点云进行自适应划分得到待编码点云子块,即编码块。之后,对得到的待编码子块进行加权属性预测,并对预测残差进行变换和量化,得到变换系数块。根据获得的变换系数块,得到变换系数。
其中,变换系数包括直流DC(Direct Current,直流)系数和交流AC(Alternating Current,交流)系数。DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列。例如,可将AC系数中的部分或全部系数按照颜色通道单独排列,DC系数按照颜色三通道混合排列。
步骤102、根据变换系数,确定目标编码方式。
当AC系数按颜色通道单独排列时,可对AC系数利用混合游程编码方法进行预编码,并将该编码方式作为目标编码方式。
在这个过程中,主要包括:
(1)对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果。该过程可包括:
(11)根据亮度分量的AC系数,得到目标亮度分量的AC系数。
当亮度分量的AC系数的个数是目标数值(如3)的倍数时,利用亮度分量的AC系数作为亮度分量的AC系数。当亮度分量的AC系数的个数不是目标数值(如3)的倍数时,对亮度分量的AC系数进行扩充,得到扩充后的亮度分量的AC系数,使得扩充后的亮度分量的AC系数的个数为目标数值(如3)的倍数,并将扩充后的亮度分量的AC系数作为目标亮度分量的AC系数。
在本申请实施例中,以预设数量为三个,目标数值为3为例,设亮度分量的AC系数个数为ACSize,当ACSize%3=0时,直接对该亮度分量的AC系数进行三个一组的单层游程编码;当ACSize%3≠0时,首先要对亮度分量的AC系数进行扩充,将其个数扩充为3的倍数。具体为:根据公式
计算亮度分量AC系数列的组数并记为ACLumaCount,然后在原有亮度分量的AC系数列的末尾填充(ACLumaCount×3-ACSize)个0,最后对填充后的亮度分量的AC系数列进行三个一组的单层游程编码。
(12)对目标亮度分量的AC系数利用单层游程方法进行编码,得到亮度分量预编码结果。
对于目标亮度分量的AC系数,以预设数量(如三个)一组为单位遍历所有亮度分量的AC系数,对于当前的目标分组,按如下方式进行处理,得到亮度分量预编码结果:
当目标分组中的预设数量个亮度分量的AC系数全为0时,则将当前的游程值加1;当目标分组中的预设数量个亮度分量的AC系数不全为0,对当前的游程值进行编码以及对目标分组中的预设数量个亮度分量的AC系数进行联合编码,将当前的游程值设置为0并重新开始计数。
在本申请实施例中,以预设数量为三个为例,以三个一组为单位对亮度分量的AC系数(或填充后的AC系数)进行遍历,统计一组中三个亮度分量的AC系数(ACi-1_L,ACi_L,ACi+1_L)全为0的游程数,其中,ACi_L表示亮度分量的第i个AC系数。若一组三个亮度分量的AC系数全为0,则将游程值加1;若一组三个亮度分量的AC系数不全为0,则首先对游程值进行编码,然后对该组三个亮度分量的AC系数进行联合编码,最后将游程值设置为0并重新开始计数,直到遍历完亮度分量的所有AC系数并得到亮度分量的编码码流。
(2)对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码结果。该过程可包括:
(21)根据色度分量Cb的AC系数,得到目标色度分量Cb的AC系数。
当色度分量Cb的AC系数的个数不是s
i的倍数时,色度分量Cb的AC系数进行扩充,得到扩充后的色度分量Cb的AC系数,使得扩充后的色度分量Cb的AC系数的个数为s
i的倍数,并将扩充后的色度分量Cb的AC系数作为目标色度分量Cb的AC系数。
其中,s
i表示第一参数,选自于第一集合[s
1,s
2,…,s
n],其中,s
i为目标数值(如3)的倍数,1≤i≤n。
在本申请实施例中,可设置一系列第一集合,并记为groupCb=[s
1,s
2,…,s
n],其中,s
i为3的倍数。之后,根据第一集合s
i对色度分量Cb的AC系数进行扩充。
扩充的方式具体为:设色度分量Cb的AC系数个数为ACSize,当ACSize%s
i=0时,直接对该色度分量Cb的AC系数列进行双层游程编码;当ACSize%s
i≠0时,首先对色度分量Cb的AC系数列进行扩充,将其个数扩充为s
i的倍数,具体为:先根据公式
计算色度分量Cb的AC系数列的组数并记为ACCbCount,然后在原有色度分量Cb的AC系数列的末尾填充(ACCbCount×s
i-ACSize)个0。
(22)对目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果。
对目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果。
在本申请实施例中,该过程可包括:
S1:将目标色度分量Cb的AC系数以s
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cb的AC系数全为0时,则将当前的外层游程值加1;当目标分组中的色度分量Cb的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对目标分组中的色度分量Cb的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于目标分组中的色度分量Cb的AC系数,以预设数量(如三个)一组为单位遍历目标分组中的所有色度分量Cb的AC系数,对于当前分组,按如下方式进行处理,得到目标分组的内层游程预编码结果:
当分组中的预设数量个色度分量Cb的AC系数不全为0时,对当前的内层游程值进行编码以及对分组中的预设数量个色度分量Cb的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当分组中的预设数量个色度分量Cb的AC系数为0时,则将当前的内层游程值加1。
在以上的基础上,还可根据不同第一参数对应的编码结果,从第一集合中确定目标第一参数,并将目标第一参数对应的色度分量Cb的编码结果,作为色度分量Cb的预编码结果。
在本申请实施例中,可采用RDO(Rate Distortion Optimation,率失真优化)选择目标编码模式,即获得最佳的第一参数(即目标第一参数),并得到该最佳的第一参数对应的编码码流作为色度分量Cb的最短编码码流。
也即,在此可比较在不同第一参数下获得的编码码流的大小,从中选择码流最小的编码码流所对应的第一参数作为目标第一参数。
(3)对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预编码结果。该过程可包括:
(31)根据色度分量Cr的AC系数,得到目标色度分量Cr的AC系数。
当色度分量Cr的AC系数的个数是m
i的倍数时,利用色度分量Cr的AC系数作为目标色度分量Cr的AC系数;当色度分量Cr的AC系数的个数不是s
i的倍数时,对色度分量Cr的AC系数进行扩充,得到扩充后的色度分量Cr的AC系数,使得扩充后的色度分量Cr的AC系数的个数为m
i的倍数,并将扩充后的色度分量Cr的AC系数作为目标色度分量Cr的AC系数。
其中,m
i表示第二参数,选自于第二集合[m
1,m
2,…,m
n],其中,m
i为目标数值(如3)的倍数,1≤i≤n。
在本申请实施例中,可首先获取一系列第一集合,并记为groupCr=[m
1,m
2,…,m
n],其中,m
i为3的倍数。之后,根据第一集合m
i对色度分量Cr的AC系数进行扩充。
在本申请实施例中,扩充方式为:设色度分量Cr的AC系数个数为ACSize,当ACSize%m
i=0时,直接对该色度分量Cr的AC系数列进行双层游程编码;当ACSize%m
i≠0时,对色度分量Cr的AC系数列进行扩充,将其个数扩充为m
i的倍数。具体为:根据公式
计算色度分量Cr的AC系数列的组数并记为ACCrCount,然后在原有色度分量Cr的AC系数列的末尾填充(ACCrCount*m
i-ACSize)个0。
(32)对目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果。
对目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果。
在本申请实施例中,该过程可包括:
S1:将目标色度分量Cr的AC系数以m
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cr的AC系数全为0时,则将当前的外层游程值加1;当目标分组中的色度分量Cr的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对目标分组中的色度分量Cr的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于目标分组中的色度分量Cr的AC系数,以预设数量(如三个)一组为单位遍历目标分组中的所有色度分量Cr的AC系数,对于当前分组,按如下方式进行处理,得到目标分组的内层游程预编码结果:
当分组中的预设数量个色度分量Cr的AC系数不全为0时,对当前的内层游程值进行编码以及对分组中的预设数量个色度分量Cr的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当分组中的预设数量个色度分量Cr的AC系数为0时,则将当前的内层游程值加1。
在以上的基础上,还可根据不同第二参数对应的编码结果,从第二集合中确定目标第二参数,并将目标第二参数对应的色度分量Cr的编码结果,作为色度分量Cr的预编码结果。
在本申请实施例中,可采用RDO选择目标编码模式,即获得最佳的第二参数(即目标第二参数),并得到该目标第二参数对应的编码码流作为色度分量Cr的最短编码码流。
也即,在此可比较在不同第二参数下获得的编码码流的大小,从中选择码流最小的编码码流所对应的第二参数作为目标第二参数。
(4)将亮度分量预编码结果、色度分量Cb的预编码结果以及色度分量Cr的预编码结果相加,得到AC系数的预编码结果。
在本申请实施例中,当DC系数和AC系数根据排列方式的不同而得到不同排列方式下的变换系数时,可按照如下方式处理:
步骤1021、根据变换系数,得到第一变换系数和第二变换系数。
其中,第一变换系数和第二变换系数为具有不同排列方式的变换系数。在此步骤中,对得到的变换系数进行拆解以及重排得到两种排列方式的变换系数,即具有第一排列方式的第一变换系数和具有第二排列方式的第二变换系数。在第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。也即第一变换系数和第二变化系数是变换系数的两种不同 排列形式。
在实际应用中,对获得的变换系数(变换系数列)进行拆解后可得到DC系数列和AC系数列,再对其中的AC系数列进行重新排序得到相应的三段系数,分别为:亮度分量的AC系数列、色度分量Cb的AC系数列以及色度分量Cr的AC系数列。
在本申请实施例中,以四点一组变换为例,四点变换总共会产生3个DC系数和9个AC系数。其中,3个DC系数分别为亮度分量、两个色度分量的DC系数,分别用DC_L,DC_Cb和DC_Cr来表示。9个AC系数分别为AC1_L,AC2_L,AC3_L,AC1_Cb,AC2_Cb,AC3_Cb,AC1_Cr,AC2_Cr,AC3_Cr,其中,ACi_L表示亮度分量的第i个AC系数,ACi_Cb表示色度分量Cb的第i个AC系数,ACi_Cr表示色度分量Cr的第i个AC系数,i=1,2,3。
第一变换系数和第二变化系数中的DC系数均按照亮度分量、色度分量Cb和色度分量Cr的顺序进行排列,具体为:(DC_L,DC_Cb,DC_Cr)。
第一变换系数中的AC系数按照亮度分量、色度分量Cb和色度分量Cr的混合顺序进行排列,具体为:(AC1_L,AC1_Cb,AC1_Cr)(AC2_L,AC2_Cb,AC2_Cr)(AC3_L,AC3_Cb,AC3_Cr)。
第二变化系数中的AC系数排序具体为按照亮度分量、色度分量Cb和色度分量Cr单独排列:(AC1_L,AC2_L,AC3_L)(AC1_Cb,AC2_Cb,AC3_Cb)(AC1_Cr,AC2_Cr,AC3_Cr)。
步骤1022、利用不同的编码方式分别对第一变换系数和第二变换系数进行预编码,得到第一预编码结果和第二预编码结果。
其中,第一变换系数和第二变换系数对应不同的编码方式。在本申请实施例中,对AC系数利用单层游程编码方法(第一编码方式)进行编码,得到第一预编码结果;对第二变换系数中的AC系数利用混合游程编码方法进行编码(第二编码方式),得到第二预编码结果。
由于两种排列方式下DC系数的排列方式相同,因此,在预编码的过程中,可不对DC系数进行编码,从而可进一步提高效率。当然,也可对DC系数进行预编码。对于不同变换系数中的DC系数,均是按照单层游程编码方法进行编码。即,对于DC系数,以预设数量(如三个)一组为单位遍历所有DC系数,对于当前的目标分组,按如下方式进行处理:
当目标分组中的预设数量个DC系数不全为0时,对当前的游程值进行编码以及对目标分组中的预设数量个DC系数进行联合编码,将当前的游程值设置为0并重新开始计数;当目标分组中的预设数量个DC系数为0时,则将当前的游程值加1。其中,目标分组为任意一个分组。
以下,详细描述对不同变换系数中的AC系数的编码方法。
1、对第一变换系数中的AC系数利用单层游程编码方法进行编码:
对于第一变换系数中的AC系数,以预设数量(如三个)一组为单位遍历所有AC系数,对于当前的目标分组,按如下方式进行处理:
当目标分组中的预设数量个AC系数不全为0时,对当前的游程值进行编码以及对目标分组中的预设数量个AC系数进行联合编码,将当前的游程值设置为0并重新开始计数;当目标分组中的预设数量个AC系数全为0时,则将当前的游程值加1。其中,目标分组 为任意一个分组。
也即,以预设数量(如三个)一组为单位对所有AC系数进行遍历,统计一组中预设数量个AC系数(AC_L,AC_Cb,AC_Cr)全为0的游程数。若一组预设数量个AC系数全为0,则将游程值加1;若一组预设数量个AC系数不全为0,则首先对游程值进行编码,然后对该组预设数量个AC系数进行联合编码,最后将游程值设置为0并重新开始计数,直到遍历完所有的AC系数。最终得到第一变换系数的AC系数对应的预编码码流。
2、对第二变换系数中的AC系数利用混合游程编码方法进行编码:
在这个过程中,主要包括:
(1)对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果。该过程可包括:
(11)根据亮度分量的AC系数,得到目标亮度分量的AC系数。
当亮度分量的AC系数的个数是目标数值(如3)的倍数时,利用亮度分量的AC系数作为亮度分量的AC系数。当亮度分量的AC系数的个数不是目标数值(如3)的倍数时,对亮度分量的AC系数进行扩充,得到扩充后的亮度分量的AC系数,使得扩充后的亮度分量的AC系数的个数为目标数值(如3)的倍数,并将扩充后的亮度分量的AC系数作为目标亮度分量的AC系数。
在本申请实施例中,例如以预设数量为三个,目标数值为3为例,设亮度分量的AC系数个数为ACSize,当ACSize%3=0时,直接对该亮度分量的AC系数进行三个一组的单层游程编码;当ACSize%3≠0时,首先要对亮度分量的AC系数进行扩充,将其个数扩充为3的倍数。具体为:根据公式
计算亮度分量AC系数列的组数并记为ACLumaCount,然后在原有亮度分量的AC系数列的末尾填充(ACLumaCount×3-ACSize)个0,最后对填充后的亮度分量的AC系数列进行三个一组的单层游程编码。
(12)对目标亮度分量的AC系数利用单层游程方法进行编码,得到亮度分量预编码结果。
对于目标亮度分量的AC系数,以预设数量(如三个)一组为单位遍历所有亮度分量的AC系数,对于当前的目标分组,按如下方式进行处理,得到亮度分量预编码结果:
当目标分组中的预设数量个亮度分量的AC系数全为0时,则将当前的游程值加1;当目标分组中的预设数量个亮度分量的AC系数不全为0,对当前的游程值进行编码以及对目标分组中的预设数量个亮度分量的AC系数进行联合编码,将当前的游程值设置为0并重新开始计数。
在本申请实施例中,以预设数量为三个为例,以三个一组为单位对亮度分量的AC系数(或填充后的AC系数)进行遍历,统计一组中三个亮度分量的AC系数(ACi-1_L,ACi_L,ACi+1_L)全为0的游程数,其中,ACi_L表示亮度分量的第i个AC系数。若一组三个亮度分量的AC系数全为0,则将游程值加1;若一组三个亮度分量的AC系数不全为0,则首先对游程值进行编码,然后对该组三个亮度分量的AC系数进行联合编码,最后将游程值设置为0并重新开始计数,直到遍历完亮度分量的所有AC系数并得到亮度分量的编码码流。
(2)对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码结果。该过程可包括:
(21)根据色度分量Cb的AC系数,得到目标色度分量Cb的AC系数。
当色度分量Cb的AC系数的个数不是s
i的倍数时,色度分量Cb的AC系数进行扩充,得到扩充后的色度分量Cb的AC系数,使得扩充后的色度分量Cb的AC系数的个数为s
i的倍数,并将扩充后的色度分量Cb的AC系数作为目标色度分量Cb的AC系数。
其中,s
i表示第一参数,选自于第一集合[s
1,s
2,…,s
n],其中,s
i为目标数值(如3)的倍数,1≤i≤n。
在具体应用中,可设置一系列第一集合,并记为groupCb=[s
1,s
2,…,s
n],其中,s
i为3的倍数。之后,根据第一集合s
i对色度分量Cb的AC系数进行扩充。
扩充的方式具体为:设色度分量Cb的AC系数个数为ACSize,当ACSize%s
i=0时,直接对该色度分量Cb的AC系数列进行双层游程编码;当ACSize%s
i≠0时,首先对色度分量Cb的AC系数列进行扩充,将其个数扩充为s
i的倍数,具体为:先根据公式
计算色度分量Cb的AC系数列的组数并记为ACCbCount,然后在原有色度分量Cb的AC系数列的末尾填充(ACCbCount×s
i-ACSize)个0。
(22)对目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果。
对目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果。
在本申请实施例中,该过程可包括:
S1:将目标色度分量Cb的AC系数以s
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cb的AC系数全为0时,则将当前的外层游程值加1;当目标分组中的色度分量Cb的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对目标分组中的色度分量Cb的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于目标分组中的色度分量Cb的AC系数,以预设数量(如三个)一组为单位遍历目标分组中的所有色度分量Cb的AC系数,对于当前分组,按如下方式进行处理,得到目标分组的内层游程预编码结果:
当分组中的预设数量个色度分量Cb的AC系数不全为0时,对当前的内层游程值进行编码以及对分组中的预设数量个色度分量Cb的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当分组中的预设数量个色度分量Cb的AC系数为0时,则将当前的内层游程值加1。
在以上的基础上,还可根据不同第一参数对应的编码结果,从第一集合中确定目标第一参数,并将目标第一参数对应的色度分量Cb的编码结果,作为色度分量Cb的预编码结果。
在本申请实施例中,可采用RDO(Rate Distortion Optimation,率失真优化)选择目标编码模式,即获得目标第一参数,并得到该目标第一参数对应的编码码流作为色度分量Cb的最短编码码流。
也即,在此可比较在不同第一参数下获得的编码码流的大小,从中选择码流最小的编码码流所对应的第一参数作为目标第一参数。
(3)对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预 编码结果。该过程可包括:
(31)根据色度分量Cr的AC系数,得到目标色度分量Cr的AC系数。
当色度分量Cr的AC系数的个数是m
i的倍数时,利用色度分量Cr的AC系数作为目标色度分量Cr的AC系数;当色度分量Cr的AC系数的个数不是s
i的倍数时,对色度分量Cr的AC系数进行扩充,得到扩充后的色度分量Cr的AC系数,使得扩充后的色度分量Cr的AC系数的个数为m
i的倍数,并将扩充后的色度分量Cr的AC系数作为目标色度分量Cr的AC系数。
其中,m
i表示第二参数,选自于第二集合[m
1,m
2,…,m
n],其中,m
i为目标数值(如3)的倍数,1≤i≤n。
在本申请实施例中,可首先获取一系列第一集合,并记为groupCr=[m
1,m
2,…,m
n],其中,m
i为3的倍数。之后,根据第一集合m
i对色度分量Cr的AC系数进行扩充。
在本申请实施例中扩充方式为:设色度分量Cr的AC系数个数为ACSize,当ACSize%m
i=0时,直接对该色度分量Cr的AC系数列进行双层游程编码;当ACSize%m
i≠0时,对色度分量Cr的AC系数列进行扩充,将其个数扩充为m
i的倍数。具体为:根据公式
计算色度分量Cr的AC系数列的组数并记为ACCrCount,然后在原有色度分量Cr的AC系数列的末尾填充(ACCrCount*m
i-ACSize)个0。
(32)对目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果。
对目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果。
在本申请实施例中,该过程可包括:
S1:将目标色度分量Cr的AC系数以m
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cr的AC系数全为0时,则将当前的外层游程值加1;当目标分组中的色度分量Cr的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对目标分组中的色度分量Cr的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于目标分组中的色度分量Cr的AC系数,以预设数量(如三个)一组为单位遍历目标分组中的所有色度分量Cr的AC系数,对于当前分组,按如下方式进行处理,得到目标分组的内层游程预编码结果:
当分组中的预设数量个色度分量Cr的AC系数不全为0时,对当前的内层游程值进行编码以及对分组中的预设数量个色度分量Cr的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当分组中的预设数量个色度分量Cr的AC系数为0时,则将当前的内层游程值加1。
在以上的基础上,还可根据不同第二参数对应的编码结果,从第二集合中确定目标第二参数,并将目标第二参数对应的色度分量Cr的编码结果,作为色度分量Cr的预编码结果。
在本申请实施例中,可采用RDO选择目标编码模式,即获得目标第二参数,并将目标第二参数对应的编码码流作为色度分量Cr的最短编码码流。
也即,在此可比较在不同第二参数下获得的编码码流的大小,从中选择码流最小的编 码码流所对应的第二参数作为目标第二参数。
(4)将亮度分量预编码结果、色度分量Cb的预编码结果以及色度分量Cr的预编码结果相加,得到AC系数的预编码结果。
步骤1023、根据第一预编码结果和第二预编码结果,从编码方式中确定目标编码方式。
由于变换系数编码是无损编码,因此,在此步骤中,可通过RDO方法选择目标编码模式可简化为比较两种模式下的预编码码流大小。因此,可获得第一预编码结果的码流大小以及第二预编码结果的码流大小。当第一预编码结果的码流大小小于第二预编码结果的码流大小时,将第一预编码结果对应的第一编码方式作为目标编码方式;当第一预编码结果的码流大小大于第二预编码结果的码流大小时,将第二预编码结果对应的第二编码方式作为目标编码方式。
在本申请实施例中,设R
1为第一变换系数的第一编码方式获得的码流长度,R
2为第二变换系数的第二编码模式获得的码流长度并使用1bit来编码模式选择索引。当R
1<R
2时,采用第一编码方式进行变换系数编码,编码模式索引为0,否则采用一编码模式进行编码,编码模式索引为1。
步骤103、利用目标编码方式对待编码点云帧进行熵编码。
在此步骤中,对DC系数和AC系数进行单层游程编码;或者,对DC系数采用单层游程编码方法进行编码,对AC系数采用混合游程编码方法进行编码,其中,在进行混合游程编码时,对色度分量Cb的AC系数和色度分量Cr的AC系数进行编码所采用的第一参数和第二参数分别为预编码时确定的目标第一参数以及目标第二参数,同时,对目标编码模式的索引、DC系数或AC系数的个数进行编码。当采用混合游程编码时,还可对目标第一参数的索引以及目标第二参数的索引进行编码。
在本申请实施例中,若第一编码方式为目标编码模式,采用单层游程编码方法(预设数量个(如三个)系数一组)对所有变换系数列(包括DC系数和AC系数)进行编码,最终得到属性编码码流。若第二编码模式为目标编码模式,则对所有DC系数采用单层游程方法(预设数量个(如三个)系数一组)进行编码,再对重排序后的三种颜色分量的AC系数进行混合游程编码,具体为:对亮度分量的AC系数采用预设数量个(如三个)一组的单层游程方法进行编码、对两个色度分量(Cb和Cr)的AC变换系数分别采用双层游程方法进行编码,其中,第一参数和第二参数分别采用前述对色度分量Cr的AC系数以及色度分量Cb的AC系数进行预编码的过程中,通过RDO确定的目标第一参数和目标第二参数。除此之外,还需额外编码编码模式的索引、目标第一参数和目标第二参数的索引以及DC系数(或AC系数)的个数,最终得到属性编码码流。
在以上的实施例中,预设数量和目标数值均以取值为3为例。在实际应用中,预设数量和目标数值还可采用其他大于0的整数,例如4等,只要保证二者相等即可。
在本申请实施例中,对变换系数的DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列,因此,利用本申请实施例的方案,可将更多的变换零系数排列在一起,从而可提高游程编码的效率,并提高点云压缩性能。
参见图2,本申请实施例提供了一种基于RDO的变换系数的点云熵编码方法。如图2所示,方法可包括如下步骤:
步骤201,对希尔伯特重排序后的点云帧进行编码块划分,包括:
对几何重构后的点云数据按照希尔伯特码由大到小的顺序进行重排序,然后根据希尔 伯特码对点云进行自适应划分得到待编码点云子块。
步骤202,对当前待编码点云子块进行预测、变换和量化得到变换系数块,包括:
对划分得到的待编码点云子块进行加权属性预测,并对预测残差进行变换和量化,得到待编码变换系数块。
步骤203,待遍历完整帧点云后得到所有的变换系数,对变换系数进行拆解以及重排得到两种排序下的变换系数,包括:
对整帧点云数据进行遍历划分,对所有待编码子块进行预测、变换和量化,最终得到所有的变换系数。对该变换系数列进行拆解后分为DC系数列和AC系数列,对其中的AC系数列进行重新排序得到相应的三段系数,分别为:亮度分量的AC系数列、色度分量Cb的AC系数列以及色度分量Cr的AC系数列,从而得到两种排序下的变换系数,分别对应了两种编码模式。两种排列方式中的DC系数都是颜色三通道混合排列;而AC系数排序的不同则具体表现为:第一种排列方式(对应于第一种编码模式)下的AC系数是颜色三通道混合排列,第二种排列方式(对应于第二种编码模式)下的AC系数被进一步拆分为了三个系数列,即不同颜色通道单独排成一个序列。
示例性的,四点变换总共会产生3个DC系数和9个AC系数。其中,3个DC系数分别为亮度分量、两个色度分量的DC系数,分别用DC_L,DC_Cb和DC_Cr来表示。9个AC系数分别为AC1_L,AC2_L,AC3_L,AC1_Cb,AC2_Cb,AC3_Cb,AC1_Cr,AC2_Cr,AC3_Cr,其中,ACi_L表示亮度分量的第i个AC系数,ACi_Cb表示色度分量Cb的第i个AC系数,ACi_Cr表示色度分量Cr的第i个AC系数,i=1,2,3。
示例性的,两种编码模式(第一种排列方式和第二种排列方式)下的DC系数均按照亮度分量、色度分量Cb和色度分量Cr的顺序进行排列,具体为:(DC_L,DC_Cb,DC_Cr)。
示例性的,第一种编码模式(第一种排列方式)下的AC系数按照亮度分量、色度分量Cb和色度分量Cr的混合顺序进行排列,具体为:(AC3_L,AC3_Cb,AC3_Cr)(AC2_L,AC2_Cb,AC2_Cr)(AC1_L,AC1_Cb,AC1_Cr)。
示例性的,第二种编码模式(第二种排列方式)下的三段AC系数排序具体为:(AC1_L,AC2_L,AC3_L)(AC1_Cb,AC2_Cb,AC3_Cb)(AC1_Cr,AC2_Cr,AC3_Cr)。
步骤204,对第一种排列方式下的所有AC变换系数列采用单层游程编码方法进行编码,包括:
以三个一组为单位对所有AC系数进行遍历,统计一组中三个AC系数(AC_L,AC_Cb,AC_Cr)全为0的游程数。若一组三个AC系数全为0,则将游程值加1;若一组三个AC系数不全为0,则首先对游程值进行编码,然后对该组三个AC系数进行联合编码,最后将游程值设置为0并重新开始计数,直到遍历完所有的AC系数。最终得到模式一下的预编码码流。
步骤205,对第二种排序下不同分量的AC变换系数采用混合游程编码方法进行编码。结合图3,该过程可包括如下步骤:
步骤2051,对亮度分量的AC系数采用单层游程方法进行编码,包括:
设亮度分量所有的AC系数个数为ACSize,当ACSize%3=0时,直接对该AC系数列进行三个一组的单层游程编码;当ACSize%3≠0时,首先要对AC系数列进行扩充,将其个数扩充为3的倍数,具体为:先根据公式
计算亮度分量AC系数列的 组数并记为ACLumaCount,然后在原有AC系数列的末尾填充(ACLumaCount*3-ACSize)个0,最后对填充后的AC系数列进行三个一组的单层游程编码。该编码方法包括:
以三个一组为单位对亮度分量的所有AC系数(或填充后的AC系数)进行遍历,统计一组中三个亮度分量的AC系数(ACi-1_L,ACi_L,ACi+1_L)全为0的游程数,其中,ACi_L表示亮度分量的第i个AC系数。若一组三个亮度分量的AC系数全为0,则将游程值加1;若一组三个亮度分量的AC系数不全为0,则首先对游程值进行编码,然后对该组三个亮度分量的AC系数进行联合编码,最后将游程值设置为0并重新开始计数,直到遍历完亮度分量的所有AC系数并得到亮度分量的编码码流。
步骤2052,对色度分量Cb的AC系数采用双层游程方法进行编码并使用RDO选择目标分组模式。其中,双层游程编码方法的流程框图如图4和图5所示,其中,图4为外层游程编码流程图,图5为内层游程编码流程图。具体为:
首先设置一系列第一集合,并记为groupCb=[s
1,s
2,…,s
n],其中,s
i为3的倍数。再根据第一集合s
i对色度分量Cb的AC系数进行扩充,具体为:设色度分量Cb所有的AC系数个数为ACSize。针对AC系数,设置一系列第一层游程分组数,初始化i=1。
当ACSize%s
i=0时,直接对该AC系数列进行双层游程编码。
当ACSize%s
i≠0时,计算色度分量CbAC系列的组数,并在原有色度分量CbAC系数列的末尾进行填充。具体为:首先要对AC系数列进行扩充,将其个数扩充为s
i的倍数,具体为:先根据公式
计算AC系数列的组数并记为ACCbCount,然后在原有AC系数列的末尾填充(ACCbCount*s
i-ACSize)个0,最后对填充后的AC系数列进行双层游程编码。该编码方法具体为:
首先进行外层游程编码,当ACSize%s
i=0时,判断一组中s
i个色度分量Cb的AC系数(AC1_Cb,…,ACi_Cb,…,ACs
i_Cb)全为0的游程数。具体为:以s
i个一组为单位对色度分量Cb的所有AC系数(或填充后的AC系数)进行遍历,统计一组中s
i个色度分量Cb的AC系数(AC1_Cb,…,ACi_Cb,…,ACs
i_Cb)全为0的游程数,其中,ACi_Cb表示色度分量Cb的第i个AC系数,i=1,…,s
i。若一组s
i个色度分量Cb的AC系数不为0,则将外层游程值加1,直到遍历完色度分量Cb的所有AC系数;若一组s
i个色度分量Cb的AC系数不全为0,则先对外层游程值进行编码,然后对该组s
i个色度分量Cb的AC系数进行内层游程编码,待内层游程编码结束后,将外层游程值设置为0并重新开始计数直到遍历完色度分量Cb的所有AC系数。
其中,内层游程编码是以三个一组为单位对s
i个色度分量Cb的AC系数进行遍历,统计一组中三个AC系数(ACi-1_Cb,ACi_Cb,ACi+1_Cb)全为0的游程数。若一组三个AC系数全为0,则将内层游程值加1;若一组三个AC系数不全为0,则首先对内层游程值进行编码,然后对该组三个AC系数进行联合编码,最后将内层游程值设置为0并重新开始计数。直到遍历完s
i个AC系数再继续进行外层的游程编码。最后,采用RDO选择目标编码模式,即从第一集合中获得目标第一参数,并得到相应色度分量Cb的最短编码码流。
步骤2053,对色度分量Cr的AC系数采用双层游程方法进行编码并使用RDO选择目标分组模式,包括:
对于色度分量Cr系数的处理采用和色度分量Cb系数相同的双层游程编码方法进行编 码。该方法的流程框图如图4和图5所示,其中,图4为外层游程编码的流程图,图5为内层游程编码的流程图。具体为:
首先设置一系列第二集合(也称为第一层游程分组数),并记为groupCr=[m
1,m
2,…,m
n],其中,m
i为3的倍数。再根据第二集合m
i对色度分量Cr的AC系数进行扩充,具体为:设色度分量Cr所有的AC系数个数为ACSize,当ACSize%m
i=0时,直接对该AC系数列进行双层游程编码;当ACSize%m
i≠0时,首先要对AC系数列进行扩充,将其个数扩充为m
i的倍数,具体为:先根据公式
计算AC系数列的组数并记为ACCrCount,然后在原有AC系数列的末尾填充(ACCrCount*m
i-ACSize)个0,最后对填充后的AC系数列进行双层游程编码。该编码方法具体为:
首先进行外层游程编码,以m
i个一组为单位对色度分量Cr的所有AC系数(或填充后的AC系数)进行遍历,统计一组中m
i个色度分量Cr的AC系数(AC1_Cr,…,ACi_Cr,…,ACm
i_Cr)全为0的游程数,其中,ACi_Cr表示色度分量Cr的第i个AC系数,i=1,…,m
i。若一组m
i个色度分量Cr的AC系数全为0,则将外层游程值加1;若一组m
i个色度分量Cr的AC系数不全为0,则先对外层游程值进行编码,然后对该组m
i个色度分量Cr的AC系数进行内层游程编码,待内层游程编码结束后,将外层游程值设置为0并重新开始计数直到遍历完色度分量Cr的所有AC系数。
其中,内层游程编码是以三个一组为单位对m
i个色度分量Cr的AC系数进行遍历,统计一组中三个AC系数(ACi-1_Cr,ACi_Cr,ACi+1_Cr)全为0的游程数。若一组三个AC系数全为0,则将内层游程值加1;若一组三个AC系数不全为0,则首先对内层游程值进行编码,然后对该组三个AC系数进行联合编码,最后将内层游程值设置为0并重新开始计数。直到遍历完m
i个AC系数再继续进行外层的游程编码。最后,采用RDO选择目标编码模式,即从第二集合中获得目标第二参数,并得到相应色度分量Cr的最短编码码流。
步骤2054,将不同颜色分量的三段码流加在一起得到模式二下的最终AC系数的预编码码流,包括:
将上述亮度分量以及两个色度分量(Cb和Cr)的AC编码码流相加得到模式二下的AC系数的最终AC系数的预编码码流。
在以上不同的编码模式中,DC系数均采用单层游程编码方式进行编码。
步骤206,通过RDO方法来选择目标编码模式,包括:
由于变换系数编码是无损编码,通过率失真优化(RDO)方法来选择目标编码模式可简化为比较两种模式下的预编码码流大小。设R
1为模式一下的码流长度,R
2为模式二下的码流长度并使用1bit来编码模式选择索引。当R
1<R
2时,采用模式一进行变换系数编码,编码模式索引为0,否则采用模式二进行编码,编码模式索引为1。
步骤207,采用目标编码模式进行熵编码并得到最终的点云属性编码码流,包括:
若模式一为目标编码模式,采用单层游程编码方法(三个系数一组)对所有变换系数列(包括DC系数和AC系数)进行编码,最终得到属性编码码流。
若模式二为目标编码模式,则对所有DC系数采用单层游程方法(三个系数一组)进行编码,再对重排序后的三种颜色分量的AC系数进行混合游程编码,具体为:对亮度分 量的AC系数采用三个一组的单层游程方法进行编码、对两个色度分量(Cb和Cr)的AC变换系数分别采用双层游程方法进行编码,其中,第一参数和第二参数分别采用RDO中的目标第一参数和目标第二参数。除此之外,还需额外编码目标第一参数的索引和目标第二参数的索引以及DC系数的个数,最终得到属性编码码流。
为了验证本申请实施例的性能,将该算法实现在最新点云编码标准平台参考软件PCRMv5.0上,并对标准通测序列进行测试,得到编码性能如表1、表2所示,其中负数采用本申请实施例的方法后表示节省码率的百分比,正数表示增加码率的百分比。
表1是在几何有限有损,属性有损(AVS C1_AI)条件下,本申请实施例的方法与AVS当下最新基础平台PCEMv5.0的基准结果的性能对比表,结果表明本申请实施例的属性亮度分量、色度分量Cb和色度分量Cr在率失真表现上分别平均提升了0.25%。
表2是在几何无损,属性有损(AVS C2_AI)条件下,本申请实施例与AVS当下最新基础平台PCEMv5.0的基准结果的性能对比表,结果表明本申请实施例的属性亮度分量、色度分量Cb和色度分量Cr在率失真表现上分别平均提升了3.1%、3.35%和3.35%。
表1
表2
综上,本申请实施例针对点云颜色属性,提出了一种基于RDO的变换系数点云熵编码方法,该方法对变换系数块进行直流分量(DC系数)和交流分量(AC系数)的拆解并对AC系数进行了重排序操作,该方法能将更多的变换零系数排列在一起从而提高游程编码的效率。另外,本申请实施例还针对有较多零系数的色度分量Cb和Cr提出了双层游程编码算法,最后还结合了RDO方法,有效地提高了最新点云编码标准的效率,有效提高了点云压缩性能。
参见图6,图6是本申请实施例提供的点云熵解码方法,包括:
步骤601、获取待解码码流。
步骤602、从待解码码流中获得目标编码模式的索引。
步骤603、根据目标编码模式的索引,利用对应的解码模式对待解码码流中的变换系 数进行解码。
其中,变换系数包括DC系数和AC系数。DC系数和交流AC系数中的至少部分系数按照颜色通道单独排列。
其中,变换系数被处理成具有两种不同的排列方式的第一变换系数和第二变换系数,在第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。
在本申请实施例中,在此步骤中,可包括如下过程:
(1)从待解码码流中获得目标编码模式的索引、DC系数或AC系数的个数。
(2)当目标编码模式的索引表示目标编码模式为第一编码方式时,分别结合DC系数的个数和AC系数的个数,对DC系数和AC系数分别利用单层游程解码方法进行解码。
在本申请实施例中,根据游程值的大小,可确定出有多少个为0的系数,进而,对其他非0的系数进行解码。
当目标编码模式的索引表示目标编码模式为第二编码方式时,结合DC系数的个数和AC系数的个数,利用单层游程解码方法对DC系数和亮度分量的AC系数进行解码,分别对色度分量Cb和色度分量Cr的目标第一参数的索引和目标第二参数的索引进行解码;根据获得的色度分量Cb的目标第一参数和色度分量Cr的目标第二参数以及DC系数或AC系数的个数,分别对色度分量Cb和色度分量Cr的AC系数进行双层游程解码。
其中,在第一编码方式中,对DC系数和AC系数进行单层游程编码;在第二编码方式中,对DC系数采用单层游程编码方法进行编码,对AC系数采用混合游程编码方法进行编码。
在以上解码的过程中,若解码得到DC系数的个数,则可利用点云帧中总的点数减去DC系数的个数得到AC系数的个数。同理,若解码得到AC系数的个数,则可利用点云帧中总的点数减去AC系数的个数得到DC系数的个数。
在本申请实施例中,由于在编码端对变换系数进行了拆解并利用不同的编码模式确定出目标编码模式,因此,可保证在目标编码模式下更高效的获得编码码流。相应的,在解码端,由于变换系数的拆解使得更多为0的系数排列在一起,因此,解码端可更高效的确定出为0的系数,可相应的提高解码端的解码效率。
在本申请实施例中,提供了一种基于RDO的变换系数熵编码方法。该方法主要包括:对希尔伯特重排序后的点云帧进行编码块划分;对当前编码块进行预测、变换和量化得到变换系数块;待遍历完整帧点云后得到所有的变换系数,对该系数列进行拆解以及重排得到两种排序下的变换系数,分别对应了两种编码模式。其中,对第一种亮度色度混合排序的所有AC变换系数列采用单层游程编码方法进行编码;对第二种排序下不同分量的AC变换系数则采用混合游程编码方法进行编码。该方法还包括:对亮度分量的AC变换系数采用单层游程方法进行编码;对两个色度分量的AC变换系数分别采用双层游程方法进行编码。最终通过率失真优化(RDO)方法来选择最佳编码模式;在选择模式一下采用单层游程编码方法对所有变换系数列(包括DC系数和AC系数)进行编码得到编码码流;在选择模式二下,除对上述的三种颜色分量的AC系数进行编码外,还需对所有DC系数采用单层游程方法进行编码,最终得到编码码流。本申请实施例针对点云颜色属性信息,对变换系数块进行直流分量(DC系数)和交流分量(AC系数)的拆解并对AC系数进行了重排序操作,该方法能将更多的变换零系数排列在一起从而提高游程编码的效率,有效提 高了点云压缩性能。
本申请实施例还提供了一种点云熵编码装置。如图7所示,点云熵编码装置700包括:
第一获取模块701,被配置为获取待编码点云帧的变换系数;第二获取模块702,被配置为根据所述变换系数,确定目标编码方式;第一编码模块703,被配置为利用所述目标编码方式对所述待编码点云帧进行熵编码;其中,所述变换系数包括DC系数和AC系数;所述DC系数和/或所述AC系数中的至少部分系数按照颜色通道单独排列。所述DC系数和/或所述AC系数中的至少部分系数按照颜色通道单独排列。
在本申请实施例中,所述第一获取模块701包括划分子模块(图中未示出)、第一获取子模块(图中未示出)和第二获取子模块(图中未示出);
划分子模块(图中未示出),被配置为对希尔伯特重排序后的待编码点云帧进行编码块划分,得到多个编码块;第一获取子模块,被配置为对所述多个编码块进行预测、变换和量化,得到变换系数块;第二获取子模块,被配置为根据所有编码块的变换系数块,得到所述待编码点云帧的变换系数。
在本申请实施例中,所述第二获取模块702包括第一子模块(图中未示出)、第二子模块(图中未示出)和第三子模块(图中未示出):
第一子模块(图中未示出),被配置为根据所述变换系数,得到第一变换系数和第二变换系数;其中,所述第一变换系数和所述第二变换系数为具有不同排列方式的所述变换系数;
第二子模块(图中未示出),被配置为利用不同的编码方式分别对所述第一变换系数和所述第二变换系数进行预编码,得到第一预编码结果和第二预编码结果;
第三子模块(图中未示出),被配置为根据所述第一预编码结果和所述第二预编码结果,从所述编码方式中确定目标编码方式;
其中,在所述第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在所述第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。
在本申请实施例中,所述第二子模块(图中未示出)包括第一编码子模块(图中未示出)和第二编码子模块(图中未示出);
第一编码子模块(图中未示出),被配置为对所述第一变换系数中的AC系数利用单层游程编码方法进行编码,得到第一预编码结果;
第二编码子模块(图中未示出),被配置为对所述第二变换系数中的AC系数利用混合游程编码方法进行编码,得到第二预编码结果。
在本申请实施例中,所述第一编码子模块(图中未示出),还被配置为对于所述AC系数,以预设数量一组为单位遍历所有AC系数,对于当前的目标分组,按如下方式进行处理:
当所述目标分组中的预设数量个AC系数不全为0时,对当前的游程值进行编码以及对所述目标分组中的预设数量个AC系数进行联合编码,将当前的游程值设置为0并重新开始计数;当所述目标分组中的预设数量个AC系数全为0时,则将当前的游程值加1。
在本申请实施例中,当所述AC系数按颜色通道单独排列时,所述第二获取模块702,还被配置为:
对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果;
对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码 结果;
对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预编码结果;
将所述亮度分量预编码结果、所述色度分量Cb的预编码结果以及所述色度分量Cr的预编码结果相加,得到AC系数的预编码结果。
在本申请实施例中,第二编码子模块(图中未示出)包括第一编码单元(图中未示出)、第二编码单元(图中未示出)、第三编码单元(图中未示出)和第一获取单元(图中未示出);
第一编码单元(图中未示出),被配置为对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果;
第二编码单元(图中未示出),被配置为对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码结果;
第三编码单元(图中未示出),被配置为对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预编码结果;
第一获取单元(图中未示出),被配置为将所述亮度分量预编码结果、所述色度分量Cb的预编码结果以及所述色度分量Cr的预编码结果相加,得到AC系数的预编码结果。
其中,所述第一编码单元,包括:
第一获取子单元(图中未示出),还被配置为根据所述亮度分量的AC系数,得到目标亮度分量的AC系数;
第一编码子单元(图中未示出),还被配置为对所述目标亮度分量的AC系数利用单层游程方法进行编码,得到亮度分量预编码结果。
其中,所述第一获取子单元(图中未示出),还被配置为当所述亮度分量的AC系数的个数是目标数值的倍数时,利用所述亮度分量的AC系数作为所述亮度分量的AC系数;当所述亮度分量的AC系数的个数不是目标数值的倍数时,对所述亮度分量的AC系数进行扩充,得到扩充后的亮度分量的AC系数,使得扩充后的亮度分量的AC系数的个数为目标数值的倍数,并将扩充后的亮度分量的AC系数作为所述目标亮度分量的AC系数。
所述第一编码子单元(图中未示出),还被配置为对于所述目标亮度分量的AC系数,以预设数量一组为单位遍历所有亮度分量的AC系数;对于当前的目标分组,按如下方式进行处理,得到亮度分量预编码结果:当所述目标分组中的预设数量个亮度分量的AC系数全为0时,则将当前的游程值加1;当所述目标分组中的预设数量个亮度分量的AC系数不全为0,对当前的游程值进行编码以及对所述目标分组中的预设数量个亮度分量的AC系数进行联合编码,将当前的游程值设置为0并重新开始计数。
其中,所述第二编码单元(图中未示出)包括第二获取子单元(图中未示出)和第二编码子单元(图中未示出):
第二获取子单元(图中未示出),被配置为根据所述色度分量Cb的AC系数,得到目标色度分量Cb的AC系数;
第二编码子单元(图中未示出),被配置为对所述目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果。
其中,所述第二获取子单元(图中未示出),还被配置为当色度分量Cb的AC系数的个数是s
i的倍数时,利用所述色度分量Cb的AC系数作为所述目标色度分量Cb的AC系 数;当色度分量Cb的AC系数的个数不是s
i的倍数时,对色度分量Cb的AC系数进行扩充,得到扩充后的色度分量Cb的AC系数,使得扩充后的色度分量Cb的AC系数的个数为s
i的倍数,并将扩充后的色度分量Cb的AC系数作为所述目标色度分量Cb的AC系数;其中,所述s
i表示第一参数,选自于第一集合[s
1,s
2,…,s
n],其中,所述s
i为目标数值的倍数,1≤i≤n。
所述第二编码子单元(图中未示出),还被配置为执行如下过程:
S1:将目标色度分量Cb的AC系数以s
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cb的AC系数全为0时,则将当前的外层游程值加1;当所述目标分组中的色度分量Cb的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对所述目标分组中的色度分量Cb的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于所述目标分组中的色度分量Cb的AC系数,以预设数量一组为单位遍历所述目标分组中的所有色度分量Cb的AC系数,对于当前分组,按如下方式进行处理,得到所述目标分组的内层游程预编码结果:
当所述分组中的预设数量个色度分量Cb的AC系数不全为0时,对当前的内层游程值进行编码以及对所述分组中的预设数量个色度分量Cb的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当所述分组中的预设数量个色度分量Cb的AC系数为0时,则将当前的内层游程值加1。
在本申请实施例中,所述第二编码子单元(图中未示出),还被配置为执行如下过程:
S2:根据不同第一参数对应的编码结果,从所述第一集合中确定目标第一参数,并将所述目标第一参数对应的色度分量Cb的编码结果,作为所述色度分量Cb的预编码结果。
在本申请实施例中,所述第三编码单元(图中未示出)包括第三获取子单元(图中未示出)和第三编码子单元(图中未示出):
第三获取子单元(图中未示出),被配置为根据所述色度分量Cr的AC系数,得到目标色度分量Cr的AC系数;
第三编码子单元(图中未示出),被配置为对所述目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果。
其中,所述第三获取子单元(图中未示出),还被配置为当色度分量Cr的AC系数的个数是m
i的倍数时,利用所述色度分量Cr的AC系数作为所述目标色度分量Cr的AC系数;当色度分量Cr的AC系数的个数不是s
i的倍数时,对色度分量Cr的AC系数进行扩充,得到扩充后的色度分量Cr的AC系数,使得扩充后的色度分量Cr的AC系数的个数为m
i的倍数,并将扩充后的色度分量Cr的AC系数作为所述目标色度分量Cr的AC系数;其中,所述m
i表示第二参数,选自于第二集合[m
1,,
2,…,m
n],其中,所述m
i为目标数值的倍数,1≤i≤n。
其中,所述第三编码子单元(图中未示出),还被配置为执行如下过程:
S1:将目标色度分量Cr的AC系数以m
i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cr的AC系数全为0时,则将当前的外层游程值加1;当所述目标分组中的色度分量Cr的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对所述目标分组中的色度分量Cr的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:
对于所述目标分组中的色度分量Cr的AC系数,以预设数量一组为单位遍历所述目标分组中的所有色度分量Cr的AC系数,对于当前分组,按如下方式进行处理,得到所述目标分组的内层游程预编码结果:
当所述分组中的预设数量个色度分量Cr的AC系数不全为0时,对当前的内层游程值进行编码以及对所述分组中的预设数量个色度分量Cr的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当所述分组中的预设数量个色度分量Cr的AC系数为0时,则将当前的内层游程值加1。
在本申请实施例中,所述第三编码子单元(图中未示出),还被配置为执行如下过程:
S2:根据不同第二参数对应的编码结果,从所述第二集合中确定目标第二参数,并将所述目标第二参数对应的色度分量Cr的编码结果,作为所述色度分量Cr的预编码结果。
在本申请实施例中,所述第三子模块(图中未示出)包括第二获取单元(图中未示出)和第三获取单元(图中未示出):
第二获取单元(图中未示出),被配置为获得所述第一预编码结果的码流大小以及所述第二预编码结果的码流大小;
第三获取单元(图中未示出),被配置为当所述第一预编码结果的码流大小小于所述第二预编码结果的码流大小时,将所述第一预编码结果对应的第一编码方式作为所述目标编码方式;当所述第一预编码结果的码流大小大于所述第二预编码结果的码流大小时,将所述第二预编码结果对应的第二编码方式作为所述目标编码方式。
其中,所述第一编码模块703还被配置为:
对DC系数和AC系数进行单层游程编码;或者,对DC系数采用单层游程编码方法进行编码,对AC系数采用混合游程编码方法进行编码,其中,在进行混合游程编码时,对色度分量Cb的AC系数和色度分量Cr的AC系数进行编码所采用的第一参数和第二参数分别为预编码时确定的目标第一参数和目标第二参数;
对所述目标编码模式的索引、DC系数或AC系数的个数进行编码。
其中,所述第一编码模块703还被配置为:
对所述目标第一参数的索引以及目标第二参数的索引进行编码。
本申请实施例提供的装置,可以执行上述方法实施例,其实现原理和技术效果类似,本实施例此处不再赘述。
本申请实施例还提供了一种点云熵解码装置。如图8所示,点云熵解码装置800包括:
第三获取模块801,被配置为获取待解码码流;
第四获取模块802,被配置为从所述待解码码流中获得目标编码模式的索引;
第二解码模块803,被配置为根据所述目标编码模式的索引,利用对应的解码模式对所述待解码码流中的变换系数进行解码;
其中,所述变换系数包括DC系数和AC系数,所述DC系数和交流AC系数中的至少部分系数按照颜色通道单独排列。
其中,所述变换系数被处理成具有两种不同的排列方式的第一变换系数和第二变换系数,在所述第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在所述第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。
其中,所述第二解码模块803包括获取子模块(图中未示出)和解码子模块(图中未示出):
获取子模块(图中未示出),被配置为从所述待解码码流中获得目标编码模式的索引、DC系数或AC系数的个数;
解码子模块(图中未示出),被配置为当所述目标编码模式的索引表示目标编码模式为第一编码方式时,分别结合DC系数的个数和AC系数的个数,对所述DC系数和所述AC系数利用单层游程解码方法进行解码;
当所述目标编码模式的索引表示目标编码模式为第二编码方式时,结合所述DC系数的个数和AC系数的个数,利用单层游程解码方法对所述DC系数和亮度分量的AC系数进行解码,分别对色度分量Cb和色度分量Cr的目标第一参数的索引和目标第二参数的索引进行解码;根据获得的色度分量Cb的目标第一参数和色度分量Cr的目标第二参数以及所述DC系数或AC系数的个数,分别对色度分量Cb和色度分量Cr的AC系数进行双层游程解码;
其中,在所述第一编码方式中,对DC系数和AC系数进行单层游程编码;在所述第二编码方式中,对DC系数采用单层游程编码方法进行编码,对AC系数采用混合游程编码方法进行编码。
本申请实施例提供的装置,可以执行上述方法实施例,其实现原理和技术效果类似,本实施例此处不再赘述。
本申请实施例还提供一种电子设备,所述电子设备包括点云熵编码设备1000以及点云熵解码设备2000,其中:
如图9所示,所述点云熵编码设备1000包括:第一存储器1001、第一处理器1002及存储在所述第一存储器1001上并可在所述第一处理器上运行的程序;其中,所述第一处理器,被配置为读取存储器中的程序实现如前所述的点云熵编码方法中的步骤。
如图10所示,所述点云熵编码设备2000包括:第二存储器2001、第二处理器2002及存储在所述第二存储器2001上并可在所述第二处理器上运行的程序;其中,所述第二处理器,被配置为读取存储器中的程序实现如前所述的点云熵解码方法中的步骤。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有程序,该程序被处理器执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的可读存储介质,可以是处理器能够存取的任何可用 介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NAND FLASH)、固态硬盘(SSD))等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。根据这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁盘、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
本申请实施例公开了一种点云熵编码方法、解码方法、装置、设备及计算机可读存储介质,包括:首先获取待编码点云帧的变换系数;然后,根据变换系数,确定目标编码方式;最后,利用目标编码方式对待编码点云帧进行熵编码。其中,变换系数包括直流DC系数和交流AC系数;DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列。由于对变换系数的DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列,因此,利用本申请实施例的方案,可将更多的变换零系数排列在一起,从而可提高游程编码的效率,并提高点云压缩性能。
Claims (27)
- 一种点云熵编码方法,包括:获取待编码点云帧的变换系数;根据所述变换系数,确定目标编码方式;利用所述目标编码方式对所述待编码点云帧进行熵编码;其中,所述变换系数包括直流DC系数和交流AC系数;所述DC系数和/或所述AC系数中的至少部分系数按照颜色通道单独排列。
- 根据权利要求1所述的方法,其中,所述根据所述变换系数,确定目标编码方式,包括:根据所述变换系数,得到第一变换系数和第二变换系数;其中,所述第一变换系数和所述第二变换系数为具有不同排列方式的所述变换系数;利用不同的编码方式分别对所述第一变换系数和所述第二变换系数进行预编码,得到第一预编码结果和第二预编码结果;根据所述第一预编码结果和所述第二预编码结果,从所述编码方式中确定目标编码方式;其中,在所述第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在所述第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。
- 根据权利要求1或2所述的方法,其中,所述获取待编码点云帧的变换系数,包括:对希尔伯特重排序后的待编码点云帧进行编码块划分,得到多个编码块;对所述多个编码块进行预测、变换和量化,得到变换系数块;根据所有编码块的变换系数块,得到所述待编码点云帧的变换系数。
- 根据权利要求2或3所述的方法,其中,所述利用不同的编码方式分别对所述第一变换系数和所述第二变换系数进行预编码,得到第一预编码结果和第二预编码结果,包括:对所述第一变换系数中的AC系数利用单层游程编码方法进行编码,得到第一预编码结果;对所述第二变换系数中的AC系数利用混合游程编码方法进行编码,得到第二预编码结果。
- 根据权利要求4所述的方法,其中,所述对所述第一变换系数中的AC系数利用单层游程编码方法进行编码,包括:对于所述AC系数,以预设数量一组为单位遍历所有AC系数;对于当前的目标分组,按如下方式进行处理:当所述目标分组中的预设数量个AC系数全为0时,则将当前的游程值加1;当所述目标分组中的预设数量个AC系数不全为0时,对当前的游程值进行编码以及对所述目标分组中的预设数量个AC系数进行联合编码,将当前的游程值设置为0并重新开始计数。
- 根据权利要求1或2所述的方法,其中,当所述AC系数按颜色通道单独排列时,对所述AC系数利用混合游程编码方法进行预编码,包括:对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果;对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码结果;对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预编码结果;将所述亮度分量预编码结果、所述色度分量Cb的预编码结果以及所述色度分量Cr的预编码结果相加,得到AC系数的预编码结果。
- 根据权利要求6所述的方法,其中,所述对亮度分量的AC系数利用单层游程方法进行预编码,得到亮度分量预编码结果,包括:根据所述亮度分量的AC系数,得到目标亮度分量的AC系数;对所述目标亮度分量的AC系数利用单层游程方法进行编码,得到亮度分量预编码结果。
- 根据权利要求7所述的方法,其中,所述根据所述亮度分量的AC系数,得到目标亮度分量的AC系数,包括:当所述亮度分量的AC系数的个数是目标数值的倍数时,利用所述亮度分量的AC系数作为所述亮度分量的AC系数;当所述亮度分量的AC系数的个数不是目标数值的倍数时,对所述亮度分量的AC系数进行扩充,得到扩充后的亮度分量的AC系数,使得扩充后的亮度分量的AC系数的个数为目标数值的倍数,并将扩充后的亮度分量的AC系数作为所述目标亮度分量的AC系数。
- 根据权利要求7或8所述的方法,其中,所述对所述目标亮度分量的AC系数利用单层游程方法进行编码,得到亮度分量预编码结果,包括:对于所述目标亮度分量的AC系数,以预设数量一组为单位遍历所有亮度分量的AC系数;对于当前的目标分组,按如下方式进行处理,得到亮度分量预编码结果:当所述目标分组中的预设数量个亮度分量的AC系数全为0时,则将当前的游程值加1;当所述目标分组中的预设数量个亮度分量的AC系数不全为0,对当前的游程值进行编码以及对所述目标分组中的预设数量个亮度分量的AC系数进行联合编码,将当前的游程值设置为0并重新开始计数。
- 根据权利要求6至9任一项所述的方法,其中,所述对色度分量Cb的AC系数利用双层游程方法进行预编码,得到色度分量Cb的预编码结果,包括:根据所述色度分量Cb的AC系数,得到目标色度分量Cb的AC系数;对所述目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果。
- 根据权利要求10所述的方法,其中,所述根据所述色度分量Cb的AC系数,得到目标色度分量Cb的AC系数,包括:当色度分量Cb的AC系数的个数是s i的倍数时,利用所述色度分量Cb的AC系数作为所述目标色度分量Cb的AC系数;当色度分量Cb的AC系数的个数不是s i的倍数时,对色度分量Cb的AC系数进行扩充,得到扩充后的色度分量Cb的AC系数,使得扩充后的色度分量Cb的AC系数的个数为s i的倍数,并将扩充后的色度分量Cb的AC系数作为所述目标色度分量Cb的AC系数;其中,所述s i表示第一参数,选自于第一集合[s 1,s 2,…,s n],其中,所述s i为目标数值的倍数,1≤i≤n。
- 根据权利要求11所述的方法,其中,所述对所述目标色度分量Cb的AC系数利用双层游程方法进行编码,得到色度分量Cb的预编码结果,包括:将目标色度分量Cb的AC系数以s i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cb的AC系数全为0时,则将当前的外层游程值加1;当所述目标分组中的色度分量Cb的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对所述目标分组中的色度分量Cb的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:对于所述目标分组中的色度分量Cb的AC系数,以预设数量一组为单位遍历所述目标分组中的所有色度分量Cb的AC系数,对于当前分组,按如下方式进行处理,得到所述目标分组的内层游程预编码结果:当所述分组中的预设数量个色度分量Cb的AC系数不全为0时,对当前的内层游程值进行编码以及对所述分组中的预设数量个色度分量Cb的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当所述分组中的预设数量个色度分量Cb的AC系数为0时,则将当前的内层游程值加1。
- 根据权利要求11或12所述的方法,其中,所述方法还包括:根据不同第一参数对应的编码结果,从所述第一集合中确定目标第一参数,并将所述目标第一参数对应的色度分量Cb的编码结果,作为所述色度分量Cb的预编码结果。
- 根据权利要求6或7所述的方法,其中,所述对色度分量Cr的AC系数利用双层游程方法进行预编码,得到色度分量Cr的预编码结果,包括:根据所述色度分量Cr的AC系数,得到目标色度分量Cr的AC系数;对所述目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果。
- 根据权利要求14所述的方法,其中,所述根据所述色度分量Cr的AC系数,得到目标色度分量Cr的AC系数,包括:当色度分量Cr的AC系数的个数是m i的倍数时,利用所述色度分量Cr的AC系数作为所述目标色度分量Cr的AC系数;当色度分量Cr的AC系数的个数不是s i的倍数时,对色度分量Cr的AC系数进行扩充,得到扩充后的色度分量Cr的AC系数,使得扩充后的色度分量Cr的AC系数的个数为m i的倍数,并将扩充后的色度分量Cr的AC系数作为所述目标色度分量Cr的AC系数;其中,所述m i表示第二参数,选自于第二集合[m 1,m 2,…,m n],其中,所述m i为目标数值的倍数,1≤i≤n。
- 根据权利要求15所述的方法,其中,所述对所述目标色度分量Cr的AC系数利用双层游程方法进行编码,得到色度分量Cr的预编码结果,包括:将目标色度分量Cr的AC系数以m i个一组为单位进行遍历,对于每个分组,当目标分组中的色度分量Cr的AC系数全为0时,则将当前的外层游程值加1;当所述目标分组中的色度分量Cr的AC系数不全为0时,对当前的外层游程值进行编码,并按如下方式对所述目标分组中的色度分量Cr的AC系数进行内层游程编码;当内层游程编码结束后,将当前的外层游程值设置为0并重新开始计数:对于所述目标分组中的色度分量Cr的AC系数,以预设数量一组为单位遍历所述目标分组中的所有色度分量Cr的AC系数,对于当前分组,按如下方式进行处理,得到所述目标分组的内层游程预编码结果:当所述分组中的预设数量个色度分量Cr的AC系数不全为0时,对当前的内层游程值进行编码以及对所述分组中的预设数量个色度分量Cr的AC系数进行联合编码,将当前的内层游程值设置为0并重新开始计数;当所述分组中的预设数量个色度分量Cr的AC系数为0时,则将当前的内层游程值加1。
- 根据权利要求16所述的方法,其中,所述方法还包括:根据不同第二参数对应的编码结果,从所述第二集合中确定目标第二参数,并将所述目标第二参数对应的色度分量Cr的编码结果,作为所述色度分量Cr的预编码结果。
- 根据权利要求2所述的方法,其中,所述根据所述第一预编码结果和所述第二预编码结果,从所述编码方式中确定目标编码方式,包括:获得所述第一预编码结果的码流大小以及所述第二预编码结果的码流大小;当所述第一预编码结果的码流大小小于所述第二预编码结果的码流大小时,将所述第一预编码结果对应的第一编码方式作为所述目标编码方式;当所述第一预编码结果的码流大小大于所述第二预编码结果的码流大小时,将所述第二预编码结果对应的第二编码方式作为所述目标编码方式。
- 根据权利要求1或2所述的方法,其中,所述利用所述目标编码方式对所述待编码点云帧进行熵编码,包括:对DC系数和AC系数进行单层游程编码;或者,对DC系数采用单层游程编码方法进行编码,对AC系数采用混合游程编码方法进行编码,其中,在进行混合游程编码时,对色度分量Cb的AC系数和色度分量Cr的AC系数进行编码所采用的第一参数和第二参数分别为预编码时确定的目标第一参数以及目标第二参数;对目标编码模式的索引、DC系数或AC系数的个数进行编码。
- 根据权利要求19所述的方法,其中,所述方法还包括:对所述目标第一参数的索引以及目标第二参数的索引进行编码。
- 一种点云熵解码方法,包括:获取待解码码流;从所述待解码码流中获得目标编码模式的索引;根据所述目标编码模式的索引,利用对应的解码模式对所述待解码码流中的变换系数进行解码;其中,所述变换系数包括DC系数和AC系数;所述DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列。
- 根据权利要求21所述的方法,其中,所述变换系数被处理成具有两种不同的排列方式的第一变换系数和第二变换系数,在所述第一变换系数中,DC系数和AC系数按照颜色三通道混合排列;在所述第二变换系数中,DC系数按照颜色三通道混合排列,AC系数按颜色通道单独排列。
- 根据权利要求22所述的方法,其中,所述根据所述目标编码模式的索引,利用对应的解码模式对所述待解码码流中的变换系数进行解码,包括:从所述待解码码流中获得目标编码模式的索引、DC系数或AC系数的个数;当所述目标编码模式的索引表示目标编码模式为第一编码方式时,分别结合DC系数的个数和AC系数的个数,对所述DC系数和所述AC系数利用单层游程解码方法进行解码;当所述目标编码模式的索引表示目标编码模式为第二编码方式时,结合所述DC系数的个数和AC系数的个数,利用单层游程解码方法对所述DC系数和亮度分量的AC系数进行解码,分别对色度分量Cb和色度分量Cr的目标第一参数的索引和目标第二参数的索引进行解码;根据获得的色度分量Cb的目标第一参数和色度分量Cr的目标第二参数以及所述DC系数或AC系数的个数,分别对色度分量Cb和色度分量Cr的AC系数进行双层游程解码。
- 一种点云熵编码装置,包括:第一获取模块,被配置为获取待编码点云帧的变换系数;第二获取模块,被配置为根据所述变换系数,确定目标编码方式;第一编码模块,被配置为利用所述目标编码方式对所述待编码点云帧进行熵编码;其中,所述变换系数包括DC系数和AC系数;所述DC系数和/或所述AC系数中的至少部分系数按照颜色通道单独排列。
- 一种点云熵解码装置,包括:第三获取模块,被配置为获取待解码码流;第四获取模块,被配置为从所述待解码码流中获得目标编码模式的索引;第二解码模块,被配置为根据所述目标编码模式的索引,利用对应的解码模式对所述待解码码流中的变换系数进行解码;其中,所述变换系数包括DC系数和AC系数;所述DC系数和/或AC系数中的至少部分系数按照颜色通道单独排列。
- 一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;所述处理器,被配置为读取存储器中的程序实现如权利要求1至20中任一项所述的点云熵编码方法中的步骤;或者实现如权利要求21至23中任一项所述的点云熵解码方法中的步骤。
- 一种计算机可读存储介质,被配置为存储程序,所述程序被处理器执行时实现如权利要求1至20中任一项所述的点云熵编码方法中的步骤;或者实现如权利要求21至23中任一项所述的点云熵解码方法中的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111467830.1 | 2021-12-03 | ||
CN202111467830.1A CN116320453A (zh) | 2021-12-03 | 2021-12-03 | 点云熵编码方法、解码方法、装置、设备及可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023098917A1 true WO2023098917A1 (zh) | 2023-06-08 |
Family
ID=86611575
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/136534 WO2023098917A1 (zh) | 2021-12-03 | 2022-12-05 | 点云熵编码方法、解码方法、装置、设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116320453A (zh) |
WO (1) | WO2023098917A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118433395B (zh) * | 2024-07-02 | 2024-09-03 | 北京数原数字化城市研究中心 | 一种编码方法、装置及电子设备 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112565734A (zh) * | 2020-12-03 | 2021-03-26 | 西安电子科技大学 | 基于混合编码的点云属性编解码方法及装置 |
CN113489980A (zh) * | 2021-08-13 | 2021-10-08 | 北京大学深圳研究生院 | 一种点云属性变换系数的熵编码和熵解码的方法及设备 |
US20210319593A1 (en) * | 2020-04-14 | 2021-10-14 | Apple Inc. | Significant coefficient flag encoding for point cloud attribute compression |
-
2021
- 2021-12-03 CN CN202111467830.1A patent/CN116320453A/zh active Pending
-
2022
- 2022-12-05 WO PCT/CN2022/136534 patent/WO2023098917A1/zh unknown
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210319593A1 (en) * | 2020-04-14 | 2021-10-14 | Apple Inc. | Significant coefficient flag encoding for point cloud attribute compression |
CN112565734A (zh) * | 2020-12-03 | 2021-03-26 | 西安电子科技大学 | 基于混合编码的点云属性编解码方法及装置 |
CN113489980A (zh) * | 2021-08-13 | 2021-10-08 | 北京大学深圳研究生院 | 一种点云属性变换系数的熵编码和熵解码的方法及设备 |
Also Published As
Publication number | Publication date |
---|---|
CN116320453A (zh) | 2023-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111937400B (zh) | 通过使用约化变换来处理视频信号的方法和装置 | |
US11750809B2 (en) | Encoding and decoding methods and apparatuses with multiple image block division manners | |
US11277630B2 (en) | Method of coding and decoding images, coding and decoding device and computer programs corresponding thereto | |
CN111226442B (zh) | 配置用于视频压缩的变换的方法及计算机可读存储介质 | |
US20150296217A1 (en) | Apparatus and method for encoding/decoding images | |
JP5731506B2 (ja) | 適応的なループフィルタリングを利用したビデオ符号化方法及び装置、ビデオ復号化方法及び装置 | |
CN106170093B (zh) | 一种帧内预测性能提升编码方法 | |
TW201836355A (zh) | 視訊解碼方法 | |
CN111316642B (zh) | 信令图像编码和解码划分信息的方法和装置 | |
CN110944179B (zh) | 一种视频数据解码方法及装置 | |
CN101212685A (zh) | 对图像进行编码/解码的方法和设备 | |
WO2023098917A1 (zh) | 点云熵编码方法、解码方法、装置、设备及计算机可读存储介质 | |
CN111279698B (zh) | 图像编码的非对称划分装置和方法 | |
WO2022166370A1 (zh) | 视频编解码方法、装置、计算机程序产品、计算机可读存储介质及电子设备 | |
KR20110070823A (ko) | 비디오 부호화/복호화 방법 및 장치 | |
CN117441335A (zh) | 基于多个帧内预测执行图像预测的图像编码/解码方法和装置以及发送比特流的方法 | |
CN109218726B (zh) | 激光诱导击穿光谱图像有损无损联合压缩方法 | |
TWI851355B (zh) | 一種編解碼方法、裝置及其設備 | |
WO2023083239A1 (zh) | 图像解码方法及装置、图像编码方法及装置 | |
JP7253053B2 (ja) | ピクチャのためのブロックベースの空間活性測度 | |
US11706410B2 (en) | Methods and systems for combined lossless and lossy coding | |
TWI832661B (zh) | 圖像編解碼的方法、裝置及存儲介質 | |
KR101583870B1 (ko) | 이미지 인코딩 시스템, 디코딩 시스템 및 그 제공방법 | |
WO2023185806A1 (zh) | 一种图像编解码方法、装置、电子设备及存储介质 | |
EP4175296A1 (en) | Method for image processing and apparatus for implementing the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22900720 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |