BMC video compression method, device, system and baseboard management controller

By compressing even frames and odd frames of video data in the baseboard management controller and using comparative compression technology, the problems of ineffective compression and low JPEG compression efficiency in the existing technology are solved, and more efficient video compression and transmission are achieved. Improved performance and user experience.

CN118338002BActive Publication Date: 2024-09-24SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410750492.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-24
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Existing baseboard management controllers have a large amount of ineffective compression and slow JPEG compression efficiency during the video compression process, resulting in overall performance degradation and frame loss, affecting user experience.

Method used

Using a method based on preset compression standards, the even frames of the video data are compressed, and the odd frames are compressed by comparison. The position of the current BLOCK in the odd frames is used to determine the target BLOCK associated with it, and the target BLOCK is compared with the target BLOCK. The second compressed data is obtained and written into different video memory spaces to achieve alternate reading and transmission.

Benefits of technology

The video compression efficiency is improved, ineffective compression is reduced, frame loss is avoided, and the overall performance of the baseboard management controller is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118338002B
    Figure CN118338002B
Patent Text Reader

Abstract

The present invention relates to the field of server technology, and in particular to a BMC video compression method, device, system and baseboard management controller. The method comprises: based on a preset compression standard, compressing even frames of video data to obtain first compressed data; and obtaining second compressed data by comparing and compressing odd frames of video data, wherein odd frames and even frames are adjacent frames; the comparison and compression comprises: based on the position of the current BLOCK in the odd frame, determining a target BLOCK associated with the current BLOCK in the even frame, wherein the target BLOCK refers to a BLOCK that overlaps or is adjacent to the current BLOCK in the even frame; and obtaining the second compressed data by comparing the current BLOCK with each target BLOCK respectively. The method can effectively improve the efficiency of video compression, avoid invalid compression, and help improve the overall performance of the baseboard management controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a BMC video compression method, device, system and baseboard management controller. Background Art

[0002] The baseboard management controller (BMC) is a common hardware device in the server field. It is used to monitor the status of the server (such as temperature, fan, and main CPU operating status, etc.). It is also used to compress local video data and transmit the compressed video data to the remote end through the network for remote display and monitoring. At present, the way the baseboard management controller performs video compression is: RGB format conversion, color space conversion, BLOCK format conversion and JPEG compression are performed on the original video data in sequence to obtain compressed video data.

[0003] However, this method has the following disadvantages: 1. In the monitoring scenario of the server, there is a large amount of duplication of previous and next frame video data. If JPEG compression is performed on each frame of video data, there will be a large number of invalid compression scenarios, which will affect the overall performance of the baseboard management controller; 2. The compression efficiency of JPEG compressed data is slow. When the resolution of the video to be compressed is large, JPEG compression cannot process all of it, resulting in frame loss. The frame loss rate is high, which affects the display effect of the remote end and affects the user experience. Summary of the invention

[0004] The present invention provides a BMC video compression method, device, system and baseboard management controller, which are used to solve the problems that a large number of invalid compression scenarios exist in the way of video compression performed by the baseboard management controller in the prior art, which affects the overall performance of the baseboard management controller, and the compression efficiency of JPEG compressed data is slow and frame loss is prone to occur.

[0005] The present invention provides a BMC video compression method, comprising:

[0006] Based on a preset compression standard, compressing the even frames of the video data to obtain first compressed data; and obtaining second compressed data by comparing and compressing the odd frames of the video data, wherein the odd frames and the even frames are adjacent frames; the comparing and compressing comprises: determining a target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame, wherein the target BLOCK refers to a BLOCK in the even frame that overlaps with or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs respectively;

[0007] The first compressed data is written into a first display memory space of a preset memory; and the second compressed data is written into a second display memory space of the memory.

[0008] A BMC video compression method provided by the present invention also includes:

[0009] Acquire first YUV data and second YUV data, wherein the first YUV data is data obtained after the first RGB image data is converted through a color space, the second YUV data is data obtained after the second RGB image data is converted through a color space, the first RGB image data is data obtained after the first original image data is converted through an RGB format, the second RGB image data is data obtained after the second original image data is converted through an RGB format, and the first original image data and the second original image data are adjacent frames;

[0010] The first YUV data and the second YUV data are converted into BLOCK format in parallel to obtain the even frame and the odd frame, the first YUV data corresponds to the even frame, and the second YUV data corresponds to the odd frame; wherein, in the process of performing BLOCK format conversion on the first YUV data and the second YUV data in parallel, the BLOCK format conversion is completed by time-division multiplexing the space of the target storage unit.

[0011] According to a BMC video compression method provided by the present invention, the first original image data and the second original image data are both obtained by reading the stored original image data at alternate frames, wherein the step of obtaining the first original image data and the step of obtaining the second original image data are performed simultaneously, and the first original image data and the second original image data are two adjacent frames of image data in the original image data.

[0012] According to a BMC video compression method provided by the present invention, the first YUV data includes: first Y data, first U data and first V data; the second YUV data includes: second Y data, second U data and second V data;

[0013] The step of performing BLOCK format conversion on the first YUV data and the second YUV data in parallel to obtain the even frame and the odd frame comprises:

[0014] Performing block format conversion on the first Y data and the second Y data in parallel to obtain first block data and second block data, wherein the first Y data corresponds to the first block data, and the second Y data corresponds to the second block data;

[0015] Performing BLOCK format conversion on the first U data and the second U data in parallel to obtain third BLOCK data and fourth BLOCK data, wherein the first U data corresponds to the third BLOCK data, and the second U data corresponds to the fourth BLOCK data;

[0016] The first V data and the second V data are converted into BLOCK formats in parallel to obtain fifth BLOCK data and sixth BLOCK data, wherein the first V data corresponds to the fifth BLOCK data, and the second V data corresponds to the sixth BLOCK data; the first BLOCK data, the third BLOCK data and the fifth BLOCK data all belong to the even frame, and the second BLOCK data, the fourth BLOCK data and the sixth BLOCK data all belong to the odd frame.

[0017] According to a BMC video compression method provided by the present invention, the steps of performing BLOCK format conversion on the first Y data and the second Y data in parallel to obtain the first BLOCK data and the second BLOCK data include:

[0018] Based on a preset BLOCK size standard, write a first target number of Y data of the first Y data into a first target address of a target Y storage unit;

[0019] Reading the Y data in the first target address to obtain the 0th row of the first BLOCK data, and writing the first target number of Y data in the remaining Y data of the first Y data into the second target address of the target Y storage unit;

[0020] Reading the Y data in the second target address to obtain the first row of the first BLOCK data, and writing the first target number of Y data of the second Y data into the first target address of the target Y storage unit;

[0021] Read the Y data in the first target address to obtain the 0th row of the second BLOCK data, and write the first target number of Y data in the remaining Y data of the first Y data into the third target address of the target Y storage unit, wherein the first target address, the second target address and the third target address are arranged in sequence from front to back;

[0022] Reading the Y data in the third target address to obtain the second row of the first BLOCK data, and writing the first target number of Y data in the remaining Y data of the second Y data into the second target address;

[0023] When all addresses of the target Y storage unit are traversed, the complete first BLOCK data and the second BLOCK data are obtained.

[0024] According to a BMC video compression method provided by the present invention, the steps of performing BLOCK format conversion on the first U data and the second U data in parallel to obtain third BLOCK data and fourth BLOCK data include:

[0025] Based on a preset BLOCK size standard, writing the first target number of U data of the first U data into a fourth target address of the target U storage unit;

[0026] Reading the U data in the fourth target address to obtain the 0th row of the third BLOCK data, and writing the first target number of U data in the remaining U data of the first U data into the fifth target address of the target U storage unit;

[0027] Reading the U data in the fifth target address to obtain the first row of the third BLOCK data, and writing the first target number of U data of the second U data into the fourth target address of the target U storage unit;

[0028] Read the U data in the fourth target address to obtain the 0th row of the fourth BLOCK data, and write the first target number of U data in the remaining U data of the first U data into the sixth target address of the target U storage unit, wherein the fourth target address, the fifth target address and the sixth target address are arranged in sequence from front to back;

[0029] Reading the U data in the sixth target address to obtain the second row of the third BLOCK data, and writing the first target number of U data in the remaining U data of the second U data into the fifth target address;

[0030] In the case of traversing all addresses of the target U storage unit, the complete third BLOCK data and the fourth BLOCK data are obtained.

[0031] According to a BMC video compression method provided by the present invention, the steps of performing BLOCK format conversion on the first V data and the second V data in parallel to obtain fifth BLOCK data and sixth BLOCK data include:

[0032] Based on a preset BLOCK size standard, write the first target number of V data of the first V data into a seventh target address of the target V storage unit;

[0033] Read the V data in the seventh target address to obtain the 0th row of the fifth BLOCK data, and write the first target number of V data in the remaining V data of the first V data into the eighth target address of the target V storage unit;

[0034] Reading the V data in the eighth target address to obtain the first row of the fifth BLOCK data, and writing the first target number of V data of the second V data into the seventh target address of the target V storage unit;

[0035] The V data in the seventh target address is read to obtain the 0th row of the sixth BLOCK data, and at the same time, the first target number of V data in the remaining V data of the first V data is written into the ninth target address of the target V storage unit, and the seventh target address, the eighth target address and the ninth target address are arranged in sequence from front to back;

[0036] Read the V data in the ninth target address to obtain the second row of the fifth BLOCK data, and write the first target number of V data in the remaining V data of the second V data into the eighth target address;

[0037] When all addresses of the target V storage unit are traversed, the complete fifth BLOCK data and the sixth BLOCK data are obtained.

[0038] According to a BMC video compression method provided by the present invention, the steps of performing BLOCK format conversion on the first Y data and the second Y data in parallel, the steps of performing BLOCK format conversion on the first U data and the second U data in parallel, and the steps of performing BLOCK format conversion on the first V data and the second V data in parallel are performed synchronously.

[0039] According to a BMC video compression method provided by the present invention, the step of determining a target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame includes:

[0040] Based on the position of the current BLOCK in the odd frame, determine a first target BLOCK in the even frame that overlaps with the BLOCK;

[0041] Determine a BLOCK adjacent to the left side of the first target BLOCK in the even-numbered frame as a second target BLOCK;

[0042] Determine a BLOCK adjacent to the first target BLOCK in the even frame as a third target BLOCK;

[0043] Determine a BLOCK adjacent to the upper left corner of the first target BLOCK in the even-numbered frame as a fourth target BLOCK;

[0044] A BLOCK adjacent to the upper right corner of the first target BLOCK in the even frame is determined as the fifth target BLOCK.

[0045] According to a BMC video compression method provided by the present invention, the step of obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs respectively includes:

[0046] The current BLOCK is compared with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data.

[0047] According to a BMC video compression method provided by the present invention, the steps of comparing the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data include:

[0048] Compare each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK, respectively, to obtain a first difference between each pixel value of the current BLOCK and the corresponding pixel value of the first target BLOCK, a second difference between each pixel value of the current BLOCK and the corresponding pixel value of the second target BLOCK, a third difference between each pixel value of the current BLOCK and the corresponding pixel value of the third target BLOCK, a fourth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fourth target BLOCK, and a fifth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fifth target BLOCK;

[0049] Performing absolute value processing on all first differences, and averaging all first differences after absolute value processing to obtain a first average value;

[0050] Performing absolute value processing on all second differences, and averaging all second differences after the absolute value processing to obtain a second average value;

[0051] Performing absolute value processing on all third difference values, and performing average processing on all third difference values ​​after the absolute value processing to obtain a third average value;

[0052] performing absolute value processing on all fourth difference values, and performing average processing on all fourth difference values ​​after the absolute value processing to obtain a fourth average value;

[0053] Performing absolute value processing on all the fifth difference values, and performing average processing on all the fifth difference values ​​after the absolute value processing to obtain a fifth average value;

[0054] When at least one of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is less than a preset average value threshold, the minimum value of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is determined as the target average value; the target BLOCK corresponding to the target average value is determined as the final target BLOCK; the first target size, the horizontal coordinate of the final target BLOCK, the vertical coordinate of the final target BLOCK and the target average value are determined as the second compressed data, and the first target size is the size of the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK or the fifth target BLOCK.

[0055] According to a BMC video compression method provided by the present invention, the step of comparing the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data further includes:

[0056] While comparing each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK, the current BLOCK is divided into a fixed number of first sub-BLOCKs based on a preset second target size, and all the target BLOCKs are divided into a fixed number of second sub-BLOCKs based on the second target size;

[0057] Based on the current position of the first sub-BLOCK, determine a target sub-BLOCK associated with the current first sub-BLOCK from all the second sub-BLOCKs, where the target sub-BLOCK refers to a sub-BLOCK that overlaps with or is adjacent to the current first sub-BLOCK in all the second sub-BLOCKs;

[0058] Compare the first sub-BLOCK with all the associated target sub-BLOCKs respectively to obtain a comparison result;

[0059] When the first average value, the second average value, the third average value, the fourth average value, and the fifth average value are all greater than or equal to the average value threshold, the second compressed data is obtained based on the comparison result.

[0060] According to a BMC video compression method provided by the present invention, the step of comparing the first sub-BLOCK with all the associated target sub-BLOCKs respectively to obtain the comparison result comprises:

[0061] Compare the pixel values ​​of the first sub-BLOCK with the corresponding pixel values ​​of all the associated target sub-BLOCKs to obtain a target difference value, where the target difference value is the difference between the pixel value of the first sub-BLOCK and the pixel value of any of the target sub-BLOCKs;

[0062] Performing absolute value processing on all the target differences between the pixel value of the first sub-BLOCK and the pixel value of any of the target sub-BLOCKs, and performing average processing on all the target differences after the absolute value processing to obtain a target mean value;

[0063] All of the target mean values ​​are determined as the comparison results.

[0064] According to a BMC video compression method provided by the present invention, the step of obtaining the second compressed data based on the comparison result includes:

[0065] Determine the minimum value among all the target means as the final target mean;

[0066] Determine the target sub-BLOCK corresponding to the final target mean as the final target sub-BLOCK, and the first sub-BLOCK corresponds to the final target sub-BLOCK one by one;

[0067] Determine the second target size, the abscissa of the final target sub-BLOCK, the ordinate of the final target sub-BLOCK, and the final target mean as a second compressed subset, where the second compressed subset corresponds to the first sub-BLOCK one-to-one;

[0068] All of the second compressed subsets of the current BLOCK are determined as the second compressed data.

[0069] A BMC video compression method provided by the present invention also includes:

[0070] If within a preset time period, the sum of all the target average values ​​is less than a preset statistical threshold, or all the final target average values ​​are less than the statistical threshold, the average value threshold is increased according to a preset first adjustment ratio value;

[0071] If within the preset time period, the sum of all the target average values ​​is greater than the statistical threshold, or all the final target average values ​​are greater than the statistical threshold, the average value threshold is reduced according to a preset second adjustment ratio value to complete the dynamic adjustment of the average value threshold.

[0072] A BMC video compression method provided by the present invention also includes:

[0073] The compressed video data transmission is completed by alternately reading the data in the first video memory space and the second video memory space.

[0074] The present invention also provides a BMC video compression device, comprising:

[0075] A compression module is used to compress the even frames of the video data based on a preset compression standard to obtain first compressed data; and obtain second compressed data by comparing and compressing the odd frames of the video data, wherein the odd frames and the even frames are adjacent frames; the comparison and compression comprises: determining a target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame, wherein the target BLOCK refers to a BLOCK in the even frame that overlaps with or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs respectively;

[0076] The data writing module is used to write the first compressed data into a first display memory space of a preset memory; and write the second compressed data into a second display memory space of the memory.

[0077] The present invention also provides a BMC video compression system, comprising:

[0078] Memory, VGA module, capture module, color space conversion module and the BMC video compression device as described above;

[0079] The memory includes a raw data display memory space, a first display memory space and a second display memory space; the raw data display memory space is used to receive and store raw image data transmitted by the host;

[0080] The VGA module is used to read the first original image data from the original data display memory space, perform RGB format conversion on the first original image data to obtain first RGB image data, and transmit the first RGB image data to the color space conversion module;

[0081] The capture module is used to read the second original image data from the original data display memory space, perform RGB format conversion on the second original image data to obtain second RGB image data, and transmit the second RGB image data to the color space conversion module; the first original image data and the second original image data are adjacent frames;

[0082] The color space conversion module is used to synchronously perform color space conversion on the first RGB image data and the second RGB image data to obtain first YUV data and second YUV data, the first YUV data corresponds to the first RGB image data, and the second YUV data corresponds to the second RGB image data; the first YUV data and the second YUV data are input into the video compression device to perform video compression.

[0083] The present invention also provides a baseboard management controller, comprising: the BMC video compression device as described above, or the BMC video compression system as described above.

[0084] The present invention also provides a server, comprising: the baseboard management controller as described above.

[0085] The present invention also provides a method for reading video compression data, comprising:

[0086] Receiving compressed video data transmitted by the BMC video compression device as described above, wherein the compressed video data includes the first compressed data and the second compressed data read alternately;

[0087] Data recovery is performed based on the first compressed data and the second compressed data to obtain complete video data.

[0088] The present invention also provides a monitoring device, comprising:

[0089] A data receiving module, used for receiving compressed video data transmitted by the BMC video compression device as described above, wherein the compressed video data includes the first compressed data and the second compressed data read alternately;

[0090] A data analysis module is used to perform data recovery based on the first compressed data and the second compressed data to obtain complete video data.

[0091] A monitoring device provided according to the present invention further includes:

[0092] The display module is used to display the complete video data.

[0093] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned BMC video compression methods is implemented.

[0094] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the BMC video compression method described above is implemented.

[0095] Beneficial effects of the present invention: The BMC video compression method, device, system and baseboard management controller provided by the present invention compress the even frames of video data based on a preset compression standard to obtain first compressed data; and obtain second compressed data by comparing and compressing the odd frames of video data, where the odd frames and the even frames are adjacent frames; the comparison and compression includes: determining the target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame, the target BLOCK refers to the BLOCK that overlaps or is adjacent to the current BLOCK in the even frame; obtaining the second compressed data by comparing the current BLOCK with each target BLOCK respectively; writing the first compressed data into the first display memory space of the preset memory; and writing the second compressed data into the second display memory space of the memory. The BMC video compression method, device, system and baseboard management controller in the present invention can effectively improve the efficiency of video compression, avoid invalid compression, help improve the overall performance of the baseboard management controller, and avoid frame loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0097] Figure 1 It is the logic block diagram of the traditional BMC video compression method;

[0098] Figure 2 It is a flow chart of the BMC video compression method provided by the present invention;

[0099] Figure 3 The BMC video compression method provided by the present invention Five-grid comparison design diagram under comparison size;

[0100] Figure 4 The BMC video compression method provided by the present invention Comparison design frame under the comparison size Figure 1 ;

[0101] Figure 5 The BMC video compression method provided by the present invention Compare the design frame under the comparison size Figure 2 ;

[0102] Figure 6 The BMC video compression method provided by the present invention Compare the design frame under the comparison size Figure 3 ;

[0103] Figure 7 The BMC video compression method provided by the present invention Comparison design frame under the comparison size Figure 4 ;

[0104] Figure 8 It is a structural schematic diagram of the BMC video compression device provided by the present invention;

[0105] Fig. 9 It is a structural schematic diagram of the BMC video compression system provided by the present invention;

[0106] Fig.10 It is a logic block diagram of BLOCK format conversion and comparison compression in the BMC video compression system provided by the present invention;

[0107] Fig.11 It is a flow chart of the video compression data reading method provided by the present invention.

[0108] Fig.12 It is a structural schematic diagram of the monitoring device provided by the present invention;

[0109] Fig.13 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0110] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0111] Figure 1This is the logic block diagram of the traditional video compression method, such as Figure 1 As shown, the processing process of the traditional BMC video compression method of the baseboard management controller includes:

[0112] First, the original video data on the host side is written into the video memory space A of the DDR (Double Data Rate SDRAM) of the baseboard management controller (baseboard management control chip) through the PCIe interface of the baseboard management controller (baseboard management control chip).

[0113] Secondly, the traditional VGA (Video Graphics Array) module in the baseboard management controller reads the original video data in the video memory space A, and converts the read original video data into RGB format, thereby generating corresponding RGB image data.

[0114] Then, the VGA module inputs the RGB image data into the traditional color space conversion module for color space conversion, namely, YUV format conversion. The conversion process is completed by the following matrix conversion formula:

[0115]

[0116] Among them, Y refers to the luminance component (Luminance), U and V represent the chrominance components (Chrominance), which are used to describe color information. Specifically, U is one of the chrominance components, which represents the difference between the blue channel and the luminance, and V is the second chrominance component, which represents the difference between the red channel and the luminance. represents the pixel value of the red channel, G represents the pixel value of the green channel, and B represents the pixel value of the blue channel.

[0117] After that, the YUV data after color space conversion is input into the BLOCK conversion module for BLOCK format conversion. BLOCK data. Among them, BLOCK format conversion refers to caching the data input by line in YUV data into RAM (Random Access Memory). During the caching process, the RAM is read and written to generate The specific process is as follows:

[0118] Write the Y data of row 0 / 8 / 16 / 24… into Y_RAM_0;

[0119] Write the Y data of row 1 / 9 / 17 / 25… into Y_RAM_1;

[0120] Write the Y data of row 2 / 10 / 18 / 26… into Y_RAM_2;

[0121] …

[0122] Write the Y data of row 7 / 15 / 23 / 31… into Y_RAM_7;

[0123] Write the U data of row 0 / 8 / 16 / 24… into U_RAM_0;

[0124] Write the U data of row 1 / 9 / 17 / 25… into U_RAM_1;

[0125] Write the U data of row 2 / 10 / 18 / 26… into U_RAM_2;

[0126] …

[0127] Write the U data of row 7 / 15 / 23 / 31… into U_RAM_7;

[0128] Write the V data of row 0 / 8 / 16 / 24… into V_RAM_0;

[0129] Write the V data of row 1 / 9 / 17 / 25… into V_RAM_1;

[0130] Write the V data of row 2 / 10 / 18 / 26… into V_RAM_2;

[0131] …

[0132] Write the V data of rows 7 / 15 / 23 / 31… into V_RAM_7.

[0133] Among them, Y_RAM_0, Y_RAM_1, Y_RAM_2...Y_RAM_7 are 8 Y_RAM units used for BLOCK format conversion of Y data, U_RAM_0, U_RAM_1, U_RAM_2...U_RAM_7 are 8 U_RAM units used for BLOCK format conversion of U data, and V_RAM_0, V_RAM_1, V_RAM_2...V_RAM_7 are 8 V_RAM units used for BLOCK format conversion of V data.

[0134] Then read Y_RAM_0 8 times, Y_RAM_1 8 times, ..., Y_RAM_7 8 times, and generate 8 8. Read U_RAM_0 8 times, U_RAM_1 8 times, ..., U_RAM_7 8 times, generate 8 8 U_BLOCK data. Read V_RAM_0 8 times, V_RAM_1 8 times, ..., V_RAM_7 8 times, generate 8 8. By looping through the above read operations, the BLOCK format conversion is completed.

[0135] Then all the BLOCK data are input into the JPEG (Joint Photographic Experts Group) compression module for JPEG compression, and the compressed image data is written into the video memory space B of DDR.

[0136] Finally, the network module is used to transmit the compressed image data in the video memory space B to the remote end. However, this traditional method requires JPEG compression for each frame of the image, resulting in a large number of repeated video data of the previous and next frames, and there will also be a large number of invalid compression scenarios, which will affect the overall performance of the baseboard management controller. In addition, due to the low compression efficiency of JPEG compressed data, when the resolution of the video to be compressed is large, such as 1920 1200, due to the high speed of original video generation (1920 The pixel clock at 1200 resolution is nearly 200Mhz). Assuming a frame rate of 60 frames / s, the resulting data bandwidth is 1920 1200 3 60=395MB / s, and such a data rate cannot be fully processed by JPEG compression, resulting in a large number of frame losses and a high frame loss rate, which affects the display effect at the remote end and brings a poor experience to users. Therefore, the present invention proposes a video compression method, device, system and baseboard management controller to solve the above problems.

[0137] In the following, by way of example, Figures 2 to 13 The present invention describes a BMC video compression method, device, system and baseboard management controller.

[0138] Please refer to Figure 2 The BMC video compression method provided in this embodiment includes:

[0139] S210: Based on a preset compression standard, compress the even frames of the video data to obtain first compressed data; and obtain second compressed data by comparing and compressing the odd frames of the video data, wherein the odd frames and the even frames are adjacent frames; the comparison and compression includes: based on the position of the current BLOCK in the odd frame, determining the target BLOCK associated with the current BLOCK in the even frame, wherein the target BLOCK refers to the BLOCK in the even frame that overlaps with or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs respectively.

[0140] Specifically, the compression standard is the JPEG compression standard. By compressing the even frames of the video data based on the compression standard, and by compressing the odd frames of the video data, the amount of compressed video data can be reduced, and the parallel compression processing of two adjacent frames of image data can be better achieved without increasing the on-chip cache space. In addition, by the above-mentioned method of compressing the odd frames, the video compression efficiency is greatly improved, the invalid compression is avoided, which helps to improve the overall performance of the baseboard management controller, and at the same time avoids frame loss, and the cost is low.

[0141] It should be noted that even-numbered frames include frames 0, 2, and 4, and odd-numbered frames include frames 1, 3, and 5.

[0142] S220: writing the first compressed data into a first video memory space of a preset memory; writing the second compressed data into a second video memory space of the memory. It should be noted that by writing the first compressed data and the second compressed data into different video memory spaces, it is possible to facilitate the subsequent alternating reading of the first compressed data and the second compressed data during network transmission, thereby achieving transmission of compressed data, which helps to reduce the difficulty and complexity of alternating reading.

[0143] It should be mentioned that the BMC video compression method in this embodiment is a hardware-based improvement method. Through hardware improvement, video compression is achieved and compression efficiency is improved.

[0144] In some embodiments, the BMC video compression method further includes:

[0145] 1. Acquire first YUV data and second YUV data, wherein the first YUV data is data obtained after the first RGB image data is converted through color space, the second YUV data is data obtained after the second RGB image data is converted through color space, the first RGB image data is data obtained after the first original image data is converted through RGB format, the second RGB image data is data obtained after the second original image data is converted through RGB format, and the first original image data and the second original image data are adjacent frames.

[0146] It should be mentioned that, during the video compression process, the original image data needs to be converted to RGB format, color space, and BLOCK format in sequence, and then the video compression is performed on the basis of the image data in BLOCK format. Therefore, in the above steps, by obtaining the first YUV data and the second YUV data, it is possible to perform BLOCK format conversion on the YUV data and the second YUV data in parallel.

[0147] 2. Perform BLOCK format conversion on the first YUV data and the second YUV data in parallel to obtain the even frame and the odd frame, wherein the first YUV data corresponds to the even frame, and the second YUV data corresponds to the odd frame; wherein, in the process of performing BLOCK format conversion on the first YUV data and the second YUV data in parallel, the BLOCK format conversion is completed by time-division multiplexing the space of the target storage unit. It should be noted that by performing BLOCK format conversion on the first YUV data and the second YUV data in parallel, it is convenient to perform subsequent parallel processing on the generated even frames and odd frames, that is, the even frames are compressed normally (compressed according to the compression standard), and the odd frames are compressed comparatively at the same time. The target storage unit refers to RAM.

[0148] It should be noted that the first original image data and the second original image data are both obtained by reading the stored original image data at alternate frames, wherein the step of obtaining the first original image data and the step of obtaining the second original image data are performed simultaneously, and the first original image data and the second original image data are two adjacent frames of image data in the original image data. Specifically, the stored original image data refers to the data written into the original data display memory space of DDR by the host end through the PCIe interface. The first original image data and the second original image data are obtained by reading the original image data at alternate frames. The first original image data is located before the second original image data. If the first original image data is the 0th frame of the original image data, the second original image data is the 1st frame of the original image data. If the first original image data is the 2nd frame of the original image data, the second original image data is the 3rd frame of the original image data, and so on. In this embodiment, the first original image data and the second original image data are read in parallel, which is convenient for subsequent comparison and compression of odd frames, which helps to reduce the amount of data compressed by JPEG video and improve video compression efficiency.

[0149] In some embodiments, the first YUV data includes: first Y data, first U data and first V data; the second YUV data includes: second Y data, second U data and second V data.

[0150] In some embodiments, the step of performing BLOCK format conversion on the first YUV data and the second YUV data in parallel to obtain the even frame and the odd frame includes:

[0151] 1. Perform block format conversion on the first Y data and the second Y data in parallel to obtain first block data and second block data, wherein the first Y data corresponds to the first block data, and the second Y data corresponds to the second block data.

[0152] 2. Perform BLOCK format conversion on the first U data and the second U data in parallel to obtain third BLOCK data and fourth BLOCK data, wherein the first U data corresponds to the third BLOCK data, and the second U data corresponds to the fourth BLOCK data.

[0153] 3. Performing block format conversion on the first V data and the second V data in parallel to obtain fifth block data and sixth block data, wherein the first V data corresponds to the fifth block data, and the second V data corresponds to the sixth block data; the first block data, the third block data, and the fifth block data all belong to the even frame, and the second block data, the fourth block data, and the sixth block data all belong to the odd frame. It should be noted that the above block format conversion step facilitates subsequent compression.

[0154] Specifically, the step of performing BLOCK format conversion on the first Y data and the second Y data in parallel to obtain the first BLOCK data and the second BLOCK data includes:

[0155] 1. Based on a preset BLOCK size standard, write the first target number of Y data of the first Y data into the first target address of the target Y storage unit. Specifically, the BLOCK size standard can be 8 8 or 16 16, etc. The target number is related to the BLOCK size standard, such as when the BLOCK size standard is 8 8, the target number is 8, when the BLOCK size standard is 16 16, the target quantity is 16. The target Y storage units include: Y_RAM_0, Y_RAM_1...Y_RAM_7.

[0156] 2. Read the Y data in the first target address to obtain the 0th row of the first BLOCK data, and write the first target number of Y data in the remaining Y data of the first Y data into the second target address of the target Y storage unit.

[0157] 3. Read the Y data in the second target address to obtain the first row of the first BLOCK data, and at the same time, write the first target number of Y data of the second Y data into the first target address of the target Y storage unit.

[0158] 4. Read the Y data in the first target address to obtain the 0th row of the second BLOCK data, and at the same time, write the first target number of Y data in the remaining Y data of the first Y data into the third target address of the target Y storage unit, and the first target address, the second target address and the third target address are arranged in sequence from front to back.

[0159] 5. Read the Y data in the third target address to obtain the second row of the first BLOCK data, and at the same time, write the first target number of Y data in the remaining Y data of the second Y data into the second target address.

[0160] 6. In the case of traversing all addresses of the target Y storage unit, the complete first BLOCK data and the second BLOCK data are obtained. It should be noted that the above-mentioned reading and writing steps of the target Y storage unit realize the time-sharing multiplexing of RAM resources, and realize the parallel BLOCK conversion of two frames without increasing RAM resources, which greatly improves the video compression efficiency.

[0161] For example, the BLOCK size standard is 8 In the case of 8, write the first 8 Y data of frame 0 to address 0-7 of Y_RAM_0, and then read address 0-7 synchronously (because RAM has address information, it can be read in 1 clock cycle) to get the 0th row of Y_BLOCK data of frame 0. Then write data 8-15 of frame 0 to address 8-15 of Y_RAM_0, and then read address 8-15 to get the 1st row of Y_BLOCK data of frame 0. At this time, write the first 8 Y data of frame 1 to address 0-7 of Y_RAM_0 synchronously (understandable, because the data of address 0-7 has been read at this time, so the data of frame 1 can be written to address 0-7). At the same time, read addresses 0-7 of Y_RAM_0 in parallel to get row 0 of Y_BLOCK of frame 1. Then write the 16-23 data of the 0th frame into the address 16-23 of Y_RAM_0, and then read the address 16-23 to get the 2nd row of the Y_BLOCK data of the 0th frame. At this time, the 8-15 data of the 1st frame should be synchronously written into the address 8-15 of Y_RAM_0 (because the data of address 8-15 has been read at this time, so the data of the 1st frame can be written into the address 8-15), and the 8-15th address of Y_RAM_0 is read in parallel to get the 1st row of the Y_BLOCK of the 1st frame. Then, write the 24-31 data of the 0th frame into the address 24-31 of Y_RAM_0, and then read the address 24-31 to get the 3rd row of the Y_BLOCK data of the 0th frame. At this time, write the 16-23 data of the 1st frame into the address 16-23 of Y_RAM_0 synchronously (because the data of address 16-23 has been read at this time, so the data of the 1st frame can be written into the address 16-23). At the same time, read the 16th to 23rd addresses of Y_RAM_0 in parallel to get the second line of Y_BLOCK of the first frame...

[0162] The same is true for Y_RAM_1-Y_RAM_7, that is, the above parallel read-write method is also used to perform block conversion. In addition, the above parallel read-write method is also used to perform block conversion of U data and V data.

[0163] Through the above-mentioned parallel reading and writing method, the BLOCK conversion of two parallel frames of Y data is realized, which effectively improves the video compression speed.

[0164] Specifically, the step of performing BLOCK format conversion on the first U data and the second U data in parallel to obtain third BLOCK data and fourth BLOCK data includes:

[0165] 1. Based on a preset BLOCK size standard, write the first target number of U data of the first U data into the fourth target address of the target U storage unit. The target U storage unit includes: U_RAM_0, U_RAM_1...U_RAM_7.

[0166] 2. Read the U data in the fourth target address to obtain the 0th row of the third BLOCK data, and at the same time, write the first target number of U data in the remaining U data of the first U data into the fifth target address of the target U storage unit.

[0167] 3. Read the U data in the fifth target address to obtain the first row of the third BLOCK data, and at the same time, write the first target number of U data of the second U data into the fourth target address of the target U storage unit.

[0168] 4. Read the U data in the fourth target address to obtain the 0th row of the fourth BLOCK data. At the same time, write the first target number of U data in the remaining U data of the first U data into the sixth target address of the target U storage unit. The fourth target address, the fifth target address and the sixth target address are arranged in sequence from front to back.

[0169] 5. Read the U data in the sixth target address to obtain the second row of the third BLOCK data, and at the same time, write the first target number of U data in the remaining U data of the second U data into the fifth target address.

[0170] 6. After traversing all addresses of the target U storage unit, the complete third BLOCK data and the fourth BLOCK data are obtained.

[0171] Specifically, the step of performing BLOCK format conversion on the first V data and the second V data in parallel to obtain fifth BLOCK data and sixth BLOCK data includes:

[0172] 1. Based on a preset BLOCK size standard, write the first target number of V data of the first V data into the seventh target address of the target V storage unit. The target V storage unit includes: V_RAM_0, V_RAM_1...V_RAM_7.

[0173] 2. Read the V data in the seventh target address to obtain the 0th row of the fifth BLOCK data, and at the same time, write the first target number of V data of the remaining V data of the first V data into the eighth target address of the target V storage unit.

[0174] 3. Read the V data in the eighth target address to obtain the first row of the fifth BLOCK data, and at the same time, write the first target number of V data of the second V data into the seventh target address of the target V storage unit.

[0175] 4. Read the V data in the seventh target address to obtain the 0th row of the sixth BLOCK data. At the same time, write the first target number of V data in the remaining V data of the first V data into the ninth target address of the target V storage unit. The seventh target address, the eighth target address and the ninth target address are arranged in sequence from front to back.

[0176] 5. Read the V data in the ninth target address to obtain the second row of the fifth BLOCK data, and at the same time, write the first target number of V data of the remaining V data of the second V data into the eighth target address.

[0177] 6. After traversing all addresses of the target V storage unit, the complete fifth BLOCK data and the sixth BLOCK data are obtained.

[0178] It should be noted that the step of performing BLOCK format conversion on the first Y data and the second Y data in parallel, the step of performing BLOCK format conversion on the first U data and the second U data in parallel, and the step of performing BLOCK format conversion on the first V data and the second V data in parallel are performed simultaneously.

[0179] In some embodiments, based on the position of the current BLOCK in the odd frame, the step of determining the target BLOCK associated with the current BLOCK in the even frame includes:

[0180] 1. Based on the position of the current BLOCK in the odd frame, determine the first target BLOCK in the even frame that overlaps with the BLOCK.

[0181] 2. Determine the BLOCK adjacent to the left side of the first target BLOCK in the even frame as the second target BLOCK.

[0182] 3. Determine the BLOCK adjacent to and above the first target BLOCK in the even-numbered frame as the third target BLOCK.

[0183] 4. Determine the BLOCK adjacent to the upper left corner of the first target BLOCK in the even frame as the fourth target BLOCK.

[0184] 5. Determine the BLOCK adjacent to the upper right corner of the first target BLOCK in the even-numbered frame as the fifth target BLOCK. Figure 3 As shown, assuming that the current comparison size (the comparison size here refers to the size of the two blocks being compared, that is, the first target size) is 8 8. After determining the current BLOCK in the second target image data, i.e., the current BLOCK of the odd-numbered frame, the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK are determined based on the position of the current BLOCK. It should be noted that, since the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK in the first target image data have completed corresponding processing when processing the current BLOCK in the second target image data, the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK can be cached. When determining the current BLOCK in the second target image data, the current BLOCK is compared with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK, respectively.

[0185] In some embodiments, the step of obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs comprises:

[0186] The current BLOCK is compared with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data. Specifically, the current BLOCK is calculated with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data.

[0187] In some embodiments, the step of comparing the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK respectively to obtain the second compressed data includes:

[0188] 1. Compare each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK, respectively, to obtain a first difference between each pixel value of the current BLOCK and the corresponding pixel value of the first target BLOCK, a second difference between each pixel value of the current BLOCK and the corresponding pixel value of the second target BLOCK, a third difference between each pixel value of the current BLOCK and the corresponding pixel value of the third target BLOCK, a fourth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fourth target BLOCK, and a fifth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fifth target BLOCK.

[0189] 2. Perform absolute value processing on all first differences, and average all first differences after absolute value processing to obtain a first average value.

[0190] 3. Perform absolute value processing on all second differences, and average all second differences after absolute value processing to obtain a second average value.

[0191] Fourth, perform absolute value processing on all the third differences, and perform average processing on all the third differences after the absolute value processing to obtain a third average value.

[0192] 5. Perform absolute value processing on all fourth difference values, and perform average processing on all fourth difference values ​​after the absolute value processing to obtain a fourth average value.

[0193] 6. Perform absolute value processing on all the fifth difference values, and perform average processing on all the fifth difference values ​​after the absolute value processing to obtain a fifth average value.

[0194] 7. When at least one of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is less than a preset average value threshold, the minimum value of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is determined as the target average value; the target BLOCK corresponding to the target average value is determined as the final target BLOCK; the first target size, the horizontal coordinate of the final target BLOCK, the vertical coordinate of the final target BLOCK and the target average value are determined as the second compressed data, and the first target size is the size of the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK or the fifth target BLOCK.

[0195] In order to further improve the accuracy of comparison compression, in some embodiments, the step of comparing the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK respectively to obtain the second compressed data further includes:

[0196] 1. While comparing each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK, the current BLOCK is divided into a fixed number of first sub-BLOCKs based on a preset second target size, and all the target BLOCKs are divided into a fixed number of second sub-BLOCKs based on the second target size.

[0197] 2. Based on the current position of the first sub-BLOCK, determine the target sub-BLOCK associated with the current first sub-BLOCK from all the second sub-BLOCKs, where the target sub-BLOCK refers to the sub-BLOCK in all the second sub-BLOCKs that overlaps or is adjacent to the current first sub-BLOCK. Figures 4 to 7 ,by As an example, assuming that the second target size is , when determining the current BLOCK of the odd frame, the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK of the even frame, the current BLOCK is divided into four first sub-BLOCKs, and the target BLOCKs (the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK) are also divided into four second sub-BLOCKs. For the first sub-BLOCK in the upper left corner of the current BLOCK of the odd frame, as Figure 4 As shown in FIG. 1 , five target sub-BLOCKs associated with or corresponding to the target sub-BLOCKs are determined. For the first sub-BLOCK in the upper right corner of the current BLOCK of the odd-numbered frame, as shown in FIG. Figure 5 As shown in FIG. 1 , five target sub-BLOCKs associated with or corresponding to the target sub-BLOCKs are determined. For the first sub-BLOCK at the lower left corner of the current BLOCK of the odd-numbered frame, as shown in FIG. Figure 6 As shown in FIG. 1 , five target sub-BLOCKs associated with or corresponding to the target sub-BLOCKs are determined. For the first sub-BLOCK at the lower right corner of the current BLOCK of the odd-numbered frame, as shown in FIG. Figure 7 As shown, 4 target sub-BLOCKs associated or corresponding thereto are determined. Figures 4 to 7The dotted box in the even-numbered frame (the upper BLOCK image) represents the target sub-BLOCK, and the dotted box in the odd-numbered frame represents the current first sub-BLOCK.

[0198] 3. Compare the first sub-BLOCK with all the associated target sub-BLOCKs to obtain a comparison result. Specifically, perform difference calculation on the first sub-BLOCK with all the associated target sub-BLOCKs to obtain the comparison result.

[0199] 4. When the first average value, the second average value, the third average value, the fourth average value and the fifth average value are all greater than or equal to the average value threshold, the second compressed data is obtained based on the comparison result.

[0200] In some embodiments, the step of comparing the first sub-BLOCK with all the associated target sub-BLOCKs respectively to obtain the comparison result comprises:

[0201] 1. Compare the pixel values ​​of the first sub-BLOCK with the corresponding pixel values ​​of all the associated target sub-BLOCKs to obtain a target difference, where the target difference is the difference between the pixel value of the first sub-BLOCK and the pixel value of any of the target sub-BLOCKs. Specifically, perform difference calculation on the pixel value of the first sub-BLOCK and the corresponding pixel values ​​of all the associated target sub-BLOCKs to obtain the target difference.

[0202] 2. Perform absolute value processing on all the target differences between the pixel value of the first sub-BLOCK and the pixel value of any target sub-BLOCK, and perform average processing on all the target differences after the absolute value processing to obtain a target mean value.

[0203] 3. Determine all the target mean values ​​as the comparison result.

[0204] In some embodiments, based on the comparison result, the step of obtaining the second compressed data includes:

[0205] 1. Determine the minimum value among all the target mean values ​​as the target mean value. Specifically, when the minimum value among all the target mean values ​​is less than the average value threshold, determine the minimum value among all the target mean values ​​as the final target mean value.

[0206] 2. Determine the target sub-BLOCK corresponding to the final target mean as the final target sub-BLOCK, and the first sub-BLOCK corresponds to the final target sub-BLOCK one by one.

[0207] 3. Determine the second target size, the horizontal coordinate of the final target sub-BLOCK, the vertical coordinate of the final target sub-BLOCK and the final target mean as a second compressed subset, and the second compressed subset corresponds to the first sub-BLOCK one by one.

[0208] 4. Determine all of the second compressed subsets of the current BLOCK as the second compressed data.

[0209] It should be noted that the above 8 Comparison of 8 sizes with 4 The comparison of the current BLOCK of the same odd frame is also performed synchronously, with 8 8 as an example, the current BLOCK of the odd frame is compared with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK of the even frame at the same time.

[0210] It should also be noted that if, after the above comparison, the average values ​​of all comparison blocks (BLOCK), that is, the first average value, the second average value, the third average value, the fourth average value, the fifth average value and all the target average values ​​are greater than the average value threshold, then the original data of the current BLOCK of the odd frame needs to be transmitted and the position of the current BLOCK needs to be recorded. In addition, the second compressed data of the current BLOCK is determined to include: the first target size, the horizontal coordinate of the current BLOCK, the vertical coordinate of the current BLOCK and the specific data of the current BLOCK.

[0211] In order to further improve the accuracy of the comparison compression, in some embodiments, the following steps are further included:

[0212] 1. If the sum of all the target average values ​​is less than the preset statistical threshold value, or all the final target average values ​​are less than the statistical threshold value within the preset time period, the average value threshold value is increased according to the preset first adjustment ratio value. Specifically, if the sum of all the target average values ​​is less than the preset statistical threshold value, or all the final target average values ​​are less than the statistical threshold value within the T0 time period, it means that the change of the original video within the T0 time period is very small. At this time, the average value threshold value Threhold_0 is corrected, that is, the average value threshold value is increased according to the preset first adjustment ratio value, that is, Threhold_0 mdy_0, where mdy_0>1, mdy_0 represents the first adjustment ratio value.

[0213] 2. If within a preset time period, the sum of all the target average values ​​is greater than the statistical threshold, or all the final target average values ​​are greater than the statistical threshold, then the average value threshold is reduced according to a preset second adjustment ratio value to complete the dynamic adjustment of the average value threshold. By dynamically adjusting the average value threshold, the accuracy of comparative compression can be effectively increased. Specifically, if within T0 time, the sum of all the target average values ​​is greater than the statistical threshold, or all the final target average values ​​are greater than the statistical threshold, it means that within T0 time, the original video has changed significantly. At this time, the average value threshold Threhold_0 is corrected, that is, the average value threshold is reduced according to the preset second adjustment ratio value, that is, Threhold_0 mdy_1, wherein mdy_1<1, and mdy_1 represents the second adjustment ratio value. The above dynamic adjustment method can ensure compression efficiency and compression quality at the same time.

[0214] In some embodiments, it also includes:

[0215] The compressed video data transmission is completed by alternately reading the data in the first video memory space and the second video memory space.

[0216] It should be mentioned that when the remote end, ie the monitoring device, receives the first compressed data and the second compressed data, it decompresses the first compressed data and then decompresses and restores the odd frames based on the decompressed even frame image data and the second compressed data.

[0217] The BMC video compression device provided by the present invention is described below. The BMC video compression device described below and the BMC video compression method described above can be referred to each other.

[0218] Please refer to Figure 8 The BMC video compression device provided in this embodiment includes:

[0219] The compression module 810 is used to compress the even frames of the video data based on a preset compression standard to obtain first compressed data; and obtain second compressed data by comparing and compressing the odd frames of the video data, wherein the odd frames and the even frames are adjacent frames; the comparison and compression includes: based on the position of the current BLOCK in the odd frame, determining the target BLOCK associated with the current BLOCK in the even frame, wherein the target BLOCK refers to the BLOCK in the even frame that overlaps with or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs respectively.

[0220] The data writing module 820 is used to write the first compressed data into the first video memory space of the preset memory; and write the second compressed data into the second video memory space of the memory. The BMC video compression device in this embodiment can effectively improve the video compression efficiency, avoid invalid compression, help improve the overall performance of the baseboard management controller, and avoid frame loss.

[0221] In some embodiments, the compression module 810 includes: a YUV data receiving unit, used to obtain first YUV data and second YUV data, the first YUV data is data obtained after the first RGB image data is converted through color space, the second YUV data is data obtained after the second RGB image data is converted through color space, the first RGB image data is data obtained after the first original image data is converted through RGB format, the second RGB image data is data obtained after the second original image data is converted through RGB format, and the first original image data and the second original image data are adjacent frames;

[0222] A format conversion unit is used to perform BLOCK format conversion on the first YUV data and the second YUV data in parallel to obtain the even frame and the odd frame, the first YUV data corresponds to the even frame, and the second YUV data corresponds to the odd frame; wherein, in the process of performing BLOCK format conversion on the first YUV data and the second YUV data in parallel, the BLOCK format conversion is completed by time-division multiplexing the space of the target storage unit.

[0223] In some embodiments, the format conversion unit is specifically used to perform BLOCK format conversion on the first Y data and the second Y data in parallel to obtain first BLOCK data and second BLOCK data, wherein the first Y data corresponds to the first BLOCK data, and the second Y data corresponds to the second BLOCK data;

[0224] Performing BLOCK format conversion on the first U data and the second U data in parallel to obtain third BLOCK data and fourth BLOCK data, wherein the first U data corresponds to the third BLOCK data, and the second U data corresponds to the fourth BLOCK data;

[0225] The first V data and the second V data are converted into BLOCK formats in parallel to obtain fifth BLOCK data and sixth BLOCK data, wherein the first V data corresponds to the fifth BLOCK data, and the second V data corresponds to the sixth BLOCK data; the first BLOCK data, the third BLOCK data and the fifth BLOCK data all belong to the even frame, and the second BLOCK data, the fourth BLOCK data and the sixth BLOCK data all belong to the odd frame.

[0226] In some embodiments, the format conversion unit is further specifically configured to write the first target number of Y data of the first Y data into the first target address of the target Y storage unit based on a preset BLOCK size standard;

[0227] Reading the Y data in the first target address to obtain the 0th row of the first BLOCK data, and writing the first target number of Y data in the remaining Y data of the first Y data into the second target address of the target Y storage unit;

[0228] Reading the Y data in the second target address to obtain the first row of the first BLOCK data, and writing the first target number of Y data of the second Y data into the first target address of the target Y storage unit;

[0229] Read the Y data in the first target address to obtain the 0th row of the second BLOCK data, and write the first target number of Y data in the remaining Y data of the first Y data into the third target address of the target Y storage unit, wherein the first target address, the second target address and the third target address are arranged in sequence from front to back;

[0230] Reading the Y data in the third target address to obtain the second row of the first BLOCK data, and writing the first target number of Y data in the remaining Y data of the second Y data into the second target address;

[0231] When all addresses of the target Y storage unit are traversed, the complete first BLOCK data and the second BLOCK data are obtained.

[0232] In some embodiments, the format conversion unit is further specifically configured to write the first target number of U data of the first U data into a fourth target address of the target U storage unit based on a preset BLOCK size standard;

[0233] Reading the U data in the fourth target address to obtain the 0th row of the third BLOCK data, and writing the first target number of U data in the remaining U data of the first U data into the fifth target address of the target U storage unit;

[0234] Reading the U data in the fifth target address to obtain the first row of the third BLOCK data, and writing the first target number of U data of the second U data into the fourth target address of the target U storage unit;

[0235] Read the U data in the fourth target address to obtain the 0th row of the fourth BLOCK data, and write the first target number of U data in the remaining U data of the first U data into the sixth target address of the target U storage unit, wherein the fourth target address, the fifth target address and the sixth target address are arranged in sequence from front to back;

[0236] Reading the U data in the sixth target address to obtain the second row of the third BLOCK data, and writing the first target number of U data in the remaining U data of the second U data into the fifth target address;

[0237] In the case of traversing all addresses of the target U storage unit, the complete third BLOCK data and the fourth BLOCK data are obtained.

[0238] In some embodiments, the format conversion unit is further specifically configured to write the first target number of V data of the first V data into the seventh target address of the target V storage unit based on a preset BLOCK size standard;

[0239] Read the V data in the seventh target address to obtain the 0th row of the fifth BLOCK data, and write the first target number of V data in the remaining V data of the first V data into the eighth target address of the target V storage unit;

[0240] Reading the V data in the eighth target address to obtain the first row of the fifth BLOCK data, and writing the first target number of V data of the second V data into the seventh target address of the target V storage unit;

[0241] The V data in the seventh target address is read to obtain the 0th row of the sixth BLOCK data, and at the same time, the first target number of V data in the remaining V data of the first V data is written into the ninth target address of the target V storage unit, and the seventh target address, the eighth target address and the ninth target address are arranged in sequence from front to back;

[0242] Read the V data in the ninth target address to obtain the second row of the fifth BLOCK data, and write the first target number of V data in the remaining V data of the second V data into the eighth target address;

[0243] When all addresses of the target V storage unit are traversed, the complete fifth BLOCK data and the sixth BLOCK data are obtained.

[0244] In some embodiments, the format conversion unit simultaneously performs the steps of performing BLOCK format conversion on the first Y data and the second Y data in parallel, performing BLOCK format conversion on the first U data and the second U data in parallel, and performing BLOCK format conversion on the first V data and the second V data in parallel.

[0245] In some embodiments, the compression module 810 is specifically configured to determine a target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame, comprising:

[0246] Based on the position of the current BLOCK in the odd frame, determine a first target BLOCK in the even frame that overlaps with the BLOCK;

[0247] Determine a BLOCK adjacent to the left side of the first target BLOCK in the even-numbered frame as a second target BLOCK;

[0248] Determine a BLOCK adjacent to the first target BLOCK in the even frame as a third target BLOCK;

[0249] Determine a BLOCK adjacent to the upper left corner of the first target BLOCK in the even-numbered frame as a fourth target BLOCK;

[0250] A BLOCK adjacent to the upper right corner of the first target BLOCK in the even frame is determined as the fifth target BLOCK.

[0251] In some embodiments, the compression module 810 is further specifically configured to compare the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data.

[0252] In some embodiments, the compression module 810 is further specifically used to compare each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK, respectively, to obtain a first difference between each pixel value of the current BLOCK and the corresponding pixel value of the first target BLOCK, a second difference between each pixel value of the current BLOCK and the corresponding pixel value of the second target BLOCK, a third difference between each pixel value of the current BLOCK and the corresponding pixel value of the third target BLOCK, a fourth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fourth target BLOCK, and a fifth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fifth target BLOCK;

[0253] Performing absolute value processing on all first differences, and averaging all first differences after absolute value processing to obtain a first average value;

[0254] Performing absolute value processing on all second differences, and averaging all second differences after the absolute value processing to obtain a second average value;

[0255] Performing absolute value processing on all third difference values, and performing average processing on all third difference values ​​after the absolute value processing to obtain a third average value;

[0256] performing absolute value processing on all fourth difference values, and performing average processing on all fourth difference values ​​after the absolute value processing to obtain a fourth average value;

[0257] Performing absolute value processing on all the fifth difference values, and performing average processing on all the fifth difference values ​​after the absolute value processing to obtain a fifth average value;

[0258] When at least one of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is less than a preset average value threshold, the minimum value of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is determined as the target average value; the target BLOCK corresponding to the target average value is determined as the final target BLOCK; the first target size, the horizontal coordinate of the final target BLOCK, the vertical coordinate of the final target BLOCK and the target average value are determined as the second compressed data, and the first target size is the size of the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK or the fifth target BLOCK.

[0259] In some embodiments, the compression module 810 is further specifically configured to, while comparing each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK, divide the current BLOCK into a fixed number of first sub-BLOCKs based on a preset second target size, and divide all the target BLOCKs into a fixed number of second sub-BLOCKs based on the second target size;

[0260] Based on the current position of the first sub-BLOCK, determine a target sub-BLOCK associated with the current first sub-BLOCK from all the second sub-BLOCKs, where the target sub-BLOCK refers to a sub-BLOCK that overlaps with or is adjacent to the current first sub-BLOCK in all the second sub-BLOCKs;

[0261] Compare the first sub-BLOCK with all the associated target sub-BLOCKs respectively to obtain a comparison result;

[0262] When the first average value, the second average value, the third average value, the fourth average value, and the fifth average value are all greater than or equal to the average value threshold, the second compressed data is obtained based on the comparison result.

[0263] In some embodiments, the compression module 810 is further specifically configured to compare the pixel value of the first sub-BLOCK with the corresponding pixel values ​​of all the associated target sub-BLOCKs to obtain a target difference value, where the target difference value is the difference between the pixel value of the first sub-BLOCK and the pixel value of any of the target sub-BLOCKs;

[0264] Performing absolute value processing on all the target differences between the pixel value of the first sub-BLOCK and the pixel value of any of the target sub-BLOCKs, and performing average processing on all the target differences after the absolute value processing to obtain a target mean value;

[0265] All of the target mean values ​​are determined as the comparison results.

[0266] In some embodiments, the compression module 810 is further specifically configured to determine the minimum value among all the target mean values ​​as the final target mean value;

[0267] Determine the target sub-BLOCK corresponding to the final target mean as the final target sub-BLOCK, and the first sub-BLOCK corresponds to the final target sub-BLOCK one by one;

[0268] Determine the second target size, the abscissa of the final target sub-BLOCK, the ordinate of the final target sub-BLOCK, and the final target mean as a second compressed subset, where the second compressed subset corresponds to the first sub-BLOCK one-to-one;

[0269] All of the second compressed subsets of the current BLOCK are determined as the second compressed data.

[0270] In some embodiments, the compression module 810 further includes: a difference statistical judgment module, configured to increase the average value threshold according to a preset first adjustment ratio value if the sum of all the target average values ​​is less than a preset statistical threshold value or all the final target average values ​​are less than the statistical threshold value within a preset time period;

[0271] If within the preset time period, the sum of all the target average values ​​is greater than the statistical threshold, or all the final target average values ​​are greater than the statistical threshold, the average value threshold is reduced according to a preset second adjustment ratio value to complete the dynamic adjustment of the average value threshold.

[0272] In some embodiments, the compression module 810 further includes:

[0273] The network transmission unit is used to complete the compressed video data transmission by alternately reading the data in the first video memory space and the second video memory space.

[0274] The video compression system provided by the present invention is explained below.

[0275] Please refer to Fig. 9 The BMC video compression system provided in this embodiment includes:

[0276] The memory 910, VGA module 920, capture module 930, color space conversion module 940 and the BMC video compression device as described above; the memory 910 is DDR. The VGA module in this embodiment adds an alternate reading unit vga_mdy to realize the reading of alternate frames of video data.

[0277] The memory 910 includes a raw data display memory space, a first display memory space, and a second display memory space; the raw data display memory space is used to receive and store raw image data transmitted by the host. Specifically, the raw data display memory space is used to receive and store raw image data transmitted by the host through a PCIe interface.

[0278] The VGA module 920 is used to read the first original image data from the original data display memory space, perform RGB format conversion on the first original image data to obtain first RGB image data, and transmit the first RGB image data to the color space conversion module. Fig. 9 The C interval in DDR represents the raw data memory space. Fig. 9 The D interval in DDR represents the first video memory space. Fig. 9 The E interval in DDR represents the second video memory space.

[0279] The capture module 930 is used to read the second original image data in the original data display memory space, perform RGB format conversion on the second original image data to obtain second RGB image data, and transmit the second RGB image data to the color space conversion module; the first original image data and the second original image data are adjacent frames.

[0280] The color space conversion module 940 is used to synchronously perform color space conversion on the first RGB image data and the second RGB image data to obtain first YUV data and second YUV data, wherein the first YUV data corresponds to the first RGB image data and the second YUV data corresponds to the second RGB image data; the first YUV data and the second YUV data are input into the video compression device to perform video compression.

[0281] Fig. 9 The compression module 810 is exemplarily divided into a format conversion unit 950, a compression unit 960 and a network transmission unit 970 (such as EMAC (Ethernet MAC, Ethernet Media Access Controller)). The compression unit 960 is used to compress the even frames based on a preset compression standard to obtain first compressed data. The number of the data writing modules 820 is two, one of which is deployed in the format conversion unit 950, and the other is deployed in the compression unit 960. The data writing module 820 in the compression unit 960 is used to write the first compressed data into the first video memory space, and the data writing module 820 in the format conversion unit 950 is used to write the second compressed data into the second video memory space.

[0282] Fig.10 This is a logic block diagram of the format conversion unit 950 in the video compression system, or a logic block diagram of BLOCK format conversion and comparison compression. Please refer to Fig.10 The YUV RAM time-division multiplexing write control module 1010 receives the first YUV data and the second YUV data in parallel, and writes the corresponding data into the target storage unit ( Fig.10The target storage units include: Y_RAM_0, Y_RAM_1...Y_RAM_7, U_RAM_0, U_RAM_1...U_RAM_7, V_RAM_0, V_RAM_1...V_RAM_7, wherein Y_RAM_0, Y_RAM_1...Y_RAM_7 are a storage array, i.e., Y_RAM_ARRAY, U_RAM_0, U_RAM_1...U_RAM_7 are a storage array, i.e., U_RAM_ARRAY, V_RAM_0, V_RAM_1...V_RAM_7 are a storage array, i.e., V_RAM_ARRAY), and at the same time, the YUV RAM time-sharing multiplexing read control module 1020 adopts the above-mentioned parallel read and write method to read data from the target storage unit, thereby completing the BLOCK format conversion. Fig.10 The comparison data buffer module 1030 is used to buffer the BLOCK data to be compared, specifically the BLOCK data of the even-numbered frames, and the new read-out BLOCK data module 1040 is used to receive the latest read-out BLOCK data, specifically the current BLOCK data of the odd-numbered frames.

[0283] Fig.10 8 of 8 8 size data comparison module 1050 is used to compare 8 8 BLOCK for comparison, 4 4 Size comparison module 1060 is used to compare 4 4's BLOCK. Afterwards, the CPU (central processing unit) of the baseboard management controller (BMC) sends the average value threshold to the threshold judgment module, and the threshold judgment module 1070 compresses the odd frames based on the comparison result and the average value threshold to obtain the second compressed data. Finally, the second compressed data is written into the second video memory space of the DDR. It should be mentioned that while comparing and compressing the odd frames, the YUV RAM time-sharing multiplexing read control module inputs the BLOCK data of the even frames into the JPEG compression module for compression to obtain the first compressed data, and writes the first compressed data into the first video memory space of the DDR. It should be mentioned that Fig.10 The difference statistical judgment module 1080 is used to perform threshold correction, that is, to dynamically adjust the average value threshold.

[0284] This embodiment further provides a baseboard management controller, including: the BMC video compression device as described above, or the BMC video compression system as described above.

[0285] This embodiment also provides a server, including: the baseboard management controller as described above.

[0286] Please refer to Fig.11This embodiment also provides a method for reading video compression data, including:

[0287] S1110: Receive compressed video data transmitted by the BMC video compression device as described above, wherein the compressed video data includes the first compressed data and the second compressed data that are read alternately.

[0288] S1120: Perform data recovery based on the first compressed data and the second compressed data to obtain complete video data.

[0289] Please refer to Fig.12 This embodiment also provides a monitoring device, including:

[0290] A data receiving module 1210, configured to receive compressed video data transmitted by the video compression device as described above, wherein the compressed video data includes the first compressed data and the second compressed data read alternately;

[0291] The data analysis module 1220 is used to perform data recovery based on the first compressed data and the second compressed data to obtain complete video data. The data receiving module 1210 is connected to the data analysis module 1220. The monitoring device in this embodiment can achieve efficient monitoring.

[0292] In some embodiments, the monitoring device further comprises:

[0293] The display module is used to display the complete video data.

[0294] Fig.13 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.13As shown, the electronic device may include: a processor 1310, a communication interface 1320, a memory 1330 and a communication bus 1340, wherein the processor 1310, the communication interface 1320 and the memory 1330 communicate with each other through the communication bus 1340. The processor 1310 may call the logic instructions in the memory 1330 to execute the video compression method, which includes: in the video compression process, based on a preset compression standard, compressing the first target image data of the even-numbered frames to obtain first compressed data; and obtaining second compressed data by performing comparative compression on the second target image data of the odd-numbered frames; comparative compression includes: based on the position of the current BLOCK in the second target image data, determining the target BLOCK associated with the current BLOCK in the first target image data, the target BLOCK refers to the BLOCK in the first target image data that overlaps or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each target BLOCK respectively.

[0295] In addition, the logic instructions in the above-mentioned memory 1330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0296] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the video compression method provided by the above-mentioned methods, the method comprising: in a video compression process, based on a preset compression standard, compressing the first target image data of the even-numbered frames to obtain first compressed data; and obtaining second compressed data by comparatively compressing the second target image data of the odd-numbered frames; the comparative compression comprising: based on the position of the current BLOCK in the second target image data, determining a target BLOCK associated with the current BLOCK in the first target image data, the target BLOCK referring to a BLOCK in the first target image data that overlaps with or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each target BLOCK respectively.

[0297] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0298] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0299] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A BMC video compression method, characterized in that: include: Based on a preset compression standard, compressing even-numbered frames of the video data to obtain first compressed data; Furthermore, second compressed data is obtained by comparing and compressing odd frames of the video data, wherein the odd frames and the even frames are adjacent frames; The comparison and compression comprises: determining a target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame, wherein the target BLOCK refers to a BLOCK in the even frame that overlaps with or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs respectively; Writing the first compressed data into a first video memory space of a preset memory; writing the second compressed data into a second video memory space of the memory; The step of determining a target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame comprises: Based on the position of the current BLOCK in the odd frame, determine a first target BLOCK in the even frame that overlaps with the BLOCK; Determine a BLOCK adjacent to the left side of the first target BLOCK in the even-numbered frame as a second target BLOCK; Determine a BLOCK adjacent to the first target BLOCK in the even frame as a third target BLOCK; Determine a BLOCK adjacent to the upper left corner of the first target BLOCK in the even-numbered frame as a fourth target BLOCK; Determine a BLOCK adjacent to the upper right corner of the first target BLOCK in the even-numbered frame as a fifth target BLOCK; The step of obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs comprises: Compare the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data; The step of comparing the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data includes: Compare each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK, respectively, to obtain a first difference between each pixel value of the current BLOCK and the corresponding pixel value of the first target BLOCK, a second difference between each pixel value of the current BLOCK and the corresponding pixel value of the second target BLOCK, a third difference between each pixel value of the current BLOCK and the corresponding pixel value of the third target BLOCK, a fourth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fourth target BLOCK, and a fifth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fifth target BLOCK; Performing absolute value processing on all first differences, and averaging all first differences after absolute value processing to obtain a first average value; Performing absolute value processing on all second differences, and averaging all second differences after the absolute value processing to obtain a second average value; Performing absolute value processing on all third difference values, and performing average processing on all third difference values ​​after the absolute value processing to obtain a third average value; performing absolute value processing on all fourth difference values, and performing average processing on all fourth difference values ​​after the absolute value processing to obtain a fourth average value; Performing absolute value processing on all the fifth difference values, and performing average processing on all the fifth difference values ​​after the absolute value processing to obtain a fifth average value; In the case where at least one of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is less than a preset average value threshold, the minimum value among the first average value, the second average value, the third average value, the fourth average value and the fifth average value is determined as the target average value; the target BLOCK corresponding to the target average value is determined as the final target BLOCK; the first target size, the abscissa of the final target BLOCK, the ordinate of the final target BLOCK and the target average value are determined as the second compressed data, and the first target size is the size of the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK or the fifth target BLOCK; The step of comparing the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data further includes: While comparing each pixel value of the current BLOCK with the corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK, the current BLOCK is divided into a fixed number of first sub-BLOCKs based on a preset second target size, and all the target BLOCKs are divided into a fixed number of second sub-BLOCKs based on the second target size; Based on the current position of the first sub-BLOCK, determine a target sub-BLOCK associated with the current first sub-BLOCK from all the second sub-BLOCKs, where the target sub-BLOCK refers to a sub-BLOCK that overlaps with or is adjacent to the current first sub-BLOCK in all the second sub-BLOCKs; Compare the first sub-BLOCK with all the associated target sub-BLOCKs respectively to obtain a comparison result; When the first average value, the second average value, the third average value, the fourth average value, and the fifth average value are all greater than or equal to the average value threshold, the second compressed data is obtained based on the comparison result.

2. The BMC video compression method according to claim 1, characterized in that: Also includes: Acquire first YUV data and second YUV data, wherein the first YUV data is data obtained after the first RGB image data is converted through a color space, the second YUV data is data obtained after the second RGB image data is converted through a color space, the first RGB image data is data obtained after the first original image data is converted through an RGB format, the second RGB image data is data obtained after the second original image data is converted through an RGB format, and the first original image data and the second original image data are adjacent frames; The first YUV data and the second YUV data are converted into BLOCK format in parallel to obtain the even frame and the odd frame, the first YUV data corresponds to the even frame, and the second YUV data corresponds to the odd frame; wherein, in the process of performing BLOCK format conversion on the first YUV data and the second YUV data in parallel, the BLOCK format conversion is completed by time-division multiplexing the space of the target storage unit.

3. The BMC video compression method according to claim 2, characterized in that: The first original image data and the second original image data are both obtained by reading alternate frames of the stored original image data, wherein the step of obtaining the first original image data and the step of obtaining the second original image data are performed simultaneously, and the first original image data and the second original image data are two adjacent frames of image data in the original image data.

4. The BMC video compression method according to claim 2 or 3, characterized in that: The first YUV data includes: first Y data, first U data and first V data; the second YUV data includes: second Y data, second U data and second V data; The step of performing BLOCK format conversion on the first YUV data and the second YUV data in parallel to obtain the even frame and the odd frame comprises: Performing block format conversion on the first Y data and the second Y data in parallel to obtain first block data and second block data, wherein the first Y data corresponds to the first block data, and the second Y data corresponds to the second block data; Performing BLOCK format conversion on the first U data and the second U data in parallel to obtain third BLOCK data and fourth BLOCK data, wherein the first U data corresponds to the third BLOCK data, and the second U data corresponds to the fourth BLOCK data; The first V data and the second V data are converted into BLOCK formats in parallel to obtain fifth BLOCK data and sixth BLOCK data, wherein the first V data corresponds to the fifth BLOCK data, and the second V data corresponds to the sixth BLOCK data; the first BLOCK data, the third BLOCK data and the fifth BLOCK data all belong to the even frame, and the second BLOCK data, the fourth BLOCK data and the sixth BLOCK data all belong to the odd frame.

5. The BMC video compression method according to claim 4, characterized in that: The step of performing BLOCK format conversion on the first Y data and the second Y data in parallel to obtain the first BLOCK data and the second BLOCK data includes: Based on a preset BLOCK size standard, write a first target number of Y data of the first Y data into a first target address of a target Y storage unit; Reading the Y data in the first target address to obtain the 0th row of the first BLOCK data, and writing the first target number of Y data in the remaining Y data of the first Y data into the second target address of the target Y storage unit; Reading the Y data in the second target address to obtain the first row of the first BLOCK data, and writing the first target number of Y data of the second Y data into the first target address of the target Y storage unit; Read the Y data in the first target address to obtain the 0th row of the second BLOCK data, and write the first target number of Y data in the remaining Y data of the first Y data into the third target address of the target Y storage unit, wherein the first target address, the second target address and the third target address are arranged in sequence from front to back; Reading the Y data in the third target address to obtain the second row of the first BLOCK data, and writing the first target number of Y data in the remaining Y data of the second Y data into the second target address; When all addresses of the target Y storage unit are traversed, the complete first BLOCK data and the second BLOCK data are obtained.

6. The BMC video compression method according to claim 4, characterized in that: The step of performing BLOCK format conversion on the first U data and the second U data in parallel to obtain third BLOCK data and fourth BLOCK data includes: Based on a preset BLOCK size standard, writing the first target number of U data of the first U data into a fourth target address of the target U storage unit; Reading the U data in the fourth target address to obtain the 0th row of the third BLOCK data, and writing the first target number of U data in the remaining U data of the first U data into the fifth target address of the target U storage unit; Reading the U data in the fifth target address to obtain the first row of the third BLOCK data, and writing the first target number of U data of the second U data into the fourth target address of the target U storage unit; Read the U data in the fourth target address to obtain the 0th row of the fourth BLOCK data, and write the first target number of U data in the remaining U data of the first U data into the sixth target address of the target U storage unit, wherein the fourth target address, the fifth target address and the sixth target address are arranged in sequence from front to back; Reading the U data in the sixth target address to obtain the second row of the third BLOCK data, and writing the first target number of U data in the remaining U data of the second U data into the fifth target address; In the case of traversing all addresses of the target U storage unit, the complete third BLOCK data and the fourth BLOCK data are obtained.

7. The BMC video compression method according to claim 4, characterized in that: The step of performing BLOCK format conversion on the first V data and the second V data in parallel to obtain fifth BLOCK data and sixth BLOCK data includes: Based on a preset BLOCK size standard, write the first target number of V data of the first V data into a seventh target address of the target V storage unit; Read the V data in the seventh target address to obtain the 0th row of the fifth BLOCK data, and write the first target number of V data in the remaining V data of the first V data into the eighth target address of the target V storage unit; Reading the V data in the eighth target address to obtain the first row of the fifth BLOCK data, and writing the first target number of V data of the second V data into the seventh target address of the target V storage unit; The V data in the seventh target address is read to obtain the 0th row of the sixth BLOCK data, and at the same time, the first target number of V data in the remaining V data of the first V data is written into the ninth target address of the target V storage unit, and the seventh target address, the eighth target address and the ninth target address are arranged in sequence from front to back; Read the V data in the ninth target address to obtain the second row of the fifth BLOCK data, and write the first target number of V data in the remaining V data of the second V data into the eighth target address; When all addresses of the target V storage unit are traversed, the complete fifth BLOCK data and the sixth BLOCK data are obtained.

8. The BMC video compression method according to claim 4, characterized in that: The steps of converting the first Y data and the second Y data in parallel into a BLOCK format, the step of converting the first U data and the second U data in parallel into a BLOCK format, and the step of converting the first V data and the second V data in parallel into a BLOCK format are performed simultaneously.

9. The BMC video compression method according to claim 1, characterized in that: The step of comparing the first sub-BLOCK with all the associated target sub-BLOCKs respectively to obtain a comparison result comprises: Compare the pixel values ​​of the first sub-BLOCK with the corresponding pixel values ​​of all the associated target sub-BLOCKs to obtain a target difference value, where the target difference value is the difference between the pixel value of the first sub-BLOCK and the pixel value of any of the target sub-BLOCKs; Performing absolute value processing on all the target differences between the pixel value of the first sub-BLOCK and the pixel value of any of the target sub-BLOCKs, and averaging all the target differences after the absolute value processing to obtain a target mean value; All of the target mean values ​​are determined as the comparison results.

10. The BMC video compression method according to claim 9, characterized in that: Based on the comparison result, the step of obtaining the second compressed data includes: Determine the minimum value among all the target means as the final target mean; Determine the target sub-BLOCK corresponding to the final target mean as the final target sub-BLOCK, and the first sub-BLOCK corresponds to the final target sub-BLOCK one by one; Determine the second target size, the abscissa of the final target sub-BLOCK, the ordinate of the final target sub-BLOCK, and the final target mean as a second compressed subset, where the second compressed subset corresponds to the first sub-BLOCK one-to-one; All of the second compressed subsets of the current BLOCK are determined as the second compressed data.

11. The BMC video compression method according to claim 10, characterized in that: Also includes: If within a preset time period, the sum of all the target average values ​​is less than a preset statistical threshold, or all the final target average values ​​are less than the statistical threshold, the average value threshold is increased according to a preset first adjustment ratio value; If within the preset time period, the sum of all the target average values ​​is greater than the statistical threshold, or all the final target average values ​​are greater than the statistical threshold, the average value threshold is reduced according to a preset second adjustment ratio value to complete the dynamic adjustment of the average value threshold.

12. The BMC video compression method according to claim 10, characterized in that: Also includes: The compressed video data transmission is completed by alternately reading the data in the first video memory space and the second video memory space.

13. A BMC video compression device, characterized in that: include: A compression module, used for compressing even-numbered frames of video data based on a preset compression standard to obtain first compressed data; Furthermore, second compressed data is obtained by comparing and compressing odd frames of the video data, wherein the odd frames and the even frames are adjacent frames; The comparison and compression comprises: determining a target BLOCK associated with the current BLOCK in the even frame based on the position of the current BLOCK in the odd frame, wherein the target BLOCK refers to a BLOCK in the even frame that overlaps with or is adjacent to the current BLOCK; and obtaining the second compressed data by comparing the current BLOCK with each of the target BLOCKs respectively; A data writing module, used for writing the first compressed data into a first display memory space of a preset memory; and writing the second compressed data into a second display memory space of the memory; The compression module is specifically used for: Based on the position of the current BLOCK in the odd frame, determine a first target BLOCK in the even frame that overlaps with the BLOCK; Determine a BLOCK adjacent to the left side of the first target BLOCK in the even-numbered frame as a second target BLOCK; Determine a BLOCK adjacent to the first target BLOCK in the even frame as a third target BLOCK; Determine a BLOCK adjacent to the upper left corner of the first target BLOCK in the even-numbered frame as a fourth target BLOCK; Determine a BLOCK adjacent to the upper right corner of the first target BLOCK in the even-numbered frame as a fifth target BLOCK; The compression module is further specifically configured to compare the current BLOCK with the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK respectively to obtain the second compressed data; The compression module is further specifically used to compare each pixel value of the current BLOCK with corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK and the fifth target BLOCK, respectively, to obtain a first difference between each pixel value of the current BLOCK and the corresponding pixel value of the first target BLOCK, a second difference between each pixel value of the current BLOCK and the corresponding pixel value of the second target BLOCK, a third difference between each pixel value of the current BLOCK and the corresponding pixel value of the third target BLOCK, a fourth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fourth target BLOCK, and a fifth difference between each pixel value of the current BLOCK and the corresponding pixel value of the fifth target BLOCK; Performing absolute value processing on all first differences, and averaging all first differences after absolute value processing to obtain a first average value; Performing absolute value processing on all second differences, and averaging all second differences after the absolute value processing to obtain a second average value; Performing absolute value processing on all third difference values, and performing average processing on all third difference values ​​after the absolute value processing to obtain a third average value; performing absolute value processing on all fourth difference values, and performing average processing on all fourth difference values ​​after the absolute value processing to obtain a fourth average value; Performing absolute value processing on all the fifth difference values, and performing average processing on all the fifth difference values ​​after the absolute value processing to obtain a fifth average value; In the case where at least one of the first average value, the second average value, the third average value, the fourth average value and the fifth average value is less than a preset average value threshold, the minimum value among the first average value, the second average value, the third average value, the fourth average value and the fifth average value is determined as the target average value; the target BLOCK corresponding to the target average value is determined as the final target BLOCK; the first target size, the abscissa of the final target BLOCK, the ordinate of the final target BLOCK and the target average value are determined as the second compressed data, and the first target size is the size of the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK or the fifth target BLOCK; The compression module is further specifically configured to, while comparing each pixel value of the current BLOCK with corresponding pixel values ​​in the first target BLOCK, the second target BLOCK, the third target BLOCK, the fourth target BLOCK, and the fifth target BLOCK, divide the current BLOCK into a fixed number of first sub-BLOCKs based on a preset second target size, and divide all the target BLOCKs into a fixed number of second sub-BLOCKs based on the second target size; Based on the current position of the first sub-BLOCK, determine a target sub-BLOCK associated with the current first sub-BLOCK from all the second sub-BLOCKs, where the target sub-BLOCK refers to a sub-BLOCK that overlaps with or is adjacent to the current first sub-BLOCK in all the second sub-BLOCKs; Compare the first sub-BLOCK with all the associated target sub-BLOCKs respectively to obtain a comparison result; When the first average value, the second average value, the third average value, the fourth average value, and the fifth average value are all greater than or equal to the average value threshold, the second compressed data is obtained based on the comparison result.

14. A BMC video compression system, characterized in that: include: A memory, a VGA module, a capture module, a color space conversion module, and a BMC video compression device as claimed in claim 13; The memory includes a raw data display memory space, a first display memory space and a second display memory space; the raw data display memory space is used to receive and store raw image data transmitted by the host; The VGA module is used to read the first original image data from the original data display memory space, perform RGB format conversion on the first original image data to obtain first RGB image data, and transmit the first RGB image data to the color space conversion module; The capture module is used to read the second original image data from the original data display memory space, perform RGB format conversion on the second original image data to obtain second RGB image data, and transmit the second RGB image data to the color space conversion module; the first original image data and the second original image data are adjacent frames; The color space conversion module is used to synchronously perform color space conversion on the first RGB image data and the second RGB image data to obtain first YUV data and second YUV data, wherein the first YUV data corresponds to the first RGB image data, and the second YUV data corresponds to the second RGB image data; The first YUV data and the second YUV data are input into the video compression device to perform video compression.

15. A baseboard management controller, characterized in that: include: The BMC video compression device as claimed in claim 13, or the BMC video compression system as claimed in claim 14.

16. A server, characterized in that: include: The baseboard management controller of claim 15.

17. A method for reading video compression data, characterized in that: include: receiving compressed video data transmitted by the BMC video compression device according to claim 13, wherein the compressed video data comprises the first compressed data and the second compressed data read alternately; Data recovery is performed based on the first compressed data and the second compressed data to obtain complete video data.

18. A monitoring device, characterized in that: include: A data receiving module, configured to receive compressed video data transmitted by the BMC video compression device according to claim 13, wherein the compressed video data includes the first compressed data and the second compressed data read alternately; A data analysis module is used to perform data recovery based on the first compressed data and the second compressed data to obtain complete video data.

19. The monitoring device according to claim 18, characterized in that Also includes: The display module is used to display the complete video data.

20. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the BMC video compression method according to any one of claims 1 to 12 is implemented.

21. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the BMC video compression method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Video compression method, decompression method, compression device and decompression device

    CN105681798A

  • Video compression method, device and equipment and computer readable storage medium

    CN113079379A

  • Display system and method for refreshing electronic ink display screen

    CN113867677A

  • Video data transmission method, video data decoding method and related devices

    CN113873255A

  • Video compression method and system, storage medium and equipment

    CN114125463A