Data processing method, controller, server, storage medium and program product

By storing new and old pixels in the server's sampling buffer and selecting Huffman encoding or stroke encoding according to the probability, the problem of insufficient video memory bandwidth is solved, and the reduction of video memory bandwidth and the guarantee of picture effects is achieved, and the loss of color accuracy is avoided.

CN118710740BActive Publication Date: 2025-01-10SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411187774.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-01-10
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

In the local display screen of a general server, because multiple objects in the BMC system share system memory, the memory bandwidth is insufficient, and screen or black blocks appear, which affects the operator's visual experience. Existing methods such as RGB888 converted to RGB565 or not read Taking pixel data at the edge of the image can reduce bandwidth requirements but will lose color accuracy.

Method used

By storing the old and new pixels in the sampling buffer, Huffman encoding or stroke encoding is performed according to the probability of different pixel values, the encoding results are stored in the video memory, and the encoding information is recorded using the address mapping register to ensure that the screen effect is not damaged. Reduce the memory bandwidth requirement.

Benefits of technology

While ensuring the screen effect, it effectively reduces the video memory bandwidth required for the local display screen, reduces the video memory footprint, and realizes accurate data recovery through lossless decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710740B_ABST
    Figure CN118710740B_ABST
Patent Text Reader

Abstract

In the field of computer technology, the present application discloses a data processing method, a controller, a server, a storage medium and a program product, the method comprising: updating the sampling buffer row by row based on the display screen data written by the host; reading new row pixels from the sampling buffer and determining the probability of different pixel values ​​appearing in the new row pixels; when the probability meets the maximum length Huffman coding condition, Huffman coding the new row pixels and storing the coding result in the video memory; when the probability does not meet the maximum length Huffman coding condition, run coding the new row pixels and storing the coding result in the video memory; after writing the storage address of the coding result into the address mapping register, returning to execute based on the display screen data written by the host, updating the sampling buffer row by row until the storage of the display screen data is completed. Technical effect: The present application can reduce the video memory bandwidth required for the local display screen while ensuring the picture effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, a controller, a server, a storage medium and a program product. Background Art

[0002] The local display screen of a general server needs to be processed by the internal integrated graphics card of the BMC (Baseboard Management Controller) and output to the display for display. The video memory used by the integrated graphics card is generally used as a reserved space of the system memory of the BMC system. In the BMC system, the system memory is often used not only as the host video memory, but also for CPU calculation, network, Linux kernel operation, etc. in the BMC. Since multiple objects share the system memory, when a large number of memory read and write operations are performed in the BMC, the memory bandwidth used for the video memory area will be insufficient, which will directly affect the reading and writing of video memory data. At this time, the local display screen will appear distorted or black blocks, seriously affecting the viewing experience of operators.

[0003] At present, the method to reduce video memory bandwidth is generally to convert RGB888 into RGB565. Through the RGB565 method, each pixel occupies 2 bytes of address space, which can reduce the total amount of pixel data read from the memory by half, thereby reducing the demand for video memory bandwidth. This method can solve the problem of insufficient bandwidth to a certain extent, but the RGB565 mode will reduce the color richness of the displayed image.

[0004] In addition, there are solutions that do not read the edge pixel data of the image, and add the edge pixel value when the frame buffer data is arranged into a data matrix, thereby reducing the consumption of image bandwidth. In such solutions, the display fineness of the edge pixel points of the image will be reduced. However, the color accuracy will be lost to a certain extent, affecting the display effect.

[0005] In summary, how to effectively solve the problem of insufficient video memory bandwidth is a technical problem that those skilled in the art urgently need to solve. Summary of the invention

[0006] The purpose of the present application is to provide a data processing method, a controller, a server, a storage medium and a program product, which can reduce the video memory bandwidth required for local display of pictures while ensuring the picture effect.

[0007] In order to solve the above technical problems, this application provides the following technical solutions:

[0008] A display screen data processing method, comprising:

[0009] Based on the display screen data written by the host, the sampling buffer is updated row by row; wherein the sampling buffer stores two rows of old and new pixels;

[0010] Reading a new row of pixels from the sampling buffer and determining the probability of occurrence of different pixel values ​​in the new row of pixels;

[0011] In the case where the probability satisfies the maximum length Huffman coding condition, Huffman coding is performed on the new row of pixels, and the coding result is stored in the video memory;

[0012] When the probability does not satisfy the maximum length Huffman coding condition, run length coding is performed on the new row of pixels, and the coding result is stored in the video memory;

[0013] After the storage address of the encoding result is written into the address mapping register, the process returns to execute the display screen data written by the host, and updates the sampling buffer row by row until the storage of the display screen data is completed.

[0014] Preferably, when the probability does not satisfy the maximum length Huffman coding condition, the new row of pixels is run-length coded, and the coding result is stored in the video memory, including:

[0015] In the case where the probability does not satisfy the maximum length Huffman coding condition, determining whether the new row of pixels is the first row of pixels;

[0016] If yes, determining the new row of pixels as the encoding result, and storing the encoding result in the video memory;

[0017] If not, then when the cumulative difference between the new row of pixels and the old row of pixels is less than a second threshold, the pixel difference between the new row of pixels and the old row of pixels is run-length encoded, and the encoding result is stored in the video memory; when the cumulative difference is not less than the second threshold, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

[0018] Preferably, when the cumulative difference between the new row of pixels and the old row of pixels is less than a second threshold, performing run encoding on the pixel difference between the new row of pixels and the old row of pixels, storing the encoding result in a video memory, and when the cumulative difference is not less than the second threshold, determining the new row of pixels as the encoding result, and storing the encoding result in the video memory, comprises:

[0019] Subtracting the new row of pixels from the old row of pixels to obtain the pixel difference value;

[0020] Combined with the dynamic weighting coefficient, the area where the difference appears in the pixel difference is gradually weighted and summed to obtain the difference; wherein the calculation formula of the dynamic weighting coefficient Cn is:

[0021]

[0022] Where m is the number of consecutive pixels whose difference value before the current pixel n is not 0, w is the weight coefficient, i is the position of the pixel where Sn is not 0, is the ith dynamic weighting coefficient;

[0023] Determine whether the difference is greater than the second threshold;

[0024] If not, run encoding is performed on the pixel difference value, and the encoding result is stored in the video memory;

[0025] If yes, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

[0026] Preferably, judging whether the probability satisfies a maximum length Huffman coding condition comprises:

[0027] Determining whether the probability exceeds a first threshold;

[0028] If yes, determining that the probability satisfies the maximum length Huffman coding condition;

[0029] If not, it is determined that the probability does not satisfy the maximum length Huffman coding condition.

[0030] Preferably, updating the sampling buffer row by row based on the display screen data written by the host includes:

[0031] Based on the display screen data, the old row of pixels in the sampling buffer is overwritten to obtain a new row of pixels, and the new row of pixels written last time are changed to the old row of pixels.

[0032] Preferably, writing the storage address of the encoding result into an address mapping register comprises:

[0033] Obtaining a storage address for storing the encoding result;

[0034] Determining the coded storage information of the new row of pixels based on the storage address;

[0035] In the address mapping register, the coding storage information is recorded row by row; wherein the coding storage information includes the coding type, the address stored in the video memory, the length of the coded data written into the video memory and the address stored in the Huffman coding table.

[0036] Preferably, in the address mapping register, the encoded storage information is recorded in rows, including:

[0037] In the address mapping register, the coded storage information having a fixed length and order is recorded in rows.

[0038] Preferably, obtaining a storage address for storing the encoding result includes:

[0039] If Huffman coding is performed on the new row of pixels, the Huffman table corresponding to the new row of pixels is temporarily stored in an internal memory bar, and the first address of the memory bar corresponding to the Huffman table is determined as the storage address;

[0040] If the new row of pixels is run-length encoded, the first address and length of the encoding result corresponding to the new row of pixels written into the display memory are determined as the storage address;

[0041] If the new row of pixels is not encoded, the new row of pixels is written into the first address of the video memory, and the length is determined as the storage address.

[0042] Preferably, it also includes:

[0043] Determine the designated display memory address of the target row of pixels from the address mapping register in row units;

[0044] Reading the encoded data of the target row of pixels from the designated video memory address;

[0045] Decoding the encoded data according to the encoding type to obtain decoded data;

[0046] The decoded data is written to an output buffer so that the host can read it.

[0047] Preferably, decoding is performed according to the encoding type of the encoded data to obtain decoded data, including:

[0048] If the encoded data has not been encoded, determining the encoded data as the decoded data;

[0049] If the encoded data is run-length encoded, run-length decoding is performed on the encoded data to obtain the decoded data;

[0050] If the coded data is Huffman coded, Huffman decoding is performed on the coded data to obtain the decoded data.

[0051] Preferably, performing run-length decoding on the encoded data to obtain the decoded data comprises:

[0052] Reading a previous row of decoded data of pixels in the target row from the output buffer;

[0053] The decoded data of the previous line is used as a reference and run-length decoding is performed in combination with the encoded data to obtain the decoded data.

[0054] A controller, comprising:

[0055] A display memory buffer unit, used to update the sampling buffer row by row based on the display screen data written by the host; wherein the sampling buffer stores two rows of old and new pixels;

[0056] A compression coding unit, used for reading a new row of pixels from the sampling buffer and determining the probability of occurrence of different pixel values ​​in the new row of pixels; when the probability meets the maximum length Huffman coding condition, performing Huffman coding on the new row of pixels and storing the coding result in the video memory; when the probability does not meet the maximum length Huffman coding condition, performing run length coding on the new row of pixels and storing the coding result in the video memory;

[0057] The address mapping unit is used to write the storage address of the encoding result into the address mapping register and trigger the display memory buffer unit until the storage of the display screen data is completed.

[0058] A server, comprising:

[0059] A controller such as the one described above;

[0060] The controller implements the steps of the above data processing method.

[0061] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above data processing method are implemented.

[0062] A computer program product comprises a computer program / instruction, which, when executed by a processor, implements the steps of the above data processing method.

[0063] The method provided by the embodiment of the present application includes: updating the sampling buffer row by row based on the display screen data written by the host; wherein the sampling buffer stores two rows of old and new pixels; reading the new row of pixels from the sampling buffer, and determining the probability of different pixel values ​​appearing in the new row of pixels; when the probability meets the maximum length Huffman coding condition, performing Huffman coding on the new row of pixels, and storing the coding result in the video memory; when the probability does not meet the maximum length Huffman coding condition, performing run length coding on the new row of pixels, and storing the coding result in the video memory; after writing the storage address of the coding result into the address mapping register, returning to execute the display screen data written by the host, updating the sampling buffer row by row, until the storage of the display screen data is completed.

[0064] Specifically, a sampling buffer can be used to cache the display screen data written by the host. When performing encoding processing, the encoding method for storing new row pixels in the sampling buffer is selected in units of lines. Specifically, by determining the probability of occurrence of different pixels in the new row of pixels, it can be determined whether the new row of pixels meets the maximum length Huffman encoding condition. If it does, Huffman encoding is performed on the new row of pixels, and the encoding result is stored in the video memory; if it does not meet the condition, run encoding is performed on the new row of pixels, and the encoding result is stored in the video memory; after writing the storage address of the encoding result into the address mapping register, it can return to execute the display screen data written by the host, and update the sampling buffer by line until the storage of the display screen data is completed.

[0065] Since the server display screen is relatively simple, generally a text window display screen, and the redundancy between the pixels in each row of the screen is relatively high, and the correlation and similarity between the pixels in the rows are relatively high, the pixels are losslessly compressed by compressing the rows, which can reduce the amount of data in the read and write video memory, thereby reducing the demand for video memory write bandwidth. For row pixels that meet the maximum length Huffman coding conditions, Huffman coding is preferentially used for lossless compression. Therefore, the two compression coding methods are combined to compress and encode the rows in units, thereby ensuring that the compressed display screen data occupies less video memory storage space.

[0066] Technical effect: In the present application, for the display screen data written by the host, what is actually stored in the video memory is the encoding result of compression encoding line by line. Compared with the original display screen data, the encoding result requires a smaller video memory bandwidth and occupies a smaller storage space, and the encoding result can be losslessly decoded through the corresponding decoding method. Therefore, the present application can reduce the video memory bandwidth required for the local display screen while ensuring the picture effect.

[0067] Correspondingly, the embodiments of the present application also provide a controller, a server, a readable storage medium and a computer program product corresponding to the above-mentioned data processing method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0069] Figure 1 This is a flowchart of a data processing method in an embodiment of the present application;

[0070] Figure 2 This is a schematic diagram of a specific implementation of a data processing method in an embodiment of the present application;

[0071] Figure 3 This is a schematic diagram of the structure of a controller in an embodiment of the present application;

[0072] Figure 4 This is a schematic diagram of the structure of a server in an embodiment of the present application. DETAILED DESCRIPTION

[0073] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0074] Please refer to Figure 1 , Figure 1 This is a flow chart of a data processing method in an embodiment of the present application, which can be applied to a baseboard management controller of a server. The method includes the following steps:

[0075] S101 . Based on the display screen data written by the host, update the sampling buffer row by row.

[0076] The sampling buffer stores two rows of pixels, old and new.

[0077] In the embodiment of the present application, a sampling buffer may be set, in which two rows of pixels of the maximum pixel are stored.

[0078] For the sake of distinction, in this embodiment, the two rows of pixels in the sampling buffer are respectively referred to as new row pixels and old row pixels according to the order of writing. Row pixels are pixel values ​​corresponding to a row of display area.

[0079] In one embodiment of the present application, based on the display screen data written by the host, the sampling buffer is updated row by row, including:

[0080] Based on the display screen data, the old row of pixels in the sampling buffer is overwritten to obtain a new row of pixels, and the new row of pixels written last time are changed to the old row of pixels.

[0081] That is to say, every time a row of pixels is encoded and stored, the sampling buffer can be updated. The update mainly updates the old row of pixels in the new and old rows of pixels, so that the new row of pixels encoded last time is changed to the old row of pixels, and the newly written row of pixels is used as the new row of pixels. This cycle is repeated, and finally all rows of pixels of all display screen data are compressed, encoded and stored.

[0082] S102 , reading a new row of pixels from the sampling buffer, and determining the probability of occurrence of different pixel values ​​in the new row of pixels.

[0083] In this embodiment, in order to reduce the video memory bandwidth, the row pixels may be compressed and encoded with the row pixels as a unit.

[0084] Considering that different row pixel situations have different effects of different compression codes, after reading a new row pixel from the sampling buffer, the characteristics of the pixel value distribution of the new row pixel can be first determined, especially the probability of different pixel values ​​appearing in the new row pixel. Based on the probability, it can be determined whether the new row pixel is suitable for maximum length Huffman coding.

[0085] S103: When the probability satisfies the maximum length Huffman coding condition, Huffman coding is performed on the new row of pixels, and the coding result is stored in the video memory.

[0086] When the probability satisfies the maximum length Huffman coding condition, the new row of pixels may be Huffman coded to obtain a coding result, and the coding result is stored in the video memory.

[0087] The encoding result after encoding requires less storage space than a new row of pixels, thereby achieving the purpose of saving video memory space.

[0088] That is to say, by using Huffman coding, compression coding can be achieved based on the similarity of pixel values ​​within a row.

[0089] In one embodiment of the present application, determining whether the probability satisfies the maximum length Huffman coding condition includes:

[0090] Determining whether the probability exceeds a first threshold;

[0091] If yes, then determine the probability of satisfying the maximum length Huffman coding condition;

[0092] If not, it is determined that the probability does not satisfy the maximum length Huffman coding condition.

[0093] For ease of description, the above steps are combined for explanation below.

[0094] For the probability of different pixel values ​​in the new row of pixels being counted, if there are too many different pixel values, it is not suitable for Huffman coding. Specifically, the size of the first threshold can be set and adjusted according to actual needs. If the probability exceeds the first threshold, it is determined that it is not suitable for Huffman coding, otherwise it is suitable.

[0095] In one embodiment of the present application, Huffman encoding is performed on the new row of pixels, and the encoding result is stored in the video memory, including:

[0096] Huffman coding indefinite length coding is used for encoding, and the shortest code is used for the data with the highest probability of occurrence;

[0097] After the encoding of the new row of pixels is completed, the Huffman table corresponding to the new row of pixels is temporarily stored in the internal RAM, and the RAM first address corresponding to the Huffman table of the new row of pixels is written into the designated register for temporary storage;

[0098] Write the encoded pixel value into the pixel buffer, waiting to be written into the video memory.

[0099] In this way, by using the shortest code for the data with the highest probability of occurrence, the required storage space for the encoded pixel value can be reduced. In addition, the Huffman table is temporarily stored and the temporary first address is written to the specified register. When decoding is required later, the Huffman table can be read quickly and accurately, thereby achieving lossless decoding.

[0100] S104: When the probability does not satisfy the maximum length Huffman coding condition, run length coding is performed on the new row of pixels, and the coding result is stored in the video memory.

[0101] Since the server display screen is relatively simple, generally a text window display screen, and the redundancy between pixels in each row of the screen is relatively high, and the correlation and similarity between pixels in rows are relatively high, the pixels are losslessly compressed by compressing the rows. This can reduce the amount of data in the read and write video memory, thereby reducing the demand for video memory write bandwidth.

[0102] That is, when the new row of pixels is not suitable for Huffman coding, run length coding is performed on the new row of pixels, and only the coding result of the run length coding is stored in the video memory, thereby reducing the storage space occupied by the display.

[0103] That is to say, by using run length coding, compression coding can be achieved based on the similarity of pixel values ​​between rows.

[0104] In one embodiment of the present application, when the probability does not meet the maximum length Huffman coding condition, run encoding is performed on the new row of pixels, and the encoding result is stored in the video memory, including:

[0105] When the probability does not meet the maximum length Huffman coding condition, determine whether the new row of pixels is the first row of pixels;

[0106] If yes, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory;

[0107] If not, then when the cumulative difference between the new row of pixels and the old row of pixels is less than the second threshold, the pixel difference between the new row of pixels and the old row of pixels is run-length encoded, and the encoding result is stored in the video memory; when the cumulative difference is not less than the second threshold, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

[0108] For ease of description, the above steps are combined for explanation below.

[0109] Since run length coding is a compression coding based on the similarity between rows, the pixels in the previous row are required as a reference, so that the difference between the upper and lower rows can be encoded.

[0110] If the new row of pixels is the first row of pixels, it has no corresponding reference to the previous row of pixels. Therefore, in this embodiment, if it is clear that the new row of pixels does not meet the maximum length Huffman coding conditions and it is the first row of pixels, the new row of pixels can be directly determined as the coding result and directly stored in the video memory.

[0111] For other rows of pixels other than the first row of pixels, they are called continuation row pixels in this embodiment. If the continuation row pixels do not meet the maximum length Huffman coding condition, the difference between them and the previous row of pixels can be clarified first to determine whether to perform run length coding.

[0112] Specifically, in this embodiment, the previous row of pixels of the new row of pixels is the old row of pixels stored in the sampling buffer. The smaller the difference between the two rows, the smaller the storage space required for the result of run length coding. Therefore, when the cumulative difference between the new row of pixels and the old row of pixels is less than the second threshold, the pixel difference between the new row of pixels and the old row of pixels is run length coded, and the coding result is stored in the video memory; when the cumulative difference is not less than the second threshold, the new row of pixels is determined as the coding result, and the coding result is stored in the video memory.

[0113] The second threshold can be set and adjusted according to actual application requirements and is not specifically limited in this embodiment.

[0114] In one embodiment of the present application, when the cumulative difference between the new row of pixels and the old row of pixels is less than a second threshold, the pixel difference between the new row of pixels and the old row of pixels is run-length coded, and the coding result is stored in the video memory; when the cumulative difference is not less than the second threshold, the new row of pixels is determined as the coding result, and the coding result is stored in the video memory, including:

[0115] Subtract the new row of pixels from the old row of pixels to get the pixel difference;

[0116] Combined with the dynamic weighting coefficient, the difference area in the pixel difference is gradually weighted and summed to obtain the difference; the calculation formula of the dynamic weighting coefficient Cn is:

[0117]

[0118] Where m is the number of consecutive pixels whose difference value before the current pixel n is not 0, w is the weight coefficient, i is the position of the pixel where Sn is not 0, is the ith dynamic weighting coefficient;

[0119] Determine whether the difference is greater than a second threshold;

[0120] If not, the pixel difference is run-length encoded and the encoding result is stored in the video memory;

[0121] If yes, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

[0122] For ease of description, the above steps are combined for explanation below.

[0123] For the row pixels that cannot use Huffman coding, if it is not the first row of pixels, the cumulative difference between the pixels in this row and the pixels in the previous row is calculated. If the cumulative difference is greater than the set threshold, it proves that the pixels in this row are significantly different from the pixels in the previous row, and it is not suitable to use run encoding. In this case, the pixels in this row are directly stored in the pixel buffer.

[0124] If the cumulative difference between the pixels in the next row and the pixels in this row is calculated, and if the cumulative difference is less than the second threshold, it proves that the pixel difference between the pixels in the next row and the pixels in this row is small, the pixel difference between the pixels in the next row and the pixels in this row is calculated, the pixel difference is run-length encoded, and the pixel value after run-length encoding is written into the pixel buffer to wait for further writing into the video memory.

[0125] For example, as shown in the following table:

[0126] Table 1 is a schematic table of run length coding pixel difference values.

[0127]

[0128] In Table 1, the first two rows of pixels are the pixel values ​​of the old and new rows of pixels respectively, and the value of the third row is the pixel difference between the first two rows. The pixel difference is run-length encoded to obtain 0002000401... etc., where the run-length encoding can adopt 19bit=11bit+8bit fixed-length encoding, and the maximum resolution supported is 1920*1200.

[0129] The calculation rules for pixel difference are as follows: take the difference between the upper and lower rows to get a row of pixel difference, and then gradually weight the sum of the areas where the difference occurs in the pixel difference. The calculation rules are as follows:

[0130] Cn is the dynamic weighting coefficient. The weighted difference of the current pixel point Dn = Sn*Cn. If Dn is less than the threshold, the pixel difference is considered small.

[0131] If the next pixel difference Sn+1 is not 0, the coefficient value continues to increase to Cn+1.

[0132] If the difference value at the position of the Nth pixel in the row is not 0, the weighted difference value of the current pixel is obtained by using the difference value Sn*coefficient Cn. If the next pixel difference value Sn+1 is not 0, the coefficient value Cn+1 is continued to be increased. The increase rule of Cn is as follows:

[0133]

[0134] Where m is the number of consecutive pixel difference values ​​Sn that are not zero before the current pixel n, w is the weight coefficient, and i is the i-th pixel position where Sn is not zero; if there are 5 consecutive non-zero values ​​of Sn before the pixel position n in the current row, then Cn=w*1*C1 + w*2*C2+ w*3*C3+ w*4*C4+ w*5*C5;

[0135] When there are many consecutive unequal pixel differences, the weight coefficient of the next pixel will become larger, and the final cumulative difference between rows will also become larger. When there are differences between pixels and they are not continuous, the final cumulative difference will become smaller.

[0136] After the run length encoding is completed, only the encoding result is stored in the video memory.

[0137] S105 , after writing the storage address of the encoding result into the address mapping register, returning to execute the display screen data written by the host, and updating the sampling buffer row by row until the storage of the display screen data is completed.

[0138] In this embodiment, an address mapping register may be provided to store the storage address of the encoding result, so that during subsequent decoding, the encoding result may be read based on the address mapping register, thereby achieving lossless demodulation.

[0139] If there are still rows of pixels in the display screen data that have not been processed, the process returns to step S101 , and after all the display screen data have been processed as described above and stored in the video memory, the writing process of the display screen data is terminated.

[0140] That is, after a row of pixels is encoded, a new row of pixels is written into the earliest encoded fifo, and the subsequent encoding is continued until all pixels are encoded. The pixels in the buffer are written into the video memory in order.

[0141] In one embodiment of the present application, writing the storage address of the encoding result into the address mapping register includes:

[0142] Get the storage address where the encoding result is stored;

[0143] Determining the encoding storage information of the new row of pixels based on the storage address;

[0144] In the address mapping register, the coding storage information is recorded row by row; wherein the coding storage information includes the coding type, the address stored in the video memory, the length of the coded data written into the video memory and the address stored in the Huffman coding table.

[0145] Among them, in the address mapping register, the information is recorded and encoded by row, including:

[0146] In the address mapping register, the encoded storage information with fixed length and order is recorded in rows.

[0147] Wherein, obtaining the storage address for storing the encoding result includes:

[0148] If Huffman coding is performed on the new row of pixels, the Huffman table corresponding to the new row of pixels is temporarily stored in the internal memory bar, and the first address of the memory bar corresponding to the Huffman table is determined as the storage address;

[0149] If the new row of pixels is run-length encoded, the first address and length of the encoding result corresponding to the new row of pixels written into the display memory are determined as the storage address;

[0150] If the new row of pixels is not encoded, the new row of pixels is written to the first address of the video memory and the length is determined as the storage address.

[0151] For ease of description, the above steps are combined for explanation below.

[0152] The display screen data (i.e., image data) is written and read by the host through the display controller. The written pixel value data is first written into the pixel row buffer, which can cache up to 2 rows of pixels, such as row h1 and row h2. When the first row of pixels h1 is cached, encoding begins. If it is determined that the threshold of the occurrence of different pixel values ​​is met, Huffman encoding is adopted. The other rows are encoded based on whether the cumulative difference threshold of the run encoding is met. The next row of pixels is written to row h2. When the encoding of row h2 is completed, new data continues to be written to row h1, and each row of pixels is cached alternately.

[0153] Pixels enter the compression coding unit from the sampling buffer. The compression coding unit traverses all pixel values ​​to determine the coding type. If it is determined to be Huffman coding, Huffman coding will be performed on the row of pixels, and the Huffman coding table will be written into the Huffman table unit, and the location of the Huffman table in the unit will be written into the address mapping unit, and the address and length of the encoded data stored in the video memory will be written into the address mapping unit; if it is determined to be run-length coding, the coding will be formed according to the difference, and the first address and length of the encoded data written into the video memory will be written into the address mapping unit.

[0154] The address mapping unit has an address mapping register for storing the first address and length of each row of pixels in the video memory after encoding. The address mapping unit is determined according to the pixel row, and the length of each row of pixels in the address mapping unit is fixed. For example, Figure 2 As shown in the figure, the first bit57-bit56 represents the encoding type, which is no encoding, run length encoding, or Huffman encoding. Bit55-Bit24 represents the address stored in the video memory, and bits23-13 represent the length of the encoded data written to the video memory. Bit12-bit0 represents the address where the Huffman encoding table is stored.

[0155] The Huffman table is also stored in units of rows. For this reason, the application limits the length of the Huffman code and adopts the maximum length Huffman code. When the length of the leaf node code of the Huffman code of the row of pixels exceeds the maximum length threshold, the Huffman code will no longer be used to save the storage space of the Huffman code table.

[0156] The method provided by the embodiment of the present application includes: updating the sampling buffer row by row based on the display screen data written by the host; wherein the sampling buffer stores two rows of old and new pixels; reading the new row of pixels from the sampling buffer, and determining the probability of different pixel values ​​appearing in the new row of pixels; when the probability meets the maximum length Huffman coding condition, performing Huffman coding on the new row of pixels, and storing the coding result in the video memory; when the probability does not meet the maximum length Huffman coding condition, performing run length coding on the new row of pixels, and storing the coding result in the video memory; after writing the storage address of the coding result into the address mapping register, returning to execute the display screen data written by the host, updating the sampling buffer row by row, until the storage of the display screen data is completed.

[0157] Specifically, a sampling buffer can be used to cache the display screen data written by the host. When performing encoding processing, the encoding method for storing new row pixels in the sampling buffer is selected in units of lines. Specifically, by determining the probability of occurrence of different pixels in the new row of pixels, it can be determined whether the new row of pixels meets the maximum length Huffman encoding condition. If it does, Huffman encoding is performed on the new row of pixels, and the encoding result is stored in the video memory; if it does not meet the condition, run encoding is performed on the new row of pixels, and the encoding result is stored in the video memory; after writing the storage address of the encoding result into the address mapping register, it can return to execute the display screen data written by the host, and update the sampling buffer by line until the storage of the display screen data is completed.

[0158] Since the server display screen is relatively simple, generally a text window display screen, and the redundancy between the pixels in each row of the screen is relatively high, and the correlation and similarity between the pixels in the rows are relatively high, the pixels are losslessly compressed by compressing the rows, which can reduce the amount of data in the read and write video memory, thereby reducing the demand for video memory write bandwidth. For row pixels that meet the maximum length Huffman coding conditions, Huffman coding is preferentially used for lossless compression. Therefore, the two compression coding methods are combined to compress and encode the rows in units, thereby ensuring that the compressed display screen data occupies less video memory storage space.

[0159] Technical effect: In the present application, for the display screen data written by the host, what is actually stored in the video memory is the encoding result of compression encoding line by line. Compared with the original display screen data, the encoding result requires a smaller video memory bandwidth and occupies a smaller storage space, and the encoding result can be losslessly decoded through the corresponding decoding method. Therefore, the present application can reduce the video memory bandwidth required for the local display screen while ensuring the picture effect.

[0160] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the preferred / improved embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be described one by one in the preferred / improved embodiments of this article.

[0161] In one embodiment of the present application, the process of losslessly decoding the encoded display picture data includes:

[0162] Determine the designated video memory address of the target row of pixels from the address mapping register in row units;

[0163] Read the encoded data of the target row of pixels from the specified video memory address;

[0164] Decode the encoded data according to the encoding type to obtain decoded data;

[0165] Writes decoded data to the output buffer for reading by the host.

[0166] The decoding is performed according to the encoding type of the encoded data to obtain the decoded data, including:

[0167] If the encoded data has not been encoded, determining the encoded data as decoded data;

[0168] If the encoded data is run-length encoded, run-length decoding is performed on the encoded data to obtain decoded data;

[0169] If the encoded data is Huffman encoded, Huffman decoding is performed on the encoded data to obtain decoded data.

[0170] The encoded data is run-length decoded to obtain decoded data, including:

[0171] Read the previous row of decoded data of the target row of pixels from the output buffer;

[0172] The decoded data of the previous line is used as a reference, and run-length decoding is performed in combination with the encoded data to obtain the decoded data.

[0173] That is, when it is necessary to read the display screen data from the video memory, first read the data from the specified video memory address according to the address mapping unit, and then decode it according to its encoding type. If it is Huffman encoding, read the content of the Huffman encoding table and decode it for output; if it is run-length encoding, decode it according to the run-length encoding difference and output the pixels to the output buffer for the host to read; if it is not encoded, it is directly output to the buffer for the host to read.

[0174] Corresponding to the above method embodiment, the embodiment of the present application further provides a controller, which may be specifically a baseboard management controller. The controller described below and the data processing method described above may refer to each other.

[0175] See also Figure 3 As shown, the controller includes the following units:

[0176] The display memory buffer unit 101 is used to update the sampling buffer row by row based on the display screen data written by the host; wherein the sampling buffer stores two rows of old and new pixels;

[0177] The compression coding unit 102 is used to read the new row of pixels from the sampling buffer and determine the probability of occurrence of different pixel values ​​in the new row of pixels; when the probability meets the maximum length Huffman coding condition, the new row of pixels is Huffman coded and the coding result is stored in the video memory; when the probability does not meet the maximum length Huffman coding condition, the new row of pixels is run-length coded and the coding result is stored in the video memory;

[0178] The address mapping unit 103 is used to write the storage address of the encoding result into the address mapping register and trigger the display memory buffer unit until the storage of the display screen data is completed.

[0179] The controller provided in the embodiment of the present application is applied to update the sampling buffer row by row based on the display screen data written by the host; wherein the old and new rows of pixels are stored in the sampling buffer; the new row of pixels is read from the sampling buffer, and the probability of different pixel values ​​in the new row of pixels is determined; when the probability meets the maximum length Huffman coding condition, the new row of pixels is Huffman coded, and the coding result is stored in the video memory; when the probability does not meet the maximum length Huffman coding condition, the new row of pixels is run-length coded, and the coding result is stored in the video memory; after writing the storage address of the coding result into the address mapping register, the display screen data written by the host is returned to be executed, and the sampling buffer is updated row by row until the storage of the display screen data is completed.

[0180] Specifically, a sampling buffer can be used to cache the display screen data written by the host. When performing encoding processing, the encoding method for storing new row pixels in the sampling buffer is selected in units of lines. Specifically, by determining the probability of occurrence of different pixels in the new row of pixels, it can be determined whether the new row of pixels meets the maximum length Huffman encoding condition. If it does, Huffman encoding is performed on the new row of pixels, and the encoding result is stored in the video memory; if it does not meet the condition, run encoding is performed on the new row of pixels, and the encoding result is stored in the video memory; after writing the storage address of the encoding result into the address mapping register, it can return to execute the display screen data written by the host, and update the sampling buffer by line until the storage of the display screen data is completed.

[0181] Since the server display screen is relatively simple, generally a text window display screen, and the redundancy between the pixels in each row of the screen is relatively high, and the correlation and similarity between the pixels in the rows are relatively high, the pixels are losslessly compressed by compressing the rows, which can reduce the amount of data in the read and write video memory, thereby reducing the demand for video memory write bandwidth. For row pixels that meet the maximum length Huffman coding conditions, Huffman coding is preferentially used for lossless compression. Therefore, the two compression coding methods are combined to compress and encode the rows in units, thereby ensuring that the compressed display screen data occupies less video memory storage space.

[0182] Technical effect: In the present application, for the display screen data written by the host, what is actually stored in the video memory is the encoding result of compression encoding line by line. Compared with the original display screen data, the encoding result requires a smaller video memory bandwidth and occupies a smaller storage space, and the encoding result can be losslessly decoded through the corresponding decoding method. Therefore, the present application can reduce the video memory bandwidth required for the local display screen while ensuring the picture effect.

[0183] In a specific implementation of the present application, the compression coding unit 102 is specifically used to determine whether the new row of pixels is the first row of pixels when the probability does not meet the maximum length Huffman coding condition;

[0184] If yes, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory;

[0185] If not, then when the cumulative difference between the new row of pixels and the old row of pixels is less than the second threshold, the pixel difference between the new row of pixels and the old row of pixels is run-length encoded, and the encoding result is stored in the video memory; when the cumulative difference is not less than the second threshold, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

[0186] In a specific implementation of the present application, the compression coding unit 102 is specifically used to perform a difference between the new row of pixels and the old row of pixels to obtain a pixel difference value;

[0187] Combined with the dynamic weighting coefficient, the difference area in the pixel difference is gradually weighted and summed to obtain the difference; the calculation formula of the dynamic weighting coefficient Cn is:

[0188] Where m is the number of consecutive pixels whose difference value before the current pixel n is not 0, w is the weight coefficient, i is the position of the pixel where Sn is not 0, is the ith dynamic weighting coefficient;

[0189] Determine whether the difference is greater than a second threshold;

[0190] If not, the pixel difference is run-length encoded and the encoding result is stored in the video memory;

[0191] If yes, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

[0192] In a specific implementation of the present application, the compression coding unit is specifically used to determine whether the probability exceeds a first threshold;

[0193] If yes, then determine the probability of satisfying the maximum length Huffman coding condition;

[0194] If not, it is determined that the probability does not satisfy the maximum length Huffman coding condition.

[0195] In a specific implementation of the present application, the display memory buffer unit is specifically used to overwrite the old row of pixels in the sampling buffer based on the display screen data to obtain a new row of pixels, and the new row of pixels written last time are changed to the old row of pixels.

[0196] In a specific implementation of the present application, the address mapping unit is specifically used to obtain a storage address for storing the encoding result;

[0197] Determining the encoding storage information of the new row of pixels based on the storage address;

[0198] In the address mapping register, the coding storage information is recorded row by row; wherein the coding storage information includes the coding type, the address stored in the video memory, the length of the coded data written into the video memory and the address stored in the Huffman coding table.

[0199] In a specific implementation of the present application, the address mapping unit is specifically used to record the coded storage information with a fixed length and order in rows in the address mapping register.

[0200] In a specific implementation of the present application, the address mapping unit is specifically used to temporarily store the Huffman table corresponding to the new row of pixels in the internal memory bar if Huffman encoding is performed on the new row of pixels, and determine the first address of the memory bar corresponding to the Huffman table as the storage address;

[0201] If the new row of pixels is run-length encoded, the first address and length of the encoding result corresponding to the new row of pixels written into the display memory are determined as the storage address;

[0202] If the new row of pixels is not encoded, the new row of pixels is written to the first address of the video memory and the length is determined as the storage address.

[0203] In a specific implementation of the present application, it also includes:

[0204] A lossless decoding unit, used for determining a designated video memory address of a target row of pixels from an address mapping register in a row unit;

[0205] Read the encoded data of the target row of pixels from the specified video memory address;

[0206] Decode the encoded data according to the encoding type to obtain decoded data;

[0207] Writes decoded data to the output buffer for reading by the host.

[0208] In a specific implementation of the present application, the lossless decoding unit is specifically configured to determine the encoded data as decoded data if the encoded data has not been encoded;

[0209] If the encoded data is run-length encoded, run-length decoding is performed on the encoded data to obtain decoded data;

[0210] If the encoded data is Huffman encoded, Huffman decoding is performed on the encoded data to obtain decoded data.

[0211] In a specific implementation of the present application, the lossless decoding unit is specifically configured to read a previous row of decoded data of pixels in a target row from an output buffer;

[0212] The decoded data of the previous line is used as a reference, and run-length decoding is performed in combination with the encoded data to obtain the decoded data.

[0213] Corresponding to the above method embodiment, the embodiment of the present application further provides a controller, and the server described below and the data processing method and controller described above can refer to each other.

[0214] Please refer to Figure 4 , the server comprises:

[0215] A controller such as the one described above;

[0216] The controller implements the steps of the above data processing method.

[0217] The server includes a host and Figure 3 The baseboard management controller and video memory are shown.

[0218] The baseboard management controller includes a data sampling buffer, a compression coding module (same as the compression coding unit), a pixel row write buffer, a control module, an address mapping unit (which has an address mapping register), a Huffman storage unit (which stores the Huffman table), a decoding module (same as the lossless decoding unit), a video memory read buffer and a data output buffer.

[0219] Specifically, the image data is written and read by the host through the display controller. The written pixel value data is first written into the pixel row buffer, and a maximum of 2 rows of pixels, h1 and h2, can be cached in the buffer. When the first row of pixels h1 is cached, encoding begins. If it is determined that the threshold of different pixel values ​​set in this article is met, Huffman encoding is adopted, and the other rows are encoded based on whether the cumulative difference threshold of the run encoding is met. The next row of pixels is written to the h2 row. When the encoding of the h2 row of pixels is completed, the new data continues to be written to the h1 row, and each row of pixels is cached alternately.

[0220] Pixels enter the compression coding unit from the sampling buffer. The compression coding unit traverses all pixel values ​​to determine the coding type. If it is determined to be Huffman coding, Huffman coding will be performed on the row of pixels, and the Huffman coding table will be written into the Huffman table unit, and the location of the Huffman table in the unit will be written into the address mapping unit, and the address and length of the encoded data stored in the video memory will be written into the address mapping unit; if it is determined to be run-length coding, the coding will be formed according to the difference, and the first address and length of the encoded data written into the video memory will be written into the address mapping unit.

[0221] The address mapping unit is used to store the first address and length of each row of pixels in the video memory after encoding. The address mapping unit is determined according to the pixel row, and the length of each row of pixels in the address mapping unit is fixed. The first bit57-bit56 represents the encoding type, which is no encoding, run encoding, or Huffman encoding. Bit55-Bit24 represents the address stored in the video memory, and bits23-13 represent the length of the encoded data written to the video memory. Bit12-bit0 represents the address where the Huffman coding table is stored.

[0222] The Huffman table is also stored in units of rows. For this reason, this paper limits the length of Huffman coding and adopts maximum length Huffman coding. When the length of the leaf node coding of the Huffman coding of the row of pixels exceeds the maximum length threshold, Huffman coding will no longer be used to save the storage space of the Huffman coding table.

[0223] When it is necessary to read the display data from the video memory, the control module first reads the data from the specified video memory address according to the address mapping unit, and then decodes it according to its encoding type. If it is Huffman encoding, the content of the Huffman encoding table is read and decoded and output; if it is run-length encoding, it is decoded according to the run-length encoding difference and the pixels are output to the output buffer for the host to read.

[0224] It can be seen that in this server, the amount of data read and written to the video memory can be reduced, thereby reducing the required bandwidth of the video memory; in the server display application scenario, the amount of video memory data can be compressed to 50%-70%, thereby saving 50%-70% of the video memory bandwidth and improving the performance of the BMC system. The use of lossless compression ensures that the display screen is free of distortion, spots, black spots, etc. This saves related hardware costs to a certain extent and improves system performance and stability.

[0225] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the data processing method described above can refer to each other.

[0226] A readable storage medium stores a computer program, which implements the steps of the data processing method of the above method embodiment when the computer program is executed by a processor.

[0227] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.

[0228] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the data processing method described above can refer to each other.

[0229] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above data processing method are implemented.

[0230] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0231] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0232] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0233] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0234] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data processing method, characterized in that: include: Based on the display screen data written by the host, the sampling buffer is updated row by row; wherein the sampling buffer stores two rows of old and new pixels; Reading a new row of pixels from the sampling buffer and determining the probability of occurrence of different pixel values ​​in the new row of pixels; In the case where the probability satisfies the maximum length Huffman coding condition, Huffman coding is performed on the new row of pixels, and the coding result is stored in the video memory; When the probability does not satisfy the maximum length Huffman coding condition, run length coding is performed on the new row of pixels, and the coding result is stored in the video memory; After the storage address of the encoding result is written into the address mapping register, the process returns to execute the display screen data written by the host, and updates the sampling buffer row by row until the storage of the display screen data is completed.

2. The method according to claim 1, characterized in that When the probability does not satisfy the maximum length Huffman coding condition, run length coding is performed on the new row of pixels, and the coding result is stored in the video memory, including: In the case where the probability does not satisfy the maximum length Huffman coding condition, determining whether the new row of pixels is the first row of pixels; If yes, determining the new row of pixels as the encoding result, and storing the encoding result in the video memory; If not, then when the cumulative difference between the new row of pixels and the old row of pixels is less than a second threshold, the pixel difference between the new row of pixels and the old row of pixels is run-length encoded, and the encoding result is stored in the video memory; when the cumulative difference is not less than the second threshold, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

3. The method according to claim 2, characterized in that When the accumulated difference between the new row of pixels and the old row of pixels is less than a second threshold, run length encoding is performed on the pixel difference between the new row of pixels and the old row of pixels, and the encoding result is stored in a video memory; when the accumulated difference is not less than the second threshold, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory, including: Subtracting the new row of pixels from the old row of pixels to obtain the pixel difference value; Combined with the dynamic weighting coefficient, the area where the difference appears in the pixel difference is gradually weighted and summed to obtain the difference; wherein the calculation formula of the dynamic weighting coefficient Cn is: , where m is the number of consecutive pixels whose difference before the current pixel n is not 0, w is the weight coefficient, i is the position of the i-th pixel where Sn is not 0, Sn is the pixel difference, and is the i-th dynamic weight coefficient; Determine whether the difference is greater than the second threshold; If not, run encoding is performed on the pixel difference value, and the encoding result is stored in the video memory; If yes, the new row of pixels is determined as the encoding result, and the encoding result is stored in the video memory.

4. The method according to claim 1, characterized in that Determining whether the probability satisfies a maximum length Huffman coding condition includes: Determining whether the probability exceeds a first threshold; If yes, determining that the probability satisfies the maximum length Huffman coding condition; If not, it is determined that the probability does not satisfy the maximum length Huffman coding condition.

5. The method according to claim 1, characterized in that Based on the display screen data written by the host, the sampling buffer is updated line by line, including: Based on the display screen data, the old row of pixels in the sampling buffer is overwritten to obtain a new row of pixels, and the new row of pixels written last time are changed to the old row of pixels.

6. The method according to claim 1, characterized in that Writing the storage address of the encoding result into the address mapping register comprises: Obtaining a storage address for storing the encoding result; Determining the coded storage information of the new row of pixels based on the storage address; In the address mapping register, the coding storage information is recorded row by row; wherein the coding storage information includes the coding type, the address stored in the video memory, the length of the coded data written into the video memory and the address stored in the Huffman coding table.

7. The method according to claim 6, characterized in that In the address mapping register, information is stored in rows and encoded, including: In the address mapping register, the coded storage information having a fixed length and order is recorded in rows.

8. The method according to claim 6, characterized in that Obtaining a storage address for storing the encoding result, including: If Huffman coding is performed on the new row of pixels, the Huffman table corresponding to the new row of pixels is temporarily stored in an internal memory bar, and the first address of the memory bar corresponding to the Huffman table is determined as the storage address; If the new row of pixels is run-length encoded, the first address and length of the encoding result corresponding to the new row of pixels written into the display memory are determined as the storage address; If the new row of pixels is not encoded, the new row of pixels is written into the first address of the video memory, and the length is determined as the storage address.

9. The method according to any one of claims 1 to 8, characterized in that: Also includes: Determine the designated display memory address of the target row of pixels from the address mapping register in row units; Reading the encoded data of the target row of pixels from the designated video memory address; Decoding the encoded data according to the encoding type to obtain decoded data; The decoded data is written to an output buffer so that the host can read it.

10. The method according to claim 9, characterized in that Decoding is performed according to the encoding type of the encoded data to obtain decoded data, including: If the encoded data has not been encoded, determining the encoded data as the decoded data; If the encoded data is run-length encoded, run-length decoding is performed on the encoded data to obtain the decoded data; If the coded data is Huffman coded, Huffman decoding is performed on the coded data to obtain the decoded data.

11. The method according to claim 10, characterized in that Performing run-length decoding on the encoded data to obtain the decoded data includes: Reading a previous row of decoded data of pixels in the target row from the output buffer; The decoded data of the previous line is used as a reference and run-length decoding is performed in combination with the encoded data to obtain the decoded data.

12. A controller, characterized in that: include: A display memory buffer unit, used to update the sampling buffer by row based on the display screen data written by the host; wherein the sampling buffer stores two rows of old and new pixels; A compression coding unit, used for reading a new row of pixels from the sampling buffer and determining the probability of occurrence of different pixel values ​​in the new row of pixels; when the probability meets the maximum length Huffman coding condition, performing Huffman coding on the new row of pixels and storing the coding result in the video memory; when the probability does not meet the maximum length Huffman coding condition, performing run length coding on the new row of pixels and storing the coding result in the video memory; The address mapping unit is used to write the storage address of the encoding result into the address mapping register and trigger the display memory buffer unit until the storage of the display screen data is completed.

13. A server, characterized in that: include: The controller as claimed in claim 12; The controller implements the steps of the data processing method according to any one of claims 1 to 11.

14. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the data processing method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Method and apparatus for adaptively encoding binary shape signal

    CN1221291A

  • Image transmitter

    JP1998032696A