Lossless video compression method and system based on double-layer framework

This lossless video compression method, which utilizes a two-layer framework structure and dynamically optimized quantization parameters, solves the problems of low efficiency and poor hardware compatibility in existing lossless compression technologies. It achieves high-efficiency lossless video compression and is applicable to fields such as medical imaging and satellite remote sensing.

CN121193935APending Publication Date: 2025-12-23BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511111388.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Existing video coding standards are inefficient and have poor hardware compatibility in lossless compression, and existing two-layer coding schemes are not adaptable to dynamic scenes.

Method used

A two-layer frame structure is adopted, combining a standard lossy encoder and a lossless encoder. Residual coding is performed through an overlapping frame structure, and dynamic parameters are used to optimize the quantization parameters to achieve optimal bit allocation.

Benefits of technology

It significantly improves the efficiency of lossless video compression, is compatible with existing hardware devices, and is suitable for application scenarios with high data integrity requirements, such as medical imaging and satellite remote sensing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121193935A_ABST
    Figure CN121193935A_ABST
Patent Text Reader

Abstract

The invention discloses a lossless video compression method and system based on a double-layer frame, and aims to solve the problems of low efficiency and poor adaptability of existing lossless video coding. The method comprises the following steps: in a first stage, compressing an original video by adopting a standard lossy encoder to generate a lossy reconstructed frame; in the second stage, the lossy reconstructed frame and the original video frame are arranged in an overlapping mode to form an extended sequence, a lossless encoder is used for residual encoding, the reconstructed frame serves as an I frame, the original frame serves as a P frame, and low-redundancy residual errors are generated through intra-frame / inter-frame prediction. The final code stream is composed of a lossy code stream and a residual lossless code stream, and the lossless code stream and the residual lossless code stream are combined during decoding to realize video lossless reconstruction. According to the method, an overlapping structure and dynamic quantization parameter optimization are innovatively introduced, the compression efficiency is remarkably improved, meanwhile, the method is compatible with standard encoder hardware, and the method is suitable for the fields of medical images, satellite videos and the like with high requirements for data integrity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video coding technology, and in particular to a lossless video compression method and system based on a two-layer frame, which is applicable to application scenarios with strict requirements for data integrity, such as medical imaging, satellite remote sensing, and digital archiving. Background Technology

[0002] Traditional video coding standards (such as HEVC and VVC) are primarily designed for lossy compression. When directly applied to lossless compression, they suffer from low efficiency and high residual redundancy. While existing two-layer coding schemes can improve compression ratios, they generally suffer from poor hardware compatibility and insufficient adaptability to dynamic scenes. Summary of the Invention

[0003] The technical objective of this invention is to propose a lossless video compression method based on a two-layer framework. The method includes: in a first stage, compressing the original video using a standard lossy encoder to generate lossy reconstructed frames; in a second stage, arranging the lossy reconstructed frames and the original video frames in an overlapping manner to form an extended sequence, and performing residual encoding using a lossless encoder, wherein the reconstructed frames are designated as I-frames and the original frames as P-frames, and low-redundancy residuals are generated through intra-frame / inter-frame prediction. The final bitstream consists of a lossy bitstream and a residual lossless bitstream, and during decoding, both are combined to achieve lossless video reconstruction.

[0004] This invention proposes an improved two-layer lossless video compression framework, the core of which includes:

[0005] Lossy-lossless layered coding: The first stage uses a standard lossy encoder to generate reconstructed frames, and the second stage uses an overlapping frame structure to efficiently and losslessly encode the quantization residuals;

[0006] Dynamic parameter optimization: Based on the characteristics of video content, the quantization parameters are adaptively adjusted to achieve the optimal balance of two-stage bit allocation;

[0007] Compatibility design: By integrating standard encoders through an external framework, different existing standards (such as HEVC, VVC) can be used for encoding, and hardware acceleration can be achieved without modifying the internal structure.

[0008] Main coding process:

[0009] S1 takes the original video frame x as input and uses an encoder to generate a lossy reconstructed frame using specific quantization parameters.

[0010] S2 will With x according to the first frame The second frame is arranged alternately in the format of x, forming an extended sequence;

[0011] S3 uses the corresponding encoder to perform lossless encoding of the IPIP encoding structure on the extended sequence and enables all prediction modes to generate residuals;

[0012] The S4 combination of lossy and lossless stage p-frame bitstream outputs the final bitstream.

[0013] Decoding main process:

[0014] S1 decoding of lossy bitstream

[0015] S2 will Lossless encoding is performed to obtain the I-frame bitstream, which is then recombined with the previous p-frame bitstream.

[0016] S3 decoding obtains the corresponding lossless frames, resulting in the final lossless reconstructed video;

[0017] Compared with existing technologies, this invention solves the problems of low efficiency and poor adaptability in current lossless video coding. This invention innovatively introduces an overlapping structure and dynamic quantization parameter optimization, significantly improving compression efficiency while remaining compatible with standard encoder hardware, making it suitable for fields with high data integrity requirements, such as medical imaging and satellite video. Attached Figure Description

[0018] Figure 1 This is a structural diagram of an embodiment of the present invention. Detailed Implementation

[0019] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] Example

[0021] A lossless video compression method based on a two-layer frame includes the following steps:

[0022] Phase 1: Compress the original video frame x using a standard lossy video encoder to generate a lossy reconstructed frame.

[0023] Second stage: Compare the original video frame x with the corresponding lossy reconstructed frame Arranged in an overlapping manner, they form an extended frame sequence, which is then encoded using a standard lossless encoder, wherein:

[0024] Lossy reconstructed frames As an I-frame;

[0025] The original video frame x is used as a P-frame, and prediction is performed based on the I-frame to generate a prediction residual q;

[0026] Bitstream generation: The lossy encoded bitstream from the first stage and the lossless P-frame bitstream from the second stage are combined to form the final lossless compressed bitstream.

[0027] Decoding: By decoding the lossy bitstream and the lossless bitstream, lossy reconstructed frames are obtained respectively. The predicted residual q is then summed with the original video frame x to reconstruct it losslessly.

[0028] Furthermore, the second stage adopts an IPIP prediction structure, wherein:

[0029] I-frames are lossy reconstruction frames. P-frames are the original video frames x;

[0030] The formula for calculating the prediction residual q is:

[0031] Furthermore, the lossless encoder in the second stage enables intra-frame prediction and inter-frame prediction modes to reduce the redundancy of the prediction residual q.

[0032] Furthermore, the overlapping arrangement method is as follows: lossy reconstructed frames are arranged in a way that... Alternating with the original video frame x, they form an extended sequence with a length twice that of the original video frame number.

[0033] Furthermore, the lossy coding in the first stage adopts the full I-frame coding mode.

[0034] Furthermore, the method also includes: dynamically adjusting the quantization parameters (QP) of the first stage according to the characteristics of the video content to optimize the bit allocation of the two stages.

[0035] Furthermore, the step of dynamically adjusting QP includes: selecting the QP value that minimizes the total bit rate by theoretically analyzing the relationship between the statistical characteristics of quantization error and the coding efficiency of the second stage.

[0036] A lossless video encoder, comprising:

[0037] The lossy encoding module is used to perform the first-stage encoding described above;

[0038] The residual processing module is used to generate overlapping frame sequences and calculate the prediction residual q;

[0039] The lossless encoding module is used to perform the second-stage encoding described above;

[0040] The stream multiplexing module is used to combine lossy and lossless streams.

[0041] The present invention also includes a lossless video decoder, comprising:

[0042] The lossy decoding module is used to decode the lossy bitstream in the first stage to obtain lossy reconstructed frames.

[0043] The lossless decoding module is used to decode the residual bitstream of the second stage to obtain the prediction residual q;

[0044] The reconstruction module is used to add (x) to q to losslessly restore the original video frame x.

[0045] The present invention also includes a computer-readable storage medium, characterized in that it stores program instructions that, when executed by a processor, implement the method described above.

Claims

1. A lossless video compression method based on a two-layer frame, characterized in that, Includes the following steps: Phase 1: Compress the original video frame x using a standard lossy video encoder to generate a lossy reconstructed frame. Second stage: Compare the original video frame x with the corresponding lossy reconstructed frame The frames are arranged in an overlapping manner to form an extended frame sequence, which is then encoded using a standard lossless encoder, including lossy reconstructed frames. As an I-frame; The original video frame x is used as a P-frame, and prediction is performed based on the I-frame to generate a prediction residual q; Bitstream generation: The lossy encoded bitstream from the first stage and the lossless P-frame bitstream from the second stage are combined to form the final lossless compressed bitstream. Decoding: By decoding the lossy bitstream and the lossless bitstream, lossy reconstructed frames are obtained respectively. The predicted residual q is then summed with the original video frame x to reconstruct it losslessly.

2. The lossless video compression method based on a dual-layer frame according to claim 1, characterized in that, The second stage adopts the IPIP prediction structure, where: I-frames are lossy reconstruction frames. P-frames are the original video frames (x); the formula for calculating the prediction residual q is:

3. The lossless video compression method based on a dual-layer frame according to claim 1 or 2, characterized in that, The lossless encoder in the second stage enables intra-frame prediction and inter-frame prediction modes to reduce the redundancy of the prediction residual q.

4. The lossless video compression method based on a two-layer frame according to claim 1, characterized in that, The overlapping arrangement method is as follows: lossy reconstructed frames are... Alternating with the original video frame x, they form an extended sequence with a length twice that of the original video frame number.

5. The lossless video compression method based on a two-layer frame according to claim 1, characterized in that, The lossy coding in the first stage adopts the full I-frame coding mode.

6. The lossless video compression method based on a two-layer frame according to claim 1, characterized in that, The method further includes: dynamically adjusting the quantization parameter QP of the first stage according to the characteristics of the video content, so as to optimize the bit allocation of the two stages; 7. The lossless video compression method based on a dual-layer frame according to claim 6, characterized in that, The steps for dynamically adjusting QP include: selecting the QP value that minimizes the total bit rate by theoretically analyzing the relationship between the statistical characteristics of quantization error and the coding efficiency of the second stage.

8. A lossless video encoder, characterized in that, include: Lossy encoding module, used to perform the first-stage encoding as described in claim 1; The residual processing module is used to generate overlapping frame sequences and calculate the prediction residual q; The lossless encoding module is used to perform the second-stage encoding as described in claim 1; The stream multiplexing module is used to combine lossy and lossless streams.

9. A lossless video decoder, characterized in that, include: The lossy decoding module is used to decode the lossy bitstream in the first stage to obtain lossy reconstructed frames. The lossless decoding module is used to decode the residual bitstream of the second stage to obtain the prediction residual q; The rebuild module is used to... Adding it to q will losslessly restore the original video frame x.

10. A computer-readable storage medium, characterized in that, The device stores program instructions that, when executed by a processor, implement the method described in any one of claims 1-7.