Image frame encoding method, device, chip, electronic equipment, storage medium and computer program product
By utilizing the relationship between the current image frame and the previous two frames to determine the predicted image frame and the residual image during remote image transmission, lossless compression is performed only on the difference image blocks, solving the problem of low efficiency in lossless compression and achieving efficient image transmission and network resource saving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies suffer from low lossless compression efficiency, degraded image quality, and high network bandwidth consumption in remote image transmission. Especially in remote desktop management, a lossless compression method is needed to reduce data redundancy in network transmission while ensuring image quality.
By obtaining the relationship between the current image frame and the previous two image frames, the predicted image frame is determined and the residual image is calculated. Lossless compression is performed only on image blocks with pixel value differences. Lossless encoding is performed using motion vectors and the predicted image frame, and Huffman coding is combined to improve compression efficiency.
It achieves lossless image transmission, reduces image size and video stream transmission data redundancy, saves network bandwidth, improves encoding and compression efficiency, and ensures image quality.
Smart Images

Figure CN122160509A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to an image frame encoding method, apparatus, chip, electronic device, storage medium, and computer program product. Background Technology
[0002] In addition to supporting local display, the general-purpose server also supports remote desktop management, enabling remote operation and control of the server host via the network. The server's remote desktop redirection function involves processing the image through the BMC (Baseboard Management Controller)'s internal image compression engine and then transmitting it over the network to the remote KVM (Kinetic Virtual Machine) client. This is because the locally displayed frame is ultra-high definition (1920 resolution). The bitrate of a 1200-bit image is quite high without compression (approximately 1492.992 Mbps at 30 frames per second). Directly transmitting the original image would consume a significant amount of bandwidth, severely depleting network resources. Therefore, images are often compressed before transmission to reduce network bandwidth usage. Currently, the industry standard is to use compression algorithms such as JPEG (an image compression algorithm) and H.264 (an image compression algorithm) for transmission. This achieves approximately 10-20 times the compression efficiency, significantly reducing network bandwidth. However, these compression algorithms can degrade image quality to some extent, resulting in a significant difference in quality between the compressed and original images, such as reduced color vibrancy, saturation, and contrast. In some applications, customers do not want the compressed image to be distorted or degraded, requiring a lossless original image. Therefore, lossless compression of the original image is necessary. After lossless compression at the BMC (Browser Control Center) end, the image is transmitted to the client over the network. The client then uses an algorithm to reconstruct the lossless image for display. However, lossless compression methods have low compression efficiency, large image size, and high data redundancy in video streaming, which is not conducive to saving network transmission bandwidth. Summary of the Invention
[0003] This application provides an image frame encoding method, apparatus, chip, electronic device, storage medium, and computer program product.
[0004] This application provides an image frame encoding method, applied to a first node, the method comprising: Obtain the current image frame, which contains a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The current image frame is the image frame in the video stream that needs to be sent from the first node to the second node. The current predicted image frame is determined based on the first image frame and the second image frame; Determine the residual image between the current image frame and the current predicted image frame; Identify multiple first image blocks that have pixel value differences between the current image frame and the first image frame, wherein the size of the first image block is smaller than the size of the image frame; When the number of the first image blocks is less than or equal to a preset number, the image blocks in the residual image that are at the same position as the plurality of first image blocks are losslessly compressed; The lossless compressed image block is sent to the second node.
[0005] The step of determining the current predicted image frame based on the first image frame and the second image frame includes: Identify the image block in the first image frame that has the highest similarity to each second image block in the second image frame; Determine the displacement vector between each second image block and the image block with the highest similarity to that second image block to obtain the motion vector map between the second image frame and the first image frame; The current predicted image frame is determined based on the first image frame, the second image frame, and the motion vector map.
[0006] Wherein, determining the residual image between the current image frame and the current predicted image frame includes: The residual image is obtained by determining the pixel value difference between each pixel in the current image frame and the corresponding pixel in the current predicted image frame.
[0007] The determination of multiple first image blocks that have pixel value differences between the current image frame and the first image frame includes: Divide the current image frame into multiple third image blocks; Determine whether the pixel value of each pixel in the third image block is the same as the pixel value of the corresponding pixel in the image block at the same position in the first image frame; If at least one of the pixels has a different pixel value, then the third image block is identified as the first image block.
[0008] The method further includes: If the number of the first image blocks is greater than the preset number, the current image frame is losslessly compressed; The lossless compressed current image frame is sent to the second node.
[0009] Before obtaining the current image frame, the method further includes: Obtain the first and second image frames; Lossless compression is performed on the first image frame and the second image frame; The first and second image frames, after lossless compression, are sent to the second node.
[0010] The step of losslessly compressing the image blocks in the residual image that are at the same position as the plurality of first image blocks includes: The pixel value of each pixel in the image block is divided into 1 bit of header data and 8 bits of data to be compressed, and the size of the pixel value is 9 bits. The 8-bit data of all pixels in the image block to be compressed is losslessly compressed.
[0011] Another embodiment of this application provides an image frame decoding method applied to a second node, the method comprising: Receive multiple lossless compressed image blocks sent by the first node. The multiple image blocks belong to the current image frame. The current image frame has a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The current predicted image frame is determined based on the first image frame and the second image frame; Based on the plurality of image blocks and the current predicted image frame, determine the fourth image block in the current image frame that is at the same position as the image block; Based on the first image frame, determine all fifth image blocks in the current image frame except for the fourth image block; The current image frame is determined based on the fourth image block and the fifth image block.
[0012] Another embodiment of this application provides an image frame encoding apparatus, the apparatus comprising: The acquisition module is used to obtain the current image frame, which includes a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The current image frame is an image frame in the video that needs to be sent from the first node to the second node. The first calculation module is used to determine the current predicted image frame based on the first image frame and the second image frame; The first calculation module is further configured to determine the residual image between the current image frame and the current predicted image frame; The first calculation module is further configured to determine a plurality of first image blocks that have pixel value differences between the current image frame and the first image frame, wherein the size of the first image block is smaller than the size of the image frame; The first calculation module is further configured to perform lossless compression on image blocks in the residual image that are at the same position as the plurality of first image blocks when the number of the first image blocks is less than or equal to a preset number; The first communication module is used to send the lossless compressed image block to the second node.
[0013] The first calculation module is further configured to determine the image block in the first image frame that has the highest similarity to each second image block in the second image frame; The first calculation module is further configured to determine the displacement vector between each second image block and the image block with the highest similarity to the second image block, so as to obtain a motion vector map between the second image frame and the first image frame; The first calculation module is further configured to determine the current predicted image frame based on the first image frame, the second image frame, and the motion vector map.
[0014] The first calculation module is further configured to determine the pixel value difference between each pixel in the current image frame and the corresponding pixel in the current predicted image frame, thereby obtaining the residual image.
[0015] The first calculation module is further configured to divide the current image frame into multiple third image blocks; The first calculation module is further configured to determine whether the pixel value of each pixel of the third image block is the same as the pixel value of the corresponding pixel of the image block at the same position in the first image frame; The first calculation module is further configured to determine the third image block as the first image block if at least one of the pixels has a different pixel value.
[0016] The first calculation module is further configured to perform lossless compression on the current image frame when the number of the first image blocks is greater than a preset number. The first communication module is also used to send the lossless compressed current image frame to the second node.
[0017] The acquisition module is also used to obtain a first image frame and a second image frame. The first calculation module is further configured to perform lossless compression on the first image frame and the second image frame; The first communication module is also used to send the lossless compressed first frame image frame and the second frame image frame to the second node.
[0018] The first calculation module is further configured to divide the pixel value of each pixel in the image block into 1 bit of header data and 8 bits of data to be compressed, wherein the size of the pixel value is 9 bits. The first calculation module is also used to perform lossless compression on the 8-bit data to be compressed of all pixels in the image block.
[0019] Another embodiment of this application provides an image frame decoding apparatus, the apparatus comprising: The second communication module is used to receive multiple lossless compressed image blocks sent by the first node. The multiple image blocks belong to the current image frame. The current image frame has a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The second calculation module is used to determine the current predicted image frame based on the first image frame and the second image frame; The second calculation module is further configured to determine a fourth image block in the current image frame that is at the same position as the image block, based on the plurality of image blocks and the current predicted image frame; The second calculation module is further configured to determine, based on the first image frame, all fifth image blocks in the current image frame except for the fourth image block; The second calculation module is further configured to determine the current image frame based on the fourth image block and the fifth image block.
[0020] Another embodiment of this application provides a chip, the chip including a processor, the processor being capable of executing the image frame encoding method.
[0021] Another embodiment of this application provides an electronic device, the electronic device including a chip, the chip including a processor, the processor being capable of executing the image frame encoding method.
[0022] Another embodiment of this application provides a computer-readable storage medium storing a computer program for executing the image frame encoding method described above.
[0023] Another aspect of this application provides a computer program product, including a computer program or instructions, for inducing a processor to execute and implement the image frame encoding method provided in this application.
[0024] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0025] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0026] Figure 1 A flowchart of an image frame encoding method according to an embodiment of this application is shown; Figure 2 A flowchart of an image frame encoding method according to another embodiment of this application is shown; Figure 3 A schematic diagram of a first image frame and a second image frame according to an embodiment of this application is shown; Figure 4 A flowchart of an image frame encoding method according to another embodiment of this application is shown; Figure 5 A flowchart of an image frame encoding method according to another embodiment of this application is shown; Figure 6 A flowchart of an image frame encoding method according to another embodiment of this application is shown; Figure 7 A flowchart of an image frame encoding method according to another embodiment of this application is shown; Figure 8 A flowchart of an image frame decoding method according to another embodiment of this application is shown; Figure 9 A schematic diagram of an image frame encoding apparatus according to an embodiment of this application is shown; Figure 10 A schematic diagram of an image frame decoding apparatus according to an embodiment of this application is shown; Figure 11 A schematic diagram of the composition structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0027] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] To improve the compression efficiency of image encoding, reduce image size and redundancy in video stream transmission data, and thus save network transmission bandwidth, one embodiment of this application provides an image frame encoding method applied to a first node, such as... Figure 1 As shown, the method includes: Step 101: Obtain the current image frame. The current image frame contains a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The current image frame is an image frame in the video stream that needs to be sent from the first node to the second node.
[0029] In this embodiment, the first node can be any electronic device that needs to send a video stream to the second node, and the second node can be any electronic device that can receive the video stream sent by the first node.
[0030] The current image frame is the third image frame in the currently transmitted video stream or any image frame after the third image frame. The first image frame is the image frame preceding the current image frame in the video stream, and the second image frame is the image frame preceding the first image frame in the video stream.
[0031] For example, if the current image frame is the third image frame in the video stream, then the first image frame is the second image frame in the video stream, and the second image frame is the first image frame in the video stream.
[0032] For example, if the current image frame is the fourth image frame in the video stream, then the first image frame is the third image frame in the video stream, and the second image frame is the second image frame in the video stream.
[0033] Step 102: Determine the current predicted image frame based on the first image frame and the second image frame.
[0034] In this embodiment, the current predicted image frame can be determined based on the first image frame and the second image frame in the following two ways: The first approach involves determining the current image frame by analyzing the motion vector data of pixels between the first and second image frames, and then using this motion vector data to predict the current image frame.
[0035] The second method involves using a pre-trained image model to predict the current image frame based on the first and second image frames, thereby determining the current predicted image frame.
[0036] Step 103: Determine the residual image between the current image frame and the current predicted image frame.
[0037] Determine the difference between each pixel in the current image frame and its corresponding pixel in the current prediction image frame to obtain the residual image between the current image frame and the current prediction image frame.
[0038] Step 104: Determine a plurality of first image blocks that have pixel value differences between the current image frame and the first image frame, wherein the size of the first image block is smaller than the size of the image frame.
[0039] The current image frame and the first image frame are divided into multiple image blocks using a window of a preset size. It is then determined whether the pixel value of each pixel in each image block of the current image frame is the same as the pixel value of the corresponding pixel in the same position image block of the first image frame. If a pixel with a different value exists, that image block is designated as the first image block. The window size is smaller than the image frame size.
[0040] For example, the size of both the current image frame and the first image frame is 1920. 1200, using 8 An 8-inch window divides both the current image frame and the first image frame into multiple image blocks.
[0041] Step 105: If the number of the first image blocks is less than or equal to a preset number, the image blocks in the residual image that are in the same position as the plurality of first image blocks are losslessly compressed.
[0042] When the number of identified first image blocks is less than or equal to a preset number, it indicates that the change between the current image frame and its previous image frame (i.e., the first image frame) is small. Therefore, only the data corresponding to image blocks in the current image frame with different pixel values can be transmitted to the second node; these are the image blocks in the residual image that are in the same position as multiple first image blocks. Lossless compression is then performed on these image blocks.
[0043] In this embodiment, the preset quantity is typically set to half the result of dividing the current image frame size by the size of the first image block. In other embodiments, the quantity can be set according to specific requirements.
[0044] In this embodiment, the image block to be compressed can first be run-length encoded, and then the result of the run-length encoding can be Huffman encoded to obtain the compression result. In other embodiments, other arbitrary lossless compression methods can also be used to perform lossless compression on the image block.
[0045] Step 106: Send the lossless compressed image block to the second node.
[0046] In the above scheme, the current image frame with two adjacent previous image frames is first obtained, and then the current predicted image frame is determined based on these two adjacent previous image frames, thus obtaining the residual image between the current image frame and the current predicted image frame. Simultaneously, multiple first image blocks with pixel value differences between the current image frame and the previous image frame are identified. When the number of first image blocks meets a preset condition, lossless compression is performed only on the corresponding image blocks in the residual image and then transmitted. Therefore, lossless compression of the entire image frame is no longer necessary; lossless compression is only performed on image blocks with pixel value changes. This effectively reduces the amount of data processing required for lossless compression, improves the compression efficiency of image encoding, reduces image size, and reduces data redundancy during video stream transmission. While achieving lossless image transmission and ensuring distortion-free image display quality, it significantly reduces network bandwidth usage, saves network resources, and balances the requirements for lossless image transmission with the efficiency of network resource utilization.
[0047] An image frame encoding method is also provided in one example of this application, such as Figure 2 As shown, determining the current predicted image frame based on the first image frame and the second image frame includes: Step 201: Determine the image block in the first image frame that has the highest similarity to each second image block in the second image frame.
[0048] For example, such as Figure 3 As shown, Figure 3 The left side of the image is the second image frame, which includes second image block A, second image block B, second image block C, and second image block D. Figure 3 The right side of the image frame represents the first image frame, which includes image blocks E, F, G, and H. All second image blocks in the second image frame are traversed. For second image block A, its similarity to each image block in the first image frame is determined, and image block H in the first image frame is identified as having the highest similarity to second image block A. For second image block B, its similarity to each image block in the first image frame is determined, and image block F in the first image frame is identified as having the highest similarity to second image block B. For second image block C, its similarity to each image block in the first image frame is determined, and image block G in the first image frame is identified as having the highest similarity to second image block C. For second image block D, its similarity to each image block in the first image frame is determined, and image block E in the first image frame is identified as having the highest similarity to second image block D.
[0049] Specifically, the similarity between an image patch in the first image frame and a second image patch in the second image frame can be determined based on the following formula. :
[0050] Where M is the number of rows of the image block and the second image block, N is the number of columns of the image block and the second image block, i is the horizontal coordinate offset of the position of the image block in the first image frame relative to the position of the second image block in the second image frame, and j is the vertical coordinate offset of the position of the image block in the first image frame relative to the position of the second image block in the second image frame. The coordinates in the image patch are The pixel value of the pixel, The coordinates in the second image patch are The pixel value of the pixel.
[0051] Step 202: Determine the displacement vector between each second image block and the image block with the highest similarity to the second image block to obtain the motion vector map between the second image frame and the first image frame.
[0052] The coordinate difference between each pixel in the second image block and the pixel in the image block with the highest similarity to the second image block can be determined, and the coordinate difference can be used as the corresponding displacement vector. Finally, the displacement vectors corresponding to each pixel in the second image blocks A, B, C, and D are combined to form a motion vector map.
[0053] Step 203: Determine the current predicted image frame based on the first image frame, the second image frame, and the motion vector map.
[0054] The current predicted image frame is determined based on the first image frame, the second image frame, the motion vector map, and the preset weights.
[0055] Specifically, the coordinates in the current predicted image frame can be determined based on the following formula: pixel value of a pixel :
[0056] in, To preset weights, The coordinates in the motion vector diagram are The horizontal coordinate motion vector corresponding to each pixel. The coordinates in the motion vector diagram are The vertical coordinate motion vector corresponding to each pixel. The coordinates in the first image frame are Pixel value of a pixel The coordinates in the second image frame are The pixel value of a pixel.
[0057] The preset weights can be determined based on the following formula. :
[0058] in, The coordinates in the first image frame are Pixel value of a pixel The coordinates in the second image frame are The pixel value of a pixel.
[0059] In the above scheme, similarity matching is performed between each image block in the first image frame and each second image block in the second image frame to determine the image block with the highest similarity to each second image block. Then, displacement vectors are determined based on each second image block and the image block with the highest similarity to each second image block, and a motion vector map is generated. Finally, the first image frame, the second image frame, and the motion vector map are combined to determine the current predicted image frame. By using motion vectors, the determined current predicted image frame is more closely aligned with the actual current image frame, improving the accuracy of the current predicted image frame. A more accurate current predicted image frame can effectively reduce the pixel difference between it and the actual current image frame, further reducing the amount of residual image data determined subsequently. This can further improve the compression efficiency of image encoding, reduce data redundancy in video stream transmission, and better save network transmission bandwidth.
[0060] In one example of this application, an image frame encoding method is also provided, wherein determining the residual image between the current image frame and the current predicted image frame includes: The residual image is obtained by determining the pixel value difference between each pixel in the current image frame and the corresponding pixel in the current predicted image frame.
[0061] For example, the current image frame is The current predicted image frame is The residual image is obtained by subtracting the pixel value of the corresponding pixel in the current prediction image frame (i.e., the pixel value of the same position) from the pixel value of each pixel in the current image frame. .
[0062] An image frame encoding method is also provided in one example of this application, such as Figure 4 As shown, the determination of multiple first image blocks that have pixel value differences between the current image frame and the first image frame includes: Step 301: Divide the current image frame into multiple third image blocks.
[0063] For example, the current image frame is 9. Size 3, current image frame is , using 3 A window of size 3 divides the current image frame into three third image blocks, namely third image block A. Third image block B and the third image block C .
[0064] Step 302: Determine whether the pixel value of each pixel of the third image block is the same as the pixel value of the corresponding pixel of the image block at the same position in the first image frame.
[0065] Step 303: If at least one of the pixels has a different pixel value, then the third image block is determined as the first image block.
[0066] Continuing with the example above, the first image frame is Wherein, the pixel block corresponding to the third image block A in the first image frame is The pixel value of each pixel in the third image block B is the same as the pixel value of the corresponding pixel in the third image block A. Therefore, the third image block A is not the first image block. The pixel block corresponding to the third image block B in the first image frame is... Two pixels in the first image block C have pixel values that differ from the corresponding pixel values in the third image block B. Therefore, the third image block B is determined to be the first image block. The pixel block corresponding to the third image block C in the first image frame is... Since the pixel value of each pixel in the first image block is the same as the pixel value of the corresponding pixel in the third image block C, the third image block C is not the first image block.
[0067] It should be noted that when determining the first image block between the current image frame and the first image frame, if the image frame size is very large, a larger window can be used to first divide and coarsely screen the current image frame and the first image frame. The division and coarse screening method is the same as described above and will not be repeated. After obtaining image blocks with pixel value differences through coarse screening, a smaller window is then used to divide and finely screen the image blocks with pixel value differences in the coarse screening result. The division and fine screening method is the same as described above and will not be repeated. In the result obtained after fine screening, those with pixel value differences are the first image blocks. Of course, in other embodiments, the number of screenings can be set according to specific needs, such as performing 3, 4, or more screenings.
[0068] In the above scheme, the current image frame is first divided into multiple third image blocks, and then the pixel values of the third image blocks are compared with those of the image blocks at the same position in the first image frame pixel by pixel. As long as there is at least one different pixel value, the third image block is identified as the first image block. This can accurately identify the image blocks in which there are differences in pixel values between the current image frame and the first image frame, without missing any areas with pixel changes. This allows the subsequent lossless compression to accurately locate the image block range that needs to be processed, avoiding invalid compression processing of areas without pixel changes, reducing the amount of data processing for lossless compression, improving the compression efficiency of image frame encoding, and further reducing data redundancy in video stream transmission, thus better saving network transmission bandwidth.
[0069] An image frame encoding method is also provided in one example of this application, such as Figure 5 As shown, the method further includes: Step 401: If the number of the first image blocks is greater than a preset number, the current image frame is losslessly compressed.
[0070] When the number of the first image blocks is greater than the preset number, it means that there is a large change between the current image frame and its previous image frame, i.e., the first image frame. In this case, the entire current image frame can be directly compressed without loss.
[0071] In this embodiment, the preset quantity is typically set to half the result of dividing the current image frame size by the size of the first image block. In other embodiments, the quantity can be set according to specific requirements.
[0072] In this embodiment, the current image frame can first be run-length encoded, and then the result of the run-length encoding can be Huffman encoded to obtain the compressed result. In other embodiments, other arbitrary lossless compression methods can also be used to perform lossless compression on the current image frame.
[0073] Step 402: Send the lossless compressed current image frame to the second node.
[0074] In the above scheme, when the number of first image blocks exceeds a preset number, it indicates that the current image frame has a significant change compared to the first image frame. In this case, the current image frame is directly compressed without loss and sent to the second node. This avoids the tedious operation of compressing a large number of different image blocks one by one when the image frame changes significantly, which would increase the risk of data computation and thus further improve the overall processing efficiency of image frame encoding.
[0075] An image frame encoding method is also provided in one example of this application, such as Figure 6 As shown, before obtaining the current image frame, the method further includes: Step 501: Obtain the first image frame and the second image frame.
[0076] The first image frame is the first image frame in the video stream currently being transmitted from the first node to the second node. The second image frame is the image frame following the first image frame in the video stream.
[0077] Step 502: Perform lossless compression on the first image frame and the second image frame.
[0078] In this embodiment, run-length encoding can be performed on the first and second image frames first, and then Huffman encoding can be performed on the run-length encoding result to obtain the compressed result. In other embodiments, other arbitrary lossless compression methods can also be used to perform lossless compression on the first and second image frames.
[0079] Step 503: Send the lossless compressed first frame image frame and the second frame image frame to the second node.
[0080] In the above scheme, since the image frame needs to be predicted based on the first two image frames, the first and second image frames in the video stream need to be losslessly compressed before being sent to the second node to provide a data basis for the prediction and decoding of subsequent image frames and ensure the smooth progress of subsequent decoding.
[0081] An image frame encoding method is also provided in one example of this application, such as Figure 7 As shown, the lossless compression of image blocks in the residual image that are at the same position as the plurality of first image blocks includes: Step 601: Divide the pixel value of each pixel in the image block into 1 bit of header data and 8 bits of data to be compressed, and the size of the pixel value is 9 bits.
[0082] When compressing image blocks, each pixel has a 9-bit size.
[0083] Step 602: Perform lossless compression on the 8-bit data of all pixels in the image block.
[0084] In lossless compression, no addition or subtraction operations are performed on the data. Therefore, negative numbers are uniformly stored according to their original code. For example, the 9-bit original code for -1 is 100000001, and after splitting the 1-bit header data, it becomes 00000001. Since the absolute difference between the predicted value and the actual value in the current image frame is small, this encoding method can better save space after lossless compression. Since pixel values are RGB values ranging from 0 to 255, while the pixel values in the residual image range from -255 to 255, the stored value is 9 bits in size. The 1-bit header data is the sign bit. After splitting the 1-bit header data, the repetition rate of the last 8 bits of data increases, thus saving space after lossless compression.
[0085] As shown in Table 1, the data structure of the data transmitted to the second node after block-based lossless compression is illustrated. The data header at least indicates the position of the image frame to which the data belongs in the video stream, and that the data is block-based lossless compressed. Following the data header are the data corresponding to multiple image blocks. The data includes the data block position, data length, and data itself. The data block position indicates the position of the image block in the original image frame, the data length indicates the length of the data, and the data is the lossless compressed data. Since it is block-based lossless compression, the data includes 1-bit header data segmented from each pixel in the aforementioned image block, and 8-bit data segmented from each pixel after lossless compression. Following the lossless compressed data of all image blocks is the data tail, indicating the end of the data transmission.
[0086] Table 1
[0087] As shown in Table 2, the data structure of the data transmitted to the second node after lossless compression of the entire frame is as follows: The header indicates at least the position of the image frame to which the data belongs in the video stream, and that the data is losslessly compressed from the entire frame. Following the header is the data length and data of the losslessly compressed image frame. After the data is the tail, indicating the end of the data transmission.
[0088] Table 2
[0089] In one example of this application, an image frame decoding method is also provided, applied to the second node, such as... Figure 8 As shown, the method includes: Step 701: Receive multiple lossless compressed image blocks sent by the first node. The multiple image blocks belong to the current image frame. The current image frame has a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame.
[0090] On the second node side, multiple lossless compressed image blocks sent by the first node are received, and these image blocks need to be decoded to obtain the current image frame.
[0091] Before receiving multiple lossless compressed image blocks from the first node, the second node must already possess the first and second image frames of the current image frame; that is, the preceding image frame of the current image frame in the video stream and the preceding image frame of the first image frame in the video stream. The first and second image frames can be the first and second image frames of the video stream, obtained by decoding after lossless compression of the entire frame by the first node and transmission to the second node. Alternatively, they can be subsequent image frames obtained by decoding after lossless compression of blocks by the first node and transmission to the second node.
[0092] For example, the second node receives the first and second image frames transmitted by the first node after lossless compression of the entire frame, and decodes them to obtain the first and second image frames. The second node receives multiple image blocks of the third image frame after block compression by the first node, and decodes them based on the multiple image blocks of the first, second, and third image frames to obtain the third image frame. The second node receives multiple image blocks of the fourth image frame after block compression by the first node, and decodes them based on the multiple image blocks of the second, third, and fourth image frames to obtain the fourth image frame.
[0093] Step 702: Determine the current predicted image frame based on the first image frame and the second image frame.
[0094] The current prediction image frame is determined based on the first image frame and the second image frame. The prediction method is the same as that in the first node, and will not be repeated here.
[0095] Step 703: Determine the fourth image block in the current image frame that is at the same position as the image block based on the plurality of image blocks and the current predicted image frame.
[0096] An image patch is an image patch in the residual image between the current image frame and the current predicted image frame. Therefore, by using the image patch and the current predicted image frame, it is possible to determine the fourth image patch in the current image frame that is at the same position as the image patch.
[0097] For example, the current predicted image frame is Image blocks are This image patch corresponds to the current predicted image frame. If the pixel is such that the fourth image block at that position in the current image frame can be determined based on the current predicted image frame and the image block. .
[0098] Step 704: Determine all fifth image blocks in the current image frame, excluding the fourth image block, based on the first image frame.
[0099] The fourth image block in the current image frame is an image block whose pixel value differs from that of the first image frame. Therefore, all the fifth image blocks in the current image frame, except for the fourth image block, have no pixel value difference from the corresponding image blocks in the first image frame, and thus the fifth image blocks can directly use the pixel values of the corresponding image blocks in the first image frame.
[0100] Continuing with the example above, the first node transmits only image blocks. The fourth image block at the corresponding position in the current image frame is determined by this image block. The first image frame is Therefore, all fifth image blocks in the current image frame, excluding the fourth image block, can be determined from the first image frame. and .
[0101] Step 705: Determine the current image frame based on the fourth image block and the fifth image block.
[0102] Following the example above, based on the fourth image block Fifth image block and Determine the current image frame as .
[0103] In the above scheme, after receiving the lossless compressed image blocks sent by the first node, the current predicted image frame is first determined from the first and second image frames using the same method as the first node, ensuring consistency between the current predicted image frame and the first node. Then, by combining the received image blocks with the current predicted image frame, the fourth image block with pixel changes in the current image frame is reconstructed. Simultaneously, the pixel values of the first image frame are directly reused to obtain the fifth image block without pixel changes in the current image frame. Finally, the fourth and fifth image blocks are integrated to obtain the complete current image frame. Therefore, decoding of the entire image frame is unnecessary; decoding is only performed on image blocks with pixel value differences, reducing the amount of data processing during decoding and improving decoding efficiency. At the same time, it can accurately reconstruct the actual current image frame, ensuring lossless display of the decoded image. While improving decoding efficiency, it always ensures that the image display quality is distortion-free, enabling the second node to efficiently and accurately acquire the video stream image frames transmitted by the first node.
[0104] To implement the above image frame encoding method, such as Figure 9 As shown, an example of this application provides an image frame encoding apparatus, including: The acquisition module 801 is used to obtain the current image frame, wherein the current image frame contains a first image frame and a second image frame, the first image frame is the previous image frame of the current image frame, the second image frame is the previous image frame of the first image frame, and the current image frame is an image frame in the video that needs to be sent from the first node to the second node; The first calculation module 802 is used to determine the current predicted image frame based on the first image frame and the second image frame; The first calculation module 802 is further configured to determine the residual image between the current image frame and the current predicted image frame; The first calculation module 802 is further configured to determine a plurality of first image blocks that have pixel value differences between the current image frame and the first image frame, wherein the size of the first image block is smaller than the size of the image frame; The first calculation module 802 is further configured to perform lossless compression on the image blocks in the residual image that are at the same position as the plurality of first image blocks when the number of the first image blocks is less than or equal to a preset number; The first communication module 803 is used to send the lossless compressed image block to the second node.
[0105] The first calculation module 802 is further configured to determine the image block in the first image frame that has the highest similarity to each second image block in the second image frame; The first calculation module 802 is further configured to determine the displacement vector between each second image block and the image block with the highest similarity to the second image block, so as to obtain a motion vector map between the second image frame and the first image frame; The first calculation module 802 is further configured to determine the current predicted image frame based on the first image frame, the second image frame, and the motion vector map.
[0106] The first calculation module 802 is further configured to determine the pixel value difference between each pixel in the current image frame and the corresponding pixel in the current predicted image frame, thereby obtaining the residual image.
[0107] The first calculation module 802 is further configured to divide the current image frame into multiple third image blocks; The first calculation module 802 is further configured to determine whether the pixel value of each pixel of the third image block is the same as the pixel value of the corresponding pixel of the image block at the same position in the first image frame; The first calculation module 802 is further configured to determine the third image block as the first image block if at least one of the pixels has a different pixel value.
[0108] The first calculation module 802 is further configured to perform lossless compression on the current image frame when the number of the first image blocks is greater than a preset number. The first communication module 803 is also used to send the lossless compressed current image frame to the second node.
[0109] The acquisition module 801 is also used to acquire the first image frame and the second image frame. The first calculation module 802 is further configured to perform lossless compression on the first image frame and the second image frame; The first communication module 803 is also used to send the lossless compressed first frame image frame and the second frame image frame to the second node.
[0110] The first calculation module 802 is further configured to divide the pixel value of each pixel in the image block into 1 bit of header data and 8 bits of data to be compressed, wherein the size of the pixel value is 9 bits. The first calculation module 802 is further configured to perform lossless compression on the 8-bit data to be compressed of all pixels in the image block.
[0111] To implement the above image frame decoding method, such as Figure 10 As shown, an example of this application provides an image frame decoding apparatus, including: The second communication module 901 is used to receive multiple lossless compressed image blocks sent by the first node. The multiple image blocks belong to the current image frame. The current image frame has a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The second calculation module 902 is used to determine the current predicted image frame based on the first image frame and the second image frame; The second calculation module 902 is further configured to determine a fourth image block in the current image frame that is at the same position as the image block, based on the plurality of image blocks and the current predicted image frame; The second calculation module 902 is further configured to determine, based on the first image frame, all fifth image blocks in the current image frame except for the fourth image block; The second calculation module 902 is further configured to determine the current image frame based on the fourth image block and the fifth image block.
[0112] This application also provides a chip, which includes a processor capable of executing the image frame encoding method provided in this application.
[0113] This application also provides an electronic device. Figure 11 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0114] like Figure 11 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in ROM 1002 (Read-Only Memory) or a computer program loaded from storage unit 1008 into RAM 1003 (Random Access Memory). RAM 1003 may also store various programs and data required for the operation of the electronic device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. I / O interface 1005 (Input / Output) is also connected to bus 1004.
[0115] Multiple components in electronic device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of displays, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0116] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as image frame encoding methods. For example, in some embodiments, the image frame encoding method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the image frame encoding method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform an image frame encoding method by any other suitable means (e.g., by means of firmware).
[0117] This application provides a computer-readable storage medium storing executable instructions, wherein a computer program is stored, the computer program being used to execute the image frame encoding method provided in this application.
[0118] This application provides a computer program product, which includes a computer program or instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or instructions from the computer-readable storage medium and executes the computer program or instructions, causing the computer device to perform the image frame encoding method described in this application embodiment.
[0119] This application also provides a chip, which includes a processor capable of executing the image frame decoding method provided in this application.
[0120] This application also provides an electronic device. Figure 11A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0121] like Figure 11 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in ROM 1002 (Read-Only Memory) or a computer program loaded from storage unit 1008 into RAM 1003 (Random Access Memory). RAM 1003 may also store various programs and data required for the operation of the electronic device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. I / O interface 1005 (Input / Output) is also connected to bus 1004.
[0122] Multiple components in electronic device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of displays, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0123] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as the image frame decoding method. For example, in some embodiments, the image frame decoding method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the image frame decoding method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform an image frame decoding method by any other suitable means (e.g., by means of firmware).
[0124] This application provides a computer-readable storage medium storing executable instructions, wherein a computer program is stored, the computer program being used to execute the image frame decoding method provided in this application.
[0125] This application provides a computer program product, which includes a computer program or instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or instructions from the computer-readable storage medium and executes the computer program or instructions, causing the computer device to perform the image frame decoding method described in this application embodiment.
[0126] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0127] In some embodiments, a computer program may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0128] As an example, a computer program may be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0129] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0131] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0133] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0134] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0135] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0136] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0137] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. An image frame encoding method, applied to a first node, the method comprising: Obtain the current image frame, which contains a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The current image frame is the image frame in the video stream that needs to be sent from the first node to the second node. The current predicted image frame is determined based on the first image frame and the second image frame; Determine the residual image between the current image frame and the current predicted image frame; Identify multiple first image blocks that have pixel value differences between the current image frame and the first image frame, wherein the size of the first image block is smaller than the size of the image frame; When the number of the first image blocks is less than or equal to a preset number, the image blocks in the residual image that are at the same position as the plurality of first image blocks are losslessly compressed; The lossless compressed image block is sent to the second node.
2. The method according to claim 1, wherein determining the current predicted image frame based on the first image frame and the second image frame comprises: Identify the image block in the first image frame that has the highest similarity to each second image block in the second image frame; Determine the displacement vector between each second image block and the image block with the highest similarity to that second image block to obtain the motion vector map between the second image frame and the first image frame; The current predicted image frame is determined based on the first image frame, the second image frame, and the motion vector map.
3. The method according to claim 1, wherein determining the residual image between the current image frame and the current predicted image frame comprises: The residual image is obtained by determining the pixel value difference between each pixel in the current image frame and the corresponding pixel in the current predicted image frame.
4. The method according to claim 1, wherein determining a plurality of first image blocks having pixel value differences between the current image frame and the first image frame comprises: Divide the current image frame into multiple third image blocks; Determine whether the pixel value of each pixel in the third image block is the same as the pixel value of the corresponding pixel in the image block at the same position in the first image frame; If at least one of the pixels has a different pixel value, then the third image block is identified as the first image block.
5. The method according to claim 1, further comprising: If the number of the first image blocks is greater than the preset number, the current image frame is losslessly compressed; The lossless compressed current image frame is sent to the second node.
6. The method according to claim 1, wherein before obtaining the current image frame, the method further comprises: Obtain the first and second image frames; Lossless compression is performed on the first image frame and the second image frame; The first and second image frames, after lossless compression, are sent to the second node.
7. The method according to claim 1, wherein the lossless compression of the image block in the residual image that is at the same position as the plurality of first image blocks comprises: The pixel value of each pixel in the image block is divided into 1 bit of header data and 8 bits of data to be compressed, and the size of the pixel value is 9 bits. The 8-bit data of all pixels in the image block to be compressed is losslessly compressed.
8. An image frame decoding method, applied to a second node, the method comprising: Receive multiple lossless compressed image blocks sent by the first node. The multiple image blocks belong to the current image frame. The current image frame has a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The current predicted image frame is determined based on the first image frame and the second image frame; Based on the plurality of image blocks and the current predicted image frame, determine the fourth image block in the current image frame that is at the same position as the image block; Based on the first image frame, determine all fifth image blocks in the current image frame except for the fourth image block; The current image frame is determined based on the fourth image block and the fifth image block.
9. An image frame encoding apparatus, the apparatus comprising: The acquisition module is used to obtain the current image frame, which includes a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The current image frame is an image frame in the video that needs to be sent from the first node to the second node. The first calculation module is used to determine the current predicted image frame based on the first image frame and the second image frame; The first calculation module is further configured to determine the residual image between the current image frame and the current predicted image frame; The first calculation module is further configured to determine a plurality of first image blocks that have pixel value differences between the current image frame and the first image frame, wherein the size of the first image block is smaller than the size of the image frame; The first calculation module is further configured to perform lossless compression on image blocks in the residual image that are at the same position as the plurality of first image blocks when the number of the first image blocks is less than or equal to a preset number; The first communication module is used to send the lossless compressed image block to the second node.
10. The apparatus according to claim 9, comprising: The first calculation module is further configured to determine the image block in the first image frame that has the highest similarity to each second image block in the second image frame; The first calculation module is further configured to determine the displacement vector between each second image block and the image block with the highest similarity to the second image block, so as to obtain a motion vector map between the second image frame and the first image frame; The first calculation module is further configured to determine the current predicted image frame based on the first image frame, the second image frame, and the motion vector map.
11. An image frame decoding apparatus, the apparatus comprising: The second communication module is used to receive multiple lossless compressed image blocks sent by the first node. The multiple image blocks belong to the current image frame. The current image frame has a first image frame and a second image frame. The first image frame is the previous image frame of the current image frame, and the second image frame is the previous image frame of the first image frame. The second calculation module is used to determine the current predicted image frame based on the first image frame and the second image frame; The second calculation module is further configured to determine a fourth image block in the current image frame that is at the same position as the image block, based on the plurality of image blocks and the current predicted image frame; The second calculation module is further configured to determine, based on the first image frame, all fifth image blocks in the current image frame except for the fourth image block; The second calculation module is further configured to determine the current image frame based on the fourth image block and the fifth image block.
12. A chip, characterized in that, The chip includes a processor capable of executing the image frame encoding method according to any one of claims 1 to 7.
13. An electronic device, characterized in that, The electronic device includes a chip, the chip including a processor, the processor being capable of executing the image frame encoding method according to any one of claims 1 to 7.
14. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the image frame encoding method according to any one of claims 1 to 7.
15. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the image frame encoding method according to any one of claims 1 to 7.