WO2022205297A1 - Data processing method and device, chip, unmanned aerial vehicle, and storage medium - Google Patents

Data processing method and device, chip, unmanned aerial vehicle, and storage medium Download PDF

Info

Publication number
WO2022205297A1
WO2022205297A1 PCT/CN2021/084888 CN2021084888W WO2022205297A1 WO 2022205297 A1 WO2022205297 A1 WO 2022205297A1 CN 2021084888 W CN2021084888 W CN 2021084888W WO 2022205297 A1 WO2022205297 A1 WO 2022205297A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
frequency
dimensional transform
algorithm
preset
Prior art date
Application number
PCT/CN2021/084888
Other languages
French (fr)
Chinese (zh)
Inventor
徐功林
张英
韩志
刘子男
徐笑溪
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2021/084888 priority Critical patent/WO2022205297A1/en
Publication of WO2022205297A1 publication Critical patent/WO2022205297A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/43Hardware specially adapted for motion estimation or compensation
    • H04N19/433Hardware specially adapted for motion estimation or compensation characterised by techniques for memory access
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets

Definitions

  • the present invention relates to the field of image data processing, and in particular, to a data processing method, device, chip, drone and storage medium.
  • DWT Discrete Wavelet Transformation
  • the present invention provides a data processing method, equipment, chip, unmanned aerial vehicle and storage medium, which are used to improve the efficiency of the DWT algorithm.
  • a first aspect of the present invention is to provide a data processing method, comprising: acquiring a to-be-processed image in a preset data format, and storing the data of the to-be-processed image according to a preset storage format; and according to the preset data format, from Obtain a preset number of first input data from the data, and the preset number is less than the number of input data that conforms to the preset transformation algorithm; based on the obtained first input data, according to the order from back to front Directly multiplex the last set of second input data that conforms to the preset number in the input data of the preset transformation algorithm, and use the first input data as input data to be processed; according to the input data to be processed and the preset input data
  • the transformation algorithm is used for calculation, and the processing result representing the data frequency of the image to be processed is obtained.
  • a second aspect of the present invention is to provide a data processing device, comprising: a memory and a processor; the memory is used to store a computer program; the processor invokes the computer program to implement the following steps: obtaining a preset For the image to be processed in the data format, the data of the to-be-processed image is stored according to the preset storage format; according to the preset data format, a preset number of first input data is obtained from the data, and the preset number is small In accordance with the number of input data in accordance with the preset transformation algorithm; Based on the obtained first input data, directly multiplex the previous group of data in accordance with the preset number in the preset transformation algorithm input data in the order from back to front.
  • the second input data and the first input data are used as input data to be processed; calculation is performed according to the input data to be processed and the preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
  • a third aspect of the present invention is to provide a chip, comprising: the device described in the second aspect.
  • a fourth aspect of the present invention is to provide an unmanned aerial vehicle, comprising: an airframe and the device according to the second aspect.
  • a fifth aspect of the present invention is to provide a computer-readable storage medium, the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions are used in the first aspect. method described.
  • the image to be processed in the preset data format is acquired, and the data of the image to be processed is stored according to the preset storage format; and the preset number of first input data is acquired from the data according to the preset data format, and the preset number is less than The number of input data that conforms to the preset transformation algorithm; based on the obtained first input data, the second input data of the preset number of the previous group of input data that conform to the preset transformation algorithm are directly multiplexed in the order from back to front, and take the first input data as input data to be processed; perform calculation according to the input data to be processed and a preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
  • the previous set of second input data that conforms to the preset number in the input data of the preset transformation algorithm are directly multiplexed in the order from back to front, and are treated with the first input data as pending processing. Enter data and perform subsequent data calculations. Since the input data to be processed is obtained based on the first input data and the directly multiplexed second input data, no additional buffering is required, thereby improving the efficiency of the calculation process and the performance of corresponding algorithms, such as the DWT algorithm.
  • FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of image processing provided by an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a data format of an image YUV420 provided by an embodiment of the present invention.
  • Fig. 4 is the schematic diagram of the ping-pong buffer storage data provided by the embodiment of the present invention.
  • FIG. 5 is a schematic diagram of data storage after preprocessing provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a specific storage result of data provided by an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a calculation result provided by an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a calculation result provided by an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a data processing device according to an embodiment of the present invention.
  • the image compression technology is widely used.
  • the DWT algorithm needs additional storage in the middle of the calculation process, and then read back to participate in the calculation, which is not efficient.
  • the embodiments of the present application provide a data processing method, which can improve the performance of the algorithm.
  • FIG. 1 is a schematic flowchart of a data processing method provided by an embodiment of the present invention
  • the method 100 provided by an embodiment of the present application may be executed by a flying device, such as an unmanned aerial vehicle, and more specifically, a system-on-chip SOC, such as this System-on-chip encoders, etc.
  • the method 100 includes the following steps:
  • the preset number is less than the number of input data conforming to the preset transformation algorithm.
  • execution body may also be other intelligent terminals, such as mobile phones, computers, servers, and the like.
  • the preset data format may refer to the data format of the preset image record, such as the YUV preset data format, and more specifically may be YUV420.
  • YUV divided into three components, "Y” represents the brightness (Luminance or Luma), that is, the gray value; while “U” and “V” represent the chroma (Chrominance or Chroma), which is used to describe the image. Hue and Saturation, used to specify the color of the pixel.
  • the preset storage format may refer to a preset storage format set based on the preset data format. For example, it can be stored in the corresponding buffer space according to the order of each component of YUV.
  • the image signal processor ISP201 in the system-on-chip SOC is responsible for receiving the original signal data of the sensor (Sensor) of the camera, and then processing to obtain a visible image.
  • the image is then sent to an FBC (Frame Buffer Compression, frame buffer compression) encoder, namely the FBC encoder 202, and is calculated by a subset module DWT algorithm on the encoder to compress the image.
  • the compressed image stream is input into the DDR (Double Data Rate Synchronous Dynamic Random Access Memory, double data rate synchronous dynamic random access memory) memory 203, thereby reducing the write bandwidth.
  • DDR Double Data Rate Synchronous Dynamic Random Access Memory, double data rate synchronous dynamic random access memory
  • the corresponding FBC decoder that is, the FBC decoder 204 requests the compressed image stream from the bus, decodes it, and outputs the decoded image data to the other modules 205 at the next level, thereby reducing the read stream.
  • Other modules 205 can process the decompressed image data, such as a display module, etc., to display the image.
  • YUV420 image data can be received through the AXI protocol (Advanced eXtensible Interface, a bus protocol).
  • AXI protocol Advanced eXtensible Interface, a bus protocol
  • Figure 3 shows the data format of the YUV420 image data. It is then cached to the internal random access memory ram. The cache process is written according to the bit width of 128 bits (the AXI bus is 128 bits wide). For an 8bit image (as shown in Figure 3), the image data in the internal ram is tightly arranged because 128bit contains 16 data. Then, according to the sequence of each component of YUV in the YUV420 image data, it can be stored in a buffer area buffer.
  • the UAV can also receive the original image sent by other devices, so it can be encoded by the above encoder directly through the AXI protocol without going through the image signal processor ISP201. It should be understood that the image transmission manner shown in FIG. 2 can be adjusted according to different application scenarios. For example, other modules may also be MCTF (Motion Compensated Temporal-Filtering, motion compensation temporal filtering) modules, which can read the encoded code stream directly from the DDR memory 203 . Other forms will not be repeated too much.
  • MCTF Motion Compensated Temporal-Filtering, motion compensation temporal filtering
  • two buffer cache areas of symmetric storage structures can be set, such as pingpong buffer (a means of data caching, which defines two cache areas of symmetric storage structures, one is ping buffer, the other is pong buffer).
  • This cache area is implemented by register files.
  • obtaining the image to be processed in the preset data format, and storing the data of the image to be processed according to the preset storage format includes: acquiring the image in the YUV preset data format as the image to be processed; The group of YUV component data is sequentially buffered in the corresponding buffer space in the first buffer area; after the first group of YUV component data is buffered, the second group of YUV component data is sequentially buffered in the corresponding buffer space in the second buffer area.
  • the first cache area may be a ping buffer
  • the second cache area may be a pong buffer. It should be understood that two other symmetric storage structure buffer cache areas may also be set to implement double buffer cache storage.
  • the line Y0 is stored in Y0403 in the ping buffer401 shown in Figure 4.
  • the ping buffer401 is stored.
  • the ping-pong buffer is stored.
  • the method 100 further includes: after buffering the first group of YUV component data, performing a step of obtaining a preset number of first input data from the data according to a preset data format to obtain a processing result, and continuing to cache the corresponding data
  • the YUV component data of the group is sent to the first buffer area, until the YUV component data is buffered; after the second group of YUV component data is buffered, the step of obtaining a preset number of first input data from the data is performed according to the preset data format. , so as to obtain the processing result, continue to buffer the YUV component data of the corresponding group in the second buffer area until the YUV component data is buffered.
  • the DWT subset module in the encoder can start data processing, that is, data calculation, and obtain the corresponding calculation result. Then calculate the data in the pong buffer 402 as shown in Figure 4, and obtain the corresponding calculation result. At the same time, continue to store the ping buffer401. After processing the data in pong buffer402, calculate the data in the new ping buffer401. And so on until the processing of the image data is completed.
  • the original image data is data of a preset bit depth type, such as 8-bit image data.
  • the original image data may be preprocessed (as described in the following embodiments) to satisfy different types of image data.
  • the buffer space can buffer data of images to be processed with at least two different bit depths.
  • the method 100 further includes: based on the data of the image to be processed with the largest bit depth among at least two different bit depths, expanding the corresponding original preset cache space in any cache area to generate a corresponding cache space.
  • the original preset buffer space buffers the data of the image to be processed with the smallest bit depth among at least two different bit depths.
  • the storage bit width can be expanded in the above manner, so as to accommodate the data of the images to be processed with different bit depths.
  • data expansion can be used to satisfy the above-mentioned expansion of the storage bit width.
  • the method 100 further includes: performing data expansion on the data of the to-be-processed image with a non-maximum bit depth among the at least two different bit depths, to obtain the data of the to-be-processed image with the maximum bit depth, so as to be cached in the buffer space.
  • the low-order bits of each 8-bit are filled with zeros and expanded into 10-bits for storage, thereby facilitating the support of 8-bit or 10-bit algorithms. So that the subsequent storage to the corresponding buffer.
  • the method 100 further includes: obtaining data corresponding to the buffer space for the data of the image to be processed with the maximum bit depth.
  • the 128-bit data received for the first time is temporarily not stored, and the subsequent received 128-bit data is made up into 160-bit and then stored (where the depth is 4). And so on.
  • the UV is interleaved when it comes from the AXI bus.
  • the UV can be split into the order of UUUUU...VVVV.
  • the bit width of U or V is 160bit, and the depth is 2.
  • the total UV depth is also 4.
  • the data of the Y0 row shown in Figure 3 is stored in the internal ping-pong buffer shown in Figure 4 after the above preprocessing is completed, and the corresponding Y0; the data of the Y1 row is stored in the internal after the above preprocessing is completed.
  • the ping-pong buffer corresponds to Y1; the UV data is stored in the corresponding UV in the internal ping-pong buffer after the above preprocessing.
  • Y0, Y1 or UV they are all corresponding 160*4 storage structures.
  • the preset number is less than the number of input data conforming to the preset transformation algorithm.
  • acquiring a preset number of first input data from the data according to the preset data format includes: for any cache area, based on the component order of YUV, sequentially acquiring at least two identical corresponding components from any cache area The data is used as the first input data, so that a plurality of corresponding processing results are obtained.
  • the subsequent DWT subset module obtains data from the corresponding buffer and starts calculation.
  • the input of Data in (data input) is 160bit, and the data of 20bit bit width is read out at a time, that is, 2 data, each data is 10bit, as the first input data. For example, for Y0, the corresponding two data can be read out at a time, 20bit.
  • the Y1602 is also similar. For UV603, it is 32 U and 32 V, and the same is also input with two data, so I won't go into details.
  • the DWT subset module in the encoder when the DWT subset module in the encoder is reading 1 set of data (that is, two data, 20 bits), it needs to multiplex one data of the previous set, that is, the second input data (except for the beginning part). , that is, outside the first group of data), a total of three data, as input data to be processed, an operation is performed for every three data. This corresponds to the output of 20bit data.
  • the method 100 further includes: when the first input data belongs to the first group of input data to be processed, performing mirror data supplementation based on the obtained first input data to obtain supplementary data; combining the first input data and the Supplementary data as the first set of input data to be processed.
  • the first input data such as idx1 and dix0
  • mirror automated mirror data supplementation
  • the method 100 further includes: after obtaining the last group of first input data from the data and performing calculations based on the obtained corresponding input data to be processed and a preset transformation algorithm, directly complex Use the preset number of second input data in the corresponding input data to be processed; perform mirror data supplementation based on the preset number of second input data to obtain supplementary data; use the preset number of second input data and supplementary data as the final A set of pending input data.
  • idx61 in the previous group of input data is directly multiplexed on the last group of first input data idx63 and idx62, to obtain corresponding input data idx63, idx62 and idx61 to be processed. And the corresponding calculation results are obtained after the DWT algorithm calculation. Then, the input data idx63, idx62, and idx61 to be processed are directly multiplexed in a back-to-front manner (ie, from left to right) to obtain second input data idx63. Then perform mirror supplementation to obtain supplementary data idx61, idx62, and obtain the last group of pending input data idx61, idx62, and idx63.
  • the preset transform algorithm includes discrete wavelet transform algorithm DWT.
  • FIG. 7 shows a complete calculation method of 2D-DWT taking the Y component as an example, including transformation parts 701 - 703 .
  • the first transformation part 701 is a one-dimensional transformation part.
  • the second transform part 702 is a 2-dimensional, Haar harr transform part.
  • the fourth transform portion 704 in the third transform portion 703 is a one-dimensional transform portion for L1 in YO.
  • the fifth transform portion 705 is a one-dimensional transform portion for L2 in YO.
  • the sixth transform portion 706 is a one-dimensional transform portion for L3 in YO.
  • the transformation mode of the Y0 part in 701 , 704 and 705 may be included, and the transformation mode of the corresponding Y1 part in 701 , 704 and 705 is not involved, so it is used as the one-dimensional DWT calculation mode of UV.
  • the calculation is performed according to the input data to be processed and the preset transformation algorithm, including: in the case of performing the one-dimensional transformation algorithm in the preset transformation algorithm, based on the input data to be processed and the high-frequency algorithm in the one-dimensional transformation algorithm, Obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data; based on the current one-dimensional transform high-frequency coefficients, directly multiplex the previous set of one-dimensional transform high-frequency coefficients representing high-frequency data and the low-frequency algorithm in the one-dimensional transform algorithm, The current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained.
  • the one-dimensional transform high-frequency coefficients of the previous group are obtained from the previous group of input data conforming to the preset transform algorithm and the high-frequency algorithm in the one-dimensional transform algorithm.
  • the one-dimensional transform of the previous group is obtained. High frequency coefficients are not cached.
  • the one-dimensional transformation algorithm is one-dimensional DWT.
  • the high frequency algorithm is as follows:
  • n 15
  • Y (idx31) of H1 is obtained, that is, the idx31 in H1 shown in Figure 8 requires three numbers of x0, x1, x-1, namely idx0, idx1 and idx-1.
  • Equation 3 changes to Equation 4), where n is 15:
  • Y(idxL15) is obtained, which is L15 in L1 shown in FIG. 8 .
  • the entire calculation process is completely pipelined, and the results of the previous level are given to the next level to participate in the calculation, without additional buffering and fetching in the middle.
  • the calculation is performed according to the input data to be processed and the preset transformation algorithm, including: in the case of performing the two-dimensional transformation algorithm in the preset transformation algorithm, directly multiplexing the corresponding one-dimensional transformation high-frequency coefficients and the two-dimensional transformation algorithm, Obtain the current two-dimensional transform high-frequency coefficients representing high-frequency data; directly multiplex the corresponding one-dimensional transform low-frequency coefficients and two-dimensional transform algorithms to obtain the current two-dimensional transform low-frequency coefficients representing low-frequency data, and the corresponding one-dimensional transform high-frequency coefficients No buffering is performed, and the corresponding one-dimensional transform low-frequency coefficients are not buffered.
  • the two-dimensional transformation algorithm refers to the Haar transform in the two-dimensional DWT.
  • Harr H and Harr L are calculated by the following formula 5) Haar transform algorithm:
  • Harr H and Harr L are calculated by the following formula 6) Haar transform algorithm:
  • the method 100 further includes: based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and a high-frequency algorithm in the one-dimensional transform algorithm, obtaining a current one representing high-frequency data.
  • the high-frequency coefficients of the two-dimensional transformation are used as the input of the high-frequency algorithm in the one-dimensional transformation algorithm, and the low-frequency coefficients of the two-dimensional transformation are not cached; based on the two-dimensional transformation algorithm
  • the current one-dimensional transform high-frequency coefficients obtained afterward, the one-dimensional transform high-frequency coefficients of the previous group and the low-frequency algorithm in the one-dimensional transform algorithm are directly multiplexed to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data.
  • HarrL data is used here , such as L29-31.
  • the method 100 further includes: based on the obtained current one-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, obtaining Indicates the current one-dimensional transform high-frequency coefficients of high-frequency data, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm.
  • the one-dimensional transform low-frequency coefficients are not Cache; based on the obtained current one-dimensional transform high-frequency coefficients, the one-dimensional transform high-frequency coefficients of the previous group that are directly multiplexed, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained.
  • the method 100 further includes: encoding the image to be processed based on the processing result.
  • the output result is dwt-coeff, and the dwt-coeff is expanded to form a bitplane bit plane to complete subsequent image encoding.
  • the DWT result is written to the storage through the internal bus line; for Y1, there are at most 2 outputs at a time, corresponding to Harr H and Harr L; for Y0, there are at most 3 outputs at a time, corresponding to Harr H and H2 , H3 or Harr H and H2, H4H or L4.
  • Y0 The address line is 6bit, and the data bit width is 12bit*3 for a single output result.
  • Y1 The address line is 6bit, and the data bit width is 12bit*2 for a single output result.
  • UV address line 5bit, data bit width is 12bit*3 for a single output result. The entire process does not require additional caching, and the data is pipline executed to improve efficiency.
  • the encoded image stream can be subjected to subsequent processing, such as transmission, storage, and decoding.
  • the method 100 further includes: storing the encoded image to be processed in a corresponding storage area for transmission or decoding.
  • the FBC encoder 202 can send the encoded code stream, that is, the image code stream, to the DDR memory 203 for storage, waiting for decoding, or can be transmitted to other devices.
  • the encoded code stream in the DDR memory 203 can be decoded by the FBC decoder 204 .
  • FIG. 10 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present invention; the apparatus 1000 can be applied to a flying device, such as an unmanned aerial vehicle, more specifically an FBC encoder, and the apparatus 1000 can execute the above-mentioned data processing method.
  • the apparatus 1000 includes: an acquisition module 1001 , a multiplexing module 1002 and a processing module 10003 . The functions of each module are described in detail below:
  • the obtaining module 1001 is configured to obtain the to-be-processed image in a preset data format, and store the data of the to-be-processed image according to the preset storage format.
  • the obtaining module 1001 is configured to obtain a preset amount of first input data from the data according to a preset data format.
  • the preset number is less than the number of input data conforming to the preset transformation algorithm.
  • the multiplexing module 1002 is configured to, based on the acquired first input data, directly multiplex the last set of second input data in accordance with the preset number of input data of the preset transformation algorithm in the order from back to front, and combine them with the first input data. Input data as pending input data.
  • the processing module 1003 is configured to perform calculation according to the input data to be processed and a preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
  • the apparatus 1000 further includes: an encoding module, configured to encode the image to be processed based on the processing result.
  • the processing module 1003 includes: a first determining unit, configured to obtain a high-frequency representation based on the input data to be processed and a high-frequency algorithm in the one-dimensional The current one-dimensional transform high-frequency coefficients of the high-frequency data; the second determination unit is used for directly multiplexing the previous one-dimensional transform high-frequency coefficients representing the high-frequency data based on the current one-dimensional transform high-frequency coefficients and the one-dimensional transform algorithm.
  • the low-frequency algorithm is used to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data.
  • the one-dimensional transform high-frequency coefficients of the previous group are obtained from the input data of the previous group conforming to the preset transform algorithm and the high-frequency algorithm in the one-dimensional transform algorithm.
  • the high-frequency coefficients of the 1D transform are not cached.
  • the processing module 1003 includes: a third determining unit, configured to directly multiplex the corresponding one-dimensional transform high-frequency coefficients and the two-dimensional transform algorithm in the case of performing the two-dimensional transform algorithm in the preset transform algorithm to obtain the representation The current two-dimensional transform high-frequency coefficients of the high-frequency data; the fourth determining unit is used to directly multiplex the corresponding one-dimensional transform low-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform low-frequency coefficients representing the low-frequency data.
  • the high-frequency coefficients of the one-dimensional transform are not cached, and the corresponding low-frequency coefficients of the one-dimensional transform are not cached.
  • processing module 1003 is also used for: based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, to obtain the high-frequency data representing the high-frequency data.
  • the current one-dimensional transform high-frequency coefficients, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups are used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the two-dimensional transform low-frequency coefficients are not cached; based on the two-dimensional transform
  • the current one-dimensional transform high-frequency coefficients obtained after the transform algorithm, the one-dimensional transform high-frequency coefficients of the previous group and the low-frequency algorithm in the one-dimensional transform algorithm are directly multiplexed to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data.
  • the processing module 1003 is further configured to: based on the obtained current one-dimensional transform low-frequency coefficients, directly multiplex the first two sets of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency coefficients in the one-dimensional transform algorithm.
  • frequency algorithm to obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm.
  • the transformed low-frequency coefficients are not cached; based on the obtained current one-dimensional transform high-frequency coefficients, the one-dimensional transform high-frequency coefficients of the previous group that are directly multiplexed, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform representing the low-frequency data is obtained. low frequency coefficients.
  • the preset transform algorithm includes discrete wavelet transform algorithm.
  • processing module 1003 is further configured to: when the first input data belongs to the first group of input data to be processed, perform mirror data supplementation based on the obtained first input data to obtain supplementary data; and the supplementary data as the first set of input data to be processed.
  • the multiplexing module 1002 is also used for: after obtaining the last group of first input data from the data and calculating based on the corresponding input data to be processed and the preset transformation algorithm, follow the sequence from back to front. Directly multiplexing a preset number of second input data in the corresponding input data to be processed; the device 1000 further includes a determination module for performing mirror data supplementation based on the preset number of second input data to obtain supplementary data; The set number of second input data and supplementary data are used as the final set of pending input data.
  • the acquisition module 1001 includes: an acquisition unit for acquiring an image in a YUV preset data format as an image to be processed; a cache unit for sequentially caching the first group of YUV component data to the first group of YUV component data according to the YUV component order A buffer space corresponding to the buffer area; the buffer unit is used for sequentially buffering the YUV component data of the second group to the corresponding buffer space in the second buffer area after buffering the YUV component data of the first group.
  • the acquiring module 1001 After the first group of YUV component data is cached, the acquiring module 1001 performs the step of acquiring a preset number of first input data from the data according to the preset data format to obtain the processing result, and the cache unit is used to continue to cache the corresponding group
  • the YUV component data is stored in the first buffer area, until the YUV component data is buffered; after the second group of YUV component data is buffered, the acquisition module 1001 executes according to the preset data format, from the data to obtain a preset number of first input data step, so that when the processing result is reached, the buffer unit is used to continue buffering the YUV component data of the corresponding group to the second buffer area until the YUV component data is buffered.
  • the acquiring module 1001 is configured to: for any buffer area, based on the component order of YUV, sequentially acquire at least two identical corresponding component data from any buffer area as the first input data, so that a plurality of corresponding component data are obtained. process result.
  • the buffer space buffers data of at least two images to be processed with different bit depths.
  • the apparatus 1000 further includes: an expansion module, configured to expand the corresponding original preset cache space in any cache area based on the data of the image to be processed with the largest bit depth in at least two different bit depths, and generate a corresponding In the buffer space, the original preset buffer space buffers the data of the image to be processed with the smallest bit depth among at least two different bit depths.
  • an expansion module configured to expand the corresponding original preset cache space in any cache area based on the data of the image to be processed with the largest bit depth in at least two different bit depths, and generate a corresponding In the buffer space, the original preset buffer space buffers the data of the image to be processed with the smallest bit depth among at least two different bit depths.
  • the device 1000 also includes: an expansion module for performing data expansion on the data of the to-be-processed image with a non-maximum bit-depth in at least two different bit depths, to obtain the data of the to-be-processed image with the maximum bit depth, and buffering the data into the buffer space.
  • an expansion module for performing data expansion on the data of the to-be-processed image with a non-maximum bit-depth in at least two different bit depths, to obtain the data of the to-be-processed image with the maximum bit depth, and buffering the data into the buffer space.
  • the obtaining module 1001 is further configured to obtain data corresponding to the buffer space for the data of the image to be processed with the maximum bit depth.
  • the apparatus 1000 further includes: a storage module for storing the encoded image to be processed in a corresponding storage area for transmission or decoding.
  • the structure of the data processing apparatus 1000 shown in FIG. 10 may be implemented as an electronic device, and the electronic device may be a data processing device.
  • the data processing device 1100 may include: one or more processors 1101 and one or more memories 1102 .
  • the memory 1102 is used for storing a program that supports the electronic device to execute the data processing method provided in the embodiments shown in FIG. 1 to FIG. 9 .
  • the processor 1101 is configured to execute programs stored in the memory 1102 .
  • the program includes one or more computer instructions, wherein the one or more computer instructions can realize the following steps when executed by the processor 1101:
  • the computer program stored in the memory 1102 is run to realize: obtaining the image to be processed in a preset data format, and storing the data of the image to be processed according to the preset storage format; obtaining a preset number of first inputs from the data according to the preset data format Data, the preset number is less than the number of input data conforming to the preset transformation algorithm; based on the obtained first input data, the presets in the previous set of input data conforming to the preset transformation algorithm are directly reused in the order from back to front
  • the number of second input data is combined with the first input data as input data to be processed; calculation is performed according to the input data to be processed and a preset transformation algorithm, and a processing result representing the data frequency of the image to be processed is obtained.
  • the processor 1101 is further configured to: encode the image to be processed based on the processing result.
  • the processor 1101 is specifically configured to: in the case of performing the one-dimensional transformation algorithm in the preset transformation algorithm, based on the input data to be processed and the high-frequency algorithm in the one-dimensional transformation algorithm, obtain the current value representing the high-frequency data.
  • One-dimensional transform high-frequency coefficients based on the current one-dimensional transform high-frequency coefficients, directly multiplexing the previous set of one-dimensional transform high-frequency coefficients representing high-frequency data, and the low-frequency algorithm in the one-dimensional transform algorithm, obtain the current one-dimensional transform representing low-frequency data.
  • the low-frequency coefficients of the one-dimensional transformation are obtained from the input data of the previous group conforming to the preset transformation algorithm and the high-frequency algorithm in the one-dimensional transformation algorithm, and the high-frequency coefficients of the one-dimensional transformation of the previous group are not cached.
  • the processor 1101 is specifically configured to: in the case of performing the two-dimensional transform algorithm in the preset transform algorithm, directly multiplex the corresponding one-dimensional transform high-frequency coefficients and the two-dimensional transform algorithm to obtain high-frequency data representing high-frequency data.
  • the current two-dimensional transform high-frequency coefficients are directly multiplexed with the corresponding one-dimensional transform low-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform low-frequency coefficients representing low-frequency data, and the corresponding one-dimensional transform high-frequency coefficients are not cached , the corresponding one-dimensional transform low-frequency coefficients are not cached.
  • the processor 1101 is further configured to: based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, to obtain the high-frequency data representing the high-frequency data.
  • the current one-dimensional transform high-frequency coefficients, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups are used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the two-dimensional transform low-frequency coefficients are not cached; based on the two-dimensional transform
  • the current one-dimensional transform high-frequency coefficients obtained after the transform algorithm, the one-dimensional transform high-frequency coefficients of the previous group and the low-frequency algorithm in the one-dimensional transform algorithm are directly multiplexed to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data.
  • the processor 1101 is further configured to: based on the obtained current one-dimensional transform low-frequency coefficients, directly multiplex the first two sets of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency coefficients in the one-dimensional transform algorithm. frequency algorithm to obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm.
  • the transformed low-frequency coefficients are not cached; based on the obtained current one-dimensional transform high-frequency coefficients, the one-dimensional transform high-frequency coefficients of the previous group that are directly multiplexed, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform representing the low-frequency data is obtained. low frequency coefficients.
  • the preset transform algorithm includes discrete wavelet transform algorithm.
  • the processor 1101 is further configured to: when the first input data belongs to the first group of input data to be processed, perform mirror data supplementation based on the acquired first input data to obtain supplementary data; and supplementary data as the first set of pending input data.
  • the processor 1101 is further configured to: when the last group of first input data is obtained from the data and the calculation is performed based on the obtained corresponding input data to be processed and the preset transformation algorithm, directly follow the sequence from back to front. Multiplexing the preset number of second input data in the corresponding input data to be processed; performing mirror data supplementation based on the preset number of second input data to obtain supplementary data; using the preset number of second input data and supplementary data as The last set of pending input data.
  • the processor 1101 is specifically used to: obtain an image in a YUV preset data format as an image to be processed; according to the component order of YUV, sequentially cache the first group of YUV component data in the corresponding cache space in the first cache area; After buffering the first group of YUV component data, buffer the second group of YUV component data in the corresponding buffer space in the second buffer area in turn; The step of obtaining a preset number of first input data in the data, so that to the processing result, continue to cache the YUV component data of the corresponding group to the first cache area until the YUV component data is cached; after the second group of YUV component data is cached After the data, perform the step of obtaining a preset number of first input data from the data according to the preset data format to obtain the processing result, and continue to cache the YUV component data of the corresponding group to the second cache area until the YUV is cached. component data.
  • the processor 1101 is specifically configured to: for any cache area, based on the component order of YUV, sequentially acquire at least two identical corresponding component data from any cache area as the first input data, so that multiple corresponding component data are obtained. processing result.
  • the buffer space buffers data of at least two images to be processed with different bit depths.
  • the processor 1101 is further configured to: expand the corresponding original preset cache space in any cache area based on the data of the image to be processed with the largest bit depth among the at least two different bit depths, and generate the corresponding cache space,
  • the original preset buffer space buffers the data of the image to be processed with the smallest bit depth among at least two different bit depths.
  • the processor 1101 is further configured to: perform data expansion on the data of the to-be-processed image with a non-maximum bit-depth among at least two different bit-depths, to obtain the data of the to-be-processed image with the maximum bit depth, so as to be cached in the cache space .
  • the processor 1101 is further configured to obtain data corresponding to the cache space for the data of the image to be processed with the maximum bit depth.
  • the processor 1101 is further configured to: store the encoded image to be processed in a corresponding storage area for transmission or decoding.
  • an embodiment of the present invention provides a computer-readable storage medium, where the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions are used to implement the above-mentioned methods in FIGS. 1 to 9 . .
  • a chip, such as an SOC, provided by an embodiment of the present invention includes: the above-mentioned device.
  • An embodiment of the present invention provides an unmanned aerial vehicle; specifically, the unmanned aerial vehicle includes: a body and a data processing device shown in FIG. 11 , and the data processing device is arranged on the body.
  • the disclosed related detection apparatus eg, IMU
  • the embodiments of the remote control device described above are only illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be other division methods, such as multiple units or components. May be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection of the remote control device or unit may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer processor (processor) to perform all or part of the steps of the methods described in the various embodiments of the present invention.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

A data processing method and device, a chip, an unmanned aerial vehicle, and a storage medium. The data processing method comprises: obtaining an image to be processed of a preset data format, and storing data of said image according to a preset storage format (101); obtaining a preset number of first input data from the data according to the preset data format, the preset number being less than the number of input data satisfying a preset transformation algorithm (102); on the basis of the obtained first input data, directly multiplexing, from back to front, a preset number of second input data in the previous group of input data satisfying the preset transformation algorithm, and using the second input data and the first input data as input data to be processed (103); and performing calculation according to the input data to be processed and the preset transformation algorithm to obtain a processing result indicating data frequency of said image (104). The input data to be processed is obtained on the basis of the first input data and the directly multiplexed second input data, and extra cache is not needed, such that the efficiency of a calculation process can be improved.

Description

数据处理方法、设备、芯片、无人机和存储介质Data processing method, device, chip, drone and storage medium 技术领域technical field
本发明涉及领域图像数据处理领域,尤其涉及一种数据处理方法、设备、芯片、无人机和存储介质。The present invention relates to the field of image data processing, and in particular, to a data processing method, device, chip, drone and storage medium.
背景技术Background technique
随着图像技术的不断发展,片上系统(SOC)带宽越来越有可能成为数据传输的瓶颈。因此,图像压缩技术应用日益广泛。图像压缩编码过程中通常会用到DWT算法,DWT(Discrete Wavelet Transformation),即离散小波变换。而作为Huming压缩算法的前端部分,DWT算法的性能对整个压缩算法的性能也有着重要影响,而如何提高该算法性能变得很重要。With the continuous development of imaging technology, system-on-chip (SOC) bandwidth is more and more likely to become the bottleneck of data transmission. Therefore, image compression technology is widely used. DWT algorithm, DWT (Discrete Wavelet Transformation), is usually used in the process of image compression and encoding, namely discrete wavelet transform. As the front-end part of the Huming compression algorithm, the performance of the DWT algorithm also has an important impact on the performance of the entire compression algorithm, and how to improve the performance of the algorithm becomes very important.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种数据处理方法、设备、芯片、无人机和存储介质,用于提高DWT算法的效率。The present invention provides a data processing method, equipment, chip, unmanned aerial vehicle and storage medium, which are used to improve the efficiency of the DWT algorithm.
本发明的第一方面是为了提供一种数据处理方法,包括:获取预置数据格式的待处理图像,根据预置存储格式存储所述待处理图像的数据;根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据,所述预置数量少于符合预置变换算法输入数据的个数;基于获取到的所述第一输入数据,按照从后到前的顺序直接复用上一组符合所述预置变换算法输入数据中预置数量的第二输入数据,并与所述第一输入数据作为待处理输入数据;根据所述待处理输入数据以及所述预置变换算法进行计算,得到表示所述待处理图像的数据频率的处理结果。A first aspect of the present invention is to provide a data processing method, comprising: acquiring a to-be-processed image in a preset data format, and storing the data of the to-be-processed image according to a preset storage format; and according to the preset data format, from Obtain a preset number of first input data from the data, and the preset number is less than the number of input data that conforms to the preset transformation algorithm; based on the obtained first input data, according to the order from back to front Directly multiplex the last set of second input data that conforms to the preset number in the input data of the preset transformation algorithm, and use the first input data as input data to be processed; according to the input data to be processed and the preset input data The transformation algorithm is used for calculation, and the processing result representing the data frequency of the image to be processed is obtained.
本发明的第二方面是为了提供一种数据处理设备,包括:存储器、处理器;所述存储器,用于存储计算机程序;所述处理器调用所述计算机程序,以实现如下步骤:获取预置数据格式的待处理图像,根据预置存储格式存储所述待处理图像的数据;根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据,所述预置数量少于符合预置变换算法输入数据的个数; 基于获取到的所述第一输入数据,按照从后到前的顺序直接复用上一组符合所述预置变换算法输入数据中预置数量的第二输入数据,并与所述第一输入数据作为待处理输入数据;根据所述待处理输入数据以及所述预置变换算法进行计算,得到表示所述待处理图像的数据频率的处理结果。A second aspect of the present invention is to provide a data processing device, comprising: a memory and a processor; the memory is used to store a computer program; the processor invokes the computer program to implement the following steps: obtaining a preset For the image to be processed in the data format, the data of the to-be-processed image is stored according to the preset storage format; according to the preset data format, a preset number of first input data is obtained from the data, and the preset number is small In accordance with the number of input data in accordance with the preset transformation algorithm; Based on the obtained first input data, directly multiplex the previous group of data in accordance with the preset number in the preset transformation algorithm input data in the order from back to front. The second input data and the first input data are used as input data to be processed; calculation is performed according to the input data to be processed and the preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
本发明的第三方面是为了提供一种芯片,包括:第二方面所述的设备。A third aspect of the present invention is to provide a chip, comprising: the device described in the second aspect.
本发明的第四方面是为了提供一种无人机,包括:机体以及如第二方面所述的设备。A fourth aspect of the present invention is to provide an unmanned aerial vehicle, comprising: an airframe and the device according to the second aspect.
本发明的第五方面是为了提供一种计算机可读存储介质,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于第一方面所述的方法。A fifth aspect of the present invention is to provide a computer-readable storage medium, the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions are used in the first aspect. method described.
本发明提供的获取预置数据格式的待处理图像,根据预置存储格式存储待处理图像的数据;根据预置数据格式,从数据中获取预置数量的第一输入数据,预置数量少于符合预置变换算法输入数据的个数;基于获取到的第一输入数据,按照从后到前的顺序直接复用上一组符合预置变换算法输入数据中预置数量的第二输入数据,并与第一输入数据作为待处理输入数据;根据待处理输入数据以及预置变换算法进行计算,得到表示待处理图像的数据频率的处理结果。According to the present invention, the image to be processed in the preset data format is acquired, and the data of the image to be processed is stored according to the preset storage format; and the preset number of first input data is acquired from the data according to the preset data format, and the preset number is less than The number of input data that conforms to the preset transformation algorithm; based on the obtained first input data, the second input data of the preset number of the previous group of input data that conform to the preset transformation algorithm are directly multiplexed in the order from back to front, and take the first input data as input data to be processed; perform calculation according to the input data to be processed and a preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
其中,基于获取到的第一输入数据,按照从后到前的顺序直接复用上一组符合预置变换算法输入数据中预置数量的第二输入数据,并与第一输入数据作为待处理输入数据,并进行后续的数据计算。由于待处理输入数据是基于第一输入数据,并直接复用的第二输入数据得到的,无需进行额外缓存,从而可以提高计算过程的效率,提高对应算法,如DWT算法性能。Wherein, based on the obtained first input data, the previous set of second input data that conforms to the preset number in the input data of the preset transformation algorithm are directly multiplexed in the order from back to front, and are treated with the first input data as pending processing. Enter data and perform subsequent data calculations. Since the input data to be processed is obtained based on the first input data and the directly multiplexed second input data, no additional buffering is required, thereby improving the efficiency of the calculation process and the performance of corresponding algorithms, such as the DWT algorithm.
附图说明Description of drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:
图1为本发明实施例提供的一种数据处理方法的流程示意图;1 is a schematic flowchart of a data processing method according to an embodiment of the present invention;
图2为本发明实施例提供的图像处理的示意图;2 is a schematic diagram of image processing provided by an embodiment of the present invention;
图3为本发明实施例提供的图像YUV420的数据格式的示意图;3 is a schematic diagram of a data format of an image YUV420 provided by an embodiment of the present invention;
图4为本发明实施例提供的ping-pong buffer存储数据的示意图;Fig. 4 is the schematic diagram of the ping-pong buffer storage data provided by the embodiment of the present invention;
图5为本发明实施例提供的数据在预处理后的存放的示意图;5 is a schematic diagram of data storage after preprocessing provided by an embodiment of the present invention;
图6为本发明实施例提供的数据的具体存储结果的示意图;6 is a schematic diagram of a specific storage result of data provided by an embodiment of the present invention;
图7为本发明实施例提供的数据计算的示意图;7 is a schematic diagram of data calculation provided by an embodiment of the present invention;
图8为本发明实施例提供的计算结果的示意图;8 is a schematic diagram of a calculation result provided by an embodiment of the present invention;
图9为本发明实施例提供的计算结果的示意图;9 is a schematic diagram of a calculation result provided by an embodiment of the present invention;
图10为本发明实施例提供的一种数据处理装置的结构示意图;10 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
图11为本发明实施例提供的一种数据处理设备的结构示意图。FIG. 11 is a schematic structural diagram of a data processing device according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention.
为了便于理解本申请的技术方案和技术效果,下面对现有技术进行简要说明:In order to facilitate the understanding of the technical solutions and technical effects of the present application, the prior art is briefly described below:
根据前文所述可知,由于片上系统(SOC)带宽越来越有可能成为数据传输的瓶颈,使得图像压缩技术应用日益广泛。而其中DWT算法在计算的过程中,需要中间额外存储,然后再读回参与计算,效率不高。As can be seen from the foregoing, because the bandwidth of the system on chip (SOC) is more and more likely to become the bottleneck of data transmission, the image compression technology is widely used. Among them, the DWT algorithm needs additional storage in the middle of the calculation process, and then read back to participate in the calculation, which is not efficient.
故,本申请实施例提供了一种数据处理方式,能够提高该算法性能。Therefore, the embodiments of the present application provide a data processing method, which can improve the performance of the algorithm.
下面结合附图,对本发明的一些实施方式作详细说明。在各实施例之间不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following embodiments and features in the embodiments may be combined with each other without conflict between the embodiments.
图1为本发明实施例提供的一种数据处理方法的流程示意图;本申请实施例提供的该方法100可以由飞行设备执行,如,无人机,更具体的可以是片上系统SOC,如该片上系统的编码器等。该方法100包括以下步骤:1 is a schematic flowchart of a data processing method provided by an embodiment of the present invention; the method 100 provided by an embodiment of the present application may be executed by a flying device, such as an unmanned aerial vehicle, and more specifically, a system-on-chip SOC, such as this System-on-chip encoders, etc. The method 100 includes the following steps:
101:获取预置数据格式的待处理图像,根据预置存储格式存储待处理图像的数据。101: Acquire a to-be-processed image in a preset data format, and store data of the to-be-processed image according to a preset storage format.
102:根据预置数据格式,从数据中获取预置数量的第一输入数据。102: Acquire a preset amount of first input data from the data according to the preset data format.
其中,预置数量少于符合预置变换算法输入数据的个数。Wherein, the preset number is less than the number of input data conforming to the preset transformation algorithm.
103:基于获取到的第一输入数据,按照从后到前的顺序直接复用上一组符合预置变换算法输入数据中预置数量的第二输入数据,并与第一输入数据作为待处理输入数据。103: Based on the obtained first input data, directly multiplex the last set of second input data that conforms to the preset number in the input data of the preset transformation algorithm in the order from back to front, and use the first input data as pending processing Input data.
104:根据待处理输入数据以及预置变换算法进行计算,得到表示待处理图像的数据频率的处理结果。104 : Perform calculation according to the input data to be processed and a preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
需要说明的是,该执行主体也可以为其它智能终端,如手机、电脑、服务器等。It should be noted that the execution body may also be other intelligent terminals, such as mobile phones, computers, servers, and the like.
以下针对上述步骤进行详细地阐述:The above steps are described in detail below:
101:获取预置数据格式的待处理图像,根据预置存储格式存储待处理图像的数据。101: Acquire a to-be-processed image in a preset data format, and store data of the to-be-processed image according to a preset storage format.
其中,预置数据格式可以是指预置图像记录的数据格式,如YUV预置数据格式,更具体可以是YUV420。YUV,分为三个分量,“Y”表示明亮度(Luminance或Luma),也就是灰度值;而“U”和“V”表示的则是色度(Chrominance或Chroma),作用是描述影像色彩及饱和度,用于指定像素的颜色。Wherein, the preset data format may refer to the data format of the preset image record, such as the YUV preset data format, and more specifically may be YUV420. YUV, divided into three components, "Y" represents the brightness (Luminance or Luma), that is, the gray value; while "U" and "V" represent the chroma (Chrominance or Chroma), which is used to describe the image. Hue and Saturation, used to specify the color of the pixel.
预置存储格式可以是指基于预置数据格式,而设置的预置存储格式。例如,可以根据YUV各个分量的顺序,存储至对应的缓存空间中。The preset storage format may refer to a preset storage format set based on the preset data format. For example, it can be stored in the corresponding buffer space according to the order of each component of YUV.
例如,无人机在上空航行,可以通过无人机搭载的相机,进行图像拍摄。如图2所示,并由片上系统SOC中的图像信号处理器ISP201负责接收相机的感光元件(Sensor)的原始信号数据,然后进行处理得到可视图像。再将图像发送至FBC(Frame Buffer Compression,帧缓存压缩)encoder编码器,即FBC编码器202,并由该编码器上的一个子集模块DWT算法进行计算,以对图像压缩。并将压缩后的图像码流输入至DDR(Double Data Rate Synchronous Dynamic Random Access Memory,双倍数据率同步动态随机存取存储器)内存203中,从而减小写带宽。再由对应的FBC decoder解码器,即FBC解码器204从总线请求压缩后的图像码流,进行解码,将解码后的图像数据输出给下一级其它模块205,从而减小读码流。其它模块205可以对解压后的图像数据进行处理,如显示模块等,进行图像显示。For example, when a drone is sailing in the sky, images can be taken through the camera mounted on the drone. As shown in Figure 2, the image signal processor ISP201 in the system-on-chip SOC is responsible for receiving the original signal data of the sensor (Sensor) of the camera, and then processing to obtain a visible image. The image is then sent to an FBC (Frame Buffer Compression, frame buffer compression) encoder, namely the FBC encoder 202, and is calculated by a subset module DWT algorithm on the encoder to compress the image. The compressed image stream is input into the DDR (Double Data Rate Synchronous Dynamic Random Access Memory, double data rate synchronous dynamic random access memory) memory 203, thereby reducing the write bandwidth. Then the corresponding FBC decoder, that is, the FBC decoder 204 requests the compressed image stream from the bus, decodes it, and outputs the decoded image data to the other modules 205 at the next level, thereby reducing the read stream. Other modules 205 can process the decompressed image data, such as a display module, etc., to display the image.
在上述编码器中,可以先通过AXI协议(Advanced eXtensible Interface,一种总线协议)接收到待处理图像:YUV420图像数据。如图3所示,图3示出了YUV420图像数据的数据格式。然后进行缓存到内部随机存取存储器ram。该 缓存过程是按照128bit(比特)的位宽写入的(AXI总线为128bit位宽)。对于8bit图像而言(如图3所示),内部ram中的图像数据是紧密排列的,因为128bit包含了16个数据。然后可以根据该YUV420图像数据中YUV各个分量的顺序,存储至一个缓存区域buffer中。In the above encoder, the image to be processed: YUV420 image data can be received through the AXI protocol (Advanced eXtensible Interface, a bus protocol). As shown in Figure 3, Figure 3 shows the data format of the YUV420 image data. It is then cached to the internal random access memory ram. The cache process is written according to the bit width of 128 bits (the AXI bus is 128 bits wide). For an 8bit image (as shown in Figure 3), the image data in the internal ram is tightly arranged because 128bit contains 16 data. Then, according to the sequence of each component of YUV in the YUV420 image data, it can be stored in a buffer area buffer.
需要说明的是,在无人机也可以接收到其它设备发送过来的原始图像,那么就无需经过图像信号处理器ISP201,可以直接通过AXI协议由上述编码器进行编码。应理解,可以根据不同的应用场景,来调整图2所示的图像传输方式。如,其它模块还可以是MCTF(Motion Compensated Temporal-Filtering,运动补偿时域滤波)模块,读取编码后的码流,可以直接从DDR内存203中进行读取。其它形式就不再过多赘述。It should be noted that the UAV can also receive the original image sent by other devices, so it can be encoded by the above encoder directly through the AXI protocol without going through the image signal processor ISP201. It should be understood that the image transmission manner shown in FIG. 2 can be adjusted according to different application scenarios. For example, other modules may also be MCTF (Motion Compensated Temporal-Filtering, motion compensation temporal filtering) modules, which can read the encoded code stream directly from the DDR memory 203 . Other forms will not be repeated too much.
为了提高图像压缩过程,特别是提高DWT算法的性能,可以设置两个对称存储结构的buffer缓存区域,如pingpong buffer(一种数据缓存的手段,定义了两个对称存储结构的缓存区域,一个是ping buffer,另一个是pong buffer)。该缓存区域通过寄存器堆实现。In order to improve the image compression process, especially the performance of the DWT algorithm, two buffer cache areas of symmetric storage structures can be set, such as pingpong buffer (a means of data caching, which defines two cache areas of symmetric storage structures, one is ping buffer, the other is pong buffer). This cache area is implemented by register files.
具体的,预置数据格式的获取待处理图像,根据预置存储格式存储待处理图像的数据,包括:获取YUV预置数据格式的图像,作为待处理图像;根据YUV的分量顺序,将第一组YUV分量数据依次缓存至第一缓存区域中对应的缓存空间;在缓存完第一组YUV分量数据后,将第二组YUV分量数据依次缓存至第二缓存区域中对应的缓存空间。Specifically, obtaining the image to be processed in the preset data format, and storing the data of the image to be processed according to the preset storage format includes: acquiring the image in the YUV preset data format as the image to be processed; The group of YUV component data is sequentially buffered in the corresponding buffer space in the first buffer area; after the first group of YUV component data is buffered, the second group of YUV component data is sequentially buffered in the corresponding buffer space in the second buffer area.
其中,第一缓存区域可以是ping buffer,第二缓存区域可以是pong buffer。应理解,也可以设置其它的两个对称存储结构buffer缓存区域,用来实现双buffer的缓存存储即可。Wherein, the first cache area may be a ping buffer, and the second cache area may be a pong buffer. It should be understood that two other symmetric storage structure buffer cache areas may also be set to implement double buffer cache storage.
例如,根据前文所述,编码器在获取到YUV420图像数据后,如图3所示,将其中Y0行存放到如图4所示中的ping buffer401中的Y0403中。将图3中Y1行存放到如图4所示中的ping buffer401中的Y1中。将图3中Y1行后的UV行存放到如图4所示中的ping buffer401中的UV中。由此,ping buffer401存储完毕。然后再存储如图4所示中的pong buffer402,此时可以从图3中Y2行开始存储,依次类推,就不再赘述。ping-pong buffer存储完毕。For example, according to the foregoing, after the encoder obtains the YUV420 image data, as shown in Figure 3, the line Y0 is stored in Y0403 in the ping buffer401 shown in Figure 4. Store the row Y1 in Figure 3 into Y1 in the ping buffer401 shown in Figure 4. Store the UV line after the Y1 line in Figure 3 into the UV in the ping buffer401 shown in Figure 4. Thus, the ping buffer401 is stored. Then store the pong buffer 402 as shown in Figure 4. At this time, it can be stored from the Y2 row in Figure 3, and so on, and will not be repeated. The ping-pong buffer is stored.
由于使用了两个对称存储结构的buffer缓存区域,所以可以在其中一个buffer缓存区域存储完成后,就可以开始后续的数据处理步骤,如DWT算法。在针对当前buffer缓存区域中的数据的处理完成后,由于另一个buffer缓存 区域也完成了存储,则可以直接再对该另一个buffer缓存区域计算,无需等待数据,由此相对提高了计算速度。Since two buffer cache areas of a symmetric storage structure are used, subsequent data processing steps, such as the DWT algorithm, can be started after the storage in one of the buffer cache areas is completed. After the processing of the data in the current buffer cache area is completed, since another buffer cache area has also completed storage, the calculation can be performed directly on the other buffer cache area without waiting for data, thereby relatively improving the calculation speed.
具体的,该方法100还包括:在缓存完第一组YUV分量数据后,执行根据预置数据格式,从数据中获取预置数量的第一输入数据的步骤,以得到处理结果,继续缓存对应组的YUV分量数据至第一缓存区域,直至缓存完YUV分量数据;在缓存完第二组YUV分量数据后,执行根据预置数据格式,从数据中获取预置数量的第一输入数据的步骤,以使得到处理结果,则继续缓存对应组的YUV分量数据至第二缓存区域,直至缓存完YUV分量数据。Specifically, the method 100 further includes: after buffering the first group of YUV component data, performing a step of obtaining a preset number of first input data from the data according to a preset data format to obtain a processing result, and continuing to cache the corresponding data The YUV component data of the group is sent to the first buffer area, until the YUV component data is buffered; after the second group of YUV component data is buffered, the step of obtaining a preset number of first input data from the data is performed according to the preset data format. , so as to obtain the processing result, continue to buffer the YUV component data of the corresponding group in the second buffer area until the YUV component data is buffered.
根据前文所述可知,例如,在存储完如图4所示中的ping buffer401后,编码器中的DWT子集模块可以开始数据处理,即数据计算,并得到对应的计算结果。然后计算如图4所示中的pong buffer402中的数据,得到对应的计算结果。同时,对ping buffer401继续存储。再处理完成pong buffer402中的数据后,再对新的ping buffer401中的数据进行计算。以此类推,直至完成该图像数据的处理。It can be known from the foregoing that, for example, after storing the ping buffer 401 shown in FIG. 4 , the DWT subset module in the encoder can start data processing, that is, data calculation, and obtain the corresponding calculation result. Then calculate the data in the pong buffer 402 as shown in Figure 4, and obtain the corresponding calculation result. At the same time, continue to store the ping buffer401. After processing the data in pong buffer402, calculate the data in the new ping buffer401. And so on until the processing of the image data is completed.
此外,根据前文可知,原始图像数据是针对一种预置位深类型的数据,如8bit的图像数据。为了能够兼容更多不同的数据,如8bit图像数据或10bit图像数据等,可以先对原始图像数据进行预处理(如下文所述的实施方式),从而满足不同类型的图像数据。由此,可以使得缓存空间可以缓存至少两种不同位深的待处理图像的数据。In addition, it can be known from the foregoing that the original image data is data of a preset bit depth type, such as 8-bit image data. In order to be compatible with more different data, such as 8-bit image data or 10-bit image data, etc., the original image data may be preprocessed (as described in the following embodiments) to satisfy different types of image data. In this way, the buffer space can buffer data of images to be processed with at least two different bit depths.
具体的,该方法100还包括:基于至少两种不同位深中最大位深的待处理图像的数据,针对任一缓存区域中对应的原始预置缓存空间进行扩展,生成对应的缓存空间。Specifically, the method 100 further includes: based on the data of the image to be processed with the largest bit depth among at least two different bit depths, expanding the corresponding original preset cache space in any cache area to generate a corresponding cache space.
其中,原始预置缓存空间缓存至少两种不同位深中最小位深的待处理图像的数据。Wherein, the original preset buffer space buffers the data of the image to be processed with the smallest bit depth among at least two different bit depths.
例如,根据前文所述,对于8bit或10bit中的10bit的图像数据而言,在内部ram的边界就存在拼接的情况。如,10bitY0或Y1的数据量分别为64*1*10bit=640bit。考虑到后续进数的方便性,这里拟采用160bit的存储位宽,对于8bit图像数据而言,每次从AXI总线上接收128bit数据就进行预处理,扩展成160bit。For example, according to the foregoing, for 8-bit or 10-bit image data in 10-bit, there is splicing at the boundary of the internal ram. For example, the data volume of 10bitY0 or Y1 is 64*1*10bit=640bit respectively. Considering the convenience of subsequent data entry, a 160-bit storage bit width is proposed here. For 8-bit image data, each time 128-bit data is received from the AXI bus, it is preprocessed and expanded to 160-bit.
应理解,对于至少两种不同位深的待处理图像的数据,均可以通过上述方式进行存储位宽的扩展,从而容纳这些不同位深的待处理图像的数据。It should be understood that, for the data of the images to be processed with at least two different bit depths, the storage bit width can be expanded in the above manner, so as to accommodate the data of the images to be processed with different bit depths.
对于非最大位深的待处理图像的数据而言,可以通过数据扩充,来满足上述存储位宽的扩展。For the data of the image to be processed with a non-maximum bit depth, data expansion can be used to satisfy the above-mentioned expansion of the storage bit width.
具体的,该方法100还包括:对至少两种不同位深中非最大位深的待处理图像的数据进行数据扩充,得到最大位深的待处理图像的数据,以缓存至缓存空间。Specifically, the method 100 further includes: performing data expansion on the data of the to-be-processed image with a non-maximum bit depth among the at least two different bit depths, to obtain the data of the to-be-processed image with the maximum bit depth, so as to be cached in the buffer space.
例如,根据前文所述,对于上述8bit图像数据而言,对每个8bit低位补零,扩展成10bit进行存储,从而方便支持8bit或10bit的算法。以使后续存储至对应的buffer中。For example, according to the foregoing, for the above-mentioned 8-bit image data, the low-order bits of each 8-bit are filled with zeros and expanded into 10-bits for storage, thereby facilitating the support of 8-bit or 10-bit algorithms. So that the subsequent storage to the corresponding buffer.
对于最大位深的待处理图像的数据而言,则可以根据扩展后的存储位宽进行存储。For the data of the image to be processed with the maximum bit depth, it can be stored according to the expanded storage bit width.
具体的,该方法100还包括:对最大位深的待处理图像的数据,获取到与缓存空间对应的数据。Specifically, the method 100 further includes: obtaining data corresponding to the buffer space for the data of the image to be processed with the maximum bit depth.
例如,根据前文所述,对于10bit图像数据而言,第一次接收到其中的128bit的数据暂时不存,后续接收到128bit凑成160bit再存储(其中,深度为4)。以此类推。同时,对于UV来说,UV从AXI总线过来时是交织摆放,为了后续处理方便,可以对UV进行拆分,变成UUUUU…VVVV的顺序。U或V的位宽采用160bit,深度为2。UV总深度还为4。For example, according to the foregoing, for 10-bit image data, the 128-bit data received for the first time is temporarily not stored, and the subsequent received 128-bit data is made up into 160-bit and then stored (where the depth is 4). And so on. At the same time, for UV, the UV is interleaved when it comes from the AXI bus. For the convenience of subsequent processing, the UV can be split into the order of UUUUU...VVVV. The bit width of U or V is 160bit, and the depth is 2. The total UV depth is also 4.
而对于8bit图像数据而言中的UV而言,同样低位补零扩展成10bit,同样采用上述拼接方式,再分别放到UV的对应存储中,就不再赘述。仅说明:如图5所示,图5示出了8bit的数据和10bit的数据在预处理后,对应的160bit的数据存储。其中,每行502由16个10bit比特501组成,则是16*10=160bit比特。For the UV in the 8bit image data, the same low-bit zero-filling is extended to 10bit, and the above-mentioned splicing method is also used, and then placed in the corresponding storage of the UV, and will not be repeated. Only description: As shown in Figure 5, Figure 5 shows the corresponding 160-bit data storage after preprocessing of 8-bit data and 10-bit data. Wherein, each row 502 is composed of 16 10-bit bits 501, which is 16*10=160-bit bits.
此外,如图3所示的Y0行的数据在做完上述预处理后存放到内部的如图4所示ping-pong buffer中对应Y0;Y1行的数据在做完上述预处理后存放到内部的ping-pong buffer中对应Y1中;UV的数据在做完上述预处理后存放到内部的ping-pong buffer中对应UV中。根据前文可知,对于Y0、Y1或UV,都是对应的160*4的存储结构。In addition, the data of the Y0 row shown in Figure 3 is stored in the internal ping-pong buffer shown in Figure 4 after the above preprocessing is completed, and the corresponding Y0; the data of the Y1 row is stored in the internal after the above preprocessing is completed. The ping-pong buffer corresponds to Y1; the UV data is stored in the corresponding UV in the internal ping-pong buffer after the above preprocessing. As can be seen from the foregoing, for Y0, Y1 or UV, they are all corresponding 160*4 storage structures.
102:根据预置数据格式,从数据中获取预置数量的第一输入数据。102: Acquire a preset amount of first input data from the data according to the preset data format.
其中,预置数量少于符合预置变换算法输入数据的个数。Wherein, the preset number is less than the number of input data conforming to the preset transformation algorithm.
具体的,根据预置数据格式,从数据中获取预置数量的第一输入数据,包括:针对任一缓存区域,基于YUV的分量顺序,从任一缓存区域中依次获取至少两个相同对应分量数据作为第一输入数据,以使得到多个对应的处理结 果。Specifically, acquiring a preset number of first input data from the data according to the preset data format includes: for any cache area, based on the component order of YUV, sequentially acquiring at least two identical corresponding components from any cache area The data is used as the first input data, so that a plurality of corresponding processing results are obtained.
例如,根据前文所述,当ping-pong buffer中的ping或pong buffer存满的时候,后续DWT子集模块从对应buffer中获取数据开始计算。Data in(数据输入)的输入为160bit,一次读出20bit位宽的数据,即2个数据,每个数据是10bit,作为第一输入数据。如对于Y0而言,则可以一次读出对应的两个数据,20bit。For example, according to the foregoing, when the ping or pong buffer in the ping-pong buffer is full, the subsequent DWT subset module obtains data from the corresponding buffer and starts calculation. The input of Data in (data input) is 160bit, and the data of 20bit bit width is read out at a time, that is, 2 data, each data is 10bit, as the first input data. For example, for Y0, the corresponding two data can be read out at a time, 20bit.
其中,根据上述方式,可以得到如图6所示,对于Y0601的数据依次以两个数据读出,可以是地址0中的idx1和idx0两个数据,一共64个数据,供64*10=640bit,与前文所述数据对应,每次data in160bit。Y1602也是相似的。而UV603而言,则是32个U和32个V,相同的也是以两个数据为输入,就不再赘述。Among them, according to the above method, it can be obtained as shown in Figure 6, the data of Y0601 is read out as two data in turn, which can be two data of idx1 and idx0 in address 0, a total of 64 data, for 64*10=640bit , corresponding to the data mentioned above, each data in160bit. The Y1602 is also similar. For UV603, it is 32 U and 32 V, and the same is also input with two data, so I won't go into details.
103:基于获取到的第一输入数据,按照从后到前的顺序直接复用上一组符合预置变换算法输入数据中预置数量的第二输入数据,并与第一输入数据作为待处理输入数据。103: Based on the obtained first input data, directly multiplex the last set of second input data that conforms to the preset number in the input data of the preset transformation algorithm in the order from back to front, and use the first input data as pending processing Input data.
例如,根据前文所述,编码器中的DWT子集模块在读取1组数据(即两个数据,20bit),需要复用上一组的一个数据,即第二输入数据(除开头部分外,即第一组的数据外),一共三个数据,作为待处理输入数据,每三个数据进行一次运算。这样对应20bit数据的输出。For example, according to the foregoing, when the DWT subset module in the encoder is reading 1 set of data (that is, two data, 20 bits), it needs to multiplex one data of the previous set, that is, the second input data (except for the beginning part). , that is, outside the first group of data), a total of three data, as input data to be processed, an operation is performed for every three data. This corresponds to the output of 20bit data.
如图6所示,对于Y0中的第一输入数据idx3和dix2,需要复用上一组数据中的dix1,使得最终的待处理输入数据为idx3、dix2和idx1。As shown in FIG. 6 , for the first input data idx3 and dix2 in Y0, it is necessary to multiplex dix1 in the previous set of data, so that the final input data to be processed are idx3, dix2 and idx1.
而对于开头部分中第一组数据而言可以通过以下方式进行处理:And for the first set of data in the beginning, it can be processed in the following ways:
具体的,该方法100还包括:当第一输入数据属于第一组待处理输入数据的情况下,基于获取到得的第一输入数据进行镜像数据补充,得到补充数据;将第一输入数据以及补充数据作为第一组待处理输入数据。Specifically, the method 100 further includes: when the first input data belongs to the first group of input data to be processed, performing mirror data supplementation based on the obtained first input data to obtain supplementary data; combining the first input data and the Supplementary data as the first set of input data to be processed.
例如,根据前文所述,对于开头部分中第一组数据,即第一输入数据,如idx1和dix0,需要做mirror(自动镜像数据补充),得到补充数据idx-1,并得到第一组待处理输入数据idx1、dix0和idx-1。For example, according to the above, for the first set of data in the beginning, that is, the first input data, such as idx1 and dix0, mirror (automatic mirror data supplementation) needs to be done to obtain supplementary data idx-1, and the first set of pending data is obtained. Process the input data idx1, dix0 and idx-1.
而对于结尾部分中最后一组数据而言可以通过以下方式进行处理:And for the last set of data in the end part, it can be processed in the following ways:
具体的,该方法100还包括:当从数据中获取到最后一组的第一输入数据并基于得到对应的待处理输入数据以及预置变换算法进行计算后,按照从后到前的顺序直接复用对应的待处理输入数据中的预置数量的第二输入数据; 基于预置数量的第二输入数据进行镜像数据补充,得到补充数据;将预置数量的第二输入数据以及补充数据作为最后一组的待处理输入数据。Specifically, the method 100 further includes: after obtaining the last group of first input data from the data and performing calculations based on the obtained corresponding input data to be processed and a preset transformation algorithm, directly complex Use the preset number of second input data in the corresponding input data to be processed; perform mirror data supplementation based on the preset number of second input data to obtain supplementary data; use the preset number of second input data and supplementary data as the final A set of pending input data.
根据前文所述的相似方式进行获取。例如,根据前文所述的方式,对最后一组的第一输入数据idx63和idx62进行直接复用上一组输入数据中的idx61,得到对应的待处理输入数据idx63、idx62和idx61。并经过DWT算法计算后得到对应的计算结果。然后按照从后往前(即由左向右的方式)的方式直接复用待处理输入数据idx63、idx62和idx61,得到第二输入数据idx63。然后进行镜像补充得到补充数据idx61、idx62,并得到最后一组的待处理输入数据idx61、idx62、idx63。Obtained in a similar manner as described above. For example, according to the method described above, idx61 in the previous group of input data is directly multiplexed on the last group of first input data idx63 and idx62, to obtain corresponding input data idx63, idx62 and idx61 to be processed. And the corresponding calculation results are obtained after the DWT algorithm calculation. Then, the input data idx63, idx62, and idx61 to be processed are directly multiplexed in a back-to-front manner (ie, from left to right) to obtain second input data idx63. Then perform mirror supplementation to obtain supplementary data idx61, idx62, and obtain the last group of pending input data idx61, idx62, and idx63.
104:根据待处理输入数据以及预置变换算法进行计算,得到表示待处理图像的数据频率的处理结果。104 : Perform calculation according to the input data to be processed and a preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
其中,预置变换算法包括离散小波变换算法DWT。Wherein, the preset transform algorithm includes discrete wavelet transform algorithm DWT.
其中,Y需要进行2D-DWT,即二维DWT,UV仅需进行一维DWT。根据这个方式,对上述待处理输入数据进行计算,得到对应计算结果。如图7所示,其中,图7示出的是一个以Y分量为例子的完整的2D-DWT的计算方式,包括变换部分701-703。对于第一变换部分701是一维变换的部分。第二变换部分702是针对2维,哈尔harr变换部分。第三变换部分703中的第四变换部分704是针对YO中L1的一维变换部分。第五变换部分705是针对YO中L2的一维变换部分。第六变换部分706是针对YO中L3的一维变换部分。Among them, Y needs to perform 2D-DWT, that is, two-dimensional DWT, and UV only needs to perform one-dimensional DWT. According to this method, the above input data to be processed is calculated to obtain a corresponding calculation result. As shown in FIG. 7 , FIG. 7 shows a complete calculation method of 2D-DWT taking the Y component as an example, including transformation parts 701 - 703 . The first transformation part 701 is a one-dimensional transformation part. The second transform part 702 is a 2-dimensional, Haar harr transform part. The fourth transform portion 704 in the third transform portion 703 is a one-dimensional transform portion for L1 in YO. The fifth transform portion 705 is a one-dimensional transform portion for L2 in YO. The sixth transform portion 706 is a one-dimensional transform portion for L3 in YO.
而对于UV的一维DWT是与上述相似的变换。可以包括701、704和705中的Y0部分的变换方式,且不涉及到701、704和705中对应的Y1部分的变换方式,由此作为UV的一维DWT计算方式。And the 1D DWT for UV is a similar transformation as above. The transformation mode of the Y0 part in 701 , 704 and 705 may be included, and the transformation mode of the corresponding Y1 part in 701 , 704 and 705 is not involved, so it is used as the one-dimensional DWT calculation mode of UV.
具体的,根据待处理输入数据以及预置变换算法进行计算,包括:在进行预置变换算法中一维变换算法的情况下,基于待处理输入数据,以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数;基于当前一维变换高频系数、直接复用前一组表示高频数据的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数,前一组的一维变换高频系数由前一组符合预置变换算法输入数据以及一维变换算法中高频算法得到,前一组的一维变换高频系数未进行缓存。Specifically, the calculation is performed according to the input data to be processed and the preset transformation algorithm, including: in the case of performing the one-dimensional transformation algorithm in the preset transformation algorithm, based on the input data to be processed and the high-frequency algorithm in the one-dimensional transformation algorithm, Obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data; based on the current one-dimensional transform high-frequency coefficients, directly multiplex the previous set of one-dimensional transform high-frequency coefficients representing high-frequency data and the low-frequency algorithm in the one-dimensional transform algorithm, The current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained. The one-dimensional transform high-frequency coefficients of the previous group are obtained from the previous group of input data conforming to the preset transform algorithm and the high-frequency algorithm in the one-dimensional transform algorithm. The one-dimensional transform of the previous group is obtained. High frequency coefficients are not cached.
其中,一维变换算法为一维DWT。Among them, the one-dimensional transformation algorithm is one-dimensional DWT.
例如,根据前文所述,如图8所示,以U为例,计算当前一维变换高频系 数H1的过程:For example, according to the foregoing, as shown in Figure 8, taking U as an example, the process of calculating the current one-dimensional transform high-frequency coefficient H1:
对应的数据idx0,idx1进来,同时镜像补充idx-1=idx1,三个数采用idx1、idx0和idx-1。高频算法如下:The corresponding data idx0 and idx1 come in, and the mirror is supplemented with idx-1=idx1, and the three numbers are idx1, idx0 and idx-1. The high frequency algorithm is as follows:
Figure PCTCN2021084888-appb-000001
Figure PCTCN2021084888-appb-000001
其中,Y0,Y1的N=64,UV的N=32,
Figure PCTCN2021084888-appb-000002
Round为四舍五入函数。则式1)变换为下式2):
Among them, N=64 of Y0, Y1, N=32 of UV,
Figure PCTCN2021084888-appb-000002
Round is the rounding function. The formula 1) is transformed into the following formula 2):
Figure PCTCN2021084888-appb-000003
Figure PCTCN2021084888-appb-000003
在上式2)中,n为15,由此得到H1的Y(idx31),即图8所示的H1中的idx31,需要x0,x1,x-1这三个数,即idx0、idx1和idx-1。In the above formula 2), n is 15, so the Y (idx31) of H1 is obtained, that is, the idx31 in H1 shown in Figure 8 requires three numbers of x0, x1, x-1, namely idx0, idx1 and idx-1.
对应的数据idx2,idx3进来,同时采用上一次的数据idx1,三个数采用公式1)此时公式1)中n为14,得到H1的Y(idx30),即图8所示的H1中的idx30。The corresponding data idx2 and idx3 come in, and the last data idx1 is used at the same time, and the three numbers use formula 1) At this time, n in formula 1) is 14, and the Y (idx30) of H1 is obtained, which is shown in Figure 8. H1 in idx30.
在求得H1的idx31,idx30后,再根据idx1,同时就可以计算当前一维变换低频系数L1中的L15。即低频算法如下式3)所示:After the idx31 and idx30 of H1 are obtained, and then according to idx1, L15 in the current one-dimensional transform low-frequency coefficient L1 can be calculated at the same time. That is, the low-frequency algorithm is shown in the following formula 3):
Figure PCTCN2021084888-appb-000004
Figure PCTCN2021084888-appb-000004
则式3)变化为式4),其中,n为15:Then Equation 3) changes to Equation 4), where n is 15:
Figure PCTCN2021084888-appb-000005
Figure PCTCN2021084888-appb-000005
从而得到Y(idxL15),即图8中所示的L1中的L15。采用这种方式,整个计算过程完全流水进行,前一级的结果给到下一级参与计算,无需中间的额外缓存与取数。Thus, Y(idxL15) is obtained, which is L15 in L1 shown in FIG. 8 . In this way, the entire calculation process is completely pipelined, and the results of the previous level are given to the next level to participate in the calculation, without additional buffering and fetching in the middle.
具体的,根据待处理输入数据以及预置变换算法进行计算,包括:在进 行预置变换算法中二维变换算法的情况下,直接复用对应的一维变换高频系数以及二维变换算法,得到表示高频数据的当前二维变换高频系数;直接复用对应的一维变换低频系数以及二维变换算法,得到表示低频数据的当前二维变换低频系数,对应的一维变换高频系数未进行缓存,对应的一维变换低频系数未进行缓存。Specifically, the calculation is performed according to the input data to be processed and the preset transformation algorithm, including: in the case of performing the two-dimensional transformation algorithm in the preset transformation algorithm, directly multiplexing the corresponding one-dimensional transformation high-frequency coefficients and the two-dimensional transformation algorithm, Obtain the current two-dimensional transform high-frequency coefficients representing high-frequency data; directly multiplex the corresponding one-dimensional transform low-frequency coefficients and two-dimensional transform algorithms to obtain the current two-dimensional transform low-frequency coefficients representing low-frequency data, and the corresponding one-dimensional transform high-frequency coefficients No buffering is performed, and the corresponding one-dimensional transform low-frequency coefficients are not buffered.
其中,二维变换算法是指二维DWT中的哈尔变换。Among them, the two-dimensional transformation algorithm refers to the Haar transform in the two-dimensional DWT.
例如,根据前文所述,对于Y0分量而言,如图9所示,通过下式5)哈尔变换算法计算Harr H和Harr L:For example, according to the foregoing, for the Y0 component, as shown in Figure 9, Harr H and Harr L are calculated by the following formula 5) Haar transform algorithm:
Figure PCTCN2021084888-appb-000006
Figure PCTCN2021084888-appb-000006
其中,该式5)输入是来自前一级计算出来的Y0的H1,Y1的H1,Y0的L1,Y1的L1,其中Y0分量的来自前一级计算出来的H1可以参考图9。等价于Y1_H1-Y0_H1=Y1_Harr_H;Y1_L1-Y0_L1=Y1_Harr_L1,其中Y0分量的来自前一级计算出来的L1可以参考图9。结果是得到Y1的Harr二维变换高频系数和低频系数。Among them, the input of formula 5) is H1 of Y0 calculated by the previous stage, H1 of Y1, L1 of Y0, L1 of Y1, and H1 calculated from the previous stage of the Y0 component can refer to Figure 9. It is equivalent to Y1_H1-Y0_H1=Y1_Harr_H; Y1_L1-Y0_L1=Y1_Harr_L1, wherein the L1 calculated from the previous stage of the Y0 component can refer to FIG. 9 . As a result, the Harr two-dimensional transform high-frequency coefficients and low-frequency coefficients of Y1 are obtained.
对于Y1分量而言,通过下式6)哈尔变换算法计算Harr H和Harr L:For the Y1 component, Harr H and Harr L are calculated by the following formula 6) Haar transform algorithm:
Figure PCTCN2021084888-appb-000007
Figure PCTCN2021084888-appb-000007
其中,该式6)是来自前一级计算出来的Y0的H1,Y1的H1,Y0的L1,Y1的L1。等价于Y0_H1+(Y1_H1-Y0_H1)/2=Y0_Harr_H,Y0_L1+(Y1_L1-Y0_L1)/2=Y0_Harr_L,结果是得到Y0的Harr二维变换高频系数和低频系数。Wherein, the formula 6) is H1 of Y0, H1 of Y1, L1 of Y0, and L1 of Y1 calculated from the previous stage. Equivalent to Y0_H1+(Y1_H1-Y0_H1)/2=Y0_Harr_H, Y0_L1+(Y1_L1-Y0_L1)/2=Y0_Harr_L, the result is to obtain the Harr two-dimensional transform high-frequency coefficient and low-frequency coefficient of Y0.
此外,该方法100还包括:基于当前二维变换低频系数、直接复用前两组表示低频数据的二维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且当前二维变换低频系数以及前两组的二维变换低频系数作为一维变换算法中的高频算法的输入,二维变换低频系数未进行缓存;基于二维变换算法后得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。In addition, the method 100 further includes: based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and a high-frequency algorithm in the one-dimensional transform algorithm, obtaining a current one representing high-frequency data. The high-frequency coefficients of the two-dimensional transformation are used as the input of the high-frequency algorithm in the one-dimensional transformation algorithm, and the low-frequency coefficients of the two-dimensional transformation are not cached; based on the two-dimensional transformation algorithm The current one-dimensional transform high-frequency coefficients obtained afterward, the one-dimensional transform high-frequency coefficients of the previous group and the low-frequency algorithm in the one-dimensional transform algorithm are directly multiplexed to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data.
此处用于计算如图9所示中哈尔变换后的数值计算,如H2等。通过上述式1)来计算。具体的过程,可以参照前文所述,就不再过多赘述。仅说明:It is used here to calculate the numerical calculation after Haar transformation as shown in Figure 9, such as H2 and so on. It is calculated by the above formula 1). For the specific process, reference may be made to the foregoing description, which will not be repeated here. Just to explain:
在后续继续计算的时候,由于继续级数的划分N会为32、16等以此类推, 那么n也会随之变换。In the subsequent continuous calculation, since the division of the continuous series N will be 32, 16, etc., and so on, then n will also change accordingly.
如,图9中所示的:H2(16+0=16)=X(31-1=30)-Round((X(31)+X(29))/2)这里用到的是HarrL数据,如L29-31。For example, as shown in Figure 9: H2(16+0=16)=X(31-1=30)-Round((X(31)+X(29))/2) HarrL data is used here , such as L29-31.
在一维变换算法后,该方法100还包括:基于得到的当前一维变换低频系数、直接复用前两组表示低频数据的一维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且当前二维变换低频系数以及前两组的二维变换低频系数可作为一维变换算法中的高频算法的输入,一维变换低频系数未进行缓存;基于得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。After the one-dimensional transform algorithm, the method 100 further includes: based on the obtained current one-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, obtaining Indicates the current one-dimensional transform high-frequency coefficients of high-frequency data, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm. The one-dimensional transform low-frequency coefficients are not Cache; based on the obtained current one-dimensional transform high-frequency coefficients, the one-dimensional transform high-frequency coefficients of the previous group that are directly multiplexed, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained.
此处用于计算如图9所示中H2后的数值计算,如H3等。通过上述式1)来计算。具体的过程,可以参照前文所述,就不再过多赘述。仅说明:It is used here to calculate the numerical calculation after H2 as shown in Figure 9, such as H3 and so on. It is calculated by the above formula 1). For the specific process, reference may be made to the foregoing description, which will not be repeated here. Just to explain:
在后续继续计算的时候,由于继续级数的划分N会为32、16等以此类推,那么n也会随之变换。In the subsequent continuous calculation, since the division of the continuous series N will be 32, 16, etc., and so on, then n will also change accordingly.
在处理结果完成后,可以继续后续的编码过程。After processing the result, the subsequent encoding process can be continued.
具体的,该方法100还包括:基于处理结果,对待处理图像进行编码。Specifically, the method 100 further includes: encoding the image to be processed based on the processing result.
在对上述图像的数据进行DWT计算后,可以得到对应的结果,输出到的结果为dwt-coeff,dwt-coeff再展开形成bitplane位平面,用以完成后续的图像编码。After the DWT calculation is performed on the data of the above image, the corresponding result can be obtained. The output result is dwt-coeff, and the dwt-coeff is expanded to form a bitplane bit plane to complete subsequent image encoding.
其中,将DWT结果通过内部bus线写到存储;对于Y1来说,每次最多有2个输出,对应Harr H和Harr L;对于Y0来说每次最多有3个输出,对应Harr H和H2,H3或者Harr H和H2,H4H或L4。UV同理,每次最多会有三个有效结果输出。因此可以用总线的形式写到内部寄存器堆里。Y0:地址线6bit,数据位宽为单个输出结果12bit*3。Y1:地址线6bit,数据位宽为单个输出结果12bit*2。UV:地址线5bit,数据位宽为单个输出结果12bit*3。整个过程无需额外缓存,数据pipline执行,提高效率。Among them, the DWT result is written to the storage through the internal bus line; for Y1, there are at most 2 outputs at a time, corresponding to Harr H and Harr L; for Y0, there are at most 3 outputs at a time, corresponding to Harr H and H2 , H3 or Harr H and H2, H4H or L4. Similarly for UV, there will be at most three valid results output each time. Therefore, it can be written to the internal register file in the form of a bus. Y0: The address line is 6bit, and the data bit width is 12bit*3 for a single output result. Y1: The address line is 6bit, and the data bit width is 12bit*2 for a single output result. UV: address line 5bit, data bit width is 12bit*3 for a single output result. The entire process does not require additional caching, and the data is pipline executed to improve efficiency.
此外,可以根据自身需要,将流水线一开始的进数从3个变为5个,效率提升一倍。若性能受限,则可采取如增加一些资源。In addition, according to your own needs, you can change the number of feeds at the beginning of the pipeline from 3 to 5, and the efficiency is doubled. If performance is limited, you can take measures such as adding some resources.
在编码完成后,可以将编码后的图像码流进行后续处理,如传输、存储以及解码等。After the encoding is completed, the encoded image stream can be subjected to subsequent processing, such as transmission, storage, and decoding.
具体的,该方法100还包括:将编码后的待处理图像存储至对应的存储区 域内,以待进行传输或解码。Specifically, the method 100 further includes: storing the encoded image to be processed in a corresponding storage area for transmission or decoding.
根据前文可知,如图2所示,FBC编码器202将编码后的码流,即图像码流可以发送至DDR内存203中进行存储,以等待解码,或者传输至其它设备均可。在解码的时候,可以通过FBC解码器204来对该DDR内存203中的编码码流进行解码。As can be seen from the foregoing, as shown in FIG. 2 , the FBC encoder 202 can send the encoded code stream, that is, the image code stream, to the DDR memory 203 for storage, waiting for decoding, or can be transmitted to other devices. During decoding, the encoded code stream in the DDR memory 203 can be decoded by the FBC decoder 204 .
图10为本发明实施例提供的一种数据处理装置的结构示意图;该装置1000可以应用于飞行设备中,例如,无人机,更具体的可以是FBC编码器,该装置1000可以执行上述的数据处理方法。其中,该装置1000包括:获取模块1001、复用模块1002以及处理模块10003。以下针对各个模块的功能进行详细的阐述:FIG. 10 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present invention; the apparatus 1000 can be applied to a flying device, such as an unmanned aerial vehicle, more specifically an FBC encoder, and the apparatus 1000 can execute the above-mentioned data processing method. The apparatus 1000 includes: an acquisition module 1001 , a multiplexing module 1002 and a processing module 10003 . The functions of each module are described in detail below:
获取模块1001,用于获取预置数据格式的待处理图像,根据预置存储格式存储待处理图像的数据。The obtaining module 1001 is configured to obtain the to-be-processed image in a preset data format, and store the data of the to-be-processed image according to the preset storage format.
获取模块1001,用于根据预置数据格式,从数据中获取预置数量的第一输入数据。The obtaining module 1001 is configured to obtain a preset amount of first input data from the data according to a preset data format.
其中,预置数量少于符合预置变换算法输入数据的个数。Wherein, the preset number is less than the number of input data conforming to the preset transformation algorithm.
复用模块1002,用于基于获取到的第一输入数据,按照从后到前的顺序直接复用上一组符合预置变换算法输入数据中预置数量的第二输入数据,并与第一输入数据作为待处理输入数据。The multiplexing module 1002 is configured to, based on the acquired first input data, directly multiplex the last set of second input data in accordance with the preset number of input data of the preset transformation algorithm in the order from back to front, and combine them with the first input data. Input data as pending input data.
处理模块1003,用于根据所述待处理输入数据以及预置变换算法进行计算,得到表示待处理图像的数据频率的处理结果。The processing module 1003 is configured to perform calculation according to the input data to be processed and a preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
此外,该装置1000还包括:编码模块,用于基于处理结果,对待处理图像进行编码。In addition, the apparatus 1000 further includes: an encoding module, configured to encode the image to be processed based on the processing result.
此外,处理模块1003,包括:第一确定单元,用于在进行预置变换算法中一维变换算法的情况下,基于待处理输入数据,以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数;第二确定单元,用于基于当前一维变换高频系数、直接复用前一组表示高频数据的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数,前一组的一维变换高频系数由前一组符合预置变换算法输入数据以及一维变换算法中高频算法得到,前一组的一维变换高频系数未进行缓存。In addition, the processing module 1003 includes: a first determining unit, configured to obtain a high-frequency representation based on the input data to be processed and a high-frequency algorithm in the one-dimensional The current one-dimensional transform high-frequency coefficients of the high-frequency data; the second determination unit is used for directly multiplexing the previous one-dimensional transform high-frequency coefficients representing the high-frequency data based on the current one-dimensional transform high-frequency coefficients and the one-dimensional transform algorithm. The low-frequency algorithm is used to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data. The one-dimensional transform high-frequency coefficients of the previous group are obtained from the input data of the previous group conforming to the preset transform algorithm and the high-frequency algorithm in the one-dimensional transform algorithm. The high-frequency coefficients of the 1D transform are not cached.
具体的,处理模块1003,包括:第三确定单元,用于在进行预置变换算法中二维变换算法的情况下,直接复用对应的一维变换高频系数以及二维变 换算法,得到表示高频数据的当前二维变换高频系数;第四确定单元,用于直接复用对应的一维变换低频系数以及二维变换算法,得到表示低频数据的当前二维变换低频系数,对应的一维变换高频系数未进行缓存,对应的一维变换低频系数未进行缓存。Specifically, the processing module 1003 includes: a third determining unit, configured to directly multiplex the corresponding one-dimensional transform high-frequency coefficients and the two-dimensional transform algorithm in the case of performing the two-dimensional transform algorithm in the preset transform algorithm to obtain the representation The current two-dimensional transform high-frequency coefficients of the high-frequency data; the fourth determining unit is used to directly multiplex the corresponding one-dimensional transform low-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform low-frequency coefficients representing the low-frequency data. The high-frequency coefficients of the one-dimensional transform are not cached, and the corresponding low-frequency coefficients of the one-dimensional transform are not cached.
此外,处理模块1003,还用于:基于当前二维变换低频系数、直接复用前两组表示低频数据的二维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且当前二维变换低频系数以及前两组的二维变换低频系数作为一维变换算法中的高频算法的输入,二维变换低频系数未进行缓存;基于二维变换算法后得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。In addition, the processing module 1003 is also used for: based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, to obtain the high-frequency data representing the high-frequency data. The current one-dimensional transform high-frequency coefficients, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups are used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the two-dimensional transform low-frequency coefficients are not cached; based on the two-dimensional transform The current one-dimensional transform high-frequency coefficients obtained after the transform algorithm, the one-dimensional transform high-frequency coefficients of the previous group and the low-frequency algorithm in the one-dimensional transform algorithm are directly multiplexed to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data.
此外,在一维变换算法后,处理模块1003,还用于:基于得到的当前一维变换低频系数、直接复用前两组表示低频数据的一维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且当前二维变换低频系数以及前两组的二维变换低频系数可作为一维变换算法中的高频算法的输入,一维变换低频系数未进行缓存;基于得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。In addition, after the one-dimensional transform algorithm, the processing module 1003 is further configured to: based on the obtained current one-dimensional transform low-frequency coefficients, directly multiplex the first two sets of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency coefficients in the one-dimensional transform algorithm. frequency algorithm to obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm. The transformed low-frequency coefficients are not cached; based on the obtained current one-dimensional transform high-frequency coefficients, the one-dimensional transform high-frequency coefficients of the previous group that are directly multiplexed, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform representing the low-frequency data is obtained. low frequency coefficients.
其中,预置变换算法包括离散小波变换算法。Wherein, the preset transform algorithm includes discrete wavelet transform algorithm.
此外,处理模块1003,还用于:当第一输入数据属于第一组待处理输入数据的情况下,基于获取到得的第一输入数据进行镜像数据补充,得到补充数据;将第一输入数据以及所述补充数据作为第一组待处理输入数据。In addition, the processing module 1003 is further configured to: when the first input data belongs to the first group of input data to be processed, perform mirror data supplementation based on the obtained first input data to obtain supplementary data; and the supplementary data as the first set of input data to be processed.
此外,复用模块1002,还用于:当从数据中获取到最后一组的第一输入数据并基于得到对应的待处理输入数据以及预置变换算法进行计算后,按照从后到前的顺序直接复用对应的待处理输入数据中的预置数量的第二输入数据;该装置1000还包括确定模块,用于基于预置数量的第二输入数据进行镜像数据补充,得到补充数据;将预置数量的第二输入数据以及补充数据作为最后一组的待处理输入数据。In addition, the multiplexing module 1002 is also used for: after obtaining the last group of first input data from the data and calculating based on the corresponding input data to be processed and the preset transformation algorithm, follow the sequence from back to front. Directly multiplexing a preset number of second input data in the corresponding input data to be processed; the device 1000 further includes a determination module for performing mirror data supplementation based on the preset number of second input data to obtain supplementary data; The set number of second input data and supplementary data are used as the final set of pending input data.
具体的,获取模块1001,包括:获取单元,用于获取YUV预置数据格式的图像,作为待处理图像;缓存单元,用于根据YUV的分量顺序,将第一组YUV分量数据依次缓存至第一缓存区域中对应的缓存空间;缓存单元,用于在缓 存完第一组YUV分量数据后,将第二组YUV分量数据依次缓存至第二缓存区域中对应的缓存空间。在缓存完第一组YUV分量数据后,获取模块1001执行根据预置数据格式,从数据中获取预置数量的第一输入数据的步骤,以得到处理结果,缓存单元,用于继续缓存对应组的YUV分量数据至第一缓存区域,直至缓存完YUV分量数据;在缓存完第二组YUV分量数据后,获取模块1001执行根据预置数据格式,从数据中获取预置数量的第一输入数据的步骤,以使得到处理结果,则缓存单元,用于继续缓存对应组的YUV分量数据至第二缓存区域,直至缓存完YUV分量数据。Specifically, the acquisition module 1001 includes: an acquisition unit for acquiring an image in a YUV preset data format as an image to be processed; a cache unit for sequentially caching the first group of YUV component data to the first group of YUV component data according to the YUV component order A buffer space corresponding to the buffer area; the buffer unit is used for sequentially buffering the YUV component data of the second group to the corresponding buffer space in the second buffer area after buffering the YUV component data of the first group. After the first group of YUV component data is cached, the acquiring module 1001 performs the step of acquiring a preset number of first input data from the data according to the preset data format to obtain the processing result, and the cache unit is used to continue to cache the corresponding group The YUV component data is stored in the first buffer area, until the YUV component data is buffered; after the second group of YUV component data is buffered, the acquisition module 1001 executes according to the preset data format, from the data to obtain a preset number of first input data step, so that when the processing result is reached, the buffer unit is used to continue buffering the YUV component data of the corresponding group to the second buffer area until the YUV component data is buffered.
具体的,获取模块1001,用于:针对任一缓存区域,基于YUV的分量顺序,从任一缓存区域中依次获取至少两个相同对应分量数据作为第一输入数据,以使得到多个对应的处理结果。Specifically, the acquiring module 1001 is configured to: for any buffer area, based on the component order of YUV, sequentially acquire at least two identical corresponding component data from any buffer area as the first input data, so that a plurality of corresponding component data are obtained. process result.
其中,缓存空间缓存至少两种不同位深的待处理图像的数据。The buffer space buffers data of at least two images to be processed with different bit depths.
此外,该装置1000还包括:扩展模块,用于基于至少两种不同位深中最大位深的待处理图像的数据,针对任一缓存区域中对应的原始预置缓存空间进行扩展,生成对应的所述缓存空间,原始预置缓存空间缓存至少两种不同位深中最小位深的待处理图像的数据。In addition, the apparatus 1000 further includes: an expansion module, configured to expand the corresponding original preset cache space in any cache area based on the data of the image to be processed with the largest bit depth in at least two different bit depths, and generate a corresponding In the buffer space, the original preset buffer space buffers the data of the image to be processed with the smallest bit depth among at least two different bit depths.
此外,该装置1000还包括:扩充模块,用于对至少两种不同位深中非最大位深的待处理图像的数据进行数据扩充,得到最大位深的待处理图像的数据,以缓存至缓存空间。In addition, the device 1000 also includes: an expansion module for performing data expansion on the data of the to-be-processed image with a non-maximum bit-depth in at least two different bit depths, to obtain the data of the to-be-processed image with the maximum bit depth, and buffering the data into the buffer space.
此外,获取模块1001,还用于:对最大位深的待处理图像的数据,获取到与缓存空间对应的数据。In addition, the obtaining module 1001 is further configured to obtain data corresponding to the buffer space for the data of the image to be processed with the maximum bit depth.
此外,该装置1000还包括:存储模块,用于将编码后的待处理图像存储至对应的存储区域内,以待进行传输或解码。In addition, the apparatus 1000 further includes: a storage module for storing the encoded image to be processed in a corresponding storage area for transmission or decoding.
需要注意的是,本实施例未详细描述的部分,可参考上述图像的处理方法所示实施例的相关说明,在此不再赘述。It should be noted that, for parts that are not described in detail in this embodiment, reference may be made to the relevant descriptions of the embodiments shown in the image processing method above, and details are not described herein again.
在一个可能的设计中,图10所示数据处理装置1000的结构可实现为一电子设备,该电子设备可以是数据处理设备。如图11所示,该数据处理设备1100可以包括:一个或多个处理器1101、一个或多个存储器1102。其中,存储器1102用于存储支持电子设备执行上述图1-图9所示实施例中提供的数据处理方法的程序。处理器1101被配置为用于执行存储器1102中存储的程序。具体的,程序包括一条或多条计算机指令,其中,一条或多条计算机指令被处理 器1101执行时能够实现如下步骤:In a possible design, the structure of the data processing apparatus 1000 shown in FIG. 10 may be implemented as an electronic device, and the electronic device may be a data processing device. As shown in FIG. 11 , the data processing device 1100 may include: one or more processors 1101 and one or more memories 1102 . Wherein, the memory 1102 is used for storing a program that supports the electronic device to execute the data processing method provided in the embodiments shown in FIG. 1 to FIG. 9 . The processor 1101 is configured to execute programs stored in the memory 1102 . Specifically, the program includes one or more computer instructions, wherein the one or more computer instructions can realize the following steps when executed by the processor 1101:
运行存储器1102中存储的计算机程序以实现:获取预置数据格式的待处理图像,根据预置存储格式存储待处理图像的数据;根据预置数据格式,从数据中获取预置数量的第一输入数据,预置数量少于符合预置变换算法输入数据的个数;基于获取到的第一输入数据,按照从后到前的顺序直接复用上一组符合预置变换算法输入数据中预置数量的第二输入数据,并与第一输入数据作为待处理输入数据;根据待处理输入数据以及预置变换算法进行计算,得到表示待处理图像的数据频率的处理结果。The computer program stored in the memory 1102 is run to realize: obtaining the image to be processed in a preset data format, and storing the data of the image to be processed according to the preset storage format; obtaining a preset number of first inputs from the data according to the preset data format Data, the preset number is less than the number of input data conforming to the preset transformation algorithm; based on the obtained first input data, the presets in the previous set of input data conforming to the preset transformation algorithm are directly reused in the order from back to front The number of second input data is combined with the first input data as input data to be processed; calculation is performed according to the input data to be processed and a preset transformation algorithm, and a processing result representing the data frequency of the image to be processed is obtained.
此外,处理器1101,还用于:基于处理结果,对待处理图像进行编码。In addition, the processor 1101 is further configured to: encode the image to be processed based on the processing result.
具体的,处理器1101,具体用于:在进行预置变换算法中一维变换算法的情况下,基于待处理输入数据,以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数;基于当前一维变换高频系数、直接复用前一组表示高频数据的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数,前一组的一维变换高频系数由前一组符合预置变换算法输入数据以及一维变换算法中高频算法得到,前一组的一维变换高频系数未进行缓存。Specifically, the processor 1101 is specifically configured to: in the case of performing the one-dimensional transformation algorithm in the preset transformation algorithm, based on the input data to be processed and the high-frequency algorithm in the one-dimensional transformation algorithm, obtain the current value representing the high-frequency data. One-dimensional transform high-frequency coefficients; based on the current one-dimensional transform high-frequency coefficients, directly multiplexing the previous set of one-dimensional transform high-frequency coefficients representing high-frequency data, and the low-frequency algorithm in the one-dimensional transform algorithm, obtain the current one-dimensional transform representing low-frequency data. The low-frequency coefficients of the one-dimensional transformation are obtained from the input data of the previous group conforming to the preset transformation algorithm and the high-frequency algorithm in the one-dimensional transformation algorithm, and the high-frequency coefficients of the one-dimensional transformation of the previous group are not cached.
具体的,处理器1101,具体用于:在进行所述预置变换算法中二维变换算法的情况下,直接复用对应的一维变换高频系数以及二维变换算法,得到表示高频数据的当前二维变换高频系数;直接复用对应的一维变换低频系数以及所述二维变换算法,得到表示低频数据的当前二维变换低频系数,对应的一维变换高频系数未进行缓存,对应的一维变换低频系数未进行缓存。Specifically, the processor 1101 is specifically configured to: in the case of performing the two-dimensional transform algorithm in the preset transform algorithm, directly multiplex the corresponding one-dimensional transform high-frequency coefficients and the two-dimensional transform algorithm to obtain high-frequency data representing high-frequency data. The current two-dimensional transform high-frequency coefficients are directly multiplexed with the corresponding one-dimensional transform low-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform low-frequency coefficients representing low-frequency data, and the corresponding one-dimensional transform high-frequency coefficients are not cached , the corresponding one-dimensional transform low-frequency coefficients are not cached.
此外,处理器1101,还用于:基于当前二维变换低频系数、直接复用前两组表示低频数据的二维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且当前二维变换低频系数以及前两组的二维变换低频系数作为一维变换算法中的高频算法的输入,二维变换低频系数未进行缓存;基于二维变换算法后得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。In addition, the processor 1101 is further configured to: based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, to obtain the high-frequency data representing the high-frequency data. The current one-dimensional transform high-frequency coefficients, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups are used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the two-dimensional transform low-frequency coefficients are not cached; based on the two-dimensional transform The current one-dimensional transform high-frequency coefficients obtained after the transform algorithm, the one-dimensional transform high-frequency coefficients of the previous group and the low-frequency algorithm in the one-dimensional transform algorithm are directly multiplexed to obtain the current one-dimensional transform low-frequency coefficients representing the low-frequency data.
此外,在一维变换算法后,处理器1101,还用于:基于得到的当前一维变换低频系数、直接复用前两组表示低频数据的一维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且当 前二维变换低频系数以及前两组的二维变换低频系数可作为一维变换算法中的高频算法的输入,一维变换低频系数未进行缓存;基于得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。In addition, after the one-dimensional transform algorithm, the processor 1101 is further configured to: based on the obtained current one-dimensional transform low-frequency coefficients, directly multiplex the first two sets of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency coefficients in the one-dimensional transform algorithm. frequency algorithm to obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data, and the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm. The transformed low-frequency coefficients are not cached; based on the obtained current one-dimensional transform high-frequency coefficients, the one-dimensional transform high-frequency coefficients of the previous group that are directly multiplexed, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform representing the low-frequency data is obtained. low frequency coefficients.
其中,预置变换算法包括离散小波变换算法。Wherein, the preset transform algorithm includes discrete wavelet transform algorithm.
此外,处理器1101,还用于:当第一输入数据属于第一组待处理输入数据的情况下,基于获取到得的第一输入数据进行镜像数据补充,得到补充数据;将第一输入数据以及补充数据作为第一组待处理输入数据。In addition, the processor 1101 is further configured to: when the first input data belongs to the first group of input data to be processed, perform mirror data supplementation based on the acquired first input data to obtain supplementary data; and supplementary data as the first set of pending input data.
此外,处理器1101,还用于:当从数据中获取到最后一组的第一输入数据并基于得到对应的待处理输入数据以及预置变换算法进行计算后,按照从后到前的顺序直接复用对应的待处理输入数据中的预置数量的第二输入数据;基于预置数量的第二输入数据进行镜像数据补充,得到补充数据;将预置数量的第二输入数据以及补充数据作为最后一组的待处理输入数据。In addition, the processor 1101 is further configured to: when the last group of first input data is obtained from the data and the calculation is performed based on the obtained corresponding input data to be processed and the preset transformation algorithm, directly follow the sequence from back to front. Multiplexing the preset number of second input data in the corresponding input data to be processed; performing mirror data supplementation based on the preset number of second input data to obtain supplementary data; using the preset number of second input data and supplementary data as The last set of pending input data.
此外,处理器1101,具体用于:获取YUV预置数据格式的图像,作为待处理图像;根据YUV的分量顺序,将第一组YUV分量数据依次缓存至第一缓存区域中对应的缓存空间;在缓存完第一组YUV分量数据后,将第二组YUV分量数据依次缓存至第二缓存区域中对应的缓存空间;在缓存完第一组YUV分量数据后,执行根据预置数据格式,从数据中获取预置数量的第一输入数据的步骤,以使得到处理结果,则继续缓存对应组的YUV分量数据至第一缓存区域,直至缓存完YUV分量数据;在缓存完第二组YUV分量数据后,执行根据预置数据格式,从数据中获取预置数量的第一输入数据的步骤,以得到处理结果,继续缓存对应组的YUV分量数据至所述第二缓存区域,直至缓存完YUV分量数据。In addition, the processor 1101 is specifically used to: obtain an image in a YUV preset data format as an image to be processed; according to the component order of YUV, sequentially cache the first group of YUV component data in the corresponding cache space in the first cache area; After buffering the first group of YUV component data, buffer the second group of YUV component data in the corresponding buffer space in the second buffer area in turn; The step of obtaining a preset number of first input data in the data, so that to the processing result, continue to cache the YUV component data of the corresponding group to the first cache area until the YUV component data is cached; after the second group of YUV component data is cached After the data, perform the step of obtaining a preset number of first input data from the data according to the preset data format to obtain the processing result, and continue to cache the YUV component data of the corresponding group to the second cache area until the YUV is cached. component data.
具体的,处理器1101,具体用于:针对任一缓存区域,基于YUV的分量顺序,从任一缓存区域中依次获取至少两个相同对应分量数据作为第一输入数据,以使得到多个对应的处理结果。Specifically, the processor 1101 is specifically configured to: for any cache area, based on the component order of YUV, sequentially acquire at least two identical corresponding component data from any cache area as the first input data, so that multiple corresponding component data are obtained. processing result.
其中,缓存空间缓存至少两种不同位深的待处理图像的数据。The buffer space buffers data of at least two images to be processed with different bit depths.
此外,处理器1101,还用于:基于至少两种不同位深中最大位深的待处理图像的数据,针对任一缓存区域中对应的原始预置缓存空间进行扩展,生成对应的缓存空间,原始预置缓存空间缓存至少两种不同位深中最小位深的待处理图像的数据。In addition, the processor 1101 is further configured to: expand the corresponding original preset cache space in any cache area based on the data of the image to be processed with the largest bit depth among the at least two different bit depths, and generate the corresponding cache space, The original preset buffer space buffers the data of the image to be processed with the smallest bit depth among at least two different bit depths.
此外,处理器1101,还用于:对至少两种不同位深中非最大位深的待处 理图像的数据进行数据扩充,得到最大位深的待处理图像的数据,以缓存至所述缓存空间。In addition, the processor 1101 is further configured to: perform data expansion on the data of the to-be-processed image with a non-maximum bit-depth among at least two different bit-depths, to obtain the data of the to-be-processed image with the maximum bit depth, so as to be cached in the cache space .
此外,处理器1101,还用于:对最大位深的待处理图像的数据,获取到与缓存空间对应的数据。In addition, the processor 1101 is further configured to obtain data corresponding to the cache space for the data of the image to be processed with the maximum bit depth.
此外,处理器1101,还用于:编码后的待处理图像存储至对应的存储区域内,以待进行传输或解码。In addition, the processor 1101 is further configured to: store the encoded image to be processed in a corresponding storage area for transmission or decoding.
另外,本发明实施例提供了一种计算机可读存储介质,存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,程序指令用于实现上述图1-图9的方法。In addition, an embodiment of the present invention provides a computer-readable storage medium, where the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions are used to implement the above-mentioned methods in FIGS. 1 to 9 . .
本发明实施例提供的一种芯片,如SOC,包括:上述的设备。A chip, such as an SOC, provided by an embodiment of the present invention includes: the above-mentioned device.
本发明实施例提供的一种无人机;具体的,该无人机包括:机体以及图11所示的数据处理设备,数据处理设备设置在机体上。An embodiment of the present invention provides an unmanned aerial vehicle; specifically, the unmanned aerial vehicle includes: a body and a data processing device shown in FIG. 11 , and the data processing device is arranged on the body.
以上各个实施例中的技术方案、技术特征在与本相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本申请保护范围内的等同实施例。The technical solutions and technical features in the above embodiments can be used alone or combined in the case of conflict with the present invention, as long as they do not exceed the cognitive scope of those skilled in the art, they all belong to the equivalent embodiments within the protection scope of the present application .
在本发明所提供的几个实施例中,应该理解到,所揭露的相关检测装置(例如:IMU)和方法,可以通过其它的方式实现。例如,以上所描述的遥控装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,遥控装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed related detection apparatus (eg, IMU) and method may be implemented in other manners. For example, the embodiments of the remote control device described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components. May be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection of the remote control device or unit may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得计算机处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer processor (processor) to perform all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are only the embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied to other related technologies Fields are similarly included in the scope of patent protection of the present invention.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention. scope.

Claims (35)

  1. 一种数据处理方法,其特征在于,包括:A data processing method, comprising:
    获取预置数据格式的待处理图像,根据预置存储格式存储所述待处理图像的数据;Acquiring a to-be-processed image in a preset data format, and storing the data of the to-be-processed image according to a preset storage format;
    根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据,所述预置数量少于符合预置变换算法输入数据的个数;According to the preset data format, a preset number of first input data is obtained from the data, and the preset number is less than the number of input data conforming to the preset transformation algorithm;
    基于获取到的所述第一输入数据,按照从后到前的顺序直接复用上一组符合所述预置变换算法输入数据中预置数量的第二输入数据,并与所述第一输入数据作为待处理输入数据;Based on the acquired first input data, directly multiplex the last set of second input data that conforms to the preset number in the input data of the preset transformation algorithm in the order from back to front, and combine them with the first input data. data as input data to be processed;
    根据所述待处理输入数据以及所述预置变换算法进行计算,得到表示所述待处理图像的数据频率的处理结果。The calculation is performed according to the input data to be processed and the preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    基于所述处理结果,对所述待处理图像进行编码。Based on the processing result, the image to be processed is encoded.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述待处理输入数据以及所述预置变换算法进行计算,包括:The method according to claim 1, wherein the calculating according to the input data to be processed and the preset transformation algorithm comprises:
    在进行所述预置变换算法中一维变换算法的情况下,基于所述待处理输入数据,以及所述一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数;In the case of performing the one-dimensional transformation algorithm in the preset transformation algorithm, based on the input data to be processed and the high-frequency algorithm in the one-dimensional transformation algorithm, a current one-dimensional transformation high-frequency representation representing the high-frequency data is obtained. coefficient;
    基于所述当前一维变换高频系数、直接复用前一组表示高频数据的一维变换高频系数以及所述一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数,前一组的一维变换高频系数由前一组符合所述预置变换算法输入数据以及所述一维变换算法中高频算法得到,所述前一组的一维变换高频系数未进行缓存。Based on the current one-dimensional transform high-frequency coefficients, directly multiplexing the previous set of one-dimensional transform high-frequency coefficients representing high-frequency data, and the low-frequency algorithm in the one-dimensional transform algorithm, obtain the current one-dimensional transform low-frequency coefficient representing the low-frequency data. Coefficients, the one-dimensional transform high-frequency coefficients of the previous group are obtained by the previous group conforming to the input data of the preset transform algorithm and the high-frequency algorithm in the one-dimensional transform algorithm, and the one-dimensional transform high-frequency coefficients of the previous group are not. cache.
  4. 根据权利要求1或3所述的方法,其特征在于,所述根据所述待处理输入数据以及所述预置变换算法进行计算,包括:The method according to claim 1 or 3, wherein the calculating according to the input data to be processed and the preset transformation algorithm comprises:
    在进行所述预置变换算法中二维变换算法的情况下,直接复用对应的一维变换高频系数以及二维变换算法,得到表示高频数据的当前二维变换高频系数;In the case of performing the two-dimensional transform algorithm in the preset transform algorithm, directly multiplexing the corresponding one-dimensional transform high-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform high-frequency coefficients representing high-frequency data;
    直接复用对应的一维变换低频系数以及所述二维变换算法,得到表示低频数据的当前二维变换低频系数,所述对应的一维变换高频系数未进行缓存,对应的一维变换低频系数未进行缓存。Directly multiplex the corresponding one-dimensional transform low-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform low-frequency coefficients representing low-frequency data, the corresponding one-dimensional transform high-frequency coefficients are not cached, and the corresponding one-dimensional transform low-frequency coefficients Coefficients are not cached.
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    基于所述当前二维变换低频系数、直接复用前两组表示低频数据的二维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且所述当前二维变换低频系数以及前两组的二维变换低频系数作为所述一维变换算法中的高频算法的输入,二维变换低频系数未进行缓存;Based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and a high-frequency algorithm in the one-dimensional transform algorithm, obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data, And the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups are used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the two-dimensional transform low-frequency coefficients are not cached;
    基于二维变换算法后得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。Based on the current one-dimensional transform high-frequency coefficients obtained after the two-dimensional transform algorithm, directly multiplexing the one-dimensional transform high-frequency coefficients of the previous group, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained. .
  6. 根据权利要求3所述的方法,其特征在于,在一维变换算法后,所述方法还包括:The method according to claim 3, wherein after the one-dimensional transformation algorithm, the method further comprises:
    基于得到的当前一维变换低频系数、直接复用前两组表示低频数据的一维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且所述当前二维变换低频系数以及前两组的二维变换低频系数可作为所述一维变换算法中的高频算法的输入,一维变换低频系数未进行缓存;Based on the obtained current one-dimensional transform low-frequency coefficients, the first two groups of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform high-frequency coefficients representing high-frequency data are obtained, And the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the one-dimensional transform low-frequency coefficients are not cached;
    基于得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。Based on the obtained current one-dimensional transform high-frequency coefficients, directly multiplexing the one-dimensional transform high-frequency coefficients of the previous group, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained.
  7. 根据权利要求1所述的方法,其特征在于,所述预置变换算法包括离散小波变换算法。The method according to claim 1, wherein the preset transform algorithm comprises a discrete wavelet transform algorithm.
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当所述第一输入数据属于第一组待处理输入数据的情况下,基于获取到得的所述第一输入数据进行镜像数据补充,得到补充数据;When the first input data belongs to the first group of input data to be processed, performing mirror data supplementation based on the acquired first input data to obtain supplementary data;
    将所述第一输入数据以及所述补充数据作为所述第一组待处理输入数据。The first input data and the supplementary data are used as the first group of input data to be processed.
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当从所述数据中获取到最后一组的第一输入数据并基于得到对应的所述待处理输入数据以及所述预置变换算法进行计算后,按照从后到前的顺序直接复用对应的所述待处理输入数据中的预置数量的第二输入数据;When the last group of first input data is obtained from the data and calculated based on the corresponding input data to be processed and the preset transformation algorithm, the corresponding a preset number of second input data in the input data to be processed;
    基于所述预置数量的第二输入数据进行镜像数据补充,得到补充数据;Perform mirror data supplementation based on the preset number of second input data to obtain supplementary data;
    将所述预置数量的第二输入数据以及所述补充数据作为最后一组的所述待处理输入数据。The preset number of second input data and the supplementary data are used as the input data to be processed in the last group.
  10. 根据权利要求1所述的方法,其特征在于,所述预置数据格式的获取待处理图像,根据预置存储格式存储所述待处理图像的数据,包括:The method according to claim 1, wherein obtaining the image to be processed in the preset data format, and storing the data of the image to be processed according to the preset storage format, comprising:
    获取YUV预置数据格式的图像,作为待处理图像;Obtain an image in the YUV preset data format as an image to be processed;
    根据YUV的分量顺序,将第一组YUV分量数据依次缓存至第一缓存区域中对应的缓存空间;在缓存完第一组YUV分量数据后,将第二组YUV分量数据依次缓存至第二缓存区域中对应的缓存空间;According to the component order of YUV, the first group of YUV component data is sequentially cached in the corresponding buffer space in the first cache area; after the first group of YUV component data is cached, the second group of YUV component data is sequentially cached in the second cache. The corresponding cache space in the region;
    所述方法还包括:在缓存完第一组YUV分量数据后,执行所述根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据的步骤,以得到所述处理结果,继续缓存对应组的YUV分量数据至所述第一缓存区域,直至缓存完YUV分量数据;The method further includes: after buffering the first group of YUV component data, performing the step of obtaining a preset number of first input data from the data according to the preset data format, to obtain the processing As a result, continue to buffer the YUV component data of the corresponding group to the first buffer area until the YUV component data is buffered;
    在缓存完第二组YUV分量数据后,执行所述根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据的步骤,以使得到所述处理结果,则继续缓存对应组的YUV分量数据至所述第二缓存区域,直至缓存完YUV分量数据。After the second set of YUV component data is cached, the step of obtaining a preset number of first input data from the data according to the preset data format is performed, so that the processing result is continued to be cached The YUV component data of the corresponding group is stored in the second buffer area until the YUV component data is buffered.
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据,包括:The method according to claim 10, wherein the obtaining a preset number of first input data from the data according to the preset data format comprises:
    针对任一缓存区域,基于YUV的分量顺序,从任一缓存区域中依次获取至少两个相同对应分量数据作为第一输入数据,以使得到多个对应的所述处理结果。For any buffer area, based on the component order of YUV, at least two identical corresponding component data are sequentially acquired from any buffer area as the first input data, so as to obtain multiple corresponding processing results.
  12. 根据权利要求10所述的方法,其特征在于,所述缓存空间缓存至少两种不同位深的待处理图像的数据。The method according to claim 10, wherein the buffer space buffers data of images to be processed with at least two different bit depths.
  13. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method of claim 10, wherein the method further comprises:
    基于至少两种不同位深中最大位深的待处理图像的数据,针对任一缓存区域中对应的原始预置缓存空间进行扩展,生成对应的所述缓存空间,所述原始预置缓存空间缓存至少两种不同位深中最小位深的待处理图像的数据。Based on the data of the image to be processed with the largest bit depth among at least two different bit depths, the corresponding original preset cache space in any cache area is expanded to generate the corresponding cache space, and the original preset cache space is cached The data of the image to be processed with the smallest bit depth among at least two different bit depths.
  14. 根据权利要求12或13所述的方法,其特征在于,所述方法还包括:The method according to claim 12 or 13, wherein the method further comprises:
    对至少两种不同位深中非最大位深的待处理图像的数据进行数据扩充,得到最大位深的待处理图像的数据,以缓存至所述缓存空间。Perform data expansion on the data of the to-be-processed image with a non-maximum bit-depth among the at least two different bit depths, to obtain the data of the to-be-processed image with the maximum bit depth, so as to be cached in the cache space.
  15. 根据权利要求12或13所述的方法,其特征在于,所述方法还包括:The method according to claim 12 or 13, wherein the method further comprises:
    对最大位深的待处理图像的数据,获取到与所述缓存空间对应的数据。For the data of the image to be processed with the maximum bit depth, data corresponding to the cache space is acquired.
  16. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    将编码后的待处理图像存储至对应的存储区域内,以待进行传输或解码。Store the encoded image to be processed in the corresponding storage area for transmission or decoding.
  17. 一种数据处理设备,包括:存储器、处理器;A data processing device, comprising: a memory, a processor;
    所述存储器,用于存储计算机程序;the memory for storing computer programs;
    所述处理器调用所述计算机程序,以实现如下步骤:The processor invokes the computer program to implement the following steps:
    获取预置数据格式的待处理图像,根据预置存储格式存储所述待处理图像的数据;Acquiring a to-be-processed image in a preset data format, and storing the data of the to-be-processed image according to a preset storage format;
    根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据,所述预置数量少于符合预置变换算法输入数据的个数;According to the preset data format, a preset number of first input data is obtained from the data, and the preset number is less than the number of input data conforming to the preset transformation algorithm;
    基于获取到的所述第一输入数据,按照从后到前的顺序直接复用上一组符合所述预置变换算法输入数据中预置数量的第二输入数据,并与所述第一输入数据作为待处理输入数据;Based on the acquired first input data, directly multiplex the last set of second input data that conforms to the preset number in the input data of the preset transformation algorithm in the order from back to front, and combine them with the first input data. data as input data to be processed;
    根据所述待处理输入数据以及所述预置变换算法进行计算,得到表示所述待处理图像的数据频率的处理结果。The calculation is performed according to the input data to be processed and the preset transformation algorithm to obtain a processing result representing the data frequency of the image to be processed.
  18. 根据权利要求17所述的设备,其特征在于,所述处理器,还用于:The device of claim 17, wherein the processor is further configured to:
    基于所述处理结果,对所述待处理图像进行编码。Based on the processing result, the image to be processed is encoded.
  19. 根据权利要求17所述的设备,其特征在于,所述处理器,具体用于:The device according to claim 17, wherein the processor is specifically configured to:
    在进行所述预置变换算法中一维变换算法的情况下,基于所述待处理输入数据,以及所述一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数;In the case of performing the one-dimensional transformation algorithm in the preset transformation algorithm, based on the input data to be processed and the high-frequency algorithm in the one-dimensional transformation algorithm, a current one-dimensional transformation high-frequency representation representing the high-frequency data is obtained. coefficient;
    基于所述当前一维变换高频系数、直接复用前一组表示高频数据的一维变换高频系数以及所述一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数,前一组的一维变换高频系数由前一组符合所述预置变换算法输入数据以及所述一维变换算法中高频算法得到,所述前一组的一维变换高频系数未进行缓存。Based on the current one-dimensional transform high-frequency coefficients, directly multiplexing the previous set of one-dimensional transform high-frequency coefficients representing high-frequency data, and the low-frequency algorithm in the one-dimensional transform algorithm, obtain the current one-dimensional transform low-frequency coefficient representing the low-frequency data. Coefficients, the one-dimensional transform high-frequency coefficients of the previous group are obtained by the previous group conforming to the input data of the preset transform algorithm and the high-frequency algorithm in the one-dimensional transform algorithm, and the one-dimensional transform high-frequency coefficients of the previous group are not. cache.
  20. 根据权利要求17或19所述的设备,其特征在于,所述处理器,具体用于:The device according to claim 17 or 19, wherein the processor is specifically configured to:
    在进行所述预置变换算法中二维变换算法的情况下,直接复用对应的一维变换高频系数以及二维变换算法,得到表示高频数据的当前二维变换高频系数;In the case of performing the two-dimensional transform algorithm in the preset transform algorithm, directly multiplexing the corresponding one-dimensional transform high-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform high-frequency coefficients representing high-frequency data;
    直接复用对应的一维变换低频系数以及所述二维变换算法,得到表示低频数据的当前二维变换低频系数,所述对应的一维变换高频系数未进行缓存,对应的一维变换低频系数未进行缓存。Directly multiplex the corresponding one-dimensional transform low-frequency coefficients and the two-dimensional transform algorithm to obtain the current two-dimensional transform low-frequency coefficients representing low-frequency data, the corresponding one-dimensional transform high-frequency coefficients are not cached, and the corresponding one-dimensional transform low-frequency coefficients Coefficients are not cached.
  21. 根据权利要求20所述的设备,其特征在于,所述处理器,还用于:The device according to claim 20, wherein the processor is further configured to:
    基于所述当前二维变换低频系数、直接复用前两组表示低频数据的二维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且所述当前二维变换低频系数以及前两组的二维变换低频系数作为所述一维变换算法中的高频算法的输入,二维变换低频系数未进行缓存;Based on the current two-dimensional transform low-frequency coefficients, directly multiplexing the first two sets of two-dimensional transform low-frequency coefficients representing low-frequency data, and a high-frequency algorithm in the one-dimensional transform algorithm, obtain the current one-dimensional transform high-frequency coefficients representing high-frequency data, And the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups are used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the two-dimensional transform low-frequency coefficients are not cached;
    基于二维变换算法后得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。Based on the current one-dimensional transform high-frequency coefficients obtained after the two-dimensional transform algorithm, directly multiplexing the one-dimensional transform high-frequency coefficients of the previous group, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained. .
  22. 根据权利要求19所述的设备,其特征在于,在一维变换算法后,所述处理器,还用于:The device according to claim 19, wherein after the one-dimensional transformation algorithm, the processor is further configured to:
    基于得到的当前一维变换低频系数、直接复用前两组表示低频数据的一维变换低频系数以及一维变换算法中的高频算法,得到表示高频数据的当前一维变换高频系数,且所述当前二维变换低频系数以及前两组的二维变换低频系数可作为所述一维变换算法中的高频算法的输入,一维变换低频系数未进行缓存;Based on the obtained current one-dimensional transform low-frequency coefficients, the first two groups of one-dimensional transform low-frequency coefficients representing low-frequency data, and the high-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform high-frequency coefficients representing high-frequency data are obtained, And the current two-dimensional transform low-frequency coefficients and the two-dimensional transform low-frequency coefficients of the first two groups can be used as the input of the high-frequency algorithm in the one-dimensional transform algorithm, and the one-dimensional transform low-frequency coefficients are not cached;
    基于得到的当前一维变换高频系数、直接复用前一组的一维变换高频系数以及一维变换算法中的低频算法,得到表示低频数据的当前一维变换低频系数。Based on the obtained current one-dimensional transform high-frequency coefficients, directly multiplexing the one-dimensional transform high-frequency coefficients of the previous group, and the low-frequency algorithm in the one-dimensional transform algorithm, the current one-dimensional transform low-frequency coefficients representing the low-frequency data are obtained.
  23. 根据权利要求17所述的设备,其特征在于,所述预置变换算法包括离散小波变换算法。The device according to claim 17, wherein the preset transform algorithm comprises a discrete wavelet transform algorithm.
  24. 根据权利要求17所述的设备,其特征在于,所述处理器,还用于:The device of claim 17, wherein the processor is further configured to:
    当所述第一输入数据属于第一组待处理输入数据的情况下,基于获取到得的所述第一输入数据进行镜像数据补充,得到补充数据;When the first input data belongs to the first group of input data to be processed, performing mirror data supplementation based on the acquired first input data to obtain supplementary data;
    将所述第一输入数据以及所述补充数据作为所述第一组待处理输入数据。The first input data and the supplementary data are used as the first group of input data to be processed.
  25. 根据权利要求17所述的设备,其特征在于,所述处理器,还用于:The device of claim 17, wherein the processor is further configured to:
    当从所述数据中获取到最后一组的第一输入数据并基于得到对应的所述待处理输入数据以及所述预置变换算法进行计算后,按照从后到前的顺序直接复用对应的所述待处理输入数据中的预置数量的第二输入数据;When the last group of first input data is obtained from the data and calculated based on the corresponding input data to be processed and the preset transformation algorithm, the corresponding a preset number of second input data in the input data to be processed;
    基于所述预置数量的第二输入数据进行镜像数据补充,得到补充数据;Perform mirror data supplementation based on the preset number of second input data to obtain supplementary data;
    将所述预置数量的第二输入数据以及所述补充数据作为最后一组的所述待处理输入数据。The preset number of second input data and the supplementary data are used as the input data to be processed in the last group.
  26. 根据权利要求17所述的设备,其特征在于,所述处理器,具体用于:The device according to claim 17, wherein the processor is specifically configured to:
    获取YUV预置数据格式的图像,作为待处理图像;Obtain an image in the YUV preset data format as an image to be processed;
    根据YUV的分量顺序,将第一组YUV分量数据依次缓存至第一缓存区域中 对应的缓存空间;在缓存完第一组YUV分量数据后,将第二组YUV分量数据依次缓存至第二缓存区域中对应的缓存空间;According to the component order of YUV, the first group of YUV component data is sequentially cached in the corresponding buffer space in the first cache area; after the first group of YUV component data is cached, the second group of YUV component data is sequentially cached in the second cache. The corresponding cache space in the region;
    在缓存完第一组YUV分量数据后,执行所述根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据的步骤,以使得到所述处理结果,则继续缓存对应组的YUV分量数据至所述第一缓存区域,直至缓存完YUV分量数据;After the first set of YUV component data is cached, the step of obtaining a preset number of first input data from the data according to the preset data format is performed, so that the processing result is continued to be cached The YUV component data of the corresponding group is sent to the first buffer area, until the YUV component data is buffered;
    在缓存完第二组YUV分量数据后,执行所述根据所述预置数据格式,从所述数据中获取预置数量的第一输入数据的步骤,以得到所述处理结果,继续缓存对应组的YUV分量数据至所述第二缓存区域,直至缓存完YUV分量数据。After the second group of YUV component data is cached, the step of obtaining a preset amount of first input data from the data according to the preset data format is performed to obtain the processing result, and the corresponding group continues to be cached The YUV component data is stored in the second buffer area until the YUV component data is buffered.
  27. 根据权利要求26所述的设备,其特征在于,所述处理器,具体用于:The device according to claim 26, wherein the processor is specifically configured to:
    针对任一缓存区域,基于YUV的分量顺序,从任一缓存区域中依次获取至少两个相同对应分量数据作为第一输入数据,以使得到多个对应的所述处理结果。For any buffer area, based on the component order of YUV, at least two identical corresponding component data are sequentially acquired from any buffer area as the first input data, so as to obtain multiple corresponding processing results.
  28. 根据权利要求26所述的设备,其特征在于,所述缓存空间缓存至少两种不同位深的待处理图像的数据。The device according to claim 26, wherein the buffer space buffers data of images to be processed with at least two different bit depths.
  29. 根据权利要求26所述的设备,其特征在于,所述处理器,还用于:The device of claim 26, wherein the processor is further configured to:
    基于至少两种不同位深中最大位深的待处理图像的数据,针对任一缓存区域中对应的原始预置缓存空间进行扩展,生成对应的所述缓存空间,所述原始预置缓存空间缓存至少两种不同位深中最小位深的待处理图像的数据。Based on the data of the image to be processed with the largest bit depth among at least two different bit depths, the corresponding original preset cache space in any cache area is expanded to generate the corresponding cache space, and the original preset cache space is cached The data of the image to be processed with the smallest bit depth among at least two different bit depths.
  30. 根据权利要求28或29所述的设备,其特征在于,所述处理器,还用于:The device according to claim 28 or 29, wherein the processor is further configured to:
    对至少两种不同位深中非最大位深的待处理图像的数据进行数据扩充,得到最大位深的待处理图像的数据,以缓存至所述缓存空间。Perform data expansion on the data of the to-be-processed image with a non-maximum bit-depth among the at least two different bit depths, to obtain the data of the to-be-processed image with the maximum bit depth, so as to be cached in the cache space.
  31. 根据权利要求28或29所述的设备,其特征在于,所述处理器,还用于:The device according to claim 28 or 29, wherein the processor is further configured to:
    对最大位深的待处理图像的数据,获取到与所述缓存空间对应的数据。For the data of the image to be processed with the maximum bit depth, data corresponding to the cache space is acquired.
  32. 根据权利要求18所述的设备,其特征在于,所述处理器,还用于:将编码后的待处理图像存储至对应的存储区域内,以待进行传输或解码。The device according to claim 18, wherein the processor is further configured to: store the encoded image to be processed in a corresponding storage area for transmission or decoding.
  33. 一种芯片,其特征在于,包括:如权利要求17-32任一项所述的设备。A chip, characterized by comprising: the device according to any one of claims 17-32.
  34. 一种无人机,其特征在于,包括:机体以及如权利要求17-32任一项所述的设备。An unmanned aerial vehicle, characterized by comprising: a body and the device according to any one of claims 17-32.
  35. 一种计算机可读存储介质,其特征在于,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求1-16中任意一项所述的数据处理方法。A computer-readable storage medium, characterized in that the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions are used to implement any one of claims 1-16 The data processing method described in item.
PCT/CN2021/084888 2021-04-01 2021-04-01 Data processing method and device, chip, unmanned aerial vehicle, and storage medium WO2022205297A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/084888 WO2022205297A1 (en) 2021-04-01 2021-04-01 Data processing method and device, chip, unmanned aerial vehicle, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/084888 WO2022205297A1 (en) 2021-04-01 2021-04-01 Data processing method and device, chip, unmanned aerial vehicle, and storage medium

Publications (1)

Publication Number Publication Date
WO2022205297A1 true WO2022205297A1 (en) 2022-10-06

Family

ID=83457769

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084888 WO2022205297A1 (en) 2021-04-01 2021-04-01 Data processing method and device, chip, unmanned aerial vehicle, and storage medium

Country Status (1)

Country Link
WO (1) WO2022205297A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020044695A1 (en) * 2000-05-05 2002-04-18 Bostrom Alistair K. Method for wavelet-based compression of video images
CN109168005A (en) * 2018-09-18 2019-01-08 天津大学 A kind of two-dimensional discrete wavelet conversion construction design method improving storage efficiency
CN109874012A (en) * 2017-12-04 2019-06-11 北京金山云网络技术有限公司 A kind of method for video coding, encoder, electronic equipment and medium
CN112235571A (en) * 2020-08-31 2021-01-15 咪咕文化科技有限公司 Video bit depth expansion method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020044695A1 (en) * 2000-05-05 2002-04-18 Bostrom Alistair K. Method for wavelet-based compression of video images
CN109874012A (en) * 2017-12-04 2019-06-11 北京金山云网络技术有限公司 A kind of method for video coding, encoder, electronic equipment and medium
CN109168005A (en) * 2018-09-18 2019-01-08 天津大学 A kind of two-dimensional discrete wavelet conversion construction design method improving storage efficiency
CN112235571A (en) * 2020-08-31 2021-01-15 咪咕文化科技有限公司 Video bit depth expansion method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10750195B2 (en) Electronic device and method for encoding image data therein
US8019151B2 (en) Methods and apparatus for image compression and decompression using graphics processing unit (GPU)
US10223764B2 (en) Method of and apparatus for processing a frame
RU2339181C1 (en) Method of additional information transmission at fractal coding of images
US8098947B2 (en) Method and apparatus for processing image data by rearranging wavelet transform data
US10784892B1 (en) High throughput hardware unit providing efficient lossless data compression in convolution neural networks
US8908982B2 (en) Image encoding device and image encoding method
US20060147122A1 (en) Method and apparatus for processing a compressed image in an order other than the order in which it was compressed
WO2018023553A1 (en) Parallel video encoding
JP2013013085A (en) Compression of high bit-depth images
EP3837635A1 (en) Image compression
US10304213B2 (en) Near lossless compression scheme and system for processing high dynamic range (HDR) images
US20200128264A1 (en) Image processing
JP4628647B2 (en) On-the-fly transfer of data between RGB and YCrCb color space for DCT interface
US8238434B2 (en) Apparatus and method for processing wavelet information
US8355057B2 (en) Joint scalar embedded graphics coding for color images
US6681052B2 (en) Methods and systems for performing inverse quantization and inverse weighting of DV video
WO2022205297A1 (en) Data processing method and device, chip, unmanned aerial vehicle, and storage medium
CN111491163B (en) Image block encoding based on pixel domain preprocessing operation on image blocks
US20200074691A1 (en) Processing images using hybrid infinite impulse response (iir) and finite impulse response (fir) convolution block
CN108881923B (en) Method for reducing buffer capacity of JPEG coding and decoding line
US20040264787A1 (en) Image processing decompression apparatus and method of using same different scaling algorithms simultaneously
JP3781012B2 (en) Image data compression method, image data expansion method, and image data expansion circuit
US10893297B2 (en) Processing image data using tiered bit-layers
US20240073421A1 (en) Image processing device and operating method of the image processing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21933956

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21933956

Country of ref document: EP

Kind code of ref document: A1