A method, system, device and storage medium for video compression and dynamic frame filling
By using the interpolation algorithm dynamically fill-up method when the DDR controller is occupied, the problem of image data discarding after JPEG compression is solved, the video compression efficiency and image recovery accuracy are improved, and a more realistic remote server image display is achieved.
Patent Information
- Application Number
- CN202211127274.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-09-16
AI Technical Summary
During the remote management of the server, the image data compressed by JPEG may be occupied by the DDR controller and discarded, reducing the image recovery accuracy, affecting the video compression efficiency and image presentation quality.
The dynamic frame-complement method of interpolation algorithm is used to store image data through the storage array, and interpolate or send preset data when the DDR controller is occupied to ensure the integrity and quality of the image data.
It improves video compression efficiency and presents the image interface of the remote server to a greater extent, improving image recovery accuracy and display effect.
Smart Images

Figure CN115526793B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and more specifically, to a method, system, device and storage medium for dynamic frame interpolation in video compression. Background Art
[0002] The Baseboard Manager Controller (BMC) is software that runs as soon as the server AC is powered on. It runs on a dedicated ARM chip in the server. This ARM chip serves as the BMC's CPU, and its peripherals include its own RAM, Flash, and other peripheral devices. As soon as the server is plugged in, the BMC software quickly starts running, even before the typical x86 server operating system is installed. The BMC acts as the server's steward, monitoring the health of various server components (CPU, memory, hard drives, fans, chassis, etc.), including temperature and voltage. It also adjusts fan speed in real time based on temperature data collected at various points to prevent overheating and control overall power consumption. Any board component anomalies are promptly reported to higher-level network management systems using industry-standard protocols such as SNMP, SMTP, and Redfish, enabling operations personnel to address them promptly and ensure uninterrupted service.
[0003] Server clusters typically use BMCs for large-scale unattended operations, including remote server management, monitoring, installation, and restart. When a server fails, remote management of the remote server through the BMC requires viewing the remote server interface. To reduce data transmission, the remote interface is often compressed using JPEG and sent to the local computer over the network for display. Since compressed image data needs to be written to main memory and the DDR controller is shared, there are cases where the DDR controller is occupied by other modules after the JPEG compression engine has completed compressing the image data. The common practice in the market is to discard this frame of image, but this reduces the accuracy of image recovery. Summary of the Invention
[0004] In view of this, the purpose of the embodiments of the present invention is to propose a method, system, computer device and computer-readable storage medium for dynamic frame interpolation in video compression. The present invention can use an interpolation algorithm to dynamically repair the image, which not only improves the video compression efficiency, but also presents the image interface of the remote server to a greater extent.
[0005] Based on the above-mentioned purpose, one aspect of an embodiment of the present invention provides a method for dynamic frame interpolation in video compression, comprising the following steps: in response to receiving an image, extracting corresponding image data based on the frame header and frame footer of each frame; storing the image data in a storage array, sending the image data to a compression engine and sequentially determining whether there is image data of the current row in the storage array; in response to the existence of image data of the current row in the storage array, sending the image data of the current row in the storage array to the compression engine; and in response to the absence of image data of the current row in the storage array, sending preset data or data after interpolation processing of the image data of the current row to the compression engine.
[0006] In some embodiments, sending preset data or interpolating the current row image data to the compression engine includes: in response to the current row belonging to the first row or the last row, sending preset data to the compression engine; and in response to the current row not belonging to the first row or the last row, reading image data of rows near the current row and interpolating the current row image data according to an interpolation algorithm, and sending the interpolated data to the compression engine.
[0007] In some embodiments, the storage array includes a RAM storage array and a backup RAM storage array, and storing the image data in the storage array includes: cyclically sending the image data in units of rows to a RAM module corresponding to the RAM storage array, and backing up the image data being overwritten in the RAM storage array to a backup RAM module corresponding to the backup RAM storage array.
[0008] In some embodiments, the sequentially determining whether image data of the current row exists in the storage array includes: determining whether image data corresponding to the current row exists in the RAM storage array; and in response to the absence of image data corresponding to the current row in the RAM storage array, determining whether image data corresponding to the current row exists in the backup RAM storage array.
[0009] In some embodiments, the method further includes determining a first pointer of the operating RAM storage array and a second pointer of the operating backup RAM storage array, and determining current positions of the RAM storage array and the backup RAM storage array based on the first pointer and the second pointer.
[0010] In some embodiments, the method further includes: sending an interrupt signal to the processor in response to the entire frame of image being written into the DDR-SDRAM.
[0011] In some embodiments, the method further includes: in response to the processor receiving the interrupt signal, reading the compressed image data from the double data rate synchronous dynamic random access memory, and sending the compressed image data to the peer end.
[0012] Another aspect of an embodiment of the present invention provides a system for dynamic frame interpolation in video compression, comprising: an extraction module configured to extract corresponding image data based on the frame header and frame footer of each frame in response to receiving an image; a storage module configured to store the image data in a storage array, send the image data to a compression engine and determine in turn whether there is image data of the current row in the storage array; a sending module configured to send the image data of the current row in the storage array to the compression engine in response to the existence of image data of the current row in the storage array; and an execution module configured to send preset data or data after interpolation processing of the image data of the current row to the compression engine in response to the absence of image data of the current row in the storage array.
[0013] According to another aspect of the present invention, a computer device is provided, comprising: at least one processor; and a memory, wherein the memory stores computer instructions that can be run on the processor, and the instructions implement the steps of the above method when executed by the processor.
[0014] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program that implements the above method steps when executed by a processor.
[0015] The present invention has the following beneficial technical effects: it can dynamically repair images using an interpolation algorithm, which not only improves video compression efficiency but also realistically presents the image interface of a remote server to a greater extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 A schematic diagram of an embodiment of a method for dynamic frame interpolation in video compression provided by the present invention;
[0018] Figure 2 A schematic diagram of an embodiment of a device for dynamic frame interpolation in video compression provided by the present invention;
[0019] Figure 3 A schematic diagram of an embodiment of a system for dynamic frame interpolation in video compression provided by the present invention;
[0020] Figure 4 A schematic diagram of the hardware structure of an embodiment of a computer device for dynamic frame interpolation in video compression provided by the present invention;
[0021] Figure 5 This is a schematic diagram of an embodiment of a computer storage medium for dynamic frame interpolation in video compression provided by the present invention. DETAILED DESCRIPTION
[0022] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0023] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. Subsequent embodiments will not explain this one by one.
[0024] A first aspect of the embodiments of the present invention provides an embodiment of a method for dynamic frame interpolation in video compression. Figure 1 FIG. 1 is a schematic diagram of an embodiment of a method for dynamic frame interpolation in video compression provided by the present invention. Figure 1 As shown, the embodiment of the present invention includes the following steps:
[0025] S1. In response to receiving an image, extract corresponding image data according to the frame header and frame footer of each frame;
[0026] S2. storing the image data in a storage array, sending the image data to a compression engine, and sequentially determining whether there is image data of the current row in the storage array;
[0027] S3. In response to the existence of image data of the current row in the storage array, sending the image data of the current row in the storage array to the compression engine; and
[0028] S4. In response to the absence of image data of the current row in the storage array, sending preset data or data obtained by interpolating the image data of the current row to the compression engine.
[0029] Figure 2 This is a schematic diagram of an embodiment of the apparatus for dynamic frame interpolation in video compression provided by the present invention, combined with Figure 2 The embodiments of the present invention are described below. Figure 2As shown, the apparatus according to the embodiment of the present invention includes an image acquisition module, a frame interpolation control module, an interpolation algorithm module, a JPEG compression engine, an output control module, a storage array control module, a RAM storage array, a backup RAM storage array, a RAM module A, a CMA matching module A, a RAM module B, a CMA matching module B, a DDR controller, a DDR, a processor, a network module A, a network module B, and a JPEG decompression engine.
[0030] Image acquisition module: After receiving the image data, it extracts the image data based on the frame header and frame footer of each frame and sends it to the JPEG compression engine.
[0031] RAM storage array: includes RAM module 1, RAM module 2, ..., RAM module n-1, RAM module n. Each RAM module stores one row of data (RAM depth is user-specified based on image resolution), and can store a total of n rows of data.
[0032] The backup RAM storage array consists of backup RAM modules 1, 2, m-1, and m. Each backup RAM module stores one row of data (the RAM depth is user-specified based on image resolution), for a total of m rows of data. The backup RAM modules back up the row of data being replaced (if RAM module p in the RAM storage array is being overwritten, the data in RAM module p is read out and backed up to the backup RAM module before the overwriting process). The number m is determined by the interpolation algorithm.
[0033] The entire backup RAM storage array stores the most recently overwritten m rows of data, and uses the RAM pointer q to record the RAM location of the current operation. An example is as follows:
[0034] If the RAM storage array contains 4 RAMs and the backup RAM storage array contains 2 RAMs, the RAM module 3 in the RAM storage array that is actually overwritten is RAM module 2, and the RAM position of the backup RAM storage array is 2. Therefore, n = 4, m = 2, p = 3, and q = 2. Backup RAM module 2 then backs up the data before RAM module 3 overwrites it, and backup RAM module 1 backs up the data before RAM module 2 overwrites it.
[0035] It is worth noting that when n is larger and n=m, the effect of image restoration through interpolation is better. However, due to the limitation of chip area, n and m cannot be infinite. In practical applications, users should evaluate and specify them according to the actual situation.
[0036] Frame interpolation control module: The frame interpolation control module includes the following functions. After receiving image data from the image acquisition module, it performs the following data processing. The following example uses n=4, m=2, and the interpolation algorithm uses the upper and lower data to interpolate (that is, two rows of data, ng-1 and n-g+1, are required to complete the data interpolation of row ng). The main functions are as follows:
[0037] (1) The frame interpolation control module needs to record the number of lines sent to the JPEG compression engine;
[0038] (2) If the frame interpolation control module is sending the first line of data to the JPEG compression engine, and if the frame interpolation control module has completely received the first line of data, it requests the output control module to obtain control of the DDR controller.
[0039] (2.1) If the output control module returns that it has successfully obtained control of the DDR controller, it requests the first row of data from the storage array control module.
[0040] If the storage array control module has the first row of data, the first row of data is read from the RAM storage array and sent to the interpolation algorithm module;
[0041] If the storage array control module does not have the first row of data (because the storage array will store row data cyclically, the first row of data may be overwritten at this time), it directly sends the full data f to the interpolation algorithm module;
[0042] (2.2) If the output control module returns that the control right of the DDR controller has not been obtained, the state of waiting for the output control module to request the control right of the DDR controller is continued, and the state returns to step (2.1) and continues to wait.
[0043] (3) If the frame complement control module is sending the kth line (excluding the first and last lines) of data to the JPEG compression engine, and if the frame complement control module has completely received the kth line of data, it requests the output control module to obtain control of the DDR controller.
[0044] (3.1) If the output control module returns that it has successfully obtained control of the DDR controller, it requests the kth row of data from the storage array control module.
[0045] If the storage array control module has the kth row of data, the kth row of data is read from the RAM storage array and sent to the interpolation algorithm module;
[0046] If the storage array control module does not have the k-th row of data (because the storage array stores row data cyclically, the k-th row of data may be overwritten at this time), the interpolation algorithm module will be informed that there is no image data corresponding to the k-th row.
[0047] (3.2) If the output control module returns that the control right of the DDR controller has not been obtained, the state of waiting for the output control module to request the control right of the DDR controller is continued, and the state returns to step (3.1) and continues to wait.
[0048] (4) If the frame interpolation control module is sending the last line of data to the JPEG compression engine, and if the frame interpolation control module has completely received the last line of data, it requests the output control module to obtain control of the DDR controller.
[0049] (4.1) If the output control module returns that it has successfully obtained control of the DDR controller, it requests the last row of data from the storage array control module.
[0050] If the storage array control module has the last row of data, it reads the last row of data from the RAM storage array and sends it to the interpolation algorithm module;
[0051] If the storage array control module does not have the last row of data (because the storage array will store row data cyclically, the last row of data may be overwritten at this time), it directly sends the full data f to the interpolation algorithm module;
[0052] (4.2) If the control right of the DDR controller is not obtained, the process continues to wait for the output control module to request the control right of the DDR controller, and the process returns to step (4.1) and continues to wait.
[0053] Storage array control module: After receiving image data from the frame supplement control module, it performs the following processing on the data. The following example uses n=4 and m=2 as an example. The main functions are as follows:
[0054] (1) After receiving image data from the frame interpolation control module, the first row of data is stored in RAM module 1, the second row in RAM module 2, the third row in RAM module 3, the fourth row in RAM module 1, the fifth row in RAM module 2, the sixth row in RAM module 3, and so on. The current RAM storage array position is recorded, that is, the RAM pointer.
[0055] (2) The image data that has been overwritten in the RAM storage array is sent to the backup RAM storage array for backup, and the current location of the backup RAM storage array is recorded, that is, the pointer to operate the backup RAM.
[0056] (3) If there is data in the RAM in the storage array that is being overwritten, the data in the RAM module will be read out and backed up to the backup RAM storage array before overwriting, and then overwritten.
[0057] (4) If a read data request is received from the frame supplement control module, the CAM matching module A is first queried to see if there is image data for the corresponding row:
[0058] If the CAM matching module A has data of the corresponding row, the data of the corresponding row is read from the RAM storage array and sent to the frame supplement control module.
[0059] If CAM matching module A does not have data for the corresponding row, it will query CAM matching module B to see if there is image data for the corresponding row. If CAM matching module B has data for the corresponding row, it will send it to the frame interpolation control module. If CAM matching module B does not have data for the corresponding row, it will inform the frame interpolation control module.
[0060] CAM matching module A is responsible for recording the number of storage rows for a frame of image and storing this information in RAM module A. CAM matching module B is responsible for recording the number of backup storage rows for a frame of image and storing this information in RAM module B. RAM module A: stores the number of storage rows for a frame of image; RAM module B: stores the number of storage rows for a frame of image.
[0061] Interpolation algorithm module: Responsible for completing data interpolation processing and sending the interpolated image data to the JPEG compression engine. The embodiment of the present invention does not limit the interpolation algorithm. The main functions are as follows:
[0062] (1) Receive the image from the frame interpolation control module and send the image data to the JPEG compression engine.
[0063] (2) After receiving a request from the frame interpolation control module that does not correspond to k lines of image data, the image data of the k-line vicinity is read according to the interpolation algorithm and the k-line data is interpolated.
[0064] JPEG compression engine: responsible for compressing image data and providing compressed image data to the frame interpolation control module. The embodiment of the present invention does not limit the function of the JPEG compression engine.
[0065] Output Control Module: Responsible for obtaining control of the DDR controller and feeding back the control status of the DDR controller to the Frame Completion Control Module. If the entire frame image has been successfully written into the DDR, an interrupt signal is sent to the processor.
[0066] DDR controller: responsible for reading and writing control of DDR. The embodiment of the present invention does not limit the DDR controller.
[0067] DDR: Double Data Rate Synchronous Dynamic Random Access Memory. The embodiment of the present invention does not limit DDR.
[0068] Processor: The computing and control core of a computer system, serving as the final execution unit for information processing and program execution. The present invention does not limit the processor to a specific processor. Upon receiving an interrupt signal from the output control module, the processor reads the compressed image data from the DDR and sends it to the peer end via network module A, then clears the interrupt.
[0069] Network module A: Network transmission, responsible for sending data to the other end's network module B.
[0070] Network module B: Network transmission, responsible for receiving data sent by the peer network module A.
[0071] JPEG decompression engine: responsible for decompressing image data. The embodiment of the present invention does not limit the JPEG decompression engine.
[0072] It should be pointed out in particular that the various steps in the various embodiments of the above-mentioned method for dynamic frame interpolation in video compression can be cross-linked, replaced, added, or deleted. Therefore, these reasonable permutations, combinations, and transformations of the method for dynamic frame interpolation in video compression should also fall within the scope of protection of the present invention, and the scope of protection of the present invention should not be limited to the embodiments.
[0073] Based on the above purpose, the second aspect of the embodiment of the present invention provides a system for dynamic frame interpolation in video compression. Figure 3 As shown, the system 200 includes the following modules: an extraction module, configured to extract corresponding image data according to the frame header and frame footer of each frame in response to receiving an image; a storage module, configured to store the image data in a storage array, send the image data to the compression engine and determine in turn whether there is image data of the current row in the storage array; a sending module, configured to send the image data of the current row in the storage array to the compression engine in response to the existence of image data of the current row in the storage array; and an execution module, configured to send preset data or data after interpolation processing of the image data of the current row to the compression engine in response to the absence of image data of the current row in the storage array.
[0074] In some embodiments, the execution module is configured to: in response to the current row belonging to the first row or the last row, send preset data to the compression engine; and in response to the current row not belonging to the first row or the last row, read the image data of the rows near the current row and interpolate the current row image data according to the interpolation algorithm, and send the interpolated data to the compression engine.
[0075] In some embodiments, the storage array includes a RAM storage array and a backup RAM storage array, and the storage module is configured to: send the image data in units of rows to the RAM module corresponding to the RAM storage array in a loop, and back up the image data being overwritten in the RAM storage array to the backup RAM module corresponding to the backup RAM storage array.
[0076] In some embodiments, the storage module is configured to: determine whether image data corresponding to the current row exists in the RAM storage array; and in response to the absence of image data corresponding to the current row in the RAM storage array, determine whether image data corresponding to the current row exists in the backup RAM storage array.
[0077] In some embodiments, the system further includes a pointer module configured to: determine a first pointer for operating the RAM storage array and a second pointer for operating the backup RAM storage array, and determine the current positions of the RAM storage array and the backup RAM storage array based on the first pointer and the second pointer.
[0078] In some embodiments, the system further includes an interrupt module configured to send an interrupt signal to the processor in response to the entire frame of image being written into the DDR-SDRAM.
[0079] In some embodiments, the system further includes a transmission module configured to: in response to the processor receiving the interrupt signal, read the compressed image data from the double rate synchronous dynamic random access memory, and send the compressed image data to the peer end.
[0080] Based on the above purpose, the third aspect of the embodiments of the present invention proposes a computer device, including: at least one processor; and a memory, the memory storing computer instructions that can be run on the processor, the instructions being executed by the processor to implement the following steps: S1, in response to receiving an image, extracting corresponding image data based on the frame header and frame footer of each frame; S2, storing the image data in a storage array, sending the image data to a compression engine and determining in turn whether there is image data of the current row in the storage array; S3, in response to the existence of image data of the current row in the storage array, sending the image data of the current row in the storage array to the compression engine; and S4, in response to the absence of image data of the current row in the storage array, sending preset data or data after interpolation processing of the image data of the current row to the compression engine.
[0081] In some embodiments, sending preset data or interpolating the current row image data to the compression engine includes: in response to the current row belonging to the first row or the last row, sending preset data to the compression engine; and in response to the current row not belonging to the first row or the last row, reading image data of rows near the current row and interpolating the current row image data according to an interpolation algorithm, and sending the interpolated data to the compression engine.
[0082] In some embodiments, the storage array includes a RAM storage array and a backup RAM storage array, and storing the image data in the storage array includes: cyclically sending the image data in units of rows to a RAM module corresponding to the RAM storage array, and backing up the image data being overwritten in the RAM storage array to a backup RAM module corresponding to the backup RAM storage array.
[0083] In some embodiments, the sequentially determining whether image data of the current row exists in the storage array includes: determining whether image data corresponding to the current row exists in the RAM storage array; and in response to the absence of image data corresponding to the current row in the RAM storage array, determining whether image data corresponding to the current row exists in the backup RAM storage array.
[0084] In some embodiments, the steps further include: determining a first pointer of the operating RAM storage array and a second pointer of the operating backup RAM storage array, and determining the current positions of the RAM storage array and the backup RAM storage array according to the first pointer and the second pointer.
[0085] In some embodiments, the steps further include: sending an interrupt signal to the processor in response to the entire frame of image being written into the double data rate synchronous dynamic random access memory.
[0086] In some embodiments, the steps further include: in response to the processor receiving the interrupt signal, reading the compressed image data from the double data rate synchronous dynamic random access memory, and sending the compressed image data to the peer end.
[0087] like Figure 4 FIG. 1 is a schematic diagram of the hardware structure of an embodiment of the computer device for dynamic frame interpolation in video compression provided by the present invention.
[0088] As Figure 4 Taking the device shown as an example, the device includes a processor 301 and a memory 302.
[0089] The processor 301 and the memory 302 may be connected via a bus or other means. Figure 4 The bus connection is taken as an example.
[0090] Memory 302, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the program instructions / modules corresponding to the video compression dynamic frame interpolation method in the embodiments of the present application. Processor 301 executes the non-volatile software programs, instructions, and modules stored in memory 302 to execute various server functional applications and data processing, thereby implementing the video compression dynamic frame interpolation method.
[0091] Memory 302 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created using a method for dynamic frame interpolation in video compression, etc. Furthermore, memory 302 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some embodiments, memory 302 may optionally include memory remotely located relative to processor 301, and such remote memory may be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0092] Computer instructions 303 corresponding to one or more video compression dynamic frame interpolation methods are stored in the memory 302 . When executed by the processor 301 , the video compression dynamic frame interpolation method in any of the above method embodiments is executed.
[0093] Any embodiment of a computer device that executes the above-mentioned method for dynamic frame interpolation in video compression can achieve the same or similar effects as any corresponding embodiment of the above-mentioned method.
[0094] The present invention also provides a computer-readable storage medium, which stores a computer program for executing the method for dynamic frame interpolation in video compression when executed by a processor.
[0095] like Figure 5 As shown in FIG, a schematic diagram of an embodiment of the computer storage medium for the video compression dynamic frame supplementation provided by the present invention. Figure 5 Taking the computer storage medium shown as an example, the computer readable storage medium 401 stores a computer program 402 that performs the above method when executed by a processor.
[0096] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above-described method embodiments can be implemented using a computer program to instruct the relevant hardware. The program for the method of video compression dynamic frame interpolation can be stored on a computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. The storage medium for the program can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM). The above-described computer program embodiments can achieve the same or similar effects as any of the corresponding aforementioned method embodiments.
[0097] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope of the embodiments disclosed in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless expressly limited to the singular.
[0098] It should be understood that, as used herein, the singular forms "a" and "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" is intended to include any and all possible combinations of one or more of the associated listed items.
[0099] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0100] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program instructing the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0101] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to limit the scope of the disclosure of the present invention (including the claims) to these examples. Within the spirit of the present invention, the technical features of the above embodiments or different embodiments may be combined, and many other variations exist in different aspects of the above embodiments, which are not provided in detail for the sake of clarity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for dynamic frame interpolation in video compression, characterized in that: The steps include: In response to receiving the image, extracting corresponding image data according to the frame header and frame footer of each frame; storing the image data in a storage array, sending the image data to a compression engine, and sequentially determining whether image data of a current row exists in the storage array; In response to the existence of image data of a current row in the storage array, sending the image data of the current row in the storage array to the compression engine; as well as In response to the absence of image data of the current row in the storage array, sending preset data or data obtained by interpolating the image data of the current row to the compression engine; Among them, sending preset data or interpolating the current row image data to the compression engine includes: in response to the current row belonging to the first row or the last row, sending preset data to the compression engine; and in response to the current row not belonging to the first row or the last row, reading the image data of the rows near the current row and interpolating the current row image data according to the interpolation algorithm, and sending the interpolated data to the compression engine.
2. The method according to claim 1, characterized in that The storage array includes a RAM storage array and a backup RAM storage array, and storing the image data in the storage array includes: The image data is cyclically sent to the RAM module corresponding to the RAM storage array in units of rows, and the image data being overwritten in the RAM storage array is backed up to the backup RAM module corresponding to the backup RAM storage array.
3. The method according to claim 2, characterized in that The step of sequentially determining whether there is image data of the current row in the storage array comprises: Determining whether image data corresponding to the current row exists in the RAM storage array; and In response to the image data corresponding to the current row not existing in the RAM storage array, it is determined whether the image data corresponding to the current row exists in the backup RAM storage array.
4. The method according to claim 1, wherein The method also includes: A first pointer of the operating RAM storage array and a second pointer of the operating backup RAM storage array are determined, and current positions of the RAM storage array and the backup RAM storage array are determined according to the first pointer and the second pointer.
5. The method according to claim 1, wherein The method also includes: In response to the entire frame of image being written into the double rate synchronous dynamic random access memory, an interrupt signal is sent to the processor.
6. The method according to claim 5, characterized in that The method also includes: In response to the processor receiving the interrupt signal, the compressed image data is read out from the double rate synchronous dynamic random access memory, and the compressed image data is sent to the opposite end.
7. A system for dynamic frame interpolation in video compression, characterized in that: include: an extraction module configured to extract corresponding image data according to a frame header and a frame footer of each frame in response to receiving the image; A storage module configured to store the image data in a storage array, send the image data to a compression engine, and sequentially determine whether there is image data of a current row in the storage array; a sending module configured to send the image data of the current row in the storage array to the compression engine in response to the image data of the current row existing in the storage array; as well as an execution module configured to send preset data or data obtained by interpolating the image data of the current row to the compression engine in response to the absence of image data of the current row in the storage array; In which, the execution module is also configured to send preset data to the compression engine in response to the current row belonging to the first row or the last row; and in response to the current row not belonging to the first row or the last row, read the image data of the rows near the current row and interpolate the current row image data according to the interpolation algorithm, and send the interpolated data to the compression engine.
8. A computer device, characterized in that: include: at least one processor; as well as A memory storing computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Image processing method and device and related components
CN113573072A
Dynamic adaptive image compression method, apparatus and device, and readable medium
CN114615209A