WO2024082151A1 - Encoding and decoding methods, encoder, decoder, and storage medium - Google Patents

Encoding and decoding methods, encoder, decoder, and storage medium Download PDF

Info

Publication number
WO2024082151A1
WO2024082151A1 PCT/CN2022/126026 CN2022126026W WO2024082151A1 WO 2024082151 A1 WO2024082151 A1 WO 2024082151A1 CN 2022126026 W CN2022126026 W CN 2022126026W WO 2024082151 A1 WO2024082151 A1 WO 2024082151A1
Authority
WO
WIPO (PCT)
Prior art keywords
shift
grid
current frame
coefficients
scanning order
Prior art date
Application number
PCT/CN2022/126026
Other languages
French (fr)
Chinese (zh)
Inventor
马展
王锡宁
魏红莲
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/126026 priority Critical patent/WO2024082151A1/en
Publication of WO2024082151A1 publication Critical patent/WO2024082151A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • the embodiments of the present application relate to the technical field of grid compression coding, and in particular to a coding and decoding method, an encoder, a decoder, and a storage medium.
  • the encoding and decoding of the geometric information of the mesh mainly includes the organization and compression of the shift coefficients corresponding to the original mesh.
  • the embodiments of the present application provide a coding and decoding method, an encoder, a decoder and a storage medium, which can use a better organization strategy of shift coefficients, thereby reducing the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
  • an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
  • a reconstructed original grid of the current frame is determined according to the multiple shift coefficients and the simplified grid of the current frame.
  • an embodiment of the present application provides a decoding method, which is applied to a decoder, wherein the decoder includes a video decoder and a grid decoder, and the method includes:
  • the grid decoder is used to decode the code stream and determine the simplified grid of the current frame
  • the video decoder is used to execute the decoding method as described in the first aspect.
  • an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
  • the plurality of shifted coefficients are sequentially traversed in a second scanning order to determine at least one coefficient block;
  • the shift coefficient information is written into a bit stream.
  • an embodiment of the present application provides an encoding method, which is applied to an encoder, wherein the encoder includes a video encoder, a grid encoder, and a preprocessor, and the method includes:
  • the preprocessor is used to generate a simplified grid and a shift vector according to the original grid of the current frame
  • the grid encoder is used to encode the simplified grid to generate a code stream of the simplified grid
  • the video encoder is used to execute the encoding method as described in the second aspect.
  • an embodiment of the present application provides an encoder, the encoder comprising: a first determining unit, an encoding unit; wherein,
  • the first determination unit is configured to determine a plurality of corresponding shift coefficients according to a plurality of shift vectors of the current frame; sequentially traverse the plurality of shift coefficients in accordance with a second scanning order to determine at least one coefficient block; and determine the shift coefficient information of the current frame in accordance with the first scanning order based on the at least one coefficient block;
  • the encoding unit is configured to write the shift coefficient information into a bit stream.
  • an embodiment of the present application provides an encoder, the encoder comprising: a first memory and a first processor; wherein,
  • the first memory is used to store a computer program that can be run on the first processor
  • the first processor is used to execute the method described in the third aspect and the fourth aspect when running the computer program.
  • an embodiment of the present application provides a decoder, the decoder comprising: a decoding unit, a second determining unit; wherein,
  • the decoding unit is configured to decode the code stream
  • the second determination unit is configured to determine the shift coefficient information of the current frame; determine at least one coefficient block from the shift coefficient information according to a first scanning order; based on the at least one coefficient block, determine multiple shift coefficients according to a second scanning order; and determine the reconstructed original grid of the current frame based on the multiple shift coefficients and the simplified grid of the current frame.
  • an embodiment of the present application provides a decoder, a second memory, and a second processor; wherein:
  • the second memory is used to store a computer program that can be run on the second processor
  • the second processor is used to execute the method described in the first aspect and the second aspect when running the computer program.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, implements the method described in the first aspect or the second aspect, or implements the method described in the third aspect or the fourth aspect.
  • the embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium.
  • the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the code stream.
  • the codec when compressing the geometric information of the grid, can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first and referenced when the low-frequency information with high complexity is subsequently processed.
  • a better organization strategy of the shift coefficients can be used to reduce the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
  • Figure 1 is a diagram of the overall framework of grid coding
  • Fig. 2 is a schematic diagram of grid preprocessing
  • FIG3 is a schematic diagram of intra-frame coding
  • FIG4 is a schematic diagram of inter-frame coding
  • FIG5 is a schematic diagram of intra-frame decoding
  • FIG6 is a schematic diagram of inter-frame decoding
  • FIG. 7 is a schematic diagram of a network architecture of a codec provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of a decoding method proposed in an embodiment of the present application.
  • FIG9 is a schematic diagram of shift coefficient information
  • FIG10 is a schematic diagram 1 of video filling
  • FIG11 is a second schematic diagram of video filling
  • FIG12 is a schematic diagram of frame filling 1
  • FIG13 is a second schematic diagram of frame padding
  • FIG14 is a schematic diagram of a raster scanning sequence
  • FIG15 is a schematic diagram of a first scanning sequence
  • FIG16 is a schematic diagram of a unit block
  • Figure 17 is a schematic diagram of a coefficient block
  • FIG18 is a second schematic diagram of a coefficient block
  • FIG19 is a schematic diagram of a zigzag scanning sequence
  • FIG20 is a schematic diagram of a second scanning sequence
  • FIG21 is a schematic diagram of shift coefficients
  • FIG 22 is a schematic diagram of tissue displacement coefficient 1
  • FIG. 23 is a second schematic diagram of tissue displacement coefficient
  • FIG. 24 is a third schematic diagram of tissue displacement coefficient
  • FIG25 is a schematic diagram of an encoding method proposed in an embodiment of the present application.
  • FIG26 is a schematic diagram of the structure of the encoder
  • FIG27 is a second schematic diagram of the structure of the encoder.
  • FIG28 is a schematic diagram of the structure of a decoder
  • FIG. 29 is a second schematic diagram of the composition structure of the decoder.
  • first ⁇ second ⁇ third involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that “first ⁇ second ⁇ third” can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
  • different data format bitstreams can be decoded and synthesized in the same video scene.
  • at least image format, point cloud format, and mesh format can be included.
  • real-time immersive video interaction services can be provided for multiple data formats (for example, mesh, point cloud, image, etc.) with different sources.
  • the data format-based method can allow independent processing at the bitstream level of the data format. That is, like tiles or slices in video encoding, different data formats in the scene can be encoded in an independent manner, so that independent encoding and decoding can be performed based on the data format.
  • 3D animation content is represented based on keyframes, that is, each frame is a static mesh. Static meshes at different times have the same topological structure and different geometric structures.
  • the amount of data of 3D dynamic meshes represented based on keyframes is extremely large, so how to effectively store, transmit and draw them has become a problem faced by the development of 3D dynamic meshes.
  • the spatial scalability of the mesh needs to be supported for different user terminals (computers, notebooks, portable devices, mobile phones); different network bandwidths (broadband, narrowband, wireless) need to support the quality scalability of the mesh. Therefore, 3D dynamic mesh compression is a very critical issue.
  • Current 3D dynamic mesh compression methods include space-time prediction methods, which improve compression efficiency by eliminating spatial and temporal correlations; principal component analysis (PCA)-based technology, which projects in the eigenvector space to concentrate energy; and wavelet-based methods, which support spatial scalability and quality scalability.
  • PCA principal component analysis
  • FIG1 is a diagram of the overall framework of mesh coding
  • FIG2 is a schematic diagram of mesh preprocessing.
  • preprocessing Pre-processing
  • Encoder Encoder
  • the original mesh Original Mesh
  • Decimated Mesh a simplified mesh
  • Base Mesh Base mesh
  • Subdivided Mesh a subdivided mesh
  • the simplified mesh and the displacement vector are input into the encoder to generate a bitstream.
  • the encoder can be divided into an intra-frame encoder and an inter-frame encoder according to the type of the frame it acts on, which are used to perform intra-frame encoding and inter-frame encoding respectively.
  • FIG3 is a schematic diagram of intra-frame coding.
  • a common static mesh encoder (Static Mesh Encoder) can be used to encode the simplified mesh to generate the corresponding bitstream (Compressed base mesh bitstream).
  • the displacement vector (Update Displacements) is updated with the reconstructed simplified mesh.
  • the updated displacement vector is subjected to wavelet transform (Wavelet Transform) to obtain the displacement coefficient. It is then packaged into images and videos (Image Packing, Video Packing) and encoded using High Efficiency Video Coding (H.265-HEVC) to generate a bitstream (Compressed displacements bitstream) of the displacement coefficient.
  • Wavelet Transform Wavelet transform
  • H.265-HEVC High Efficiency Video Coding
  • the feature map is first transformed (Texture Transfer) according to the difference between the reconstructed geometric information and the original geometric information, and then padded (Padding), packaged (Video Packing), and encoded using a video encoder to form an attribute bitstream (Compressed attribute bitstream).
  • Figure 4 is a schematic diagram of inter-frame coding. As shown in Figure 4, the inter-frame encoder and intra-frame encoder processes are roughly the same, but the inter-frame encoder does not directly encode the simplified grid, but encodes the motion vector between the simplified grid of the current frame and the simplified grid of the reference frame (Motion Encoder), and generates the corresponding motion vector bitstream (Compressed motion bitstream).
  • Motion Encoder Motion Encoder
  • the decoder can also be divided into an intra-frame decoder and an inter-frame decoder according to the type of the frame it acts on, which are used to perform intra-frame decoding and inter-frame decoding respectively.
  • FIG5 is a schematic diagram of intra-frame decoding.
  • a static mesh decoder (Static Mesh Decoder) can be used to decode the simplified mesh.
  • the video decoder (Video Decoder) is used to decode the shift coefficient video, and the shift coefficient is obtained through video unpacking (Video Unpacking) and inverse wavelet transform (Inverse Wavelet Transform).
  • the decoded mesh geometry information is obtained by decoding the simplified mesh and shift coefficient.
  • the decoding of the attribute graph is directly decoded by the video decoder.
  • FIG6 is a schematic diagram of inter-frame decoding. As shown in FIG6, for an inter-frame decoder, the process is basically the same as that of an intra-frame decoder, except that the simplified grid is not decoded directly, but the motion vector is decoded, and the simplified grid of the current frame is calculated by the simplified grid of the previous frame (reference frame).
  • the geometric information encoding process is divided into the following steps:
  • step 2 Subdivide the simplified mesh in step 1. For any two connected vertices in step 1, add a new point at the midpoint of the line segment connecting them, and repeat twice.
  • step 2 For each vertex in step 2, find the point in the original mesh that is closest to it and calculate the displacement vector between the two points.
  • step 5 Adjust the shift vector in step 3 according to the reconstructed simplified grid obtained in step 4.
  • step 6 Perform wavelet transform on the shift vector in step 5, and organize the shift vector after wavelet transform (hereinafter referred to as shift coefficient) into a video.
  • shift coefficient the shift vector after wavelet transform
  • the reference software when the reference software performs wavelet transform on the shift vector and organizes the shift coefficients obtained by the transform into a video, the shift coefficients are organized in order from low-frequency coefficients to high-frequency coefficients. Specifically, the reference software traverses the transformed shift vector in order from low frequency to high frequency, and organizes it into 16 ⁇ 16 square blocks in the order of Z-scan, and finally organizes the square blocks into video frames in the order of raster scan.
  • an embodiment of the present application provides a coding and decoding method.
  • the decoder decodes the bitstream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the bitstream.
  • the codec when compressing the geometric information of the grid, can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first and referenced when the low-frequency information with high complexity is subsequently processed.
  • a better organization strategy of the shift coefficients can be used to reduce the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
  • FIG. 7 is a schematic diagram of a network architecture of a codec provided by the embodiment of the present application.
  • the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01.
  • the electronic device can be various types of devices with codec functions, for example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., and the embodiment of the present application is not limited.
  • the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
  • FIG8 is a schematic diagram of the decoding method proposed in the embodiment of the present application.
  • the method for the decoder to perform decoding processing may include the following steps:
  • Step 101 Decode the code stream to determine the shift coefficient information of the current frame.
  • the decoder may first decode the code stream, so as to determine the shift coefficient information of the current frame.
  • the decoder may be a video decoder, or may be any decoding device including a video decoder and a grid decoder.
  • the code stream transmitted to the decoder may be a code stream of shift coefficients, or may be code stream data including a code stream of shift coefficients and a code stream of a simplified grid (or a code stream of motion vectors).
  • the current frame may be a current image frame or a current video frame, which is not specifically limited in the present application.
  • the shift coefficient information of the current frame may include at least one level of details (LOD) composed of at least one coefficient block.
  • LOD level of details
  • At least one level detail in the shift coefficient information may be arranged in order from low frequency to high frequency, wherein the level detail including high frequency information is located to the left and/or above the level detail including low frequency information.
  • FIG9 is a schematic diagram of the shift coefficient information.
  • LOD1 includes the lowest frequency information
  • LOD2 includes higher frequency information
  • LOD3 includes the highest frequency information.
  • LOD1 including the lowest frequency information is the most complex
  • LOD3 including the highest frequency information is the simplest
  • LOD3 including the highest frequency information is located on the upper left side of LOD1 including the lowest frequency information.
  • the shift coefficient information determined by the decoded code stream if the number of rows of the shift coefficient information is less than a preset height threshold, then it is possible to choose to perform video padding (Video Padding) on the shift coefficient information according to a preset value and a preset height threshold.
  • video padding Video Padding
  • the preset value can be an integer greater than 0, for example, the preset value is 512, and the preset height threshold can be the maximum height in the grid sequence, that is, the height (number of rows) corresponding to a frame with the largest number of displacement coefficients in the grid sequence.
  • the number of rows of the shift coefficient information of the current frame is less than the number of rows corresponding to the frame with the largest number of displacement coefficients in the grid sequence, that is, less than the preset height threshold, then you can choose to use the constant 512 for video padding, so that the height (number of rows) of each frame in the grid sequence can be the same, that is, the height of each frame in the grid sequence is guaranteed to be constant.
  • the width of the displacement coefficient video frame (or image frame) can be a fixed constant, and for a grid sequence, the number of displacement coefficients in each frame is not necessarily equal, so that the heights of the video frames (or image frames) formed by different frames are not necessarily equal. Therefore, it is necessary to fill the video frames (or image frames) with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant.
  • the first position may be a position above the last LOD in the shift coefficient information.
  • the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing video filling, it is possible to choose to perform filling processing above the last level detail including high frequency information.
  • Figure 10 is a schematic diagram of video filling.
  • common shift coefficient information is arranged in order from low frequency to high frequency, and the hierarchical details are arranged from the upper left to the lower right. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the bottom.
  • Figure 11 is a second schematic diagram of video filling.
  • the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged in sequence from the lower right to the upper left. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the top.
  • the shift coefficient information can be frame padded (Frame Padding) based on the second position according to a preset value.
  • the preset value may be an integer greater than 0, for example, the preset value is 512.
  • the constant 512 can be selected for frame padding, so that the shift coefficient information corresponding to each frame in the grid sequence is rectangular, that is, the rectangular shift coefficient information is ensured to be composed of at least one LOD.
  • the second position can be the upper left position of the last LOD in the shift coefficient information.
  • the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing frame filling, the upper left position of the last level detail including high frequency information can be selected for filling processing.
  • Figure 12 is a schematic diagram of frame filling.
  • common shift coefficient information arranges the hierarchical details from the upper left to the lower right in order from low frequency to high frequency. Then, when performing frame filling, the missing part in the lower right corner of the shift coefficient information of the current frame can be filled.
  • Figure 13 is a second schematic diagram of frame filling.
  • the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged in sequence from the lower right to the upper left. Then, when performing frame filling, the missing part in the upper left corner of the shift coefficient information of the current frame can be filled.
  • Step 102 Determine at least one coefficient block from the shifted coefficient information according to a first scanning order.
  • the decoder may further determine at least one coefficient block from the shift coefficient information according to the first scanning order.
  • the decoder can sequentially traverse the level details including the low-frequency information and the level details including the high-frequency information in the first scanning order.
  • the first scanning order may be the reverse scanning order of the raster scanning order.
  • Raster scanning means scanning from left to right and from top to bottom, first scanning one row and then moving to the starting position of the next row to continue scanning.
  • the common encoding and decoding process mainly uses the raster scanning order.
  • the raster scanning order can often be used to scan from the upper left to the lower right; and in the present application, the hierarchical details in the shift coefficient information are arranged from the lower right to the upper left in order from low frequency to high frequency. Accordingly, when performing a traversal scan, you can choose to scan from the lower right to the upper left in the opposite scanning order of the raster scanning order.
  • Figure 14 is a schematic diagram of the raster scanning order. As shown in Figure 14, if the level details are arranged from the upper left to the lower right in order from low frequency to high frequency, then LOD1, LOD2, and LOD3 can be traversed in sequence from the upper left to the lower right in accordance with the raster scanning order.
  • Figure 15 is a schematic diagram of the first scanning order. As shown in Figure 15, if the hierarchical details are arranged from the lower right to the upper left in order from low frequency to high frequency, then LOD1, LOD2, and LOD3 can be traversed in sequence from the lower right to the upper left according to the first scanning order.
  • each level of detail is composed of at least one coefficient block
  • at least one coefficient block can be determined after traversing all the level details in the shift coefficient information in the first scanning order.
  • the coefficient block may be a square block including at least one unit block; wherein each unit block may be composed of 2 ⁇ 2 shift coefficients.
  • Figure 16 is a schematic diagram of a unit block.
  • each unit block may include 4 shift coefficients, such as shift coefficients 1-4, wherein the 4 shift coefficients are arranged in 2 rows and 2 columns to form a square unit block.
  • the shift coefficients in the unit block may be arranged in order from low frequency to high frequency, wherein the high frequency shift coefficients are located to the left and/or above the low frequency shift coefficients.
  • shift coefficients 1-4 are arranged from low frequency to high frequency in sequence, so shift coefficient 1 is located in the lower right corner and shift coefficient 4 is located in the upper left corner.
  • the size of the coefficient block can be any integer multiple of the unit block, and the present application does not make any specific limitation.
  • Figure 17 is a schematic diagram 1 of a coefficient block
  • Figure 18 is a schematic diagram 2 of a coefficient block.
  • the size of the coefficient block can be 16 ⁇ 16, that is, composed of 4 unit blocks, or 32 ⁇ 32, that is, composed of 16 unit blocks.
  • Step 103 Determine a plurality of shift coefficients based on at least one coefficient block in a second scanning order.
  • the decoder may further determine a plurality of shift coefficients according to a second scanning order based on the at least one coefficient block.
  • the decoder may sequentially traverse the low-frequency shift coefficients and the high-frequency shift coefficients in the coefficient block according to the second scanning order.
  • the second scanning order may be the reverse scanning order of the zigzag scanning order.
  • the Z in the zigzag scanning (Z-Scan) is a figurative representation, and the zigzag scanning order ensures that different partitions can be addressed in the same traversal order, which is conducive to the recursive implementation in the program.
  • a Z-shaped scanning order is often used to scan from the upper left to the lower right; while in the present application, the shift coefficients of the unit blocks in the coefficient block are arranged in order from the lower right to the upper left in order from low frequency to high frequency. Accordingly, when performing a traversal scan, you can choose to scan from the lower right to the upper left in the opposite scanning order of the Z-shaped scanning order.
  • FIG. 19 is a schematic diagram of a zigzag scanning sequence.
  • the unit blocks composed of the shift coefficients are arranged in order from the upper left to the lower right in order from low frequency to high frequency, then each unit block and the shift coefficients in each unit block can be traversed in order from the upper left to the lower right in accordance with the zigzag scanning sequence. That is, the scanning of the unit blocks in the coefficient block is performed in a zigzag scanning sequence, and the scanning of the shift coefficients in each unit block is also performed in a zigzag scanning sequence.
  • FIG. 20 is a schematic diagram of the second scanning order.
  • the unit blocks composed of the shift coefficients are arranged in order from the lower right to the upper left in order from low frequency to high frequency, then each unit block and the shift coefficients in each unit block can be traversed in order from the lower right to the upper left in accordance with the second scanning order. That is, the scanning of the unit blocks in the coefficient block is performed in accordance with the second scanning order, and the scanning of the shift coefficients in each unit block is also performed in accordance with the second scanning order.
  • each coefficient block are composed of at least one shift coefficient (such as 4 shift coefficients)
  • multiple shift coefficients can be determined after traversing all the unit blocks in the coefficient block according to the second scanning order.
  • Step 104 Determine a reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the decoder can further determine the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the corresponding multiple shift vectors can be further determined based on the multiple shift coefficients; then, the geometric information can be reconstructed based on the multiple shift vectors and the simplified grid to determine the reconstructed original grid of the current frame.
  • the shift coefficient is generated by the shift vector after wavelet transformation, it is possible to select to perform wavelet inverse transformation on multiple shift coefficients respectively, so as to determine multiple corresponding shift vectors.
  • the simplified grid when reconstructing geometric information based on multiple shift vectors and a simplified grid of a current frame, can be subdivided first to determine the subdivided grid of the current frame; then the reconstructed original grid can be determined according to the multiple shift vectors and the subdivided grids.
  • the shift vector is obtained through the original grid and the subdivided grid of the current frame. Therefore, after determining the shift vector and the subdivided grid, the geometric information can be further reconstructed based on the shift vector and the subdivided grid to obtain the reconstructed original grid corresponding to the current frame.
  • the simplified grid of the current frame may be obtained through a grid decoder, wherein the grid decoder decodes the bitstream, thereby directly or indirectly determining the simplified grid corresponding to the current frame.
  • the coding and decoding method proposed in the present application can be applied to both intra-frame coding and decoding and inter-frame coding and decoding, which is not specifically limited in the present application.
  • the grid decoder can decode the code stream to obtain a simplified grid of the corresponding current frame.
  • the grid decoder can receive a code stream of a simplified grid transmitted by the encoding end, and determine a simplified grid of the current frame by decoding the code stream of the simplified grid.
  • the grid decoder can decode the code stream to obtain the corresponding motion vector of the current frame, and then can further determine the simplified grid of the current frame based on the motion vector.
  • the grid decoder can receive the code stream of the motion vector transmitted by the encoding end, and determine the motion vector of the current frame by decoding the code stream of the motion vector, and then use the motion vector of the current frame and the simplified grid of the decoded previous frame (reference frame) to further determine the simplified grid of the current frame.
  • the decoding method proposed by the above steps 101 to 104 adopts a method of organizing shift coefficients in dynamic grid encoding and decoding, changes the organization order of shift coefficients after wavelet transform, and uses a reverse Z-shaped scanning order and an order opposite to the raster scanning order to organize the shift coefficients, thereby reducing the bit rate required for lossless coding of shift coefficients.
  • the shift coefficient organization method proposed in the present embodiment can reduce the bit rate required for encoding the displacement coefficient in R1-R3, and slightly increase R4-R5.
  • the scheme described in the present invention does not increase the complexity of coding and decoding, so it has practical value.
  • the embodiment of the present application proposes a decoding method, at the decoding end, the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; and determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the codec when compressing the geometric information of the grid, can traverse the shift coefficient based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
  • yet another embodiment of the present application proposes a decoding method, which is applied to a decoder, wherein the decoder may include a video decoder and a grid decoder.
  • the decoding method can be used for intra-frame decoding or inter-frame decoding, which is not specifically limited in the present application.
  • the grid decoder can be used to decode the code stream and determine the simplified grid of the current frame.
  • the code stream transmitted to the grid decoder can be a code stream of a simplified grid.
  • the grid decoder can decode the code stream to obtain the corresponding simplified grid of the current frame.
  • the code stream transmitted to the grid decoder can be a code stream of motion vectors.
  • the grid decoder can decode the code stream to determine the motion vector of the current frame, and then the motion vector of the current frame and the simplified grid of the decoded previous frame (reference frame) can be used to further determine the simplified grid of the current frame.
  • the video decoder can use the simplified grid to further complete the reconstruction of the original grid of the current frame.
  • the video decoder can first decode the bitstream to determine the shift coefficient information of the current frame; determine at least one coefficient block from the shift coefficient information according to a first scanning order; determine multiple shift coefficients according to a second scanning order based on the at least one coefficient block; and determine the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the first scanning order includes the reverse scanning order of the raster scanning order
  • the second scanning order includes the reverse scanning order of the zigzag scanning order.
  • the decoder may determine a plurality of corresponding shift vectors according to the plurality of shift coefficients, and then determine the reconstructed original grid based on the plurality of shift vectors and the simplified grid.
  • the decoder may perform inverse wavelet transform processing on the plurality of shift coefficients to determine the plurality of shift vectors.
  • the decoder may first subdivide the simplified grid to determine the subdivided grid of the current frame; and then determine the reconstructed original grid according to the multiple shift vectors and the subdivided grid.
  • the coefficient block is a square block including at least one unit block; wherein the unit block is composed of 2 ⁇ 2 shift coefficients.
  • the shift coefficients in the unit block are arranged in order from low frequency to high frequency, wherein the high frequency shift coefficient is located to the left and/or above the low frequency shift coefficient.
  • the shift coefficient information includes at least one LOD composed of the at least one coefficient block.
  • the at least one LOD is arranged in order from low frequency to high frequency, wherein the LOD including high frequency information is located on the left and/or above the LOD including low frequency information.
  • the shift coefficient information is video padded according to a preset value and the preset height threshold; wherein the first position includes a position above the last LOD in the shift coefficient information.
  • the shift coefficient information is frame-filled according to the preset value based on the second position; wherein the second position includes the upper left position of the last LOD in the shift coefficient information.
  • the coding and decoding method proposed in the embodiment of the present application can be a method for organizing shift coefficients in dynamic grid coding and decoding, which reduces the bit rate required for lossless coding shift vectors (shift coefficients) by changing the organization order of shift vectors (shift coefficients) after wavelet transform in the standard reference software.
  • the shift vectors (shift coefficients) after the wavelet transform can be traversed in order from low frequency to high frequency, and organized into 16 ⁇ 16 square blocks (coefficient blocks) in the order of reverse Z-shaped scanning (second scanning order). Then, the organized square blocks can be spliced in the opposite order of raster scanning (first scanning order, i.e., from the lower right to the upper left). Finally, the empty part of the top row is filled with a constant 512 (preset value) to form a rectangular video frame. At the same time, if the number of rows of the current video frame is less than the maximum number of rows of all video frames in the sequence (preset height threshold), the empty part is filled with a constant 512 (preset value).
  • FIG. 21 is a schematic diagram of a shift coefficient
  • FIG. 22 is a schematic diagram of organizing a shift coefficient.
  • a reverse Z-shaped scanning method may be used in a coefficient block.
  • FIG. 21 traverses the shift coefficients in the order from low-frequency coefficients to high-frequency coefficients
  • FIG. 22 shows that the shift coefficients are organized in the order of reverse Z-shaped scanning in a 16 ⁇ 16 (unit block is 4 ⁇ 4) block.
  • FIG. 23 is a schematic diagram of the tissue shift coefficient 2
  • FIG. 24 is a schematic diagram of the tissue shift coefficient 3.
  • LOD (Level of Details) 1-3 are shift coefficients containing different frequency information, respectively.
  • LOD1 contains the lowest frequency information
  • LOD3 contains the highest frequency information. It can be seen that the part containing the low-frequency information is more complex, while the part containing the high-frequency information is simpler.
  • Figure 23 The method currently used by the common standard reference software is shown in Figure 23, which uses a raster scanning order, that is, starting from the upper left corner, and organizing the shift coefficients from low frequency to high frequency in the order from upper left to lower right.
  • the embodiment of the present application uses the opposite order of raster scanning, starting from the lower right corner, and organizing the shift coefficients from low frequency to high frequency in the order from lower right to upper left.
  • the empty parts need to be filled. Accordingly, when performing frame padding, in the standard reference software, as shown in FIG. 23 , the empty part in the lower right corner is filled, while in the embodiment of the present application, the empty part in the upper left corner is filled.
  • the number of displacement coefficients of each frame is not necessarily equal, which results in that for each frame, the height of the video frame formed after the displacement coefficient organization is not necessarily equal (in the standard reference software, the width of the displacement coefficient video frame is a fixed constant). Therefore, it is necessary to pad the video frames with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant. Accordingly, when performing video padding, in the standard reference software, as shown in FIG. 23 , the video frame is padded at the bottom, while in the embodiment of the present application, the video frame is padded at the bottom.
  • the embodiment of the present application proposes a decoding method, at the decoding end, the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; and determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the codec when compressing the geometric information of the grid, can traverse the shift coefficient based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
  • FIG. 25 is a schematic diagram of the encoding method proposed in the embodiment of the present application.
  • the method for the encoder to perform encoding processing may include the following steps:
  • Step 201 Determine a plurality of corresponding shift coefficients according to a plurality of shift vectors of a current frame.
  • the encoder may first determine a plurality of corresponding shift coefficients of the current frame according to a plurality of shift vectors of the current frame.
  • the encoder may be a video encoder, or may be any encoding device including a video encoder and a grid encoder.
  • the current frame may be a current image frame or a current video frame, which is not specifically limited in the present application.
  • the encoder when using a shift vector to determine a corresponding shift coefficient, may choose to perform wavelet transform processing on a plurality of shift vectors respectively, so as to determine a plurality of shift coefficients.
  • the shift vector can be determined by the refined grid of the current frame and the original grid of the current frame; wherein the original grid is simplified to determine the corresponding simplified grid, and the simplified grid is refined to determine the corresponding refined grid.
  • the original mesh of the current frame can be simplified to obtain a simplified mesh (Decimated Mesh), or a base mesh (Base Mesh). Then the simplified mesh can be subdivided to obtain a subdivided mesh (Subdivided Mesh). Finally, for each vertex in the subdivided mesh, the point closest to it in the original mesh is found, and the displacement vector (Displacement) of the two points is calculated.
  • the coding and decoding method proposed in the present application can be applied to both intra-frame coding and decoding and inter-frame coding and decoding.
  • the present application does not make any specific limitation.
  • the grid encoder can encode the simplified grid of the current frame to obtain a code stream of the simplified grid.
  • the video encoder may first determine the reconstructed simplified network of the current frame using the bitstream of the simplified grid that has been generated; and then the shift vector may be updated by reconstructing the simplified grid.
  • the video encoder can use the code stream of the simplified grid to complete the reconstruction of the simplified grid, and use the reconstructed simplified grid to complete the update of the shift vector.
  • the grid encoder can encode the motion vector of the current frame to obtain a code stream of the motion vector.
  • the video encoder can first use the bit stream of the motion vector that has been generated to determine the motion vector of the current frame, and then further determine the reconstructed simplified network of the current frame based on the motion vector; finally, the shift vector can be updated by reconstructing the simplified grid.
  • the video encoder can use the bit stream of the motion vector to reconstruct the simplified grid, and use the reconstructed simplified grid to update the shift vector.
  • the encoder can use the motion vector of the current frame and the reconstructed simplified grid of the reconstructed previous frame (reference frame) to further determine the reconstructed simplified grid of the current frame.
  • Step 202 traverse a plurality of shift coefficients in sequence according to a second scanning order to determine at least one coefficient block.
  • the encoder may further sequentially traverse the multiple shift coefficients according to the second scanning order to determine at least one coefficient block.
  • the coefficient block may be a square block including at least one unit block; wherein each unit block may be composed of 2 ⁇ 2 shift coefficients.
  • each unit block may include 4 shift coefficients, such as shift coefficients 1-4, wherein the 4 shift coefficients are arranged in 2 rows and 2 columns to form a square unit block.
  • the shift coefficients in the unit block may be arranged in order from low frequency to high frequency, wherein the high frequency shift coefficients are located to the left and/or above the low frequency shift coefficients.
  • shift coefficients 1-4 are arranged from low frequency to high frequency in sequence, so shift coefficient 1 is located in the lower right corner and shift coefficient 4 is located in the upper left corner.
  • the size of the coefficient block can be any integer multiple of the unit block, and the present application does not make any specific limitation.
  • the size of the coefficient block may be 16 ⁇ 16, ie, composed of 4 unit blocks, or 32 ⁇ 32, ie, composed of 16 unit blocks.
  • the encoder may sequentially traverse multiple shift coefficients of the current frame in a second scanning order from low-frequency shift coefficients to high-frequency shift coefficients, thereby obtaining at least one coefficient block of the current frame.
  • the second scanning order may be the reverse scanning order of the zigzag scanning order.
  • the Z in the zigzag scanning (Z-Scan) is a figurative representation, and the zigzag scanning order ensures that different partitions can be addressed in the same traversal order, which is conducive to the recursive implementation in the program.
  • the unit blocks composed of the shift coefficients can be arranged in sequence from upper left to lower right; whereas in the present application, the shift coefficients of the unit blocks in the coefficient block are arranged in sequence from lower right to upper left in the order from low frequency to high frequency. Accordingly, when traversing the shift coefficients, you can choose to organize the shift coefficients from lower right to upper left in the opposite scanning order of the Z-shaped scanning order.
  • multiple shift coefficients are traversed in a zigzag scanning order based on the order from low frequency to high frequency, and the unit blocks composed of the shift coefficients are arranged in turn from the upper left to the lower right. That is, the organization of the unit blocks in the coefficient block is carried out in a zigzag scanning order, and the organization of the shift coefficients in each unit block is also carried out in a zigzag scanning order.
  • a plurality of shift coefficients are traversed according to the second scanning order, and the unit blocks composed of the shift coefficients are arranged in the lower right to upper left positions in sequence. That is, the organization of the unit blocks in the coefficient block is carried out according to the second scanning order, and the organization of the shift coefficients in each unit block is also carried out according to the second scanning order.
  • each coefficient block in each coefficient block is composed of at least one shift coefficient (such as 4 shift coefficients)
  • a unit block after traversing multiple shift coefficients of the current frame according to the second scanning order, a unit block can be formed, and then a coefficient block can be formed.
  • Step 203 Determine shift coefficient information of the current frame based on at least one coefficient block in a first scanning order.
  • the encoder can further determine the shift coefficient information of the current frame according to the first scanning order based on the at least one coefficient block.
  • the shift coefficient information of the current frame may include at least one level of detail LOD composed of at least one coefficient block.
  • At least one level detail in the shift coefficient information may be arranged in order from low frequency to high frequency, wherein the level detail including high frequency information is located to the left and/or above the level detail including low frequency information.
  • LOD1 includes the lowest frequency information
  • LOD2 includes higher frequency information
  • LOD3 includes the highest frequency information.
  • LOD1 including the lowest frequency information is the most complex
  • LOD3 including the highest frequency information is the simplest
  • LOD3 including the highest frequency information is located on the upper left side of LOD1 including the lowest frequency information.
  • the encoder can traverse at least one coefficient block in sequence according to the first scanning order, and finally generate shift coefficient information including hierarchical details of low-frequency information and hierarchical details of high-frequency information.
  • the first scanning order may be the reverse scanning order of the raster scanning order.
  • Raster scanning means scanning from left to right and from top to bottom, first scanning one row and then moving to the starting position of the next row to continue scanning.
  • the common encoding and decoding process mainly uses the raster scanning order.
  • the hierarchical details can be arranged in order from the upper left to the lower right; whereas in the present application, the hierarchical details in the shifted coefficient information are arranged in order from the lower right to the upper left in order from low frequency to high frequency. Accordingly, when organizing the traversal of at least one coefficient block, it is possible to choose to traverse at least one coefficient block from the lower right to the upper left in the reverse scanning order of the raster scanning order.
  • LOD1, LOD2, and LOD3 are organized in sequence from upper left to lower right in the order of raster scanning from low frequency to high frequency
  • the hierarchical details can be arranged in sequence from upper left to lower right.
  • the hierarchical details can be arranged in sequence from the lower right to the upper left.
  • each level of detail is composed of at least one coefficient block, after traversing at least one coefficient block in the first scanning order, the shift coefficient information including at least one level of detail can be determined.
  • the shift coefficient information of the current frame generated by the encoder if there is a blank portion in the last line of the shift coefficient information, the shift coefficient information can be frame padded (Frame Padding) based on the second position according to a preset value.
  • the preset value may be an integer greater than 0, for example, the preset value is 512.
  • the constant 512 can be selected for frame padding, so that the shift coefficient information corresponding to each frame in the grid sequence is rectangular, that is, the rectangular shift coefficient information is ensured to be composed of at least one LOD.
  • the second position can be the upper left position of the last LOD in the shift coefficient information.
  • the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing frame filling, the upper left position of the last level detail including high frequency information can be selected for filling processing.
  • common shift coefficient information is arranged in order from low frequency to high frequency, with hierarchical details arranged from the upper left to the lower right.
  • the vacant part in the lower right corner of the shift coefficient information of the current frame can be filled.
  • the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged in sequence from the lower right to the upper left. Then, when filling the frame, the missing part in the upper left corner of the shift coefficient information of the current frame can be filled.
  • the shift coefficient information of the current frame generated by the encoder if the number of rows of the shift coefficient information is less than a preset height threshold, then it is possible to choose to perform video padding (Video Padding) on the shift coefficient information according to a preset value and a preset height threshold.
  • video padding Video Padding
  • the preset value can be an integer greater than 0, for example, the preset value is 512, and the preset height threshold can be the maximum height in the grid sequence, that is, the height (number of rows) corresponding to a frame with the largest number of displacement coefficients in the grid sequence.
  • the number of rows of the shift coefficient information of the current frame is less than the number of rows corresponding to the frame with the largest number of displacement coefficients in the grid sequence, that is, less than the preset height threshold, then you can choose to use the constant 512 for video padding, so that the height (number of rows) of each frame in the grid sequence can be the same, that is, the height of each frame in the grid sequence is guaranteed to be constant.
  • the width of the displacement coefficient video frame (or image frame) can be a fixed constant, and for a grid sequence, the number of displacement coefficients in each frame is not necessarily equal, so that the heights of the video frames (or image frames) formed by different frames are not necessarily equal. Therefore, it is necessary to fill the video frames (or image frames) with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant.
  • the first position may be a position above the last LOD in the shift coefficient information.
  • the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing video filling, it is possible to choose to perform filling processing above the last level detail including high frequency information.
  • common shift coefficient information is arranged in order from low frequency to high frequency, with hierarchical details arranged from the upper left to the lower right. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the bottom.
  • the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged from the lower right to the upper left. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the top.
  • Step 204 Write the shift coefficient information into the bit stream.
  • the encoder can further write the shift coefficient information into the bitstream, generate a corresponding bitstream, and transmit it to the decoding end.
  • the code stream transmitted from the encoder to the decoder may be a code stream of shift coefficients, or may be code stream data including a code stream of shift coefficients and a code stream of a simplified grid (or a code stream of motion vectors).
  • the decoding method proposed by the above steps 201 to 204 adopts a method of organizing shift coefficients in dynamic grid encoding and decoding, changes the organization order of shift coefficients after wavelet transform, and uses a reverse Z-shaped scanning order and an order opposite to the raster scanning order to organize the shift coefficients, thereby reducing the bit rate required for lossless coding of shift coefficients.
  • the embodiment of the present application proposes a coding method, at the coding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; writes the shift coefficient information into the code stream.
  • the codec when it compresses the geometric information of the grid, it can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
  • another embodiment of the present application proposes an encoding method, which is applied to an encoder, wherein the encoder includes a video encoder, a grid encoder, and a preprocessor.
  • the encoding method can be used for intra-frame encoding or inter-frame encoding, which is not specifically limited in the present application.
  • the preprocessor may be used to generate a simplified grid and a shift vector according to the original grid of the current frame.
  • the original mesh of the current frame can be simplified to obtain a simplified mesh (Decimated Mesh), or a base mesh (Base Mesh). Then the simplified mesh can be subdivided to obtain a subdivided mesh (Subdivided Mesh). Finally, for each vertex in the subdivided mesh, the point closest to it in the original mesh is found, and the displacement vector (Displacement) of the two points is calculated.
  • the grid encoder can be used to encode the simplified grid and then generate a code stream of the simplified grid.
  • the grid encoder can encode the simplified grid of the current frame to obtain a code stream of the simplified grid.
  • the video encoder may first determine the reconstructed simplified network of the current frame using the bitstream of the simplified grid that has been generated; and then the shift vector may be updated by reconstructing the simplified grid.
  • the video encoder can use the code stream of the simplified grid to complete the reconstruction of the simplified grid, and use the reconstructed simplified grid to complete the update of the shift vector.
  • the grid encoder can encode the motion vector of the current frame to obtain a code stream of the motion vector.
  • the video encoder can first use the code stream of the motion vector that has been generated to determine the motion vector of the current frame, and then further determine the reconstructed simplified network of the current frame based on the motion vector; finally, the shift vector can be updated by reconstructing the simplified grid.
  • the video encoder can use the bit stream of the motion vector to reconstruct the simplified grid, and use the reconstructed simplified grid to update the shift vector.
  • the grid encoder after the grid encoder generates the code stream of the simplified grid or the code stream of the motion vector, it can transmit the code stream of the simplified grid or the code stream of the motion vector to the decoding end.
  • the video encoder can be used to determine multiple shift coefficients corresponding to multiple shift vectors of the current frame; traverse the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determine the shift coefficient information of the current frame according to the first scanning order; and write the shift coefficient information into the bitstream.
  • the encoder may perform wavelet transform processing on the multiple shift vectors, so as to determine the multiple shift coefficients.
  • the shift vector is determined by the refined grid of the current frame and the original grid of the current frame; wherein the original grid is simplified to determine the corresponding simplified grid, and the simplified grid is refined to determine the corresponding refined grid.
  • the first scanning order includes the reverse scanning order of the raster scanning order
  • the second scanning order includes the reverse scanning order of the zigzag scanning order.
  • the coefficient block is a square block including at least one unit block; wherein the unit block is composed of 2 ⁇ 2 shift coefficients.
  • the shift coefficients in the unit block are arranged in order from low frequency to high frequency, wherein the high frequency shift coefficient is located to the left and/or above the low frequency shift coefficient.
  • the shift coefficient information includes at least one LOD composed of the at least one coefficient block.
  • the at least one LOD is arranged in order from low frequency to high frequency, wherein the LOD including high frequency information is located on the left and/or above the LOD including low frequency information.
  • the shift coefficient information is video padded according to a preset value and the preset height threshold; wherein the first position includes a position above the last LOD in the shift coefficient information.
  • the shift coefficient information is frame-filled according to the preset value based on the second position; wherein the second position includes the upper left position of the last LOD in the shift coefficient information.
  • the coding and decoding method proposed in the embodiment of the present application can be a method for organizing shift coefficients in dynamic grid coding and decoding, which reduces the bit rate required for lossless coding shift vectors (shift coefficients) by changing the organization order of shift vectors (shift coefficients) after wavelet transform in the standard reference software.
  • the shift vectors (shift coefficients) after the wavelet transform can be traversed in order from low frequency to high frequency, and organized into 16 ⁇ 16 square blocks (coefficient blocks) in the order of reverse Z-shaped scanning (second scanning order). Then, the organized square blocks can be spliced in the opposite order of raster scanning (first scanning order, i.e., from the lower right to the upper left). Finally, the empty part of the top row is filled with a constant 512 (preset value) to form a rectangular video frame. At the same time, if the number of rows of the current video frame is less than the maximum number of rows of all video frames in the sequence (preset height threshold), the empty part is filled with a constant 512 (preset value).
  • a reverse Z-scanning method may be used within a coefficient block.
  • Figure 21 shows traversing the shift coefficients in the order from low-frequency coefficients to high-frequency coefficients
  • Figure 22 shows organizing the shift coefficients in the order of reverse Z-scanning within a 16 ⁇ 16 (unit block is 4 ⁇ 4) block.
  • LOD (Level of Details) 1-3 are shift coefficients containing different frequency information, respectively.
  • LOD1 contains the lowest frequency information
  • LOD3 contains the highest frequency information. It can be seen that the part containing the low frequency information is more complex, while the part containing the high frequency information is simpler.
  • Figure 23 The method currently used by the common standard reference software is shown in Figure 23, which uses a raster scanning order, that is, starting from the upper left corner, and organizing the shift coefficients from low frequency to high frequency in the order from upper left to lower right.
  • the embodiment of the present application uses the opposite order of raster scanning, starting from the lower right corner, and organizing the shift coefficients from low frequency to high frequency in the order from lower right to upper left.
  • the empty parts need to be filled. Accordingly, when performing frame padding, in the standard reference software, as shown in FIG. 23 , the empty part in the lower right corner is filled, while in the embodiment of the present application, the empty part in the upper left corner is filled.
  • the number of displacement coefficients of each frame is not necessarily equal, which results in that for each frame, the height of the video frame formed after the displacement coefficient organization is not necessarily equal (in the standard reference software, the width of the displacement coefficient video frame is a fixed constant). Therefore, it is necessary to pad the video frames with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant. Accordingly, when performing video padding, in the standard reference software, as shown in FIG. 23 , the video frame is padded at the bottom, while in the embodiment of the present application, the video frame is padded at the bottom.
  • the embodiment of the present application proposes a coding method, at the coding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; writes the shift coefficient information into the code stream.
  • the codec when it compresses the geometric information of the grid, it can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
  • FIG. 26 is a schematic diagram of a composition structure of an encoder.
  • the encoder 110 may include: a first determining unit 111, an encoding unit 112, wherein:
  • the first determining unit 111 is configured to determine a plurality of corresponding shift coefficients according to a plurality of shift vectors of the current frame; sequentially traverse the plurality of shift coefficients in accordance with the second scanning order to determine at least one coefficient block; and determine the shift coefficient information of the current frame in accordance with the first scanning order based on the at least one coefficient block;
  • the encoding unit 112 is configured to write the shift coefficient information into a bit stream.
  • a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
  • an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 110.
  • the computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the aforementioned embodiments is implemented.
  • Figure 27 is a second schematic diagram of the composition structure of the encoder.
  • the encoder 110 may include: a first memory 113 and a first processor 114, a first communication interface 115 and a first bus system 116.
  • the first memory 113, the first processor 114, and the first communication interface 115 are coupled together through the first bus system 116.
  • the first bus system 116 is used to achieve connection and communication between these components.
  • the first bus system 116 also includes a power bus, a control bus, and a status signal bus.
  • various buses are labeled as the first bus system 116 in Figure 10. Among them,
  • the first communication interface 115 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the first memory 113 is used to store a computer program that can be run on the first processor
  • the first processor 114 is used to determine the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame when running the computer program; traverse the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determine the shift coefficient information of the current frame according to the first scanning order; and write the shift coefficient information into the bit stream.
  • the first memory 113 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • RAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate synchronous DRAM
  • ESDRAM enhanced synchronous DRAM
  • SLDRAM synchronous link DRAM
  • DRRAM direct RAM bus RAM
  • the first memory 113 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
  • the first processor 114 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 114.
  • the above-mentioned first processor 114 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the first memory 113, and the first processor 114 reads the information in the first memory 113 and completes the steps of the above method in combination with its hardware.
  • the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate array
  • general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application.
  • the software code can be stored in a memory and executed by a processor.
  • the memory can be implemented in the processor or outside the processor.
  • the first processor 114 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
  • FIG. 28 is a schematic diagram of a first structure of a decoder.
  • the decoder 120 may include: a decoding unit 121 and a second determining unit 122; wherein,
  • the decoding unit 121 is configured to decode the code stream
  • the second determination unit 122 is configured to determine the shift coefficient information of the current frame; determine at least one coefficient block from the shift coefficient information according to a first scanning order; based on the at least one coefficient block, determine multiple shift coefficients according to a second scanning order; and determine the reconstructed original grid of the current frame based on the multiple shift coefficients and the simplified grid of the current frame.
  • a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
  • an embodiment of the present application provides a computer-readable storage medium, which is applied to the decoder 120.
  • the computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the above embodiments is implemented.
  • Figure 29 is a second schematic diagram of the composition structure of the decoder.
  • the decoder 120 may include: a second memory 123 and a second processor 124, a second communication interface 125 and a second bus system 126.
  • the second memory 123 and the second processor 124, and the second communication interface 125 are coupled together through the second bus system 126.
  • the second bus system 126 is used to achieve connection and communication between these components.
  • the second bus system 126 also includes a power bus, a control bus and a status signal bus.
  • various buses are labeled as the second bus system 126 in Figure 12. Among them,
  • the second communication interface 125 is used for receiving and sending signals during the process of sending and receiving information with other external network elements
  • the second memory 123 is used to store a computer program that can be run on the second processor
  • the second processor 124 is used to decode the code stream and determine the shift coefficient information of the current frame when running the computer program; determine at least one coefficient block from the shift coefficient information according to a first scanning order; based on the at least one coefficient block, determine multiple shift coefficients according to a second scanning order; determine the reconstructed original grid of the current frame based on the multiple shift coefficients and the simplified grid of the current frame.
  • the second memory 123 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • RAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate synchronous DRAM
  • ESDRAM enhanced synchronous DRAM
  • SLDRAM synchronous link DRAM
  • DRRAM direct RAM bus RAM
  • the second processor 124 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the second processor 124.
  • the above-mentioned second processor 124 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the various methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the second memory 123, and the second processor 124 reads the information in the second memory 123 and completes the steps of the above method in combination with its hardware.
  • the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate array
  • general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application.
  • the software code can be stored in a memory and executed by a processor.
  • the memory can be implemented in the processor or outside the processor.
  • the embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium.
  • the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the code stream.
  • the codec when compressing the geometric information of the grid, can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first and referenced when the low-frequency information with high complexity is subsequently processed.
  • a better organization strategy of the shift coefficients can be used to reduce the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
  • the embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium.
  • the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
  • the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the code stream.
  • the codec when compressing the geometric information of the grid, can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein the high-frequency information is located at the upper left of the frame and the low-frequency information is located at the lower right of the frame in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, so that the high-frequency information with low complexity can be processed first and referred to in the subsequent processing of the low-frequency information with high complexity.
  • a better organization strategy of the shift coefficient can be used to reduce the bit rate of the encoded shift coefficient, thereby improving the grid compression performance.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Embodiments of the present application provide encoding and decoding methods. At a decoding end, a decoder decodes a code stream to determine shift coefficient information of a current frame; according to a first scan sequence, determines at least one coefficient block from the shift coefficient information; on the basis of the at least one coefficient block, determines a plurality of shift coefficients according to a second scan sequence; and according to the plurality of shift coefficients and a simplified mesh of the current frame, determines a reconstructed original mesh of the current frame. At an encoding end, an encoder, according to a plurality of shift vectors of the current frame, determines a corresponding plurality of shift coefficients; according to the second scan sequence, sequentially traverses the plurality of shift coefficients, to determine at least one coefficient block; on the basis of the at least one coefficient block, determines shift coefficient information of the current frame according to the first scan sequence; and writes the shift coefficient information into a code stream.

Description

编解码方法、编码器、解码器以及存储介质Coding and decoding method, encoder, decoder and storage medium 技术领域Technical Field
本申请实施例涉及网格压缩编码技术领域,尤其涉及一种编解码方法、编码器、解码器以及存储介质。The embodiments of the present application relate to the technical field of grid compression coding, and in particular to a coding and decoding method, an encoder, a decoder, and a storage medium.
背景技术Background technique
在运动图像专家组(Moving Picture Experts Group,MPEG)提供的动态网格编码(Dynamic Mesh Coding)的标准参考软件中,在对网格的几何信息进行编解码时,主要包括对原始网格对应的移位系数的组织和压缩。In the standard reference software of Dynamic Mesh Coding provided by the Moving Picture Experts Group (MPEG), the encoding and decoding of the geometric information of the mesh mainly includes the organization and compression of the shift coefficients corresponding to the original mesh.
然而,目前常见的移位系数的组织方法并不是最佳的,进而会增大后续的无损编码移位系数的码率,降低了网格压缩性能。However, the currently common organization method of the shift coefficients is not optimal, which will increase the bit rate of the subsequent lossless coding of the shift coefficients and reduce the grid compression performance.
发明内容Summary of the invention
本申请实施例提供一种编解码方法、编码器、解码器以及存储介质,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiments of the present application provide a coding and decoding method, an encoder, a decoder and a storage medium, which can use a better organization strategy of shift coefficients, thereby reducing the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
本申请实施例的技术方案可以如下实现:The technical solution of the embodiment of the present application can be implemented as follows:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,所述方法包括:In a first aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
解码码流,确定当前帧的移位系数信息;Decode the code stream and determine the shift coefficient information of the current frame;
按照第一扫描顺序从所述移位系数信息中确定至少一个系数块;determining at least one coefficient block from the shifted coefficient information in a first scanning order;
基于所述至少一个系数块,按照第二扫描顺序确定多个移位系数;determining a plurality of shifted coefficients based on the at least one coefficient block in a second scanning order;
根据所述多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。A reconstructed original grid of the current frame is determined according to the multiple shift coefficients and the simplified grid of the current frame.
第二方面,本申请实施例提供了一种解码方法,应用于解码器,其中,所述解码器包括视频解码器和网格解码器,所述方法包括:In a second aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, wherein the decoder includes a video decoder and a grid decoder, and the method includes:
所述网格解码器,用于解码码流,确定当前帧的简化网格;The grid decoder is used to decode the code stream and determine the simplified grid of the current frame;
所述视频解码器,用于执行如第一方面所述的解码方法。The video decoder is used to execute the decoding method as described in the first aspect.
第三方面,本申请实施例提供了一种编码方法,应用于编码器,所述方法包括:In a third aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
根据当前帧的多个移位向量确定对应的多个移位系数;Determining corresponding multiple shift coefficients according to multiple shift vectors of the current frame;
按照第二扫描顺序依次遍历所述多个移位系数,确定至少一个系数块;The plurality of shifted coefficients are sequentially traversed in a second scanning order to determine at least one coefficient block;
基于所述至少一个系数块,按照第一扫描顺序确定所述当前帧的移位系数信息;Determining shift coefficient information of the current frame according to a first scanning order based on the at least one coefficient block;
将所述移位系数信息写入码流。The shift coefficient information is written into a bit stream.
第四方面,本申请实施例提供了一种编码方法,应用于编码器,其中,所述编码器包括视频编码器、网格编码器以及预处理器,所述方法包括:In a fourth aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, wherein the encoder includes a video encoder, a grid encoder, and a preprocessor, and the method includes:
所述预处理器,用于根据当前帧的原始网格生成简化网格和移位向量;The preprocessor is used to generate a simplified grid and a shift vector according to the original grid of the current frame;
所述网格编码器,用于编码所述简化网格,生成简化网格的码流;The grid encoder is used to encode the simplified grid to generate a code stream of the simplified grid;
所述视频编码器,用于执行如第二方面所述的编码方法。The video encoder is used to execute the encoding method as described in the second aspect.
第五方面,本申请实施例提供了一种编码器,所述编码器包括:第一确定单元,编码单元;其中,In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising: a first determining unit, an encoding unit; wherein,
所述第一确定单元,配置为根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历所述多个移位系数,确定至少一个系数块;基于所述至少一个系数块,按照第一扫描顺序确定所述当前帧的移位系数信息;The first determination unit is configured to determine a plurality of corresponding shift coefficients according to a plurality of shift vectors of the current frame; sequentially traverse the plurality of shift coefficients in accordance with a second scanning order to determine at least one coefficient block; and determine the shift coefficient information of the current frame in accordance with the first scanning order based on the at least one coefficient block;
所述编码单元,配置为将所述移位系数信息写入码流。The encoding unit is configured to write the shift coefficient information into a bit stream.
第六方面,本申请实施例提供了一种编码器,所述编码器包括:第一存储器和第一处理器;其中,In a sixth aspect, an embodiment of the present application provides an encoder, the encoder comprising: a first memory and a first processor; wherein,
所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;The first memory is used to store a computer program that can be run on the first processor;
所述第一处理器,用于在运行所述计算机程序时,执行如第三方面、第四方面所述的方法。The first processor is used to execute the method described in the third aspect and the fourth aspect when running the computer program.
第七方面,本申请实施例提供了一种解码器,所述解码器包括:解码单元,第二确定单元;其中,In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising: a decoding unit, a second determining unit; wherein,
所述解码单元,配置为解码码流;The decoding unit is configured to decode the code stream;
所述第二确定单元,配置为确定当前帧的移位系数信息;按照第一扫描顺序从所述移位系数信息中 确定至少一个系数块;基于所述至少一个系数块,按照第二扫描顺序确定多个移位系数;根据所述多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。The second determination unit is configured to determine the shift coefficient information of the current frame; determine at least one coefficient block from the shift coefficient information according to a first scanning order; based on the at least one coefficient block, determine multiple shift coefficients according to a second scanning order; and determine the reconstructed original grid of the current frame based on the multiple shift coefficients and the simplified grid of the current frame.
第八方面,本申请实施例提供了一种解码器,第二存储器和第二处理器;其中,In an eighth aspect, an embodiment of the present application provides a decoder, a second memory, and a second processor; wherein:
所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;The second memory is used to store a computer program that can be run on the second processor;
所述第二处理器,用于在运行所述计算机程序时,执行如第一方面、第二方面所述的方法。The second processor is used to execute the method described in the first aspect and the second aspect when running the computer program.
第九方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如第一方面、第二方面所述的方法、或者实现如第三方面、第四方面所述的方法。In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, implements the method described in the first aspect or the second aspect, or implements the method described in the third aspect or the fourth aspect.
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,在解码端,解码器解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从移位系数信息中确定至少一个系数块;基于至少一个系数块,按照第二扫描顺序确定多个移位系数;根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。在编码端,编码器根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块;基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息;将移位系数信息写入码流。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium. At the decoding end, the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame. At the encoding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the code stream. It can be seen that in the embodiment of the present application, when compressing the geometric information of the grid, the codec can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first and referenced when the low-frequency information with high complexity is subsequently processed. In other words, in the embodiment of the present application, a better organization strategy of the shift coefficients can be used to reduce the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为网格编码整体框架图;Figure 1 is a diagram of the overall framework of grid coding;
图2为网格预处理的示意图;Fig. 2 is a schematic diagram of grid preprocessing;
图3为帧内编码的示意图;FIG3 is a schematic diagram of intra-frame coding;
图4为帧间编码的示意图;FIG4 is a schematic diagram of inter-frame coding;
图5为帧内解码的示意图;FIG5 is a schematic diagram of intra-frame decoding;
图6为帧间解码的示意图;FIG6 is a schematic diagram of inter-frame decoding;
图7为本申请实施例提供的一种编解码的网络架构示意图FIG. 7 is a schematic diagram of a network architecture of a codec provided in an embodiment of the present application.
图8为本申请实施例提出的解码方法的示意图;FIG8 is a schematic diagram of a decoding method proposed in an embodiment of the present application;
图9为移位系数信息的示意图;FIG9 is a schematic diagram of shift coefficient information;
图10为视频填补的示意图一;FIG10 is a schematic diagram 1 of video filling;
图11为视频填补的示意图二;FIG11 is a second schematic diagram of video filling;
图12为帧填补的示意图一;FIG12 is a schematic diagram of frame filling 1;
图13为帧填补的示意图二;FIG13 is a second schematic diagram of frame padding;
图14为光栅扫描顺序的示意图;FIG14 is a schematic diagram of a raster scanning sequence;
图15为第一扫描顺序的示意图;FIG15 is a schematic diagram of a first scanning sequence;
图16为单元块的示意图;FIG16 is a schematic diagram of a unit block;
图17为系数块的示意图一Figure 17 is a schematic diagram of a coefficient block
图18为系数块的示意图二;FIG18 is a second schematic diagram of a coefficient block;
图19为Z字形扫描顺序的示意图;FIG19 is a schematic diagram of a zigzag scanning sequence;
图20为第二扫描顺序的示意图;FIG20 is a schematic diagram of a second scanning sequence;
图21为移位系数的示意图;FIG21 is a schematic diagram of shift coefficients;
图22为组织移位系数的示意图一Figure 22 is a schematic diagram of tissue displacement coefficient 1
图23为组织移位系数的示意图二;FIG. 23 is a second schematic diagram of tissue displacement coefficient;
图24为组织移位系数的示意图三;FIG. 24 is a third schematic diagram of tissue displacement coefficient;
图25为本申请实施例提出的编码方法的示意图;FIG25 is a schematic diagram of an encoding method proposed in an embodiment of the present application;
图26为编码器的组成结构示意图一;FIG26 is a schematic diagram of the structure of the encoder;
图27为编码器的组成结构示意图二;FIG27 is a second schematic diagram of the structure of the encoder;
图28为解码器的组成结构示意图一;FIG28 is a schematic diagram of the structure of a decoder;
图29为解码器的组成结构示意图二。FIG. 29 is a second schematic diagram of the composition structure of the decoder.
具体实施方式Detailed ways
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
需要说明的是,可以允许在同一视频场景中解码和合成不同的数据格式比特流。其中,至少可以包括图像格式、点云(Point Cloud)格式、网格(Mesh)格式。通过这种方式,可以为具有不同来源的多个数据格式(例如,网格、点云、图像等等)提供实时沉浸式视频交互服务。It should be noted that different data format bitstreams can be decoded and synthesized in the same video scene. Among them, at least image format, point cloud format, and mesh format can be included. In this way, real-time immersive video interaction services can be provided for multiple data formats (for example, mesh, point cloud, image, etc.) with different sources.
在本申请实施例中,基于数据格式的方法可以允许以数据格式的比特流级进行独立性处理。即与视频编码中的瓦片(tiles)或切片(slices)一样,该场景中的不同数据格式可以以独立的方式编码,从而可以基于数据格式进行独立的编码和解码。In the embodiment of the present application, the data format-based method can allow independent processing at the bitstream level of the data format. That is, like tiles or slices in video encoding, different data formats in the scene can be encoded in an independent manner, so that independent encoding and decoding can be performed based on the data format.
一般而言,三维动画内容采用基于关键帧的表示方法,即每帧是一个静态网格。不同时刻的静态网格具有相同的拓扑结构和不同的几何结构。但是,基于关键帧表示的三维动态网格的数据量特别大,因此如何能够有效的存储、传输和绘制成为三维动态网格发展所面临的问题。另外针对不同的用户终端(电脑、笔记本、便携式设备、手机)需要支持网格的空间可伸缩性;不同的网络带宽(宽带、窄带、无线)需要支持网格的质量可伸缩性。因此,三维动态网格压缩是一个非常关键的问题。Generally speaking, 3D animation content is represented based on keyframes, that is, each frame is a static mesh. Static meshes at different times have the same topological structure and different geometric structures. However, the amount of data of 3D dynamic meshes represented based on keyframes is extremely large, so how to effectively store, transmit and draw them has become a problem faced by the development of 3D dynamic meshes. In addition, the spatial scalability of the mesh needs to be supported for different user terminals (computers, notebooks, portable devices, mobile phones); different network bandwidths (broadband, narrowband, wireless) need to support the quality scalability of the mesh. Therefore, 3D dynamic mesh compression is a very critical issue.
目前的三维动态网格压缩方法有基于空间-时间的预测方法,通过消除空间和时间相关性来提高压缩效率;基于主成分分析(Principal Components Analysis,PCA)的技术,在特征向量空间进行投影,使能量集中;基于小波的方法,支持空间可伸缩和质量可伸缩。Current 3D dynamic mesh compression methods include space-time prediction methods, which improve compression efficiency by eliminating spatial and temporal correlations; principal component analysis (PCA)-based technology, which projects in the eigenvector space to concentrate energy; and wavelet-based methods, which support spatial scalability and quality scalability.
需要说明的是,图1为网格编码整体框架图,图2为网格预处理的示意图,如图1和图2所示,在编码端主要分为预处理(Pre-processing)和编码器(Encoder)两部分。其中,在预处理过程中,首先对原始网格(Original Mesh)进行简化,得到简化网格(Decimated Mesh),或称基本网格(Base Mesh)。然后对简化网格进行细分,得到细分网格(Subdivided Mesh)。最后对于细分网格中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位向量(Displacement)。在经过预处理后,将简化网格和移位向量输入编码器,生成码流。It should be noted that FIG1 is a diagram of the overall framework of mesh coding, and FIG2 is a schematic diagram of mesh preprocessing. As shown in FIG1 and FIG2, the encoding end is mainly divided into two parts: preprocessing (Pre-processing) and encoder (Encoder). Among them, in the preprocessing process, the original mesh (Original Mesh) is first simplified to obtain a simplified mesh (Decimated Mesh), or a base mesh (Base Mesh). Then the simplified mesh is subdivided to obtain a subdivided mesh (Subdivided Mesh). Finally, for each vertex in the subdivided mesh, find the point in the original mesh that is closest to it, and calculate the displacement vector (Displacement) of the two points. After preprocessing, the simplified mesh and the displacement vector are input into the encoder to generate a bitstream.
进一步地,在编码过程中,编码器按照作用帧的类型不同,可以分为帧内编码器和帧间编码器,分别用于执行帧内编码和帧间编码。Furthermore, during the encoding process, the encoder can be divided into an intra-frame encoder and an inter-frame encoder according to the type of the frame it acts on, which are used to perform intra-frame encoding and inter-frame encoding respectively.
图3为帧内编码的示意图,如图3所示,在帧内编码器中,可以采用常见的静态网格编码器(Static Mesh Encoder)对简化网格进行编码,生成对应的码流(Compressed base mesh bitstream)。接下来,用重构的简化网格更新移位向量(Update Displacements)。对更新后的移位向量进行小波变换(Wavelet Transform)后得到移位系数。并将其打包成图像、视频(Image Packing、Video Packing)后采用高效率视频编码(High Efficiency Video Coding,H.265-HEVC)进行编码,生成移位系数的码流(Compressed displacements bitstream)。对于属性图(Attribute Map)编码,首先根据重构的几何信息与原始几何信息间的差异对特征图进行变换(Texture Transfer),然后将其进行填补(Padding)、打包(Video Packing)后用视频编码器编码形成属性码流(Compressed attribute bitstream)。FIG3 is a schematic diagram of intra-frame coding. As shown in FIG3, in the intra-frame encoder, a common static mesh encoder (Static Mesh Encoder) can be used to encode the simplified mesh to generate the corresponding bitstream (Compressed base mesh bitstream). Next, the displacement vector (Update Displacements) is updated with the reconstructed simplified mesh. The updated displacement vector is subjected to wavelet transform (Wavelet Transform) to obtain the displacement coefficient. It is then packaged into images and videos (Image Packing, Video Packing) and encoded using High Efficiency Video Coding (H.265-HEVC) to generate a bitstream (Compressed displacements bitstream) of the displacement coefficient. For attribute map encoding, the feature map is first transformed (Texture Transfer) according to the difference between the reconstructed geometric information and the original geometric information, and then padded (Padding), packaged (Video Packing), and encoded using a video encoder to form an attribute bitstream (Compressed attribute bitstream).
图4为帧间编码的示意图,如图4所示,帧间编码器与帧内编码器流程大致相同,但帧间编码器并不直接对简化网格进行编码,而是编码当前帧的简化网格与参考帧的简化网格间的运动矢量(Motion Encoder),并生成相应的运动矢量的码流(Compressed motion bitstream)。Figure 4 is a schematic diagram of inter-frame coding. As shown in Figure 4, the inter-frame encoder and intra-frame encoder processes are roughly the same, but the inter-frame encoder does not directly encode the simplified grid, but encodes the motion vector between the simplified grid of the current frame and the simplified grid of the reference frame (Motion Encoder), and generates the corresponding motion vector bitstream (Compressed motion bitstream).
相应的,在解码过程中,解码器按照作用帧的类型不同,也可以分为帧内解码器和帧间解码器,分别用于执行帧内解码和帧间解码。Correspondingly, during the decoding process, the decoder can also be divided into an intra-frame decoder and an inter-frame decoder according to the type of the frame it acts on, which are used to perform intra-frame decoding and inter-frame decoding respectively.
图5为帧内解码的示意图,如图5所示,在帧内解码器中,可以采用静态网格解码器(Static Mesh Decoder)解码出简化网格。采用视频解码器(Video Decoder)解码出移位系数视频,并通过视频解包(Video Unpacking)和小波逆变换(Inverse Wavelet Transform)得到移位系数。通过解码得到的简化网格和移位系数得到解码的网格几何信息。属性图的解码则直接通过视频解码器进行解码。FIG5 is a schematic diagram of intra-frame decoding. As shown in FIG5, in the intra-frame decoder, a static mesh decoder (Static Mesh Decoder) can be used to decode the simplified mesh. The video decoder (Video Decoder) is used to decode the shift coefficient video, and the shift coefficient is obtained through video unpacking (Video Unpacking) and inverse wavelet transform (Inverse Wavelet Transform). The decoded mesh geometry information is obtained by decoding the simplified mesh and shift coefficient. The decoding of the attribute graph is directly decoded by the video decoder.
图6为帧间解码的示意图,如图6所示,对于帧间解码器,其流程与帧内解码器基本一致。除了不直接解码简化网格,而是解码运动矢量,并通过前一帧(参考帧)的简化网格计算得到当前帧的简化网 格。FIG6 is a schematic diagram of inter-frame decoding. As shown in FIG6, for an inter-frame decoder, the process is basically the same as that of an intra-frame decoder, except that the simplified grid is not decoded directly, but the motion vector is decoded, and the simplified grid of the current frame is calculated by the simplified grid of the previous frame (reference frame).
综上,目前运动图像专家组(Moving Picture Experts Group,MPEG)提供的动态网格编码(Dynamic Mesh Coding)的标准参考软件(下称标准参考软件)中,几何信息编码过程分为如下步骤:In summary, in the standard reference software for dynamic mesh coding (Dynamic Mesh Coding) provided by the Moving Picture Experts Group (MPEG) (hereinafter referred to as the standard reference software), the geometric information encoding process is divided into the following steps:
1、简化原始网格,具体表现为减少网格中的顶点数并简化连接关系。1. Simplify the original mesh, specifically by reducing the number of vertices in the mesh and simplifying the connection relationship.
2、细分步骤1中的简化网格,具体操作为对于步骤1中任意有连接关系的两个顶点,在其连线段的中点加入一个新的点,并重复2次。2. Subdivide the simplified mesh in step 1. For any two connected vertices in step 1, add a new point at the midpoint of the line segment connecting them, and repeat twice.
3、对于步骤2中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位向量(Displacement)。3. For each vertex in step 2, find the point in the original mesh that is closest to it and calculate the displacement vector between the two points.
4、采用现有的静态网络编码器如Draco对步骤1中的简化网格进行编码。4. Use an existing static network encoder such as Draco to encode the simplified grid in step 1.
5、根据步骤4所得到的重构简化网格对步骤3中的移位向量进行调整。5. Adjust the shift vector in step 3 according to the reconstructed simplified grid obtained in step 4.
6、对步骤5中的移位向量进行小波变换,并将小波变换后的移位向量(下称移位系数)组织成视频。6. Perform wavelet transform on the shift vector in step 5, and organize the shift vector after wavelet transform (hereinafter referred to as shift coefficient) into a video.
7、采用标准视频编码器如H.265对步骤6中的移位系数进行无损编码。7. Use a standard video encoder such as H.265 to losslessly encode the shift coefficients in step 6.
需要说明的是,参考软件在对移位向量进行小波变换,并将变换获得的移位系数组织成视频的过程中,会对移位系数采取从低频系数到高频系数的顺序进行组织,具体地,参考软件按照从低频到高频的顺序遍历变换后的移位向量,并按照Z字扫描的顺序将其组织成16×16大小的正方形块,最后按照光栅扫描的顺序将正方形块组织成视频帧。It should be noted that when the reference software performs wavelet transform on the shift vector and organizes the shift coefficients obtained by the transform into a video, the shift coefficients are organized in order from low-frequency coefficients to high-frequency coefficients. Specifically, the reference software traverses the transformed shift vector in order from low frequency to high frequency, and organizes it into 16×16 square blocks in the order of Z-scan, and finally organizes the square blocks into video frames in the order of raster scan.
然而在实验中,如上所述的移位系数组织方式并非最优的,进而会增大后续的无损编码移位系数的码率,降低了网格压缩性能。However, in experiments, the above-mentioned organization of shift coefficients is not optimal, which will increase the bit rate of subsequent lossless coding of shift coefficients and reduce the grid compression performance.
为了解决上述问题,本申请实施例提供了一种编解码方法,在解码端,解码器解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从移位系数信息中确定至少一个系数块;基于至少一个系数块,按照第二扫描顺序确定多个移位系数;根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。在编码端,编码器根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块;基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息;将移位系数信息写入码流。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。In order to solve the above problems, an embodiment of the present application provides a coding and decoding method. At the decoding end, the decoder decodes the bitstream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame. At the encoding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the bitstream. It can be seen that in the embodiment of the present application, when compressing the geometric information of the grid, the codec can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first and referenced when the low-frequency information with high complexity is subsequently processed. In other words, in the embodiment of the present application, a better organization strategy of the shift coefficients can be used to reduce the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
本申请实施例提供了一种包含解码方法和编码方法的编解码系统的网络架构,图7为本申请实施例提供的一种编解码的网络架构示意图。如图7所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限制。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。The embodiment of the present application provides a network architecture of a codec system including a decoding method and an encoding method, and FIG. 7 is a schematic diagram of a network architecture of a codec provided by the embodiment of the present application. As shown in FIG. 7, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During the implementation process, the electronic device can be various types of devices with codec functions, for example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., and the embodiment of the present application is not limited. Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
本申请的实施例提出了一种解码方法,图8为本申请实施例提出的解码方法的示意图,如图8所示,在本申请的实施例中,解码器进行解码处理的方法可以包括以下步骤:The embodiment of the present application proposes a decoding method. FIG8 is a schematic diagram of the decoding method proposed in the embodiment of the present application. As shown in FIG8, in the embodiment of the present application, the method for the decoder to perform decoding processing may include the following steps:
步骤101、解码码流,确定当前帧的移位系数信息。Step 101: Decode the code stream to determine the shift coefficient information of the current frame.
在本申请的实施例中,解码器可以先解码码流,从而可以确定当前帧的移位系数信息。In an embodiment of the present application, the decoder may first decode the code stream, so as to determine the shift coefficient information of the current frame.
需要说明的是,在本申请的实施例中,解码器可以为视频解码器,也可以为包括有视频解码器和网格解码器的任意解码装置。It should be noted that, in the embodiments of the present application, the decoder may be a video decoder, or may be any decoding device including a video decoder and a grid decoder.
进一步地,在本申请的实施例中,传输至解码器的码流可以为移位系数的码流,也可以为包括有移位系数的码流和简化网格的码流(或运动矢量的码流)的码流数据。Furthermore, in an embodiment of the present application, the code stream transmitted to the decoder may be a code stream of shift coefficients, or may be code stream data including a code stream of shift coefficients and a code stream of a simplified grid (or a code stream of motion vectors).
可以理解的是,在本申请的实施例中,当前帧可以为当前图像帧,也可以为当前视频帧。本申请不进行具体限定。It is understandable that, in the embodiment of the present application, the current frame may be a current image frame or a current video frame, which is not specifically limited in the present application.
需要说明的是,在本申请的实施例中,当前帧的移位系数信息可以包括由至少一个系数块构成的至少一个层次细节(Level of Details,LOD)。It should be noted that, in an embodiment of the present application, the shift coefficient information of the current frame may include at least one level of details (LOD) composed of at least one coefficient block.
可以理解的是,在本申请的实施例中,移位系数信息中的至少一个层次细节可以是按照由低频至高频的顺序排列的。其中,包括高频信息的层次细节位于包括低频信息的层次细节的左侧和/或上侧。It is understandable that, in the embodiment of the present application, at least one level detail in the shift coefficient information may be arranged in order from low frequency to high frequency, wherein the level detail including high frequency information is located to the left and/or above the level detail including low frequency information.
示例性的,在本申请的实施例中,图9为移位系数信息的示意图,如图9所示,在由三个层次细节 (LOD1、LOD2、LOD3)所构成的移位系数信息中,LOD1包括最低频信息,LOD2包括较高频信息,LOD3包括最高频信息。其中,包括最低频信息的LOD1最为复杂,而包括最高频信息的LOD3最为简单,包括最高频信息的LOD3位于包括最低频信息的LOD1左上侧。Exemplarily, in an embodiment of the present application, FIG9 is a schematic diagram of the shift coefficient information. As shown in FIG9, in the shift coefficient information composed of three levels of detail (LOD1, LOD2, LOD3), LOD1 includes the lowest frequency information, LOD2 includes higher frequency information, and LOD3 includes the highest frequency information. Among them, LOD1 including the lowest frequency information is the most complex, while LOD3 including the highest frequency information is the simplest, and LOD3 including the highest frequency information is located on the upper left side of LOD1 including the lowest frequency information.
进一步地,在本申请的实施例中,对于解码码流确定的移位系数信息,如果移位系数信息的行数小于预设高度阈值,那么可以选择按照预设数值和预设高度阈值对移位系数信息进行视频填补(Video Padding)。Furthermore, in an embodiment of the present application, for the shift coefficient information determined by the decoded code stream, if the number of rows of the shift coefficient information is less than a preset height threshold, then it is possible to choose to perform video padding (Video Padding) on the shift coefficient information according to a preset value and a preset height threshold.
可以理解的是,在本申请的实施例中,预设数值可以为大于0的整数,例如预设数值为512,预设高度阈值可以为网格序列中的最大高度,即网格序列中的位移系数的数量最大的一帧所对应的高度(行数)。It can be understood that in an embodiment of the present application, the preset value can be an integer greater than 0, for example, the preset value is 512, and the preset height threshold can be the maximum height in the grid sequence, that is, the height (number of rows) corresponding to a frame with the largest number of displacement coefficients in the grid sequence.
示例性的,在本申请的实施例中,如果当前帧的移位系数信息的行数小于网格序列中的位移系数的数量最大的一帧所对应的行数,即小于预设高度阈值,那么可以选择使用常数512进行视频填补,从而可以使得网格序列中的每一帧的高度(行数)均相同,即保证网格序列中的每一帧的高度恒定。Exemplarily, in an embodiment of the present application, if the number of rows of the shift coefficient information of the current frame is less than the number of rows corresponding to the frame with the largest number of displacement coefficients in the grid sequence, that is, less than the preset height threshold, then you can choose to use the constant 512 for video padding, so that the height (number of rows) of each frame in the grid sequence can be the same, that is, the height of each frame in the grid sequence is guaranteed to be constant.
需要说明的是,在本申请的实施例中,在标准参考软件中,可以将位移系数视频帧(或图像帧)的宽度为固定常数,而对于一个网格序列,其中的每一帧的位移系数的数量不一定相等,从而导致不同帧所形成的视频帧(或图像帧)的高度也不一定相等。因此,需要对高度较小的视频帧(或图像帧)进行填补,以保证位移系数视频中每一帧的高度恒定。It should be noted that in the embodiments of the present application, in the standard reference software, the width of the displacement coefficient video frame (or image frame) can be a fixed constant, and for a grid sequence, the number of displacement coefficients in each frame is not necessarily equal, so that the heights of the video frames (or image frames) formed by different frames are not necessarily equal. Therefore, it is necessary to fill the video frames (or image frames) with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant.
可以理解的是,在本申请的实施例中,第一位置可以为移位系数信息中的、最后一个LOD的上方的位置。这是由于在本申请中,移位系数信息中的层次细节是按照低频到高频的顺序依次排列在右下至左上的位置的,因此在进行视频填补时,可以选择在最后一个包括有高频信息的层次细节的上方进行填补处理。It is understandable that in the embodiment of the present application, the first position may be a position above the last LOD in the shift coefficient information. This is because in the present application, the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing video filling, it is possible to choose to perform filling processing above the last level detail including high frequency information.
示例性的,在本申请的实施例中,图10为视频填补的示意图一,如图10所示,常见的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在左上至右下的位置,那么在进行视频填补时,可以在最下方对当前帧的移位系数信息进行填补。Exemplarily, in an embodiment of the present application, Figure 10 is a schematic diagram of video filling. As shown in Figure 10, common shift coefficient information is arranged in order from low frequency to high frequency, and the hierarchical details are arranged from the upper left to the lower right. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the bottom.
示例性的,在本申请的实施例中,图11为视频填补的示意图二,如图11所示,本申请中的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在右下至左上的位置,那么在进行视频填补时,可以在最上方对当前帧的移位系数信息进行填补。Exemplarily, in an embodiment of the present application, Figure 11 is a second schematic diagram of video filling. As shown in Figure 11, the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged in sequence from the lower right to the upper left. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the top.
进一步地,在本申请的实施例中,对于解码码流确定的移位系数信息,如果移位系数信息中的最后一行存在空余部分,那么可以基于第二位置,按照预设数值对移位系数信息进行帧填补(Frame Padding)。Furthermore, in an embodiment of the present application, for the shift coefficient information determined by the decoded code stream, if there is a blank portion in the last row of the shift coefficient information, the shift coefficient information can be frame padded (Frame Padding) based on the second position according to a preset value.
可以理解的是,在本申请的实施例中,预设数值可以为大于0的整数,例如预设数值为512。It can be understood that, in the embodiment of the present application, the preset value may be an integer greater than 0, for example, the preset value is 512.
示例性的,在本申请的实施例中,如果当前帧的移位系数信息中的最后一行存在空余部分,那么可以选择使用常数512进行帧填补,从而可以使得网格序列中的每一帧对应的移位系数信息均为矩形的,即保证由至少一个LOD构成矩形的移位系数信息。Exemplarily, in an embodiment of the present application, if there is a blank portion in the last row of the shift coefficient information of the current frame, then the constant 512 can be selected for frame padding, so that the shift coefficient information corresponding to each frame in the grid sequence is rectangular, that is, the rectangular shift coefficient information is ensured to be composed of at least one LOD.
可以理解的是,在本申请的实施例中,第二位置可以为移位系数信息中的、最后一个LOD的左上方的位置。这是由于在本申请中,移位系数信息中的层次细节是按照低频到高频的顺序依次排列在右下至左上的位置的,因此在进行帧填补时,可以选择在最后一个包括有高频信息的层次细节的左上方进行填补处理。It can be understood that in the embodiment of the present application, the second position can be the upper left position of the last LOD in the shift coefficient information. This is because in the present application, the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing frame filling, the upper left position of the last level detail including high frequency information can be selected for filling processing.
示例性的,在本申请的实施例中,图12为帧填补的示意图一,如图12所示,常见的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在左上至右下的位置,那么在进行帧填补时,可以对当前帧的移位系数信息的右下角的空缺部分进行填补。Exemplarily, in an embodiment of the present application, Figure 12 is a schematic diagram of frame filling. As shown in Figure 12, common shift coefficient information arranges the hierarchical details from the upper left to the lower right in order from low frequency to high frequency. Then, when performing frame filling, the missing part in the lower right corner of the shift coefficient information of the current frame can be filled.
示例性的,在本申请的实施例中,图13为帧填补的示意图二,如图13所示,本申请中的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在右下至左上的位置,那么在进行帧填补时,可以对当前帧的移位系数信息的左上角的空缺部分进行填补。Exemplarily, in an embodiment of the present application, Figure 13 is a second schematic diagram of frame filling. As shown in Figure 13, the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged in sequence from the lower right to the upper left. Then, when performing frame filling, the missing part in the upper left corner of the shift coefficient information of the current frame can be filled.
步骤102、按照第一扫描顺序从移位系数信息中确定至少一个系数块。Step 102: Determine at least one coefficient block from the shifted coefficient information according to a first scanning order.
在本申请的实施例中,在通过解码码流确定当前帧的移位系数信息之后,解码器可以进一步按照第一扫描顺序,从移位系数信息中确定出至少一个系数块。In an embodiment of the present application, after determining the shift coefficient information of the current frame by decoding the code stream, the decoder may further determine at least one coefficient block from the shift coefficient information according to the first scanning order.
需要说明的是,在本申请的实施例中,基于移位系数信息中的层次细节的排列顺序,解码器可以按照第一扫描顺序依次遍历包括低频信息的层次细节和包括高频信息的层次细节。It should be noted that, in the embodiment of the present application, based on the arrangement order of the level details in the shift coefficient information, the decoder can sequentially traverse the level details including the low-frequency information and the level details including the high-frequency information in the first scanning order.
可以理解的是,在本申请的实施例中,第一扫描顺序可以为光栅扫描顺序的相反扫描顺序。其中,光栅扫描(RasterScan)是指从左往右,由上往下,先扫描完一行,再移至下一行起始位置继续扫描,常见的编解码流程使用的主要就是光栅扫描顺序。It is understandable that in the embodiment of the present application, the first scanning order may be the reverse scanning order of the raster scanning order. Raster scanning means scanning from left to right and from top to bottom, first scanning one row and then moving to the starting position of the next row to continue scanning. The common encoding and decoding process mainly uses the raster scanning order.
需要说明的是,在本申请的实施例中,当按照从低频到高频的顺序,依次将层次细节排列在左上至右下的位置时,往往可采用光栅扫描顺序从左上至右下依次扫描;而在本申请中,移位系数信息中的层 次细节则是按照低频到高频的顺序依次排列在右下至左上的位置的,相应的,在进行遍历扫描时,可以选择按照光栅扫描顺序的相反扫描顺序,从右下至左上依次扫描。It should be noted that, in the embodiments of the present application, when the hierarchical details are arranged from the upper left to the lower right in order from low frequency to high frequency, the raster scanning order can often be used to scan from the upper left to the lower right; and in the present application, the hierarchical details in the shift coefficient information are arranged from the lower right to the upper left in order from low frequency to high frequency. Accordingly, when performing a traversal scan, you can choose to scan from the lower right to the upper left in the opposite scanning order of the raster scanning order.
示例性的,在本申请的实施例中,图14为光栅扫描顺序的示意图,如图14所示,如果按照从低频到高频的顺序,依次将层次细节排列在左上至右下的位置,那么可以按照光栅扫描顺序,从左上至右下依次遍历LOD1、LOD2、LOD3。Exemplarily, in an embodiment of the present application, Figure 14 is a schematic diagram of the raster scanning order. As shown in Figure 14, if the level details are arranged from the upper left to the lower right in order from low frequency to high frequency, then LOD1, LOD2, and LOD3 can be traversed in sequence from the upper left to the lower right in accordance with the raster scanning order.
示例性的,在本申请的实施例中,图15为第一扫描顺序的示意图,如图15所示,如果按照从低频到高频的顺序,依次将层次细节排列在右下至左上的位置,那么可以按照第一扫描顺序,从右下至左上依次遍历LOD1、LOD2、LOD3。Exemplarily, in an embodiment of the present application, Figure 15 is a schematic diagram of the first scanning order. As shown in Figure 15, if the hierarchical details are arranged from the lower right to the upper left in order from low frequency to high frequency, then LOD1, LOD2, and LOD3 can be traversed in sequence from the lower right to the upper left according to the first scanning order.
可以理解的是,在本申请的实施例中,由于每一个层次细节都是由至少一个系数块构成的,因此在按照第一扫描顺序遍历移位系数信息中的全部层次细节之后,可以确定至少一个系数块。It can be understood that in the embodiment of the present application, since each level of detail is composed of at least one coefficient block, at least one coefficient block can be determined after traversing all the level details in the shift coefficient information in the first scanning order.
可以理解的是,在本申请的实施例中,系数块可以为包括至少一个单元块的正方形块;其中,每一个单元块都可以由2×2个移位系数构成。It can be understood that, in the embodiments of the present application, the coefficient block may be a square block including at least one unit block; wherein each unit block may be composed of 2×2 shift coefficients.
示例性的,在本申请的实施例中,图16为单元块的示意图,如图16所示,每一个单元块均可以包括4个移位系数,如移位系数1-4,其中,4个移位系数按照2行2列的排列方式构成正方形的单元块。Exemplarily, in an embodiment of the present application, Figure 16 is a schematic diagram of a unit block. As shown in Figure 16, each unit block may include 4 shift coefficients, such as shift coefficients 1-4, wherein the 4 shift coefficients are arranged in 2 rows and 2 columns to form a square unit block.
进一步地,在本申请的实施例中,单元块中的移位系数,可以按照低频至高频的顺序排列,其中,高频的移位系数位于低频的移位系数的左侧和/或上侧。Further, in an embodiment of the present application, the shift coefficients in the unit block may be arranged in order from low frequency to high frequency, wherein the high frequency shift coefficients are located to the left and/or above the low frequency shift coefficients.
示例性的,在本申请的实施例中,如图16所示,单元块中的4个移位系数中,移位系数1-4依次从低频至高频,因此,移位系数1位于右下角,移位系数4位于左上角。Exemplarily, in an embodiment of the present application, as shown in FIG16 , among the four shift coefficients in the unit block, shift coefficients 1-4 are arranged from low frequency to high frequency in sequence, so shift coefficient 1 is located in the lower right corner and shift coefficient 4 is located in the upper left corner.
需要说明的是,在本申请的实施例中,系数块的尺寸大小可以为单元块的任意整数倍,本申请不进行具体限定。It should be noted that, in the embodiments of the present application, the size of the coefficient block can be any integer multiple of the unit block, and the present application does not make any specific limitation.
示例性的,在本申请的实施例中,图17为系数块的示意图一,图18为系数块的示意图二,如图17和图18所示,系数块的大小可以为16×16,即由4个单元块构成的,也可以为32×32,即由16个单元块构成的。Exemplarily, in an embodiment of the present application, Figure 17 is a schematic diagram 1 of a coefficient block, and Figure 18 is a schematic diagram 2 of a coefficient block. As shown in Figures 17 and 18, the size of the coefficient block can be 16×16, that is, composed of 4 unit blocks, or 32×32, that is, composed of 16 unit blocks.
步骤103、基于至少一个系数块,按照第二扫描顺序确定多个移位系数。Step 103: Determine a plurality of shift coefficients based on at least one coefficient block in a second scanning order.
在本申请的实施例中,在按照第一扫描顺序从移位系数信息中确定至少一个系数块之后,解码器可以进一步基于至少一个系数块,按照第二扫描顺序确定出多个移位系数。In an embodiment of the present application, after determining at least one coefficient block from the shift coefficient information according to a first scanning order, the decoder may further determine a plurality of shift coefficients according to a second scanning order based on the at least one coefficient block.
进一步地,在本申请的实施例中,基于系数块中的移位系数的排列顺序,解码器可以按照第二扫描顺序依次遍历系数块中的低频移位系数和高频移位系数。Further, in an embodiment of the present application, based on the arrangement order of the shift coefficients in the coefficient block, the decoder may sequentially traverse the low-frequency shift coefficients and the high-frequency shift coefficients in the coefficient block according to the second scanning order.
需要说明的是,在本申请的实施例中,第二扫描顺序可以为Z字形扫描顺序的相反扫描顺序。其中,Z字形扫描(Z-Scan)中Z是形象的表示方式,Z字形扫描顺序保证了对于不同分割都能按照相同的遍历顺序进行寻址,有利于程序中的递归实现。It should be noted that, in the embodiment of the present application, the second scanning order may be the reverse scanning order of the zigzag scanning order. The Z in the zigzag scanning (Z-Scan) is a figurative representation, and the zigzag scanning order ensures that different partitions can be addressed in the same traversal order, which is conducive to the recursive implementation in the program.
需要说明的是,在本申请的实施例中,当按照从低频到高频的顺序,依次将移位系数构成的单元块排列在左上至右下的位置时,往往可采用Z字形扫描顺序从左上至右下依次扫描;而在本申请中,系数块中的单元块的移位系数则是按照低频到高频的顺序依次排列在右下至左上的位置的,相应的,在进行遍历扫描时,可以选择按照Z字形扫描顺序的相反扫描顺序,从右下至左上依次扫描。It should be noted that, in the embodiments of the present application, when the unit blocks composed of the shift coefficients are arranged in order from the upper left to the lower right in order from low frequency to high frequency, a Z-shaped scanning order is often used to scan from the upper left to the lower right; while in the present application, the shift coefficients of the unit blocks in the coefficient block are arranged in order from the lower right to the upper left in order from low frequency to high frequency. Accordingly, when performing a traversal scan, you can choose to scan from the lower right to the upper left in the opposite scanning order of the Z-shaped scanning order.
示例性的,在本申请的实施例中,图19为Z字形扫描顺序的示意图,如图19所示,如果按照从低频到高频的顺序,依次将移位系数构成的单元块排列在左上至右下的位置,那么可以按照Z字形扫描顺序,从左上至右下依次遍历每一个单元块以及每一个单元块中的移位系数。即系数块中的单元块的扫描是按照Z字形扫描顺序进行的,同时每一个单元块中的移位系数的扫描也是按照Z字形扫描顺序进行的。Exemplarily, in an embodiment of the present application, FIG. 19 is a schematic diagram of a zigzag scanning sequence. As shown in FIG. 19 , if the unit blocks composed of the shift coefficients are arranged in order from the upper left to the lower right in order from low frequency to high frequency, then each unit block and the shift coefficients in each unit block can be traversed in order from the upper left to the lower right in accordance with the zigzag scanning sequence. That is, the scanning of the unit blocks in the coefficient block is performed in a zigzag scanning sequence, and the scanning of the shift coefficients in each unit block is also performed in a zigzag scanning sequence.
示例性的,在本申请的实施例中,图20为第二扫描顺序的示意图,如图20所示,如果按照从低频到高频的顺序,依次将移位系数构成的单元块排列在右下至左上的位置,那么可以按照第二扫描顺序,从右下至左上依次遍历每一个单元块以及每一个单元块中的移位系数。即系数块中的单元块的扫描是按照第二扫描顺序进行的,同时每一个单元块中的移位系数的扫描也是按照第二扫描顺序进行的。Exemplarily, in an embodiment of the present application, FIG. 20 is a schematic diagram of the second scanning order. As shown in FIG. 20, if the unit blocks composed of the shift coefficients are arranged in order from the lower right to the upper left in order from low frequency to high frequency, then each unit block and the shift coefficients in each unit block can be traversed in order from the lower right to the upper left in accordance with the second scanning order. That is, the scanning of the unit blocks in the coefficient block is performed in accordance with the second scanning order, and the scanning of the shift coefficients in each unit block is also performed in accordance with the second scanning order.
可以理解的是,在本申请的实施例中,由于每一个系数块中的单元块都是由至少一个移位系数(如4个移位系数)构成的,因此在按照第二扫描顺序遍历系数块中的全部单元块之后,可以确定多个移位系数。It can be understood that in the embodiments of the present application, since the unit blocks in each coefficient block are composed of at least one shift coefficient (such as 4 shift coefficients), multiple shift coefficients can be determined after traversing all the unit blocks in the coefficient block according to the second scanning order.
步骤104、根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。Step 104: Determine a reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
在本申请的实施例中,在基于至少一个系数块,按照第二扫描顺序确定多个移位系数之后,解码器可以进一步根据多个移位系数和当前帧的简化网格,确定出当前帧的重构原始网格。In an embodiment of the present application, after determining multiple shift coefficients according to the second scanning order based on at least one coefficient block, the decoder can further determine the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
进一步地,在本申请的实施例中,在确定出当前帧对应的多个移位系数之后,可以进一步根据多个移位系数确定对应的多个移位向量;然后便可以基于多个移位向量和简化网格进行几何信息的重构处 理,从而确定当前帧的重构原始网格。Furthermore, in an embodiment of the present application, after determining the multiple shift coefficients corresponding to the current frame, the corresponding multiple shift vectors can be further determined based on the multiple shift coefficients; then, the geometric information can be reconstructed based on the multiple shift vectors and the simplified grid to determine the reconstructed original grid of the current frame.
需要说明的是,在本申请的实施例中,由于移位系数是移位向量经过小波变换后所生成的,因此,可以选择分别对多个移位系数进行小波逆变换处理,从而可以确定出对应的多个移位向量。It should be noted that, in the embodiment of the present application, since the shift coefficient is generated by the shift vector after wavelet transformation, it is possible to select to perform wavelet inverse transformation on multiple shift coefficients respectively, so as to determine multiple corresponding shift vectors.
需要说明的是,在本申请的实施例中,在根据多个移位向量和当前帧的简化网格进行几何信息的重构处理时,可以先对简化网格进行细分处理,确定当前帧的细分网格;然后便可以按照多个移位向量和细分网格,确定重构原始网格。It should be noted that in an embodiment of the present application, when reconstructing geometric information based on multiple shift vectors and a simplified grid of a current frame, the simplified grid can be subdivided first to determine the subdivided grid of the current frame; then the reconstructed original grid can be determined according to the multiple shift vectors and the subdivided grids.
可以理解的是,在本申请的实施例中,移位向量是通过当前帧的原始网格和细分网格获得的,因此在确定移位向量和细分网格网格之后,便可以基于移位向量和细分网格进一步完成对几何信息的重构,获得当前帧对应的重构原始网格。It can be understood that in an embodiment of the present application, the shift vector is obtained through the original grid and the subdivided grid of the current frame. Therefore, after determining the shift vector and the subdivided grid, the geometric information can be further reconstructed based on the shift vector and the subdivided grid to obtain the reconstructed original grid corresponding to the current frame.
进一步地,在本申请的实施例中,当前帧的简化网格可以是通过网格解码器获得的,其中,网格解码器解码码流,从而可以直接或者间接确定出当前帧对应的简化网格。Further, in an embodiment of the present application, the simplified grid of the current frame may be obtained through a grid decoder, wherein the grid decoder decodes the bitstream, thereby directly or indirectly determining the simplified grid corresponding to the current frame.
可以理解的是,在本申请的实施例中,本申请提出的编解码方法,既可以应用于帧内编解码,也可以应用于帧间编解码。本申请不进行具体限定。It is understandable that, in the embodiments of the present application, the coding and decoding method proposed in the present application can be applied to both intra-frame coding and decoding and inter-frame coding and decoding, which is not specifically limited in the present application.
需要说明的是,在本申请的实施例中,对于帧内编解码,网格解码器可以解码码流,获得对应的当前帧的简化网格。It should be noted that, in the embodiment of the present application, for intra-frame coding and decoding, the grid decoder can decode the code stream to obtain a simplified grid of the corresponding current frame.
相应的,在本申请的实施例中,对于帧内编解码,网格解码器可以接收编码端传输的简化网格的码流,并通过解码简化网格的码流确定当前帧的简化网格。Accordingly, in an embodiment of the present application, for intra-frame coding and decoding, the grid decoder can receive a code stream of a simplified grid transmitted by the encoding end, and determine a simplified grid of the current frame by decoding the code stream of the simplified grid.
需要说明的是,在本申请的实施例中,对于帧间编解码,网格解码器可以解码码流,获得对应的当前帧的运动矢量,然后可以进一步基于运动矢量确定当前帧的简化网格。It should be noted that, in an embodiment of the present application, for inter-frame coding and decoding, the grid decoder can decode the code stream to obtain the corresponding motion vector of the current frame, and then can further determine the simplified grid of the current frame based on the motion vector.
相应的,在本申请的实施例中,对于帧间编解码,网格解码器可以接收编码端传输的运动矢量的码流,并通过解码运动矢量的码流确定当前帧的运动矢量,进而可以利用当前帧的运动矢量和已解码的前一帧(参考帧)的简化网格,进一步确定出当前帧的简化网格。Correspondingly, in an embodiment of the present application, for inter-frame coding and decoding, the grid decoder can receive the code stream of the motion vector transmitted by the encoding end, and determine the motion vector of the current frame by decoding the code stream of the motion vector, and then use the motion vector of the current frame and the simplified grid of the decoded previous frame (reference frame) to further determine the simplified grid of the current frame.
综上所述,通过上述步骤101至步骤104所提出的解码方法,采用了一种动态网格编解码中的移位系数的组织方法,改变了小波变换后的移位系数的组织顺序,使用反向Z字扫描顺序和光栅扫描相反的顺序进行移位系数的组织,进而减少无损编码移位系数所需要的码率。In summary, the decoding method proposed by the above steps 101 to 104 adopts a method of organizing shift coefficients in dynamic grid encoding and decoding, changes the organization order of shift coefficients after wavelet transform, and uses a reverse Z-shaped scanning order and an order opposite to the raster scanning order to organize the shift coefficients, thereby reducing the bit rate required for lossless coding of shift coefficients.
需要说明的是,为了展示本申请实施例提出的编解码方法在实际应用中的有益效果,在MPEG测试序列中对本申请实施例提出的移位系数组织方法进行了测试,并于标准参考软件所采用的方法进行了对比,对比结果如表1所示。序列中本方案在MPEG测试序列中的测试结果如表1所示。表中AI,RA分别表示全帧内(All Intra)编码模式以及随机接入(Random Access)编码模式。R1-R5分别为MPEG通用测试条件中所规定的5个码率点。由表1可见,相比于标准参考软件所采用的移位系数组织方法,采用本请实施例提出的移位系数的组织方法可以使编码位移系数所需要的码率在R1-R3均有所减少,R4-R5有轻微增加。同时,本发明所述方案不会增加编解码复杂度,因此具有实用价值。It should be noted that, in order to demonstrate the beneficial effects of the coding and decoding method proposed in the embodiment of the present application in practical applications, the shift coefficient organization method proposed in the embodiment of the present application was tested in the MPEG test sequence and compared with the method adopted by the standard reference software. The comparison results are shown in Table 1. The test results of this scheme in the MPEG test sequence are shown in Table 1. In the table, AI and RA respectively represent the All Intra coding mode and the Random Access coding mode. R1-R5 are the five bit rate points specified in the MPEG general test conditions. It can be seen from Table 1 that compared with the shift coefficient organization method adopted by the standard reference software, the shift coefficient organization method proposed in the present embodiment can reduce the bit rate required for encoding the displacement coefficient in R1-R3, and slightly increase R4-R5. At the same time, the scheme described in the present invention does not increase the complexity of coding and decoding, so it has practical value.
表1Table 1
Figure PCTCN2022126026-appb-000001
Figure PCTCN2022126026-appb-000001
本申请实施例提出了一种解码方法,在解码端,解码器解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从移位系数信息中确定至少一个系数块;基于至少一个系数块,按照第二扫描顺序确定多个移位系数;根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiment of the present application proposes a decoding method, at the decoding end, the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; and determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame. It can be seen that in the embodiment of the present application, when compressing the geometric information of the grid, the codec can traverse the shift coefficient based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
基于上述实施例,本申请的再一实施例提出了一种解码方法,该解码方法应用于解码器,其中,解码器可以包括视频解码器和网格解码器。Based on the above embodiments, yet another embodiment of the present application proposes a decoding method, which is applied to a decoder, wherein the decoder may include a video decoder and a grid decoder.
需要说明的是,在本申请的实施例中,解码方法可以用于帧内解码,也可以用于帧间解码。本申请 不进行具体限定。It should be noted that, in the embodiments of the present application, the decoding method can be used for intra-frame decoding or inter-frame decoding, which is not specifically limited in the present application.
进一步地,在本申请的实施例中,网格解码器可以用于解码码流,确定当前帧的简化网格。其中,在进行帧内解码时,传输至网格解码器的码流可以为简化网格的码流,此时,网格解码器可以解码码流,获得对应的当前帧的简化网格。在进行帧间解码时,传输至网格解码器的码流可以为运动矢量的码流,此时,网格解码器可以解码码流,确定当前帧的运动矢量,进而可以利用当前帧的运动矢量和已解码的前一帧(参考帧)的简化网格,进一步确定出当前帧的简化网格。Further, in an embodiment of the present application, the grid decoder can be used to decode the code stream and determine the simplified grid of the current frame. Wherein, when performing intra-frame decoding, the code stream transmitted to the grid decoder can be a code stream of a simplified grid. In this case, the grid decoder can decode the code stream to obtain the corresponding simplified grid of the current frame. When performing inter-frame decoding, the code stream transmitted to the grid decoder can be a code stream of motion vectors. In this case, the grid decoder can decode the code stream to determine the motion vector of the current frame, and then the motion vector of the current frame and the simplified grid of the decoded previous frame (reference frame) can be used to further determine the simplified grid of the current frame.
需要说明的是,在本申请的实施例中,在通过网格解码器确定当前帧的简化网格之后,视频解码器便可以利用简化网格,进一步完成对当前帧的原始网格的重构。其中,视频解码器可以先解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从移位系数信息中确定至少一个系数块;基于至少一个系数块,按照第二扫描顺序确定多个移位系数;根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。It should be noted that, in the embodiment of the present application, after the simplified grid of the current frame is determined by the grid decoder, the video decoder can use the simplified grid to further complete the reconstruction of the original grid of the current frame. The video decoder can first decode the bitstream to determine the shift coefficient information of the current frame; determine at least one coefficient block from the shift coefficient information according to a first scanning order; determine multiple shift coefficients according to a second scanning order based on the at least one coefficient block; and determine the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame.
可以理解的是,在本申请的实施例中,第一扫描顺序包括光栅扫描顺序的相反扫描顺序。第二扫描顺序包括Z字形扫描顺序的相反扫描顺序。It can be understood that, in the embodiment of the present application, the first scanning order includes the reverse scanning order of the raster scanning order, and the second scanning order includes the reverse scanning order of the zigzag scanning order.
进一步地,在本申请的实施例中,解码器可以根据所述多个移位系数确定对应的多个移位向量;然后基于所述多个移位向量和所述简化网格,确定所述重构原始网格。其中,解码器可以对所述多个移位系数进行小波逆变换处理,确定所述多个移位向量。Further, in an embodiment of the present application, the decoder may determine a plurality of corresponding shift vectors according to the plurality of shift coefficients, and then determine the reconstructed original grid based on the plurality of shift vectors and the simplified grid. The decoder may perform inverse wavelet transform processing on the plurality of shift coefficients to determine the plurality of shift vectors.
可以理解的是,在本申请的实施例中,解码器可以先对所述简化网格进行细分处理,确定当前帧的细分网格;然后按照所述多个移位向量和所述细分网格,确定所述重构原始网格。It can be understood that, in an embodiment of the present application, the decoder may first subdivide the simplified grid to determine the subdivided grid of the current frame; and then determine the reconstructed original grid according to the multiple shift vectors and the subdivided grid.
需要说明的是,在本申请的实施例中,所述系数块为包括至少一个单元块的正方形块;其中,所述单元块由2×2个移位系数构成。单元块中的移位系数,按照低频至高频的顺序排列,其中,高频的移位系数位于低频的移位系数的左侧和/或上侧。It should be noted that, in the embodiment of the present application, the coefficient block is a square block including at least one unit block; wherein the unit block is composed of 2×2 shift coefficients. The shift coefficients in the unit block are arranged in order from low frequency to high frequency, wherein the high frequency shift coefficient is located to the left and/or above the low frequency shift coefficient.
需要说明的是,在本申请的实施例中,所述移位系数信息包括由所述至少一个系数块构成的至少一个LOD。所述至少一个LOD按照低频至高频的顺序排列,其中,包括高频信息的LOD位于包括低频信息的LOD的左侧和/或上侧。It should be noted that, in an embodiment of the present application, the shift coefficient information includes at least one LOD composed of the at least one coefficient block. The at least one LOD is arranged in order from low frequency to high frequency, wherein the LOD including high frequency information is located on the left and/or above the LOD including low frequency information.
进一步地,在本申请的实施例中,若所述移位系数信息的行数小于预设高度阈值,则,按照预设数值和所述预设高度阈值对所述移位系数信息进行视频填补;其中,所述第一位置包括所述移位系数信息中的、最后一个LOD的上方的位置。Further, in an embodiment of the present application, if the number of rows of the shift coefficient information is less than a preset height threshold, the shift coefficient information is video padded according to a preset value and the preset height threshold; wherein the first position includes a position above the last LOD in the shift coefficient information.
进一步地,在本申请的实施例中,若所述移位系数信息中的最后一行存在空余部分,则基于第二位置,按照所述预设数值对所述移位系数信息进行帧填补;其中,所述第二位置包括所述移位系数信息中的、最后一个LOD的左上方的位置。Furthermore, in an embodiment of the present application, if there is a blank portion in the last row of the shift coefficient information, the shift coefficient information is frame-filled according to the preset value based on the second position; wherein the second position includes the upper left position of the last LOD in the shift coefficient information.
由此可见,本申请实施例提出的编解码方法,可以为一种动态网格编解码中的移位系数的组织方法,通过改变标准参考软件中小波变换后移位向量(移位系数)的组织顺序,进而减少无损编码移位向量(移位系数)所需要的码率。It can be seen that the coding and decoding method proposed in the embodiment of the present application can be a method for organizing shift coefficients in dynamic grid coding and decoding, which reduces the bit rate required for lossless coding shift vectors (shift coefficients) by changing the organization order of shift vectors (shift coefficients) after wavelet transform in the standard reference software.
可以理解的是,在本申请的实施例中,在对移位系数进行组织时,可以按照由低频到高频的顺序遍历小波变换后的移位向量(移位系数),并按照反向Z字扫描的顺序(第二扫描顺序)将其组织成16×16大小的正方形块(系数块)。接着,可以将组织好的正方形块按照光栅扫描的相反的顺序(第一扫描顺序,即从右下到左上的顺序)进行拼接。最后,对于最上面一行的空余部分,用常数512(预设数值)进行填补,形成矩形视频帧。同时,若当前视频帧的行数小于序列所有视频帧的最大行数(预设高度阈值),对于空余部分,用常数512(预设数值)进行填补。It can be understood that in the embodiments of the present application, when organizing the shift coefficients, the shift vectors (shift coefficients) after the wavelet transform can be traversed in order from low frequency to high frequency, and organized into 16×16 square blocks (coefficient blocks) in the order of reverse Z-shaped scanning (second scanning order). Then, the organized square blocks can be spliced in the opposite order of raster scanning (first scanning order, i.e., from the lower right to the upper left). Finally, the empty part of the top row is filled with a constant 512 (preset value) to form a rectangular video frame. At the same time, if the number of rows of the current video frame is less than the maximum number of rows of all video frames in the sequence (preset height threshold), the empty part is filled with a constant 512 (preset value).
示例性的,在本申请的实施例中,图21为移位系数的示意图,图22为组织移位系数的示意图一,如图21和图22所示,可以在系数块内采用反向Z字扫描方法。其中,图21为按照由低频系数到高频系数的顺序遍历移位系数,图22表示在16×16(单元块为4×4)的块内按照反向Z字扫描的顺序组织移位系数。Exemplarily, in an embodiment of the present application, FIG. 21 is a schematic diagram of a shift coefficient, and FIG. 22 is a schematic diagram of organizing a shift coefficient. As shown in FIG. 21 and FIG. 22, a reverse Z-shaped scanning method may be used in a coefficient block. FIG. 21 traverses the shift coefficients in the order from low-frequency coefficients to high-frequency coefficients, and FIG. 22 shows that the shift coefficients are organized in the order of reverse Z-shaped scanning in a 16×16 (unit block is 4×4) block.
示例性的,在本申请的实施例中,图23为组织移位系数的示意图二,图24为组织移位系数的示意图三,如图23和图24所示,LOD(Level of Details)1-3分别为包含不同频率信息的移位系数。LOD1包含最低频信息,而LOD3包含最高频信息。可见,包含低频信息的部分较为复杂,而包含高频信息的部分较为简单。Exemplarily, in an embodiment of the present application, FIG. 23 is a schematic diagram of the tissue shift coefficient 2, and FIG. 24 is a schematic diagram of the tissue shift coefficient 3. As shown in FIG. 23 and FIG. 24, LOD (Level of Details) 1-3 are shift coefficients containing different frequency information, respectively. LOD1 contains the lowest frequency information, and LOD3 contains the highest frequency information. It can be seen that the part containing the low-frequency information is more complex, while the part containing the high-frequency information is simpler.
目前常见的标准参考软件所采用方法如图23所示,采用光栅扫描的顺序,即从左上角开始,从左上到右下的顺序按从低频到高频组织移位系数。而本申请实施例所采用的与光栅扫描相反的顺序,从右下角开始,从右下到左上按从低频到高频组织移位系数。The method currently used by the common standard reference software is shown in Figure 23, which uses a raster scanning order, that is, starting from the upper left corner, and organizing the shift coefficients from low frequency to high frequency in the order from upper left to lower right. The embodiment of the present application uses the opposite order of raster scanning, starting from the lower right corner, and organizing the shift coefficients from low frequency to high frequency in the order from lower right to upper left.
由于LOD1-3所包含的正方形块并不一定能组成矩形的视频帧,因此需要对空余的部分进行填补。相应的,在进行帧填补(Frame Padding)时,在标准参考软件中,如图23所示,对右下角的空缺部分 进行了填补,而本申请实施例中,则对左上角的空缺部分进行了填补。Since the square blocks included in LOD1-3 may not necessarily form a rectangular video frame, the empty parts need to be filled. Accordingly, when performing frame padding, in the standard reference software, as shown in FIG. 23 , the empty part in the lower right corner is filled, while in the embodiment of the present application, the empty part in the upper left corner is filled.
对于一个网格序列,其每一帧的位移系数的数量不一定相等,从而导致对于每一帧,经过移位系数组织之后所形成的视频帧高度也不一定相等(在标准参考软件中,位移系数视频帧的宽度为固定常数)。因此,需要对高度较小的视频帧进行填补,以保证位移系数视频中每一帧的高度恒定。相应的,在进行视频填补(Video Padding)时,在标准参考软件中,如图23所示,在下方对视频帧进行填补,而本申请实施例中,则在下方对视频帧进行填补。For a grid sequence, the number of displacement coefficients of each frame is not necessarily equal, which results in that for each frame, the height of the video frame formed after the displacement coefficient organization is not necessarily equal (in the standard reference software, the width of the displacement coefficient video frame is a fixed constant). Therefore, it is necessary to pad the video frames with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant. Accordingly, when performing video padding, in the standard reference software, as shown in FIG. 23 , the video frame is padded at the bottom, while in the embodiment of the present application, the video frame is padded at the bottom.
本申请实施例提出了一种解码方法,在解码端,解码器解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从移位系数信息中确定至少一个系数块;基于至少一个系数块,按照第二扫描顺序确定多个移位系数;根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiment of the present application proposes a decoding method, at the decoding end, the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; and determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame. It can be seen that in the embodiment of the present application, when compressing the geometric information of the grid, the codec can traverse the shift coefficient based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
本申请的实施例提出了一种编码方法,图25为本申请实施例提出的编码方法的示意图,如图25所示,在本申请的实施例中,编码器进行编码处理的方法可以包括以下步骤:The embodiment of the present application proposes an encoding method. FIG. 25 is a schematic diagram of the encoding method proposed in the embodiment of the present application. As shown in FIG. 25 , in the embodiment of the present application, the method for the encoder to perform encoding processing may include the following steps:
步骤201、根据当前帧的多个移位向量确定对应的多个移位系数。Step 201: Determine a plurality of corresponding shift coefficients according to a plurality of shift vectors of a current frame.
在本申请的实施例中,编码器可以先根据当前帧的多个移位向量,确定出对应的当前帧的多个移位系数。In an embodiment of the present application, the encoder may first determine a plurality of corresponding shift coefficients of the current frame according to a plurality of shift vectors of the current frame.
需要说明的是,在本申请的实施例中,编码器可以为视频编码器,也可以为包括有视频编码器和网格编码器的任意编码装置。It should be noted that, in the embodiments of the present application, the encoder may be a video encoder, or may be any encoding device including a video encoder and a grid encoder.
可以理解的是,在本申请的实施例中,当前帧可以为当前图像帧,也可以为当前视频帧。本申请不进行具体限定。It is understandable that, in the embodiments of the present application, the current frame may be a current image frame or a current video frame, which is not specifically limited in the present application.
进一步地,在本申请的实施例中,在利用移位向量确定对应的移位系数时,编码器可以选择分别对多个移位向量进行小波变换处理,从而可以确定多个移位系数。Further, in an embodiment of the present application, when using a shift vector to determine a corresponding shift coefficient, the encoder may choose to perform wavelet transform processing on a plurality of shift vectors respectively, so as to determine a plurality of shift coefficients.
需要说明的是,在本申请的实施例中,移位向量可以为通过当前帧的细化网格和当前帧的原始网格确定的;其中,原始网格经过简化处理后确定对应的简化网格,简化网格经过细化处理后确定对应的细化网格。It should be noted that, in an embodiment of the present application, the shift vector can be determined by the refined grid of the current frame and the original grid of the current frame; wherein the original grid is simplified to determine the corresponding simplified grid, and the simplified grid is refined to determine the corresponding refined grid.
可以理解的是,在本申请的实施例中,在预处理过程中,可以先对当前帧的原始网格(Original Mesh)进行简化,得到简化网格(Decimated Mesh),或称基本网格(Base Mesh)。然后可以对简化网格进行细分,得到细分网格(Subdivided Mesh)。最后对于细分网格中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位向量(Displacement)。It is understandable that in the embodiment of the present application, in the preprocessing process, the original mesh of the current frame can be simplified to obtain a simplified mesh (Decimated Mesh), or a base mesh (Base Mesh). Then the simplified mesh can be subdivided to obtain a subdivided mesh (Subdivided Mesh). Finally, for each vertex in the subdivided mesh, the point closest to it in the original mesh is found, and the displacement vector (Displacement) of the two points is calculated.
进一步地,在本申请的实施例中,本申请提出的编解码方法,既可以应用于帧内编解码,也可以应用于帧间编解码。本申请不进行具体限定。Furthermore, in the embodiments of the present application, the coding and decoding method proposed in the present application can be applied to both intra-frame coding and decoding and inter-frame coding and decoding. The present application does not make any specific limitation.
需要说明的是,在本申请的实施例中,对于帧内编解码,网格编码器可以对当前帧的简化网格进行编码,获得简化网格的码流。It should be noted that, in the embodiments of the present application, for intra-frame coding and decoding, the grid encoder can encode the simplified grid of the current frame to obtain a code stream of the simplified grid.
相应的,在本申请的实施例中,对于帧内编解码,视频编码器可以先利用已经生成的简化网格的码流确定当前帧的重构简化网络;然后可以通过重构简化网格对移位向量进行更新处理。Correspondingly, in an embodiment of the present application, for intra-frame coding and decoding, the video encoder may first determine the reconstructed simplified network of the current frame using the bitstream of the simplified grid that has been generated; and then the shift vector may be updated by reconstructing the simplified grid.
也就是说,在本申请的实施例中,在网格编码器完成对当前帧的简化网格的编码,生成简化网格的码流之后,视频编码器可以利用该简化网格的码流完成对简化网格的重构,并利用重构简化网格完成对移位向量的更新。That is to say, in an embodiment of the present application, after the grid encoder completes encoding of the simplified grid of the current frame and generates a code stream of the simplified grid, the video encoder can use the code stream of the simplified grid to complete the reconstruction of the simplified grid, and use the reconstructed simplified grid to complete the update of the shift vector.
需要说明的是,在本申请的实施例中,对于帧间编解码,网格编码器可以对当前帧的运动矢量进行编码,获得运动矢量的码流。It should be noted that, in the embodiment of the present application, for inter-frame coding and decoding, the grid encoder can encode the motion vector of the current frame to obtain a code stream of the motion vector.
相应的,在本申请的实施例中,对于帧间编解码,视频编码器可以先利用已经生成的运动矢量的码流确定当前帧的运动矢量,然后再根据运动矢量进一步确定当前帧的重构简化网络;最后便可以通过重构简化网格对移位向量进行更新处理。Correspondingly, in an embodiment of the present application, for inter-frame coding and decoding, the video encoder can first use the bit stream of the motion vector that has been generated to determine the motion vector of the current frame, and then further determine the reconstructed simplified network of the current frame based on the motion vector; finally, the shift vector can be updated by reconstructing the simplified grid.
也就是说,在本申请的实施例中,在网格编码器完成对当前帧的运动矢量的编码,生成运动矢量的码流之后,视频编码器可以利用该运动矢量的码流完成对简化网格的重构,并利用重构简化网格完成对移位向量的更新。That is to say, in an embodiment of the present application, after the grid encoder completes encoding of the motion vector of the current frame and generates a bit stream of the motion vector, the video encoder can use the bit stream of the motion vector to reconstruct the simplified grid, and use the reconstructed simplified grid to update the shift vector.
可以理解的是,在本申请的实施例中,编码器可以可以利用当前帧的运动矢量和已重构的前一帧 (参考帧)的重构简化网格,进一步确定出当前帧的重构简化网格。It can be understood that in an embodiment of the present application, the encoder can use the motion vector of the current frame and the reconstructed simplified grid of the reconstructed previous frame (reference frame) to further determine the reconstructed simplified grid of the current frame.
步骤202、按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块。Step 202: traverse a plurality of shift coefficients in sequence according to a second scanning order to determine at least one coefficient block.
在本申请的实施例中,编码器在根据当前帧的多个移位向量确定对应的多个移位系数之后,可以进一步按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块。In an embodiment of the present application, after determining the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame, the encoder may further sequentially traverse the multiple shift coefficients according to the second scanning order to determine at least one coefficient block.
可以理解的是,在本申请的实施例中,系数块可以为包括至少一个单元块的正方形块;其中,每一个单元块都可以由2×2个移位系数构成。It can be understood that, in the embodiments of the present application, the coefficient block may be a square block including at least one unit block; wherein each unit block may be composed of 2×2 shift coefficients.
示例性的,在本申请的实施例中,如图16所示,每一个单元块均可以包括4个移位系数,如移位系数1-4,其中,4个移位系数按照2行2列的排列方式构成正方形的单元块。Exemplarily, in an embodiment of the present application, as shown in FIG. 16 , each unit block may include 4 shift coefficients, such as shift coefficients 1-4, wherein the 4 shift coefficients are arranged in 2 rows and 2 columns to form a square unit block.
进一步地,在本申请的实施例中,单元块中的移位系数,可以按照低频至高频的顺序排列,其中,高频的移位系数位于低频的移位系数的左侧和/或上侧。Further, in an embodiment of the present application, the shift coefficients in the unit block may be arranged in order from low frequency to high frequency, wherein the high frequency shift coefficients are located to the left and/or above the low frequency shift coefficients.
示例性的,在本申请的实施例中,如图16所示,单元块中的4个移位系数中,移位系数1-4依次从低频至高频,因此,移位系数1位于右下角,移位系数4位于左上角。Exemplarily, in an embodiment of the present application, as shown in FIG16 , among the four shift coefficients in the unit block, shift coefficients 1-4 are arranged from low frequency to high frequency in sequence, so shift coefficient 1 is located in the lower right corner and shift coefficient 4 is located in the upper left corner.
需要说明的是,在本申请的实施例中,系数块的尺寸大小可以为单元块的任意整数倍,本申请不进行具体限定。It should be noted that, in the embodiments of the present application, the size of the coefficient block can be any integer multiple of the unit block, and the present application does not make any specific limitation.
示例性的,在本申请的实施例中,如图17和图18所示,系数块的大小可以为16×16,即由4个单元块构成的,也可以为32×32,即由16个单元块构成的。Exemplarily, in an embodiment of the present application, as shown in FIG. 17 and FIG. 18 , the size of the coefficient block may be 16×16, ie, composed of 4 unit blocks, or 32×32, ie, composed of 16 unit blocks.
进一步地,在本申请的实施例中,从低频移位系数到高频移位系数,编码器可以按照第二扫描顺序依次遍历当前帧的多个移位系数,从而可以获得当前帧的至少一个系数块。Further, in an embodiment of the present application, the encoder may sequentially traverse multiple shift coefficients of the current frame in a second scanning order from low-frequency shift coefficients to high-frequency shift coefficients, thereby obtaining at least one coefficient block of the current frame.
需要说明的是,在本申请的实施例中,第二扫描顺序可以为Z字形扫描顺序的相反扫描顺序。其中,Z字形扫描(Z-Scan)中Z是形象的表示方式,Z字形扫描顺序保证了对于不同分割都能按照相同的遍历顺序进行寻址,有利于程序中的递归实现。It should be noted that, in the embodiment of the present application, the second scanning order may be the reverse scanning order of the zigzag scanning order. The Z in the zigzag scanning (Z-Scan) is a figurative representation, and the zigzag scanning order ensures that different partitions can be addressed in the same traversal order, which is conducive to the recursive implementation in the program.
需要说明的是,在本申请的实施例中,当按照从低频到高频的顺序,采用Z字形扫描顺序从左上至右下依次组织移位系数,便可以依次将移位系数构成的单元块排列在左上至右下的位置时;而在本申请中,系数块中的单元块的移位系数则是按照低频到高频的顺序依次排列在右下至左上的位置的,相应的,在进行遍历移位系数时,可以选择按照Z字形扫描顺序的相反扫描顺序,从右下至左上依次组织移位系数。It should be noted that, in an embodiment of the present application, when the shift coefficients are organized from upper left to lower right in a Z-shaped scanning order in the order from low frequency to high frequency, the unit blocks composed of the shift coefficients can be arranged in sequence from upper left to lower right; whereas in the present application, the shift coefficients of the unit blocks in the coefficient block are arranged in sequence from lower right to upper left in the order from low frequency to high frequency. Accordingly, when traversing the shift coefficients, you can choose to organize the shift coefficients from lower right to upper left in the opposite scanning order of the Z-shaped scanning order.
示例性的,在本申请的实施例中,如图19所示,基于从低频到高频的顺序,按照Z字形扫描顺序对多个移位系数进行遍历,依次将移位系数构成的单元块排列在左上至右下的位置。即系数块中的单元块的组织是按照Z字形扫描顺序进行的,同时每一个单元块中的移位系数的组织也是按照Z字形扫描顺序进行的。Exemplarily, in an embodiment of the present application, as shown in FIG19 , multiple shift coefficients are traversed in a zigzag scanning order based on the order from low frequency to high frequency, and the unit blocks composed of the shift coefficients are arranged in turn from the upper left to the lower right. That is, the organization of the unit blocks in the coefficient block is carried out in a zigzag scanning order, and the organization of the shift coefficients in each unit block is also carried out in a zigzag scanning order.
示例性的,在本申请的实施例中,如图20所示,基于从低频到高频的顺序,按照第二扫描顺序对多个移位系数进行遍历,依次将移位系数构成的单元块排列在右下至左上的位置。即系数块中的单元块的组织是按照第二扫描顺序进行的,同时每一个单元块中的移位系数的组织也是按照第二扫描顺序进行的。Exemplarily, in an embodiment of the present application, as shown in FIG20 , based on the order from low frequency to high frequency, a plurality of shift coefficients are traversed according to the second scanning order, and the unit blocks composed of the shift coefficients are arranged in the lower right to upper left positions in sequence. That is, the organization of the unit blocks in the coefficient block is carried out according to the second scanning order, and the organization of the shift coefficients in each unit block is also carried out according to the second scanning order.
可以理解的是,在本申请的实施例中,由于每一个系数块中的单元块都是由至少一个移位系数(如4个移位系数)构成的,因此在按照第二扫描顺序遍历当前帧的多个移位系数之后,可以构成单元块,进而可以构成系数块。It can be understood that in the embodiments of the present application, since the unit block in each coefficient block is composed of at least one shift coefficient (such as 4 shift coefficients), after traversing multiple shift coefficients of the current frame according to the second scanning order, a unit block can be formed, and then a coefficient block can be formed.
步骤203、基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息。Step 203: Determine shift coefficient information of the current frame based on at least one coefficient block in a first scanning order.
在本申请的实施例中,在按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块之后,编码器可以进一步基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息。In an embodiment of the present application, after traversing multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block, the encoder can further determine the shift coefficient information of the current frame according to the first scanning order based on the at least one coefficient block.
需要说明的是,在本申请的实施例中,当前帧的移位系数信息可以包括由至少一个系数块构成的至少一个层次细节LOD。It should be noted that, in an embodiment of the present application, the shift coefficient information of the current frame may include at least one level of detail LOD composed of at least one coefficient block.
可以理解的是,在本申请的实施例中,移位系数信息中的至少一个层次细节可以是按照由低频至高频的顺序排列的。其中,包括高频信息的层次细节位于包括低频信息的层次细节的左侧和/或上侧。It is understandable that, in the embodiment of the present application, at least one level detail in the shift coefficient information may be arranged in order from low frequency to high frequency, wherein the level detail including high frequency information is located to the left and/or above the level detail including low frequency information.
示例性的,在本申请的实施例中,如图9所示,在由三个层次细节(LOD1、LOD2、LOD3)所构成的移位系数信息中,LOD1包括最低频信息,LOD2包括较高频信息,LOD3包括最高频信息。其中,包括最低频信息的LOD1最为复杂,而包括最高频信息的LOD3最为简单,包括最高频信息的LOD3位于包括最低频信息的LOD1左上侧。Exemplarily, in an embodiment of the present application, as shown in Fig. 9, in the shift coefficient information composed of three levels of detail (LOD1, LOD2, LOD3), LOD1 includes the lowest frequency information, LOD2 includes higher frequency information, and LOD3 includes the highest frequency information. Among them, LOD1 including the lowest frequency information is the most complex, while LOD3 including the highest frequency information is the simplest, and LOD3 including the highest frequency information is located on the upper left side of LOD1 including the lowest frequency information.
需要说明的是,在本申请的实施例中,基于从低频到高频的顺序,编码器可以按照第一扫描顺序依次遍历至少一个系数块,最终便可以生成包括低频信息的层次细节和包括高频信息的层次细节的移位系数信息。It should be noted that in an embodiment of the present application, based on the order from low frequency to high frequency, the encoder can traverse at least one coefficient block in sequence according to the first scanning order, and finally generate shift coefficient information including hierarchical details of low-frequency information and hierarchical details of high-frequency information.
可以理解的是,在本申请的实施例中,第一扫描顺序可以为光栅扫描顺序的相反扫描顺序。其中, 光栅扫描(RasterScan)是指从左往右,由上往下,先扫描完一行,再移至下一行起始位置继续扫描,常见的编解码流程使用的主要就是光栅扫描顺序。It is understandable that in the embodiment of the present application, the first scanning order may be the reverse scanning order of the raster scanning order. Raster scanning means scanning from left to right and from top to bottom, first scanning one row and then moving to the starting position of the next row to continue scanning. The common encoding and decoding process mainly uses the raster scanning order.
需要说明的是,在本申请的实施例中,当按照从低频到高频的顺序,采用光栅扫描顺序从左上至右下依次遍历至少一个系数块,并可以依次将层次细节排列在左上至右下的位置;而在本申请中,移位系数信息中的层次细节则是按照低频到高频的顺序依次排列在右下至左上的位置的,相应的,在进行至少一个系数块的遍历组织时,可以选择按照光栅扫描顺序的相反扫描顺序,从右下至左上依次遍历至少一个系数块。It should be noted that, in an embodiment of the present application, when at least one coefficient block is traversed from the upper left to the lower right in order from low frequency to high frequency using a raster scanning order, the hierarchical details can be arranged in order from the upper left to the lower right; whereas in the present application, the hierarchical details in the shifted coefficient information are arranged in order from the lower right to the upper left in order from low frequency to high frequency. Accordingly, when organizing the traversal of at least one coefficient block, it is possible to choose to traverse at least one coefficient block from the lower right to the upper left in the reverse scanning order of the raster scanning order.
示例性的,在本申请的实施例中,如图14所示,如果按照从低频到高频的顺序,按照光栅扫描顺序,从左上至右下依次组织LOD1、LOD2、LOD3,便可以依次将层次细节排列在左上至右下的位置。Exemplarily, in an embodiment of the present application, as shown in FIG14 , if LOD1, LOD2, and LOD3 are organized in sequence from upper left to lower right in the order of raster scanning from low frequency to high frequency, the hierarchical details can be arranged in sequence from upper left to lower right.
示例性的,在本申请的实施例中,如图15所示,如果按照从低频到高频的顺序,按照第一扫描顺序,从右下至左上依次组织LOD1、LOD2、LOD3,并可以依次将层次细节排列在右下至左上的位置。Exemplarily, in an embodiment of the present application, as shown in FIG15 , if LOD1, LOD2, and LOD3 are organized in sequence from the lower right to the upper left in the order from low frequency to high frequency according to the first scanning order, the hierarchical details can be arranged in sequence from the lower right to the upper left.
可以理解的是,在本申请的实施例中,由于每一个层次细节都是由至少一个系数块构成的,因此在按照第一扫描顺序遍历至少一个系数块之后,便可以确定出包括有至少一个层次细节的移位系数信息。It can be understood that in the embodiment of the present application, since each level of detail is composed of at least one coefficient block, after traversing at least one coefficient block in the first scanning order, the shift coefficient information including at least one level of detail can be determined.
进一步地,在本申请的实施例中,对于编码器生成的当前帧的移位系数信息,如果移位系数信息中的最后一行存在空余部分,那么可以基于第二位置,按照预设数值对移位系数信息进行帧填补(Frame Padding)。Furthermore, in an embodiment of the present application, for the shift coefficient information of the current frame generated by the encoder, if there is a blank portion in the last line of the shift coefficient information, the shift coefficient information can be frame padded (Frame Padding) based on the second position according to a preset value.
可以理解的是,在本申请的实施例中,预设数值可以为大于0的整数,例如预设数值为512。It can be understood that, in the embodiment of the present application, the preset value may be an integer greater than 0, for example, the preset value is 512.
示例性的,在本申请的实施例中,如果当前帧的移位系数信息中的最后一行存在空余部分,那么可以选择使用常数512进行帧填补,从而可以使得网格序列中的每一帧对应的移位系数信息均为矩形的,即保证由至少一个LOD构成矩形的移位系数信息。Exemplarily, in an embodiment of the present application, if there is a blank portion in the last row of the shift coefficient information of the current frame, then the constant 512 can be selected for frame padding, so that the shift coefficient information corresponding to each frame in the grid sequence is rectangular, that is, the rectangular shift coefficient information is ensured to be composed of at least one LOD.
可以理解的是,在本申请的实施例中,第二位置可以为移位系数信息中的、最后一个LOD的左上方的位置。这是由于在本申请中,移位系数信息中的层次细节是按照低频到高频的顺序依次排列在右下至左上的位置的,因此在进行帧填补时,可以选择在最后一个包括有高频信息的层次细节的左上方进行填补处理。It can be understood that in the embodiment of the present application, the second position can be the upper left position of the last LOD in the shift coefficient information. This is because in the present application, the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing frame filling, the upper left position of the last level detail including high frequency information can be selected for filling processing.
示例性的,在本申请的实施例中,如图12所示,常见的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在左上至右下的位置,那么在进行帧填补时,可以对当前帧的移位系数信息的右下角的空缺部分进行填补。Exemplarily, in an embodiment of the present application, as shown in FIG12 , common shift coefficient information is arranged in order from low frequency to high frequency, with hierarchical details arranged from the upper left to the lower right. When performing frame filling, the vacant part in the lower right corner of the shift coefficient information of the current frame can be filled.
示例性的,在本申请的实施例中,如图13所示,本申请中的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在右下至左上的位置,那么在进行帧填补时,可以对当前帧的移位系数信息的左上角的空缺部分进行填补。Exemplarily, in an embodiment of the present application, as shown in Figure 13, the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged in sequence from the lower right to the upper left. Then, when filling the frame, the missing part in the upper left corner of the shift coefficient information of the current frame can be filled.
进一步地,在本申请的实施例中,对于编码器生成的当前帧的移位系数信息,如果移位系数信息的行数小于预设高度阈值,那么可以选择按照预设数值和预设高度阈值对移位系数信息进行视频填补(Video Padding)。Furthermore, in an embodiment of the present application, for the shift coefficient information of the current frame generated by the encoder, if the number of rows of the shift coefficient information is less than a preset height threshold, then it is possible to choose to perform video padding (Video Padding) on the shift coefficient information according to a preset value and a preset height threshold.
可以理解的是,在本申请的实施例中,预设数值可以为大于0的整数,例如预设数值为512,预设高度阈值可以为网格序列中的最大高度,即网格序列中的位移系数的数量最大的一帧所对应的高度(行数)。It can be understood that in an embodiment of the present application, the preset value can be an integer greater than 0, for example, the preset value is 512, and the preset height threshold can be the maximum height in the grid sequence, that is, the height (number of rows) corresponding to a frame with the largest number of displacement coefficients in the grid sequence.
示例性的,在本申请的实施例中,如果当前帧的移位系数信息的行数小于网格序列中的位移系数的数量最大的一帧所对应的行数,即小于预设高度阈值,那么可以选择使用常数512进行视频填补,从而可以使得网格序列中的每一帧的高度(行数)均相同,即保证网格序列中的每一帧的高度恒定。Exemplarily, in an embodiment of the present application, if the number of rows of the shift coefficient information of the current frame is less than the number of rows corresponding to the frame with the largest number of displacement coefficients in the grid sequence, that is, less than the preset height threshold, then you can choose to use the constant 512 for video padding, so that the height (number of rows) of each frame in the grid sequence can be the same, that is, the height of each frame in the grid sequence is guaranteed to be constant.
需要说明的是,在本申请的实施例中,在标准参考软件中,可以将位移系数视频帧(或图像帧)的宽度为固定常数,而对于一个网格序列,其中的每一帧的位移系数的数量不一定相等,从而导致不同帧所形成的视频帧(或图像帧)的高度也不一定相等。因此,需要对高度较小的视频帧(或图像帧)进行填补,以保证位移系数视频中每一帧的高度恒定。It should be noted that in the embodiments of the present application, in the standard reference software, the width of the displacement coefficient video frame (or image frame) can be a fixed constant, and for a grid sequence, the number of displacement coefficients in each frame is not necessarily equal, so that the heights of the video frames (or image frames) formed by different frames are not necessarily equal. Therefore, it is necessary to fill the video frames (or image frames) with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant.
可以理解的是,在本申请的实施例中,第一位置可以为移位系数信息中的、最后一个LOD的上方的位置。这是由于在本申请中,移位系数信息中的层次细节是按照低频到高频的顺序依次排列在右下至左上的位置的,因此在进行视频填补时,可以选择在最后一个包括有高频信息的层次细节的上方进行填补处理。It is understandable that in the embodiment of the present application, the first position may be a position above the last LOD in the shift coefficient information. This is because in the present application, the level details in the shift coefficient information are arranged in the order from low frequency to high frequency in the lower right to upper left positions, so when performing video filling, it is possible to choose to perform filling processing above the last level detail including high frequency information.
示例性的,在本申请的实施例中,如图10所示,常见的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在左上至右下的位置,那么在进行视频填补时,可以在最下方对当前帧的移位系数信息进行填补。Exemplarily, in an embodiment of the present application, as shown in FIG10 , common shift coefficient information is arranged in order from low frequency to high frequency, with hierarchical details arranged from the upper left to the lower right. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the bottom.
示例性的,在本申请的实施例中,如图11所示,本申请中的移位系数信息是按照从低频到高频的顺序,依次将层次细节排列在右下至左上的位置,那么在进行视频填补时,可以在最上方对当前帧的移 位系数信息进行填补。Exemplarily, in an embodiment of the present application, as shown in FIG11 , the shift coefficient information in the present application is arranged in order from low frequency to high frequency, and the hierarchical details are arranged from the lower right to the upper left. Then, when performing video filling, the shift coefficient information of the current frame can be filled at the top.
步骤204、将移位系数信息写入码流。Step 204: Write the shift coefficient information into the bit stream.
在本申请的实施例中,在基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息之后,编码器可以进一步将移位系数信息写入码流中,生成对应的码流,传输至解码端。In an embodiment of the present application, after determining the shift coefficient information of the current frame according to the first scanning order based on at least one coefficient block, the encoder can further write the shift coefficient information into the bitstream, generate a corresponding bitstream, and transmit it to the decoding end.
需要说明的是,在本申请的实施例中,编码器传输至解码器的码流可以为移位系数的码流,也可以为包括有移位系数的码流和简化网格的码流(或运动矢量的码流)的码流数据。It should be noted that, in the embodiment of the present application, the code stream transmitted from the encoder to the decoder may be a code stream of shift coefficients, or may be code stream data including a code stream of shift coefficients and a code stream of a simplified grid (or a code stream of motion vectors).
综上所述,通过上述步骤201至步骤204所提出的解码方法,采用了一种动态网格编解码中的移位系数的组织方法,改变了小波变换后的移位系数的组织顺序,使用反向Z字扫描顺序和光栅扫描相反的顺序进行移位系数的组织,进而减少无损编码移位系数所需要的码率。In summary, the decoding method proposed by the above steps 201 to 204 adopts a method of organizing shift coefficients in dynamic grid encoding and decoding, changes the organization order of shift coefficients after wavelet transform, and uses a reverse Z-shaped scanning order and an order opposite to the raster scanning order to organize the shift coefficients, thereby reducing the bit rate required for lossless coding of shift coefficients.
本申请实施例提出了一种编码方法,在编码端,编码器根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块;基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息;将移位系数信息写入码流。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiment of the present application proposes a coding method, at the coding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; writes the shift coefficient information into the code stream. It can be seen that in the embodiment of the present application, when the codec compresses the geometric information of the grid, it can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
基于上述实施例,本申请的再一实施例提出了一种编码方法,该编码方法应用于编码器,其中,所述编码器包括视频编码器、网格编码器以及预处理器。Based on the above embodiments, another embodiment of the present application proposes an encoding method, which is applied to an encoder, wherein the encoder includes a video encoder, a grid encoder, and a preprocessor.
需要说明的是,在本申请的实施例中,编码方法可以用于帧内编码,也可以用于帧间编码。本申请不进行具体限定。It should be noted that, in the embodiments of the present application, the encoding method can be used for intra-frame encoding or inter-frame encoding, which is not specifically limited in the present application.
需要说明的是,在本申请的实施例中,预处理器可以用于根据当前帧的原始网格生成简化网格和移位向量。It should be noted that, in the embodiments of the present application, the preprocessor may be used to generate a simplified grid and a shift vector according to the original grid of the current frame.
可以理解的是,在本申请的实施例中,在预处理过程中,可以先对当前帧的原始网格(Original Mesh)进行简化,得到简化网格(Decimated Mesh),或称基本网格(Base Mesh)。然后可以对简化网格进行细分,得到细分网格(Subdivided Mesh)。最后对于细分网格中的每个顶点,寻找原始网格中与其距离最近的点,并计算这两个点的移位向量(Displacement)。It is understandable that in the embodiment of the present application, during the preprocessing process, the original mesh of the current frame can be simplified to obtain a simplified mesh (Decimated Mesh), or a base mesh (Base Mesh). Then the simplified mesh can be subdivided to obtain a subdivided mesh (Subdivided Mesh). Finally, for each vertex in the subdivided mesh, the point closest to it in the original mesh is found, and the displacement vector (Displacement) of the two points is calculated.
进一步地,在本申请的实施例中,在预处理器基于原始网格生成对应的简化网格之后,网格编码器可以用于编码所述简化网格,然后生成简化网格的码流。Further, in an embodiment of the present application, after the preprocessor generates a corresponding simplified grid based on the original grid, the grid encoder can be used to encode the simplified grid and then generate a code stream of the simplified grid.
需要说明的是,在本申请的实施例中,对于帧内编码,网格编码器可以对当前帧的简化网格进行编码,获得简化网格的码流。It should be noted that, in the embodiments of the present application, for intra-frame coding, the grid encoder can encode the simplified grid of the current frame to obtain a code stream of the simplified grid.
相应的,在本申请的实施例中,对于帧内编码,视频编码器可以先利用已经生成的简化网格的码流确定当前帧的重构简化网络;然后可以通过重构简化网格对移位向量进行更新处理。Correspondingly, in an embodiment of the present application, for intra-frame coding, the video encoder may first determine the reconstructed simplified network of the current frame using the bitstream of the simplified grid that has been generated; and then the shift vector may be updated by reconstructing the simplified grid.
也就是说,在本申请的实施例中,在网格编码器完成对当前帧的简化网格的编码,生成简化网格的码流之后,视频编码器可以利用该简化网格的码流完成对简化网格的重构,并利用重构简化网格完成对移位向量的更新。That is to say, in an embodiment of the present application, after the grid encoder completes encoding of the simplified grid of the current frame and generates a code stream of the simplified grid, the video encoder can use the code stream of the simplified grid to complete the reconstruction of the simplified grid, and use the reconstructed simplified grid to complete the update of the shift vector.
需要说明的是,在本申请的实施例中,对于帧间编码,网格编码器可以对当前帧的运动矢量进行编码,获得运动矢量的码流。It should be noted that, in the embodiment of the present application, for inter-frame coding, the grid encoder can encode the motion vector of the current frame to obtain a code stream of the motion vector.
相应的,在本申请的实施例中,对于帧间编码,视频编码器可以先利用已经生成的运动矢量的码流确定当前帧的运动矢量,然后再根据运动矢量进一步确定当前帧的重构简化网络;最后便可以通过重构简化网格对移位向量进行更新处理。Correspondingly, in an embodiment of the present application, for inter-frame coding, the video encoder can first use the code stream of the motion vector that has been generated to determine the motion vector of the current frame, and then further determine the reconstructed simplified network of the current frame based on the motion vector; finally, the shift vector can be updated by reconstructing the simplified grid.
也就是说,在本申请的实施例中,在网格编码器完成对当前帧的运动矢量的编码,生成运动矢量的码流之后,视频编码器可以利用该运动矢量的码流完成对简化网格的重构,并利用重构简化网格完成对移位向量的更新。That is to say, in an embodiment of the present application, after the grid encoder completes encoding of the motion vector of the current frame and generates a bit stream of the motion vector, the video encoder can use the bit stream of the motion vector to reconstruct the simplified grid, and use the reconstructed simplified grid to update the shift vector.
可以理解的是,在本申请的实施例中,网格编码器在生成简化网格的码流或者运动矢量的码流之后,可以将简化网格的码流或者运动矢量的码流传输至解码端。It can be understood that, in the embodiment of the present application, after the grid encoder generates the code stream of the simplified grid or the code stream of the motion vector, it can transmit the code stream of the simplified grid or the code stream of the motion vector to the decoding end.
进一步地,在本申请的实施例中,视频编码器可以用于根据当前帧的多个移位向量确对应的多个移位系数;按照第二扫描顺序依次遍历所述多个移位系数,确定至少一个系数块;基于所述至少一个系数块,按照第一扫描顺序确定所述当前帧的移位系数信息;将所述移位系数信息写入码流。Furthermore, in an embodiment of the present application, the video encoder can be used to determine multiple shift coefficients corresponding to multiple shift vectors of the current frame; traverse the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determine the shift coefficient information of the current frame according to the first scanning order; and write the shift coefficient information into the bitstream.
需要说明的是,在本申请的实施例中,编码器可以对所述多个移位向量进行小波变换处理,从而可以确定所述多个移位系数。It should be noted that, in the embodiment of the present application, the encoder may perform wavelet transform processing on the multiple shift vectors, so as to determine the multiple shift coefficients.
可以理解的是,在本申请的实施例中,所述移位向量为通过所述当前帧的细化网格和所述当前帧的原始网格确定的;其中,所述原始网格经过简化处理后确定对应的简化网格,所述简化网格经过细化处理后确定对应的所述细化网格。It can be understood that in an embodiment of the present application, the shift vector is determined by the refined grid of the current frame and the original grid of the current frame; wherein the original grid is simplified to determine the corresponding simplified grid, and the simplified grid is refined to determine the corresponding refined grid.
可以理解的是,在本申请的实施例中,第一扫描顺序包括光栅扫描顺序的相反扫描顺序。第二扫描顺序包括Z字形扫描顺序的相反扫描顺序。It can be understood that, in the embodiment of the present application, the first scanning order includes the reverse scanning order of the raster scanning order, and the second scanning order includes the reverse scanning order of the zigzag scanning order.
需要说明的是,在本申请的实施例中,所述系数块为包括至少一个单元块的正方形块;其中,所述单元块由2×2个移位系数构成。单元块中的移位系数,按照低频至高频的顺序排列,其中,高频的移位系数位于低频的移位系数的左侧和/或上侧。It should be noted that, in the embodiment of the present application, the coefficient block is a square block including at least one unit block; wherein the unit block is composed of 2×2 shift coefficients. The shift coefficients in the unit block are arranged in order from low frequency to high frequency, wherein the high frequency shift coefficient is located to the left and/or above the low frequency shift coefficient.
需要说明的是,在本申请的实施例中,所述移位系数信息包括由所述至少一个系数块构成的至少一个LOD。所述至少一个LOD按照低频至高频的顺序排列,其中,包括高频信息的LOD位于包括低频信息的LOD的左侧和/或上侧。It should be noted that, in an embodiment of the present application, the shift coefficient information includes at least one LOD composed of the at least one coefficient block. The at least one LOD is arranged in order from low frequency to high frequency, wherein the LOD including high frequency information is located on the left and/or above the LOD including low frequency information.
进一步地,在本申请的实施例中,若所述移位系数信息的行数小于预设高度阈值,则,按照预设数值和所述预设高度阈值对所述移位系数信息进行视频填补;其中,所述第一位置包括所述移位系数信息中的、最后一个LOD的上方的位置。Further, in an embodiment of the present application, if the number of rows of the shift coefficient information is less than a preset height threshold, the shift coefficient information is video padded according to a preset value and the preset height threshold; wherein the first position includes a position above the last LOD in the shift coefficient information.
进一步地,在本申请的实施例中,若所述移位系数信息中的最后一行存在空余部分,则基于第二位置,按照所述预设数值对所述移位系数信息进行帧填补;其中,所述第二位置包括所述移位系数信息中的、最后一个LOD的左上方的位置。Furthermore, in an embodiment of the present application, if there is a blank portion in the last row of the shift coefficient information, the shift coefficient information is frame-filled according to the preset value based on the second position; wherein the second position includes the upper left position of the last LOD in the shift coefficient information.
由此可见,本申请实施例提出的编解码方法,可以为一种动态网格编解码中的移位系数的组织方法,通过改变标准参考软件中小波变换后移位向量(移位系数)的组织顺序,进而减少无损编码移位向量(移位系数)所需要的码率。It can be seen that the coding and decoding method proposed in the embodiment of the present application can be a method for organizing shift coefficients in dynamic grid coding and decoding, which reduces the bit rate required for lossless coding shift vectors (shift coefficients) by changing the organization order of shift vectors (shift coefficients) after wavelet transform in the standard reference software.
可以理解的是,在本申请的实施例中,在对移位系数进行组织时,可以按照由低频到高频的顺序遍历小波变换后的移位向量(移位系数),并按照反向Z字扫描的顺序(第二扫描顺序)将其组织成16×16大小的正方形块(系数块)。接着,可以将组织好的正方形块按照光栅扫描的相反的顺序(第一扫描顺序,即从右下到左上的顺序)进行拼接。最后,对于最上面一行的空余部分,用常数512(预设数值)进行填补,形成矩形视频帧。同时,若当前视频帧的行数小于序列所有视频帧的最大行数(预设高度阈值),对于空余部分,用常数512(预设数值)进行填补。It can be understood that in the embodiments of the present application, when organizing the shift coefficients, the shift vectors (shift coefficients) after the wavelet transform can be traversed in order from low frequency to high frequency, and organized into 16×16 square blocks (coefficient blocks) in the order of reverse Z-shaped scanning (second scanning order). Then, the organized square blocks can be spliced in the opposite order of raster scanning (first scanning order, i.e., from the lower right to the upper left). Finally, the empty part of the top row is filled with a constant 512 (preset value) to form a rectangular video frame. At the same time, if the number of rows of the current video frame is less than the maximum number of rows of all video frames in the sequence (preset height threshold), the empty part is filled with a constant 512 (preset value).
示例性的,在本申请的实施例中,如图21和图22所示,可以在系数块内采用反向Z字扫描方法。其中,图21为按照由低频系数到高频系数的顺序遍历移位系数,图22表示在16×16(单元块为4×4)的块内按照反向Z字扫描的顺序组织移位系数。Exemplarily, in an embodiment of the present application, as shown in Figures 21 and 22, a reverse Z-scanning method may be used within a coefficient block. Figure 21 shows traversing the shift coefficients in the order from low-frequency coefficients to high-frequency coefficients, and Figure 22 shows organizing the shift coefficients in the order of reverse Z-scanning within a 16×16 (unit block is 4×4) block.
示例性的,在本申请的实施例中,如图23和图24所示,LOD(Level of Details)1-3分别为包含不同频率信息的移位系数。LOD1包含最低频信息,而LOD3包含最高频信息。可见,包含低频信息的部分较为复杂,而包含高频信息的部分较为简单。Exemplarily, in the embodiments of the present application, as shown in FIG. 23 and FIG. 24 , LOD (Level of Details) 1-3 are shift coefficients containing different frequency information, respectively. LOD1 contains the lowest frequency information, and LOD3 contains the highest frequency information. It can be seen that the part containing the low frequency information is more complex, while the part containing the high frequency information is simpler.
目前常见的标准参考软件所采用方法如图23所示,采用光栅扫描的顺序,即从左上角开始,从左上到右下的顺序按从低频到高频组织移位系数。而本申请实施例所采用的与光栅扫描相反的顺序,从右下角开始,从右下到左上按从低频到高频组织移位系数。The method currently used by the common standard reference software is shown in Figure 23, which uses a raster scanning order, that is, starting from the upper left corner, and organizing the shift coefficients from low frequency to high frequency in the order from upper left to lower right. The embodiment of the present application uses the opposite order of raster scanning, starting from the lower right corner, and organizing the shift coefficients from low frequency to high frequency in the order from lower right to upper left.
由于LOD1-3所包含的正方形块并不一定能组成矩形的视频帧,因此需要对空余的部分进行填补。相应的,在进行帧填补(Frame Padding)时,在标准参考软件中,如图23所示,对右下角的空缺部分进行了填补,而本申请实施例中,则对左上角的空缺部分进行了填补。Since the square blocks included in LOD1-3 may not necessarily form a rectangular video frame, the empty parts need to be filled. Accordingly, when performing frame padding, in the standard reference software, as shown in FIG. 23 , the empty part in the lower right corner is filled, while in the embodiment of the present application, the empty part in the upper left corner is filled.
对于一个网格序列,其每一帧的位移系数的数量不一定相等,从而导致对于每一帧,经过移位系数组织之后所形成的视频帧高度也不一定相等(在标准参考软件中,位移系数视频帧的宽度为固定常数)。因此,需要对高度较小的视频帧进行填补,以保证位移系数视频中每一帧的高度恒定。相应的,在进行视频填补(Video Padding)时,在标准参考软件中,如图23所示,在下方对视频帧进行填补,而本申请实施例中,则在下方对视频帧进行填补。For a grid sequence, the number of displacement coefficients of each frame is not necessarily equal, which results in that for each frame, the height of the video frame formed after the displacement coefficient organization is not necessarily equal (in the standard reference software, the width of the displacement coefficient video frame is a fixed constant). Therefore, it is necessary to pad the video frames with smaller heights to ensure that the height of each frame in the displacement coefficient video is constant. Accordingly, when performing video padding, in the standard reference software, as shown in FIG. 23 , the video frame is padded at the bottom, while in the embodiment of the present application, the video frame is padded at the bottom.
本申请实施例提出了一种编码方法,在编码端,编码器根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块;基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息;将移位系数信息写入码流。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiment of the present application proposes a coding method, at the coding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; writes the shift coefficient information into the code stream. It can be seen that in the embodiment of the present application, when the codec compresses the geometric information of the grid, it can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first, and referenced when the low-frequency information with high complexity is subsequently processed. That is to say, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the code rate of the encoded shift coefficient, thereby improving the grid compression performance.
基于上述实施例,在本申请的再一实施例中,基于前述实施例相同的发明构思,图26为编码器的组成结构示意图一,如图26所示,编码器110可以包括:第一确定单元111,编码单元112,其中,Based on the above embodiment, in another embodiment of the present application, based on the same inventive concept as the above embodiment, FIG. 26 is a schematic diagram of a composition structure of an encoder. As shown in FIG. 26, the encoder 110 may include: a first determining unit 111, an encoding unit 112, wherein:
所述第一确定单元111,配置为根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历所述多个移位系数,确定至少一个系数块;基于所述至少一个系数块,按照第一扫描顺序确定所述当前帧的移位系数信息;The first determining unit 111 is configured to determine a plurality of corresponding shift coefficients according to a plurality of shift vectors of the current frame; sequentially traverse the plurality of shift coefficients in accordance with the second scanning order to determine at least one coefficient block; and determine the shift coefficient information of the current frame in accordance with the first scanning order based on the at least one coefficient block;
所述编码单元112,配置为将所述移位系数信息写入码流。The encoding unit 112 is configured to write the shift coefficient information into a bit stream.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器110,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 110. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the aforementioned embodiments is implemented.
基于上述编码器110的组成以及计算机可读存储介质,图27为编码器的组成结构示意图二,如图27所示,编码器110可以包括:第一存储器113和第一处理器114,第一通信接口115和第一总线系统116。第一存储器113、第一处理器114、第一通信接口115通过第一总线系统116耦合在一起。可理解,第一总线系统116用于实现这些组件之间的连接通信。第一总线系统116除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图10中将各种总线都标为第一总线系统116。其中,Based on the composition of the above-mentioned encoder 110 and the computer-readable storage medium, Figure 27 is a second schematic diagram of the composition structure of the encoder. As shown in Figure 27, the encoder 110 may include: a first memory 113 and a first processor 114, a first communication interface 115 and a first bus system 116. The first memory 113, the first processor 114, and the first communication interface 115 are coupled together through the first bus system 116. It can be understood that the first bus system 116 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 116 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 116 in Figure 10. Among them,
第一通信接口115,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The first communication interface 115 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
所述第一存储器113,用于存储能够在所述第一处理器上运行的计算机程序;The first memory 113 is used to store a computer program that can be run on the first processor;
所述第一处理器114,用于在运行所述计算机程序时,根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历所述多个移位系数,确定至少一个系数块;基于所述至少一个系数块,按照第一扫描顺序确定所述当前帧的移位系数信息;将所述移位系数信息写入码流。The first processor 114 is used to determine the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame when running the computer program; traverse the multiple shift coefficients in sequence according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determine the shift coefficient information of the current frame according to the first scanning order; and write the shift coefficient information into the bit stream.
可以理解,本申请实施例中的第一存储器113可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器113旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the first memory 113 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). The first memory 113 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
而第一处理器114可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器114中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器114可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器113,第一处理器114读取第一存储器113中的信息,结合其硬件完成上述方法的步骤。The first processor 114 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 114. The above-mentioned first processor 114 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the first memory 113, and the first processor 114 reads the information in the first memory 113 and completes the steps of the above method in combination with its hardware.
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
可选地,作为另一个实施例,第一处理器114还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the first processor 114 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
图28为解码器的组成结构示意图一,如图28所示,解码器120可以包括:解码单元121和第二确定单元122;其中,FIG. 28 is a schematic diagram of a first structure of a decoder. As shown in FIG. 28 , the decoder 120 may include: a decoding unit 121 and a second determining unit 122; wherein,
所述解码单元121,配置为解码码流;The decoding unit 121 is configured to decode the code stream;
所述第二确定单元122,配置为确定当前帧的移位系数信息;按照第一扫描顺序从所述移位系数信息中确定至少一个系数块;基于所述至少一个系数块,按照第二扫描顺序确定多个移位系数;根据所述多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。The second determination unit 122 is configured to determine the shift coefficient information of the current frame; determine at least one coefficient block from the shift coefficient information according to a first scanning order; based on the at least one coefficient block, determine multiple shift coefficients according to a second scanning order; and determine the reconstructed original grid of the current frame based on the multiple shift coefficients and the simplified grid of the current frame.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
因此,本申请实施例提供了一种计算机可读存储介质,应用于解码器120,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the decoder 120. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the above embodiments is implemented.
基于上述解码器120的组成以及计算机可读存储介质,图29为解码器的组成结构示意图二,如图29所示,解码器120可以包括:第二存储器123和第二处理器124,第二通信接口125和第二总线系统126。第二存储器123和第二处理器124,第二通信接口125通过第二总线系统126耦合在一起。可理解,第二总线系统126用于实现这些组件之间的连接通信。第二总线系统126除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图12中将各种总线都标为第二总线系统126。其中,Based on the composition of the above-mentioned decoder 120 and the computer-readable storage medium, Figure 29 is a second schematic diagram of the composition structure of the decoder. As shown in Figure 29, the decoder 120 may include: a second memory 123 and a second processor 124, a second communication interface 125 and a second bus system 126. The second memory 123 and the second processor 124, and the second communication interface 125 are coupled together through the second bus system 126. It can be understood that the second bus system 126 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 126 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 126 in Figure 12. Among them,
第二通信接口125,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The second communication interface 125 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
所述第二存储器123,用于存储能够在所述第二处理器上运行的计算机程序;The second memory 123 is used to store a computer program that can be run on the second processor;
所述第二处理器124,用于在运行所述计算机程序时,解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从所述移位系数信息中确定至少一个系数块;基于所述至少一个系数块,按照第二扫描顺序确定多个移位系数;根据所述多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。The second processor 124 is used to decode the code stream and determine the shift coefficient information of the current frame when running the computer program; determine at least one coefficient block from the shift coefficient information according to a first scanning order; based on the at least one coefficient block, determine multiple shift coefficients according to a second scanning order; determine the reconstructed original grid of the current frame based on the multiple shift coefficients and the simplified grid of the current frame.
可以理解,本申请实施例中的第二存储器123可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第二存储器123旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the second memory 123 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). The second memory 123 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
而第二处理器124可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第二处理器124中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第二处理器 124可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第二存储器123,第二处理器124读取第二存储器123中的信息,结合其硬件完成上述方法的步骤。The second processor 124 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the second processor 124. The above-mentioned second processor 124 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the second memory 123, and the second processor 124 reads the information in the second memory 123 and completes the steps of the above method in combination with its hardware.
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,在解码端,解码器解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从移位系数信息中确定至少一个系数块;基于至少一个系数块,按照第二扫描顺序确定多个移位系数;根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。在编码端,编码器根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块;基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息;将移位系数信息写入码流。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium. At the decoding end, the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame. At the encoding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the code stream. It can be seen that in the embodiment of the present application, when compressing the geometric information of the grid, the codec can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein, in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, the high-frequency information is located at the upper left of the frame, and the low-frequency information is located at the lower right of the frame, so that the high-frequency information with low complexity can be processed first and referenced when the low-frequency information with high complexity is subsequently processed. In other words, in the embodiment of the present application, a better organization strategy of the shift coefficients can be used to reduce the bit rate of the encoded shift coefficients, thereby improving the grid compression performance.
需要说明的是,在本申请的实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
工业实用性Industrial Applicability
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,在解码端,解码器解码码流,确定当前帧的移位系数信息;按照第一扫描顺序从移位系数信息中确定至少一个系数块;基于至少一个系数块,按照第二扫描顺序确定多个移位系数;根据多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。在编码端,编码器根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历多个移位系数,确定至少一个系数块;基于至少一个系数块,按照第一扫描顺序确定当前帧的移位系数信息;将移位系数信息写入码流。由此可见,在本申请的实施例中,编解码在进行网格的几何信息的压缩时,可以基于第一扫描顺序遍历移位系数,确定系数块,同时可以基于第二扫描顺序遍历系数块,确定移位系数信息,其中,基于第一扫描顺序和第二扫描顺序获得的当前帧的移位系数信息 中,高频信息位于帧的左上方,低频信息位于帧的右下方,从而可以使得复杂度低的高频信息优先被处理,并在后续处理复杂度高的低频信息时进行参考。也就是说,在本申请的实施例中,能够使用较佳的移位系数的组织策略,从而降低编码移位系数的码率,进而提升了网格压缩性能。The embodiment of the present application provides a coding and decoding method, an encoder, a decoder and a storage medium. At the decoding end, the decoder decodes the code stream to determine the shift coefficient information of the current frame; determines at least one coefficient block from the shift coefficient information according to the first scanning order; based on the at least one coefficient block, determines multiple shift coefficients according to the second scanning order; determines the reconstructed original grid of the current frame according to the multiple shift coefficients and the simplified grid of the current frame. At the encoding end, the encoder determines the corresponding multiple shift coefficients according to the multiple shift vectors of the current frame; traverses the multiple shift coefficients in turn according to the second scanning order to determine at least one coefficient block; based on the at least one coefficient block, determines the shift coefficient information of the current frame according to the first scanning order; and writes the shift coefficient information into the code stream. It can be seen that in the embodiment of the present application, when compressing the geometric information of the grid, the codec can traverse the shift coefficients based on the first scanning order to determine the coefficient block, and can traverse the coefficient block based on the second scanning order to determine the shift coefficient information, wherein the high-frequency information is located at the upper left of the frame and the low-frequency information is located at the lower right of the frame in the shift coefficient information of the current frame obtained based on the first scanning order and the second scanning order, so that the high-frequency information with low complexity can be processed first and referred to in the subsequent processing of the low-frequency information with high complexity. In other words, in the embodiment of the present application, a better organization strategy of the shift coefficient can be used to reduce the bit rate of the encoded shift coefficient, thereby improving the grid compression performance.

Claims (34)

  1. 一种解码方法,应用于解码器,所述方法包括:A decoding method, applied to a decoder, comprising:
    解码码流,确定当前帧的移位系数信息;Decode the code stream and determine the shift coefficient information of the current frame;
    按照第一扫描顺序从所述移位系数信息中确定至少一个系数块;determining at least one coefficient block from the shifted coefficient information in a first scanning order;
    基于所述至少一个系数块,按照第二扫描顺序确定多个移位系数;determining a plurality of shifted coefficients based on the at least one coefficient block in a second scanning order;
    根据所述多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。A reconstructed original grid of the current frame is determined according to the multiple shift coefficients and the simplified grid of the current frame.
  2. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein
    所述第一扫描顺序包括光栅扫描顺序的相反扫描顺序。The first scanning order comprises a reverse scanning order of a raster scanning order.
  3. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein
    所述第二扫描顺序包括Z字形扫描顺序的相反扫描顺序。The second scanning order includes a reverse scanning order of the zigzag scanning order.
  4. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    根据所述多个移位系数确定对应的多个移位向量;Determine a corresponding plurality of shift vectors according to the plurality of shift coefficients;
    基于所述多个移位向量和所述简化网格,确定所述重构原始网格。The reconstructed original mesh is determined based on the plurality of shift vectors and the simplified mesh.
  5. 根据权利要求4所述的方法,其中,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    对所述多个移位系数进行小波逆变换处理,确定所述多个移位向量。Perform inverse wavelet transform processing on the multiple shift coefficients to determine the multiple shift vectors.
  6. 根据权利要求4所述的方法,其中,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    对所述简化网格进行细分处理,确定当前帧的细分网格;Subdividing the simplified grid to determine a subdivided grid of the current frame;
    按照所述多个移位向量和所述细分网格,确定所述重构原始网格。The reconstructed original grid is determined according to the plurality of shift vectors and the subdivided grid.
  7. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein
    所述系数块为包括至少一个单元块的正方形块;其中,所述单元块由2×2个移位系数构成。The coefficient block is a square block including at least one unit block; wherein the unit block is composed of 2×2 shift coefficients.
  8. 根据权利要求7所述的方法,其中,The method according to claim 7, wherein:
    所述单元块中的移位系数,按照低频至高频的顺序排列,其中,高频的移位系数位于低频的移位系数的左侧和/或上侧。The shift coefficients in the unit block are arranged in order from low frequency to high frequency, wherein the high frequency shift coefficients are located on the left and/or above the low frequency shift coefficients.
  9. 根据权利要求7或8所述的方法,其中,The method according to claim 7 or 8, wherein
    所述移位系数信息包括由所述至少一个系数块构成的至少一个层次细节LOD。The shift coefficient information includes at least one level of detail (LOD) composed of the at least one coefficient block.
  10. 根据权利要求9所述的方法,其中,The method according to claim 9, wherein
    所述至少一个LOD按照低频至高频的顺序排列,其中,包括高频信息的LOD位于包括低频信息的LOD的左侧和/或上侧。The at least one LOD is arranged in order from low frequency to high frequency, wherein the LOD including high frequency information is located on the left and/or upper side of the LOD including low frequency information.
  11. 根据权利要求10所述的方法,其中,所述方法还包括:The method according to claim 10, wherein the method further comprises:
    若所述移位系数信息的行数小于预设高度阈值,则,按照预设数值和所述预设高度阈值对所述移位系数信息进行视频填补;其中,所述第一位置包括所述移位系数信息中的、最后一个LOD的上方的位置。If the number of rows of the shift coefficient information is less than a preset height threshold, the shift coefficient information is video padded according to a preset value and the preset height threshold; wherein the first position includes a position above the last LOD in the shift coefficient information.
  12. 根据权利要求10所述的方法,其中,所述方法还包括:The method according to claim 10, wherein the method further comprises:
    若所述移位系数信息中的最后一行存在空余部分,则基于第二位置,按照所述预设数值对所述移位系数信息进行帧填补;其中,所述第二位置包括所述移位系数信息中的、最后一个LOD的左上方的位置。If there is a blank portion in the last row of the shift coefficient information, the shift coefficient information is frame-filled according to the preset value based on the second position; wherein the second position includes the upper left position of the last LOD in the shift coefficient information.
  13. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    通过网格解码器解码码流,获得所述简化网格。The simplified grid is obtained by decoding the code stream through a grid decoder.
  14. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    通过网格解码器解码码流,获得所述运动矢量,并基于所述运动矢量确定所述简化网格。The code stream is decoded by a grid decoder to obtain the motion vector, and the simplified grid is determined based on the motion vector.
  15. 一种解码方法,应用于解码器,其中,所述解码器包括视频解码器和网格解码器,所述方法包括:A decoding method is applied to a decoder, wherein the decoder includes a video decoder and a trellis decoder, and the method includes:
    所述网格解码器,用于解码码流,确定当前帧的简化网格;The grid decoder is used to decode the code stream and determine the simplified grid of the current frame;
    所述视频解码器,用于执行如权利要求1-14任一项所述的解码方法。The video decoder is used to execute the decoding method as described in any one of claims 1-14.
  16. 一种编码方法,应用于编码器,所述方法包括:A coding method, applied to an encoder, comprising:
    根据当前帧的多个移位向量确定对应的多个移位系数;Determining corresponding multiple shift coefficients according to multiple shift vectors of the current frame;
    按照第二扫描顺序依次遍历所述多个移位系数,确定至少一个系数块;The plurality of shifted coefficients are sequentially traversed in a second scanning order to determine at least one coefficient block;
    基于所述至少一个系数块,按照第一扫描顺序确定所述当前帧的移位系数信息;Determining shift coefficient information of the current frame according to a first scanning order based on the at least one coefficient block;
    将所述移位系数信息写入码流。The shift coefficient information is written into a bit stream.
  17. 根据权利要求16所述的方法,其中,The method according to claim 16, wherein
    所述第一扫描顺序包括光栅扫描顺序的相反扫描顺序。The first scanning order comprises a reverse scanning order of a raster scanning order.
  18. 根据权利要求16所述的方法,其中,The method according to claim 16, wherein
    所述第二扫描顺序包括Z字形扫描顺序的相反扫描顺序。The second scanning order includes a reverse scanning order of the zigzag scanning order.
  19. 根据权利要求16所述的方法,其中,所述方法还包括:The method according to claim 16, wherein the method further comprises:
    对所述多个移位向量进行小波变换处理,确定所述多个移位系数。The plurality of shift vectors are subjected to wavelet transform processing to determine the plurality of shift coefficients.
  20. 根据权利要求16所述的方法,其中,The method according to claim 16, wherein
    所述系数块为包括至少一个单元块的正方形块;其中,所述单元块由2×2个移位系数构成。The coefficient block is a square block including at least one unit block; wherein the unit block is composed of 2×2 shift coefficients.
  21. 根据权利要求20所述的方法,其中,The method according to claim 20, wherein
    所述单元块中的移位系数,按照低频至高频的顺序排列,其中,高频的移位系数位于低频的移位系数的左侧和/或上侧。The shift coefficients in the unit block are arranged in order from low frequency to high frequency, wherein the high frequency shift coefficients are located on the left and/or above the low frequency shift coefficients.
  22. 根据权利要求20或21所述的方法,其中,所述方法还包括:The method according to claim 20 or 21, wherein the method further comprises:
    所述移位系数信息包括由所述至少一个系数块构成的至少一个LOD。The shift coefficient information includes at least one LOD constituted by the at least one coefficient block.
  23. 根据权利要求22所述的方法,其中,所述方法还包括:The method according to claim 22, wherein the method further comprises:
    所述至少一个LOD按照低频至高频的顺序排列,其中,包括高频信息的LOD位于包括低频信息的LOD的左侧和/或上侧。The at least one LOD is arranged in order from low frequency to high frequency, wherein the LOD including high frequency information is located on the left and/or upper side of the LOD including low frequency information.
  24. 根据权利要求23所述的方法,其中,所述方法还包括:The method according to claim 23, wherein the method further comprises:
    若所述移位系数信息的行数小于预设高度阈值,则,按照预设数值和所述预设高度阈值对所述移位系数信息进行视频填补;其中,所述第一位置包括所述移位系数信息中的、最后一个LOD的上方的位置。If the number of rows of the shift coefficient information is less than a preset height threshold, the shift coefficient information is video padded according to a preset value and the preset height threshold; wherein the first position includes a position above the last LOD in the shift coefficient information.
  25. 根据权利要求23所述的方法,其中,所述方法还包括:The method according to claim 23, wherein the method further comprises:
    若所述移位系数信息中的最后一行存在空余部分,则基于第二位置,按照所述预设数值对所述移位系数信息进行帧填补;其中,所述第二位置包括所述移位系数信息中的、最后一个LOD的左上方的位置。If there is a blank portion in the last row of the shift coefficient information, the shift coefficient information is frame-filled according to the preset value based on the second position; wherein the second position includes the upper left position of the last LOD in the shift coefficient information.
  26. 根据权利要求16所述的方法,其中,The method according to claim 16, wherein
    所述移位向量为通过所述当前帧的细化网格和所述当前帧的原始网格确定的;其中,所述原始网格经过简化处理后确定对应的简化网格,所述简化网格经过细化处理后确定对应的所述细化网格。The shift vector is determined by the refined grid of the current frame and the original grid of the current frame; wherein the original grid is simplified to determine the corresponding simplified grid, and the simplified grid is refined to determine the corresponding refined grid.
  27. 根据权利要求26所述的方法,其中,所述方法还包括:The method according to claim 26, wherein the method further comprises:
    利用所述当前帧的简化网格的码流确定所述当前帧的重构简化网络;Determine a reconstructed simplified network of the current frame using a code stream of a simplified grid of the current frame;
    通过所述重构简化网格对所述移位向量进行更新处理。The displacement vector is updated by reconstructing the simplified grid.
  28. 根据权利要求26所述的方法,其中,所述方法还包括:The method according to claim 26, wherein the method further comprises:
    利用所述当前帧的运动矢量的码流确定所述当前帧的运动矢量,并根据所述运动矢量确定所述当前帧的重构简化网络;Determine the motion vector of the current frame using the code stream of the motion vector of the current frame, and determine the reconstructed simplified network of the current frame according to the motion vector;
    通过所述重构简化网格对所述移位向量进行更新处理。The displacement vector is updated by reconstructing the simplified grid.
  29. 一种编码方法,应用于编码器,其中,所述编码器包括视频编码器、网格编码器以及预处理器,所述方法包括:A coding method, applied to an encoder, wherein the encoder includes a video encoder, a trellis encoder and a preprocessor, the method comprising:
    所述预处理器,用于根据当前帧的原始网格生成简化网格和移位向量;The preprocessor is used to generate a simplified grid and a shift vector according to the original grid of the current frame;
    所述网格编码器,用于编码所述简化网格,生成简化网格的码流;The grid encoder is used to encode the simplified grid to generate a code stream of the simplified grid;
    所述视频编码器,用于执行如权利要求16-27任一项所述的编码方法。The video encoder is used to execute the encoding method as described in any one of claims 16-27.
  30. 一种编码器,所述编码器包括:第一确定单元,编码单元;其中,An encoder, comprising: a first determining unit, an encoding unit; wherein:
    所述第一确定单元,配置为根据当前帧的多个移位向量确定对应的多个移位系数;按照第二扫描顺序依次遍历所述多个移位系数,确定至少一个系数块;基于所述至少一个系数块,按照第一扫描顺序确定所述当前帧的移位系数信息;The first determination unit is configured to determine a plurality of corresponding shift coefficients according to a plurality of shift vectors of the current frame; sequentially traverse the plurality of shift coefficients in accordance with a second scanning order to determine at least one coefficient block; and determine the shift coefficient information of the current frame in accordance with the first scanning order based on the at least one coefficient block;
    所述编码单元,配置为将所述移位系数信息写入码流。The encoding unit is configured to write the shift coefficient information into a bit stream.
  31. 一种编码器,所述编码器包括:第一存储器和第一处理器;其中,An encoder comprises: a first memory and a first processor; wherein:
    所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;The first memory is used to store a computer program that can be run on the first processor;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求16至28,或29任一项所述的方法。The first processor is configured to execute the method according to any one of claims 16 to 28 or 29 when running the computer program.
  32. 一种解码器,所述解码器包括:解码单元,第二确定单元;其中,A decoder, comprising: a decoding unit, a second determining unit; wherein:
    所述解码单元,配置为解码码流;The decoding unit is configured to decode the code stream;
    所述第二确定单元,配置为确定当前帧的移位系数信息;按照第一扫描顺序从所述移位系数信息中确定至少一个系数块;基于所述至少一个系数块,按照第二扫描顺序确定多个移位系数;根据所述多个移位系数和当前帧的简化网格,确定当前帧的重构原始网格。The second determination unit is configured to determine the shift coefficient information of the current frame; determine at least one coefficient block from the shift coefficient information according to a first scanning order; based on the at least one coefficient block, determine multiple shift coefficients according to a second scanning order; and determine the reconstructed original grid of the current frame based on the multiple shift coefficients and the simplified grid of the current frame.
  33. 一种解码器,所述解码器包括:第二存储器和第二处理器;其中,A decoder, comprising: a second memory and a second processor; wherein:
    所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;The second memory is used to store a computer program that can be run on the second processor;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至14,或15任一项所述的方法。The second processor is configured to execute the method according to any one of claims 1 to 14 or 15 when running the computer program.
  34. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至14,或15任一项所述的方法、或者实现如权利要求16至28,或29任一项所述的方法。A computer-readable storage medium storing a computer program, wherein the computer program, when executed, implements the method according to any one of claims 1 to 14, or 15, or implements the method according to any one of claims 16 to 28, or 29.
PCT/CN2022/126026 2022-10-18 2022-10-18 Encoding and decoding methods, encoder, decoder, and storage medium WO2024082151A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/126026 WO2024082151A1 (en) 2022-10-18 2022-10-18 Encoding and decoding methods, encoder, decoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/126026 WO2024082151A1 (en) 2022-10-18 2022-10-18 Encoding and decoding methods, encoder, decoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2024082151A1 true WO2024082151A1 (en) 2024-04-25

Family

ID=90736618

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/126026 WO2024082151A1 (en) 2022-10-18 2022-10-18 Encoding and decoding methods, encoder, decoder, and storage medium

Country Status (1)

Country Link
WO (1) WO2024082151A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150063446A1 (en) * 2012-06-12 2015-03-05 Panasonic Intellectual Property Corporation Of America Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus
US20150146971A1 (en) * 2013-11-27 2015-05-28 Autodesk, Inc. Mesh reconstruction from heterogeneous sources of data
US20180184131A1 (en) * 2015-06-11 2018-06-28 Lg Electronics Inc. Method for encoding/decoding image and device therefor
JP2021093575A (en) * 2019-12-06 2021-06-17 日本放送協会 Coding device, decoding device and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150063446A1 (en) * 2012-06-12 2015-03-05 Panasonic Intellectual Property Corporation Of America Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus
US20150146971A1 (en) * 2013-11-27 2015-05-28 Autodesk, Inc. Mesh reconstruction from heterogeneous sources of data
US20180184131A1 (en) * 2015-06-11 2018-06-28 Lg Electronics Inc. Method for encoding/decoding image and device therefor
JP2021093575A (en) * 2019-12-06 2021-06-17 日本放送協会 Coding device, decoding device and program

Similar Documents

Publication Publication Date Title
US8395634B2 (en) Method and apparatus for processing information
CN103888777B (en) Moving picture compression decompressing device
JP2020529811A (en) Video image encoding and decoding methods, equipment, and devices
US9894371B2 (en) Video decoder memory bandwidth compression
US8514937B2 (en) Video encoding apparatus
CN105933708A (en) Data compression-decompression method and device
KR100359821B1 (en) Method, Apparatus And Decoder For Motion Compensation Adaptive Image Re-compression
CN112333446B (en) Intra-frame block copy reference block compression method
TWI523498B (en) An image coding method, an image decoding method, an image coding apparatus, and an image decoding apparatus
KR20230038144A (en) Video processing method, device, device, decoder, system and storage medium
JP4209631B2 (en) Encoding device, decoding device, and compression / decompression system
JP2000341689A (en) Wavelet inverse converting device and its method and wavelet decoding device and its method
JP2006279574A (en) Decoder and decoding method
US8942474B2 (en) Method and system for interpolating index values of associated tiles in an image
WO2024082151A1 (en) Encoding and decoding methods, encoder, decoder, and storage medium
US20130259126A1 (en) Method and apparatus for video encoding/decoding of encoding/decoding block filter information on the basis of a quadtree
Pratapa et al. RLFC: Random access light field compression using key views and bounded integer sequence encoding
US6035322A (en) Image processing apparatus
Zhou et al. A hardware decoder architecture for general string matching technique
CN101754017B (en) Information processing apparatus and method
TW201038081A (en) Circuit and method for multi-format video codec
CN101345874A (en) Video decoding method, reference frame processing method and apparatus
CN114422805B (en) Video coding and decoding method, device and equipment
US20240155137A1 (en) Multimedia data processing method and apparatus, computer device, computer-readable storage medium, and computer program product
KR20010097394A (en) method for different compression of the medical image

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: 22962342

Country of ref document: EP

Kind code of ref document: A1