Video lossless compression coding and decoding method based on H.265

By improving H.265 lossless compression technology and adopting a multi-level prediction mechanism and adaptive quantization strategy, the problems of low compression ratio and slow encoding and decoding speed of H.265 lossless compression technology in medical videos have been solved. This has achieved efficient video compression and fast encoding and decoding, adapting to multiple formats and meeting the real-time requirements of telemedicine.

CN121125984APending Publication Date: 2025-12-12HUNAN BEICHUANG INTELLIGENT TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511453347.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

The existing H.265 lossless compression technology has a low compression ratio, slow encoding and decoding speed, and poor adaptability to multiple formats in medical video processing, which cannot meet the real-time and high-quality requirements of telemedicine services.

Method used

A multi-level prediction mechanism, adaptive quantization strategy, and entropy coding optimization technology are employed to perform format parameter parsing, color space standardization conversion, adaptive block segmentation and fusion prediction, frequency domain transformation, and lossless quantization processing on raw medical video data. Lossless compression and decoding are then performed in conjunction with a context model and arithmetic coding technology.

Benefits of technology

It achieves a high compression ratio of 5-8 times and an encoding/decoding time within 1.5 times the original video length, meeting the needs of real-time medical applications and improving the response speed and user experience of telemedicine services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125984A_ABST
    Figure CN121125984A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of video coding, and discloses a video lossless compression coding and decoding method based on H.265, and the method comprises the steps: carrying out the format parameter analysis and color space standardization conversion of original medical video data; carrying out adaptive block segmentation and fusion prediction on the standardized preprocessed video data; converting the residual data from a spatial domain to a frequency domain to obtain a frequency domain transformation coefficient; differential quantization parameters are set by adopting a self-adaptive quantization step size selection technology, and lossless quantization processing is carried out; carrying out lossless compression processing by adopting a context model and an arithmetic coding technology; carrying out lossless decoding on the compressed code stream data by adopting an entropy decoding technology, and recovering to obtain reconstructed medical video data; the technical problems that a traditional method is insufficient in compression ratio, low in processing speed and poor in multi-format adaptability are solved.
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 more specifically, to a lossless video compression and decoding method based on H.265. Background Technology

[0002] With the rapid development of medical imaging technology and the widespread adoption of telemedicine services, 4K / 8K ultra-high resolution medical videos are widely used in clinical diagnosis, surgical guidance, and pathological analysis. These medical video files are enormous, with individual files ranging from 10 to 50 GB, making transmission difficult in bandwidth-constrained network environments and severely impacting the real-time performance and effectiveness of telemedicine services. Furthermore, medical diagnosis demands extremely high image quality; the loss of any pixel information can affect diagnostic accuracy, and traditional lossy compression techniques cannot meet the quality requirements of medical applications.

[0003] As a next-generation video coding standard, H.265 boasts more advanced coding tools and algorithm architecture compared to H.264, exhibiting superior performance in lossy compression. However, existing H.265 lossless compression technologies still have significant shortcomings in medical video processing: low compression ratios, with most solutions achieving only 2-3 times compression, far below the 5-8 times compression ratio required for medical applications; slow encoding and decoding speeds, as traditional methods employ complex algorithms to achieve high compression ratios, resulting in encoding times exceeding five times the original video length, failing to meet real-time processing demands; and poor adaptability to multiple formats, as medical devices output diverse video formats, and existing methods lack a unified processing framework.

[0004] Therefore, it is necessary to develop a lossless H.265 compression and decoding method specifically designed for the characteristics of medical videos, achieving high compression ratios and fast encoding and decoding while ensuring complete losslessness, in order to meet the technical requirements of remote medical imaging diagnostic systems. Solving this technical problem is of great significance for promoting the development of telemedicine services and improving the efficiency of medical resource allocation. Summary of the Invention

[0005] This invention provides a lossless video compression and encoding / decoding method based on H.265, which solves the technical problems of low compression ratio, slow encoding / decoding speed, and poor adaptability to multiple formats in related technologies.

[0006] This invention provides a lossless video compression and decoding method based on H.265, comprising the following steps: The original medical video data is parsed for format parameters and converted to color space standardization to obtain standardized preprocessed video data. Adaptive block segmentation and fusion prediction are performed on standardized preprocessed video data to obtain fusion prediction residuals; Based on the fusion prediction residual, the residual data is transformed from the spatial domain to the frequency domain to obtain the frequency domain transformation coefficients; Based on the frequency domain transform coefficients, an adaptive quantization step size selection technique is used to set differentiated quantization parameters, and lossless quantization processing is performed to obtain lossless quantization coefficients. Based on the lossless quantization coefficients, lossless compression processing is performed using context model and arithmetic coding techniques to obtain compressed bitstream data; Lossless decoding of the compressed bitstream data is performed using entropy decoding technology to recover the reconstructed medical video data.

[0007] In a preferred embodiment, the format parameter parsing of the raw medical video data includes: The video header metadata information is read using format parameter parsing technology; The resolution, frame rate, color space, and bit depth parameters are extracted by parsing the parameter fields in the video container format. Obtain video format description data containing complete format information.

[0008] In a preferred embodiment, obtaining the standardized preprocessed video data includes: Color space standardization conversion technology is used to uniformly convert different color formats into a standard format; The luminance and chrominance component data are obtained through color component separation processing; Resolution adaptive processing technology is used to scale the data according to transmission requirements.

[0009] In a preferred embodiment, the adaptive block segmentation and fusion prediction of the standardized preprocessed video data includes: Edge detection technology is used to perform gradient calculations on the grayscale values ​​of adjacent pixels; Calculate the texture complexity index based on the gradient calculation results; Video frames are divided into coded blocks of different sizes based on texture complexity metrics.

[0010] In a preferred embodiment, obtaining the fused prediction residual includes: Spatial correlation analysis of coding blocks is performed using multi-directional prediction techniques; The spatial prediction residual is obtained by calculating the predicted values ​​in each direction using multiple prediction models and selecting the optimal prediction direction. Motion estimation techniques are used to search for the best matching position of the current block in the reference frame to obtain the temporal domain prediction value.

[0011] In a preferred embodiment, obtaining the fused prediction residual further includes: A weighted fusion processing technique is used to linearly combine the spatial prediction residuals and the time-domain prediction values; The weight ratio is adaptively adjusted based on the motion intensity and texture features of the current block. The fusion prediction residuals are obtained.

[0012] In a preferred embodiment, obtaining the frequency domain transform coefficients includes: Integer discrete cosine transform technique is used to perform frequency domain transformation on the fusion prediction residual; Matrix operations are performed on the residual blocks using a preset size transformation kernel matrix; Convert the time-domain pixel residual information into frequency-domain coefficient representation.

[0013] In a preferred embodiment, obtaining the lossless quantization coefficient includes: An adaptive quantization step size selection technique is used to set differentiated quantization parameters based on the importance of different frequency components; Fine quantification is used for important coefficients, and coarse quantification is used for minor coefficients; Reversibility verification technology is used to ensure that the quantization process is completely reversible.

[0014] In a preferred embodiment, obtaining the compressed bitstream data includes: Contextual modeling techniques are used to analyze the correlation patterns of adjacent coefficients; Establish a context prediction model to predict the probability of occurrence based on the neighborhood information of the current coefficients; Arithmetic coding techniques are used to perform lossless compression of the quantization coefficients.

[0015] A computer-readable storage medium for storing computer-readable instructions that, when read by a computer, enable the execution of an H.265-based lossless video compression and decoding method.

[0016] The beneficial effects of this invention are as follows: By innovatively integrating a multi-level prediction mechanism, adaptive quantization strategy, and entropy coding optimization technology, a compression ratio of 5-8 times is achieved while ensuring completely lossless video quality. This represents a qualitative leap compared to the 2-3 times compression ratio of traditional H.265 lossless coding methods. This improvement in compression performance is mainly attributed to the hierarchical space-time prediction framework and context-adaptive entropy coding optimization algorithm constructed in this invention. These algorithms can more fully extract redundant information from medical video data, with particularly significant compression effects when processing high-resolution medical videos. This effectively solves the storage and transmission difficulties caused by the large file size of medical videos.

[0017] By introducing optimization techniques such as fast prediction, lightweight transformation, and parallel processing, the time performance of encoding and decoding processes has been improved. Encoding time is controlled within 1.5 times the original video length, and decoding time is controlled within 1.2 times, representing a significant improvement compared to the 3-5 times time consumption of traditional methods. This increased processing efficiency enables the method of this invention to meet the real-time requirements of applications such as emergency medicine and surgical consultations, providing doctors with timely, accurate, and high-quality medical image support, and improving the response speed and user experience of telemedicine services. Attached Figure Description

[0018] Figure 1 This is a flowchart of a lossless video compression and decoding method based on H.265 according to the present invention; Figure 2 This is a comparison chart of the compression ratio performance of the present invention; Figure 3 This is a graph showing the encoding and decoding time performance of the present invention; Figure 4 This is a radar chart for multi-format compatibility testing of the present invention. Detailed Implementation

[0019] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0020] At least one embodiment of the present invention discloses a lossless video compression and decoding method based on H.265, such as... Figure 1 As shown, it includes: Step 1: Obtain raw medical video data, extract parameter information using format parameter parsing technology, and convert different color formats into a standard format using color space standardization conversion technology to obtain standardized preprocessed video data; Specifically, it includes the following: Based on raw medical video data, format parameter parsing technology is used to read the metadata information in the video file header. By parsing the parameter fields in the video encapsulation format, key parameter information such as video resolution, frame rate, color space, and bit depth is extracted. Among them, the resolution parameter includes the number of pixels in width and height, the frame rate parameter represents the number of frames played per second, the color space parameter defines the color representation method, and the bit depth parameter determines the quantization precision of each color component. In the parameter extraction process, parameters of different formats need to be standardized, so that the resolution is uniformly expressed as the number of pixels, the frame rate is uniformly expressed as the number of frames per second, and the bit depth is uniformly expressed as the number of bits, thus obtaining video format description data containing complete format information.

[0021] Based on video format description data, color space standardization conversion technology is used to uniformly convert different color formats such as RGB, YUV420, and YUV444 into the YUV420 standard format. Before color space conversion, RGB values ​​need to be normalized, and RGB values ​​in the range of 0 to 255 are normalized to the range of 0 to 1. Then, color space transformation is performed through a standard conversion matrix. The converted YUV values ​​need to be requantized to the corresponding numerical range. The Y luminance component, U chrominance component, and V chrominance component data are obtained through color component separation processing.

[0022] Based on the separated color component data, resolution adaptive processing technology is used to reasonably scale the ultra-high resolution video according to the network transmission bandwidth and processing capability requirements. Before scaling, pixel values ​​need to be preprocessed to ensure that pixel values ​​under different resolutions are comparable. During the scaling process, bilinear interpolation algorithm is used to ensure image quality and ensure the computational efficiency of subsequent processing, resulting in standardized preprocessed video data.

[0023] Furthermore, multi-threaded parallel processing technology can be employed to accelerate and optimize the color space conversion process. Based on the color component data, a thread pool allocation mechanism is used to distribute the conversion processing of the Y, U, and V components to different processing threads. Parallel computing technology is used to simultaneously perform format conversion of luminance and chrominance information, and memory access optimization strategies are used to reduce data read and write overhead, resulting in standardized video data after accelerated conversion. This parallel processing method can significantly improve the processing speed of format conversion, and is particularly suitable for real-time processing scenarios of ultra-high resolution medical videos.

[0024] Step 2: Adaptive block segmentation technology is used to divide the standardized preprocessed video data into coding blocks of different sizes. Multi-directional prediction technology is used to analyze the spatial correlation of coding blocks. Motion estimation technology is used to search for the best matching position. The spatial prediction residual and the temporal prediction are weighted and fused to obtain the fused prediction residual. Specifically, it includes the following: Based on standardized preprocessed video data, an adaptive block segmentation technique is used to divide video frames into coding blocks of different sizes, such as 16×16, 32×32, and 64×64, according to the texture complexity of the image content. Edge detection technology is used to identify contours and boundary information in the image, and texture analysis technology is used to calculate the texture complexity index of local regions. In the edge detection, the gradient operator is used to perform differential operations on the gray values ​​of adjacent pixels to calculate the pixel gray-level change rate.

[0025] The specific implementation steps of the gradient operator are as follows: Calculate the horizontal gradient by subtracting the gray value of the left neighboring pixel from the gray value of the right neighboring pixel of the current pixel; calculate the vertical gradient by subtracting the gray value of the top neighboring pixel from the gray value of the bottom neighboring pixel of the current pixel; calculate the gradient intensity by squaring the horizontal and vertical gradients respectively, adding them together, and then taking the square root to obtain the gradient intensity of the pixel; perform intensity normalization by mapping the gradient intensity value to a standard range of 0 to 1 as the edge detection result.

[0026] Texture analysis quantifies texture features by calculating the statistical variance and local contrast of the gray values ​​of neighboring pixels. The statistical variance measures the dispersion of gray distribution by calculating the average of the squared differences between the gray values ​​of neighboring pixels and the mean. Before calculating the statistical variance, the pixel gray values ​​need to be normalized to the range of 0-1 to eliminate the influence of different bit depths. The local contrast reflects the roughness of the texture by calculating the difference between the maximum and minimum gray values ​​in the neighborhood. The contrast value also needs to be normalized to ensure the comparability of different regions, resulting in a coded block segmentation result that includes edge strength and texture complexity information.

[0027] Based on the coded block segmentation results, multi-directional prediction technology is used to analyze the spatial correlation between each coded block and its adjacent coded blocks. Predicted values ​​in each direction are calculated using prediction modes in multiple directions such as horizontal, vertical, and diagonal. The optimal prediction direction is selected using the principle of minimizing prediction error, and spatial prediction residual data is obtained. Based on the spatial prediction residual data and the reconstructed image of the previous frame, motion estimation technology is used to search for the best matching position of the current block in the reference frame. Temporal prediction values ​​are obtained by calculating motion vectors with sub-pixel precision.

[0028] The spatial prediction residual and temporal prediction are weighted and fused. The weighted fusion adopts a linear combination method. By setting spatial prediction weights and temporal prediction weights, the sum of the fusion weights is equal to 1. The specific implementation steps of weighted fusion are as follows: Calculate the motion intensity index by dividing the length of the current block's motion vector by a preset maximum motion vector threshold to obtain the normalized value of motion intensity; calculate the texture complexity index by dividing the pixel variance of the current block by a preset maximum variance threshold to obtain the normalized value of texture complexity; determine the prediction weights by multiplying the balance factor and the motion intensity index, plus the product of the balance factor complement and the texture complexity index to obtain the temporal prediction weight, and the spatial prediction weight is equal to 1 minus the temporal prediction weight; perform the fusion calculation by adding the product of the temporal prediction weight and the temporal residual to the product of the spatial prediction weight and the spatial residual to obtain the final fused prediction residual. The weight ratio is adaptively adjusted according to the motion intensity and texture features of the current block, increasing the temporal prediction weight in areas with intense motion and increasing the spatial prediction weight in static areas to obtain the fused prediction residual.

[0029] Furthermore, a fast motion estimation technique can be employed to optimize the motion vector search process. Based on the coded block segmentation results, a hierarchical search strategy is used to first perform global motion estimation at the coarse-precision level, and then perform local optimization search at the fine-precision level. Motion vector prediction technology is used to predict the motion direction of the current block using motion information from neighboring blocks. An early termination criterion is used to stop unnecessary calculations during the search process, resulting in a fast motion estimation result. This fast estimation technique can significantly reduce computational complexity while maintaining prediction accuracy, thus improving the real-time performance of the coding process.

[0030] Step 3: Use integer discrete cosine transform (DIC) to transform the residual data from the spatial domain to the frequency domain to obtain the frequency domain transform coefficients. Specifically, it includes the following: Based on the fusion prediction residual, a fixed-size transformation selection technique is used to uniformly set the residual blocks to an 8×8 size for processing, avoiding the computational overhead of transformation size selection. The residual data is processed by frequency domain transformation through integer discrete cosine transform technique, and matrix multiplication is performed on the residual blocks using an 8×8 transform kernel matrix to convert the pixel residual information in the time domain into coefficient representation in the frequency domain. The low-frequency coefficients correspond to the main energy information of the image, and the high-frequency coefficients correspond to the detail information of the image, resulting in frequency domain transform coefficients containing different frequency components.

[0031] Based on the frequency domain transform coefficients, a coefficient importance assessment technique is used to evaluate the importance of the coefficients to image reconstruction according to their amplitude and position information. The coefficients are rearranged by zigzag scanning order, with important coefficients placed first and minor coefficients placed last, resulting in a reordered transform coefficient sequence.

[0032] Based on the reordered transform coefficient sequence, the coefficient grouping processing technique is used to preprocess the continuous zero coefficients using run-length encoding, and the distribution characteristics of the non-zero coefficients are statistically analyzed to provide optimization parameters for subsequent quantization processing, thus obtaining the preprocessed transform coefficient data.

[0033] Furthermore, a lookup table transformation technique can be used to accelerate and optimize the calculation of discrete cosine transform. Based on the fusion prediction residual, a pre-calculated transformation matrix technique is used to pre-calculate and store commonly used 8×8 transformation kernel functions in a lookup table. A matrix multiplication optimization strategy is employed to replace real-time calculation with a lookup table approach, and fixed-point arithmetic is used to replace floating-point arithmetic with integer operations to improve computational efficiency, resulting in rapidly transformed coefficient data. This lookup table transformation technique can significantly reduce the time overhead of transformation calculations, making it particularly suitable for mobile medical devices with limited processing power.

[0034] Step 4: Use adaptive quantization step size selection technology to set differentiated quantization parameters for lossless quantization of the frequency domain transform coefficients to obtain lossless quantization coefficients. Specifically, it includes the following: Based on the preprocessed transform coefficient data, coefficient amplitude analysis technology is used to statistically analyze the numerical distribution characteristics and dynamic range of the transform coefficients. Before statistical analysis, the transform coefficients need to be standardized and preprocessed to normalize the coefficient values ​​of different frequency components to the same numerical range for unified analysis. Histogram statistical technology is used to calculate the frequency of occurrence of transform coefficients in different numerical intervals, establish the correspondence between coefficient amplitude and occurrence probability, and obtain probability distribution information reflecting the statistical characteristics of the coefficients.

[0035] According to the technical requirements of lossless compression, the quantization process must ensure the complete reversibility of the data, that is, the quantized coefficients can be completely restored to the original transform coefficients through the inverse quantization operation.

[0036] Based on coefficient distribution information, an adaptive quantization step size selection technique is used to set differentiated quantization parameters according to the importance of different frequency components. Before setting the quantization parameters, the importance of the frequency components needs to be normalized and evaluated, and the importance index is uniformly mapped to the range of 0-1. Fine quantization is used for low-frequency important coefficients and coarse quantization is used for high-frequency minor coefficients. The quantized coefficient data is obtained by replacing complex division operations with simple bit operations through shift operation techniques.

[0037] Based on the quantized coefficient data, reversibility verification technology is used to ensure the complete reversibility of the quantization process. The original coefficients can be fully recovered through inverse quantization testing, thus obtaining qualified lossless quantized coefficients.

[0038] Furthermore, the selection process for quantization parameters can be optimized using a pre-set parameter table technique. Based on coefficient distribution information, offline statistical analysis is employed to pre-calculate the coefficient distribution characteristics of a large number of medical videos, establishing a quantization parameter optimization table tailored to the characteristics of medical videos. The optimal quantization parameters are then quickly determined based on the current coefficient characteristics using parameter table lookup technology, avoiding the time overhead of real-time computation and obtaining rapidly determined quantization parameters. This pre-set parameter table technique can significantly improve the speed of quantization processing while ensuring quantization effectiveness, making it particularly suitable for telemedicine applications with high real-time requirements.

[0039] Step 5: Use context modeling technology to analyze the correlation patterns of adjacent coefficients for lossless quantization coefficients, and use arithmetic coding technology to perform lossless compression processing on the quantization coefficients to obtain compressed bitstream data. Specifically, it includes the following: Based on verified lossless quantization coefficients, a context model is used to analyze the correlation patterns between adjacent coefficients. Before establishing the context model, the quantization coefficients need to be preprocessed to standardize the coefficient values ​​to a uniform numerical range for correlation analysis. A context prediction model is established by statistically analyzing the joint probability distribution of adjacent coefficients. During the probability distribution statistics process, different types of coefficients need to be classified and coded, with zero coefficients, positive coefficients, and negative coefficients encoded into different symbol types. The probability of occurrence of the current coefficient is predicted based on its neighborhood information to obtain context probability prediction data.

[0040] Based on contextual probability prediction data, an adaptive probability update technique is used to adjust the probability distribution of symbols in real time. During the probability update process, the probability values ​​need to be normalized to ensure that the sum of the probabilities of all symbols equals 1. The accuracy of the probability model is continuously optimized through probability statistical accumulation.

[0041] Arithmetic coding techniques are used to perform lossless compression of quantization coefficients. The symbol sequence is mapped to a binary fractional representation by probability interval partitioning. A precision control strategy is adopted to ensure the accuracy of the encoding. The quantization coefficients are converted into a compact binary code stream representation, resulting in a preliminary encoded code stream with high compression efficiency.

[0042] Based on the initial encoded bitstream, run-length encoding optimization technology is used to compress consecutively occurring identical symbols. The encoding efficiency is adjusted by optimizing the codeword length, allocating short codewords to high-frequency symbols and long codewords to low-frequency symbols, resulting in optimized compressed bitstream data.

[0043] Furthermore, parallel coding technology can be used to accelerate and optimize the entropy coding process. Based on lossless quantization coefficients, data partitioning technology is used to divide the quantization coefficient sequence into multiple independent coding segments. Multi-threaded parallel processing technology is then used to simultaneously perform entropy coding operations on different coding segments. Finally, coding result merging technology is used to merge the coding results of each segment sequentially, resulting in the parallel-coded bitstream data. This parallel coding technology can fully utilize the computing power of multi-core processors, significantly improving the processing speed of entropy coding, and is particularly suitable for large-scale medical video coding scenarios.

[0044] Step 6: Use entropy decoding technology to restore the quantization coefficients of the compressed bitstream data, use inverse quantization and inverse transform technology to recover the prediction residuals, and use prediction reconstruction technology to assemble image blocks to obtain reconstructed medical video data. Specifically, it includes the following: Based on the optimized compressed bitstream data, bitstream parsing technology is used to extract key parameter information such as prediction mode, quantization parameters, and motion vectors used in the encoding process. The correctness of the decoding parameters is ensured through parameter validity verification, and a set of decoding parameters is obtained.

[0045] Based on the set of decoding parameters and the compressed bitstream, entropy decoding technology is used to restore the binary bitstream to quantization coefficients. The original coefficient sequence is recovered through inverse run-length encoding. The original distribution of the recovered coefficients is then processed in reverse using a context model to obtain the reconstructed quantization coefficients.

[0046] Based on the reconstructed quantization coefficients, inverse quantization processing technology is used to restore the quantization coefficients to the transform coefficients. The frequency domain data is then converted back to the spatial domain through inverse discrete cosine transform to obtain the prediction residual data.

[0047] Predictive reconstruction is performed using the prediction pattern information recorded during the encoding process. The predicted values ​​are added to the residuals to obtain reconstructed image blocks. All image blocks are assembled according to the encoding order to obtain complete reconstructed medical video data.

[0048] Furthermore, pipelined decoding technology can be used to optimize the decoding and reconstruction process. Based on compressed bitstream data, multi-level caching technology is employed to divide the decoding process into multiple pipeline stages, including bitstream parsing, entropy decoding, inverse quantization, inverse transform, and predictive reconstruction. Inter-stage data flow control technology ensures coordinated operation of each stage, and parallel processing technology processes different data blocks simultaneously at different stages, resulting in pipelined optimized reconstructed data. This pipelined decoding technology can significantly improve the throughput and real-time performance of decoding processing, making it particularly suitable for medical video applications requiring continuous playback.

[0049] Application example of this implementation method: To verify the technical effectiveness of the method of this invention, a 30-day field test was conducted at the endoscopy center of a hospital. During the test, a video compression and encoding / decoding system based on the technology of this invention was deployed, covering three operating rooms and two diagnostic rooms. More than 500 hours of 4K / 8K medical video data were processed, including various medical image types such as laparoscopic surgery, gastroscopy, and colonoscopy.

[0050] The original medical video data collection records are shown in Table 1: Table 1: Original medical video data collection records; .

[0051] The data acquisition records after compression are shown in Table 2: Table 2: Data Acquisition Records After Compression; .

[0052] like Figure 2 The diagram illustrates a comparison of the compression ratio between the method of this invention and existing technologies. Traditional H.265 lossless compression methods typically achieve compression ratios between 2 and 3 times, while the method of this invention can stably achieve compression ratios of 5 to 8 times, significantly surpassing existing technologies. Particularly when processing medical videos with complex textures, the method of this invention, through optimized prediction and coding strategies, can more effectively eliminate data redundancy and achieve higher compression efficiency.

[0053] like Figure 3 As shown, the performance of the method of this invention in terms of encoding and decoding time is demonstrated. The encoding time is kept within 1.5 times the original video length, and the decoding time is controlled within 1.2 times, which is a significant improvement compared to the 3 to 5 times time consumption of traditional methods. This improvement in time performance is mainly due to the optimization techniques such as fast prediction, lightweight transformation, and parallel processing adopted in this invention, which enable the method to meet the strict time requirements of real-time medical applications.

[0054] like Figure 4 The diagram illustrates the compatibility of the method of this invention in processing medical videos of different formats. The chart shows that the method exhibits excellent performance across five dimensions: resolution adaptability, frame rate processing capability, color space compatibility, encoding efficiency, and decoding stability. It can effectively process medical videos in various formats, from 720P to 8K, from 24fps to 120fps, and from YUV420 to RGB, verifying the method's broad applicability. Through a unified format preprocessing technique, medical videos from different sources can achieve consistent high-quality compression results, providing technical support for the standardized application of medical equipment.

[0055] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A lossless compression coding method based on H.265, characterized in that, The method comprises the following steps: The original medical video data is subjected to format parameter analysis and color space standardization conversion to obtain standardized preprocessed video data; The standardized preprocessed video data is subjected to adaptive block segmentation and fusion prediction to obtain fusion prediction residual; Based on the fusion prediction residual, the residual data is converted from a spatial domain to a frequency domain to obtain frequency domain transform coefficients; Based on the frequency domain transform coefficients, an adaptive quantization step selection technique is used to set differential quantization parameters for lossless quantization processing to obtain lossless quantization coefficients; Based on the lossless quantization coefficients, a context model and an arithmetic coding technique are used for lossless compression processing to obtain compressed code stream data; The compressed code stream data is subjected to lossless decoding using an entropy decoding technique to recover reconstructed medical video data.

2. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The format parameter analysis of the original medical video data comprises: A format parameter analysis technique is used to read video header metadata information; Resolution, frame rate, color space and bit depth parameter information are extracted by analyzing parameter fields in a video encapsulation format; Video format description data containing complete format information is obtained.

3. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The standardized preprocessed video data comprises: A color space standardization conversion technique is used to uniformly convert different color formats into a standard format; Luminance component and chrominance component data are obtained through color component separation processing; Resolution adaptive processing techniques are used for scaling processing according to transmission requirements.

4. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The adaptive block segmentation and fusion prediction of the standardized preprocessed video data comprises: An edge detection technique is used to perform gradient operation on adjacent pixel grayscale values; Texture complexity indicators are calculated according to the gradient operation results; Based on the texture complexity indicators, the video frames are divided into coding blocks of different sizes.

5. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The fusion prediction residual comprises: A multi-direction prediction technique is used to analyze the spatial correlation of the coding blocks; Spatial prediction residual is obtained by calculating prediction values in each direction through multiple prediction modes and selecting the optimal prediction direction; A motion estimation technique is used to search for the best matching position of the current block in the reference frame to obtain a time domain prediction value.

6. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The fusion prediction residual further comprises: A weighted fusion processing technique is used to linearly combine the spatial prediction residual and the time domain prediction value; The weight proportion is adaptively adjusted according to the motion intensity and texture characteristics of the current block; The fusion prediction residual is obtained.

7. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The frequency domain transform coefficients comprise: An integer discrete cosine transform technique is used to perform frequency domain conversion processing on the fusion prediction residual; A preset size transform kernel matrix is used to perform matrix operation on the residual block; Time domain pixel residual information is converted into frequency domain coefficient representation.

8. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The lossless quantization coefficients comprise: An adaptive quantization step selection technique is used to set differential quantization parameters according to the importance of different frequency components; Important coefficients are subjected to fine quantization, and minor coefficients are subjected to coarse quantization; An invertibility verification technique is used to ensure that the quantization process is completely reversible.

9. The lossless compression coding method based on H.265 according to claim 1, characterized in that, The compressed code stream data comprises: A context model establishment technique is used to analyze the correlation mode of adjacent coefficients; A context prediction model is established to predict the occurrence probability according to the neighborhood information of the current coefficient; An arithmetic coding technique is used for lossless compression processing of the quantization coefficients.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium is used to store computer readable instructions, which can run the H.265-based video lossless compression and decoding method according to any one of claims 1-9 when read by a computer.

Citation Information

Patent Citations

  • Intra-frame lossless compression coding method based on HEVC (high efficiency video coding) frame

    CN103024383A

  • Self-adaptive image compression method and device, equipment and storage medium

    CN118573888A

  • Video lossless compression method and device in H.264 coding environment and medium

    CN118741158A

  • Video coding and decoding acceleration method and system based on learnable task perception mechanism

    CN119031147A

  • Audio and video media transmission method and system

    CN119767009A