Data processing method, electronic device and chip
By introducing a microprocessor into the electronic device for data packaging processing, the problem of overburdened application processor processing under high frame rates is solved, and data processing efficiency and performance are improved.
Patent Information
- Application Number
- CN202310184119.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-08-30
AI Technical Summary
When the existing camera hardware system uses digital image overlap in the camera output format at high frame rates, the metadata and statistical data generated increase in a geometric exponential manner, resulting in an overloaded processing load on the application processor and reduced data processing efficiency and performance.
A microprocessor is introduced into the electronic device to obtain the data processed by the image signal processing module and package it, thereby reducing the number of direct interruptions to the application processor. Through data packet transmission between the microprocessor and the application processor, the application process is reduced. Processor load.
By reducing the number of data communications, the data processing efficiency and performance of the electronic device are improved, the processing pressure of the application processor is relieved, and the timeliness of image information processing is improved.
Smart Images

Figure CN118573791A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a data processing method, an electronic device and a chip. Background Art
[0002] Image Signal Processing (ISP) is mainly used to process the output signals of the front-end image sensor to match image sensors from different manufacturers.
[0003] At present, the mainstream camera hardware system (Camera-Sys), mainly the ISP module, interacts directly with the application processor (AP). Whenever information is generated, the AP is notified through a hardware interrupt signal, allowing the AP to perform corresponding processing in a timely manner, such as reading or transmitting data, thereby realizing camera-related services; and when the camera output format is digital image overlap (Digital Overlap, DOL), since each frame of the image outputs 2DOL / 3DOL / 4DOL, the metadata (Metadata) / statistics (Statistics) generated will increase in a geometric exponential form, data communication will become more frequent, and the AP will need to use a large amount of resources to handle these interrupt events, which increases the processing burden of the AP and reduces the efficiency and performance of data processing. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, an electronic device, and a chip, which can improve the efficiency and performance of the electronic device in processing data.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0007] Using the microprocessor to obtain data processed by the image signal processing module;
[0008] Packaging the processed data using the microprocessor to obtain a data packet, and transmitting the data packet to an application processor;
[0009] The data packet is processed using the application processor.
[0010] In a second aspect, an embodiment of the present application provides an electronic device, an acquisition unit, a transmission unit, and a processing unit.
[0011] The acquisition unit is used to use the microprocessor to acquire the data processed by the image signal processing module; and use the microprocessor to package the processed data to obtain a data packet;
[0012] The transmission unit is used to transmit the data packet to the application processor;
[0013] The processing unit is used to process the data packet using the application processor.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory storing instructions executable by the processor, a microprocessor, and an application processor; when the instructions are executed by the processor, the data processing method as described above is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a chip, which includes a programmable logic circuit and / or program instructions, and when the chip is running, it implements the data processing method as described above.
[0016] The embodiment of the present application provides a data processing method, an electronic device and a chip, wherein the electronic device has a microprocessor and an application processor; the electronic device uses the microprocessor to obtain the data processed by the image signal processing module; the microprocessor is used to package the processed data to obtain a data packet, and the data packet is transmitted to the application processor; the data packet is processed by the application processor. It can be seen that in the embodiment of the present application, the electronic device can use the microprocessor to obtain the data processed by the image signal processing module, and package the processed data, so as to transmit the data packet to the application processor for processing, without having to transmit each processed data to the application processor; thereby, the number of data communications can be greatly reduced, the processing burden of the application processor can be reduced, and the efficiency and performance of the electronic device in processing data can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a schematic diagram of the ISP process;
[0018] Figure 2 This is the architecture diagram of Camera-Sys;
[0019] Figure 3 Schematic diagram of 3DOL output data;
[0020] Figure 4 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 1 ;
[0021] Figure 5 This is a structural diagram of the Camera hardware system proposed in the embodiment of the present application;
[0022] Figure 6 A schematic diagram of the implementation flow of the data processing method proposed in the embodiment of the present application;
[0023] Figure 7 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 1 ;
[0024] Figure 8 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 2 ;
[0025] Fig. 9 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 3 ;
[0026] Fig.10 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 4 ;
[0027] Fig.11 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 2 ;
[0028] Fig.12 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 5 ;
[0029] Fig.13 A schematic diagram of a preset memory proposed in an embodiment of the present application;
[0030] Fig.14 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 6 ;
[0031] Fig.15 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 7 ;
[0032] Fig.16 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 8 ;
[0033] Fig.17 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 3 ;
[0034] Fig.18 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 4 . DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for ease of description, only the parts related to the related applications are shown in the drawings.
[0036] ISP is mainly used to process the output signals of the front-end image sensor to match image sensors from different manufacturers. Figure 1 This is a schematic diagram of the ISP process, such as Figure 1 As shown in the figure, the optical image generated by the lens is projected onto the surface of the sensor, which is converted into an analog electrical signal through photoelectric conversion. After noise is eliminated, it is converted into a digital image signal through A / D conversion, and then sent to the ISP module in the digital signal processing chip for processing. The ISP hardware system generally contains many hardware modules, such as Figure 1 In the black level correction (BLC), lens shading and bad pixel correction (BPC), these modules can be classified into the front end (FE) / middle end (ME) two-level system, or FE / ME / back end (BE) three-level system. With each frame of the picture, each system or module will generate corresponding metadata, as well as statistics (Statistics, Stats) such as Auto Exposure (AE) / Auto Focus (AF) / Auto While Balance (AWB) / Auto Lens Shading Correction (ALSC) / Auto Anti-Flicker (ATF) and so on.
[0037] Figure 2 This is the architecture diagram of Camera-Sys, such as Figure 2 As shown in the figure, the traditional mainstream Camera-Sys hardware system (mainly ISP module) includes FE / ME secondary system, which can directly interact with the hardware system AP-Sys (application processor), such as hardware interrupt. When each information is generated, a hardware interrupt signal will be generated to notify AP-Sys, and AP-Sys will perform corresponding processing in time, such as reading data or transmitting data. Camera-related services are implemented under the control of AP-Sys (CPU). Under this system architecture, the AP core has a heavy processing burden, which limits its ability to achieve high-performance functions.
[0038] Since the ISP hardware system is divided into two levels, FE / ME, or three levels, FE / ME / BE, with each frame of the picture, the second level or third level system will generate a large amount of metadata, as well as Stats such as AE / AF / AWB / LSC / ATF, which are directly written to the corresponding storage area buffer (Buffer) by the hardware, and interact with the AP core through interrupts. In the existing technology, when the camera frame rate output is 30fps, each frame of exposure generates a picture, and the AP can fully respond and process it. When the camera output format is digital image overlap (Digital Overlap, DOL), that is, each frame of the image simultaneously outputs 2DOL / 3DOL (that is, each frame of the image will generate 2 or 3 pictures, and the difference between the same frame of DOL pictures is the different exposure time), the generated metadata / Stats will increase in a geometric exponential form.
[0039] Figure 3 This is a schematic diagram of 3DOL output data, such as Figure 3 As shown in the figure, in the 3DOL output format, each frame has three images, long exposure (long), medium exposure (mid), and short exposure (short), which are input to three FE channels respectively. Each channel generates eight kinds of metadata / stats, including: FE RAW, AE stats, AF stats, AWB stats, ATF stats, ALSC stats, ISP metadata, and PD. Each signal data is generated through an interrupt to the AP processor. Therefore, within 1 second, the FE stage can generate 30×3×8=720 interrupts to interact and process data with the AP side. In addition, in the subsequent BE / ME stage, other interrupts are generated.
[0040] That is to say, for the existing mainstream technical architecture, the corresponding technical solutions have some potential problems and risks. When the camera output format is DOL mode, that is, each frame of image outputs 2DOL / 3DOL / 4DOL (that is, each frame of image will produce 2, 3, or 4 pictures, and the difference in the pictures lies in the length of exposure time), the metadata / Stats generated will increase exponentially; especially when the camera is at a high frame rate of 60fps / 120fps / 240fps, the challenges brought by frequent data communication and large data volume will further increase, and the CPU of AP-Sys will spend a lot of resources to handle these interrupt events, making it increasingly difficult to handle software services in a timely manner, increasing the processing burden of AP and reducing the efficiency and performance of data processing. Especially for multiple DOL modes, high frame rates, increasingly complex hardware systems and scene modes, new and effective solutions are urgently needed to meet the needs of metadata / Stats data transmission services.
[0041] In order to solve the above problems, in the embodiment of the present application, the electronic device has a microprocessor and an application processor, and the electronic device can use the microprocessor to obtain the data processed by the image signal processing module; use the microprocessor to package the processed data to obtain a data packet, and transmit the data packet to the application processor; and use the application processor to process the data packet. The efficiency and performance of the electronic device in processing data are improved.
[0042] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0043] An embodiment of the present application provides a data processing method, which is applied to an electronic device. Figure 4 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 1 ,like Figure 4 As shown, the electronic device 10 may include a microprocessor 11 and an application processor 12 .
[0044] It should be noted that in the embodiments of the present application, the electronic device can be any electronic device with communication and storage functions, such as: tablet computers, mobile phones, e-readers, remote controls, personal computers (PCs), laptop computers, vehicle-mounted electronic devices, network televisions, wearable electronic devices, personal digital assistants (PDAs), portable media players (PMPs), navigation devices and other electronic devices.
[0045] Exemplarily, in an embodiment of the present application, the electronic device is a mobile phone, and the data processing method is applied to a camera hardware system of a mobile phone chip. Figure 5 The Camera hardware system structure diagram proposed in the embodiment of the present application is as follows: Figure 5 As shown in the figure, in order to relieve the business pressure of AP-Sys, a MCU (microprocessor) with slightly lower performance is added to interact directly with the ISP, taking on part of the control work of the AP (application processor) on the ISP in the past, so as to reduce the burden of the AP and improve the timeliness of image information processing; the MCU interacts with the upper-layer AP for data and business control. In the new system framework, in most cases, the ISP hardware system does not need to interact directly with the AP side to realize data interaction. With the help of the MCU, each time it receives relevant hardware information, it pre-processes it or forwards the information to the AP core through inter-core communication technology. Inter-core communication is generally carried out through the mailbox hardware module, and then processed by the Linux kernel and the Android operating system application layer.
[0046] Figure 6The following is a schematic diagram of the implementation flow of the data processing method proposed in the embodiment of the present application, as shown in FIG. Figure 6 As shown, in an embodiment of the present application, a method for an electronic device to implement data processing may include the following steps:
[0047] Step 101: Use a microprocessor to obtain data processed by an image signal processing module.
[0048] In the embodiment of the present application, the electronic device may first use a microprocessor to obtain data processed by the image signal processing module.
[0049] It should be noted that, in the embodiment of the present application, the data processed by the image signal processing module may be a variety of data processed by ISP.
[0050] Illustratively, in an embodiment of the present application, the AP-Sys CPU in the electronic device controls the underlying microprocessor (MCU) to configure the ISP hardware one by one and enable it to work according to the business requirements of the Camera scene, and then starts the image sensor. The image sensor will immediately generate an image data stream and output it to the ISP hardware channel. The image data stream flows through the front-end system (FE), mid-end system (ME), back-end system (BE), etc. of the ISP hardware system in sequence. When flowing through the front-end system, a variety of data processed by the front-end system is obtained, and then when flowing through the mid-end system, a variety of data processed by the mid-end system is obtained. Then when flowing through the back-end system, a variety of data processed by the back-end system is obtained.
[0051] Furthermore, in an embodiment of the present application, the various data processed by the front-end system, the various data processed by the mid-end system, and the various data processed by the back-end system may all include corresponding metadata (metadata) and statistical data (Stats), etc.
[0052] It should be noted that, in the embodiments of the present application, metadata is generally some configuration parameters, which may include, for example, image-related sensor parameters, ISP module configuration parameters, and parameters of some related sensors, motors, flashes and other peripherals.
[0053] Exemplarily, in an embodiment of the present application, taking the various data processed by the front-end system as an example, the various data processed by the front-end system may include metadata processed by the front-end system, raw data (FE Raw) processed by the front-end system, statistical data processed by the front-end system, and phase difference data.
[0054] In the embodiments of the present application, original data refers to raw data, which is unprocessed data directly acquired by a sensor.
[0055] Furthermore, in an embodiment of the present application, the electronic device may cache the processed data according to a preset buffer.
[0056] Illustratively, in an embodiment of the present application, the electronic device can store the various data generated after the image data stream is processed by the front-end system in a pre-set buffer (preset buffer), where some buffers are directly written by hardware and some buffers are actively filled in by the microprocessor through software control.
[0057] For example, in the embodiments of the present application, Figure 7 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 1 ,like Figure 7 The figure shows a preset buffer (RingBuf) where the metadata (ISP Metadata) processed by the front-end system is stored. Taking the sensor mode as QBIN mode as an example, that is, one exposure map is output for each frame of the image, the metadata related to each frame of the image can be stored in a Buffer in the RingBuf; if the sensor mode is 3DOL, that is, three exposure maps are output for each frame of the image, the relevant metadata can be stored in three Buffers in the RingBuf; wherein, ISP Metadata may include input data per frame (Input per frame) and output data per frame (Output per frame), wherein each frame of input data includes common metadata (Common-Metadata) and frame parameters (Frame Parameter), both of which include header information (Head), and the header information includes identification information (frame_id), type information (type) and data volume information (Size); each frame of output data includes metadata FE-Metadata, 5A-Metadata and other Metadata.
[0058] It should be noted that in the embodiments of the present application, the data processing method can be applied not only to the storage and management of data content such as Meta / Stats, but also to the storage and management of data in other businesses, such as data of the same type that changes at various frame rates, or data of different types that change at different data types.
[0059] Step 102: Packaging the processed data using a microprocessor to obtain a data packet, and transmitting the data packet to an application processor.
[0060] In an embodiment of the present application, after the electronic device uses a microprocessor to obtain the data processed by the image processing module, the microprocessor can be used to package the processed data to obtain a data packet, and transmit the data packet to the application processor.
[0061] It should be noted that, in the embodiments of the present application, when the electronic device uses a microprocessor to transmit data packets, the data processed by the ISP system can be transmitted in stages. For example, when the ISP hardware system is a front-end / mid-end two-level system, the data processed by the mid-end system is transmitted after the data processed by the front-end system is transmitted; and when the ISP hardware system is a front-end / mid-end / back-end three-level system, the data processed by the front-end system is transmitted first, then the data processed by the mid-end system is transmitted, and finally the data processed by the back-end system is transmitted.
[0062] Furthermore, in some embodiments of the present application, when the electronic device uses a microprocessor to package and process multiple processed data, obtain data packets, and transmit the data packets to the application processor, the microprocessor can first be used to package and process the data processed by the front-end system, obtain data packets corresponding to the front-end system, and transmit the data packets corresponding to the front-end system to the application processor; then the microprocessor can be used to package and process the data processed by the mid-end system, obtain data packets corresponding to the mid-end system, and transmit the data packets corresponding to the mid-end system to the application processor; finally, the microprocessor can be used to package and process the data processed by the back-end system, obtain data packets corresponding to the back-end system, and transmit the data packets corresponding to the back-end system to the application processor.
[0063] It can be understood that in some embodiments of the present application, when the ISP hardware system is a FE / ME secondary system, the electronic device can first use the microprocessor to package and process the data processed by the front-end system, obtain the data packets corresponding to the front-end system, and transmit the data packets corresponding to the front-end system to the application processor; and then use the microprocessor to package and process the data processed by the mid-end system, obtain the data packets corresponding to the mid-end system, and transmit the data packets corresponding to the mid-end system to the application processor.
[0064] Furthermore, in an embodiment of the present application, when the electronic device uses a microprocessor to package and process the data processed by the front-end system, obtains a data packet corresponding to the front-end system, and transmits the data packet corresponding to the front-end system to the application processor, the microprocessor can first be used to package the metadata processed by the front-end system, the original data processed by the front-end system, the first statistical data processed by the front-end system, and the phase difference data in the data processed by the front-end system into a first data packet, and send the first data packet to the application processor; and package the second statistical data other than the first statistical data in the statistical data processed by the front-end system into a second data packet and a third data packet, and send the second data packet and the third data packet to the application processor.
[0065] It should be noted that, in the embodiment of the present application, the first statistical data includes automatic white balance statistical data, automatic lens shading correction statistical data, and automatic prevention of fluorescent lamp flicker statistical data.
[0066] It should be noted that, in the embodiment of the present application, the second statistical data includes automatic exposure statistical data and automatic focusing statistical data.
[0067] Exemplarily, in an embodiment of the present application, the sensor mode in the electronic device is the QBIN mode. Figure 8 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 2 ,like Figure 8 As shown in the figure, since the sensor is in QBIN mode, each frame of the output image is accompanied by only one exposure image (long exposure). After being processed by the front-end system, FE Raw (raw data processed by the front-end system), isp metadata (metadata processed by the front-end system), PD (phase difference data) and statistical data processed by the front-end system (AE stats, AF stats, AWB stats, ATF stats, ALSC stats) can be obtained. These data are stored in a buffer set in advance; then the electronic device uses a microprocessor to package and process these data, and encapsulates these data buffers into three data packets; among them, FE Raw, isp metadata, PD, AWB stats (automatic white balance statistics), ATF stats (automatic anti-fluorescent lamp flicker statistics) and ALSC stats (automatic lens shading correction statistics) are first packaged into the first data packet, which is first returned to the AP-Sys Camera HAL through ACK, that is, the first data packet is sent to the application processor; then AE stats (automatic exposure statistics) are packaged into the second data packet, and AF stats are packaged into the second data packet. stats (autofocus statistical data) are packaged into a third data packet, and the second data packet and the third data packet are independently sent to the application processor through ACK.
[0068] It should be noted that, in the embodiments of the present application, the order of sending the second data packet and the third data packet is not limited in the present application and can be adjusted according to actual needs.
[0069] It should be noted that in the embodiment of the present application, when the microprocessor packages and processes the various data processed by the front-end system, even if the sensor mode is 2DOL mode or 3DOL mode, that is, each frame image output by the sensor is accompanied by 2 or 3 exposure images, the various data corresponding to the multiple exposure images of the frame image are packaged and processed uniformly at the same time.
[0070] For example, in the embodiments of the present application, Fig. 9 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 3 ,like Fig. 9 As shown, the sensor mode is 2DOL mode, that is, each frame output by the sensor is accompanied by two exposure pictures (long exposure and short exposure). After being processed by the two-way front-end system, the bottom microprocessor encapsulates the received two-way related data Buffer into three data packets, and packages the metadata processed by the front-end system corresponding to the long exposure and short exposure images, the original data processed by the front-end system, the first statistical data processed by the front-end system (automatic white balance statistical data, automatic lens shading correction statistical data, and automatic lens shading correction statistical data), and the phase difference data into a first data packet, which is first transmitted to the application processor through ACK, and then the automatic exposure statistical data corresponding to the long exposure and short exposure images are packaged into a second data packet, and the automatic focus statistical data corresponding to the long exposure and short exposure images are packaged into a third data packet, and the second data packet and the third data packet are subsequently transmitted back to the application processor through ACK.
[0071] For example, in the embodiments of the present application, Fig.10 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 4As shown in 10, the sensor mode is 3DOL mode, that is, each frame of the sensor output is accompanied by 3 exposure pictures (long exposure, medium exposure, short exposure). After being processed by the 3-way front-end system, the bottom microprocessor encapsulates the received 3-way related data Buffer into three data packets, and packages the metadata processed by the front-end system corresponding to the long exposure, medium exposure, and short exposure images, the original data processed by the front-end system, the first statistical data processed by the front-end system (AWB statistical data, ALSC statistical data, and ATF statistical data), and the phase difference data into a first data packet, which is first transmitted to the application processor through ACK, and then the AE statistical data corresponding to the long exposure, medium exposure, and short exposure are packaged into a second data packet, and the AF statistical data corresponding to the long exposure, medium exposure, and short exposure images are packaged into a third data packet, and the second data packet and the third data packet are subsequently transmitted back to the application processor through ACK.
[0072] Furthermore, in an embodiment of the present application, the electronic device may also utilize a microprocessor to package a plurality of processed data under a preset data volume, obtain a data packet, and transmit the data packet to an application processor.
[0073] It should be noted that, in the embodiments of the present application, the above-mentioned data packaging method is mainly for the packaging method of one frame of image data; when the image sensor in the electronic device is in high frame rate mode, such as 60fps, 120fps, 240fps, that is, 60 frames, 120 frames, and 240 frames of pictures are generated within 1s. If it is DOL mode, such as 2DOL mode, then 2×60 frames / second, 2×120 frames / second, 2×240 frames / second, and a large number of pictures with different exposures are generated, as well as corresponding metadata and statistical data. In this case, the microprocessor can package and process multiple processed data of a preset number of frames (preset data volume), obtain a data packet, and transmit the data packet to the application processor.
[0074] Exemplarily, in an embodiment of the present application, the preset data volume is the relevant data of 4 frames of images; when the image sensor in the electronic device is in 120fps mode, the microprocessor can still transmit to the AP side at a rate of 30fps, and only needs to perform the above-mentioned packaging processing after receiving the data corresponding to 4 frames of images, so as to return the data packets to the application processor in a unified manner, thereby realizing the frame skipping return strategy.
[0075] It can be understood that in the embodiment of the present application, when the electronic device packages the processed data of the preset number of frames, the packaging method of each frame of image data is the same as the aforementioned packaging method; for example, when the microprocessor packages the relevant data of 4 frames of images, each of the 4 frames of images can obtain the corresponding raw data processed by the front-end system, metadata processed by the front-end system, phase difference data and statistical data processed by the front-end system after being processed by the front-end system, and then after obtaining the various data processed by the above-mentioned front-end system of the 4 frames of images, they are uniformly packaged and processed, and these data Buffers are encapsulated into three data packets; wherein, the FE Raw, ispmetadata, PD, AWB stats, ATF stats and ALSC stats of each of the 4 frames of images are first packaged into a first data packet, which is first returned to the AP-Sys Camera HAL through ACK, that is, the first data packet is sent to the application processor; then the AEstats of each of the 4 frames of images are packaged into a second data packet, and the AF stats of each of the 4 frames of images are packaged into a third data packet, and the second data packet and the third data packet are each independently sent to the application processor.
[0076] It can be seen that in the embodiments of the present application, for the high frame rate mode, the electronic device can use the microprocessor to select an appropriate frame skipping method to return a variety of processed data to the application processor, thereby improving the efficiency of data processing.
[0077] Step 103: Process the data packet using the application processor.
[0078] In an embodiment of the present application, after the electronic device uses a microprocessor to package and process a variety of processed data to obtain a data packet and transmits the data packet to an application processor, the application processor can be used to process the data packet.
[0079] Exemplarily, in an embodiment of the present application, the Camera HAL software layer running on the processor is used to flow and process data packets in the pipeline.
[0080] To summarize, in the embodiments of the present application, even if it is a multi-exposure DOL sensor, when it is in the processing stage of the front-end system, after outputting multiple copies of data in a branched manner, the various processed data can be packaged uniformly and returned to the AP core through data packets, which can greatly reduce the high-density communication load caused by multiple batch uploads while ensuring the consistency of subsequent batch processing.
[0081] The embodiment of the present application provides a data processing method, in which the electronic device has a microprocessor and an application processor; the electronic device uses the microprocessor to obtain the data processed by the image processing module; the microprocessor is used to package the processed data to obtain a data packet, and the data packet is transmitted to the application processor; the data packet is processed by the application processor. It can be seen that in the embodiment of the present application, the electronic device can use the microprocessor to obtain the data processed by the image processing module, and package the processed data, so as to transmit the data packet to the application processor for processing, without having to transmit it to the application processor every time a type of processed data is obtained; thereby, the number of data communications can be greatly reduced, the processing burden of the application processor can be reduced, and the efficiency and performance of the electronic device in processing data can be improved.
[0082] Based on the above embodiment, in another embodiment of the present application, Fig.11 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 2 ,like Fig.11 As shown, the electronic device 10 may further include a first hardware module 13 , a second hardware module 14 and a third hardware module 15 .
[0083] It should be noted that, in the embodiments of the present application, the electronic device may utilize a first hardware module to obtain first statistical data; utilize a second hardware module to obtain automatic exposure statistical data; and utilize a third hardware module to obtain automatic focusing statistical data.
[0084] In addition, in the embodiments of the present application, for an electronic device with a shooting function, as the shooting performance is enhanced, several image sensors may work at different frame rates at the same time, that is, a main camera and multiple secondary cameras exist at the same time. In more common situations, image sensors such as telephoto, wide-angle, and ultra-wide-angle simultaneously output picture streams, so that an image signal processing (ISP) module in the electronic device needs to receive image streams output by multiple (typically 3) image sensors. In addition, each image sensor can be configured as 1DOL, 2DOL, or 3DOL to generate multiple image streams; each image sensor simultaneously outputs multiple exposure DOL images, so the ISP hardware module in the electronic device can work for multiple FE channels at the same time, ensuring that different image sensors, DOL image data streams, etc. can be processed in parallel.
[0085] Exemplarily, in an embodiment of the present application, three image sensors all support 3DOL mode, and each image sensor simultaneously outputs three DOL exposure images, that is, at the same time, three image sensors simultaneously output nine DOL image streams, which are input to the nine FE systems of the ISP module. Among the nine FEs, each has a corresponding AE, AF, AWB, ALSC, and ATF Statistics statistical module. In other words, ideally, there are nine hardware modules for these five types of statistical data, that is, N1=N2=N3=N4=N5=9. However, in reality, considering that each FE and each statistical module has requirements for power consumption, area, and cost, the FE and its Statistics modules will be reduced in combination with the actual Camera business scenario. Therefore, the values of N1 to N5 are generally less than 9, and the values are not equal.
[0086] Furthermore, in the embodiments of the present application, Fig.12 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 5 ,like Fig.12 As shown, the hardware module for obtaining statistical data is divided into a first hardware module, a second hardware module and a third hardware module; wherein, the first hardware module is used to obtain the first statistical data, namely, to obtain AWB stats, ATFstats and ALSC stats, the second hardware module is used to obtain AE stats, and the third hardware module is used to obtain AFstats; it can be seen that after obtaining the image data stream (Raw), the multiple channels of the front-end system can obtain the processed image data stream through the processing of various modules, such as the DG module, the LSC module, etc., and then transmit the data stream to the first hardware module, and obtain the statistical data AWB stats, ATF stats and ALSCstats through the three sub-modules in the first hardware module, when the data stream is transmitted to the second hardware module, the statistical data AE stats are obtained, and when the data stream is transmitted to the third hardware module, the statistical data AF stats are obtained.
[0087] Furthermore, in an embodiment of the present application, the electronic device can also store relevant information corresponding to each of the multiple data processed by the front-end system according to a preset memory; wherein the relevant information includes preset buffer address information corresponding to each of the multiple data processed by the front-end system, and relevant parameter information; the preset memory includes a first memory, a second memory and a third memory.
[0088] Among them, in an embodiment of the present application, the relevant parameter information may include identification information (frame_id), type information (type), DOL number information (dol_num), DOL picture type information (dol_type) and data volume information (size), etc.
[0089] It is understandable that in the embodiment of the present application, before each frame of the picture stream is generated, the microprocessor will allocate a buffer (preset buffer) for data storage in advance, which can be written into the relevant buffer by the microprocessor through software, or the ISP can generate data through hardware and then store it in the relevant buffer through DMA. Therefore, it is necessary to manage and combine the data addresses of the buffers so that the MCU can return this combination information to the upper layer AP-SysCamera HAL in the form of ACK in a certain protocol.
[0090] Furthermore, in an embodiment of the present application, a first memory is used to store relevant information corresponding to metadata processed by a front-end system, relevant information corresponding to each of the first statistical data, relevant information corresponding to the original data processed by the front-end system, and relevant information corresponding to the phase difference data; a second memory is used for relevant information corresponding to AE statistical data; and a third memory is used to store relevant information corresponding to AF statistical data.
[0091] For example, in the embodiments of the present application, Fig.13 A schematic diagram of a preset memory proposed in an embodiment of the present application, such as Fig.13 As shown, the preset memory may include a first memory, a second memory and a third memory. Taking 30fps and the sensor mode of 3DOL mode as an example, that is, 3 exposure images are output for each frame of the image, the preset buffer will simultaneously store metadata and statistical data of long exposure, medium exposure, short exposure and other images, and the preset memory will be used to store the Buffer address information (Buffer Addr) and related parameters of these data; for example, the first memory is used to store relevant information corresponding to the metadata (FE Raw) processed by the front-end system, relevant information corresponding to each of the first statistical data (AWB Stats, ALSC Stats, ATF Stats), relevant information corresponding to the raw data (FE Raw) processed by the front-end system, and relevant information corresponding to the phase difference data (PD); the second memory is used to store relevant information corresponding to AE Stats; the third memory is used to store relevant information corresponding to AFStats.
[0092] In addition, in an embodiment of the present application, if the image data also includes face detection (FD) information, the FD information can be subsequently matched with the corresponding frame using an algorithm and a frame number.
[0093] Furthermore, in an embodiment of the present application, when the microprocessor transmits data processed by the front-end system, data processed by the mid-end system, and data processed by the back-end system in stages, relevant information can be obtained from the same memory at different transmission stages, but the content will be continuously updated, thereby ensuring that each frame of the image maintains the same information area.
[0094] Further, in an embodiment of the present application, based on the above-mentioned preset memory, when executing the frame skipping return strategy in the high frame rate mode, exemplarily, Fig.14 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 6 ,like Fig.14 As shown, in the high frame rate mode, when the microprocessor returns the relevant information corresponding to the various processed data to the application processor, it can return the relevant information corresponding to each of 4 frames of image data (preset data volume) to the application processor in a unified manner, thereby implementing a frame skipping return strategy, wherein the relevant data corresponding to each frame of image are stored in the first memory, the second memory and the third memory.
[0095] It should be noted that in the embodiments of the present application, the data method can not only be applied to the Camera service to perform cross-core transmission of Meta / Stats and other data, but can also be applied to cross-core interaction of other services, such as data interaction of high-frequency words between different cores in Audio, Video, and DISPlay services.
[0096] In addition, in the embodiments of the present application, experiments have proved that if an MCU is added to the existing technical solution for image data processing, the MCU transmits each information to the AP through inter-core communication, which consumes a lot of resources for communication between the MCU core and the AP core, and the resources that should be used for business processing are wasted on data transmission. Fig.15 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 7 ,like Fig.15 The method shown above uses MCU to transmit each data to AP through inter-core communication. From the perspective of photo preview business efficiency and data utilization, it is not the best solution.
[0097] Furthermore, in the embodiments of the present application, another packaging method is designed. Fig.16 Schematic diagram of the implementation of the data processing method proposed in the embodiment of the present application Figure 8 ,like Fig.16As shown, for the 3DOL sensor mode, for the long exposure, medium exposure and short exposure images, the three-way processed data obtained after being processed by the front-end system are not packaged according to the aforementioned packaging method, but the data corresponding to the long exposure is packaged into one data packet, the data corresponding to the medium exposure is packaged into one data packet, and the data corresponding to the short exposure is packaged into one data packet, so as to transmit the three data packets. In this case, although it is also packaged three times, the number of communications is reduced, but because the AE / AF Stats data is returned after being processed by the MCU, there will be a delay when the overall data is returned to the application processor, which will cause delays in the system, affect the subsequent processes, and the data processing efficiency is relatively poor.
[0098] In addition, the sensor type and working mode in the embodiment of the present application are not limited to the QBIN / DOL mode, but also include other types such as QDOL2 / QDOL3 / QDOL4 / SFDOL.
[0099] Furthermore, in an embodiment of the present application, based on the storage strategy of the preset memory and the use of a preset buffer to write data, the data is uniformly packaged and processed in stages and then sent to the application processor, which can effectively improve the data processing efficiency of the electronic device.
[0100] In an embodiment of the present application, the electronic device may first use a microprocessor to obtain data processed by an image processing module; then use the microprocessor to package the processed data, obtain a data packet, and transmit the data packet to an application processor; thereby using the application processor to process the data packet.
[0101] It should be noted that, in the embodiments of the present application, the processed data may be a variety of data processed by ISP.
[0102] Illustratively, in an embodiment of the present application, the AP-Sys CPU in the electronic device controls the underlying microprocessor (MCU) to configure the ISP hardware one by one and enable it to work according to the business requirements of the Camera scene, and then starts the image sensor. The image sensor will immediately generate an image data stream and output it to the ISP hardware channel. The image data stream flows through the front-end system (FE), mid-end system (ME), back-end system (BE), etc. of the ISP hardware system in sequence. When flowing through the front-end system, the data processed by the front-end system is obtained, and then when flowing through the mid-end system, the data processed by the mid-end system is obtained, and then when flowing through the back-end system, the data processed by the back-end system is obtained.
[0103] Furthermore, in an embodiment of the present application, the data processed by the front-end system, the data processed by the mid-end system, and the data processed by the back-end system may all include corresponding metadata (metadata) and statistical data (Stats), etc.
[0104] Furthermore, in some embodiments of the present application, when the ISP hardware system is a three-level FE / ME / BE system, when the electronic device uses a microprocessor to package and process the data processed by the front-end system, obtains data packets corresponding to the front-end system, and transmits the data packets corresponding to the front-end system to the application processor, it can first use the microprocessor to package and process the data processed by the mid-end system, obtain data packets corresponding to the mid-end system, and transmit the data packets corresponding to the mid-end system to the application processor; use the microprocessor to package and process the data processed by the back-end system, obtain data packets corresponding to the back-end system, and transmit the data packets corresponding to the back-end system to the application processor.
[0105] Furthermore, in some embodiments of the present application, when the ISP hardware system is a FE / ME secondary system, the electronic device can first use the microprocessor to package and process the data processed by the front-end system, obtain the data packets corresponding to the front-end system, and transmit the data packets corresponding to the front-end system to the application processor; and then use the microprocessor to package and process the data processed by the mid-end system, obtain the data packets corresponding to the mid-end system, and transmit the data packets corresponding to the mid-end system to the application processor.
[0106] Furthermore, in some embodiments of the present application, when the electronic device uses a microprocessor to package and process the data processed by the front-end system, obtains a data packet corresponding to the front-end system, and transmits the data packet corresponding to the front-end system to the application processor, the microprocessor can be used to package the metadata processed by the front-end system, the original data processed by the front-end system, the first statistical data processed by the front-end system, and the phase difference data in the data processed by the front-end system into a first data packet, and send the first data packet to the application processor; and package the second statistical data other than the first statistical data in the statistical data processed by the front-end system into a second data packet and a third data packet, and send the second data packet and the third data packet to the application processor.
[0107] In an embodiment of the present application, the first statistical data includes automatic white balance statistical data, automatic lens shading correction statistical data, and automatic prevention of fluorescent lamp flicker statistical data; the second statistical data includes automatic exposure statistical data and automatic focusing statistical data.
[0108] For example, in the embodiments of the present application, Figure 8As shown, since the sensor is in QBIN mode, each frame of the output image is accompanied by only one exposure image. After being processed by the front-end system, FE Raw (raw data processed by the front-end system), isp metadata (metadata processed by the front-end system), PD (phase difference data) and statistical data (AE stats, AF stats, AWB stats, ATF stats, ALSC stats) processed by the front-end system can be obtained, and these data are stored in a buffer set in advance; then the electronic device uses a microprocessor to package and process these data, and encapsulates these data buffers into three data packets; among them, FE Raw, isp metadata, PD, AWB stats (automatic white balance statistics), ATF stats (automatic prevention of fluorescent lamp flicker statistics) and ALSC stats (automatic lens shading correction statistics) are first packaged into a first data packet, which is first returned to the AP-Sys Camera HAL through ACK, that is, the first data packet is sent to the application processor; then AE stats (automatic exposure statistics) are packaged into a second data packet, and AF stats (automatic focus statistics) are packaged into a third data packet, and the second data packet and the third data packet are independently sent to the application processor.
[0109] It should be noted that, in the embodiments of the present application, the order of sending the second data packet and the third data packet is not limited in the present application and can be adjusted according to actual needs.
[0110] It should be noted that in the embodiment of the present application, when the microprocessor packages and processes the various data processed by the front-end system, even if the sensor mode is 2DOL mode or 3DOL mode, that is, each frame image output by the sensor is accompanied by 2 or 3 exposure images, the various data corresponding to the multiple exposure images of the frame image are packaged and processed uniformly at the same time.
[0111] For example, in the embodiments of the present application, Fig. 9As shown, the sensor mode is 2DOL mode, that is, each frame of the sensor output is accompanied by two exposure pictures (long exposure and short exposure). After being processed by the two-way front-end system, the bottom microprocessor encapsulates the received two-way related data buffer into three data packets, and packages the metadata processed by the front-end system corresponding to the long exposure and short exposure images, the original data processed by the front-end system, the first statistical data processed by the front-end system (automatic white balance statistical data, automatic lens shading correction statistical data, and automatic prevention of fluorescent lamp flicker statistical data) and the phase difference data into a first data packet, which is first transmitted to the application processor through ACK, and then the AE statistical data corresponding to the long exposure and short exposure images are packaged into a second data packet, and the AF statistical data corresponding to the long exposure and short exposure images are packaged into a third data packet, and the second data packet and the third data packet are subsequently transmitted back to the application processor through ACK.
[0112] For example, in the embodiments of the present application, Fig.10 As shown, the sensor mode is 3DOL mode, that is, each frame of the sensor output is accompanied by three exposure pictures (long exposure, medium exposure, and short exposure). After being processed by the 3-way front-end system, the bottom microprocessor encapsulates the received 3-way related data Buffer into three data packets, and packages the metadata processed by the front-end system corresponding to the long exposure, medium exposure, and short exposure images, the original data processed by the front-end system, the first statistical data processed by the front-end system (automatic white balance statistical data, automatic lens shading correction statistical data, and automatic prevention of fluorescent lamp flicker statistical data) and the phase difference data into a first data packet, which is first transmitted to the application processor through ACK, and then the AE statistical data corresponding to the long exposure, medium exposure, and short exposure are packaged into a second data packet, and the AF statistical data corresponding to the long exposure, medium exposure, and short exposure images are packaged into a third data packet, and the second data packet and the third data packet are subsequently transmitted back to the application processor through ACK.
[0113] It should be noted that in the embodiment of the present application, since the control of AE / AF statistical data has high real-time requirements, its output processing and control strategy are placed on the underlying microprocessor side. After the microprocessor uses relevant algorithms to process the Buffer of AE / AF statistical data, it is transmitted to the application processor. This can avoid the application processor and the microprocessor deciding to release different types of buffers by voting.
[0114] Furthermore, in an embodiment of the present application, in a high frame rate mode, the electronic device may also utilize a microprocessor to package and process a variety of processed data at a preset data volume, obtain a data packet, and transmit the data packet to an application processor.
[0115] It should be noted that in an embodiment of the present application, when the image sensor in the electronic device is in a high frame rate mode, such as 60fps, 120fps, or 240fps, that is, 60 frames, 120 frames, or 240 frames of images are generated within 1 second. If it is a DOL mode, such as a 2DOL mode, then a large number of images with different exposures, such as 2×60 frames / second, 2×120 frames / second, and 2×240 frames / second, are generated, as well as corresponding metadata and statistical data. In this case, the microprocessor can package and process multiple processed data of a preset number of frames (preset data volume), obtain a data packet, and transmit the data packet to the application processor.
[0116] Exemplarily, in an embodiment of the present application, the preset data volume is the relevant data of 4 frames of images; when the image sensor in the electronic device is in 120fps mode, the microprocessor can still transmit to the AP side at a rate of 30fps, and only needs to perform the above-mentioned packaging processing after receiving the data corresponding to 4 frames of images, so as to return the data packets to the application processor in a unified manner, thereby realizing the frame skipping return strategy.
[0117] It can be seen that in the embodiments of the present application, on the one hand, through the data combination packaging and return strategy, especially for the multiple meta and 5A raw Stats data output by the multi-exposure DOL sensor, the ACK is packaged and returned in stages according to FE / ME / BE, which can greatly (10 times) reduce the high-density communication load caused by multiple batches of uploads and reduce system power consumption; on the other hand, the present application uses hardware modules and preset memories to realize the classification and packaging of data and related information, and stores them in a unified form, which is highly centralized and can be freely combined according to the Sensor mode, supporting the FE / ME / BE stages of ISP processing, supporting the DOL mode, supporting high frame rate, reducing the consumption of Buffer resources, and realizing fast access and upload of data at various frame rates of the system.
[0118] The embodiment of the present application provides a data processing method, in which the electronic device has a microprocessor and an application processor; the electronic device uses the microprocessor to obtain the data processed by the image processing module; the microprocessor is used to package the processed data to obtain a data packet, and the data packet is transmitted to the application processor; the data packet is processed by the application processor. It can be seen that in the embodiment of the present application, the electronic device can use the microprocessor to obtain the data processed by the image processing module, and package the processed data, so as to transmit the data packet to the application processor for processing, without having to transmit it to the application processor every time a type of processed data is obtained; thereby, the number of data communications can be greatly reduced, the processing burden of the application processor can be reduced, and the efficiency and performance of the electronic device in processing data can be improved.
[0119] Based on the above embodiment, in another embodiment of the present application, Fig.17 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 3 ,like Fig.17 As shown, the electronic device 10 proposed in the embodiment of the present application may include: an acquisition unit 16, a transmission unit 17, a processing unit 18 and a storage unit 19.
[0120] The acquisition unit 16 is used to acquire the data processed by the image signal processing module using a microprocessor; and to package the processed data using the microprocessor to obtain a data packet.
[0121] The transmission unit 17 is used to transmit the data packet to the application processor.
[0122] The processing unit 18 is used to process the data packet using the application processor.
[0123] Furthermore, the image signal processing module includes a front-end system, a mid-end system and a back-end system; the acquisition unit 16 is also used to use the microprocessor to package the data processed by the front-end system to obtain the data packet corresponding to the front-end system.
[0124] Furthermore, the transmission unit 17 is also used to transmit the data packet corresponding to the front-end system to the application processor.
[0125] Furthermore, the acquisition unit 16 is also used to use the microprocessor to package the data processed by the mid-end system to obtain a data packet corresponding to the mid-end system.
[0126] Furthermore, the transmission unit 17 is also used to transmit the data packet corresponding to the mid-end system to the application processor.
[0127] Furthermore, the acquisition unit 16 is also used to use the microprocessor to package the data processed by the back-end system to obtain a data packet corresponding to the back-end system.
[0128] Furthermore, the transmission unit 17 is also used to transmit the data packets corresponding to the backend system to the application processor.
[0129] Furthermore, the acquisition unit 16 is also used to use the microprocessor to package the metadata processed by the front-end system, the original data processed by the front-end system, the first statistical data processed by the front-end system, and the phase difference data into a first data packet.
[0130] Furthermore, the transmission unit 17 is further configured to send the first data packet to the application processor.
[0131] Furthermore, the acquisition unit 16 is further configured to package second statistical data other than the first statistical data in the statistical data processed by the front-end system into a second data packet and a third data packet.
[0132] Furthermore, the transmission unit 17 is further configured to send the second data packet and the third data packet to the application processor.
[0133] Furthermore, the first statistical data include automatic white balance statistical data, automatic lens shading correction statistical data and automatic prevention of fluorescent lamp flicker statistical data; the second statistical data include automatic exposure statistical data and automatic focusing statistical data.
[0134] Furthermore, the acquisition unit 16 is further configured to acquire the first statistical data using the first hardware module; acquire the automatic exposure statistical data using the second hardware module; and acquire the automatic focusing statistical data using the third hardware module.
[0135] Furthermore, the storage unit 19 is used to cache the processed data according to a preset buffer.
[0136] Furthermore, the storage unit 19 is also used to store the relevant information corresponding to each of the data processed by the front-end system according to a preset memory.
[0137] Furthermore, the relevant information includes preset buffer address information corresponding to each of the data processed by the front-end system, and relevant parameter information.
[0138] Furthermore, the preset memory includes a first memory, a second memory and a third memory; the first memory is used to store relevant information corresponding to the metadata processed by the front-end system, relevant information corresponding to each of the first statistical data, relevant information corresponding to the original data processed by the front-end system, and relevant information corresponding to the phase difference data; the second memory is used for relevant information corresponding to automatic exposure statistical data; the third memory is used to store relevant information corresponding to automatic focusing statistical data.
[0139] Furthermore, the acquisition unit 16 is further configured to utilize the microprocessor to package the processed data of a preset data volume to obtain the data packet.
[0140] Furthermore, the transmission unit 17 is further configured to transmit the data packet to the application processor.
[0141] In the embodiments of the present application, further, Fig.18 Schematic diagram of the structure of the electronic device proposed in the embodiment of the present application Figure 4 ,like Fig.18 As shown, the electronic device 10 proposed in the embodiment of the present application may also include a processor 110 and a memory 111 storing executable instructions of the processor 110; further, the electronic device 10 may also include a communication interface 112, and a bus 113 for connecting the processor 110, the memory 111 and the communication interface 112.
[0142] In the embodiment of the present application, the processor 110 can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and the embodiment of the present application is not specifically limited. The electronic device 10 can also include a memory 111, which can be connected to the processor 110, wherein the memory 111 is used to store executable program code, the program code includes computer operation instructions, and the memory 111 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.
[0143] In the embodiment of the present application, the bus 113 is used to connect the communication interface 112, the processor 110 and the memory 111, and the mutual communication between these devices.
[0144] In the embodiment of the present application, the memory 111 is used to store instructions and data.
[0145] Furthermore, in an embodiment of the present application, the above-mentioned processor 110 is used to use the microprocessor to obtain data processed by the image signal processing module; use the microprocessor to package the processed data to obtain a data packet, and transmit the data packet to the application processor; and use the application processor to process the data packet.
[0146] In practical applications, the memory 111 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the processor 110.
[0147] In addition, each functional module in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software functional modules.
[0148] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0149] The embodiment of the present application provides an electronic device, which has a microprocessor and an application processor; the electronic device uses the microprocessor to obtain data processed by the image processing module; the microprocessor is used to package the processed data to obtain a data packet, and the data packet is transmitted to the application processor; the data packet is processed by the application processor. It can be seen that in the embodiment of the present application, the electronic device can use the microprocessor to obtain the data processed by the image processing module, and package the processed data, so as to transmit the data packet to the application processor for processing, without having to transmit it to the application processor every time a type of processed data is obtained; thereby, the number of data communications can be greatly reduced, the processing burden of the application processor can be reduced, and the efficiency and performance of the electronic device in processing data can be improved.
[0150] Specifically, the program instructions corresponding to a data processing method in this embodiment may be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the program instructions corresponding to a data processing method in the storage medium are read or executed by an electronic device, the following steps are included:
[0151] Using the microprocessor to obtain data processed by the image signal processing module;
[0152] Packaging the processed data using the microprocessor to obtain a data packet, and transmitting the data packet to an application processor;
[0153] The data packet is processed using the application processor.
[0154] The present application provides a chip, which includes a programmable logic circuit and / or a program instruction. When the chip is running, the data processing method described above is implemented, which specifically includes the following steps:
[0155] Using the microprocessor to obtain data processed by the image signal processing module;
[0156] Packaging the processed data using the microprocessor to obtain a data packet, and transmitting the data packet to an application processor;
[0157] The data packet is processed using the application processor.
[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0159] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0160] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing the steps in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0162] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Using a microprocessor to obtain data processed by an image signal processing module; Packaging the processed data using the microprocessor to obtain a data packet, and transmitting the data packet to an application processor; The data packet is processed using the application processor.
2. The method according to claim 1, characterized in that The image signal processing module includes a front-end system, a mid-end system and a back-end system; the microprocessor is used to package the processed data to obtain a data packet, and the data packet is transmitted to the application processor, including: Using the microprocessor to package the data processed by the front-end system, obtain a data packet corresponding to the front-end system, and transmit the data packet corresponding to the front-end system to the application processor; Using the microprocessor to package the data processed by the mid-end system, obtain a data packet corresponding to the mid-end system, and transmit the data packet corresponding to the mid-end system to the application processor; The microprocessor is used to package the data processed by the back-end system to obtain a data packet corresponding to the back-end system, and the data packet corresponding to the back-end system is transmitted to the application processor.
3. The method according to claim 2, characterized in that The method of using the microprocessor to package the data processed by the front-end system to obtain a data packet corresponding to the front-end system, and transmitting the data packet corresponding to the front-end system to the application processor includes: Using the microprocessor to pack metadata processed by the front-end system, original data processed by the front-end system, first statistical data processed by the front-end system, and phase difference data into a first data packet, and send the first data packet to the application processor; Second statistical data other than the first statistical data among the statistical data processed by the front-end system are packaged into a second data packet and a third data packet, and the second data packet and the third data packet are sent to the application processor.
4. The method according to claim 3, characterized in that The first statistical data includes automatic white balance statistical data, automatic lens shading correction statistical data, and automatic fluorescent lamp flicker prevention statistical data; The second statistical data includes automatic exposure statistical data and automatic focusing statistical data.
5. The method according to claim 4, characterized in that The electronic device further includes a first hardware module, a second hardware module, and a third hardware module, and the method further includes: acquiring the first statistical data using the first hardware module; Acquiring the automatic exposure statistical data using the second hardware module; The auto-focusing statistical data is obtained by using the third hardware module.
6. The method according to claim 1 or 2, characterized in that: The method further comprises: The processed data is cached according to a preset buffer.
7. The method according to claim 4, characterized in that The method further comprises: The preset memory stores the relevant information corresponding to each of the data processed by the front-end system.
8. The method according to claim 7, characterized in that The related information includes preset buffer address information corresponding to each of the data processed by the front-end system, and related parameter information.
9. The method according to claim 7, characterized in that: The preset memory includes a first memory, a second memory and a third memory; The first memory is used to store relevant information corresponding to the metadata processed by the front-end system, relevant information corresponding to each of the first statistical data, relevant information corresponding to the original data processed by the front-end system, and relevant information corresponding to the phase difference data; The second memory is used to store relevant information corresponding to the automatic exposure statistical data; The third memory is used to store relevant information corresponding to the automatic focusing statistical data.
10. The method according to claim 1, characterized in that The step of packaging the processed data using the microprocessor to obtain a data packet and transmitting the data packet to an application processor includes: The microprocessor is used to package the processed data under a preset data volume to obtain the data packet, and the data packet is transmitted to the application processor.
11. An electronic device, characterized in that: The electronic device includes an acquisition unit, a transmission unit and a processing unit. The acquisition unit is used to acquire the data processed by the image signal processing module using a microprocessor; and to package the processed data using the microprocessor to obtain a data packet; The transmission unit is used to transmit the data packet to the application processor; The processing unit is used to process the data packet using the application processor.
12. An electronic device, characterized in that: The electronic device includes a processor, a memory storing instructions executable by the processor, a microprocessor, and an application processor; when the instructions are executed by the processor, the method according to any one of claims 1 to 10 is implemented.
13. A chip, characterized in that: The chip includes a programmable logic circuit and / or program instructions, and when the chip is running, the method according to any one of claims 1 to 10 is implemented.
