Compression encoding and decompression methods and apparatus, lossless compression methods and apparatus

By compressing and encoding motion information by size and attributes, generating a bitstream sequence and seamlessly splicing it together, the problem of poor motion information compression in inter-frame prediction is solved, DDR access bandwidth and power consumption are reduced, and the real-time performance and execution efficiency of the hardware are improved.

CN118509593BActive Publication Date: 2025-10-31FUZHOU ROCKCHIP SEMICON
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410543433.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-10-31
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

Existing technologies have poor motion information compression performance during inter-frame prediction, leading to increased DDR access bandwidth and power consumption.

Method used

By combining table lookup mapping with the size and attributes of the prediction block, motion information is compressed and encoded to generate a bitstream sequence. After meeting the preset bit length, the sequence is seamlessly spliced ​​together, reducing DDR storage requirements.

Benefits of technology

It improves the compression rate of motion information, reduces DDR access bandwidth and bus power consumption, and enhances the real-time performance and execution efficiency of the hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118509593B_ABST
    Figure CN118509593B_ABST
Patent Text Reader

Abstract

This disclosure provides a compression encoding and decompression method and apparatus, as well as a lossless compression method and apparatus. The compression encoding method includes: acquiring motion information of prediction blocks in a video frame; compressing the motion information by looking up a table based on the size and attributes of the prediction blocks to obtain compressed data; concatenating the compressed data associated with the same row of coding tree units in the video frame, such that a set of bitstream data is output after meeting a preset bit length, and such that the output sets of bitstream data constitute a compressed sequence set associated with the same row of coding tree units; and obtaining a bitstream sequence associated with the same row of coding tree units by using the bitstream length information and the total number of prediction blocks contained in the compressed sequence set as bitstream header information, and using the compressed sequence set as a bitstream field. The compression encoding method achieves good compression effect on motion information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the field of video encoding and decoding technology, specifically relating to compression encoding and decompression methods and apparatus, lossless compression methods and apparatus, computer-readable storage media and electronic devices. Background Technology

[0002] According to video codec protocols, inter-frame prediction requires accessing motion vector information from helper frames in addition to reading reference frame data, in order to parse the motion vectors of the current prediction block. Helper frames are defined relative to reference frames and are used to store motion information. They may be referenced and used by other frames; this referenced and used process is called temporal prediction (MV), or ColPic in H.264 and H.265 protocols. The specific content represented by the helper frame can be called temporal motion information, and the motion vector data of the helper frame can be uniformly referred to as ColMV data.

[0003] In the existing hardware architecture, when reading and writing colmv data for inter-frame prediction, the colmv data is not compressed and is directly stored in DDR, which will consume additional DDR access bandwidth. Summary of the Invention

[0004] The purpose of this disclosure is to provide compression encoding and decompression methods and apparatus, as well as lossless compression methods and apparatus, to solve the problem of poor motion information compression effect in the current inter-frame prediction reading and writing motion information process.

[0005] To achieve the above and other related objectives, in a first aspect, this disclosure provides a compression coding method. The compression coding method includes: acquiring motion information of prediction blocks in a video frame; compressing the motion information by looking up a table based on the size and attributes of the prediction blocks to obtain compressed data; concatenating the compressed data associated with the same row of coding tree units in the video frame, such that a set of bitstream data is output after satisfying a preset bit length, and such that the output sets of bitstream data constitute a compressed sequence set associated with the same row of coding tree units; and obtaining a bitstream sequence associated with the same row of coding tree units by using the bitstream length information in the compressed sequence set and the total number of prediction blocks contained in the compressed sequence set as bitstream header information, and using the compressed sequence set as a bitstream field.

[0006] In one embodiment of this disclosure, compressing the motion information to obtain compressed data based on the size and attributes of the prediction block by looking up a table includes: compressing the motion information by size based on the size of the prediction block to obtain size-compressed data; and compressing the size-compressed data by attribute based on the attributes of the prediction block by looking up a table to obtain the compressed data.

[0007] In one embodiment of this disclosure, the attributes of the prediction block include invalid, one-way valid, or two-way valid. The method of obtaining compressed data by performing attribute compression on the size compression data through lookup table mapping based on the attributes of the prediction block includes: when the attribute of the prediction block is invalid, filtering motion information in the size compression data through lookup table mapping to obtain the compressed data; when the attribute of the prediction block is one-way valid, filtering invalid one-way motion information in the size compression data through lookup table mapping to obtain the compressed data; and when the attribute of the prediction block is two-way valid, processing the size compression data through lookup table mapping to obtain the compressed data.

[0008] In one embodiment of this disclosure, concatenating compressed data associated with the same row of coding tree units in the video frame to output a set of bitstream data after satisfying a preset bit length includes: inserting the size and coordinates of the associated prediction block into the compressed data associated with the same row of coding tree units; and seamlessly concatenating the compressed data associated with the same row of coding tree units in the video frame according to the size and coordinates of the prediction block and the end marker of the coding tree unit until a set of bitstream data is output after satisfying the preset bit length.

[0009] In one embodiment of this disclosure, seamlessly splicing compressed data associated with the same row of coding tree units in the video frame until a preset bit length is met, and then outputting a set of bitstream data, includes: storing the compressed data associated with the same row of coding tree units in a register based on the bit length and loop pointer of the compressed data associated with the same row of coding tree units; and outputting a set of bitstream data of the preset bit length from the register when the bitstream data temporarily stored in the register meets the preset bit length.

[0010] In one embodiment of this disclosure, the output sets of bitstream data constitute a compressed sequence set associated with the same row of coding tree units, including: when the bit length of the last bitstream data output does not meet the preset bit length, supplementing the high bits of the last bitstream data with preset bit values ​​so that the last bitstream data meets the preset bit length.

[0011] Secondly, embodiments of this disclosure provide a decompression method. The decompression method includes: acquiring a bitstream sequence compressed from motion information of video frames; parsing the bitstream sequence to obtain bitstream header information and bitstream fields; parsing the bitstream header information to obtain bitstream length information and the total number of prediction blocks; parsing the bitstream fields based on the bitstream length information to obtain bitstream data; and parsing the bitstream data based on the total number of prediction blocks by looking up a table to obtain the motion information of the prediction blocks.

[0012] In one embodiment of this disclosure, obtaining motion information of the prediction blocks of the video frame by parsing the bitstream data through a lookup table based on the total number of prediction blocks includes: obtaining a valid flag of the prediction block in the bitstream data; obtaining the motion information of the prediction block and the total number of parsed prediction blocks by parsing the bitstream data through a lookup table based on the valid flag; and when the total number of parsed prediction blocks is the same as the total number of prediction blocks, the bitstream sequence is decoded.

[0013] In one embodiment of this disclosure, obtaining the motion information of the prediction block and the total number of predicted blocks by parsing the bitstream data through a lookup table based on the valid flag includes: obtaining the compressed data associated with the valid flag and the total number of predicted blocks by a lookup table based on the valid flag; and obtaining the motion information of the prediction block based on the compressed data.

[0014] Thirdly, embodiments of this disclosure provide a lossless compression method based on inter-frame prediction. The lossless compression method includes: receiving motion information of a prediction block from an inter-frame prediction module, and using the motion information as auxiliary frame data for subsequent frames in the current image encoding / decoding; performing a compression encoding method according to any one of the first aspects on the motion information to obtain the bitstream sequence, and storing the bitstream sequence in memory; and when the inter-frame prediction module initiates frame processing of an image slice and / or image tile, prefetching the bitstream sequence from the memory, performing a decompression method according to any one of the second aspects on the bitstream sequence to obtain the motion information, and transmitting the motion information to the inter-frame prediction module when the inter-frame prediction module needs the motion information.

[0015] Fourthly, embodiments of this disclosure provide a compression encoding apparatus. The compression encoding apparatus includes: a motion information acquisition module configured to acquire motion information of prediction blocks of a video frame; a compressed data acquisition module configured to compress the motion information by looking up a table based on the size and attributes of the prediction blocks to obtain compressed data; a compressed data splicing module configured to splice compressed data associated with the same row of coding tree units in the video frame, such that a set of bitstream data is output after satisfying a preset bit length, and such that the output sets of bitstream data constitute a compressed sequence set associated with the same row of coding tree units; and a bitstream sequence acquisition module configured to acquire a bitstream sequence associated with the same row of coding tree units by using the bitstream length information in the compressed sequence set and the total number of prediction blocks contained in the compressed sequence set as bitstream header information, and using the compressed sequence set as a bitstream field.

[0016] Fifthly, embodiments of this disclosure provide a decompression apparatus. The decompression apparatus includes: a bitstream sequence acquisition module configured to acquire a bitstream sequence compressed from motion information of video frames; a bitstream sequence parsing module configured to parse the bitstream sequence to acquire bitstream header information and bitstream fields; a bitstream header information parsing module configured to parse the bitstream header information to acquire bitstream length information and the total number of prediction blocks; a bitstream field parsing module configured to parse the bitstream fields based on the bitstream length information to acquire bitstream data; and a bitstream data parsing module configured to parse the bitstream data based on the total number of prediction blocks by looking up a table to acquire motion information of the prediction blocks.

[0017] Sixthly, embodiments of this disclosure provide a lossless compression apparatus based on inter-frame prediction. The lossless compression apparatus includes: a motion information acquisition module configured to receive motion information of a prediction block from an inter-frame prediction module and use the motion information as auxiliary frame data for subsequent frames in the current image encoding / decoding; a compression encoding module configured to compress and encode the motion information using a compression encoding method and store the resulting bitstream sequence in memory; and a decompression module configured to prefetch the bitstream sequence from the memory when the inter-frame prediction module initiates frame processing of image slices and / or image tiles, decode the bitstream sequence according to the decompression method to obtain the motion information, and transmit the motion information to the inter-frame prediction module when the inter-frame prediction module requires the motion information.

[0018] In a seventh aspect, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the compression encoding method of any one of the first aspects, the decompression method of any one of the second aspects, and / or the lossless compression method of any one of the third aspects.

[0019] Eighthly, embodiments of this disclosure also provide an electronic device. The electronic device includes: a memory storing a computer program; and a processor communicatively connected to the memory, which, when the computer program is invoked, executes the compression encoding method of any one of the first aspects, the decompression method of any one of the second aspects, and / or the lossless compression method of any one of the third aspects.

[0020] According to the compression encoding and decompression method and apparatus, and the lossless compression method and apparatus disclosed herein, the compression encoding method achieves better compression performance for complex sources with high h264 bitrates. For video sequences with a large number of I-blocks, the compression performance of this disclosure is also relatively good. Furthermore, the compression encoding method of this disclosure uses a lookup table mapping based on predicted block size and attributes, and employs a seamless stacking method, i.e., minimum bit stacking, resulting in faster compression real-time performance and execution efficiency, with a more optimized area, representing a 30% improvement over previous methods. Attached Figure Description

[0021] Figure 1 The diagram shown is a structural schematic of a lossless compression apparatus based on inter-frame prediction according to an embodiment of this disclosure.

[0022] Figure 2 The flowchart shown is a compression encoding method according to an embodiment of this disclosure.

[0023] Figure 3 The diagram shows a compressed sequence in H264 format according to an embodiment of this disclosure.

[0024] Figure 4 The diagram shows a compressed sequence in HEVC / AVS2 format according to an embodiment of this disclosure.

[0025] Figure 5 The diagram shows a compressed sequence in VP9 / AV1 format according to an embodiment of this disclosure.

[0026] Figure 6 The diagram shown is a structural schematic of the code stream sequence according to an embodiment of this disclosure.

[0027] Figure 7 The flowchart shown is an embodiment of this disclosure that describes how motion information is compressed by looking up a table based on the size and attributes of the predicted block to obtain compressed data.

[0028] Figure 8 The flowchart shown is an embodiment of this disclosure that describes how the size compression data is obtained by performing attribute compression on the predicted block based on the attributes of the predicted block through a lookup table mapping.

[0029] Figure 9 This diagram illustrates a comparison of data volume before and after compression in an embodiment of this disclosure.

[0030] Figure 10 The flowchart shown is an embodiment of this disclosure that splices compressed data associated with the same row of coding tree units in the video frame to output a set of bitstream data after satisfying a preset bit length.

[0031] Figure 11 The flowchart shown is a method for seamlessly splicing compressed data associated with the same row of coding tree units in the video frame according to an embodiment of this disclosure until a preset bit length is met, and then outputting a set of bitstream data.

[0032] Figure 12 The flowchart shown is a decompression method according to an embodiment of this disclosure.

[0033] Figure 13 This is a flowchart illustrating how, based on the total number of prediction blocks, the motion information of the prediction blocks of a video frame is obtained by parsing the bitstream data through a lookup table, according to an embodiment of this disclosure.

[0034] Figure 14 The flowchart shown is an embodiment of this disclosure, which describes how the motion information of the prediction blocks and the total number of prediction blocks are obtained by parsing the bitstream data through a lookup table based on the valid flag.

[0035] Figure 15 The flowchart shown is a lossless compression method based on inter-frame prediction according to an embodiment of this disclosure.

[0036] Figure 16 The diagram shown is a structural schematic of a compression encoding device according to an embodiment of this disclosure.

[0037] Figure 17 The diagram shown is a structural schematic of a data seamless splicing unit according to an embodiment of this disclosure.

[0038] Figure 18 The diagram shown is a structural schematic of the decompression apparatus according to an embodiment of this disclosure.

[0039] Figure 19 The diagram shown is a structural schematic of a lossless compression device based on inter-frame prediction according to an embodiment of this disclosure. Detailed Implementation

[0040] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. This disclosure can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0041] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. Therefore, the illustrations only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0042] The technical solutions of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0043] As shown in Table 1 below, colmv consumes a significant amount of memory bandwidth, especially h264.

[0044] Table 1

[0045] Video format colmv unit size colmv bit count Calculate the percentage using 420 as an example (read / write dual-path). HEVC 16x16 128 128*2 / (16*16*8*1.5)=8.33% H264 4x4 64 64*2 / (4*4*8*1.5)=66.67% VP9 8x8 128 128*2 / (8*8*8*1.5)=33.33% AVS2 16x16 128 128*2 / (16*16*8*1.5)=8.33% AV1 8x8 64 64*2 / (8*8*8*1.5)=16.66%

[0046] With the market's existing products supporting increasingly higher image resolutions and chip data throughput, the demand for DDR access bandwidth is constantly increasing. To meet market and consumer experience needs, more functions need to be supported while maintaining good battery life in electronic products. Given the ever-expanding scale of chip-level SoCs, SoC design that reduces DDR access efficiency, bus bandwidth, and power consumption is crucial. Video encoding and decoding based on inter-frame prediction assists in lossless compression of frame information, reducing bus bandwidth and overall bus power consumption. However, in situations involving complex sources with high h264 bitrates, current inter-frame prediction motion information reading and writing processes suffer from poor motion information compression performance.

[0047] In the compression coding method described in this disclosure, content compression is performed by combining the size and attributes of the prediction block through lookup table mapping, which can improve the compression effect of motion information. Furthermore, the compression ratio can be further improved by using the minimum bit degree stacking method.

[0048] The following will elaborate on the principles and implementation methods of the compression encoding and decompression methods and apparatus, and the lossless compression methods and apparatus of this disclosure, so that those skilled in the art can understand the compression encoding and decompression methods and apparatus, and the lossless compression methods and apparatus of this disclosure without creative effort.

[0049] Figure 1 This is a schematic diagram illustrating the structure of a lossless compression apparatus based on inter-frame prediction according to an embodiment of the present disclosure. Figure 1 As shown, the lossless compression device 100 based on inter-frame prediction includes an encoding / decoding control module 110, a motion information decoding module 120, and a motion information encoding module 130.

[0050] The encoding / decoding control module 110 is connected to the inter-frame prediction module 140, receives motion information from the inter-frame prediction module 140, and uses the motion information as auxiliary frame data for subsequent frames of the current image encoding / decoding.

[0051] The motion information decoding module 120 is connected to the encoding and decoding control module 110. The encoding and decoding control module 110 compresses and encodes the motion information using a compression encoding method and stores the resulting code stream sequence in the memory 150.

[0052] When the inter-frame prediction module starts frame processing of image slice and / or image title, the encoding / decoding control module 110 prefetches the bitstream sequence from the memory 150. The motion information decoding module 120 decompresses the prefetched bitstream sequence according to the decompression method to obtain the motion information, and transmits the motion information to the inter-frame prediction module 140 when the inter-frame prediction module 140 needs the motion information.

[0053] In some embodiments, the self-compiled and self-decompressing closed-loop design based on the compression encoding method and the decompression method can increase hardware coupling, simplify compression and decompression design, and reduce hardware area and power consumption.

[0054] In some embodiments, after processing, the current codec inter-frame prediction module 140 inputs motion information to subsequent frames as helper frames. This motion information needs to be stored in memory (DDR) 150. The motion information is compressed using the compression coding method, thereby reducing the DDR write bus bandwidth.

[0055] In some embodiments, the lossless compression device further includes a refresh unit. The refresh unit is configured to, when a new slice / tile and the previous slice / tile reference the same assist frame, not refresh and clear the preloaded motion information, but continue to prefetch new motion information.

[0056] Figure 2 This is a flowchart illustrating a compression encoding method according to an embodiment of the present disclosure. Figure 2 As shown, this embodiment provides a compression encoding method, which includes the following steps S110 to S140.

[0057] In step S110, motion information of the predicted blocks of the video frame is obtained.

[0058] In some embodiments, the motion information may include colmv raw data and size location information, which includes both location information and size information.

[0059] In some embodiments, the prediction block can be an inter-frame prediction block or an intra-frame prediction block. When the prediction block is an intra-frame prediction block, colmv needs to store very little information, only needing to identify the intra-frame. The inter-frame prediction block refers to the prediction block found in neighboring encoded images for the block to be encoded in the current image, and the intra-frame prediction block refers to the prediction block found in the current frame for the block to be encoded in the current image.

[0060] In step S120, based on the size and attributes of the predicted block, the motion information is compressed by looking up a table to obtain compressed data.

[0061] In some embodiments, a fixed size for storing colmv information is used for each video format. The prediction block size for inter-frame prediction can vary. In a normal video sequence, the prediction block size is very likely to exceed the size of the colmv information storage. Information compression can be achieved by adjusting the prediction block size. The colmv storage size may refer to the colmv unit size in the video format associated with the motion information.

[0062] In some embodiments, the video formats include HEVC, H264, VP9, ​​AVS2, and AV1. Hardware implementations that integrate five video formats (HEVC, H264, VP9, ​​AVS2, and AV1) can significantly reduce hardware implementation area and minimize power consumption.

[0063] In step S130, the compressed data associated with the same row of coding tree units in the video frame are concatenated, so that a set of bit stream data is output after satisfying the preset bit length, and the output bit stream data constitutes a set of compressed sequences associated with the same row of coding tree units.

[0064] In some embodiments, the method of constructing a compressed sequence set associated with the same row of coding tree units by the output groups of bitstream data includes: when the bit length of the last bitstream data output does not meet the preset bit length, supplementing the high bits of the last bitstream data with preset bit values ​​so that the last bitstream data meets the preset bit length.

[0065] In step S140, the code stream sequence associated with the same row of coding tree unit is obtained by using the code stream length information and the total number of prediction blocks contained in the compressed sequence set as code stream header information and the compressed sequence set as code stream field.

[0066] In some embodiments, the compressed sequence set refers to each compressed sequence set between the left and right boundaries in the same row, and the bitstream sequence associated with the coding tree unit in the same row may include the bitstream sequences corresponding to each compressed sequence set between the left and right boundaries in the same row.

[0067] Figure 3 This is a schematic diagram illustrating a compressed sequence in H.264 format according to an embodiment of this disclosure. Please refer to... Figure 3 , Figure 3 This represents a compressed sequence in the H.264 decoding format, consisting of 4 macroblocks.

[0068] Figure 4 This is a schematic diagram illustrating a compressed sequence in HEVC / AVS2 format according to an embodiment of this disclosure. Please refer to... Figure 4 , Figure 4This represents a compressed sequence in the HEVC / AVS2 decoding format. When the CTU size is 16×16, colmv uses 16×16 as the storage unit and consists of 64 16s forming a compressed sequence. When the CTU size is 32×32, colmv uses 16×16 as the storage unit and consists of 16 CTU32s forming a compressed sequence. When the CTU size is 64×64, colmv uses 16×16 as the storage unit and consists of 4 CTU64s forming a compressed sequence.

[0069] Figure 5 This is a schematic diagram illustrating a compressed sequence in VP9 / AV1 format according to an embodiment of the present disclosure. Figure 5 This represents a compressed sequence in the VP9 / AV1 decoding format. `colmv` uses 8×8 storage units, and one CTU64 unit constitutes one compressed sequence. Each compressed sequence can be a separate set of compressed sequences.

[0070] In some embodiments, the preset bit length can be 128 bits.

[0071] In some embodiments, a complete line from the left boundary to the right boundary of the video frame may have several compressed sequence sets, which are relatively independent of each other. A compressed sequence set may consist of several coding tree units. The compressed data associated with the coding tree unit in the same line may refer to the compressed data under each coding tree unit between the left and right boundaries in the same line. The compressed sequence set associated with the coding tree unit in the same line may refer to each compressed sequence set between the left and right boundaries in the same line.

[0072] Figure 6 A schematic diagram illustrating the structure of a bitstream sequence according to an embodiment of this disclosure is shown. Please refer to [link / reference]. Figure 6 The bitstream sequence includes bitstream header information and bitstream fields. The bitstream header information can be located at the lowest position of the bitstream sequence. The bitstream header includes bitstream length information in units of the preset bit length and the total number of colmv blocks contained in the compressed sequence set, i.e., the total number of prediction blocks. The bitstream fields are the specific content of the compressed sequence set.

[0073] Figure 7 This diagram illustrates a method for compressing motion information based on the size and attributes of the predicted block, according to an embodiment of the present disclosure, to obtain compressed data. In some embodiments, please refer to... Figure 7 Based on the size and attributes of the predicted block, compressing the motion information by looking up a table to obtain compressed data may include the following steps S210 and S220.

[0074] In step S210, the motion information is dimensionally compressed based on the size of the predicted block to obtain dimensionally compressed data.

[0075] In some embodiments, a method for compressing the motion information based on the size of the prediction block to obtain size-compressed data includes: compressing the motion information as a whole with respect to the prediction block to obtain the size-compressed data, wherein the size of the prediction block is not less than the colmv storage size associated with the motion information.

[0076] In some embodiments, before compression by the prediction block as a whole, the motion information is stored and read / written in colmv units. After compression by the prediction block as a whole, it is stored and read / written in the prediction block as a whole. Compression by the prediction block as a whole can be regarded as treating the entire prediction block as a compressed segment of the motion information. This compressed segment may include several compression units. The compression unit may be based on 64 blocks to ensure that colmv information can be stored normally under the most pessimistic compression condition. The compression boundary of the colmv information can be specified, and the compression header and compression size information can be defined. The specific data compression of the motion information in the compression unit will not be described in detail in this embodiment.

[0077] In some embodiments, the prediction block can contain 16 colmv unit blocks. For example, the colmv unit size in HEVC is 16×16, and the prediction block size is 64×64. By ensuring that the size of the prediction block is not smaller than the colmv unit size, the motion information can be compressed within the prediction block. The prediction block may also contain several compression units, each of which can compress a portion of the motion information. The specific design of the compression units can be flexible according to actual conditions, and will not be elaborated further in this embodiment.

[0078] In step S220, based on the attributes of the predicted block, the size compression data is subjected to attribute compression by lookup table mapping to obtain the compressed data.

[0079] In some embodiments, the colmv information storage is always written out regardless of whether the current prediction block is an inter-frame or intra-frame prediction block. However, there is a certain probability that the decoded prediction block will be an intra-frame prediction block. When the current block is an intra-frame prediction block, the information that colmv needs to store is very small, and it is only necessary to identify the intra-frame. Therefore, information compression can be achieved based on the prediction block attributes.

[0080] In some embodiments, the method of obtaining compressed data by performing attribute compression on the size compressed data through lookup table mapping based on the attributes of the prediction block includes: discarding invalid information in the size compressed data through lookup table mapping based on the attributes of the prediction block, and obtaining the compressed data.

[0081] Figure 8This diagram illustrates a method for obtaining compressed data by performing attribute compression on the size-compressed data through a lookup table mapping based on the attributes of the predicted block, according to an embodiment of this disclosure. The attributes of the predicted block include invalid, one-way valid, or two-way valid. Please refer to... Figure 8 The steps S310 to S330 are as follows: Based on the attributes of the predicted block, the size compression data is compressed by attribute compression through table lookup mapping to obtain the compressed data.

[0082] In step S310, when the attribute of the predicted block is invalid, the motion information in the size compression data is filtered out by a lookup table mapping to obtain the compression data.

[0083] In step S320, when the attribute of the predicted block is unidirectionally valid, invalid unidirectional motion information in the size compression data is filtered out by table lookup mapping to obtain the compression data.

[0084] In step S330, when the attribute of the predicted block is bidirectional, the size compression data is processed by lookup table mapping to obtain the compressed data.

[0085] In some embodiments, the lookup table mapping may refer to a two-dimensional lookup table mapping, where the lookup table refers to querying the colmv lossless compression lookup table, which may be shown in Table 2 below.

[0086] Table 2

[0087]

[0088] In Table 2, NA indicates that it is not supported. For example, the MED format is not supported in the H.264 video format. When the prediction block attribute is invalid, it corresponds to MIN in the colmv lossless compression lookup table; when the prediction block attribute is unidirectionally valid, it corresponds to MED in the colmv lossless compression lookup table; and when the prediction block attribute is bidirectionally valid, it corresponds to MAX in the colmv lossless compression lookup table.

[0089] Figure 9 This is a schematic diagram showing a comparison of data volume before and after compression according to an embodiment of this disclosure. In some embodiments, please refer to... Figure 9 When the predicted block attribute is invalid, Figure 9This demonstrates a comparison of the motion information, the size-compressed data, and the amount of compressed data. HEVC's colmv unit is 16x16. When the current PU block size of the inter-frame prediction input is 64x64, a comparison of the data volume before and after lossless compression in this embodiment is shown. The lossless compression in this embodiment mainly employs two levels of compression: the first level is size compression, where a single PU (64x64) represents the content of all colmv compressed units; the second level is lookup table compression.

[0090] Figure 10 This diagram illustrates a method for concatenating compressed data associated with the same row of coding tree units in a video frame, according to an embodiment of this disclosure, to output a set of bitstream data after satisfying a preset bit length. Please refer to... Figure 10 The method of splicing compressed data associated with the same row of coding tree units in the video frame to output a set of bit stream data after satisfying a preset bit length includes steps S410 and S420.

[0091] In step S410, the size and coordinates of the associated prediction block are inserted into the compressed data associated with the same row of coding tree units.

[0092] In step S420, based on the size and coordinates of the prediction block and the end marker of the coding tree unit, the compressed data associated with the coding tree unit in the same row of the video frame are seamlessly spliced ​​until a preset bit length is met, and then a set of bitstream data is output.

[0093] In some embodiments, based on the size and coordinates of the prediction block and the end marker of the coding tree unit, it is possible to seamlessly stitch together the compressed data associated with the same row of coding tree units in the video frame. The end marker may refer to the row end marker of the coding tree unit, which will not be elaborated further in this embodiment.

[0094] In some embodiments, the compressed data may be as shown in Table 3 below.

[0095] Table 3

[0096]

[0097]

[0098] In Table 3, err_flag represents the error flag, mv_y_l1 represents the motion vector value in the backward vertical direction, mv_x_l1 represents the motion vector value in the backward horizontal direction, mv_y_l0 represents the motion vector value in the forward vertical direction, mv_x_l0 represents the motion vector value in the forward horizontal direction, delta_poc1 represents the distance between the backward reference frame and the current frame, delta_poc0 represents the distance between the forward reference frame and the current frame, long_term1 represents the long-term reference flag of the backward reference frame, and long_term0 represents... The long-term reference flags for the forward reference frame are: pred_flag1 indicates a backward valid flag, pred_flag0 indicates a forward valid flag, pu_h indicates the height size of the prediction block, pu_w indicates the width size of the prediction block, pu_y indicates the vertical coordinates of the prediction block, pu_x indicates the horizontal coordinates of the prediction block, cur_bot indicates whether the current frame is a bottom field flag, ref_bot indicates whether the reference frame is a bottom field flag, ref_idx indicates the reference frame index value, and mb_field indicates whether the current frame is a field macroblock pair flag.

[0099] In Table 3, when the predicted block attribute is bidirectionally valid, pred_flag0 = 1 and pred_flag1 = 0 in the MAX table; when the predicted block attribute is unidirectionally valid, pred_flag0 = 0 and pred_flag1 = 1 or pred_flag0 = 1 and pred_flag1 = 0 in the MED table; when the predicted block attribute is invalid, pred_flag0 = 0 and pred_flag1 = 0 in the MIN table. In the VP9 / AV1 format, ref_frame1 and pred_flag1 have the same signal, and ref_frame0 and pred_flag0 have the same signal. pred_flag0 and pred_flag1 can be regarded as valid flags of the predicted block.

[0100] In some embodiments, when the prediction block attribute is bidirectionally valid, all motion information in the size-compressed data is valid, and the motion information of the compressed data is the same as that of the size-compressed data. When the prediction block attribute is unidirectionally valid, one direction of motion information in the size-compressed data is invalid. For example, in Table 3, taking HEVC as an example, mv_y_l1[15:0], mv_x_l1[15:0], delta_poc1[15:0], long_t erm1 is invalid information. When the predicted block attribute is invalid, the bidirectional motion information in the motion information of the size compression data is invalid. For example, in Table 3, taking HEVC as an example, mv_y_l1[15:0], mv_x_l1[15:0], mv_y_l0[15:0], mv_x_l0[15:0], delta_poc1[15:0], delta_poc0[15:0], long_term1, and long_term0 are all invalid information.

[0101] Figure 11 This diagram illustrates an embodiment of the present disclosure that seamlessly splices compressed data associated with the same row of coding tree units in a video frame until a preset bit length is met, then outputs a set of bitstream data. Please refer to... Figure 11 The method of seamlessly splicing compressed data associated with the same row of coding tree units in the video frame until a preset bit length is met before outputting a set of bit stream data includes the following steps S510 and S520.

[0102] In step S510, based on the bit length and loop pointer of the compressed data associated with the same row of coding tree unit, the compressed data associated with the same row of coding tree unit is stored in a register with seamless bit splicing.

[0103] In step S520, when the bitstream data temporarily stored in the register meets the preset bit length, a set of bitstream data of the preset bit length is output from the register.

[0104] In some embodiments, the bit length of the compressed data associated with the same row of coding tree units can be obtained by looking up a table.

[0105] In some embodiments, the preset bit length may be related to the memory ddr of inter-frame prediction. In this embodiment, the preset bit length may be 128. When the compressed sequence set has 4 segments of 128-bit bitstream data, the cumulative bitstream length may be 4.

[0106] In some embodiments, the bitstream data is temporarily stored in the register and output with the preset bit length. The specific amount of bitstream data written into the register can be controlled by a loop pointer. Before seamlessly splicing the bitstream data into the previous bitstream data in the register, it is determined whether the current bitstream data and the previous bitstream data are greater than the preset bit length. If they are satisfied, the bitstream data is output and the pointer is adjusted; otherwise, the pointer continues to wait.

[0107] In some embodiments, the compression coding method includes: acquiring the original colmv data and size position information as input data for lossless compression of motion information; predicting block count: i.e., accumulating the block count for each input motion information; colmv information lookup table to assign bit length and validity flag: the first-level means of motion information compression, discarding invalid information and recording only the valid part of the information based on whether the motion information is valid and its one-way and two-way attributes; seamless stacking of data within the colmv sequence: inserting block size and coordinates, and concatenating the two consecutive motion information entries, outputting a single bitstream data when it reaches 128 bits; determining whether the colmv sequence has ended: judging whether the colmv compressed sequence set has ended based on the input motion information size and coordinates, and the CTU end flag of the inter-frame prediction module. Processing complete; Alignment and fixed-length data transmission: Each input is fixed 128-bit aligned. If the last input is less than 128 bits after the colmv compressed sequence set is processed, the high bits are padded with 0s for forced alignment output; Cumulative bitstream length: Within the colmv compressed sequence set, the number of 128-bit units in each compressed bitstream is counted; Supplementing bitstream header information: After the colmv compressed sequence set is completed and the cumulative bitstream length is determined, this value is supplemented to the beginning of the bitstream segment in the form of a bitstream header; Colmv bitstream sequence storage and writing: Each 128-bit bitstream data is stored within the colmv compressed sequence set. When the compressed sequence set is completed and the bitstream header is supplemented to the beginning of the bitstream, the writing action is initiated.

[0108] Figure 12 A flowchart illustrating the decompression method according to an embodiment of this disclosure is provided. Please refer to [link / reference]. Figure 12 The decompression method includes the following steps S610 to S650.

[0109] In step S610, the compressed bitstream sequence of the motion information of the video frame is obtained.

[0110] In step S620, the bitstream sequence is parsed to obtain bitstream header information and bitstream fields.

[0111] In step S630, the bitstream header information is parsed to obtain bitstream length information and the total number of prediction blocks.

[0112] In step S640, the bitstream field is parsed based on the bitstream length information to obtain bitstream data.

[0113] In step S650, and based on the total number of prediction blocks, the motion information of the prediction blocks is obtained by parsing the bitstream data through a lookup table.

[0114] Figure 13 This diagram illustrates an embodiment of the present disclosure that, based on the total number of prediction blocks, the motion information of the prediction blocks of a video frame is obtained by parsing the bitstream data through a lookup table. Please refer to... Figure 13 Based on the total number of prediction blocks, the motion information of the prediction blocks of the video frame is obtained by parsing the bitstream data through a lookup table, including the following steps S710 to S730.

[0115] In step S710, the valid flag of the prediction block in the bitstream data is obtained.

[0116] In step S720, based on the valid flag, the bitstream data is parsed by looking up a table to obtain the motion information of the prediction block and the total number of parsed prediction blocks.

[0117] In some embodiments, the total number of parsed prediction blocks is related to the number of table lookups completed. Each time a table lookup is completed, the number of parsed prediction blocks is accumulated once. For example, when the table lookup is completed 8 times, the total number of parsed prediction blocks is 8.

[0118] In some embodiments, the method for obtaining the motion information of the predicted blocks and the total number of decoded predicted blocks by parsing the bitstream data through a lookup table based on the valid flag includes: performing inverse decoding of the bitstream data by querying a lossless compression table based on the valid flag to obtain the motion information of the predicted blocks and the total number of decoded predicted blocks.

[0119] In step S730, when the total number of parsed prediction blocks is the same as the total number of prediction blocks, the code stream sequence is decoded.

[0120] Figure 14 This diagram illustrates an embodiment of the present disclosure that, based on the aforementioned valid flag, parses the bitstream data using a lookup table to obtain the motion information of the predicted blocks and the total number of predicted blocks parsed. Please refer to... Figure 14 Based on the valid flag, the code stream data is parsed by looking up a table to obtain the motion information of the prediction block and the total number of parsed prediction blocks, including steps S810 and S820.

[0121] In step S810, based on the valid flag, the compressed data associated with the valid flag and the total number of parsed prediction blocks are obtained by table lookup mapping.

[0122] In step S820, motion information of the predicted block is obtained based on the compressed data.

[0123] In some embodiments, the decompression method includes: bitstream header parsing: inputting bitstream information, extracting the bitstream header information, and outputting it to the subsequent stage; obtaining bitstream length and total number of ColMV information blocks: obtaining the bitstream length information in 128-bit units and parsing out the total number of ColMV information blocks; ColMV information lookup table and inverse decoding based on valid flags: performing inverse decoding of the bitstream using the same lookup table as for lossless ColMV compression, obtaining the original ColMV motion information by looking up the table using the valid flags; and calculating the number of decompressed ColMV blocks: accumulating the number of decompressed blocks after each lookup. Count once; whether the colmv sequence ends: when the cumulative number of blocks decoded from the lookup table equals the total number of colmv information blocks in the bitstream header, the decoding of the current colmv sequence ends; output colmv raw values ​​according to blocks: write out the colmv unit information in real time based on the size and position information of the decoded colmv raw values; colmv information storage: move the colmv raw data to the storage unit; colmv sequence decoding and writing completed: after the colmv sequence is decoded and written out to the storage unit as colmv units, notify the inter-frame prediction module to use it.

[0124] Figure 15 A flowchart illustrating the lossless compression method based on inter-frame prediction according to an embodiment of this disclosure is shown. Please refer to... Figure 15 The lossless compression method based on inter-frame prediction includes steps S910 to S930.

[0125] In step S910, motion information of the prediction block is received from the inter-frame prediction module, and the motion information is used as auxiliary frame data for subsequent frames of the current image encoding and decoding.

[0126] In step S920, the motion information is processed according to a compression encoding method to obtain the bitstream sequence, and the bitstream sequence is stored in memory.

[0127] In step S930, when the inter-frame prediction module starts frame processing of image slices and / or image tiles, the bitstream sequence is prefetched from the memory, the bitstream sequence is decompressed according to the decompression method to obtain the motion information, and the motion information is transmitted to the inter-frame prediction module when the inter-frame prediction module needs the motion information.

[0128] Figure 16 A schematic diagram of the structure of a compression encoding apparatus according to an embodiment of this disclosure is shown. Figure 16 As shown, the compression encoding device 200 includes: a motion information acquisition module 210, a compressed data acquisition module 220, a compressed data splicing module 230, and a code stream sequence acquisition module 240.

[0129] The motion information acquisition module 210 is configured to acquire motion information of the prediction blocks of video frames.

[0130] The compressed data acquisition module 220 is configured to compress the motion information by looking up a table based on the size and attributes of the prediction block to obtain compressed data.

[0131] The compressed data splicing module 230 is configured to splice the compressed data associated with the same row of coding tree units in the video frame, so that a set of bit stream data is output after satisfying the preset bit length, and the output bit stream data constitutes a set of compressed sequences associated with the same row of coding tree units.

[0132] The code stream sequence acquisition module 240 is configured to acquire the code stream sequence associated with the same row of coding tree units by using the code stream length information and the total number of prediction blocks contained in the compressed sequence set as code stream header information and the compressed sequence set as code stream field.

[0133] The motion information acquisition module 210, compressed data acquisition module 220, compressed data splicing module 230, and code stream sequence acquisition module 240 provided in this embodiment are... Figure 2 The steps S110 to S140 of the compression encoding method or the detailed steps or actions in its implementation method correspond one-to-one, and will not be repeated here.

[0134] In some embodiments, Figure 17 A schematic diagram of the structure of the seamless data splicing unit according to an embodiment of this disclosure is shown. Please refer to [link / reference]. Figure 17 The compression encoding device further includes a colmv motion information lookup table lossless compression unit and a seamless data splicing unit. After obtaining compressed data from the colmv motion information lookup table, block size and coordinate information are added before entering the seamless data splicing unit. The register bit size within the unit is obtained by adding the maximum value of a single input and a fixed 128-bit output. The register temporarily stores the compressed data and outputs it with a fixed length. The specific amount of bitstream data written into the register and whether 128-bit bitstream data can be written are controlled by a loop pointer.

[0135] The data splicing unit accumulates the input bit stream data according to the bit length. When the amount of bit stream data in the register reaches or exceeds 128 bits, it initiates the operation of outputting a fixed 128-bit bit stream. After the transmission is completed, the length of the bit stream data is reduced by 128 bits, and the length of the received variable-length bit stream data continues to be accumulated.

[0136] Figure 18 A schematic diagram of the decompression apparatus according to an embodiment of this disclosure is shown. Figure 18As shown, the decompression device 300 includes: a code stream sequence acquisition module 310, a code stream sequence parsing module 320, a code stream header information parsing module 330, a code stream field parsing module 340, and a code stream data parsing module 350.

[0137] The bitstream sequence acquisition module 310 is configured to acquire the bitstream sequence after the motion information of the video frames is compressed.

[0138] The code stream sequence parsing module 320 is configured to parse the code stream sequence and obtain the code stream header information and code stream fields.

[0139] The code stream header information parsing module 330 is configured to parse the code stream header information to obtain the code stream length information and the total number of prediction blocks.

[0140] The bitstream field parsing module 340 is configured to parse the bitstream field based on the bitstream length information to obtain bitstream data.

[0141] The bitstream data parsing module 350 is configured to parse the bitstream data by looking up a table based on the total number of prediction blocks to obtain the motion information of the prediction blocks.

[0142] The code stream sequence acquisition module 310, code stream sequence parsing module 320, code stream header information parsing module 330, code stream field parsing module 340, and code stream data parsing module 350 provided in this embodiment are... Figure 12 The steps S610 to S650 of the decompression method shown, or the detailed steps or actions in its implementation method, correspond one-to-one and will not be repeated here.

[0143] Figure 19 This is a schematic diagram illustrating the structure of a lossless compression apparatus based on inter-frame prediction according to an embodiment of this disclosure. Please refer to... Figure 19 The lossless compression device includes the following units.

[0144] The prefetch position calculation and refresh processing unit removes invalid loaded temporal motion information and pre-calculates positions according to the processing order of the codec blocks. It inputs a slice / tile start signal and outputs the calculated coordinate position information to be prefetched.

[0145] The data fetch address calculation unit calculates the address in DDR memory based on the input coordinate position information and outputs the prefetch address.

[0146] The bus data retrieval module retrieves data from the bus based on the input data retrieval address, calculates the data retrieval length, and outputs the data retrieval address and length.

[0147] The bitstream header parsing and bitstream transport unit takes in bitstream data, parses the bitstream header, obtains the data length based on the bitstream header, and transports the bitstream, removing invalid data.

[0148] The bitstream storage unit is responsible for storing bitstream data.

[0149] The bitstream parsing and raw data storage unit inputs bitstream data, decodes the bitstream to obtain motion information, stores it according to the smallest unit of motion information in the field of view, and outputs the motion information to the inter-frame prediction module.

[0150] The encoding unit takes motion information from the inter-frame prediction module as input, encodes the motion information, and outputs bitstream data and bitstream header update flag.

[0151] The stream header packet unit takes in the stream data and updates the stream data length information in the stream header.

[0152] The bitstream storage and writing unit stores the input bitstream data, and after reaching a certain amount, writes it to DDR memory according to a certain alignment method.

[0153] In some embodiments, the bus data retrieval operation first calculates the starting address of the compressed sequence and the default length of four 128-bit bits from the coordinate information, and then reads the bitstream from DDR memory. After the bitstream returns, it is parsed to obtain the remaining bitstream length by subtracting the four 128-bit bits from the total bitstream length, and then the data is retrieved from DDR memory a second time. If the obtained total bitstream length is less than or equal to four 128-bit bits, then it is not necessary to retrieve the compressed sequence bitstream data from DDR memory a second time.

[0154] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.

[0155] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this disclosure, depending on actual needs. For example, the functional modules / units in the various embodiments of this disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0156] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0157] This disclosure also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the compression encoding method, the decompression method, and / or the lossless compression method provided in this disclosure. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0158] This disclosure also provides an electronic device including a memory and a processor. The memory is used to store a computer program. In some implementations, the memory may include a computer system readable medium in the form of volatile memory, such as RAM and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0159] The processor is connected to the memory and is used to execute computer programs stored in the memory, so that the electronic device performs the compression encoding method, the decompression method and / or the lossless compression method provided in the embodiments of this disclosure.

[0160] In some implementations, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. In other implementations, the processor can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0161] In summary, the embodiments of this disclosure provide compression encoding and decompression methods and apparatus, as well as lossless compression methods and apparatus. For complex sources with high h264 bitrates, the compression effect of this disclosure is better, and for video sequences with a large number of I blocks, the compression effect of this disclosure is also good.

[0162] The embodiments disclosed herein utilize a two-dimensional lookup table mapping based on inter-frame prediction block size and prediction block attributes, and employ a minimum bit stacking method, resulting in faster compression real-time performance and execution efficiency, with a better area ratio, representing a 30% improvement over previous methods.

[0163] The above embodiments are merely illustrative of the principles and effects of this disclosure and are not intended to limit this disclosure. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this disclosure. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this disclosure should still be covered by the claims of this disclosure.

Claims

1. A compression encoding method, characterized in that, include: Obtain motion information of the predicted blocks of video frames; Based on the size and attributes of the predicted block, the motion information is compressed by looking up a table to obtain compressed data; The compressed data associated with the same row of coding tree units in the video frame are concatenated to output a set of bitstream data after satisfying a preset bit length, and the output bitstream data constitutes a set of compressed sequences associated with the same row of coding tree units. as well as By using the bitstream length information and the total number of prediction blocks contained in the compressed sequence set as bitstream header information, and using the compressed sequence set as the bitstream field, the bitstream sequence associated with the same row of coding tree units is obtained. The method of compressing motion information by looking up a table based on the size and attributes of the prediction block to obtain compressed data includes: compressing the motion information by size based on the size of the prediction block to obtain size-compressed data; And based on the attributes of the predicted block, attribute compression is performed on the size-compressed data through a lookup table mapping to obtain the compressed data. The table lookup mentioned above refers to querying the colmv lossless compression lookup table. The attributes of the predicted block include invalid, one-way valid, or two-way valid. When the predicted block attribute is invalid, it corresponds to the minimum (MIN) data size in the colmv lossless compression lookup table. When the predicted block attribute is one-way valid, it corresponds to the medium (MED) data size in the colmv lossless compression lookup table. When the predicted block attribute is two-way valid, it corresponds to the maximum (MAX) data size in the colmv lossless compression lookup table.

2. The compression encoding method according to claim 1, characterized in that, The method of obtaining compressed data by performing attribute compression on the size-compressed data based on the attributes of the predicted block through table lookup mapping includes: When the attribute of the predicted block is invalid, the motion information in the size compression data is filtered out by a lookup table mapping in order to obtain the compressed data; When the attribute of the prediction block is unidirectionally valid, the invalid unidirectional motion information in the size compression data is filtered out by table lookup mapping in order to obtain the compression data; When the attribute of the predicted block is bidirectional, the size compression data is processed by lookup table mapping to obtain the compressed data.

3. The compression encoding method according to claim 1, characterized in that, The compressed data associated with the same row of coding tree units in the video frame are concatenated to output a set of bitstream data after satisfying a preset bit length, including: Insert the size and coordinates of its associated prediction block into the compressed data associated with the same row of coding tree units; Based on the size and coordinates of the prediction block and the end marker of the coding tree unit, the compressed data associated with the coding tree unit in the same row of the video frame are seamlessly spliced ​​together until a preset bit length is met, and then a set of bitstream data is output.

4. The compression encoding method according to claim 3, characterized in that, The compressed data associated with the same row of coding tree units in the video frame are seamlessly spliced ​​together until a preset bit length is met, and then a set of bitstream data is output, including: Based on the bit length and loop pointer of the compressed data associated with the same row of coding tree unit, the compressed data associated with the same row of coding tree unit is stored in a register with seamless bit splicing. When the bitstream data temporarily stored in the register meets the preset bit length, a set of bitstream data of the preset bit length is output from the register.

5. The compression encoding method according to claim 1, characterized in that, The output bitstream data forms a compressed sequence set associated with the same row of coding tree units, including: When the bit length of the last bit of output data does not meet the preset bit length, the high bits of the last bit of data are supplemented with preset bit values ​​so that the last bit of data meets the preset bit length.

6. A decompression method, characterized in that, include: Obtain the compressed bitstream sequence of motion information from video frames; Parse the bitstream sequence to obtain the bitstream header information and bitstream fields; Parse the bitstream header information to obtain bitstream length information and the total number of prediction blocks; Based on the bitstream length information, the bitstream field is parsed to obtain bitstream data; and Based on the total number of predicted blocks, the motion information of the predicted blocks is obtained by parsing the bitstream data through a lookup table. The process of obtaining motion information of the prediction blocks of the video frame by parsing the bitstream data through a lookup table based on the total number of prediction blocks includes: obtaining the valid flags of the prediction blocks in the bitstream data; Based on the valid flag, the bitstream data is parsed by looking up a table to obtain the motion information of the predicted blocks and the total number of predicted blocks parsed; and when the total number of predicted blocks parsed is the same as the total number of predicted blocks, the bitstream sequence is decoded. The table lookup mentioned above refers to querying the colmv lossless compression lookup table. The attributes of the predicted block include invalid, one-way valid, or two-way valid. When the predicted block attribute is invalid, it corresponds to the minimum (MIN) data size in the colmv lossless compression lookup table. When the predicted block attribute is one-way valid, it corresponds to the medium (MED) data size in the colmv lossless compression lookup table. When the predicted block attribute is two-way valid, it corresponds to the maximum (MAX) data size in the colmv lossless compression lookup table.

7. The decompression method according to claim 6, characterized in that, Based on the valid flag, the bitstream data is parsed by looking up a table to obtain the motion information of the predicted blocks and the total number of parsed predicted blocks, including: Based on the valid flag, the compressed data associated with the valid flag and the total number of parsed prediction blocks are obtained through table lookup mapping; Based on the compressed data, the motion information of the predicted block is obtained.

8. A lossless compression method based on inter-frame prediction, characterized in that, include: The motion information of the prediction block is received from the inter-frame prediction module, and the motion information is used as the auxiliary frame data for the subsequent frames of the current image encoding and decoding. The motion information is compressed and encoded according to any one of claims 1 to 5 to obtain the bitstream sequence, and the bitstream sequence is stored in memory; as well as When the inter-frame prediction module initiates frame processing of image slices and / or image tiles, it prefetches the bitstream sequence from the memory, performs decompression on the bitstream sequence according to any one of claims 6 to 7 to obtain the motion information, and transmits the motion information to the inter-frame prediction module when the inter-frame prediction module needs the motion information.

9. A compression encoding device, characterized in that, include: The motion information acquisition module is configured to acquire motion information of the predicted blocks of video frames; The compressed data acquisition module is configured to compress the motion information by looking up a table based on the size and attributes of the prediction block to obtain compressed data; The compressed data splicing module is configured to splice the compressed data associated with the same row of coding tree units in the video frame, so that a set of bit stream data is output after satisfying a preset bit length, and the output bit stream data constitutes a set of compressed sequences associated with the same row of coding tree units. as well as The bitstream sequence acquisition module is configured to acquire the bitstream sequence associated with the same row of coding tree units by using the bitstream length information and the total number of prediction blocks contained in the compressed sequence set as bitstream header information, and using the compressed sequence set as the bitstream field. The compressed data acquisition module is configured to perform size compression on the motion information based on the size of the prediction block to obtain size-compressed data, and to perform attribute compression on the size-compressed data based on the attributes of the prediction block through a lookup table mapping to obtain the compressed data. The table lookup mentioned above refers to querying the colmv lossless compression lookup table. The attributes of the predicted block include invalid, one-way valid, or two-way valid. When the predicted block attribute is invalid, it corresponds to the minimum (MIN) data size in the colmv lossless compression lookup table. When the predicted block attribute is one-way valid, it corresponds to the medium (MED) data size in the colmv lossless compression lookup table. When the predicted block attribute is two-way valid, it corresponds to the maximum (MAX) data size in the colmv lossless compression lookup table.

10. A decompression device, characterized in that, include: The bitstream sequence acquisition module is configured to acquire the bitstream sequence after the motion information of video frames is compressed. The bitstream sequence parsing module is configured to parse the bitstream sequence and obtain bitstream header information and bitstream fields; The bitstream header information parsing module is configured to parse the bitstream header information to obtain bitstream length information and the total number of prediction blocks; The bitstream field parsing module is configured to parse the bitstream field based on the bitstream length information to obtain bitstream data; as well as The bitstream data parsing module is configured to parse the bitstream data by looking up a table based on the total number of prediction blocks to obtain the motion information of the prediction blocks. The bitstream data parsing module is configured to obtain valid flags for predicted blocks in the bitstream data, and based on these flags, parse the bitstream data by looking up a table to obtain motion information of the predicted blocks and the total number of predicted blocks parsed. When the total number of predicted blocks parsed is equal to the total number of predicted blocks, the bitstream sequence is considered decoded. The table lookup mentioned above refers to querying the colmv lossless compression lookup table. The attributes of the predicted block include invalid, one-way valid, or two-way valid. When the predicted block attribute is invalid, it corresponds to the minimum (MIN) data size in the colmv lossless compression lookup table. When the predicted block attribute is one-way valid, it corresponds to the medium (MED) data size in the colmv lossless compression lookup table. When the predicted block attribute is two-way valid, it corresponds to the maximum (MAX) data size in the colmv lossless compression lookup table.

11. A lossless compression device based on inter-frame prediction, characterized in that, include: The motion information acquisition module is configured to receive motion information of the prediction block from the inter-frame prediction module and use the motion information as auxiliary frame data for subsequent frames of the current image encoding / decoding. The compression encoding module is configured to compress and encode the motion information using the compression encoding method described in any one of claims 1 to 5 and store the resulting bitstream sequence in memory; as well as The decompression module is configured to prefetch the bitstream sequence from the memory when the inter-frame prediction module starts frame processing of image slices and / or image tiles, decode the bitstream sequence to obtain the motion information according to the decompression method according to any one of claims 6 to 7, and transmit the motion information to the inter-frame prediction module when the inter-frame prediction module needs the motion information.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the compression encoding method according to any one of claims 1 to 5, the decompression method according to any one of claims 6 to 7, and / or the lossless compression method according to claim 8.

13. An electronic device, characterized in that, include: The memory is configured to store executable programs; The processor is configured to invoke the program to cause the electronic device to perform the compression encoding method according to any one of claims 1 to 5, the decompression method according to any one of claims 6 to 7, and / or the lossless compression method according to claim 8.

Citation Information

Patent Citations

  • Method and apparatus of motion data buffer reduction for three-dimensional video coding

    CN104704836A

  • Method and apparatus for processing multiview video signal

    CN104854867A