Method and System for Data Processing
By encoding and decoding the video frames, the problems of low video compression efficiency and insufficient clarity in the prior art are solved, and more efficient data transmission and clearer decompression effects are achieved, and the ringing effect is avoided.
Patent Information
- Application Number
- CN202110225315.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-08-20
- Filing Date
- 2021-03-01
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2041-03-01
AI Technical Summary
The existing video compression technology performs poorly in the balance between calculation volume and decompression clarity, resulting in low video transmission efficiency and ringing effect, making it difficult to meet the growing clarity requirements.
By encoding spectrum adjustment of the initial frame, the signal strength in the selected frequency domain is reduced, the amount of data information is reduced, and the decoding spectrum adjustment is performed during decoding, filtering the medium and high-frequency areas, restoring the boundary information of the initial frame to improve clarity and avoiding the ringing effect.
Without significantly increasing the calculation amount, the data compression efficiency is improved, the video transmission efficiency and decompression are improved, and the ringing effect is eliminated.
Smart Images

Figure CN114079472B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of data processing, and particularly to a method and system for data processing. Background Art
[0002] With the increasing popularity of Internet technology, especially the popularization of mobile terminals, more and more types of data have emerged in communication networks. With the popularization of computers, more and more data is occupying more and more network and storage resources. For example, video data, audio data, and so on. Data often contains a huge amount of information and has high requirements for storage and transmission. Therefore, in order to facilitate storage and transmission, data often needs to be compressed, and the compressed data is decompressed and restored when needed. Therefore, data compression and decompression technologies have been more and more applied.
[0003] For example, in the past few decades, video and image compression technologies have been more and more applied. Video often contains a huge amount of information. From traditional broadcast film and television to a large number of current monitoring and Internet applications, compressed images and videos are occupying more and more network and storage resources. This makes it take a large amount of network resources if the original data of a video is transmitted from one terminal to another terminal through the network. This makes it difficult to achieve smooth transmission of the picture in some real-time video transmission cases. Therefore, the video data needs to be compressed at the data compression device before transmission to facilitate transmission. After the compressed video is transmitted through the transmission medium to the data decompression device, the data decompression device decompresses the video to at least partially restore the video image.
[0004] The main video compression standards in the prior art are the H.264 and H.265 standards. Before transmission, the video is usually compressed as a whole using a hardware encoder according to the H.264 and H.265 standards, and after transmission, the video is decompressed as a whole through a hardware decoder according to the H.264 and H.265 standards. However, the above method of compressing the video as a whole still cannot satisfy in terms of the balance between the computational complexity and the clarity of the decompressed video. This is because, when the H.264 and H.265 standards process the original video, they need to generate a predicted frame of the original frame through various complex algorithms, and then record the residual between the original frame and the predicted frame. The closer the predicted frame is to the original frame, the smaller the residual, and the smaller the amount of data after encoding a video. To make the encoding easier, a common method is to filter the original frame to reduce the high-frequency information in the original frame image. From the Fourier transform, it can be known that the frequency information is often relatively rich at the boundary of an object in a picture, and the high-frequency components at the boundary are usually greater than those in other smooth regions. Therefore, although the frame image with reduced high-frequency information becomes blurred visually (that is, the clarity of the image is reduced), it can make the residual between the predicted frame and the filtered original frame smaller. In this way, both the computational complexity required for video encoding and the encoded data stream are reduced a lot. However, the technology of frame prediction is very complex and will consume a large amount of computing resources. Taking a video codec system as an example, on average, for every 30% - 40% increase in encoding efficiency, the computational complexity needs to be increased by about 10 times. At the same time, the clarity of the data after decompression is reduced after transmission, and there is often a ringing effect. The ringing effect refers to that in image processing, when performing spectral adjustment processing on an image, if the selected spectral adjustment function has a relatively fast change in value (that is, there is a region where the derivative changes violently), it will cause gray-scale oscillation at the place where the gray-scale changes violently in the output image, just like the air oscillation generated after a bell is struck. The ringing effect often appears at the image boundary. If an output image has a strong ringing effect, it cannot meet the increasing requirements of people for the clarity of data. Therefore, how to further improve the compression efficiency of data, while improving the clarity of the decompressed data and eliminating the ringing effect, has always been the goal pursued in the field of data compression and decompression technology.
[0005] Therefore, in order to improve the transmission efficiency of data and the clarity of the decompressed data, a data processing method and system with higher compression efficiency and clearer data decompression are needed. Summary of the Invention
[0006] This specification provides a data processing method and system with higher compression efficiency and clearer data decompression. Taking video data as an example, the data processing method and system can perform encoding spectrum adjustment on the initial frames in the initial video data, so that the signal intensity of the initial frames in the selected frequency domain is reduced, and the amplitude of the selected regions in the initial frames is smoothly reduced, thereby reducing the data information volume. Then, the spectrum-adjusted data is encoded (predicted and residual calculated) to obtain compressed frames, improving the data compression efficiency. When performing data decompression, the method and system can first decode the compressed frames, and then perform decoded spectrum adjustment on the decoded data using parameters corresponding to the encoding end. The decoded spectrum adjustment can filter the components in the intermediate frequency and high frequency regions of the decoded data, that is, obtain data that is blurrier than the decoded data. Subtracting the decoded data from the data in which the intermediate frequency and high frequency regions are filtered after decoded spectrum adjustment can obtain the boundary information in the initial frames. Adding the boundary information to the decoded data can obtain the decompressed frames. The encoding spectrum adjustment can reduce the data information volume in the initial frames and improve the data compression efficiency when performing prediction and residual calculation. The decoded spectrum adjustment corresponds to the encoding spectrum adjustment, and can restore the compressed data after the encoding spectrum adjustment to the clarity of the initial frames or even higher than the clarity of the initial frames. That is to say, without significantly increasing the computational complexity of encoding and decoding, the decoding end needs to at least restore the decompressed data to the clarity of the initial frames in the important frequencies, and can even obtain clarity exceeding that of the initial frames. Therefore, there is a corresponding relationship between the encoding spectrum adjustment function and the decoded spectrum adjustment function. To eliminate the ringing effect, the encoding spectrum adjustment function and the decoded spectrum adjustment function should have a smooth transition in the time domain and frequency domain ranges to avoid the ringing effect. Since the initial frames only undergo signal attenuation in the frequency domain rather than filtering in the frequency domain in the important frequency regions, the information in the important frequency domains is not missing. Therefore, the encoding spectrum adjustment function and the decoded spectrum adjustment function can be designed based on their relationship and respective characteristics to restore the information in the important frequencies of the initial frames. The method and system can significantly improve the data compression efficiency, enhance the data transmission efficiency, avoid the ringing effect at the same time, and improve the clarity of the decompressed data.
[0007] Based on this, in a first aspect, this specification provides a data processing method, including: obtaining compressed data, where the compressed data includes a compressed frame obtained by compressing an initial frame; and decompressing the compressed frame to obtain a decompressed frame, including: performing decoded spectrum adjustment on the frame to be decoded, and finding the difference between the frame to be decoded and the data after the frame to be decoded has undergone the decoded spectrum adjustment to obtain a boundary frame, where the frame to be decoded includes the compressed frame and any data state before the compressed frame becomes the decompressed frame during the data decompression process, and the boundary frame includes boundary information of the initial frame; and superimposing the boundary frame and the frame to be decoded to obtain the decompressed frame; where there is a preset association relationship between the encoded spectrum adjustment and the decoded spectrum adjustment.
[0008] In some embodiments, the data compression includes encoded spectrum adjustment to smoothly reduce the amplitude of the frame being compressed in the intermediate frequency region in the frequency domain, where the frame being compressed includes the initial frame and any data state before the initial frame becomes the compressed frame during the data compression process.
[0009] In some embodiments, the decoded spectrum adjustment smoothly reduces the amplitude of the frame to be decoded in the frequency domain to filter components in the intermediate frequency to high frequency regions.
[0010] In some embodiments, the encoded spectrum adjustment includes convolving the frame being compressed with an encoding convolution kernel; the decoded spectrum adjustment includes convolving the frame to be decoded with a corresponding decoding convolution kernel based on the decoding convolution kernel, where the ratio of the absolute value of the sum of negative coefficients to the sum of non-negative coefficients in the decoding convolution kernel is less than 0.1.
[0011] In some embodiments, the performing decoded spectrum adjustment on the frame to be decoded and finding the difference between the frame to be decoded and the data after the frame to be decoded has undergone the decoded spectrum adjustment to obtain a boundary frame includes: decoding the compressed frame to obtain a decoded frame, where the frame to be decoded includes the decoded frame; performing the decoded spectrum adjustment on the decoded frame to obtain a decoded spectrum adjustment frame, where the intermediate frequency to high frequency region components of the decoded frame are filtered in the decoded spectrum adjustment frame; finding the difference between the decoded frame and the decoded spectrum adjustment frame to obtain the boundary information; and adjusting the boundary information based on an adjustment coefficient to obtain the boundary frame, where the adjustment coefficient is a real number greater than 0.
[0012] In some embodiments, the superimposing the boundary frame and the frame to be decoded to obtain the decompressed frame includes: superimposing the boundary frame and the frame to be decoded to obtain a superimposed frame; and using the superimposed frame as the decompressed frame.
[0013] In some embodiments, obtaining the decompressed frame by superimposing the boundary frame and the in-decompression frame includes: superimposing the boundary frame and the in-decompression frame to obtain a superimposed frame; and performing boundary adjustment on the superimposed frame to obtain the decompressed frame.
[0014] In some embodiments, performing boundary adjustment on the superimposed frame includes: partitioning the superimposed frame based on the element values of the superimposed frame, where the superimposed frame includes: a concave point region, the concave point region including elements corresponding to local minima; and a convex point region, the convex point region including elements corresponding to local maxima; obtaining boundary values corresponding to each element in the concave point region and the convex point region in the superimposed frame; based on a preset boundary threshold, adjusting elements in the concave point region and the convex point region whose boundary values are greater than the boundary threshold to obtain adjustment values; and adjusting the superimposed frame based on the adjustment values to obtain the decompressed frame.
[0015] In some embodiments, the encoded spectrum adjustment corresponds to the decoded spectrum adjustment, such that the amplitude of the decompressed frame at any frequency in the low-frequency to mid-frequency region is not less than 85% of the initial frame.
[0016] In some embodiments, the encoded spectrum adjustment has an amplitude adjustment gain greater than zero for any frequency in the low-frequency to mid-frequency region of the in-compression frame in the frequency domain.
[0017] In some embodiments, the data decompression causes the amplitude of the decompressed frame to increase smoothly relative to the initial frame in the mid-frequency region.
[0018] In some embodiments, the data decompression causes the amplitude of the decompressed frame to increase smoothly relative to the initial frame in the low-frequency region, where the amplitude increase of the decompressed frame in the mid-frequency region is greater than the amplitude increase in the low-frequency region.
[0019] In some embodiments, the data decompression causes the amplitude of the decompressed frame to decrease smoothly relative to the initial frame in the high-frequency region.
[0020] In a second aspect, this specification provides a data processing system, including at least one storage medium and at least one processor. The at least one storage medium includes at least one instruction set for data processing; the at least one processor is communicatively connected to the at least one storage medium. When the system runs, the at least one processor reads the at least one instruction set and executes the data processing method described in this specification according to the instructions of the at least one instruction set.
[0021] Other functions of the data processing method and system provided in this specification will be partially listed in the following description. According to the description, the content introduced by the following numbers and examples will be obvious to those of ordinary skill in the art. The creative aspects of the data processing method, system, and storage medium provided in this specification can be fully explained by practicing or using the methods, devices, and combinations described in the detailed examples below. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] To more clearly illustrate the technical solutions in the embodiments of this specification, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of this specification. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0023] Figure 1 FIG. shows a schematic diagram of a data processing system provided according to an embodiment of this specification;
[0024] Figure 2 FIG. shows a schematic diagram of a data compression device for data processing provided according to an embodiment of this specification;
[0025] Figure 3A FIG. shows a flowchart of data compression and data decompression provided according to an embodiment of this specification;
[0026] Figure 3B FIG. shows a flowchart of data compression and data decompression provided according to an embodiment of this specification;
[0027] Figure 3C FIG. shows a flowchart of data compression and data decompression provided according to an embodiment of this specification;
[0028] Figure 4 FIG. shows a flowchart of a data processing method for compressing data provided according to an embodiment of this specification;
[0029] Figure 5A FIG. shows a curve graph of an encoding spectral adjustment function provided according to an embodiment of this specification;
[0030] Figure 5B FIG. shows a curve graph of an encoding spectral adjustment function provided according to an embodiment of this specification;
[0031] Figure 6 FIG. shows a parameter table of an encoding convolution kernel provided according to an embodiment of this specification;
[0032] Figure 7Shows a flowchart of a data processing method for decompressing compressed frames provided according to an embodiment of the present specification;
[0033] Figure 8A Shows a curve graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification;
[0034] Figure 8B Shows a curve graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification;
[0035] Figure 8C Shows a curve graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification;
[0036] Figure 8D Shows a curve graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification;
[0037] Figure 8E Shows a curve graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification;
[0038] Figure 9A Shows a curve graph of the overall adjustment function H0(f), the encoding spectrum adjustment function H1(f), and the decoding spectrum adjustment function H2(f) in a normal mode provided according to an embodiment of the present specification;
[0039] Figure 9B Shows a curve graph of the overall adjustment function H0(f), the encoding spectrum adjustment function H1(f), and the decoding spectrum adjustment function H2(f) in an enhanced mode provided according to an embodiment of the present specification;
[0040] Figure 10A Shows a parameter table of a decoding convolution kernel provided according to an embodiment of the present specification;
[0041] Figure 10B Shows a parameter table of an encoding convolution kernel in a normal mode provided according to an embodiment of the present specification;
[0042] Figure 10C Shows a parameter table of an encoding convolution kernel in an enhanced mode provided according to an embodiment of the present specification;
[0043] Figure 11 Shows a flowchart of a boundary adjustment method provided according to an embodiment of the present specification;
[0044] Figure 12A Shows an example diagram without boundary adjustment provided according to an embodiment of the present specification; and
[0045] Figure 12B FIG. 1 shows an exemplary diagram for performing boundary adjustment provided according to an embodiment of this specification. DETAILED DESCRIPTION
[0046] The following description provides specific application scenarios and requirements of this specification, aiming to enable those skilled in the art to manufacture and use the content in this specification. For those skilled in the art, various partial modifications to the disclosed embodiments are obvious, and without departing from the spirit and scope of this specification, the general principles defined here can be applied to other embodiments and applications. Therefore, this specification is not limited to the illustrated embodiments, but has the broadest scope consistent with the claims.
[0047] The terms used herein are for the purpose of describing specific example embodiments only and are not restrictive. For example, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" used herein may also include the plural forms. When used in this specification, the terms "comprising", "including", and / or "containing" mean that the associated integers, steps, operations, elements, and / or components exist, but do not exclude the existence of one or more other features, integers, steps, operations, elements, components, and / or groups, or the addition of other features, integers, steps, operations, elements, components, and / or groups in the system / method.
[0048] Considering the following description, these features of this specification and other features, as well as the operations and functions of the related elements of the structure, and the economy of the combination and manufacture of components can be significantly improved. Referring to the accompanying drawings, all of these form a part of this specification. However, it should be clearly understood that the drawings are only for the purpose of illustration and description and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.
[0049] The flowcharts used in this specification illustrate the operations implemented by a system according to some embodiments in this specification. It should be clearly understood that the operations in the flowchart may not be implemented in sequence. On the contrary, the operations may be implemented in reverse order or simultaneously. In addition, one or more other operations may be added to the flowchart. One or more operations may be removed from the flowchart.
[0050] On the one hand, this specification provides a data processing system 100 (hereinafter referred to as system 100). On the second hand, this specification describes a data processing method P200 for compressing data. On the third hand, this specification describes a data processing method P300 for decompressing compressed frames.
[0051] Figure 1The figure shows a schematic diagram of a data processing system 100. The system 100 may include a data compression device 200, a data decompression device 300, and a transmission medium 120.
[0052] The data compression device 200 may receive initial data to be compressed and use the data processing method P200 proposed in this specification to compress the initial data to generate a compressed frame. The data compression device 200 may store data or instructions for executing the data processing method P200 described in this specification and execute the data and / or instructions.
[0053] The data decompression device 300 may receive the compressed frame and use the data processing method P300 proposed in this specification to decompress the compressed frame to obtain a decompressed frame. The data decompression device 300 may store data or instructions for executing the data processing method P300 described in this specification and execute the data and / or instructions.
[0054] The data compression device 200 and the data decompression device 300 may include a wide range of devices. For example, the data compression device 200 and the data decompression device 300 may include desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld devices such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
[0055] Such as Figure 1As shown, the data compression device 200 and the data decompression device 300 can be connected via a transmission medium 120. The transmission medium 120 can facilitate the transmission of information and / or data. The transmission medium 120 can be any data carrier that can transmit compressed frames from the data compression device 200 to the data decompression device 300. For example, the transmission medium 120 can be a storage medium (e.g., an optical disc), a wired or wireless communication medium. The communication medium can be a network. In some embodiments, the transmission medium 120 can be any type of wired or wireless network, or a combination thereof. For instance, the transmission medium 120 can include a cable network, a wired network, an optical fiber network, a telecommunication network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, a near field communication (NFC) network, or a similar network. One or more components in the data decompression device 300 and the data compression device 200 can be connected to the transmission medium 120 to transmit data and / or information. The transmission medium 120 can include routers, switches, base stations, or other devices that facilitate communication from the data compression device 200 to the data decompression device 300. In other embodiments, the transmission medium 120 can be a storage medium, such as a mass storage device, a removable storage device, a volatile read / write memory, a read-only memory (ROM), or similar content, or any combination thereof. Exemplary mass storage may include non-transitory storage media such as magnetic disks, optical discs, solid state drives, etc. Removable storage may include flash drives, floppy disks, optical discs, memory cards, zip disks, magnetic tapes, etc. Typical volatile read / write memory may include random access memory (RAM). RAM may include dynamic RAM (DRAM), double data rate synchronous dynamic RAM (DDR SDRAM), static RAM (SRAM), thyristor RAM (T-RAM), and zero capacitor RAM (Z-RAM), etc. ROM may include masked ROM (MROM), programmable ROM (PROM), virtual programmable ROM (PEROM), electrically programmable ROM (EEPROM), compact disc read-only memory (CD-ROM), and digital versatile disc ROM, etc. In some embodiments, the transmission medium 120 can be a cloud platform. Merely by way of example, the cloud platform may include forms such as private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, inter-cloud, or forms similar to the above, or any combination of the above.
[0056] As Figure 1As shown, the data compression device 200 receives the initial data and executes the instructions of the data processing method P200 described in this specification to compress the initial data and generate a compressed frame. The compressed frame is transmitted to the data decompression device 300 through the transmission medium 120. The data decompression device 300 executes the instructions of the data processing method P300 described in this specification to decompress the compressed frame and obtain a decompressed frame.
[0057] Figure 2 The figure shows a schematic diagram of a data compression device 200 for data processing. The data compression device 200 can execute the data processing method P200 described in this specification. The data processing method P200 is introduced in other parts of this specification. For example, in Figures 4 to 6 the description, the data processing method P200 is introduced.
[0058] As Figure 2 shown, the data compression device 200 includes at least one storage medium 230 and at least one compression-end processor 220. In some embodiments, the data compression device 200 may further include a communication port 250 and an internal communication bus 210. At the same time, the data compression device 200 may further include an I / O component 260.
[0059] The internal communication bus 210 can connect different system components, including the storage medium 230 and the compression-end processor 220.
[0060] The I / O component 260 supports input / output between the data compression device 200 and other components.
[0061] The storage medium 230 may include a data storage device. The data storage device may be a non-transitory storage medium or a transitory storage medium. For example, the data storage device may include one or more of a magnetic disk 232, a read-only storage medium (ROM) 234, or a random access storage medium (RAM) 236. The storage medium 230 further includes at least one instruction set stored in the data storage device. The instructions are computer program code, and the computer program code may include programs, routines, objects, components, data structures, processes, modules, etc. for executing the data processing method provided in this specification.
[0062] The communication port 250 is used for data communication between the data compression device 200 and the outside world. For example, the data compression device 200 can be connected to the transmission medium 120 through the communication port 250.
[0063] At least one compression-side processor 220 is communicatively connected to at least one storage medium 230 via an internal communication bus 210. The at least one compression-side processor 220 is configured to execute the at least one instruction set. When the system 100 is running, the at least one compression-side processor 220 reads the at least one instruction set and executes a data processing method P200 according to the instructions of the at least one instruction set. The compression-side processor 220 can execute all steps included in the data processing method P200. The compression-side processor 220 can be in the form of one or more processors. In some embodiments, the compression-side processor 220 can include one or more hardware processors, such as a microcontroller, a microprocessor, a reduced instruction set computer (RISC), an application-specific integrated circuit (ASIC), an application-specific instruction set processor (ASIP), a central processing unit (CPU), a graphics processing unit (GPU), a physics processing unit (PPU), a microcontroller unit, a digital signal processor (DSP), a field-programmable gate array (FPGA), an advanced RISC machine (ARM), a programmable logic device (PLD), any circuit or processor capable of executing one or more functions, etc., or any combination thereof. Merely for illustrative purposes, only one compression-side processor 220 is described in the data compression device 200 in this specification. However, it should be noted that the data compression device 200 in this specification can also include multiple processors. Therefore, the operations and / or method steps disclosed in this specification can be executed by one processor as described in this specification or jointly executed by multiple processors. For example, if the compression-side processor 220 of the data compression device 200 in this specification executes step A and step B, it should be understood that step A and step B can also be jointly or separately executed by two different compression-side processors 220 (e.g., the first processor executes step A, the second processor executes step B, or the first and second processors jointly execute steps A and B).
[0064] Although the above structure describes the data compression device 200, this structure is also applicable to the data decompression device 300. The data decompression device 300 can execute the data processing method P300 described in this specification. The data processing method P300 is introduced in other parts of this specification. For example, in Figures 7 to 1 the description of 2, the data processing method P300 is introduced.
[0065] Data processing methods P200, P300 and system 100 can be used for data compression and decompression to improve the transmission efficiency of the data, save resources and space. The data can be non-real-time data or real-time data. There are various types of data in fields ranging from traditional broadcast film and television to a large number of current monitoring and Internet applications. For example, the data can be non-real-time video data, audio data or image data, etc. The data can also be real-time map data, real-time sensor data, real-time video monitoring data, network monitoring data, meteorological data, aerospace data, etc. For instance, the data can be map data received by an autonomous vehicle from a base station during driving. This specification does not limit the specific categories of the data. The methods and steps adopted by the data processing methods and systems described in this specification are the same when processing different categories of data. For the convenience of demonstration, this specification will describe the processing of video data as an example.
[0066] The data processing methods P200, P300 and the system 100 can significantly improve the compression efficiency of video data, and enhance the transmission efficiency and restoration rate of videos. In traditional video compression technologies, the H.264 and H.265 standards are usually used to encode video data to achieve the purpose of compressing the video data. The main technical means used by the H.264 and H.265 standards to encode video data is predictive coding, that is, predicting the initial frame to obtain a predicted value, and then subtracting the predicted value from the initial value of the initial frame to obtain a residual value, thereby compressing the video data. When restoring and decompressing (i.e., decoding), adding the residual value and the predicted value can restore the initial frame. The data processing method P200 can adopt a method combining encoding spectrum adjustment and encoding to perform data compression on the video data to obtain a compressed frame, so as to further improve the compression ratio of the video data and enhance the efficiency of video transmission. The data processing method P300 can adopt a method combining decoding (i.e., restoring the compressed frame according to the residual value and the predicted value) and decoding spectrum adjustment to perform data decompression on the compressed frame to restore the data in the compressed frame. The data processing method P300 can perform decoding spectrum adjustment on the compressed data through a decoding spectrum adjustment function. The decoding spectrum adjustment can make the decoded data avoid the ringing effect; subtracting the compressed data from the decoded data to obtain the boundary information of the initial frame, and superimposing the boundary information on the decoded data can obtain the decompressed frame. Specifically, the decoding spectrum adjustment filters the components in the intermediate frequency and high frequency regions of the decoded data by using a smoothly transitioning low-pass filter. Therefore, the decoded data can effectively avoid the ringing effect, making the decompressed data clearer. The encoding spectrum adjustment refers to adjusting the amplitude of the spectrogram of the data to be processed. For example, the encoding spectrum adjustment can perform amplitude attenuation on the data to be processed in the frequency domain, thereby reducing the amount of information in the data to be processed. For example, attenuating the amplitude of the data to be processed in a selected frequency region in its frequency domain, such as the amplitude of the intermediate frequency region, the amplitude of the high frequency region, such as the amplitude from the low frequency to the intermediate frequency region, or the amplitude from the intermediate frequency to the high frequency region, and so on. Those of ordinary skill in the art can understand that the frequency components of the data after encoding spectrum adjustment become smaller in the selected frequency region, and the amount of information in the data decreases. Therefore, the encoding efficiency of the data after encoding spectrum adjustment can be improved, and the compression ratio can be enhanced. The decoding spectrum adjustment can make the data after the encoding spectrum adjustment completely or approximately restore to the state before the encoding spectrum adjustment without considering other calculation errors, and even exceed the state before the encoding spectrum adjustment. The decoding spectrum adjustment filters the components in the intermediate frequency and high frequency regions of the decoded data through a smoothly transitioning decoding spectrum adjustment function, avoiding the ringing effect in the decompressed data and making the decompressed data clearer.Therefore, the data processing methods P200, P300, and the system 100 can significantly improve the compression efficiency of video data, enhance the transmission efficiency, restoration rate of the video, and the clarity of the decompressed video. The specific processes of the encoding spectrum adjustment and the decoding spectrum adjustment will be introduced in detail in the following description. When the system 100 compresses video data, the order of the encoding spectrum adjustment and the encoding can be interchanged or can be carried out alternately. Similarly, when the system 100 decompresses the compressed frames, the order of the decoding spectrum adjustment and the decoding can be interchanged or can be carried out alternately. It should be noted that to ensure that the data information after decompression can restore the information in the initial data, the order of the data decompression should correspond to the order of the data compression, that is, the data decompression can be symmetrically reversed with the data compression. For example, if the compressed frame is obtained by first performing the encoding spectrum adjustment and then the encoding, the compressed frame should first be decoded and then the decoding spectrum adjustment during data decompression. For the convenience of description, we define the data in the initial frame before data compression processing as P0, the encoding spectrum adjustment function corresponding to the encoding spectrum adjustment as H1(f), the data in the decompressed frame obtained by decompressing through the data decompression device 300 as P4, and the decoding spectrum adjustment function corresponding to the decoding spectrum adjustment as H2(f).
[0067] Figure 3A shows a flowchart of a data compression and data decompression provided according to an embodiment of the present specification. As Figure 3A shown, the data compression of the initial data by the data compression device 200 can be as follows: the data compression device 200 first performs the encoding spectrum adjustment on the initial data P0 using the encoding spectrum adjustment function H1(f), and then performs the encoding, that is, predicts and calculates the residuals for the data after the encoding spectrum adjustment to obtain the predicted data PI and the residual data R, and inputs the predicted data PI and the residual data R into the bitstream generation module for synthesis to obtain the compressed frame. For the convenience of display, we define the data obtained after performing the encoding spectrum adjustment using the encoding spectrum adjustment function H1(f) as P1. Figure 3A The data compression method shown can improve the encoding efficiency, further reduce the amount of data in the compressed frame, and increase the compression ratio.
[0068] The data decompression device 300 decompresses the compressed frame in the following way: The data decompression device 300 first performs the decoding on the compressed frame, that is, based on the bitstream parsing module, the compressed frame is parsed to generate the predicted data PI and the residual data R; then, the predicted frame is obtained by prediction according to the predicted data PI, and is superimposed with the residual data R to obtain the superimposed data P2. Then, the decoding spectrum adjustment is performed on the superimposed data P2 using the decoding spectrum adjustment function H2(f) to obtain the data P C 。The decoding spectrum adjustment prevents the superimposed data from presenting ringing artifacts. Specifically, the decoding spectrum adjustment makes the amplitude of the superimposed data smoothly decrease in the frequency domain to filter out the components in the medium-frequency to high-frequency region. The medium-frequency to high-frequency components in the spectrum of a frame of data are mainly concentrated in the regions where the data changes drastically in this frame of data, that is, the boundary data of the data. For example, for a frame of image, the medium-frequency to high-frequency data is mainly concentrated at the boundaries of the objects in the image, that is, the boundary data of this frame of image. Therefore, the data P C can be understood as removing the boundary data in the superimposed data P2. Next, the difference between the superimposed data P2 and the data P C is calculated to obtain the boundary frame. The boundary frame represents a frame of data from which the boundary data is extracted. For example, for image data, the boundary frame represents the image from which the object boundaries are extracted. Since the decoding spectrum adjustment filters out the components in the medium-frequency to high-frequency region in the superimposed data P2, therefore, the boundary frame obtained by calculating the difference between the superimposed data P2 and the data P C includes the boundary information of the initial frame. For the convenience of display, we define the data in the boundary frame as P E ; the boundary frame P E is superimposed with the superimposed data P2 to obtain the superimposed frame P3; we can directly output the superimposed frame P3 as the decompressed frame P4, or perform boundary adjustment on the superimposed frame P3, and use the result of the boundary adjustment as the decompressed frame P4. For the convenience of display, we define the transfer function between the superimposed frame P3 and the initial data P0 as the overall spectrum adjustment function H0(f). Figure 3A The method shown above can reduce the amount of data in the compressed frame, thereby increasing the compression ratio and encoding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time avoiding ringing artifacts and enhancing the clarity of the decompressed frame. The specific processes of data compression and data decompression will be described in detail in the following content.
[0069] The data compression device 200 can also perform data compression on the initial data by integrating the encoding spectrum adjustment into the encoding process. The encoding spectrum adjustment can be performed at any stage during the encoding process. Correspondingly, the decoding spectrum adjustment can also be performed at the corresponding stage during the decoding process.
[0070] Figure 3B shows a flowchart of data compression and data decompression provided according to an embodiment of the present specification. As Figure 3B shown, the data compression performed by the data compression device 200 on the initial data may be: the data compression device 200 predicts the initial data P0 to obtain a prediction frame and prediction data PI, then performs the encoding spectrum adjustment on the prediction frame and the initial data respectively and takes the difference to obtain residual data R, inputs the prediction data PI and the residual data R into the bitstream generation module for synthesis to generate the compressed frame. Figure 3B The specific operations of the data compression shown Figure 3A are the same as those shown
[0071] In the decompression stage, the data decompression performed by the data decompression device 300 on the compressed frame may be: the data decompression device 300 parses the compressed frame based on the bitstream parsing module to generate the prediction data PI and the residual data R1; performs the decoding spectrum adjustment on the residual data R1, takes the difference between the residual data R1 and the data after the decoding spectrum adjustment, and superimposes the residual data R1 and the data after taking the difference to obtain the residual data R; then predicts according to the prediction data PI to obtain a prediction frame, and superimposes it with the residual data R to obtain the superimposed frame P3; we can directly output the superimposed frame P3 as the decompressed frame P4, or perform boundary adjustment on the superimposed frame P3 and use the result of the boundary adjustment as the decompressed frame P4.
[0072] Figure 3B The method shown can reduce the amount of data in the compressed frame, thereby improving the compression ratio and encoding efficiency of the initial data, enhancing the transmission efficiency of the initial data, and at the same time avoiding the ringing effect and improving the clarity of the decompressed frame.
[0073] Figure 3C shows a flowchart of data compression and data decompression provided according to an embodiment of the present specification. As Figure 3C shown, the data compression performed by the data compression device 200 on the initial data may be: the data compression device 200 performs the encoding, that is, prediction and taking the difference, on the initial data P0 to obtain prediction data PI and residual data R, and then performs the encoding spectrum adjustment on the residual data R; inputs the residual data R1 after the encoding spectrum adjustment and the prediction data PI into the bitstream generation module for synthesis to generate the compressed frame. Figure 3C The specific operations of the data compression method shown Figure 3A are the same as those shown
[0074] During the decompression phase, the data decompression device 300 decompressing the compressed frames may be as follows: The data decompression device 300 parses the compressed frames based on the bitstream parsing module to generate the predicted data PI and the residual data R1; performs the decoded spectrum adjustment on the residual data R1, subtracts the residual data R1 from the data after the decoded spectrum adjustment, and superimposes the residual data R1 with the subtracted data to obtain the residual data R; then predicts a predicted frame based on the predicted data PI and superimposes it with the residual data R to obtain the superimposed frame P3; we can directly output the superimposed frame P3 as the decompressed frame P4, or perform boundary adjustment on the superimposed frame P3 and use the result of the boundary adjustment as the decompressed frame P4.
[0075] Figure 3C The method shown can reduce the amount of data in the compressed frames, thereby increasing the compression ratio and encoding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time avoiding the ringing effect and enhancing the clarity of the decompressed frames.
[0076] Figure 4 The flowchart of a data processing method P200 for compressing data is shown. As mentioned above, the data compression device 200 can execute the data processing method P200. Specifically, the storage medium in the data compression device 200 can store at least one set of instruction sets. The instruction sets are configured to instruct the compression processor 220 in the data compression device 200 to complete the data processing method P200. When the data compression device 200 runs, the compression processor 220 can read the instruction sets and execute the data processing method P200. The method P200 may include:
[0077] S220: Select an initial frame from the initial data.
[0078] A frame is a processing unit that makes up a data sequence. During data processing, calculations are often performed in units of frames. The initial data may include one or more initial frames. The initial frame includes initial data of a preset number of bytes. As described above, in this specification, video data is taken as an example for description. Therefore, the initial data may be initial video data, and the initial frame may be a frame image in the initial video data. In step S220, the data compression device 200 may select a part of the frame images from the initial data as the initial frame, or may select all the frame images in the initial data as the initial frame. The data compression device 200 may select the initial frame according to the application scenario of the initial data. If the initial data is applied to a scenario with low requirements for accuracy and compression quality, a part of the frame images may be selected as the initial frame. For example, in most cases, there are no foreign objects in the monitoring images in secluded places, so most of the frame images of the monitoring images in secluded places are the same. The data compression device 200 may select a part of the frame images from them as the initial frame for compression and transmission. Another example is that for high-definition TV playback videos, in order to ensure the viewing effect, the data compression device 200 may select all the frame images as the initial frame for compression and transmission.
[0079] S240: Perform a data compression operation on the initial frame to obtain a compressed frame.
[0080] The data compression operation includes performing encoding spectrum adjustment on the frame being compressed in an encoding spectrum regulator. The frame being compressed includes the initial frame and any data state of the initial frame before it is called the compressed frame during the data compression process. For example, the frame being compressed includes the initial frame and any data state of the initial frame during the prediction and residual calculation processes. The encoding spectrum adjustment refers to adjusting the amplitude of the spectrogram of the frame being compressed. For example, the encoding spectrum adjustment can be completed by an attenuator. The attenuator can perform amplitude attenuation on the frame being compressed in the frequency domain, thereby reducing the amount of data information in the frame being compressed.
[0081] For example, the attenuator is configured to reduce the amplitude of the selected region of the compressed frame in its frequency domain, such as the amplitude of the intermediate frequency region, the amplitude of the high frequency region, the amplitude of the low frequency to intermediate frequency region, and the amplitude of the intermediate frequency to high frequency region, etc. For different forms of data, the receiver has different sensitivity to frequency, so the data compression operation can select different regions in the frequency domain for amplitude attenuation according to different forms of data. As mentioned above, taking video data as an example, since the edge of the object in the picture is rich in intermediate frequency and high frequency information, and the intermediate frequency and high frequency regions will carry more data, reducing the amplitude of the intermediate frequency to high frequency region will visually blur the boundary data of the compressed frame, and will also greatly reduce the amount of information in the image. It should be noted that reducing the amplitude of the low frequency region will also reduce the amount of information in the image. It can be understood by ordinary technicians in this field that compared with the case where the coding spectrum adjustment process is not performed, the frequency component of the low frequency to high frequency region in the intermediate state frame after the coding spectrum adjustment process is reduced, and the amount of data information is also reduced, so the intermediate state frame after the coding spectrum adjustment process will have a higher compression ratio in encoding. Different types of data may have different definitions for low frequency, medium frequency and high frequency areas. In some embodiments, the high frequency may include frequencies between (0.33, 0.5] in the normalized frequency domain. For example, the high frequency may include the interval between any two frequencies of 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5 in the normalized frequency domain, where 0.5 is the maximum frequency of the normalization.
[0082] Taking video data compression as an example, the data processing method P200 can compress the initial frame by combining coding spectrum adjustment and coding, so that the amplitude of the intermediate frequency region is steadily reduced to reduce the amount of data information, further improve the compression ratio of video data, and improve the efficiency of video transmission. The compressed frame can include any data state of the initial frame during the coding spectrum adjustment and coding process, such as an initial frame, a predicted frame, a residual frame, and the like.
[0083] As mentioned above, when the data compression is performed on the initial frame, the order of the coding spectrum adjustment and the coding can be interchangeable or performed in an interleaved manner. Step S240 may include: Figure 3A , Figure 3B and Figure 3C At least one of the data compression methods shown in .
[0084] For the convenience of presentation, this manual will use Figure 3ATaking the shown method as an example, step S240 will be described in detail, that is, the data compression device 200 first performs the encoded spectrum adjustment on the initial frame, and then compresses the initial frame after the encoded spectrum adjustment (i.e., prediction and residual calculation). That is to say, the data compression device 200 can first perform the encoded spectrum adjustment on the initial frame to smoothly reduce the amplitude of the initial frame in the frequency domain, thereby blurring the boundary information of the initial frame to obtain an encoded spectrum adjustment frame, so as to reduce the amount of information in the initial frame, thereby reducing the space resources occupied after the compression of the initial frame, where the frame being compressed includes the encoded spectrum adjustment frame; then encode the encoded spectrum adjustment frame, that is, perform prediction and residual calculation, predict the encoded spectrum adjustment frame to obtain the prediction frame of the encoded spectrum adjustment frame and the prediction data PI; then subtract the prediction frame of the encoded spectrum adjustment frame from the initial frame of the encoded spectrum adjustment frame to obtain the residual data R of the encoded spectrum adjustment frame, and input the residual data R and the prediction data PI into the bitstream generation module for synthesis to obtain the compressed frame. The data processing method P200 can improve the encoding efficiency of the encoded spectrum adjustment frame, further reduce the amount of data in the compressed frame, improve the encoding efficiency, and increase the compression ratio. Since the object of the encoded spectrum adjustment is the initial frame, the frame being compressed is the initial frame. Taking video data as an example, in step S240, the data compression of the frame being compressed (initial frame) may include being executed by at least one compression end processor 220 of the data compression device 200:
[0085] S242: Perform the encoded spectrum adjustment on the frame being compressed (initial frame) to obtain the encoded spectrum adjustment frame. Wherein, the encoded spectrum adjustment includes convolving the frame being compressed with an encoded convolution kernel so as to smoothly reduce the amplitude of the frame being compressed in the intermediate frequency region. In step S242, the encoded spectrum adjustment of the frame being compressed may include being executed by at least one compression end processor 220 of the data compression device 200:
[0086] S242-2: Determine the frame type of the initial frame.
[0087] Taking video data as an example for illustration. A frame is a common processing unit that composes a video data sequence. When processing video data, calculations are often performed in units of frames. When encoding video data using the H.264 or H.265 standard, frames are often compressed into different frame types according to the frame images. Therefore, before the data compression device 200 performs the encoded spectrum adjustment on the frame being compressed (initial frame), it is necessary to first determine the frame type of the initial frame, and different encoded convolution kernels are selected for different frame types.
[0088] For a video frame sequence, specific frame types may include Intra Picture (I-frame for short), Predictive Frame (P-frame for short), and Bi-directional Predictive Frame (B-frame for short). For a frame sequence with only one frame, it is usually processed as an Intra Picture (I-frame). An I-frame is a fully intra-frame compressed coded frame. When decoding, only the data of the I-frame is used, and the complete data can be reconstructed without referring to other pictures, and it can be used as a reference frame for several subsequent frames. A P-frame is a coded frame that compresses the amount of transmitted data by fully reducing the temporal redundancy information with the previously coded frames in the image sequence. A P-frame is predicted from the P-frame or I-frame in front of it, and it compresses this frame based on the differences between this frame and the adjacent previous frame or several frames. The method of jointly compressing P-frames and I-frames can achieve higher compression without obvious compression artifacts. It only refers to the I-frame or P-frame close to it in the front. A B-frame compresses this frame based on the differences between several adjacent previous frames, this frame, and several subsequent frames, that is, only records the differences between this frame and the front and back frames. Generally, the compression efficiency of I-frames is the lowest, that of P-frames is higher, and that of B-frames is the highest. During the encoding process of video data, some video frames will be compressed into I-frames, some will be compressed into P-frames, and some will be compressed into B-frames.
[0089] The frame type of the initial frame includes at least one or more of I-frame, P-frame, and B-frame.
[0090] S242-4: Based on the frame type of the initial frame, select a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel, and perform convolution on the frame being compressed to obtain an encoded spectral adjustment frame.
[0091] Performing spectral adjustment on the frame being compressed can be expressed as multiplying the frame being compressed by a transfer function H1(f) (i.e., the encoded spectral adjustment function) in the frequency domain or performing corresponding convolution calculations in the time domain. If the frame being compressed is digitized data, the convolution operation can be to select an encoding convolution kernel corresponding to the encoded spectral adjustment function H1(f) for convolution operation. For the convenience of description, this specification will describe the spectral adjustment by taking convolution in the time domain as an example, but those skilled in the art should understand that the method of performing spectral adjustment by multiplying the encoded spectral adjustment function H1(f) in the frequency domain is also within the scope protected by this specification.
[0092] As described above, performing the encoding spectrum adjustment on the in-press frame can be manifested as convolving the in-press frame in the time domain. Multiple encoding spectrum adjusters, that is, the encoding spectrum adjuster group, can be stored in the storage medium of the data compression device 200. Each encoding spectrum adjuster includes an encoding convolution kernel group. That is to say, the storage medium of the data compression device 200 can include the encoding convolution kernel group, and the encoding convolution kernel group can include at least one convolution kernel. When the data compression device 200 performs convolution on the in-press frame, it can select a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel based on the frame type of the in-press frame corresponding to the initial frame, and perform convolution on the in-press frame. When the in-press frame corresponding to the initial frame is an I-frame or a P-frame, the data compression device 200 performing convolution on the I-frame or P-frame includes selecting a convolution kernel from the encoding convolution kernel group as the encoding convolution kernel and performing convolution on the I-frame or P-frame. Any convolution kernel in the convolution kernel group can reduce the amplitude of the I-frame or P-frame in the frequency domain, and smoothly reduce the amplitude in the intermediate frequency region. The data compression device 200 can also select a convolution kernel with the best compression effect from the encoding convolution kernel group as the encoding convolution kernel according to the encoding quality requirement for the initial frame. When the in-press frame corresponding to the initial frame (in this embodiment, that is, the initial frame) is a B-frame, the encoding convolution kernel of the in-press frame is the same as the encoding convolution kernel corresponding to the reference frame closest to the in-press frame, or the encoding convolution kernel of the in-press frame is the same as the encoding convolution kernel corresponding to the reference frame with the greatest attenuation degree among the two closest reference frames in adjacent directions, or the encoding convolution kernel of the in-press frame takes the average value of the encoding convolution kernels corresponding to the two closest reference frames in adjacent directions. This can make the reduction effect of the amplitude of the in-press frame (initial frame) better, the effect of encoding spectrum adjustment better, and the compression ratio of video data higher.
[0093] Figure 5A The figure shows a curve graph of an encoding spectrum adjustment function H1(f) provided according to an embodiment of the present specification. As Figure 5A shown, the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H1 of the encoding spectrum adjustment function H1(f). Figure 5A Curves 1 and 2 in the figure represent different encoding spectrum adjustment functions H1(f) corresponding to different encoding convolution kernels. The normalized frequency f on the horizontal axis can be divided into a low-frequency region, a mid-low frequency region, a mid-frequency region, a mid-high frequency region, and a high-frequency region. As Figure 5AAs shown, the maximum value of the normalized frequency on the horizontal axis is 0.5. As described above, the high-frequency region may include frequencies between (d, 0.5] in the normalized frequency domain, where d is the lower frequency limit of the high-frequency region. For example, d can be any one of the frequencies 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, and 0.45 in the normalized frequency domain. The intermediate-frequency region may include frequencies between (b, c], where b is the lower frequency limit of the intermediate-frequency region and c is the upper frequency limit of the intermediate-frequency region. For example, the lower frequency limit b of the intermediate-frequency region can be any one of the frequencies 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, and 0.28 in the normalized frequency domain; the upper frequency limit c of the intermediate-frequency region can be any one of the frequencies 0.35, 0.34, 0.33, 0.32, and 0.31 in the normalized frequency domain. The low-frequency region may include frequencies between [0, a] in the normalized frequency domain, where a is the upper frequency limit of the low-frequency region. The upper frequency limit a of the low-frequency region can be any one of the frequencies 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.13, 0.14, and 0.15 in the normalized frequency domain. When the low-frequency region is not connected to the intermediate-frequency region, the frequency region between them is called the mid-low-frequency region. When the intermediate-frequency region is not connected to the high-frequency region, the frequency region between them is called the mid-high-frequency region.
[0094] Taking video data as an example, since the human eye is more sensitive to low-frequency to medium-frequency data than to high-frequency data, when the coding spectrum adjustment is performed on the initial frame in the video data, the low-frequency to medium-frequency information contained in the initial frame should be retained as much as possible without loss, and the amplitude gain of the medium-frequency and low-frequency regions should be kept relatively stable, so that the information in the low-frequency to medium-frequency region can be as relatively stable and complete as possible, so that the information in the low-frequency to medium-frequency region can be better restored during decompression. Therefore, the coding spectrum adjustment function H1(f) used in the coding spectrum adjustment can be greater than zero for the amplitude adjustment gain H1 at any frequency f in the low-frequency to medium-frequency region of the compressed frame (initial frame) in the frequency domain, and the amplitudes of all frequencies in the low-frequency to medium-frequency region after being processed by the coding spectrum adjustment function H1(f) are also greater than zero, and no data of any frequency will be lost in the low-frequency to medium-frequency region. Therefore, when the compressed data is decompressed, the data in all frequency ranges of the low-frequency to medium-frequency region can be restored. Otherwise, if there is a zero point in the low-frequency to medium-frequency region of the coding spectrum adjustment function H1(f), the data of the frequency portion corresponding to the zero point may be lost, and the decoder will not be able to recover the lost data during decompression, and therefore the initial data cannot be recovered. As mentioned above, we define the data of the initial frame as P0, and define the data obtained after the initial frame is processed by the coding spectrum adjustment function H1(f) as P1. Therefore, the data of the coding spectrum adjustment frame is defined as P1. The relationship between P0 and P1 can be expressed as formula (1):
[0095] P1=H1(f)·P0 Formula (1)
[0096] Since the human eye is relatively insensitive to high-frequency data, when the coding spectrum is adjusted for the initial frame of the video data, the amplitude of the high-frequency part can be attenuated to a greater extent, thereby further reducing the amplitude of the high-frequency region. In this way, the data information contained in the initial frame can be reduced, and the compression ratio and coding efficiency can be improved.
[0097] Therefore, the encoding spectrum adjustment function H1(f) used for the encoding spectrum adjustment can smoothly reduce the amplitude of the compressed frame in the frequency domain. In some embodiments, the encoding spectrum adjustment function H1(f) used for the encoding spectrum adjustment can smoothly reduce the amplitude of the compressed frame in the high-frequency region of its frequency domain. The smooth reduction of the amplitude can be that the amplitude decays with a first amplitude adjustment gain value, or that the amplitude decays within a certain error range near the first amplitude adjustment gain value. For example, the first amplitude adjustment gain can be any value between 0 and 1. For example, the first amplitude adjustment gain can be within the range defined by any two of the values 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, 0.76, 0.80, 0.84, 0.88, 0.92, 0.96, and 1. The error range can be within the range defined by any two of the values 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11%, ±12%, ±13%, ±14%, ±15%, ±16%, ±17%, ±18%, ±19%, ±20%, ±21%, ±22%, ±23%, ±24%, ±25%, ±26%, ±27%, ±28%, ±29%, ±30%. As Figure 5A shown, the first amplitude adjustment gain of the encoding spectrum adjustment in the high-frequency region (approximately in the range of 0.4 - 0.5) is about 0.2.
[0098] In some embodiments, the encoding spectrum adjustment function H1(f) used for the encoding spectrum adjustment can smoothly reduce the amplitude of the compressed frame in the middle-frequency region in the frequency domain. Among them, the amplitude adjustment gain of the encoding spectrum adjustment for the middle-frequency region of the compressed frame is the second amplitude adjustment gain. In some embodiments, the value of the second amplitude adjustment gain can be greater than the first amplitude adjustment gain, as Figure 5A shown. When the encoding spectrum adjustment is frequency attenuation (that is, when the encoding spectrum adjuster is the frequency attenuator), both the first amplitude adjustment gain and the second amplitude adjustment gain are less than 1. That is to say, the amplitude reduction amplitude of the encoding spectrum adjustment for the middle-frequency region of the compressed frame can be lower than the amplitude reduction amplitude of the high-frequency region.
[0099] In addition, the coding spectrum adjustment function H1(f) can also smoothly reduce the amplitude of the low-frequency region of the compressed frame in the frequency domain. Among them, the amplitude adjustment gain of the coding spectrum adjustment to the low-frequency region of the compressed frame is the third amplitude adjustment gain. When the coding spectrum is adjusted to frequency attenuation (that is, when the coding spectrum adjuster is the frequency attenuator), the third amplitude adjustment gain and the second amplitude adjustment gain are both less than 1. The value of the third amplitude adjustment gain can be greater than or equal to the second amplitude adjustment gain. That is to say, the amplitude reduction amplitude of the low-frequency region of the compressed frame by the coding spectrum adjustment can be lower than or equal to the amplitude reduction amplitude of the intermediate frequency region.
[0100] Furthermore, in order to avoid the occurrence of ringing effects, the coding spectrum adjustment function H1(f) should make the amplitude of the initial frame in the frequency domain transition smoothly. As mentioned above, when an image is subjected to spectrum adjustment processing, if the selected spectrum adjustment function has an area with drastic changes in value, the output image will produce a strong color oscillation at the grayscale or color where the color changes drastically, which is called the ringing effect. The ringing effect often appears at the image boundary. By making the coding spectrum adjustment function H1(f) smoothly transition the amplitude adjustment gain of the initial frame in the frequency domain, the drastic change of the amplitude adjustment gain can be avoided. For example, when the high-frequency area is not connected to the medium-frequency area, the coding spectrum adjustment function H1(f) can adjust the amplitude of the medium-high frequency area of the compressed frame in the frequency domain, so that the amplitude adjustment gain changes smoothly and continuously in the medium-high frequency area. When the mid-frequency region is not connected to the low-frequency region, the coding spectrum adjustment function H1(f) can adjust the amplitude of the mid- and low-frequency regions of the compressed frame in the frequency domain so that the amplitude adjustment gain changes continuously in the mid- and low-frequency regions.
[0101] The coding spectrum adjustment function H1(f) can also keep the DC part, that is, the amplitude adjustment gain of the part with a frequency of 0 is 1, so as to ensure that the basic information in the initial frame can be retained, and the average value information can be obtained when the data is decompressed to restore the original initial data. Therefore, the amplitude reduction amplitude of the low-frequency area of the coding spectrum adjustment function H1(f) used in the coding spectrum adjustment is lower than the amplitude reduction amplitude of the intermediate frequency area. However, when the amplitude gain of the DC part (that is, the part with a frequency of 0) is not 1, the initial data can also be restored by designing a suitable decoding spectrum adjustment function H2(f). The specific relationship between H1(f) and H2(f) will be introduced in detail in the following description.
[0102] like Figure 5AIn the curve graph of the encoded spectrum adjustment function H1(f) shown, the frequencies between (0, 0.1] belong to the low frequency; the frequencies between (0.1, 0.15] belong to the medium-low frequency; the frequencies between (0.15, 0.33] belong to the medium frequency; the frequencies between (0.33, 0.4] belong to the medium-high frequency; the frequencies between (0.4, 0.5] belong to the high frequency. The third amplitude adjustment gain in the low-frequency region is greater than the second amplitude adjustment gain in the medium-frequency region; the second amplitude adjustment gain in the medium-frequency region is greater than the first amplitude adjustment gain in the high-frequency region. At the same time, the second amplitude adjustment gain in the medium-frequency region is relatively stable, with curve 1 around 0.5 and curve 2 around 0.6; the first amplitude adjustment gain H1 in the high-frequency region is also relatively stable, with curve 1 slightly lower than 0.2 and curve 2 slightly higher than 0.2. The curve of the encoded spectrum adjustment function H1(f) is a smoothly transitional curve. In engineering implementation, on the basis of achieving amplitude reduction, small fluctuations in the curve of the encoded spectrum adjustment function H1(f) are allowed, and such fluctuations do not affect the compression effect. For data in other forms than video data, the parameters of the encoded spectrum adjustment function H1(f) can be set according to the sensitivity of the receiver to the data. For different forms of data, the receiver's sensitivity to frequencies is different.
[0103] Figure 5B shows a curve graph of an encoded spectrum adjustment function H1(f) provided according to an embodiment of the present specification. Figure 5B Curves 3 and 4 in it represent different encoded spectrum adjustment functions H1(f) corresponding to different encoded convolutional kernels. For video data, in some special application scenarios, it is necessary to appropriately retain more high-frequency components, such as in reconnaissance scenarios. Therefore, in some embodiments, in the curve of the encoded spectrum adjustment function H1(f), the first amplitude adjustment gain can be greater than the second amplitude adjustment gain (curve 3), or equal to the second amplitude adjustment gain (curve 4).
[0104] For video data, in some application scenarios with low requirements for image quality, high-frequency components can be completely filtered out. Therefore, for any frequency in the low-frequency to medium-frequency region in the frequency domain of the frame being compressed (initial frame), the amplitude adjustment gain H1 of the encoded spectrum adjustment function H1(f) used for the encoding spectrum adjustment is greater than zero, while the amplitude adjustment gain H1 for the high-frequency region can be equal to 0 ( Figure 5A and Figure 5B not shown in).
[0105] It should be noted that Figure 5A and Figure 5B the curves shown are only for illustration with video data as an example, and those skilled in the art should understand that the curve of the encoded spectrum adjustment function H1(f) is not limited to Figure 5Aand Figure 5B in the form shown, all encoding spectral adjustment functions H1(f) that can smoothly reduce the amplitude of the intermediate frequency region of the initial frame in the frequency domain, as well as linear combinations of encoding spectral adjustment functions or product combinations of encoding spectral adjustment functions or combinations of linear combinations and product combinations are within the scope of protection of this specification. Wherein, i≥1, represents a linear combination of n functions, and H 1i (f) represents the i-th function, and k i represents the weight corresponding to the i-th function. j≥1, represents a product combination of n functions, and k j represents the weight corresponding to the j-th function, and H 1j (f) can be any function.
[0106] Figure 6 shows a parameter table of an encoding convolution kernel provided according to an embodiment of this specification. Figure 6 Exemplarily list the parameters of an encoding convolution kernel, wherein, Figure 6 each row in represents an encoding convolution kernel. For an 8-bit video image, it is necessary to ensure that the gray value of the pixel points in the encoded spectral adjustment frame obtained after encoding convolution is within 0-255. Therefore, in this embodiment, the result after convolution needs to be divided by 256. The encoding convolution kernel is obtained by Fourier transform based on the encoding spectral adjustment function H1(f). Figure 6 in is only an exemplary illustration, and those skilled in the art should know that the encoding convolution kernel is not limited to Figure 6 the parameters shown, and all encoding convolution kernels that can smoothly reduce the amplitude of the intermediate frequency region of the initial frame in the frequency domain are within the scope of protection of this specification.
[0107] It should be noted that in order to avoid the ringing effect, the encoding spectral adjustment function H1(f) is a smoothly transitioning curve to avoid a sharp change in the amplitude adjustment gain in the curve. As mentioned above, the ringing effect refers to the fact that when performing spectral adjustment processing on an image in image processing, if the selected spectral adjustment function has a rapid change, it will cause "ringing" in the image. The so-called "ringing" refers to the oscillation generated at the location of a sharp change in the gray value of the output image, just like the air oscillation generated after a bell is struck. The ringing effect often appears at the image boundary.
[0108] The ratio of the absolute value of the sum of the negative coefficients to the sum of the non - negative coefficients in the coding convolution kernel corresponding to the coding spectrum adjustment function H1(f) should be less than 0.1. For example, in some embodiments, the convolution kernel coefficients in the coding convolution kernel can all be non - negative numbers. Taking video data as an example, when there are many negative coefficients in the coding convolution kernel, the pixel values at the image boundary differ greatly. A large pixel value multiplied by a negative coefficient will make the final result of the convolution smaller, which is reflected in the image as darker pixels. If the convolution result is negative and the absolute value of the negative number is large, when calculating the convolution result using unsigned integer calculation, it may cause the unsigned integer calculation result to be reversed, taking the unsigned complement value of the negative number, which will lead to the convolution result becoming larger, and is reflected in the image as brighter pixels. Therefore, when designing the coding convolution kernel, the coefficients of the coding convolution kernel can all be non - negative numbers, or the ratio of the absolute value of the sum of the negative coefficients to the sum of the non - negative coefficients in the coding convolution kernel should be less than 0.1, that is, a small number of negative coefficients with small absolute values are allowed to appear in the coding convolution kernel.
[0109] When the data compression device 200 performs convolution on the frame - in - progress using the coding convolution kernel, it can perform convolution on the frame - in - progress (initial frame) in at least one of the vertical direction, horizontal direction, and diagonal direction.
[0110] It should be noted that when performing convolution on the frame - in - progress, the data processing unit for processing can be a frame of data or a part of a frame of data. Taking video data as an example, this unit can be a frame or a field of an image, or a part of a frame / field of an image. For example, in video coding, an image is further divided into slices, tiles, coding units (CUs), macroblocks, or blocks. The convolution object includes, but is not limited to, a part of the image segmentation units described by the above nouns. For different processing units, the same coding convolution kernel can be selected, or different coding convolution kernels can be selected.
[0111] S244: Perform the coding (prediction and residual calculation) on the coded spectrum adjustment frame to obtain the prediction data PI and the residual data R.
[0112] S246: Input the prediction data PI and the residual data R into the bit - stream generation module for synthesis to obtain the compressed frame.
[0113] After the data compression device 200 performs the encoded spectrum adjustment on the initial frame, the encoded spectrum adjustment frame is obtained, and the frequency components from low frequency to high frequency in the encoded spectrum adjustment frame are less than those in the initial frame. Therefore, by performing encoding and bitstream generation calculations on the frame being compressed (initial frame) after the encoded spectrum adjustment, the data compression device 200 can improve the encoding efficiency of the encoded spectrum adjustment frame, thereby increasing the compression ratio of the initial frame and enhancing the transmission efficiency of the initial data.
[0114] Figure 7 The flowchart of a data processing method P300 for decompressing a compressed frame is shown. As described above, the data decompression device 300 can execute the data processing method P300. Specifically, the storage medium in the data decompression device 300 can store at least one set of instruction sets. The instruction sets are configured to instruct the decompression processor in the data decompression device 300 to complete the data processing method P300. When the data decompression device 300 is running, the decompression processor can read the instruction sets and execute the data processing method P300. The method P300 may include:
[0115] S320: Obtain compressed data. The compressed data includes the compressed frame.
[0116] The compressed data may include the compressed frame obtained by performing data compression on the initial frame in the initial data through the data processing method P200. The compressed frame includes compressed predicted data PI and residual data R. As Figure 3A 、 Figure 3B and Figure 3C shown, step S320 may include: inputting the compressed frame into the bitstream parsing module for analysis and calculation to obtain the predicted data PI and the residual data R. As described above, in this application, a frame is a commonly used processing unit for composing a data sequence. During data processing, calculations are often performed in units of frames. In the data processing method P200 for data compression by the data compression device 200, the initial data can be compressed in units of frames. When the data decompression device 300 decompresses the compressed frame, data decompression can also be performed in units of frames. The data compression includes performing the encoded spectrum adjustment on the initial frame.
[0117] S340: Decompress the compressed frame to obtain a decompressed frame.
[0118] The data decompression refers to performing decompression calculations on the compressed frame to obtain a decompressed frame, such that the decompressed frame restores or substantially restores to the initial data, or the decompressed frame is clearer than the initial data. Taking video data as an example, when the amplitude of the decompressed frame at any frequency in the low-frequency to mid-frequency region restores to the threshold value of the initial frame or above, it is difficult for the human eye to perceive the difference between the decompressed frame and the initial frame. The threshold value can be any value between 80% and 90%. For example, the threshold value can be any value within the closed interval defined by any two of the values 80%, 81%, 82%, 83%, 84%, 85%, 86%, 87%, 88%, 89%, 90%. For example, the data decompression should ensure that the amplitude of the decompressed frame at any frequency in the low-frequency to mid-frequency region is not less than 85% ± 3% of the initial frame.
[0119] The data decompression includes performing decoded spectrum adjustment on the frame being decompressed and further processing the data after the decoded spectrum adjustment to obtain the required decompressed frame. The frame being decompressed is a frame of data being decompressed, including the compressed frame and any data state of the compressed frame before it becomes the decompressed frame during the decompression process. Taking video data as an example, the data processing method P200 uses a method combining encoded spectrum adjustment and encoding to compress the initial frame to further improve the compression ratio of video data and enhance the efficiency of video transmission. In video decompression technology, the data processing method P300 can use a method combining decoding (i.e., restoring the frame being compressed based on the residual data R and the predicted data PI) and decoded spectrum adjustment to decompress the compressed frame to obtain the required decompressed frame to restore the data in the compressed frame. The frame being decompressed can include the compressed frame and any data state during the decoding process of the compressed frame based on the predicted data PI and the residual data R. For example, the frame being decompressed can be the compressed frame, or the decoded frame obtained through decoding, or the predicted frame obtained through prediction, etc.
[0120] The decoding spectrum adjustment applied to the decompression of the compressed frame refers to performing decoding spectrum adjustment in the decoding spectrum adjuster for the frame decoding input. In order to make the decoding spectrum adjustment correspond to the encoding spectrum adjustment, that is, there should be a preset correlation between the decoding spectrum adjustment function H2(f) and the encoding spectrum adjustment function H1(f). By carefully setting the correlation between the decoding spectrum adjustment function H2(f) and the encoding spectrum adjustment function H1(f), the compressed frame after the encoding spectrum adjustment can be completely restored or basically restored to the data metrics before the encoding spectrum adjustment (such as the image clarity of image data) after passing through the decoding spectrum adjustment and the data processing, without considering other calculation errors. In some cases, the data even exceeds the data before the encoding adjustment (such as the clarity of the decoded image exceeds the original image). The specific correlation between the decoding spectrum adjustment function H2(f) and the encoding spectrum adjustment function H1(f) is related to the way of data processing for the data after the decoding spectrum adjustment. Different data processing methods result in different correlations between the spectrum adjustment function H2(f) and the encoding spectrum adjustment function H1(f). The specific data processing method and the correlation between the spectrum adjustment function H2(f) and the encoding spectrum adjustment function H1(f) will be specifically introduced in the following description.
[0121] Similar to the encoding spectrum adjustment, the decoding spectrum adjustment can also be performed by convolving in the time domain, so as to adjust the spectrum of the frame decoding in the frequency domain with the decoding spectrum adjustment function H2(f) (i.e., the decoding transfer function). Therefore, there should also be a corresponding correlation between the decoding convolution kernel used for the decoding spectrum adjustment and the encoding convolution kernel used for the encoding spectrum adjustment. By selecting the decoding spectrum adjustment function H2(f) and the decoding convolution kernel corresponding to the encoding spectrum adjustment function H1(f) and the encoding convolution kernel, the two methods can achieve the same effect. For the convenience of description, this specification will take convolution in the time domain as an example to describe the decoding spectrum adjustment. However, those skilled in the art should understand that the method of adjusting the spectrum by multiplying the decoding spectrum adjustment function H2(f) in the frequency domain is also within the scope protected by this specification.
[0122] As described above, the encoded spectrum adjustment can attenuate the amplitude of the middle frequency region of the in-press frame in its frequency domain, blur the boundary data of the in-press frame, thereby reducing the amount of data generated by encoding. The decoded spectrum adjustment and the data processing can restore and even enhance the data after the encoded spectrum adjustment and data processing. That is to say, the decoded spectrum adjustment and the data processing can completely restore or basically restore the amplitude of the sensitive frequencies in the in-decompression frame to the state before attenuation or even enhance it relative to the state before attenuation. Taking video data as an example, since the human eye is more sensitive to low-frequency to middle-frequency information in an image, the decoded spectrum adjustment and the data processing can restore and even enhance the amplitude of the low-frequency to middle-frequency region in the video data. Therefore, the amplitude of the decompressed frame in the low-frequency to middle-frequency region should at least be restored or basically restored to the amplitude of the initial frame in the low-frequency to middle-frequency region. In video data, since the human eye is less sensitive to high-frequency data, the decoded spectrum adjustment and the data processing can not restore the amplitude of the high-frequency region, keeping the amplitude of the high-frequency region attenuated.
[0123] The data decompression operation can be symmetrically reverse to the compression operation. As described above, the encoded spectrum adjustment can be performed at any stage of the compression operation. Correspondingly, the decoded spectrum adjustment can also be performed at the corresponding stage of the decompression operation. For example, the data decompression operation, i.e., step S340, can include Figure 3A , Figure 3B and Figure 3C at least one of the data decompression methods shown in
[0124] For the convenience of demonstration, this specification will take the data decompression device 300 to first perform the decoding on the compressed frame and then perform the decoded spectrum adjustment ( Figure 3A the manner shown) as an example to describe the data decompression in detail. As described above, through the encoded spectrum adjustment, the data compression operation attenuates the amplitude of the initial frame in the middle frequency region or the middle frequency to high frequency region, thereby reducing the amount of data information in the initial frame. Taking video data as an example, since the edge parts of objects in the image are rich in middle frequency and high frequency information, and the middle frequency and high frequency regions carry more data, reducing the amplitude of the middle frequency to high frequency region will visually blur the boundary data of the in-press frame and also greatly reduce the amount of information in the image. Therefore, the data decompression can extract the boundary information from the compressed frame and perform boundary enhancement on the boundary information to restore it to the state in the initial frame or enhance it relative to the state in the initial frame.
[0125] There are many ways of boundary enhancement processing. In traditional techniques, sometimes a high-pass filter or a band-pass filter is directly used to filter the compressed frame, filtering out the components in the low-frequency region of the compressed frame, and extracting the components in the intermediate-frequency to high-frequency region of the compressed frame, thereby extracting the boundary information. However, there will be many negative coefficients in the coefficients of the convolution kernels corresponding to the high-pass filter and the band-pass filter. As mentioned above, when there are many negative coefficients in the convolution kernel, strong ringing effects may appear in the image obtained by convolving through the convolution kernel. Therefore, in order to avoid the ringing effect, the data decompression described in this specification uses a smooth-transition decoding spectrum adjustment function H2(f) to perform spectrum adjustment on the compressed frame, filtering the components in the intermediate-frequency to high-frequency region of the compressed frame, and then taking the difference between the compressed frame and the compressed frame after the decoding spectrum adjustment, the boundary information can be obtained. The boundary information is adjusted using an adjustment coefficient to restore it to the initial state or enhance it relative to the initial state. When using the above scheme to obtain the boundary information, a decoding convolution kernel can be designed such that all its coefficients are non-negative, or the ratio of the absolute value of the sum of the negative coefficients to the sum of the non-negative coefficients is less than 0.1, and the appearance of the ringing effect can be avoided.
[0126] In step S340, the data decompression of the compressed frame includes the data decompression device 300 performing the following operations through at least one decompression end processor:
[0127] S342: Perform decoding spectrum adjustment on the decompressed frame, and take the difference between the decompressed frame and the data of the decompressed frame after the decoding spectrum adjustment to obtain a boundary frame. Specifically, step S342 may include:
[0128] S342-2: Decode the compressed frame to obtain a decoded frame.
[0129] The compressed frame may be encoded by the data compression device 200 on the spectrum adjustment frame. The data decompression device 300 may decode the compressed frame to obtain the decoded frame. That is, a predicted frame is obtained by prediction according to the predicted data PI, and is superimposed with the residual data R to obtain a superimposed data P2, and the superimposed data P2 is the data P2 of the decoded frame. The decoded frame belongs to the decompressed frame. There may be certain errors in the encoding and decoding processes. Assuming that the deviation caused by the encoding and decoding processes is very small, the data P2 in the decoded frame is basically the same as the data P1 in the encoded spectrum adjustment frame. Therefore, the relationship between P1 and P2 can be expressed by the following formula:
[0130] P2≈P1 Formula (2)
[0131] S342-4: Perform the decoding spectrum adjustment on the decoded frame to obtain a decoded spectrum adjustment frame.
[0132] As described above, the decoded spectrum adjustment includes performing the decoded spectrum adjustment on the decoded frame using the decoded spectrum adjustment function H2(f), so that the amplitude of the decoded frame in the frequency domain smoothly decreases to filter the components in the intermediate to high frequency regions of the decoded frame, obtaining the decoded spectrum adjustment frame. As described above, the data in the decoded spectrum adjustment frame is defined as P C . The data P in the decoded spectrum adjustment frame C can be expressed by the following formula:
[0133] P C = H2(f)·P2 = H1(f)·H2(f)·P0 Formula (3)
[0134] The decoded spectrum adjustment includes performing convolution on the decoded frame (decoded frame) using a corresponding decoding convolution kernel based on the encoding convolution kernel. To avoid the ringing effect, the ratio of the absolute value of the sum of the negative coefficients to the sum of the non-negative coefficients in the decoding convolution kernel is less than a threshold. For example, the threshold can be any value among 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1 or any value in the interval defined by any two numbers. For example, the convolution kernel coefficients in the decoding convolution kernel can all be selected as non-negative numbers. The filtering is not a complete removal, but rather the amplitude in the intermediate to high frequency regions is smoothly decreased through the decoded spectrum adjustment function H2(f) to approach 0. That is, the amplitude adjustment gain for the intermediate to high frequency regions in the decoded spectrum adjustment function H2(f) approaches 0 and can fluctuate within a certain error range. The error range can be within the interval defined by any two of the values 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11%, ±12%, ±13%, ±14%, ±15%, ±16%, ±17%, ±18%, ±19%, ±20%, ±21%, ±22%, ±23%, ±24%, ±25%, ±26%, ±27%, ±28%, ±29%, ±30%, etc.
[0135] The decoded spectrum adjustment function H2(f) can maintain the DC part, that is, the amplitude adjustment gain for the part with a frequency of 0 is 1, to ensure that the basic information in the initial frame can be retained. Therefore, the amplitude adjustment gain of the decoded spectrum adjustment function H2(f) used for the decoded spectrum adjustment smoothly transitions from the amplitude adjustment gain of 1 at the position with a frequency of 0 to the amplitude adjustment gain approaching 0 in the intermediate frequency region.
[0136] In step S342-4, the decoding spectrum adjustment of the decoded frame may include:
[0137] Determine the frame type of the decoded frame. As mentioned above, during the process of compressing the initial frame, the data compression device 200 encodes the initial frame or the encoded spectrum adjustment frame into different types. Therefore, before performing the decoding spectrum adjustment on the decoded frame, the data decompression device 300 needs to first determine the frame type of the decoded frame, and different decoding convolution kernels are selected for different frame types. The frame type of the decoded frame may include at least one of I-frame, P-frame, and B-frame. The frame type of the decoded frame may include only one frame type or multiple frame types at the same time. The method for determining the frame type of the decoded frame is relatively mature and is not the focus of protection in this specification. Therefore, it will not be elaborated here.
[0138] Based on the frame type of the decoded frame, select a convolution kernel from the decoding convolution kernel group as the decoding convolution kernel, and perform convolution on the decoded frame. As mentioned above, the decoding spectrum adjustment of the decoded frame can be manifested as performing convolution on the decoded frame in the time domain. A plurality of different decoding convolution kernels, called the decoding convolution kernel group, may be stored in the storage medium of the data decompression device 300. Each encoding convolution kernel has at least one corresponding decoding convolution kernel in the decoding convolution kernel group. When the data decompression device 300 performs convolution on the decoded frame, it can select a convolution kernel from the decoding convolution kernel group as the decoding convolution kernel based on the frame type of the decoded frame, and perform convolution on the decoded frame. The operation of performing convolution on the decoded frame using the decoding convolution kernel can be called the decoding spectrum adjuster. When the decoded frame is an I-frame or a P-frame, the data decompression device 300 performs convolution on the I-frame or P-frame by selecting a convolution kernel from the decoding convolution kernel group as the decoding convolution kernel and performing convolution on the I-frame or P-frame. The data decompression device 300 can also select a convolution kernel with the best decompression effect from the decoding convolution kernel group as the decoding convolution kernel according to the decoding quality requirement for the decoded frame. When the decoded frame is a B-frame, the decoding convolution kernel of the decoded frame is the same as the decoding convolution kernel of the reference frame closest to the decoded frame, or the decoding convolution kernel of the decoded frame is the same as the decoding convolution kernel corresponding to the reference frame with the greatest attenuation degree among the two closest reference frames in adjacent directions, or the decoding convolution kernel of the decoded frame takes the average value of the decoding convolution kernels corresponding to the two closest reference frames in adjacent directions.
[0139] When the data decompression device 300 performs convolution on the decoded frame using the decoded convolution kernel, it can perform convolution on the decoded frame in at least one of the vertical direction, the horizontal direction, and the diagonal direction. The convolution direction of the decoded frame is the same as that of the initial frame, and the convolution order of the decoded frame is opposite to that of the initial frame. If the initial frame only undergoes convolution in the vertical direction, then the decoded frame also only undergoes convolution in the vertical direction. Similarly, if the initial frame only undergoes convolution in the horizontal direction or the diagonal direction, then the decoded frame also only undergoes convolution in the horizontal direction or the diagonal direction. If the initial frame undergoes convolution in multiple directions, then the decoded frame also undergoes convolution in multiple directions, and the direction and order of convolution of the decoded frame are opposite to the direction and order of convolution of the initial frame. That is, if the initial frame first undergoes vertical convolution and then horizontal convolution, then the decoded frame first undergoes horizontal convolution and then vertical convolution.
[0140] S342-6: Calculate the difference between the decoded frame and the decoded spectrum adjustment frame to obtain the boundary information.
[0141] S342-8: Adjust the boundary information based on the adjustment coefficient to obtain the boundary frame.
[0142] As mentioned above, the components in the intermediate frequency to high frequency region in the decoded spectrum adjustment frame are filtered. By calculating the difference between the decoded frame and the decoded spectrum adjustment frame, the components in the intermediate frequency to high frequency region in the decoded frame can be obtained, which is the boundary information. The boundary information is adjusted by the adjustment coefficient a to obtain the boundary frame. The boundary frame includes the boundary information of the initial frame. As mentioned above, the data in the boundary frame is defined as P E . Among them, a is the enhancement coefficient, indicating the degree of enhancement of the boundary information. The larger a is, the stronger the degree of enhancement of the boundary information. The adjustment coefficient a is a real number greater than 0. The adjustment coefficient a can be valued according to empirical values or obtained through machine learning training. The data P in the boundary frame E can be expressed by the following formula:
[0143] P E = a·(P2 - P C ) = a·H1(f)·P0·(1 - H2(f)) Formula (4)
[0144] S344: Superimpose the boundary frame and the in-frame (decoded frame) to obtain the decompressed frame.
[0145] For the convenience of description, we define the data obtained by superimposing the boundary frame and the in-frame (decoded frame) as the superimposed frame, and the data in the superimposed frame as P3. The data P3 in the superimposed frame can be expressed by the following formula:
[0146] P3 = P2 + P E = P0·H1(f)·(1 + a(1 - H2(f))) Formula (5)
[0147] Taking video data as an example, since the human eye is more sensitive to information in the low - to - mid - frequency region, and the design of H1(f) only attenuates the amplitude of the low - to - mid - frequency region in the initial frame, so the frequency information of all frequencies in the low - to - mid - frequency region of the initial frame is retained in the encoded spectral adjustment frame; the data P2 in the decoded frame is basically the same as the data P1 in the encoded spectral adjustment frame. Therefore, the frequency information of the low - to - mid - frequency region is also retained in the decoded frame; and the components in the mid - to - high - frequency region of the decoded spectral adjustment frame are filtered, so the frequency information of the low - frequency region is retained; thus, the frequency information of the mid - frequency region in the initial frame is retained in the boundary frame obtained by the difference between the decoded frame and the decoded spectral adjustment frame; and the frequency information of the low - to - mid - frequency region is retained in the decoded frame; so theoretically, without considering the deviation caused by other algorithms, the superimposed frame obtained by superimposing the decoded frame and the boundary frame can completely or basically restore the frequency information of all frequencies in the low - to - mid - frequency region of the initial frame. That is to say, the data decompression can restore or even enhance the data after data compression at any frequency in the low - to - mid - frequency range. Therefore, after data decompression, the amplitude of the superimposed frame at any frequency in the low - to - mid - frequency region should be approximately equal to or greater than that of the initial frame. The approximate equality means that the amplitude of the superimposed frame is equal to the amplitude of the initial frame and fluctuates within a certain error range. Taking video data as an example, when the amplitude of the superimposed frame at any frequency in the low - to - mid - frequency region is restored to 85% or more of the initial frame, it is very difficult for the human eye to perceive the difference between the superimposed frame and the initial frame. Therefore, after data decompression, the amplitude of the superimposed frame at any frequency in the low - to - mid - frequency region should not be less than 85% of the initial frame. That is, the error range should not make the amplitude of the superimposed frame at any frequency in the low - to - mid - frequency region lower than 85% of the initial frame. And the human eye is less sensitive to information in the high - frequency region. Therefore, the information in the high - frequency region of the superimposed frame can be retained to adapt to high - quality requirements scenarios, or attenuated to suppress unnecessary high - frequency noise. The relationship between P0 and P3 can be expressed by the following formula:
[0148]
[0149]
[0150] It should be noted that a certain range of error is allowed in the formula. For example, for P3≥P0, when the basic value of P3 is greater than or equal to P0, P3 is allowed to fluctuate within a certain error range. That is to say, when P3 = P0, P3 is allowed to be slightly less than P0 in the case of negative error. The formula here only lists the basic relationship formula between P3 and P0, without writing the error into the formula. Those skilled in the art should understand that the fluctuation within the error range, where the amplitude of the superimposed frame in the low-frequency to mid-frequency region is slightly less than that of the initial frame, also belongs to the scope protected by this specification. In the following formulas, a certain range of error is also allowed. In the following text, only the description of the basic relationship where the amplitude of P3 is greater than or equal to the initial frame P0 is given. For the fluctuation within the error range, those skilled in the art can deduce it by themselves.
[0151] For the sake of convenience of description, we define the overall spectrum adjustment function between P0 and P3 as H0(f). Then the relationship between P0 and P3 can be expressed by the following formula:
[0152] P3 = H0(f)·P0 Formula (8)
[0153] Then, the overall spectrum adjustment function H0(f) can be expressed by the following formula:
[0154]
[0155]
[0156] Among them, f0 is the demarcation value of the frequency sensitive to the human eye. For video data, f0 can be 0.33, or other values larger or smaller than 0.33. For different types of data, the value of f0 is different.
[0157] In H0(f) in the above formulas (9) - (10), when H0(f)≈1 in the selected frequency domain interval, the data of the superimposed frame in the selected frequency domain interval can be restored to the initial frame; when H0(f)>1 in the selected frequency domain interval, the data of the superimposed frame in the selected frequency domain interval can be enhanced, that is, the amplitude of the superimposed frame in the selected area is higher than that of the initial frame. For example, if the initial frame is a frame in a video, as long as H0(f) is greater than 1 in the selected frequency domain interval, clarity enhancement can be achieved. For the sake of convenience of description, we define H0(f)≈1 as the normal mode and H0(f)>1 as the enhancement mode. Below, we will take video data as an example to elaborate on the overall spectrum adjustment function H0(f).
[0158] Figure 8A Shows a curve graph of an overall adjustment function H0(f) provided according to an embodiment of this specification.Figure 8B Shows a graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification. Figure 8C Shows a graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification. Figure 8D Shows a graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification. Figure 8E Shows a graph of an overall adjustment function H0(f) provided according to an embodiment of the present specification. As Figures 8A to 8E shown, the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H0 of the overall spectrum adjustment function H0(f). Figures 8A to 8E The curves in [reference] represent different overall spectrum adjustment functions H0(f). The maximum value of the normalized frequency on the horizontal axis is 0.5. The normalized frequency f on the horizontal axis can be divided into a low-frequency region, a mid-low-frequency region, a mid-frequency region, a mid-high-frequency region, and a high-frequency region. The frequencies between (0, a] belong to the low-frequency; the frequencies between (a, b] belong to the mid-low-frequency; the frequencies between (b, c] belong to the mid-frequency; the frequencies between (c, d] belong to the mid-high-frequency; the frequencies between (d, 0.5] belong to the high-frequency. Among them, the values of a, b, c, d, e are referred to Figure 5A as described, and will not be elaborated here.
[0159] Since the human eye is more sensitive to data from low frequency to mid-frequency in video data than to high-frequency data, therefore, after data decompression, the information in the low-frequency to mid-frequency region of the superimposed frame relative to the initial frame should be kept as much as possible without loss. That is to say, the overall spectrum adjustment function H0(f) should make the amplitude of the superimposed frame in the low-frequency to mid-frequency region not less than 85% of the initial frame, and even can be greater than the initial frame. Since the human eye is not sensitive to information in the high-frequency region, therefore, the amplitude of the superimposed frame in the high-frequency region can be selected according to different application scenarios. For example, in a scenario with low clarity requirements, the amplitude of the superimposed frame in the high-frequency region can be less than the initial frame. In a reconnaissance scenario, the amplitude of the superimposed frame in the high-frequency region can be approximately equal to or greater than the initial frame. As Figures 8A to 8EAs shown, the amplitude adjustment gain H0 of the overall adjustment function H0(f) at any frequency f in the low-frequency to mid-frequency region (including the low-frequency and mid-frequency regions) is greater than 1 or approximately equal to 1, such that the amplitude of the decompressed superimposed frame is not less than 85% of the initial frame, enabling the restoration or enhancement of clarity and improving the visual observation effect. The "approximately equal to 1" here can fluctuate within a certain error range equal to 1. The error range can be within the intervals specified by any two of the values 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11%, ±12%, ±13%, ±14%, ±15%, etc. For ease of description, we define the amplitude adjustment gain of the overall adjustment function H0(f) in the high-frequency region as the first amplitude adjustment gain, the amplitude adjustment gain in the mid-frequency region as the second amplitude adjustment gain, and the amplitude adjustment gain in the low-frequency region as the third amplitude adjustment gain. The values of the third amplitude adjustment gain, the second amplitude adjustment gain, and the first amplitude adjustment gain can fluctuate within the error range.
[0160] As Figure 8A shown, the values of the third amplitude adjustment gain, the second amplitude adjustment gain, and the first amplitude adjustment gain of the overall adjustment function H0(f) in the low-frequency to high-frequency region are all approximately equal to 1, such that the amplitude of the superimposed frame in the low-frequency to high-frequency region is not less than 85% of the initial frame, enabling the data of the superimposed frame in the low-frequency to high-frequency region to be smoothly restored or basically restored to the state of the initial frame.
[0161] As Figure 8B shown, the values of the third amplitude adjustment gain and the second amplitude adjustment gain of the overall adjustment function H0(f) in the low-frequency to mid-frequency region are approximately equal to 1, enabling the data of the superimposed frame in the low-frequency to mid-frequency region to be smoothly restored or basically restored to the state of the initial frame. The value of the first amplitude adjustment gain of the overall adjustment function H0(f) in the high-frequency region is less than 1, causing the amplitude of the superimposed frame in the high-frequency region to decrease smoothly relative to the initial frame to suppress high-frequency noise. The smooth decrease in the amplitude can be that the amplitude decays at the first amplitude adjustment gain value, or the amplitude decays within a certain error range near the first amplitude adjustment gain value. For example, the first amplitude adjustment gain can be any value between 0 and 1. For example, the value of the first amplitude adjustment gain can be within the intervals specified by any two of the values 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, 0.76, 0.80, 0.84, 0.88, 0.92, 0.96, and 1, etc. As Figure 8BAs shown, the first amplitude adjustment gain of the overall adjustment function H0(f) in the high-frequency region (roughly in the range of 0.4 - 0.5) is around 0.6. The second and third amplitude adjustment gain values are both around 1. The second and third amplitude adjustment gain values can fluctuate within a certain error range. For example, the second and third amplitude adjustment gain values can be within the intervals defined by any two of the values such as 0.85, 0.90, 0.95, 1, 1.05, 1.10, and 1.15.
[0162] As Figure 8C As shown, the third amplitude adjustment gain value of the overall adjustment function H0(f) in the low-frequency region is approximately equal to 1, enabling the data of the superimposed frame in the low-frequency region to be smoothly restored or basically restored to the state of the initial frame. The second amplitude adjustment gain value of the overall adjustment function H0(f) in the mid-frequency region and the first amplitude adjustment gain value in the high-frequency region are both greater than 1, causing the amplitude of the superimposed frame in the mid-frequency to high-frequency region to increase smoothly relative to the initial frame, thereby enhancing the data clarity in the mid-frequency to high-frequency region. The smooth increase in the amplitude can be that the amplitude is enhanced by the second amplitude adjustment gain value and the first amplitude adjustment gain value, or the amplitude is enhanced within a certain error range near the second amplitude adjustment gain value and the first amplitude adjustment gain value. The magnitudes of the second amplitude adjustment gain value and the first amplitude adjustment gain value can be generally the same, or the second amplitude adjustment gain value can be greater than the first amplitude adjustment gain value, or the second amplitude adjustment gain value can be less than the first amplitude adjustment gain value. Figure 8C In the curve shown, the magnitudes of the second amplitude adjustment gain value and the first amplitude adjustment gain value are generally the same. The second amplitude adjustment gain value and the first amplitude adjustment gain value can be any values greater than 1. For example, the second amplitude adjustment gain value and the first amplitude adjustment gain value can be within the intervals defined by any two of the values such as 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, and 2.4. As Figure 8C As shown, the second amplitude adjustment gain and the first amplitude adjustment gain of the overall adjustment function H0(f) in the mid-frequency to high-frequency region are around 1.2.
[0163] As Figure 8DAs shown, the overall adjustment function H0(f) has a third amplitude adjustment gain value approximately equal to 1 in the low-frequency region, enabling the data of the superimposed frame in the low-frequency region to be smoothly restored or basically restored to the state of the initial frame. The overall adjustment function H0(f) has a second amplitude adjustment gain value greater than 1 in the mid-frequency region, causing the amplitude of the superimposed frame in the mid-frequency region to increase smoothly relative to the initial frame, thereby enhancing the clarity of the data in the mid-frequency region. The overall adjustment function H0(f) has a first amplitude adjustment gain value less than 1 in the high-frequency region, causing the amplitude of the superimposed frame in the high-frequency region to decrease smoothly relative to the initial frame, thereby reducing the data volume in the insensitive high-frequency region to suppress high-frequency noise. Figure 8D The curve shown can reduce the data volume while enhancing the clarity. The second amplitude adjustment gain value can be any value greater than 1. The first amplitude adjustment gain can be any value between 0 and 1. As Figure 8D shown, the second amplitude adjustment gain of the overall adjustment function H0(f) in the mid-frequency region is around 1.2, and the first amplitude adjustment gain in the high-frequency region is around 0.6.
[0164] As Figure 8E shown, the overall adjustment function H0(f) has a third amplitude adjustment gain value greater than 1 in the low-frequency region, causing the amplitude of the superimposed frame in the low-frequency region to increase smoothly relative to the initial frame. The overall adjustment function H0(f) has a second amplitude adjustment gain value greater than 1 in the mid-frequency region, causing the amplitude of the superimposed frame in the mid-frequency region to increase smoothly relative to the initial frame, thereby enhancing the clarity of the data from the low-frequency to the mid-frequency region. Among them, the second amplitude adjustment gain value can be equal to the third amplitude adjustment gain value or greater than the third amplitude adjustment gain value. Figure 8E In the curve shown, the second amplitude adjustment gain value is greater than the third amplitude adjustment gain value, causing the amplitude of the superimposed frame in the mid-frequency region to increase by a greater amplitude than that in the low-frequency region, thereby enhancing the clarity of the mid-frequency region, which is the most sensitive to the human eye, and improving the visual observation effect. The overall adjustment function H0(f) has a first amplitude adjustment gain value less than 1 in the high-frequency region, causing the amplitude of the superimposed frame in the high-frequency region to decrease smoothly relative to the initial frame, thereby reducing the data volume in the insensitive high-frequency region to suppress high-frequency noise. Figure 8EThe curve shown can reduce the amount of data while enhancing clarity. The third amplitude adjustment gain value can be a value slightly greater than 1. For example, the third amplitude adjustment gain value can be within the range defined by any two of the values 1, 1.04, 1.08, 1.12, 1.16, and 1.2. The second amplitude adjustment gain value can be any value greater than the third amplitude adjustment gain. For example, the second amplitude adjustment gain value and the first amplitude adjustment gain value can be within the range defined by any two of the values 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, and 2.4. The first amplitude adjustment gain can be any value between 0 and 1. For example, the first amplitude adjustment gain value can be within the range defined by any two of the values 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, 0.76, 0.80, 0.84, 0.88, 0.92, 0.96, and 1. As Figure 8E shown, the third amplitude adjustment gain of the overall adjustment function H0(f) in the low-frequency region is about 1.1, the second amplitude adjustment gain in the middle-frequency region is about 1.2, and the first amplitude adjustment gain in the high-frequency region is about 0.6.
[0165] Further, when the high-frequency region is not connected to the middle-frequency region, the overall spectrum adjustment function H0(f) can also adjust the amplitude in the high-frequency region so that the change of the amplitude adjustment gain in the middle-high frequency region is smooth and continuous.
[0166] Further, when the middle-frequency region is not connected to the low-frequency region, the overall spectrum adjustment function H0(f) can also adjust the amplitude in the middle-low frequency region so that the change of the amplitude adjustment gain in the middle-low frequency region is continuous.
[0167] The curve of the overall adjustment function H0(f) is a smoothly transitional curve. In engineering implementation, on the basis that the amplitude of the superimposed frame in the low-frequency to middle-frequency region is approximately equal to or greater than that of the initial frame, small fluctuations in the curve of the overall adjustment function H0(f) can be allowed, and these fluctuations do not affect the decompression effect. For data in other forms than video data, the parameters of the overall adjustment function H0(f) can be set according to the sensitivity of the receiver to the data. For different forms of data, the receiver has different sensitivities to frequencies.
[0168] For ease of description, we will take the case shown in formula (7) as an example for description. Combining formula (5) and formula (7), the superimposed frame P3 can be expressed as the following formula:
[0169]
[0170] At this time, the relationship between the encoding spectrum adjustment function H1(f) corresponding to the encoding convolution kernel and the decoding spectrum adjustment function H2(f) corresponding to the decoding convolution kernel can be expressed as the following formula:
[0171]
[0172] Therefore, the relationship between H1(f) and H2(f) can be expressed as the following formula:
[0173]
[0174] Among them, since in the decoding spectrum adjustment function H2(f), except that the amplitude adjustment gain of the part with a frequency of 0 is 1, the amplitude adjustment gains of other frequencies are all less than 1. Therefore, the value of 1 / (1 + a(1 - H2(f))) is less than 1 at other frequencies except the frequency of 0. Therefore, formula (13) can ensure that the amplitude adjustment gain of the part with a frequency of 0 in the encoding spectrum adjustment function H1(f) is 1, while the amplitude adjustment gains corresponding to other frequencies are less than 1.
[0175] As described above, if the initial frame is convolved in multiple directions, the decoding frame is also convolved in multiple directions, and the directions and orders of convolution of the decoding frame are opposite to those of the initial frame during convolution. That is, if the initial frame is first convolved in the vertical direction and then in the horizontal direction, the decoding frame is first convolved in the horizontal direction and then in the vertical direction. It should be noted that the decoding frame needs to be first convolved in the horizontal direction to obtain the horizontal compensation information. After superimposing the horizontal compensation information of the decoding frame on the decoding frame, it is then convolved in the vertical direction to obtain the vertical compensation information, and the vertical compensation information of the decoding frame is superimposed on the decoding frame.
[0176] Figure 9A Shows a curve graph of an overall adjustment function H0(f), an encoding spectrum adjustment function H1(f), and a decoding spectrum adjustment function H2(f) of the normal mode provided according to an embodiment of the present specification. Figure 9B Shows a curve graph of an overall adjustment function H0(f), an encoding spectrum adjustment function H1(f), and a decoding spectrum adjustment function H2(f) of an enhanced mode provided according to an embodiment of the present specification. Figure 9A And Figure 9BThe encoding convolution kernel and the decoding convolution kernel used are the same, but the adjustment coefficient a is different. In Figure 9A it is illustrated with a = 1.5 as an example. In Figure 9B it is illustrated with a = 2 as an example. As Figure 9A and Figure 9B show, the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H. As Figure 9A shows, in the overall spectrum adjustment function H0(f)≈1 in any frequency region, the overall spectrum adjustment function H0(f) performs spectrum adjustment in the normal mode on the superimposed frame, that is, all frequency information in the overall spectrum adjustment function H0(f) is completely retained, and the data in the superimposed frame can be basically restored to the data in the initial frame. As Figure 9B shows, in the overall spectrum adjustment function H0(f)≈1 in the low-frequency region, and in the overall spectrum adjustment function H0(f)>1 in the medium-frequency to high-frequency region. The overall spectrum adjustment function H0(f) performs spectrum adjustment in the enhancement mode on the medium-frequency to high-frequency region of the superimposed frame, that is, the information in the medium-frequency to high-frequency region in the overall spectrum adjustment function H0(f) is enhanced, and the data in the medium-frequency to high-frequency region of the superimposed frame is enhanced compared with the data in the medium-frequency to high-frequency region of the initial frame. It should be noted that Figure 9A and Figure 9B the curves shown are only for illustrative purposes, and those skilled in the art should understand that the curves of H0(f), H1(f), and H2(f) are not limited to Figure 9A and Figure 9B the forms shown, and all H0(f), H1(f), H2(f) curves that conform to formula (12) fall within the scope protected by this specification. It should be pointed out that all linear combinations of decoding spectrum adjustment functions or product combinations of encoding spectrum adjustment functions or combinations of linear combinations and product combinations fall within the scope protected by this specification. Among them, i≥1, represents the linear combination of n functions, H 2i (f) represents the i-th function, k i represents the weight corresponding to the i-th function. j≥1, represents the product combination of n functions, k j represents the weight corresponding to the j-th function, and H 2j (f) can be any function.
[0177] Figure 10A shows a parameter table of a decoding convolution kernel provided according to an embodiment of this specification. Figure 10AExemplarily list the parameters of a decoding convolution kernel. The parameters of the decoding convolution kernel are all non - negative numbers, so that the data convolved by the decoding convolution kernel can avoid the ringing effect. Figure 10A is only an exemplary illustration. Those skilled in the art should know that the decoding convolution kernel is not limited to Figure 10A the parameters shown. All decoding convolution kernels that meet the foregoing requirements fall within the scope protected by this specification.
[0178] Figure 10B Shows a parameter table of an encoding convolution kernel in a normal mode provided according to an embodiment of this specification. Figure 10B Exemplarily list the parameters of an encoding convolution kernel in a normal mode. The encoding convolution kernel in the normal mode is obtained by Fourier transform of the encoding spectrum adjustment function H1(f), which is based on the overall spectrum adjustment function H0(f) in the normal mode and Figure 10A the decoding spectrum adjustment function H2(f) corresponding to the parameter table of the decoding convolution kernel shown in. Where a = 1.5. That is, the encoding spectrum adjustment function H1(f) is obtained corresponding to H0(f)=1. The data compression device 200 and the data decompression device 300 use Figure 10B the encoding convolution kernel in the normal mode shown in Figure 10A and the decoding convolution kernel shown in can make the data of the superimposed frame basically the same as the data of the initial frame. Figure 10B is only an exemplary illustration. Those skilled in the art should know that the encoding convolution kernel in the normal mode is not limited to Figure 10B the parameters shown. All encoding convolution kernels that meet the foregoing requirements fall within the scope protected by this specification.
[0179] Figure 10C Shows a parameter table of an encoding convolution kernel in an enhanced mode provided according to an embodiment of this specification. The encoding convolution kernel in the enhanced mode is obtained by Fourier transform of the encoding spectrum adjustment function H1(f), which is based on the overall spectrum adjustment function H0(f) in the enhanced mode and Figure 10A the decoding spectrum adjustment function H2(f) corresponding to the parameter table of the decoding convolution kernel shown in. Where a = 2. That is, the encoding spectrum adjustment function H1(f) is obtained corresponding to H0(f)>1. The data compression device 200 uses Figure 10C the encoding convolution kernel in the enhanced mode shown in Figure 10A and the decoding convolution kernel shown in can enhance the data of the superimposed frame. Figure 10C is only an exemplary illustration. Those skilled in the art should know that the encoding convolution kernel in the enhanced mode is not limited to Figure 10CFor the parameters shown, all coding convolution kernels that meet the aforementioned requirements fall within the scope protected by this specification.
[0180] It should be noted that after the convolution operation, normalization processing needs to be performed to make the gray value of the image after the convolution operation between 0 and 255.
[0181] In the normal mode, that is, the mode where H0(f)≈1, there is no ringing effect in the superimposed frame, or only a negligible slight ringing effect. We can output the superimposed frame as the decompressed frame. That is, in the normal mode, the data P4 of the decompressed frame can be expressed by the following formula:
[0182] P4 = P3 Formula (14)
[0183] In the enhancement mode, that is, the mode where H0(f)>1, excessive enhancement may cause a ringing effect in the superimposed frame, affecting the visual observation effect. We can perform boundary adjustment on the superimposed frame to obtain the decompressed frame to effectively eliminate the ringing effect.
[0184] Figure 11 Shows a flowchart of a boundary adjustment method P360 provided according to an embodiment of this specification. As Figure 11 shown, the boundary adjustment method P110 may include being executed by at least one decompression end processor 320 of the data decompression device 300:
[0185] S361: Assign values to the elements in the superimposed frame whose element values exceed the preset range to make them included within the preset range.
[0186] The boundary adjustment refers to adjusting based on the element values corresponding to the elements in the superimposed frame to eliminate the ringing effect. The element of the frame refers to the smallest constituent unit of the frame. Taking video data as an example, the element of the image frame can be the pixel point of the image. The element value of the image frame can be the gray value corresponding to the pixel in the image, or the RGB value, HIS value, HSV value, etc. corresponding to the pixel in the image. When the superimposed frame is audio, the element can be the smallest unit constituting the audio, for example, an audio sampling point in a sampling frequency. Below, we will describe by taking the superimposed frame as video data and the element value as the gray value corresponding to the pixel point in the image as an example.
[0187] The grayscale value of an image pixel is generally within 0 to 255. Therefore, in the enhancement mode, the grayscale value of some pixels may be outside the range of 0 to 255. Therefore, in order to facilitate boundary adjustment of the superimposed frame so that the grayscale value of the superimposed frame is within 0 to 255, it is necessary to assign a value to the superimposed frame so that the element values (i.e., grayscale values) in the superimposed frame are within a preset range. The preset range includes a range composed of a first critical value and a second critical value, and the first critical value is greater than the second critical value. The preset range can be 0 to 255, the first critical value is 255, and the second critical value is 0. Of course, the preset range can also be set according to the application scenario of the video data. For example, in a dim background, the minimum value of the preset range can be appropriately adjusted so that the preset range is adjusted to 10 to 255. Of course, the preset range can also be other ranges, such as 16 to 240, 20 to 250, 30 to 250, 40 to 250, and so on. Before performing boundary adjustment on the superimposed frame, by assigning values to the elements of the superimposed frame so that the element values of the superimposed frame are within the preset range, the computational amount of the boundary adjustment can be reduced and the work efficiency can be improved. Step S361 may include: assigning the first critical value to the elements in the superimposed frame whose element values are greater than the first critical value; and assigning the second critical value to the elements in the superimposed frame whose element values are less than the second critical value. For the elements in the superimposed frame whose element values are between the first critical value and the second critical value, the corresponding element values are retained without re-assignment.
[0188] S362: Partition the superimposed frame based on the element values of the superimposed frame.
[0189] According to the element values of the superimposed frame, the superimposed frame can be divided into 3 regions, namely: the concave point region, the convex point region, and the transition region. The concave point region includes the elements corresponding to the local minimum value; the convex point region includes the elements corresponding to the local maximum value; the transition region includes the regions other than the concave point region and the convex point region. Specifically, step S346-2 can perform region partitioning on the elements in the superimposed frame point by point. For the convenience of description, we define the element value corresponding to the element to be partitioned currently as d0, and the element values corresponding to the elements adjacent to d0 as d k , where k = -n to n, and n is a positive integer. For example, n can be 1, or 2, or 3, or an integer greater than 3. d k and d0 can be at least one of horizontally adjacent, vertically adjacent, and diagonally adjacent. d k The adjacent direction of d
[0190] When d0 < d kWhen d0 is the smallest element value within a local range, d0 is classified into the concave point region.
[0191] When d0 > d k When d0 is the largest element value within a local range, d0 is classified into the concave point region.
[0192] When d0 belongs to neither the concave point region nor the convex point region, d0 is classified into the transition region.
[0193] Since the ringing effect mostly occurs in the region where the image gray value changes drastically, that is, near the image boundary region, it reduces the brightness of the element values (concave point region) with darker brightness near the boundary region, or increases the brightness of the element values (convex point region) with brighter brightness near the boundary region, resulting in a visual oscillation effect. Therefore, it is necessary to perform boundary adjustment on the superimposed frame to restore its original gray value, that is, to increase the brightness of the element values (concave point region) with darker brightness near the boundary region to the original gray value through boundary adjustment, or to reduce the brightness of the element values (convex point region) with brighter brightness near the boundary region and restore it to the original gray value. Therefore, it is necessary to perform boundary detection on the concave point region and the convex point region of the superimposed frame, detect the boundaries in the superimposed frame, and then perform boundary adjustment on the boundaries of the concave point region and the convex point region respectively.
[0194] S364: Obtain the boundary value corresponding to each element in the concave point region and the convex point region of the superimposed frame.
[0195] The boundary value (HADVD, Higher absolute differential value difference) includes the forward differential HADVD of the current element d0 f and the backward differential HADVD b combination.
[0196] The forward differential HADVD f includes performing a differential operation on the forward adjacent elements of the current element d0. The backward differential includes HADVD b performing a differential operation on the backward adjacent elements of the current element d0. Among them, the forward differential HADVD f and the backward differential HADVD b differential directions include performing differential in at least one of the vertical direction, horizontal direction, and diagonal direction. The differential direction is the same as the direction of performing convolution on the decoded frame. The forward differential HADVD f can be expressed by the following formula:
[0197]
[0198] The backward difference includes HADVD b It can be expressed by the following formula:
[0199]
[0200] Wherein, w k represents the forward difference HADVD f and the backward difference HADVD b weighting coefficient. w k can take any value between 0 and 1. For example, when n = 3, w k =[1 1 1], a third-order forward difference value and a third-order backward difference value can be calculated. By calculating the forward difference HADVD f and the backward difference HADVD b the difference between the current element d0 and the adjacent elements can be calculated. The larger the difference, the more likely the current element d0 is to be close to the boundary.
[0201] The combination of the forward difference HADVD f and the backward difference HADVD b can include one of the maximum weighted value HADVD max and the absolute difference HADVD abd The maximum weighted value HADVD max is the weighted value of the maximum of the forward difference HADVD f and the backward difference HADVD b of the current element d0, and can be expressed by the following formula:
[0202] HADVD max =h·max(HADVD f , HADVD b ) Formula (17)
[0203] Wherein, h is the weighting coefficient, and h is any number between 0 and 1. h can be obtained by training based on a large number of image sample data, or can be valued based on experience.
[0204] The absolute difference HADVD abd is the absolute value of the difference between the forward difference HADVD f and the backward difference HADVD b of the current element d0, and can be expressed by the following formula:
[0205] HADVD abd =|HADVD b -HADVD f | Formula (18)
[0206] Among them, the boundary value HADVD includes the maximum weighted value HADVD max and the absolute difference HADVD abd the larger one of them. The boundary value HADVD can be expressed by the following formula:
[0207] HADVD = max(HADVD max , HADVD abd ) Formula (19)
[0208] The absolute difference HADVD abd and the maximum weighted value HADVD max are combined to accurately identify the boundary in the image. The larger the boundary value HADVD, the closer the current element d0 is to the boundary.
[0209] S366: Based on a preset boundary threshold THD, adjust the elements in the concave point region and the convex point region whose boundary value HADVD is greater than the boundary threshold THD to obtain an adjustment value ΔE.
[0210] When the boundary value HADVD is greater than or equal to the boundary threshold THD, the element corresponding to the boundary value HADVD can be defined as the boundary region and needs to be adjusted at the boundary. The boundary threshold THD can be obtained by training based on a large amount of image sample data. As mentioned above, for the boundary adjustment of the concave point region, it is necessary to increase the element value corresponding to the element in the concave point region. For the boundary adjustment of the convex point region, it is necessary to reduce the element value corresponding to the element in the convex point region. Step S366 may include:
[0211] Perform a linear combination of a finite order on the ratio of the boundary value HADVD corresponding to the element in the concave point region to the boundary threshold THD to obtain the adjustment value ΔE of the concave point region L . The adjustment value ΔE of the concave point region L can be expressed by the following formula:
[0212]
[0213] Among them, m is a positive integer greater than 1. represents the smallest integer not greater than . g m is the weighting coefficient. q is the correction parameter. The order of the linear combination, the weighting coefficient g m and the correction parameter q can be obtained by training based on a large amount of image sample data. For video data, in order to ensure that the grayscale value of the image is an integer between 0 and 255, it is necessary to perform a rounding operation on ΔE L . When the boundary value HADVD is less than the boundary threshold THD, No boundary adjustment is required.
[0214] Perform a linear combination of finite order on the ratio THD of the boundary value HADVD corresponding to the elements in the convex point region to the boundary threshold, and take the opposite number to obtain the adjustment value ΔE of the convex point region. H The adjustment value ΔE of the convex point region H can be expressed by the following formula:
[0215]
[0216] where m is a positive integer greater than 1. represents the smallest integer not greater than . g m is the weighting coefficient. q is the correction parameter. The order of the linear combination, the weighting coefficient g m and the correction parameter q can be obtained by training based on a large amount of image sample data. For video data, in order to ensure that the grayscale value of the image is an integer between 0 and 255, it is necessary to perform a rounding operation on ΔE H . When the boundary value HADVD is less than the boundary threshold THD, no boundary adjustment is required. As mentioned above, for the boundary adjustment of the convex point region, it is necessary to reduce the element value corresponding to the element in the convex point region. Therefore, ΔE H takes a negative value.
[0217] S368: Adjust the superimposed frame based on the adjustment value ΔE to obtain the decompressed frame.
[0218] Specifically, step S368 includes superimposing the adjustment value ΔE on the element value corresponding to the superimposed frame to obtain the decompressed frame. The data P4 in the decompressed frame can be expressed by the following formula:
[0219] P4 = P3 + ΔE Formula (22)
[0220] It should be noted that when the decoded frame performs decoding convolution in multiple directions, the superimposed frame needs to perform boundary adjustment in multiple directions, and the order of boundary adjustment is the same as the order when the decoded frame performs decoding convolution. That is, the decoded frame first performs decoding convolution in the horizontal direction and then in the vertical direction, and the superimposed frame correspondingly first performs boundary adjustment in the horizontal direction and then in the vertical direction.
[0221] Figure 12A shows an example diagram of not performing boundary adjustment provided according to an embodiment of the present specification; Figure 12B shows an example diagram of performing boundary adjustment provided according to an embodiment of the present specification. As Figure 12AThe highlighted area shown in 140 is the ringing effect that appears in the enhanced mode. By comparing Figure 12A and Figure 12B it is found that the boundary adjustment method described in this specification can effectively eliminate the ringing effect.
[0222] The decompressed frame is obtained by boundary adjustment of the superimposed frame. Therefore, the properties of the decompressed frame are generally consistent with those of the superimposed frame calculated by the decoded spectral adjustment function H2(f) and the overall spectral adjustment function H0(f). That is, the decompressed frame is the same as the superimposed frame, and the amplitude at any frequency in the low-frequency to mid-frequency region is approximately equal to or greater than the initial frame, so that the clarity of the decompressed frame in the low-frequency to mid-frequency region is restored or even enhanced. In some embodiments, such as Figure 8B 、 Figure 8D and Figure 8E as shown, the amplitude of the decompressed frame is the same as that of the superimposed frame and decreases smoothly with respect to the initial frame in the high-frequency region. In some embodiments, such as Figure 8C 、 Figure 8D and Figure 8E as shown, the amplitude of the decompressed frame is the same as that of the superimposed frame and increases smoothly with respect to the initial frame in the mid-frequency region. In some embodiments, such as Figure 8E as shown, the amplitude of the decompressed frame is the same as that of the superimposed frame and increases smoothly with respect to the initial frame in the low-frequency region. Among them, the amplitude increase of the decompressed frame in the mid-frequency region is greater than that in the low-frequency region.
[0223] In summary, for the data processing system 100 provided in this specification, when compressing the initial data, the method P200 is executed by the data compression device 200 to perform encoded spectral adjustment on the initial frames in the initial data using an encoded convolution kernel, so that the amplitudes of the initial frames gradually decrease smoothly in the low-frequency to high-frequency regions in the frequency domain, thereby reducing the data information in the initial frames, improving the encoding efficiency, reducing the data capacity after compression, and improving the data compression efficiency and data transmission efficiency. For the data processing system 100 provided in this specification, when decompressing the compressed frames, the method P300 is executed by the data decompression device 300 to perform decoded spectral adjustment on the compressed frames using a decoded convolution kernel, perform spectral adjustment on the compressed frames using a smoothly transitioning decoded spectral adjustment function H2(f), filter the components in the intermediate-frequency to high-frequency regions of the compressed frames, then find the difference between the compressed frames and the compressed frames that have undergone the decoded spectral adjustment to obtain the boundary information, and adjust the boundary information using an adjustment coefficient to restore it to the initial state or enhance it relative to the initial state; superimpose the compressed frames and the adjusted boundary information to obtain the decompressed frames. Among them, the decoded convolution kernel corresponding to the decoded spectral adjustment function H2(f) corresponds to the encoded convolution kernel, all coefficients are non-negative numbers, or the absolute value of the sum of the negative coefficients and the ratio of the sum of the non-negative coefficients are less than 0.1, thereby effectively avoiding the occurrence of the ringing effect and making the decompressed frames clearer. The method and system can improve the data compression efficiency, enhance the transmission efficiency, and at the same time can improve the clarity of the decompressed data and effectively eliminate the ringing effect.
[0224] This specification further provides a non-transitory storage medium storing at least one set of executable instructions for data processing. When the executable instructions are executed by a processor, the executable instructions direct the processor to perform the steps of data processing method P200. In some possible implementation manners, various aspects of this specification can also be implemented in the form of a program product, which includes program code. When the program product runs on a data compression device 200, the program code is used to cause the data compression device 200 to perform the steps of data processing described in this specification. The program product for implementing the above method can be a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a data compression device 200, such as a personal computer. However, the program product of this specification is not limited thereto. In this specification, a readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system (such as a compression end processor 220). The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the readable storage medium include: an electrical connection with one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than the readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or combined with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above. The program code for performing the operations of this specification can be written in any combination of one or more programming languages, and the programming languages include object-oriented programming languages - such as Java, C++, etc., and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the data compression device 200, partially on the data compression device 200, executed as an independent software package, partially on the data compression device 200 and partially on a remote computing device, or entirely on a remote computing device.In the case of a remote computing device, the remote computing device may be connected to the data compression device 200 via a transmission medium 120, or alternatively, may be connected to an external computing device.
[0225] The foregoing has described specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require a particular order or a sequential order to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0226] In summary, after reading this detailed disclosure, those skilled in the art will appreciate that the foregoing detailed disclosure may be presented by way of example only and is not limiting. Although not explicitly stated herein, those skilled in the art will understand that this specification is intended to encompass various reasonable changes, improvements, and modifications to the embodiments. These changes, improvements, and modifications are intended to be proposed by this specification and are within the spirit and scope of the exemplary embodiments of this specification.
[0227] Furthermore, certain terms in this specification have been used to describe embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" mean that the specific features, structures, or characteristics described in connection with the embodiment may be included in at least one embodiment of this specification. Thus, it should be emphasized and understood that two or more references to "an embodiment" or "one embodiment" or "alternative embodiments" in various parts of this specification do not necessarily all refer to the same embodiment. Additionally, the specific features, structures, or characteristics may be appropriately combined in one or more embodiments of this specification.
[0228] It should be understood that in the foregoing description of the embodiments of this specification, for the purpose of helping to understand a feature, and for the purpose of simplifying this specification, this specification combines various features in a single embodiment, drawing, or its description. However, this does not mean that the combination of these features is necessary, and those skilled in the art may well extract some of these features as separate embodiments when reading this specification. That is to say, the embodiments in this specification may also be understood as an integration of multiple sub - embodiments. And it also holds when the content of each sub - embodiment is less than all the features of a single foregoing disclosed embodiment.
[0229] Each patent, patent application, publication of patent application, and other materials cited herein, such as articles, books, specifications, publications, documents, items, etc., may be incorporated herein by reference. The entire content for all purposes, except any prosecution file history associated therewith, any same that may be inconsistent or in conflict with this document, or any same prosecution file history that may have a limiting effect on the broadest scope of the claims. Now or hereafter associated with this document. By way of example, if there is any inconsistency or conflict between the description, definition, and / or use of a term associated with any of the incorporated materials and the terms, descriptions, definitions, and / or of this document, the terms of this document shall control.
[0230] Finally, it should be understood that the embodiments of the application disclosed herein are illustrative of the principles of the embodiments of this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely examples and not limitations. Those skilled in the art may adopt alternative configurations in accordance with the embodiments in this specification to implement the application in this specification. Therefore, the embodiments of this specification are not limited to the embodiments precisely described in the application.
Claims
1. A method for data processing, characterized in that, Including: Obtaining compressed data, where the compressed data includes a compressed frame obtained by compressing initial data, and the data compression includes encoding spectrum adjustment; And Performing data decompression on the compressed frame to obtain a decompressed frame, including: Performing decoding spectrum adjustment on the frame to be decoded, and taking the difference between the frame to be decoded and the data after the frame to be decoded undergoes the decoding spectrum adjustment to obtain a boundary frame. The frame to be decoded includes the compressed frame and any data state of the compressed frame before it becomes the decompressed frame during the data decompression process. The boundary frame includes boundary information of the initial frame; and Superimposing the boundary frame and the frame to be decoded to obtain the decompressed frame; Wherein, the encoding spectrum adjustment corresponds to the decoding spectrum adjustment.
2. The method for data processing according to claim 1, wherein The encoding spectrum adjustment enables a smooth reduction in the amplitude of the frame being compressed in the intermediate frequency region in the frequency domain. The frame being compressed includes the initial frame and any data state of the initial frame before it becomes the compressed frame during the data compression process.
3. The method for data processing according to claim 1, wherein The decoding spectrum adjustment enables a smooth reduction in the amplitude of the frame to be decoded in the frequency domain to filter components in the intermediate frequency to high frequency regions.
4. The method for data processing according to claim 3, wherein The encoding spectrum adjustment includes convolving the frame being compressed with an encoding convolution kernel. The frame being compressed includes the initial frame and any data state of the initial frame before it becomes the compressed frame during the data compression process; The decoding spectrum adjustment includes convolving the frame to be decoded with a corresponding decoding convolution kernel based on the decoding convolution kernel. The absolute value of the sum of negative coefficients in the decoding convolution kernel and the ratio of the sum of non - negative coefficients is less than 0.
1.
5. The method for data processing according to claim 4, wherein The performing decoding spectrum adjustment on the frame to be decoded and taking the difference between the frame to be decoded and the data after the frame to be decoded undergoes the decoding spectrum adjustment to obtain a boundary frame includes: Decoding the compressed frame to obtain a decoded frame. The frame to be decoded includes the decoded frame; Performing the decoding spectrum adjustment on the decoded frame to obtain a decoded spectrum adjustment frame. The decoded spectrum adjustment frame filters components in the intermediate frequency to high frequency regions of the decoded frame; Taking the difference between the decoded frame and the decoded spectrum adjustment frame to obtain the boundary information; and Adjusting the boundary information based on an adjustment coefficient to obtain the boundary frame. The adjustment coefficient is a real number greater than 0.
6. The method for data processing according to claim 1, wherein The superimposing the boundary frame and the frame to be decoded to obtain the decompressed frame includes: Superimposing the boundary frame and the frame to be decoded to obtain a superimposed frame; and Taking the superimposed frame as the decompressed frame.
7. The method for data processing according to claim 1, wherein The superimposing the boundary frame and the frame to be decoded to obtain the decompressed frame includes: Superimposing the boundary frame and the frame to be decoded to obtain a superimposed frame; and Performing boundary adjustment on the superimposed frame to obtain the decompressed frame.
8. The method for data processing according to claim 7, wherein The performing boundary adjustment on the superimposed frame includes: Partitioning the superimposed frame based on the element values of the superimposed frame. The superimposed frame includes: A concave point region, where the concave point region includes elements corresponding to local minima; and A convex point region, where the convex point region includes elements corresponding to local maxima; Obtaining boundary values corresponding to each element in the concave point region and the convex point region in the superimposed frame; Based on a preset boundary threshold, adjust elements in the concave point region and the convex point region whose boundary values are greater than the boundary threshold to obtain adjustment values; and Based on the adjustment values, adjust the superimposed frame to obtain the decompressed frame.
9. The method for data processing according to claim 1, wherein The encoding spectrum adjustment corresponds to the decoding spectrum adjustment, so that the amplitude of the decompressed frame at any frequency in the low-frequency to mid-frequency region is not less than 85% of the initial frame.
10. The method for data processing according to claim 9, wherein The encoding spectrum adjustment includes convolving the frame being compressed using an encoding convolution kernel. The encoding spectrum adjustment has a gain greater than zero for adjusting the amplitude at any frequency in the low-frequency to mid-frequency region of the frame being compressed in the frequency domain. The frame being compressed includes the initial frame and any data state of the initial frame before it becomes the compressed frame during the data compression process.
11. The method for data processing according to claim 9, wherein The data decompression causes the amplitude of the decompressed frame to increase smoothly relative to the initial frame in the mid-frequency region.
12. The method for data processing according to claim 11, characterized in that, The data decompression causes the amplitude of the decompressed frame to increase smoothly relative to the initial frame in the low-frequency region, wherein the amplitude increase of the decompressed frame in the mid-frequency region is greater than the amplitude increase in the low-frequency region.
13. The method for data processing according to claim 9, wherein The data decompression causes the amplitude of the decompressed frame to decrease smoothly relative to the initial frame in the high-frequency region.
14. A data processing system, characterized in that, Comprising: At least one storage medium, including at least one instruction set for data processing; And At least one processor, communicatively connected to the at least one storage medium, wherein when the system runs, the at least one processor reads the at least one instruction set and executes the data processing method according to any one of claims 1-13 based on the instructions of the at least one instruction set.
Citation Information
Patent Citations
Data compressing and uncompressing method, data compressing and uncompressing device and data compressing and uncompressing system
CN102055974A
System and method for using signal waveform analysis for detecting a change in a wired network
CN110325929A