Video compression method, system, storage medium and electronic device

By performing consistency checksum processing on video data, the processing of duplicate data is reduced, and the problem of low video compression efficiency is solved, and more efficient video compression and storage is achieved.

CN119583817BActive Publication Date: 2025-05-20SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510116787.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-20
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

In the prior art, video compression efficiency is low, mainly due to the large amount of duplicate data between adjacent rows inside the data block, which requires multiple color space conversion and format conversion, which increases the computing burden and storage requirements.

Method used

By acquiring the first color channel data of the original video data, performing consistency verification to obtain the verification data, processing the first color channel data according to the verification data to generate the second color channel data, and performing color space conversion and compression processing to generate the video compressed data.

Benefits of technology

By reducing the processing and transmission of duplicate data, the efficiency of video compression is improved, the memory usage and video frame loss rate are reduced, and the display quality and user experience are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583817B_ABST
    Figure CN119583817B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a video compression method, system, storage medium and electronic device, which are applied to a substrate management control chip, including: obtaining the first color channel data of the original video data, wherein the first color channel data includes multiple sub-data, the original video data has multiple rows of pixels, the first color channel data represents the color information of each pixel in the original video data, and each sub-data represents the color information of a row of pixels; performing consistency check on the multiple sub-data of the first color channel data to obtain check data; processing the first color channel data according to the check data to obtain the second color channel data; performing color space conversion processing on the second color channel data to obtain the first brightness and color data; compressing the first brightness and color data to obtain video compression data, and writing the video compression data into the memory space of the memory. The problem of low video compression efficiency in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of video transmission. Specifically, the embodiments of the present application relate to a video compression method, system, storage medium, and electronic device. Background Art

[0002] Currently, when the baseboard management control chip of a server compresses a video, a large amount of storage space is required to cache data in the form of data blocks. There is a large amount of duplicate data between adjacent rows inside the data blocks. In traditional solutions, a large number of processing operations such as color space conversion and format conversion are required for the large amount of duplicate data. As a result, there are a large number of duplicate operations in the video compression process, leading to low video compression efficiency.

[0003] Therefore, in the related art, there is a problem of low video compression efficiency.

[0004] In view of the problem of low video compression efficiency in the related art, no effective solution has been proposed yet. Summary of the Invention

[0005] The embodiments of the present application provide a video compression method, system, storage medium, and electronic device to at least solve the problem of low video compression efficiency in the related art.

[0006] According to an embodiment of the present application, a video compression method applied to a baseboard management control chip includes: obtaining first color channel data of original video data, where the first color channel data includes a plurality of sub-data, the original video data has multiple rows of pixel points, the first color channel data represents the color information of each pixel point in the original video data, and each sub-data represents the color information of a row of pixel points; performing consistency check on the plurality of sub-data of the first color channel data to obtain check data; processing the first color channel data according to the check data to obtain second color channel data; performing color space conversion processing on the second color channel data to obtain first luminance-chrominance data; performing compression processing on the first luminance-chrominance data to obtain video compression data, and writing the video compression data into the memory space of a memory.

[0007] In an exemplary embodiment, the baseboard management control chip includes a video graphics array module and a data capture module. The video graphics array module is connected to the video interface of the server host. There is a first connection channel between the video graphics array module and the video memory space of the memory. The video graphics array module is configured to receive the original video data sent by the server host, write the original video data into the video memory space of the memory, and read the original video data from the video memory space of the memory. The data capture module is configured to obtain the first color channel data and perform consistency verification on multiple sub-data of the first color channel data. Obtaining the first color channel data of the original video includes: reading the original video data from the video memory space of the memory through the video graphics array module based on the first connection channel; transmitting the original video data to the data capture module so that the data capture module obtains the first color channel data of the original video.

[0008] In an exemplary embodiment, the data capture module includes a parallel capture sub-module. There is a second connection channel between the data capture module and the video memory space of the memory. The parallel capture sub-module is configured to obtain the first color channel data. The method further includes: obtaining the first color channel data of the original video through the parallel capture sub-module, including: respectively using different acquisition methods through the parallel capture sub-module to parallelly acquire the first original data, the second original data, and the third original data in the original video data; determining the first color channel data according to the first original data, the second original data, and the third original data, where the first color channel data includes a first sub-data, a second sub-data, and a third sub-data, the first sub-data represents the color information of the first original data, the second sub-data represents the color information of the second original data, and the third sub-data represents the color information of the third original data.

[0009] In an exemplary embodiment, the respectively using different acquisition methods to acquire the first original data, the second original data, and the third original data from the original video data includes: acquiring the first original data from the video graphics array module through the parallel capture sub-module; listening to the first connection channel through the parallel capture sub-module to obtain the second original data; reading the third original data from the video memory space of the memory through the parallel capture sub-module based on the second connection channel.

[0010] In an exemplary embodiment, the data capture module further includes a parallel comparison sub-module that performs consistency verification on multiple sub-data of the first color channel data to obtain verification data, including: comparing the first sub-data, the second sub-data, and the third sub-data through the parallel comparison sub-module to obtain first verification data, where the first verification data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are all inconsistent; comparing the first sub-data, the second sub-data, and the third sub-data through the parallel comparison sub-module to obtain second verification data, where the second verification data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are all consistent.

[0011] In an exemplary embodiment, performing consistency verification on multiple sub-data of the first color channel data to obtain verification data further includes: comparing the first sub-data and the second sub-data, and comparing the first sub-data and the third sub-data through the parallel comparison sub-module to obtain third verification data, where the third verification data is used to indicate that the first sub-data and the second sub-data are consistent, and the first sub-data and the third sub-data are inconsistent; comparing the first sub-data and the second sub-data, and comparing the first sub-data and the third sub-data through the parallel comparison sub-module to obtain fourth verification data, where the fourth verification data is used to indicate that the first sub-data and the second sub-data are consistent, and the first sub-data and the third sub-data are inconsistent.

[0012] In an exemplary embodiment, performing consistency verification on multiple sub-data of the first color channel data to obtain verification data further includes: comparing the first sub-data and the second sub-data, and comparing the second sub-data and the third sub-data through the parallel comparison sub-module to obtain fifth verification data, where the fifth verification data is used to indicate that the first sub-data and the second sub-data are inconsistent, and the second sub-data and the third sub-data are consistent.

[0013] In an exemplary embodiment, performing consistency comparison on multiple sub-data of the first color channel data to obtain verification data further includes: comparing the first sub-data and the third sub-data through the parallel comparison sub-module to obtain sixth verification data, where the sixth verification data is used to indicate that the first sub-data and the third sub-data are consistent; comparing the first sub-data and the third sub-data through the parallel comparison sub-module to obtain seventh verification data, where the seventh verification data is used to indicate that the first sub-data and the third sub-data are inconsistent.

[0014] In an exemplary embodiment, the first sub-data, the second sub-data, and the third sub-data all include the same number of pixel points. By using the parallel comparison sub-module to compare the first sub-data, the second sub-data, and the third sub-data, first check data is obtained, including: using the parallel comparison sub-module to respectively compare whether the values of each pixel point in the first sub-data and the values of the corresponding pixel points in the second sub-data are all consistent to obtain a first comparison result; using the parallel comparison sub-module to respectively compare whether the values of each pixel point in the first sub-data and the values of the corresponding pixel points in the third sub-data are all consistent to obtain a second comparison result; using the parallel comparison sub-module to respectively compare whether the values of each pixel point in the second sub-data and the values of the corresponding pixel points in the third sub-data are all consistent to obtain a third comparison result; and generating the first check data when it is determined that the first comparison result is inconsistent, the second comparison result is inconsistent, and the third comparison result is inconsistent.

[0015] In an exemplary embodiment, processing the first color channel data according to the check data to obtain second color channel data includes: when it is determined that the check data is the first check data, retaining the first sub-data, the second sub-data, and the third sub-data of the first color channel data; when it is determined that the check data is the second check data, retaining the first sub-data and the third sub-data of the first color channel data and deleting the second sub-data of the first color channel data; when it is determined that the check data is the third check data, retaining the first sub-data and the second sub-data of the first color channel data and deleting the third sub-data of the first color channel data; when it is determined that the check data is the fourth check data, retaining the second sub-data and the third sub-data of the first color channel data and deleting the first sub-data of the first color channel data; when it is determined that the check data is the fifth check data, retaining the first sub-data of the first color channel data and deleting the second sub-data and the third sub-data of the first color channel data; when it is determined that the check data is the sixth check data, retaining the first sub-data of the first color channel data and deleting the third sub-data of the first color channel data; when it is determined that the check data is the seventh check data, retaining the first sub-data and the third sub-data of the first color channel data; and determining the retained sub-data in the first color channel data as the second color channel data.

[0016] In an exemplary embodiment, compression processing is performed on the first luminance-chrominance data to obtain video compression data, including: converting the first luminance-chrominance data into second luminance-chrominance data based on the check data; performing compression processing on the second luminance-chrominance data to obtain the video compression data.

[0017] In an exemplary embodiment, the baseboard management control chip further includes a color space conversion module and a data block generation module. Converting the first luminance-chrominance data into second luminance-chrominance data based on the check data includes: transmitting the check data and the first luminance-chrominance data from the color space conversion module to the data block generation module; reading the luminance-chrominance values of multiple pixel points from the first luminance-chrominance data by the data block generation module according to the check data; arranging the luminance-chrominance values of the multiple pixel points in a data block format to obtain the second luminance-chrominance data.

[0018] In an exemplary embodiment, the baseboard management control chip further includes a data compression module. Performing compression processing on the second luminance-chrominance data to obtain the video compression data includes: transmitting the second luminance-chrominance data from the data block generation module to the data compression module; encoding the second luminance-chrominance data by the data compression module based on a preset compression algorithm to obtain encoded data; assembling the encoded data into a bitstream by the data compression module to obtain the video compression data.

[0019] In an exemplary embodiment, the baseboard management control chip further includes a data capture module and a color space conversion module. The color space conversion module is used to perform data format conversion on color channel data and convert the second color channel data into first luminance-chrominance data, including: transmitting the check data and the second color channel data from the data capture module to the color space conversion module; converting the second color channel data into the first luminance-chrominance data by the color space conversion module, where the conversion formula is as follows:

[0020] Y = 0.257R + 0.504G + 0.098B + 16;

[0021] U = 0.148R – 0.291G + 0.439B + 128;

[0022] V = 0.439R - 0.368G - 0.071B + 128;

[0023] Wherein, R represents the value of the red channel in the color channel data, G represents the value of the green channel in the color channel data, B represents the value of the blue channel in the color channel data, Y represents the value of the luminance in the luminance chrominance data, U represents the value of the blue chrominance in the luminance chrominance data, and V represents the value of the red chrominance in the luminance chrominance data.

[0024] In an exemplary embodiment, the baseboard management control chip further includes a data output module. There is a third connection channel between the data output module and the memory space of the memory. Writing the video compression data into the memory space of the memory includes: transmitting the video compression data from the data compression module to the data output module; writing the video compression data into the memory space of the memory through the data output module based on the third connection channel; writing the video compression data into the memory space of the memory in the format of a bit stream through the third connection channel.

[0025] According to another embodiment of the present application, a video compression system is provided, which at least includes a baseboard management control chip, and the baseboard management control chip is used to execute the steps in any one of the above method embodiments.

[0026] In an exemplary embodiment, the video compression system further includes a server host and a memory. The baseboard management control chip includes a video graphics array module and a data capture module. The video graphics array module is connected to the peripheral interface of the server host. There is a first connection channel between the video graphics array module and the video memory space of the memory. The video graphics array module is used to receive the original video data sent by the server host, write the original video data into the video memory space of the memory, and the video graphics array module is further used to read the original video data from the video memory space of the memory based on the first connection channel and transmit the original video data to the data capture module, so that the data capture module can obtain the first color channel data of the original video.

[0027] According to still another embodiment of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, wherein the computer program is set to execute the steps in any one of the above method embodiments when running.

[0028] According to still another embodiment of the present application, an electronic device is further provided, which includes a memory and a processor. A computer program is stored in the memory, and the processor is set to run the computer program to execute the steps in any one of the above method embodiments.

[0029] According to another embodiment of the present application, a computer program product is further provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0030] Through the present application, after obtaining the first color channel data of the original video data, consistency verification can be performed on the first color channel data to obtain verification data, the first color channel data can be processed into second color channel data according to the verification data, color space conversion processing is performed on the second color channel data to obtain first luminance chrominance data, and the compressed data obtained after compressing the first luminance chrominance data is written into the memory space of the memory. Therefore, the problem of low video compression efficiency in the related art can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a hardware structure block diagram of a server device for a video compression method according to an embodiment of the present application;

[0032] Figure 2 is a flowchart of a video compression method according to an embodiment of the present application;

[0033] Figure 3 is a schematic diagram of a video compression method according to an embodiment of the present application;

[0034] Figure 4 is a structure block diagram of a video compression system according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0035] The embodiments of the present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0036] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.

[0037] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 is a hardware structure block diagram of a server device for a video compression method according to an embodiment of the present application. As Figure 1 shown, the server device may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand, Figure 1The structure shown is only schematic and does not limit the structure of the above server device. For example, the server device may further include more or fewer components than those shown in Figure 1 or have a different configuration from that shown in Figure 1 .

[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the video compression method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above video compression method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the server device through a network. Examples of the above network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0040] In this embodiment, a video compression method is provided. Figure 2 is a flowchart of the video compression method according to the embodiments of the present application, as shown in Figure 2 . The process includes the following steps:

[0041] Step S202, obtain the first color channel data of the original video data, where the first color channel data includes a plurality of sub-data, the original video data has multiple rows of pixel points, the first color channel data represents the color information of each pixel point in the original video data, and each sub-data represents the color information of a row of pixel points;

[0042] It should be noted that in the above step S202, the video consists of a series of consecutive image frames, and each frame of the image includes a plurality of pixel points, specifically depending on the video resolution. For example, if the resolution is 1920*1200, then each frame of the image has 1920×1200 = 2,304,000 pixel points. In the process of image processing, the image is usually divided into a data block format of 8*8 or 16*16. The above-mentioned original video data refers to the data in a data block. For example, a data block of 8*8 has pixel points arranged in 8 rows and 8 columns. Then, the first color channel data extracted from the original video data is also an 8*8 data block. The color channel data is RGB data, where R corresponds to the red channel, G corresponds to the green channel, and B corresponds to the blue channel.

[0043] Step S204: Perform consistency check on multiple sub-data of the first color channel data to obtain check data;

[0044] Optionally, in the above step S204, for example, if the first color channel data is an 8*8 data block, then there are a total of 8 rows of pixel color information. The color information of each row of pixel points is equivalent to a sub-data, and there are a total of 8 sub-data. Performing consistency check on multiple sub-data means comparing whether the color information of multiple rows of pixel points is the same. For example, comparing the color information of the first row of pixel points, the color information of the second row of pixel points, and the color information of the third row of pixel points to see if they are consistent.

[0045] Step S206: Process the first color channel data according to the check data to obtain second color channel data;

[0046] Step S208: Perform color space conversion processing on the second color channel data to obtain first luminance-chrominance data;

[0047] Step S210: Perform compression processing on the first luminance-chrominance data to obtain video compression data, and write the video compression data into the memory space of the memory.

[0048] Through the above steps, after obtaining the first color channel data of the original video data, consistency check can be performed on the first color channel data to obtain check data. According to the check data, the first color channel data is processed into second color channel data. Color space conversion processing is performed on the second color channel data to obtain first luminance-chrominance data, and the compression data obtained after compression processing of the first luminance-chrominance data is written into the memory space of the memory. Therefore, the problem of low video compression efficiency in the related art can be solved.

[0049] In an exemplary embodiment, the baseboard management control chip includes a video graphics array module and a data capture module. The video graphics array module is connected to the video interface of the server host. There is a first connection channel between the video graphics array module and the video memory space of the memory. The video graphics array module is configured to receive the original video data sent by the server host, write the original video data into the video memory space of the memory, and read the original video data from the video memory space of the memory. The data capture module is configured to obtain the first color channel data and perform consistency verification on multiple sub-data of the first color channel data. Obtaining the first color channel data of the original video includes: reading the original video data from the video memory space of the memory through the video graphics array module based on the first connection channel; transmitting the original video data to the data capture module so that the data capture module obtains the first color channel data of the original video.

[0050] Optionally, in the above embodiment, the baseboard management control chip may be connected to the VGA (Video Graphics Array) interface (equivalent to the video interface) of the server host. The baseboard management control chip may be connected to the memory through a PCIE (Peripheral Component Interconnect Express) interface. The memory includes a DDR memory. For example, the video data of the server host is transmitted to the video graphics array module of the baseboard management control chip through the VGA interface, and then written to the video memory space in the DDR for caching through the PCIE interface. When video data needs to be processed, the video graphics array module of the baseboard management control chip reads the data in the video memory space.

[0051] In an exemplary embodiment, the data capture module includes a parallel capture sub-module. There is a second connection channel between the data capture module and the video memory space of the memory. The parallel capture sub-module is configured to obtain the first color channel data. The method further includes: obtaining the first color channel data of the original video through the parallel capture sub-module, including: respectively using different acquisition methods through the parallel capture sub-module to parallelly acquire the first original data, the second original data, and the third original data in the original video data; determining the first color channel data according to the first original data, the second original data, and the third original data. Wherein, the first color channel data includes a first sub-data, a second sub-data, and a third sub-data. The first sub-data represents the color information of the first original data, the second sub-data represents the color information of the second original data, and the third sub-data represents the color information of the third original data.

[0052] In an exemplary embodiment, the obtaining of the first original data, the second original data, and the third original data from the original video data by using different obtaining methods respectively includes: obtaining the first original data from the video graphics array module through the parallel capture sub-module; listening to the first connection channel through the parallel capture sub-module to obtain the second original data; and reading the third original data from the video memory space of the memory based on the second connection channel through the parallel capture sub-module.

[0053] Optionally, in the above embodiment, there are three ways for the data capture module to obtain the original video data:

[0054] DVI (Digital Visual Interface, a digital video interface standard) mode, by receiving the data output from the DVI interface of the video graphics array module.

[0055] Listening mode, by collecting the data of the R channel of the AXI (Advanced eXtensible Interface, a serial bus protocol widely used in system-on-chip, and AXI has four main channels: read address R channel, write address W channel, read data R channel, and write data W channel) data read by the video graphics array module from the DDR memory.

[0056] Active acquisition mode, actively reading the data in the video memory of the DDR memory.

[0057] In the traditional solution, one of the three capture modes is adopted according to the register configuration issued by the user. In the present application, the above three modes can be simultaneously and parallelly executed through the parallel capture sub-module. For example, for an 8×8 data block in the original video data, there are a total of 8 rows of pixel points. Taking three rows as a group, three capture channels are controlled, and each capture channel captures the RGB data of 1 row of pixel points. For example, in one capture: reading the RGB data of the 0th row of pixel points through the DVI mode, reading the RGB data of the 1st row of pixel points through the listening mode, and reading the RGB data of the 3rd row of pixel points through the active acquisition mode.

[0058] Optionally, in the above embodiments, if the video compression format configured by the user is YUV444 and the corresponding data block size is 8*8, the capture process is as follows: In DVI mode, the RGB data of the pixel points in the 0th, 3rd, and 6th rows are read; in listening mode, the RGB data of the pixel points in the 1st, 4th, and 7th rows are read; in active acquisition mode, the RGB data of the pixel points in the 2nd and 5th rows are read. If the video compression format configured by the user is YUV420 and the corresponding data block size is 16, the capture process is as follows: In DVI mode, the RGB data of the pixel points in the 0th, 3rd, 6th, 9th, 12th, and 15th rows are read; in listening mode, the RGB data of the pixel points in the 1st, 4th, 7th, 10th, and 13th rows are read; in active acquisition mode, the RGB data of the pixel points in the 2nd, 5th, 8th, 11th, and 14th rows are read.

[0059] It should be noted that the process of the above data capture module obtaining the RGB data (the first color channel data) of the original video data is only described for the case of one data block. In actual applications, the original video data can be divided into multiple data blocks. In the case of including multiple data blocks, the process of the above embodiments can be repeated until the RGB data of all data blocks in the original video are obtained.

[0060] Through the above embodiments, video data can be acquired in parallel, greatly improving the video data reading efficiency and accelerating the video compression processing flow.

[0061] In an exemplary embodiment, the method further includes: The data capture module further includes a parallel comparison sub-module for performing consistency verification on multiple sub-data of the first color channel data to obtain verification data, including: Comparing the first sub-data, the second sub-data, and the third sub-data through the parallel comparison sub-module to obtain first verification data, where the first verification data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are all inconsistent; Comparing the first sub-data, the second sub-data, and the third sub-data through the parallel comparison sub-module to obtain second verification data, where the second verification data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are all consistent.

[0062] In an exemplary embodiment, performing consistency verification on multiple sub-data of the first color channel data to obtain verification data further includes: comparing the first sub-data with the second sub-data and comparing the first sub-data with the third sub-data by the parallel comparison sub-module to obtain third verification data, where the third verification data is used to indicate that the first sub-data and the second sub-data are consistent and the first sub-data and the third sub-data are inconsistent; comparing the first sub-data with the second sub-data and comparing the first sub-data with the third sub-data by the parallel comparison sub-module to obtain fourth verification data, where the fourth verification data is used to indicate that the first sub-data and the second sub-data are consistent and the first sub-data and the third sub-data are inconsistent.

[0063] In an exemplary embodiment, performing consistency verification on multiple sub-data of the first color channel data to obtain verification data further includes: comparing the first sub-data with the second sub-data and comparing the second sub-data with the third sub-data by the parallel comparison sub-module to obtain fifth verification data, where the fifth verification data is used to indicate that the first sub-data and the second sub-data are inconsistent and the second sub-data and the third sub-data are consistent.

[0064] In an exemplary embodiment, performing consistency comparison on multiple sub-data of the first color channel data to obtain verification data further includes: comparing the first sub-data with the third sub-data by the parallel comparison sub-module to obtain sixth verification data, where the sixth verification data is used to indicate that the first sub-data and the third sub-data are consistent; comparing the first sub-data with the third sub-data by the parallel comparison sub-module to obtain seventh verification data, where the seventh verification data is used to indicate that the first sub-data and the third sub-data are inconsistent.

[0065] Optionally, in the above embodiment, the verification data can be represented by an indication signal with a 24-bit width. For example, the verification data is defined as:

[0066] comp_signal={12’h kind_signal, 4’h block_line_num, 4’h 1OR2OR3, 4’hresult};

[0067] Among them, 12’h kind_signal represents the compression format:

[0068] 12’h kind_signal = 12’h FAA indicates that it is verification data in the YUV444 format;

[0069] 12’h kind_signal = 12’h FBB indicates that it is the verification data in the YUV420 format.

[0070] Among them, 4’h block_line_num represents the smallest row number within the current comparison size (data block of 8*8 or 16*16 size):

[0071] When the compression format is YUV420, for the data block of 16*16 size, for example:

[0072] If the 0th, 1st, and 2nd rows are compared, then block_Line_num = 0;

[0073] If the 9th, 10th, and 11th rows are compared, then block_Line_num = 9.

[0074] When the compression format is YUV444, for the data block of 8*8 size, for example:

[0075] If the 3rd, 4th, and 5th rows are compared, then block_Line_num = 3;

[0076] If the 6th and 7th rows are compared, then block_Line_num = 6.

[0077] Among them, 4’h 1OR2OR3 represents the number of rows for comparison:

[0078] 4’h 1OR2OR3 = 4’b0001 indicates that the parallel comparison size is 1 row, that is, there is no comparison. Since this solution compares every 3 rows of data, for the data block of 16*16 size, among them, the 0th, 1st, and 2nd rows are compared, the 3rd, 4th, and 5th rows are compared, the 6th, 7th, and 8th rows are compared, the 9th, 10th, and 11th rows are compared, the 12th, 13th, and 14th rows are compared, then the remaining 15th row is a single row and not compared.

[0079] 4’h 1OR2OR3 = 4’b0010 indicates that the parallel comparison size is 2 rows. For the data block of 8*8 size, among them, the 0th, 1st, and 2nd rows are compared, the 3rd, 4th, and 5th rows are compared, then the remaining 6th and 7th rows are compared with each other.

[0080] 4’h 1OR2OR3 = 4’b0011 indicates that the parallel comparison size is 3 rows, that is, normally three rows of data are read from the data block for comparison.

[0081] Among them, 4’h result represents the result of parallel comparison:

[0082] 4’h result = 4’b0001 (equivalent to the first check data), indicating that the comparison size = 3 and the 3 rows of data are all different;

[0083] 4’h result = 4’b0010 (equivalent to the second check data), indicating that the comparison size = 3 and the 3 rows of data are all the same;

[0084] 4’h result = 4’b0011 (equivalent to the third check data), indicating that the comparison size = 3, the 0th row is the same as the 1st row, and the 0th row is different from the 2nd row;

[0085] 4’h result = 4’b0100 (equivalent to the fourth check data), indicating that the comparison size = 3, the 0th row is different from the 1st row, and the 0th row is the same as the 2nd row;

[0086] 4’h result = 4’b0101 (equivalent to the fifth check data), indicating that the comparison size = 3, the 0th row is different from the 1st row, and the 1st row is the same as the 2nd row;

[0087] 4’h result = 4’b0110 (equivalent to the sixth check data), indicating that the comparison size = 2 and the 2 rows of data are all the same;

[0088] 4’h result = 4’b0111 (equivalent to the seventh check data), indicating that the comparison size = 2 and the 2 rows of data are all different.

[0089] In an exemplary embodiment, the first sub-data, the second sub-data, and the third sub-data all include the same number of pixel points. The first check data is obtained by comparing the first sub-data, the second sub-data, and the third sub-data through the parallel comparison sub-module, including: respectively comparing, through the parallel comparison sub-module, whether the values of each pixel point in the first sub-data are all consistent with the values of the corresponding pixel points in the second sub-data to obtain a first comparison result; respectively comparing, through the parallel comparison sub-module, whether the values of each pixel point in the first sub-data are all consistent with the values of the corresponding pixel points in the third sub-data to obtain a second comparison result; respectively comparing, through the parallel comparison sub-module, whether the values of each pixel point in the second sub-data are all consistent with the values of the corresponding pixel points in the third sub-data to obtain a third comparison result; and generating the first check data when it is determined that the first comparison result is inconsistent, the second comparison result is inconsistent, and the third comparison result is inconsistent.

[0090] Optionally, in the above embodiments, for example, the RGB data of the 0th row of pixels (equivalent to the first sub-data), the RGB data of the 1st row of pixels (equivalent to the second sub-data), and the RGB data of the 2nd row (equivalent to the third sub-data) are obtained in parallel from an 8*8 data block. Then, the above three rows of RGB data are compared. The specific comparison content includes the RGB values of each pixel. The pixel comparison needs to be carried out in order. For example, the 0th pixel of the 0th row of pixels is compared with the 0th pixel of the 1st row of pixels and the 0th pixel of the 2nd row of pixels respectively. The 1st pixel of the 0th row of pixels is compared with the 1st pixel of the 1st row of pixels and the 1st pixel of the 2nd row of pixels respectively, and so on. Only when the comparison results of each pixel are the same are the two sub-data considered the same.

[0091] In an exemplary embodiment, processing the first color channel data according to the check data to obtain second color channel data includes: when it is determined that the check data is the first check data, retaining the first sub-data, the second sub-data, and the third sub-data of the first color channel data; when it is determined that the check data is the second check data, retaining the first sub-data and the third sub-data of the first color channel data and deleting the second sub-data of the first color channel data; when it is determined that the check data is the third check data, retaining the first sub-data and the second sub-data of the first color channel data and deleting the third sub-data of the first color channel data; when it is determined that the check data is the fourth check data, retaining the second sub-data and the third sub-data of the first color channel data and deleting the first sub-data of the first color channel data; when it is determined that the check data is the fifth check data, retaining the first sub-data of the first color channel data and deleting the second sub-data and the third sub-data of the first color channel data; when it is determined that the check data is the sixth check data, retaining the first sub-data of the first color channel data and deleting the third sub-data of the first color channel data; when it is determined that the check data is the seventh check data, retaining the first sub-data and the third sub-data of the first color channel data; and determining the sub-data retained in the first color channel data as the second color channel data.

[0092] Optionally, in the above embodiments, after performing consistency check on multiple sub-data of the first color channel data, for duplicate data, there is no need to transmit it, while the check data needs to be transmitted to the color space conversion module together with the color channel data. For example:

[0093] For the YUV420 format, the current comparison size is 3 rows of pixel points, where the 0th and 1st rows are the same, and the 0th and 2nd rows are different. At this time, only the check data comp_signal, the 0th row data, and the 2nd row data are transmitted.

[0094] For the YUV444 mode, the current comparison size is 2 rows of pixel points, and the two rows are the same. At this time, the check data comp_signal and the 0th row data are transmitted.

[0095] Since there are many operating system interfaces in the picture of the server host, there are a large number of duplicate data between adjacent rows (16 pixel points or 8 pixel points) within a data block. Through the processing flow of the above embodiments, the screening of duplicate data within the data block and the generation of check data are realized, saving a large amount of transmission and subsequent processing of duplicate data. Through practice and comparison, the solution of this application can reduce the processing and transmission of duplicate data by 50%.

[0096] In an exemplary embodiment, the first luminance-chrominance data is compressed to obtain video compression data, including: converting the first luminance-chrominance data into second luminance-chrominance data based on the check data; compressing the second luminance-chrominance data to obtain the video compression data.

[0097] In an exemplary embodiment, the baseboard management control chip further includes a color space conversion module and a data block generation module. Converting the first luminance-chrominance data into second luminance-chrominance data based on the check data includes: transmitting the check data and the first luminance-chrominance data from the color space conversion module to the data block generation module; reading the luminance-chrominance values of multiple pixel points from the first luminance-chrominance data by the data block generation module according to the check data; arranging the luminance-chrominance values of the multiple pixel points in a data block format to obtain the second luminance-chrominance data.

[0098] Optionally, in the above embodiment, the first luminance-chrominance data has duplicate data deleted, so it is necessary to first restore the first luminance-chrominance data through the check data to obtain a complete YUV format data block (equivalent to the second luminance-chrominance data), as Figure 3 shown, the grid on the left is equivalent to multiple complete data blocks ( Figure 3 the block in), each data block has a size of 8*8 or 16*16 pixel points, and the video data can be divided into multiple data blocks in the above manner. According to the luminance, red chrominance, and blue chrominance of the pixel points, it can be divided into 3 components: Y, U, and V.

[0099] Among them, for multiple rows of pixel points in the left video data, in the YUV420 format, all Y data is written, and the U and V data of even rows and even columns are written. Therefore, in the processed data block format, the height and width of the data block representing the Y component remain unchanged, while the height and width of the data blocks representing the U and V components are both reduced to 1 / 2 of the original. The specific writing method is as follows:

[0100] Write the Y data of the 0 / 16 / 32 / 48...th rows into Y_RAM_0, write the Y data of the 1 / 17 / 33 / 49...th rows into Y_RAM_1,..., write the Y data of the 15 / 31 / 47 / 63...th rows into Y_RAM_15.

[0101] Write the U data of the even columns in the 0 / 16 / 32 / 48...th rows into U_RAM_0, write the U data of the even columns in the 2 / 18 / 34 / 50...th rows into U_RAM_1,..., write the U data of the even columns in the 14 / 30 / 46 / 62...th rows into U_RAM_7.

[0102] Write the V data of the even columns in the 0 / 16 / 32 / 48...th rows into V_RAM_0, write the V data of the even columns in the 2 / 18 / 34 / 50...th rows into V_RAM_1,..., write the V data of the even columns in the 14 / 30 / 46 / 62...th rows into V_RAM_7.

[0103] Among them, Y_RAM_0 represents the 0th pixel point in the data block of the Y component, U_RAM_0 represents the 0th pixel point in the data block of the Y component, V_RAM_0 represents the 0th pixel point in the data block of the V component, Y_RAM_1 represents the 1st pixel point in the data block of the Y component,..., and so on.

[0104] In the YUV420 format, when reading the written data, read Y_RAM_0 16 times, Y_RAM_1 16 times,..., Y_RAM_15 16 times in sequence to obtain a 16*16 Y_BLOCK data, read U_RAM_0 8 times, U_RAM_1 8 times,..., U_RAM_7 8 times in sequence to obtain an 8*8 U_BLOCK data, and read V_RAM_0 8 times, V_RAM_1 8 times,..., V_RAM_7 8 times in sequence to obtain an 8*8 V_BLOCK data.

[0105] In the YUV444 format, all rows and all columns of Y / U / V data need to be written when writing data. Therefore, in the processed data block format, the height and width of the data blocks representing the Y, U, and V components remain unchanged. The specific writing method is as follows:

[0106] Write the Y data of the 0th / 8th / 16th / 24th... row into Y_RAM_0, write the Y data of the 1st / 9th / 17th / 25th... row into Y_RAM_1,..., write the Y data of the 7th / 15th / 23rd / 31st... row into Y_RAM_7.

[0107] Write the U data of the 0th / 8th / 16th / 24th... row into U_RAM_0, write the U data of the 1st / 9th / 17th / 25th... row into U_RAM_1,..., write the U data of the 7th / 15th / 23rd / 31st... row into U_RAM_7.

[0108] Write the V data of the 0th / 8th / 16th / 24th... row into V_RAM_0, write the V data of the 1st / 9th / 17th / 25th... row into V_RAM_1,..., write the V data of the 7th / 15th / 23rd / 31st... row into V_RAM_7.

[0109] In the YUV444 format, when reading the written data, read Y_RAM_0 8 times, Y_RAM_1 8 times,..., Y_RAM_7 8 times in sequence to obtain an 8*8 Y_BLOCK data, read U_RAM_0 8 times, U_RAM_1 8 times,..., U_RAM_7 8 times in sequence to obtain an 8*8 U_BLOCK data, and read V_RAM_0 8 times, V_RAM_1 8 times,..., V_RAM_7 8 times in sequence to obtain an 8*8 V_BLOCK data.

[0110] In an exemplary embodiment, the baseboard management control chip further includes a data compression module for compressing the second luminance-chrominance data to obtain the video compression data, including: transmitting the second luminance-chrominance data from the data block generation module to the data compression module; encoding the second luminance-chrominance data by the data compression module based on a preset compression algorithm to obtain encoded data; and assembling the encoded data into a bitstream by the data compression module to obtain the video compression data.

[0111] In an exemplary embodiment, the baseboard management control chip further includes a data capture module and a color space conversion module. The color space conversion module is used for converting the data format of the color channel data and converting the second color channel data into the first luminance-chrominance data, including: transmitting the verification data and the second color channel data from the data capture module to the color space conversion module; and converting the second color channel data into the first luminance-chrominance data by the color space conversion module, where the conversion formula is as follows:

[0112] Y = 0.257R + 0.504G + 0.098B + 16;

[0113] U = 0.148R – 0.291G + 0.439B + 128;

[0114] V = 0.439R - 0.368G - 0.071B + 128;

[0115] Wherein, R represents the value of the red channel in the color channel data, G represents the value of the green channel in the color channel data, B represents the value of the blue channel in the color channel data, Y represents the value of the luminance in the luminance chrominance data, U represents the value of the blue chrominance in the luminance chrominance data, and V represents the value of the red chrominance in the luminance chrominance data.

[0116] Optionally, in the above embodiment, the color space conversion module further includes a data recognition sub-module for recognizing verification data. The second color channel data can be processed only based on the recognition result of the data recognition sub-module, while the verification data is not processed.

[0117] In an exemplary embodiment, the baseboard management control chip further includes a data output module. The data output module has a third connection channel with the memory space of the memory. Writing the video compression data into the memory space of the memory includes: transmitting the video compression data from the data compression module to the data output module; writing the video compression data into the memory space of the memory through the data output module based on the third connection channel; writing the video compression data into the memory space of the memory in the form of a bit stream through the third connection channel.

[0118] Through the above embodiments, the repeated processing of the same data inside the data block is greatly reduced, the memory resources occupied by the video compression function are reduced, and thus the same data can be correctly transmitted, the video frame loss rate is reduced, the display quality of the remote display end and the user experience are improved, and the overall performance of the baseboard management control chip is enhanced.

[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0120] In this embodiment, a video compression system is further provided. This system is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0121] Figure 4 is a structural block diagram of a video compression system according to an embodiment of the present application. As Figure 4 shown, the system includes:

[0122] A baseboard management control chip 41, configured to obtain the first color channel data of the original video data. Among them, the first color channel data includes a plurality of sub-data. The original video data has multiple rows of pixel points. The first color channel data represents the color information of each pixel point in the original video data, and each sub-data represents the color information of one row of pixel points; perform a consistency check on the multiple sub-data of the first color channel data to obtain check data; process the first color channel data according to the check data to obtain second color channel data; perform a color space conversion process on the second color channel data to obtain first luminance-chrominance data; perform a compression process on the first luminance-chrominance data to obtain video compression data, and write the video compression data into the memory space of the memory.

[0123] Through the above system, after obtaining the first color channel data of the original video data, a consistency check can be performed on the first color channel data to obtain check data, the first color channel data can be processed into second color channel data according to the check data, a color space conversion process can be performed on the second color channel data to obtain first luminance-chrominance data, and the compressed data obtained after performing a compression process on the first luminance-chrominance data can be written into the memory space of the memory. Therefore, the problem of low video compression efficiency in the related art can be solved.

[0124] In an exemplary embodiment, the video compression system further includes a server host 42 and a memory 43. The baseboard management control chip 41 includes a video graphics array module 411 and a data capture module 412. The video graphics array module 411 is connected to the peripheral interface of the server host 42. There is a first connection channel between the video graphics array module 411 and the video memory space 431 of the memory. The video graphics array module 411 is configured to receive the original video data sent by the server host 42, write the original video data into the video memory space 431 of the memory, and the video graphics array module 411 is further configured to read the original video data from the video memory space 431 of the memory based on the first connection channel, and transmit the original video data to the data capture module 412, so that the data capture module 412 can obtain the first color channel data of the original video.

[0125] In an exemplary embodiment, the data capture module 412 includes a parallel capture sub-module 4121. There is a second connection channel between the data capture module 412 and the video memory space 431 of the memory. The parallel capture sub-module 4121 is configured to obtain the first color channel data. The system is further configured to: obtain the first color channel data of the original video through the parallel capture sub-module 4121, including: through the parallel capture sub-module 4121, respectively using different acquisition methods to parallelly acquire the first original data, the second original data, and the third original data in the original video data; determine the first color channel data according to the first original data, the second original data, and the third original data, where the first color channel data includes first sub-data, second sub-data, and third sub-data, the first sub-data represents the color information of the first original data, the second sub-data represents the color information of the second original data, and the third sub-data represents the color information of the third original data.

[0126] In an exemplary embodiment, the system is further configured to: obtain the first original data from the video graphics array module 411 through the parallel capture sub-module 4121; monitor the first connection channel through the parallel capture sub-module 4121 to obtain the second original data; read the third original data from the video memory space 431 of the memory based on the second connection channel through the parallel capture sub-module 4121.

[0127] In an exemplary embodiment, the data capture module 412 further includes a parallel comparison sub-module 4122, and the system is further configured to: compare the first sub-data, the second sub-data, and the third sub-data through the parallel comparison sub-module 4122 to obtain first check data, where the first check data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are all inconsistent; compare the first sub-data, the second sub-data, and the third sub-data through the parallel comparison sub-module 4122 to obtain second check data, where the second check data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are all consistent.

[0128] In an exemplary embodiment, the system is further configured to: compare the first sub-data and the second sub-data, and compare the first sub-data and the third sub-data through the parallel comparison sub-module 4122 to obtain third check data, where the third check data is used to indicate that the first sub-data and the second sub-data are consistent, and the first sub-data and the third sub-data are inconsistent; compare the first sub-data and the second sub-data, and compare the first sub-data and the third sub-data through the parallel comparison sub-module 4122 to obtain fourth check data, where the fourth check data is used to indicate that the first sub-data and the second sub-data are consistent, and the first sub-data and the third sub-data are inconsistent.

[0129] In an exemplary embodiment, the system is further configured to: compare the first sub-data and the second sub-data, and compare the second sub-data and the third sub-data through the parallel comparison sub-module 4122 to obtain fifth check data, where the fifth check data is used to indicate that the first sub-data and the second sub-data are inconsistent, and the second sub-data and the third sub-data are consistent.

[0130] In an exemplary embodiment, the system is further configured to: compare the first sub-data and the third sub-data through the parallel comparison sub-module 4122 to obtain sixth check data, where the sixth check data is used to indicate that the first sub-data and the third sub-data are consistent; compare the first sub-data and the third sub-data through the parallel comparison sub-module 4122 to obtain seventh check data, where the seventh check data is used to indicate that the first sub-data and the third sub-data are inconsistent.

[0131] In an exemplary embodiment, the system is further configured to: respectively compare, by the parallel comparison sub-module 4122, whether the values of each pixel point in the first sub-data are all consistent with the values of the corresponding pixel points in the second sub-data to obtain a first comparison result; respectively compare, by the parallel comparison sub-module 4122, whether the values of each pixel point in the first sub-data are all consistent with the values of the corresponding pixel points in the third sub-data to obtain a second comparison result; respectively compare, by the parallel comparison sub-module 4122, whether the values of each pixel point in the second sub-data are all consistent with the values of the corresponding pixel points in the third sub-data to obtain a third comparison result; and generate the first check data when it is determined that the first comparison result is inconsistent, the second comparison result is inconsistent, and the third comparison result is inconsistent.

[0132] In an exemplary embodiment, the system is further configured to: retain the first sub-data, the second sub-data, and the third sub-data of the first color channel data when it is determined that the check data is the first check data; retain the first sub-data and the third sub-data of the first color channel data and delete the second sub-data of the first color channel data when it is determined that the check data is the second check data; retain the first sub-data and the second sub-data of the first color channel data and delete the third sub-data of the first color channel data when it is determined that the check data is the third check data; retain the second sub-data and the third sub-data of the first color channel data and delete the first sub-data of the first color channel data when it is determined that the check data is the fourth check data; retain the first sub-data of the first color channel data and delete the second sub-data and the third sub-data of the first color channel data when it is determined that the check data is the fifth check data; retain the first sub-data of the first color channel data and delete the third sub-data of the first color channel data when it is determined that the check data is the sixth check data; retain the first sub-data and the third sub-data of the first color channel data; and determine the retained sub-data in the first color channel data as the second color channel data.

[0133] In an exemplary embodiment, the system is further configured to: convert the first luminance-chrominance data into second luminance-chrominance data based on the check data; and perform compression processing on the second luminance-chrominance data to obtain the video compression data.

[0134] In an exemplary embodiment, the baseboard management control chip 41 further includes a color space conversion module 413 and a data block generation module 414. The system is further configured to: transmit the verification data and the first luminance-chrominance data from the color space conversion module 413 to the data block generation module 414; read the luminance-chrominance values of a plurality of pixel points from the first luminance-chrominance data according to the verification data by the data block generation module 414; arrange the luminance-chrominance values of the plurality of pixel points in a data block format to obtain the second luminance-chrominance data.

[0135] In an exemplary embodiment, the baseboard management control chip 41 further includes a data compression module 415. The system is further configured to: transmit the second luminance-chrominance data from the data block generation module 414 to the data compression module 415; encode the second luminance-chrominance data by the data compression module 415 based on a preset compression algorithm to obtain encoded data; assemble the encoded data into a bitstream by the data compression module 415 to obtain the video compression data.

[0136] In an exemplary embodiment, the baseboard management control chip 41 further includes a data capture module 412 and a color space conversion module 413. The color space conversion module 413 is configured to perform data format conversion on color channel data. The system is further configured to: transmit the verification data and the second color channel data from the data capture module 412 to the color space conversion module 413; convert the second color channel data into the first luminance-chrominance data by the color space conversion module 413, where the conversion formulas are as follows: Y = 0.257R + 0.504G + 0.098B + 16; U = 0.148R – 0.291G + 0.439B + 128; V = 0.439R - 0.368G - 0.071B + 128; where R represents the value of the red channel in the color channel data, G represents the value of the green channel in the color channel data, B represents the value of the blue channel in the color channel data, Y represents the value of the luminance in the luminance-chrominance data, U represents the value of the blue chrominance in the luminance-chrominance data, and V represents the value of the red chrominance in the luminance-chrominance data.

[0137] In an exemplary embodiment, the baseboard management control chip 41 further includes a data output module 416. There is a third connection channel between the data output module 416 and the memory space 432 of the memory. The system is further configured to: transmit the video compression data from the data compression module 415 to the data output module 416; write the video compression data into the memory space 432 of the memory through the data output module 416 based on the third connection channel, and write the video compression data into the memory space 432 of the memory in the form of a bitstream through the third connection channel.

[0138] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited thereto: the above-mentioned modules are all located in the same processor; or, the above-mentioned various modules are separately located in different processors in any combination form.

[0139] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0140] Optionally, in this embodiment, the above storage medium can be configured to store program codes for executing the following steps:

[0141] S1, obtain the first color channel data of the original video data. Wherein, the first color channel data includes a plurality of sub-data. The original video data has multiple rows of pixel points. The first color channel data represents the color information of each pixel point in the original video data, and each sub-data represents the color information of one row of pixel points;

[0142] S2, perform consistency check on the multiple sub-data of the first color channel data to obtain check data;

[0143] S3, process the first color channel data according to the check data to obtain second color channel data;

[0144] S4, perform color space conversion processing on the second color channel data to obtain first luminance-chrominance data;

[0145] S5, perform compression processing on the first luminance-chrominance data to obtain video compression data, and write the video compression data into the memory space of the memory.

[0146] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), external hard drives, magnetic disks, or optical discs that can store computer programs.

[0147] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0148] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:

[0149] S1. Obtain the first color channel data of the original video data. Among them, the first color channel data includes multiple sub-data. The original video data has multiple rows of pixel points. The first color channel data represents the color information of each pixel point in the original video data, and each sub-data represents the color information of one row of pixel points;

[0150] S2. Perform consistency check on multiple sub-data of the first color channel data to obtain check data;

[0151] S3. Process the first color channel data according to the check data to obtain second color channel data;

[0152] S4. Perform color space conversion processing on the second color channel data to obtain first luminance-chrominance data;

[0153] S5. Perform compression processing on the first luminance-chrominance data to obtain video compression data, and write the video compression data into the memory space of the memory.

[0154] An embodiment of the present application further provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above method embodiments.

[0155] Optionally, in this embodiment, the above computer program may be configured to execute the following steps through a computer program:

[0156] S1. Obtain the first color channel data of the original video data. Among them, the first color channel data includes multiple sub-data. The original video data has multiple rows of pixel points. The first color channel data represents the color information of each pixel point in the original video data, and each sub-data represents the color information of one row of pixel points;

[0157] S2. Perform consistency verification on multiple sub-data of the first color channel data to obtain verification data;

[0158] S3. Process the first color channel data according to the verification data to obtain second color channel data;

[0159] S4. Perform color space conversion processing on the second color channel data to obtain first luminance chrominance data;

[0160] S5. Perform compression processing on the first luminance chrominance data to obtain video compression data, and write the video compression data into the memory space of the memory.

[0161] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be elaborated herein.

[0162] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0163] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included in the protection scope of the present application.

Claims

1. A video compression method, characterized in that: Applied to baseboard management control chips, including: Acquire first color channel data of original video data, wherein the first color channel data includes a plurality of sub-data, the original video data has a plurality of rows of pixels, the first color channel data represents color information of each pixel in the original video data, and each sub-data represents color information of a row of pixels; Performing consistency check on the plurality of sub-data of the first color channel data to obtain check data; Processing the first color channel data according to the verification data to obtain second color channel data; Performing color space conversion processing on the second color channel data to obtain first brightness and chromaticity data; The first brightness and color data are compressed to obtain video compression data, and the video compression data is written into the memory space of the memory.

2. The method according to claim 1, characterized in that The baseboard management control chip includes a video graphics array module and a data capture module. The video graphics array module is connected to the video interface of the server host. There is a first connection channel between the video graphics array module and the video memory space of the memory. The video graphics array module is used to receive the original video data sent by the server host, write the original video data into the video memory space of the memory, and read the original video data from the video memory space of the memory. The data capture module is used to obtain the first color channel data and perform consistency check on multiple sub-data of the first color channel data to obtain the first color channel data of the original video, including: Reading the original video data from the video memory space of the memory based on the first connection channel through the video graphics array module; The original video data is transmitted to the data capture module, so that the data capture module acquires the first color channel data of the original video.

3. The method according to claim 2, characterized in that The data capture module includes a parallel capture submodule, the data capture module has a second connection channel with the display memory space of the memory, the parallel capture submodule is used to obtain the first color channel data, and the method further includes: Acquiring the first color channel data of the original video through the parallel capture submodule includes: The parallel capture submodule uses different acquisition modes to acquire the first original data, the second original data, and the third original data in the original video data in parallel respectively; The first color channel data is determined according to the first original data, the second original data, and the third original data, wherein the first color channel data includes first sub-data, second sub-data, and third sub-data, the first sub-data represents color information of the first original data, the second sub-data represents color information of the second original data, and the third sub-data represents color information of the third original data.

4. The method according to claim 3, characterized in that The obtaining the first original data, the second original data, and the third original data from the original video data using different obtaining methods respectively includes: Acquire the first raw data from the video graphics array module through the parallel capture submodule; The first connection channel is monitored by the parallel capture submodule to obtain the second original data; The third original data is read from the display memory space of the memory based on the second connection channel through the parallel capture submodule.

5. The method according to claim 3, characterized in that: The data capture module further includes a parallel comparison submodule, which performs consistency verification on a plurality of sub-data of the first color channel data to obtain verification data, including: The first sub-data, the second sub-data, and the third sub-data are compared by the parallel comparison submodule to obtain first verification data, wherein the first verification data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are inconsistent; The first sub-data, the second sub-data, and the third sub-data are compared by the parallel comparison submodule to obtain second verification data, wherein the second verification data is used to indicate that the first sub-data, the second sub-data, and the third sub-data are consistent.

6. The method according to claim 5, characterized in that Performing consistency check on the plurality of sub-data of the first color channel data to obtain check data, further comprising: Comparing the first sub-data and the second sub-data, and comparing the first sub-data and the third sub-data by the parallel comparison submodule to obtain third verification data, wherein the third verification data is used to indicate that the first sub-data and the second sub-data are consistent, and the first sub-data and the third sub-data are inconsistent; The first sub-data and the second sub-data are compared with each other, and the first sub-data and the third sub-data are compared with each other through the parallel comparison submodule to obtain fourth verification data, wherein the fourth verification data is used to indicate that the first sub-data and the second sub-data are consistent, and the first sub-data and the third sub-data are inconsistent.

7. The method according to claim 6, characterized in that Performing consistency check on the plurality of sub-data of the first color channel data to obtain check data, further comprising: The first sub-data and the second sub-data are compared with each other, and the second sub-data and the third sub-data are compared with each other through the parallel comparison submodule to obtain fifth verification data, wherein the fifth verification data is used to indicate that the first sub-data and the second sub-data are inconsistent, and the second sub-data and the third sub-data are consistent.

8. The method according to claim 7, characterized in that Comparing the consistency of the plurality of sub-data of the first color channel data to obtain verification data, further comprising: The first sub-data and the third sub-data are compared by the parallel comparison submodule to obtain sixth verification data, wherein the sixth verification data is used to indicate that the first sub-data and the third sub-data are consistent; The first sub-data and the third sub-data are compared by the parallel comparison submodule to obtain seventh verification data, wherein the seventh verification data is used to indicate that the first sub-data and the third sub-data are inconsistent.

9. The method according to claim 5, characterized in that The first sub-data, the second sub-data, and the third sub-data all include the same number of pixels, and the first sub-data, the second sub-data, and the third sub-data are compared by the parallel comparison submodule to obtain first verification data, including: By using the parallel comparison submodule, the value of each pixel point in the first sub-data is compared with the value of the corresponding pixel point in the second sub-data to determine whether they are consistent, thereby obtaining a first comparison result; By using the parallel comparison submodule, the value of each pixel in the first sub-data is compared with the value of the corresponding pixel in the third sub-data to determine whether they are consistent, thereby obtaining a second comparison result; By using the parallel comparison submodule, the value of each pixel in the second sub-data is compared with the value of the corresponding pixel in the third sub-data to see whether they are consistent, so as to obtain a third comparison result; When it is determined that the first comparison result is inconsistent, the second comparison result is inconsistent, and the third comparison result is inconsistent, the first verification data is generated.

10. The method according to claim 8, characterized in that Processing the first color channel data according to the verification data to obtain second color channel data includes: When it is determined that the verification data is the first verification data, retaining the first sub-data, the second sub-data, and the third sub-data of the first color channel data; In the case where it is determined that the verification data is the second verification data, retaining the first sub-data and the third sub-data of the first color channel data, and deleting the second sub-data of the first color channel data; In the case where it is determined that the verification data is the third verification data, retaining the first sub-data and the second sub-data of the first color channel data, and deleting the third sub-data of the first color channel data; In the case where it is determined that the verification data is the fourth verification data, retaining the second sub-data and the third sub-data of the first color channel data, and deleting the first sub-data of the first color channel data; In the case where it is determined that the verification data is the fifth verification data, retaining the first sub-data of the first color channel data, and deleting the second sub-data and the third sub-data of the first color channel data; In a case where it is determined that the verification data is the sixth verification data, retaining the first sub-data of the first color channel data, and deleting the third sub-data of the first color channel data; When it is determined that the verification data is the seventh verification data, retaining the first sub-data and the third sub-data of the first color channel data; The sub-data retained in the first color channel data are determined as the second color channel data.

11. The method according to claim 2, characterized in that The first luminance and chrominance data are compressed to obtain video compressed data, including: Converting the first luminance and chrominance data into second luminance and chrominance data based on the verification data; The second luminance and chrominance data are compressed to obtain the video compression data.

12. The method according to claim 11, characterized in that The substrate management control chip further includes a color space conversion module and a data block generation module, which converts the first brightness and chromaticity data into second brightness and chromaticity data based on the verification data, including: Transmitting the verification data and the first brightness and chromaticity data from the color space conversion module to the data block generation module; Reading brightness and chromaticity values ​​of a plurality of pixels from the first brightness and chromaticity data according to the verification data by the data block generation module; The brightness and chromaticity values ​​of the multiple pixels are arranged in a data block format to obtain the second brightness and chromaticity data.

13. The method according to claim 11, characterized in that The baseboard management control chip further includes a data block generation module and a data compression module, which compresses the second brightness and chromaticity data to obtain the video compression data, including: Transmitting the second luminance and chrominance data from the data block generation module to the data compression module; Encoding the second luminance and chrominance data based on a preset compression algorithm by the data compression module to obtain encoded data; The encoded data is assembled into a bit stream by the data compression module to obtain the video compression data.

14. The method according to claim 13, characterized in that The baseboard management control chip further includes a color space conversion module, which is used to perform data format conversion on the color channel data, perform color space conversion processing on the second color channel data, and obtain first brightness and chromaticity data, including: Transmitting the verification data and the second color channel data from the data capture module to the color space conversion module; The second color channel data is converted into the first brightness and chromaticity data by the color space conversion module, wherein the conversion formula is as follows: Y=0.257R+0.504G+0.098B+16; U=0.148R–0.291G+0.439B+128; V = 0.439R - 0.368G - 0.071B + 128; Among them, R represents the value of the red channel in the color channel data, G represents the value of the green channel in the color channel data, B represents the value of the blue channel in the color channel data, Y represents the value of the brightness in the brightness and chromaticity data, U represents the value of the blue chromaticity in the brightness and chromaticity data, and V represents the value of the red chromaticity in the brightness and chromaticity data.

15. The method according to claim 13, characterized in that The baseboard management control chip further includes a data output module, wherein a third connection channel exists between the data output module and the memory space of the memory, and the video compression data is written into the memory space of the memory, including: transmitting the video compression data from the data compression module to the data output module; Writing the video compression data into the memory space of the memory through the data output module based on the third connection channel; The video compression data is written into the memory space of the memory through the third connection channel in a bit stream format.

16. A video compression system, characterized in that: At least comprises a baseboard management control chip, wherein the baseboard management control chip is used to execute the steps of the method described in any one of claims 1 to 15 above.

17. The system according to claim 16, characterized in that The video compression system also includes a server host and a memory, the baseboard management control chip includes a video graphics array module and a data capture module, the video graphics array module is connected to the peripheral interface of the server host, and there is a first connection channel between the video graphics array module and the video memory space of the memory, the video graphics array module is used to receive the original video data sent by the server host, and write the original video data into the video memory space of the memory, and the video graphics array module is also used to read the original video data from the video memory space of the memory based on the first connection channel, and transmit the original video data to the data capture module, so that the data capture module obtains the first color channel data of the original video.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 15 when executed by a processor.

19. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 15 are implemented.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Multi-camera color consistency correction method and device

    CN116158087A

  • Video image compression coding distortion control method and device, equipment and medium

    CN117834897A