Data processing method, processing unit, terminal equipment and computer storage medium
By converting the arrangement of statistical data and storing it in different buffers of the target buffer, the problem of complexity of buffer fragmentation management in the prior art is solved, and more efficient data processing and storage is achieved.
Patent Information
- Application Number
- CN202311048812.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, the processing and storage of statistical data requires the creation of different buffers, resulting in an increase in the complexity of buffer fragmentation management.
By converting the arrangement of statistical data, the corresponding new statistical data is generated and stored in different buffers of the target buffer, thereby reducing the complexity of buffer fragmentation management.
It effectively reduces the complexity of buffer fragmentation management, reduces the time spent on multiple copies and communications during data flow, and saves computing power and power consumption.
Smart Images

Figure CN119493811A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to but are not limited to electronic technology, and in particular, to a data processing method, a processing unit, a terminal device, and a computer storage medium. Background Art
[0002] In the related art, it is necessary to process the acquired statistical data to obtain processed statistical data. However, different buffers need to be created to store the acquired statistical data and the processed statistical data, thereby increasing the complexity of buffer fragmentation management. Summary of the invention
[0003] The embodiments of the present application provide a data processing method, a processing unit, a terminal device and a computer storage medium.
[0004] In a first aspect, an embodiment of the present application provides a data processing method, which is applied to a first processing unit, comprising:
[0005] Converting the arrangement of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer;
[0006] Each of the second statistical data is stored in a corresponding second buffer in each of the target buffers.
[0007] In a second aspect, an embodiment of the present application provides a data processing method, which is applied to a second processing unit, including:
[0008] Converting the arrangement of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of the at least one target buffer;
[0009] Each of the fourth statistical data is stored in a corresponding second buffer in each of the target buffers.
[0010] In a third aspect, an embodiment of the present application provides a first processing unit, including:
[0011] A conversion unit, configured to convert an arrangement mode of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer;
[0012] A writing unit is used to store each of the second statistical data into a second buffer in each corresponding target buffer.
[0013] In a fourth aspect, an embodiment of the present application provides a second processing unit, including:
[0014] A conversion unit, configured to convert an arrangement mode of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer;
[0015] A writing unit is used to store each of the fourth statistical data into a corresponding second buffer in each of the target buffers.
[0016] In a fifth aspect, an embodiment of the present application provides a terminal device, including: a first processing unit and a second processing unit;
[0017] The first processing unit is used to: convert the arrangement mode of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer; store each second statistical data in a corresponding second buffer in each target buffer;
[0018] The second processing unit is used to: convert the arrangement method of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to the first buffer stored in each target buffer of at least one target buffer; store each fourth statistical data in the corresponding second buffer in each target buffer.
[0019] In a sixth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the first aspect or the second aspect.
[0020] In an embodiment of the present application, the arrangement of each first statistical data in at least one first statistical data is converted to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to the first buffer stored in each target buffer of at least one target buffer; each second statistical data is stored in the corresponding second buffer in each target buffer. In this way, the arrangement of each first statistical data is converted to obtain each corresponding second statistical data, and each first statistical data and each second statistical data are respectively stored in the first buffer and the second buffer in each corresponding target buffer, thereby reducing the complexity of buffer fragmentation management. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0022] Figure 1 A schematic diagram of an implementation flow of a data processing method provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of an implementation flow of another data processing method provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of the structure of a target buffer provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of an implementation flow of another data processing method provided in an embodiment of the present application;
[0026] Figure 5 A schematic diagram of an implementation flow of another data processing method provided in an embodiment of the present application;
[0027] Figure 6 A schematic diagram of an implementation flow of a data processing method provided in another embodiment of the present application;
[0028] Figure 7 A schematic diagram of an implementation flow of a data processing method provided in yet another embodiment of the present application;
[0029] Figure 8A schematic diagram of a system hardware structure provided in an embodiment of the present application;
[0030] Fig. 9 A schematic diagram of the hardware structure of a 5A statistics module provided in an embodiment of the present application;
[0031] Fig.10 A schematic diagram of 5A statistical data Buffer flow provided in an embodiment of the present application;
[0032] Fig.11 A schematic diagram of a MemTable binding image Buffer provided in an embodiment of the present application;
[0033] Fig.12 A schematic diagram of the composition structure of a first processing unit provided in an embodiment of the present application;
[0034] Fig.13 A schematic diagram of the composition structure of a second processing unit provided in an embodiment of the present application;
[0035] Fig.14 A hardware entity diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solution of the present application will be described in detail below through embodiments and in conjunction with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0037] It should be noted that in the examples of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0038] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict. In the description of the present application, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0039] In the field of camera 3A or camera 5A control, the 3A / 5A algorithm needs to regularly input statistics (also called Statistics) data for calculation along with the frame rate. In addition to flowing to the next level of hardware, the image stream output by each Sensor (also called camera) is also input to the 3A / 5A statistics module. Among them, 5A includes Auto Exposure (AE), Auto Focus (AF), Auto While Balance (AWB), Auto Lens Shading Correction (ALSC) and Auto Anti-Flicker (ATF). Auto Anti-Flicker can also be called automatic prevention of fluorescent flicker. Among them, 3A includes AE, AF and AWB. The 3A / 5A statistics module periodically outputs statistics information (Stats information) according to the sensor frame rate, and writes it to the specified buffer in the double data rate synchronous dynamic random access memory (DDR SDRAM) through the Advanced eXtensible Interface (AXI) bus. Stats information has its special physical function. The main function is that the statistics module divides the image data into m*n blocks, calculates the characteristic parameters through hardware, and outputs them to the software as the basis for control decisions. m is an integer greater than or equal to 1, and n is an integer greater than or equal to 1.
[0040] Regarding the storage and circulation of 3A / 5A statistical data (Stats data, also called Stats information), in the related technology, the HwStats hardware statistical data (also called 3A / 5A statistical data or Stats data) generated by the underlying hardware statistical module (i.e., the 3A / 5A statistical module) is stored in a hardware buffer (HwBuffer) applied for and distributed in advance by the application central processing unit (Application Central Processing Unit, ACPU) / application processor (Application Processor, AP). The user also needs to parse it and store it again in another custom-created software buffer (SwBuffer), and its life cycle is only a few frames.
[0041] In heterogeneous systems, 3A / 5A algorithms are deployed in different locations, resulting in the original data (HwStats hardware statistics) and parsed data (SwStats software statistics) not being stored in the same processor, and the HwBuffer must be returned to the ACPU / AP side in a timely manner for recirculation. The life cycle of Stats data needs to survive longer in some scenarios to cope with further circulation and application, such as data storage and / or post-simulation after capturing (capturing) selected frames (e.g., basic frames and / or auxiliary frames). The post-simulation process includes: determining the adjustment parameter information corresponding to 5A based on the final image obtained (e.g., JPEG photo), and adjusting the original image captured subsequently based on the adjustment parameter information corresponding to 5A.
[0042] In the related art, HwBuffer and SwBuffer resources will occupy shared memory when they are allocated, and the allocated space is strictly limited, which is not conducive to the flow of image data. Therefore, it is necessary to effectively design the Buffer structure to reduce the complexity of fragmented buffer management, frame matching, and communication time consumption of multiple copies and flows.
[0043] In the related art, for 3A / 5A Stats data, different buffers are created for HwStats and SwStats respectively to store, which increases the complexity of multiple buffer fragmentation management. In an embodiment of the present application, a first solution is proposed: a data processing method is proposed, the method comprising: a first processing unit stores each first statistical data in a first buffer in each corresponding target buffer, and stores each second statistical data in a second buffer in each corresponding target buffer, wherein each second statistical data is obtained by converting the arrangement of each first statistical data, and / or, a data processing method is proposed, the method comprising: a second processing unit stores each third statistical data in a first buffer in each corresponding target buffer, and stores each fourth statistical data in a second buffer in each corresponding target buffer, wherein each fourth statistical data is obtained by converting the arrangement of each third statistical data. In some embodiments, the first buffer and the second buffer in the target buffer are obtained by dividing the target buffer.
[0044] In the related art, AE / AF stats are used on both the microcontroller unit (MCU) side and the ACPU / AP application processor computing processing unit side, resulting in the need for AE / AF stats to be parsed once on both sides, and the parsing needs to be repeated 30 / or 60 / or 120 times per second, which increases the computing power consumption and power consumption. In the embodiment of the present application, a second scheme is proposed: a data processing method is proposed, the method comprising: a first processing unit sends a return message of each target buffer corresponding to each first statistical data to a second processing unit, and a return message of each target buffer corresponding to each third statistical data in at least one third statistical data; wherein, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data. In this way, the second processing unit converts the arrangement mode of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data, and stores each fourth statistical data in the corresponding second buffer in each target buffer. Thus, the first processing unit parses each first statistical data, and the second processing unit parses each third statistical data. Each first statistical data does not need to be parsed again in the second processing unit, thereby reducing calculation example consumption and power consumption.
[0045] In the related art, after the buffer is released in time, it is necessary to rely on another arrangement method to continue the subsequent life cycle of the stats data bound to the image data. In the embodiment of the present application, a third scheme and / or a fourth scheme are proposed. Under the third scheme, a data processing method is proposed, the method comprising: when the number of multiple specific buffers in each buffer pool is greater than or equal to the first number, clear the data in the specific buffer that first stores data in the multiple specific buffers; the specific buffer is an occupied buffer, and in each of the specific buffers, the first storage area stores each target statistical data correspondingly, and the second storage area stores the corresponding conversion data after converting each target statistical data. Under the fourth scheme, a data processing method is proposed, the method comprising: storing at least one conversion data obtained each time in an unoccupied storage unit in a memory table (MemTable); the at least one conversion data is obtained by converting the arrangement method of the at least one target statistical data respectively; when the number of occupied storage units in the memory table is greater than or equal to the second number, clear the conversion data in the first occupied storage unit.
[0046] It should be noted that each of the above-mentioned first solution, second solution, third solution and fourth solution can be implemented independently, or any multiple solutions can be combined.
[0047] The following is based on the first solution and combined with other solutions to illustrate the data processing method in the embodiment of the present application. In other embodiments, the data processing method in the embodiment of the present application can be implemented based on the second solution, the third solution, or the fourth solution and combined with other solutions, and the present application does not limit this.
[0048] The terminal device in this application can be called user equipment (UE), mobile station (MS), mobile terminal (MT), electronic device, user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. The terminal device in any embodiment of the present application may include one of the following or a combination of at least two of them: Internet of Things (IoT) devices, satellite terminals, wireless local loop (WLL) stations, personal digital assistants (PDA), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, servers, mobile phones, tablet computers (Pad), computers with wireless transceiver functions, handheld computers, desktop computers, personal digital assistants, portable media players, smart speakers, navigation devices, smart watches, smart glasses, smart necklaces and other wearable devices, learning machines, translation pens, translation machines, point reading machines, pedometers, digital TVs, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, and wireless terminals in smart cities. The wireless terminals in the Internet of Vehicles (IoV) system include wireless terminals in smart cities, wireless terminals in smart homes, and vehicles, on-board equipment, on-board modules, wireless modems, handheld devices, customer premise equipment (CPE), smart home appliances, etc. in the IoV system.
[0049] The first processing unit and the second processing unit in the present application may be included in a terminal device.
[0050] In some embodiments, the first processing unit may include a microcontroller unit (MCU). In some embodiments, the second processing unit may include an application processor computing processing unit (ACPU) or an application processor (AP).
[0051] Figure 1 A schematic diagram of the implementation flow of a data processing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method is applied to a first processing unit, and the method includes:
[0052] S101. Convert the arrangement of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer.
[0053] In some embodiments, at least one first statistical data may include one or two first statistical data. For example, one or two first statistical data may be AE statistical data and / or AF statistical data. In some embodiments, one first statistical data may be statistical data corresponding to one captured image. In other embodiments, one first statistical data may be statistical data corresponding to multiple captured images.
[0054] In some embodiments, the data content of each first statistical data is the same as that of each corresponding second statistical data, or the data content of each first statistical data is part of the data content of each corresponding second statistical data. In some embodiments, the data arrangement of each first statistical data is different from that of each corresponding second statistical data.
[0055] In some embodiments, a captured image may be divided into m*n blocks, and each block may be processed in at least one dimension to obtain at least one first statistical data corresponding to at least one dimension. Optionally, m and / or n corresponding to different first statistical data may be the same or different. For example, a captured image may be divided into m1*n1 blocks, and each block may be processed by an AE statistical module to obtain AE statistical data, wherein the AE statistical data includes sub-AE statistical data corresponding to the m1*n1 blocks. For example, a captured image may be divided into m2*n2 blocks, and each block may be processed by an AF statistical module to obtain AF statistical data, wherein the AF statistical data includes sub-AF statistical data corresponding to the m2*n2 blocks. Among them, m1 and m2 may be the same or different, and n1 and n2 may be the same or different.
[0056] In some embodiments, each first statistical data includes one or more parameter values. In some embodiments, the one or more parameter values included in each first statistical data are arranged continuously, so that the one or more parameter values included in each first statistical data are stored continuously in the first buffer in each corresponding target buffer, and the storage size of each of the one or more parameter values may be 2N or not 2N, where N is an integer greater than or equal to 1, which makes it difficult to read the one or more parameter values included in each first statistical data. For example, each first statistical data includes m*n sub-statistical data, and each sub-statistical data includes at least one parameter value. In some embodiments, different parameter values may represent different meanings. For example, a sub-AE statistical data includes at least one parameter value. For example, a sub-AF statistical data includes at least one parameter value.
[0057] In some embodiments, converting the arrangement of each first statistical data may include: converting one or more parameter values included in each first statistical data from a continuous arrangement to a non-continuous arrangement, and obtaining corresponding second statistical data including one or more parameter values of a non-continuous arrangement. In some embodiments, the storage size corresponding to each parameter value of the one or more parameter values included in each second statistical data is 2N. In some embodiments, 2N may be a non-fixed value, and different parameter values may correspond to the same or different 2N. For example, 2N may be greater than or equal to the storage size of each parameter value (i.e., the number of storage units, the storage units in this application may include one of the following: bits, bytes, characters), and the difference between 2N and the storage size of each parameter value is the smallest. For example, if there is a parameter value of 3, the storage size corresponding to the parameter value is 4. For another example, if there is a parameter value of 6, the storage size corresponding to the parameter value is 8. For another example, if there is a parameter value of 7, the storage size corresponding to the parameter value is 8. In other embodiments, 2N may be a fixed value, and different parameter values may correspond to the same 2N. For example, 2N may be greater than or equal to the target storage size, and the difference between 2N and the target storage size is the smallest, and the target storage size is the largest storage size among the storage sizes in one or more parameter values. For example, if the target storage size is 32, if there is a parameter value of 3, the storage size corresponding to the parameter value is 32; if there is a parameter value of 8, the storage size corresponding to the parameter value is 32.
[0058] In some embodiments, at least one target statistical data may include at least one of the following: AE statistical data, AF statistical data, AWB statistical data, ALSC statistical data, ATF statistical data. In some embodiments, at least one target buffer includes at least one of the following: a buffer corresponding to AE, a buffer corresponding to AF, a buffer corresponding to AWB, a buffer corresponding to ALSC, and a buffer corresponding to ATF. In some embodiments, each target statistical data, corresponding to the first buffer stored in each target buffer, may include at least one of the following: AE statistical data corresponds to the first buffer stored in the buffer corresponding to AE, AF statistical data corresponds to the first buffer stored in the buffer corresponding to AF, AWB statistical data corresponds to the first buffer stored in the buffer corresponding to AWB, ALSC statistical data corresponds to the first buffer stored in the buffer corresponding to ALSC, and ATF statistical data corresponds to the first buffer stored in the buffer corresponding to ATF.
[0059] It should be noted that the present application takes 5A statistical data as an example. In other embodiments, the present application can also be applied to 3A statistical data. The implementation method of 3A statistical data is similar to that of 5A statistical data, and the embodiments of the present application will not elaborate on this.
[0060] In some embodiments, after converting the arrangement of each first statistical data in the at least one first statistical data, at least one second statistical data is obtained. In some embodiments, the at least one second statistical data may include at least one of the following: AE conversion data, AF conversion data.
[0061] In some embodiments, in each target buffer, the storage size of each row is the same, and the offset of the starting address of the next row compared to the starting address of the previous row is a fixed offset. In other embodiments, each target buffer may be a continuous buffer.
[0062] In some embodiments, the cache sizes of the target buffers corresponding to different target statistical data are the same or different.
[0063] In some embodiments, converting the arrangement of each first statistical data to obtain each corresponding second statistical data may include or be replaced by: parsing each first statistical data to obtain each corresponding second statistical data.
[0064] S102: Store each of the second statistical data into a corresponding second buffer in each of the target buffers.
[0065] In this way, since one or more parameter values in each second statistical data are arranged non-continuously, and in the second buffer in each corresponding target buffer, the storage size corresponding to each parameter value is 2N, it is convenient to read each second statistical data or each parameter value in the second statistical data stored in the second buffer in each target buffer.
[0066] In some embodiments, storing each of the second statistical data into a second buffer in the corresponding each of the target buffers may include at least one of the following: storing each AE conversion data into a second buffer in the corresponding AE corresponding buffer, storing each AF conversion data into a second buffer in the corresponding AF corresponding buffer.
[0067] In an embodiment of the present application, the arrangement of each first statistical data in at least one first statistical data is converted to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to the first buffer stored in each target buffer of at least one target buffer; each second statistical data is stored in the corresponding second buffer in each target buffer. In this way, the arrangement of each first statistical data is converted to obtain each corresponding second statistical data, and each first statistical data and each second statistical data are respectively stored in the first buffer and the second buffer in each corresponding target buffer, thereby reducing the complexity of buffer fragmentation management.
[0068] Figure 2 A schematic diagram of the implementation flow of another data processing method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method is applied to a first processing unit, and the method includes:
[0069] S201, split each target buffer into multiple sub-areas; the multiple sub-areas include: a first buffer and a second buffer, the second buffer is used to store converted data after converting the arrangement of the data in the first buffer.
[0070] In some embodiments, the storage size of the second buffer may be larger than the storage size of the first buffer.
[0071] In some embodiments, the conversion data stored in the second buffer is used to determine configuration information for adjusting the image, so that the ISP adjusts the subsequently captured images according to the configuration information.
[0072] In some embodiments, converting the arrangement of the data in the first buffer to obtain converted data may include or be replaced by: parsing the data in the first buffer to obtain converted data.
[0073] In any embodiment of the present application, the conversion data, unless otherwise specified, may include at least one of the following: AE conversion data, AF conversion data, AWB conversion data, ALSC statistical data, and ATF statistical data.
[0074] In some embodiments, if the data in the first buffer is AE statistical data, the corresponding conversion data is AE conversion data. In some embodiments, if the data in the first buffer is AF statistical data, the corresponding conversion data is AF conversion data. In some embodiments, if the data in the first buffer is AWB statistical data, the corresponding conversion data is AWB conversion data. In some embodiments, if the data in the first buffer is ALSC statistical data, the corresponding conversion data is ALSC conversion data. In some embodiments, if the data in the first buffer is ATF statistical data, the corresponding conversion data is ATF conversion data.
[0075] S202. Store each target statistical data in at least one target statistical data into a first buffer zone in each corresponding target buffer zone; the at least one target statistical data includes the at least one first statistical data.
[0076] In some embodiments, storing each target statistical data in a first buffer in each corresponding target buffer may include: storing each target statistical data continuously in the first buffer in each corresponding target buffer, so that in the first buffer in each target buffer, there is no storage gap between different parameter values in one or more parameter values in each corresponding stored target statistical data.
[0077] S203. Convert the arrangement of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer.
[0078] S204: Store each of the second statistical data into a corresponding second buffer in each of the target buffers.
[0079] In some embodiments, the multiple sub-areas in each target buffer include a header area, the first buffer, an isolation area and the second buffer which are arranged in sequence; wherein the header area is used to store at least one of the following: a type identifier of each target statistical data corresponding to each target buffer, address information of the data in the first buffer, size information of the data in the first buffer, address information of the isolation area, size information of the isolation area, address information of the data in the second buffer, and size information of the data in the second buffer; the isolation area is used to isolate the data in the first buffer from the data in the second buffer.
[0080] Figure 3A schematic diagram of the structure of a target buffer provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the target buffer (also called Stats Buffer) can be split so that the target buffer includes a header area (Header area), the first buffer (also called HwStats area), an isolation area (also called a security isolation area) and the second buffer (also called SwStats area) which are arranged in sequence.
[0081] In some embodiments, the target buffer (also called Stats Buffer) may be dynamically split, so that different target buffers may have different or the same splitting methods, and different splitting methods may have different sizes of the first buffer and / or different sizes of the second buffer.
[0082] In some embodiments, the 5A multiple types of Stats Buffers distributed in advance are dynamically split into two structured storage areas, and the hardware HwStats data and the parsed SwStats data are stored in a time-sharing manner in combination with the heterogeneous system algorithm deployment strategy.
[0083] The Stats Buffer is distributed by the Camera Hardware Abstract Layer (HAL) on the ACPU / AP side to the underlying MCU. The MCU splits the Buffer into the Header area, HwStats area, security isolation area, and SwStats area. The writing of data in the HwStats area and the SwStats area will act on different processors and occur at different times.
[0084] Header area: used to identify the type of stats stored, HwStats area address and data size, SwStats area address and data size, etc.
[0085] HwStats area: Under the control of the MCU, the 5A statistics module generates raw statistical information and moves it to the HwStats area through DMA.
[0086] Security isolation area: used for security isolation to prevent trampling during data access, for example, the size is 256 bytes.
[0087] SwStats area: used to store parsed stats data, which can be input into algorithms or other business use.
[0088] Figure 4 A schematic diagram of an implementation flow of another data processing method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the method is applied to a first processing unit, and the method includes:
[0089] S401. Convert the arrangement of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer.
[0090] S402: Store each of the second statistical data into a second buffer in each corresponding target buffer.
[0091] S403: Send a return message of each target buffer corresponding to each first statistical data and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data to the second processing unit.
[0092] Among them, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
[0093] In any embodiment of the present application, the return message may include an interrupt message. In some other embodiments, the return message may include at least one of the following: address information and / or size information of each target buffer.
[0094] In any embodiment of the present application, the address information may include starting address information and / or offset address information relative to a certain address.
[0095] In some embodiments, the at least one first statistical data includes at least one of the following: automatic exposure statistical data, automatic focus statistical data.
[0096] In some embodiments, the at least one third statistical data includes at least one of the following: automatic white balance statistical data, automatic lens shading correction statistical data, automatic anti-flicker statistical data.
[0097] In some embodiments, the method further includes: receiving the address information and / or size information of each target buffer sent by the second processing unit. For example, before converting the arrangement of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data, the method further includes: receiving the address information and / or size information of each target buffer sent by the second processing unit.
[0098] In some embodiments, the first processing unit receives address information and / or size information of each target buffer, so that the first processing unit can obtain each target buffer.
[0099] Figure 5 A schematic diagram of the implementation flow of another data processing method provided in the embodiment of the present application is as follows: Figure 5 As shown, the method is applied to the second processing unit, and the method includes:
[0100] S501. Convert the arrangement of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer.
[0101] In some embodiments, at least one third statistical data may include one, two, or three third statistical data. For example, one, two, or three third statistical data may be at least one of the following: AWB statistical data, ALSC statistical data, ATF statistical data. In some embodiments, one third statistical data may be statistical data corresponding to one captured image. In other embodiments, one third statistical data may be statistical data corresponding to multiple captured images.
[0102] In some embodiments, the data content of each third statistical data is the same as that of each corresponding fourth statistical data, or the data content of each third statistical data is part of the data content of each corresponding fourth statistical data. In some embodiments, the data arrangement of each third statistical data is different from that of each corresponding fourth statistical data.
[0103] In some embodiments, a captured image may be divided into m*n blocks, and each block may be processed in at least one dimension to obtain at least one third statistical data corresponding to at least one dimension. Optionally, m and / or n corresponding to different third statistical data are the same or different. For example, a captured image may be divided into m3*n3 blocks, and each block may be processed by an AWB statistical module to obtain AWB statistical data, wherein the AWB statistical data includes sub-AWB statistical data corresponding to m3*n3 blocks. For example, a captured image may be divided into m4*n4 blocks, and each block may be processed by an ALSC statistical module to obtain ALSC statistical data, wherein the ALSC statistical data includes sub-ALSC statistical data corresponding to m4*n4 blocks. For example, a captured image may be divided into m5*n5 blocks, and each block may be processed by an ATF statistical module to obtain ATF statistical data, wherein the ATF statistical data includes sub-ATF statistical data corresponding to m5*n5 blocks. In some embodiments, any two of m1 to m5 are different or at least two are the same. In some embodiments, any two of n1 to n5 are different or at least two are the same.
[0104] In some embodiments, each third statistical data includes one or more parameter values. In some embodiments, the one or more parameter values included in each third statistical data are arranged continuously, so that the one or more parameter values included in each third statistical data are continuously stored in the first buffer of each corresponding target buffer, and the storage size of each of the one or more parameter values can be 2N or not 2N, N is an integer greater than or equal to 1, which makes it difficult to read the one or more parameter values included in each third statistical data. For example, each third statistical data includes m*n sub-statistical data, and each sub-statistical data includes at least one parameter value. In some embodiments, different parameter values can represent different meanings. For example, a sub-AWB statistical data includes at least one parameter value. For example, a sub-ALSC statistical data includes at least one parameter value. For example, a sub-ATF statistical data includes at least one parameter value.
[0105] In some embodiments, converting the arrangement of each third statistical data may include: converting one or more parameter values included in each third statistical data from a continuous arrangement to a discontinuous arrangement, and obtaining corresponding fourth statistical data including one or more parameter values of a discontinuous arrangement. In some embodiments, the storage size corresponding to each parameter value of the one or more parameter values included in each fourth statistical data is 2N. In some embodiments, 2N may be a non-fixed value, and different parameter values may correspond to the same or different 2N. For example, 2N may be greater than or equal to the storage size of each parameter value (i.e., the number of storage units, the storage units in this application may include one of the following: bits, bytes, characters), and the difference between 2N and the storage size of each parameter value is the smallest. For example, if there is a parameter value of 3, the storage size corresponding to the parameter value is 4. For another example, if there is a parameter value of 6, the storage size corresponding to the parameter value is 8. For another example, if there is a parameter value of 7, the storage size corresponding to the parameter value is 8. In other embodiments, 2N may be a fixed value, and different parameter values may correspond to the same 2N. For example, 2N may be greater than or equal to the target storage size, and the difference between 2N and the target storage size is the smallest, and the target storage size is the largest storage size among the storage sizes in one or more parameter values. For example, if the target storage size is 32, if there is a parameter value of 3, the storage size corresponding to the parameter value is 32; if there is a parameter value of 8, the storage size corresponding to the parameter value is 32.
[0106] In some embodiments, after converting the arrangement of each third statistical data in the at least one third statistical data, at least one fourth statistical data is obtained. In some embodiments, the at least one fourth statistical data may include at least one of the following: AWB conversion data, ALSC conversion data, ATF conversion data.
[0107] In some embodiments, converting the arrangement of each third statistical data to obtain each corresponding fourth statistical data may include or be replaced by: parsing each third statistical data to obtain each corresponding fourth statistical data.
[0108] S502: Store each fourth statistical data into a corresponding second buffer in each target buffer.
[0109] In this way, since one or more parameter values in each fourth statistical data are arranged non-continuously, and in the corresponding second buffer in each target buffer, the storage size corresponding to each parameter value is 2N, it is convenient to read each fourth statistical data or each parameter value in the fourth statistical data stored correspondingly in the second buffer in each target buffer.
[0110] In some embodiments, storing each of the fourth statistical data into the second buffer in the corresponding each of the target buffers may include at least one of the following: storing each AWB conversion data into the second buffer in the corresponding buffer corresponding to the AWB, storing each ALSC conversion data into the second buffer in the corresponding buffer corresponding to the ALSC, and storing each ATF conversion data into the second buffer in the corresponding buffer corresponding to the ATF.
[0111] In some embodiments, the multiple sub-areas in each target buffer include a header area, the first buffer, an isolation area and the second buffer which are arranged in sequence; wherein the header area is used to store at least one of the following: a type identifier of each target statistical data corresponding to each target buffer, address information of the data in the first buffer, size information of the data in the first buffer, address information of the isolation area, size information of the isolation area, address information of the data in the second buffer, and size information of the data in the second buffer; the isolation area is used to isolate the data in the first buffer from the data in the second buffer.
[0112] Figure 6 A schematic diagram of an implementation flow of a data processing method provided in another embodiment of the present application is shown as follows: Figure 6 As shown, the method is applied to the second processing unit, and the method includes:
[0113] S601: Receive a return message for each target buffer corresponding to each first statistical data sent by a first processing unit, and a return message for each target buffer corresponding to each third statistical data in the at least one third statistical data.
[0114] Among them, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
[0115] S602. Convert the arrangement of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer.
[0116] S603: Store each fourth statistical data into a corresponding second buffer in each target buffer.
[0117] In some embodiments, the at least one first statistical data includes at least one of the following: automatic exposure statistical data, automatic focus statistical data.
[0118] In some embodiments, the at least one third statistical data includes at least one of the following: automatic white balance statistical data, automatic lens shading correction statistical data, automatic anti-flicker statistical data.
[0119] In some embodiments, the method further includes: sending the address information and / or size information of each target buffer to the first processing unit. For example, before converting the arrangement of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data, the method further includes: sending the address information and / or size information of each target buffer to the first processing unit.
[0120] In some embodiments, the method further includes: creating each buffer pool corresponding to each target statistical data; each buffer pool includes multiple buffers, and different buffers in the multiple buffers in each buffer pool are used to store data determined according to images taken at different times; the target buffer is one of the multiple buffers; and every preset time, the next unoccupied buffer in each buffer pool is determined as each target buffer. In some embodiments, this step can be performed before sending the address information and / or size information of each target buffer to the first processing unit.
[0121] In some embodiments, creating each buffer pool corresponding to each target statistical data may include at least one of the following: creating each buffer pool corresponding to AE statistical data, creating each buffer pool corresponding to AF statistical data, creating each buffer pool corresponding to AWB statistical data, creating each buffer pool corresponding to ALSC statistical data, and creating each buffer pool corresponding to ATF statistical data.
[0122] In some embodiments, the numbers of buffers in the buffer pool corresponding to different target statistics are the same or different.
[0123] In some embodiments, one of the multiple buffers in each buffer pool is used to store data determined based on a frame of image. In other embodiments, one of the multiple buffers is used to store data determined based on multiple frames of image. In any embodiment of the present application, a frame of image may include one image or multiple images. For example, a frame may include one image. For another example, a frame of image may include two images, and the exposure times of the two images are different. For another example, a frame of image may include three images, and the exposure times of the three images are different, and so on. The embodiments of the present application do not list them one by one. In any embodiment of the present application, an image may be an image taken by one camera, or an image may be an image taken by multiple cameras.
[0124] In some embodiments, the preset duration may be the interval duration between each image capture by the terminal device. For example, if the interval duration between each image capture by the terminal device is 33.33 ms, the preset duration is 33.33 ms. For another example, if the terminal device captures images at a frame rate of 30, the preset duration is 33.33 ms.
[0125] In some embodiments, when the camera application is opened, the second processor determines the first unoccupied buffer in each buffer pool as the target buffer. In other embodiments, when the capture button in the camera application is triggered, the second processor determines the first unoccupied buffer in each buffer pool as the target buffer. Afterwards, the next unoccupied buffer in each buffer pool is determined as each target buffer at a preset time interval, so that the second processor can continuously dispatch target buffers to the first processor.
[0126] In some embodiments, the method further includes: when the number of multiple specific buffers in each buffer pool is greater than or equal to a first number, clearing data in a specific buffer that first stores data among the multiple specific buffers; the specific buffer is an occupied buffer, and in each of the specific buffers, the first storage area stores each target statistical data correspondingly, and the second storage area stores corresponding converted data after converting each target statistical data.
[0127] In some embodiments, the first number may be an integer greater than or equal to 2. Exemplarily, the first number may be 2, 3, 4, 5, 10 or 20, etc. In some embodiments, different target statistical data correspond to different buffer pools, and the first numbers corresponding to different buffer pools may be the same or different.
[0128] In some embodiments, when clearing data in a specific buffer that first stores data among the multiple specific buffers, it is also possible to mark the state of the specific buffer that first stores data as unoccupied.
[0129] For example, the first processing unit continuously receives at least one target buffer sent by the second processing unit, and the first processing unit also continuously sends a return message of each target buffer corresponding to each first statistical data, and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data to the second processing unit, so that the second processing unit continuously obtains at least one specific buffer corresponding to at least one target buffer, and the at least one specific buffer is distributed in at least one buffer pool. For any buffer pool, if the number of specific buffers is greater than or equal to the first number, the data in the specific buffer that first stores data among the multiple specific buffers is cleared.
[0130] In some embodiments, the method further includes: storing at least one conversion data obtained each time in an unoccupied storage unit in a memory table; the at least one conversion data is obtained by converting the arrangement method of the at least one target statistical data; when the number of occupied storage units in the memory table is greater than or equal to a second number, clearing the conversion data in the first occupied storage unit.
[0131] In some embodiments, the second number may be an integer greater than the first number. For example, the second number may be 5, 8, 10, 20, 40 or 60, etc. For example, the second number may be 8 to 20.
[0132] In some embodiments, when the conversion data in the storage unit that is occupied first is cleared, the state of the storage unit that is occupied first may also be marked as unoccupied.
[0133] For example, the first processing unit continuously receives at least one target buffer sent by the second processing unit, and the first processing unit also continuously sends a return message of each target buffer corresponding to each first statistical data, and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data to the second processing unit, so that the second processing unit continuously obtains at least one specific buffer corresponding to at least one target buffer. In this way, the second processing unit can continuously store the conversion data stored in the second storage area of at least one specific buffer to an unoccupied storage unit.
[0134] In some embodiments, the number of images corresponding to the data in one target buffer / one of the multiple buffers in each buffer pool is the same as the number of images corresponding to the data in one storage unit. For example, in some embodiments, the data in one target buffer / one of the multiple buffers in each buffer pool corresponds to one image, and the data in one storage unit corresponds to one image. For another example, in some embodiments, the data in one target buffer / one of the multiple buffers in each buffer pool corresponds to Q images, and the data in one storage unit corresponds to Q images. Q is an integer greater than or equal to 2.
[0135] Figure 7 A schematic diagram of a data processing method implementation flow provided in another embodiment of the present application is as follows: Figure 7 As shown, the method includes:
[0136] S701. The second processing unit creates each buffer pool corresponding to each target statistical data; each buffer pool includes multiple buffers, and every preset time period, the next unoccupied buffer of each buffer pool is determined as each target buffer.
[0137] In some embodiments, data stored in different buffers among the multiple buffers in each buffer pool is determined according to images captured at different times; and the target buffer is one of the multiple buffers.
[0138] S702: The second processing unit sends the address information and / or size information of each target buffer to the first processing unit.
[0139] S703: The first processing unit divides each target buffer into multiple sub-areas; the multiple sub-areas include: a first buffer and a second buffer.
[0140] In some embodiments, the multiple sub-areas in each target buffer include a header area, the first buffer area, an isolation area, and the second buffer area which are arranged in sequence.
[0141] S704: The first processing unit sends a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data to the second processing unit.
[0142] In some embodiments, in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
[0143] S705: The first processing unit converts the arrangement of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data.
[0144] In some embodiments, S704 may be executed before S705, or S704 may be executed after S705, or S704 and S705 may be executed in parallel.
[0145] S706: The first processing unit stores each of the second statistical data into a second buffer in each corresponding target buffer.
[0146] S707: The first processing unit sends a return message of each target buffer corresponding to each first statistical data to the second processing unit.
[0147] In some embodiments, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data.
[0148] S708: The second processing unit converts the arrangement of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data.
[0149] S709: The second processing unit stores each of the fourth statistical data into a corresponding second buffer in each of the target buffers.
[0150] S710: When the number of the multiple specific buffers in each buffer pool is greater than or equal to the first number, the second processing unit clears data in a specific buffer that first stores data in the multiple specific buffers.
[0151] S711. The second processing unit stores at least one conversion data obtained each time into an unoccupied storage unit in the memory table.
[0152] S712: When the number of occupied storage units in the memory table is greater than or equal to the second number, the second processing unit clears the conversion data in the storage unit that is occupied first.
[0153] This application proposes a Camera 5A statistical data flow solution based on a heterogeneous platform. The main ideas include the following: (1) When data (such as images) are generated, the 5A multiple types of StatsBuffers distributed in advance are dynamically split into two structured storage areas (corresponding to the first storage area and the second storage area mentioned above) according to the data size, and the hardware HwStats data (stored in the first storage area) and the parsed SwStats data (stored in the second storage area) are stored in a time-sharing manner in combination with the heterogeneous system algorithm deployment strategy corresponding to the heterogeneous platform, so as to reduce the complexity of fragmented buffer management, frame matching, and the communication time consumption of multiple copies and flows during use. Among them, frame matching means the match between the image and the buffer (that is, the match between the image and the target buffer) (2) The cross-system acquisition and short-term maintenance of the life cycle of Stats data are realized through the Stats Buffer flow mechanism, and the structured "MemTable" is used to bind the image buffer to further extend the life cycle of Stats data for post-processing and storage, so as to facilitate the further flow of data.
[0154] Figure 8 A schematic diagram of a system hardware structure provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the system in this application is a heterogeneous system. In the heterogeneous system, an MCU core is added to the camera system (Camera-Sys). The MCU core can directly interact with the image signal processor (Image Signal Processing, ISP) hardware. The MCU undertakes part of the AP core control work on the ISP in the related technology. Among them, the performance of the MCU core is lower than that of the AP core.
[0155] Under the overall control of the ACPU / AP computing processing unit in the AP system (AP-Sys), the ISP image signal hardware processing system is controlled by the MCU. In the heterogeneous system of this application, combined with the deployment of the 5A algorithm, the control of AE / AF is sunk to the MCU side, and the AE / AF algorithm operation produces results; algorithms such as AWB / ALSC / ATF are deployed on the ACPU / AP side. The MCU and ACPU / AP interact through inter-core communication, which specifically depends on the Mailbox hardware module.
[0156] In the ISP unit, the preprocessed image is processed by the front end (FE), middle end (ME) and back end (BE). In FE, the image stream output by each sensor not only flows to the next level of hardware, but also inputs into the 5A statistical unit. Among them, FE is used to preprocess the image, ME is used to perform at least one of the following processing on the image, such as noise reduction, scaling, magnification, format conversion, and rotation, and BE is used to perform at least one of the following processing on the image, such as face optimization, beauty, and portrait optimization.
[0157] In AP-Sys, in addition to the ACPU / AP module, it can also include at least one of the following modules: a clock module, a DDR module, a power module, a cache module, etc.
[0158] 5A Stats statistical data is the core input data of the 5A algorithm operation and is generated by the hardware statistics module related to the underlying hardware ISP system (i.e., the 5A statistics unit).
[0159] In some embodiments, the MCU can communicate with the ISP unit via AXI. In some embodiments, the MCU, Mailbox, and ACPU can communicate with AXI.
[0160] Fig. 9 A hardware structure diagram of a 5A statistics module provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the front end (FE) inside the ISP hardware of the mobile phone chip is used to receive and process digital signals (also called preprocessed images / original images) from the Camera Sensor (also called camera). Among them, Raw-m represents the mth preprocessed image / original image. Among them, FE0, FE1, FEn, etc., respectively correspond to image data generated by the Camera Sensor generated by different channels. Exemplarily, FE0, FE1, and FEn include a digital gain (Digital gain, DG) unit, a lens shading correction (Lens Shading Correction, LSC) unit, etc., and may also include other units, which are not listed one by one in this application.
[0161] In the early stage, the image stream output by each sensor not only flows to the next level of hardware, but also inputs into the 5A statistics module, which includes AE, AF, AWB, ALSC, and Anti-flicker statistics modules. The number of different statistics modules in the 5A statistics module can be the same or different. For example, the 5A statistics module includes N1 Anti-flicker statistics modules, N2 ALSC statistics modules, N3 AWB statistics modules, N4 AE statistics modules, and N5 AF statistics modules. Among them, any two of N1 to N5 can be the same or different, and any one of N1 to N5 is an integer greater than or equal to 1.
[0162] The 5A statistics module periodically outputs Stats statistics information according to the sensor frame rate (so that each image has corresponding 5A statistics information), and writes it to the specified buffer in DDR SDRAM through the AXI bus (for example, 256 bits of statistics are written each time). Stats information has its special physical function, mainly that the 5A statistics module divides the image data into m*n blocks, calculates the characteristic parameters (i.e. HwStats) through hardware, and outputs them to provide them to the software as the basis for control decisions.
[0163] In this heterogeneous system, the 5A statistical module generates raw statistical data (HwStats, i.e., 5A statistical data, corresponding to the target statistical data in the above embodiment). Algorithms such as AE and AF are deployed on the MCU side. The AE and AF statistical modules generate raw statistical data (HwStats), which are stored in the distributed Buffer and first used by the MCU side. After the Buffer is used, it is reported back to the ACPU / AP side. Algorithms such as AWB, ALSC, and ATF are deployed on the ACPU / AP side. The Buffer storing the raw statistical data is reported to the ACPU / AP side as soon as possible for use by related algorithms.
[0164] Since the original statistical data (HwStats, corresponding to the above-mentioned target statistical data) needs to be parsed (to obtain the above-mentioned conversion data), it needs to circulate, cache, and be used multiple times along with the business, and factors such as life cycle and storage efficiency need to be considered.
[0165] Fig.10 A schematic diagram of a 5A statistical data buffer flow provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, it includes the following steps:
[0166] Step 1: ACPU / AP (corresponding to the second processing unit mentioned above) creates a corresponding buffer pool (Buffer Pool) for each stats of 5A (for example, AE-Stats Buffer Pool, AF-Stats Buffer Pool, AWB-StatsBuffer Pool, ALSC-Stats Buffer Pool, ATF-Stats Buffer Pool), obtains the buffer from it and distributes it, which is dedicated to the caching and circulation of subsequent stats data.
[0167] In some embodiments, each Buffer Pool includes multiple Buffers, and different buffer sizes in the multiple Buffers are calculated according to the amount of data (eg, the number of images or the image frame rate).
[0168] Step 2: ACPU / AP takes out an idle buffer from the Buffer Pool corresponding to 5A respectively and sends the Stats Buffer (such as physical address information and size) of 5A to the underlying MCU side for use along with the camera request process.
[0169] In some embodiments, the buffer sent down is displayed as occupied on the Buffer Pool side and cannot be preempted temporarily until it is returned. This buffer is used by the MCU side to store data.
[0170] In some embodiments, through the Camera Request process, the camera of the terminal device continuously outputs raw images (also called unprocessed images or RAW images).
[0171] like Fig.10 As shown, the ACPU / AP sends to the MCU: the buffer corresponding to AE, the buffer corresponding to AF, the buffer corresponding to AWB, the buffer corresponding to ALSC, and the buffer corresponding to ATF.
[0172] Step 3: Under the control of the bottom MCU, when data is generated, the 5A StatsBuffer of multiple types dispatched by the ACPU / AP is opened up into two storage locations, HwStats and SwStats, and the Header information is marked and the safety isolation is done (corresponding to the above-mentioned safety isolation area). As each frame of RAW image is generated, the bottom 5A Statistics statistical module generates 5AHwStats raw statistical data and transfers it to the HwStats part of the Stats Buffer through DMA. In addition, after AWBStats, ALSC Stats, and ATF Stats are stored, the Buffer is directly reported to the ACPU / AP side through message communication.
[0173] like Fig.10 As shown, the MCU opens up two storage locations, HwStats and SwStats, for the Buffer corresponding to AE (corresponding to the first buffer and the second buffer mentioned above, respectively), opens up two storage locations, HwStats and SwStats, for the Buffer corresponding to AF, opens up two storage locations, HwStats and SwStats, for the Buffer corresponding to AWB, opens up two storage locations, HwStats and SwStats, for the Buffer corresponding to ALSC, and opens up two storage locations, HwStats and SwStats, for the Buffer corresponding to ATF.
[0174] In this way, the two storage locations HwStats and SwStats opened up reduce the complexity of managing multiple buffer fragments, reduce the time spent on multiple copies during data flow, and control the life of stats data in the short term.
[0175] In some embodiments, AWB, ALSC, and ATF Stats analysis and application are deployed on the ACPU / AP side, so after the original statistical information is stored (i.e., after AWB, ALSC, and ATF Stats are stored), the Buffer is directly reported to the ACPU / AP side through message communication.
[0176] Step 4: The bottom MCU directly parses the HwStats in the AE / AF Stats Buffer into SwStats and caches it in the SwStats part of the Stats Buffer for direct use by the AE / AF algorithm. After the SwStats data is used, the Buffer is directly returned to the ACPU / AP side.
[0177] Step 5: For the buffers storing AWB / ALSC / ATF, ACPU / AP parses HwStats into SwStats and stores them in the SwStats area. For the 5A Stats Buffer, each buffers M buffers as a circular queue to briefly maintain the life cycle of HwStats. When the number of buffers in the queue exceeds M, ACPU / AP removes the earliest buffer in the queue and returns it to the Buffer Pool for subsequent distribution and rotation. At the same time, ACPU / AP writes 5ASwStats data into the Mem Table, further extending the life cycle of SwStats data.
[0178] In some embodiments, M may be an integer greater than or equal to 2. For example, M is equal to 2, 3, 4, 5, 10, or 20, etc.
[0179] In the embodiment of the present application, for AE statistical information or AF statistical information (i.e., the first statistical information corresponding to AE or AF or the target statistical information corresponding to AE or AF), the MCU stores the AE statistical information in HwStats (i.e., the first buffer) corresponding to AE, stores the AF statistical information in HwStats corresponding to AF, stores the AWB statistical information in HwStats corresponding to AWB, stores the ALSC statistical information in HwStats corresponding to ALSC, and stores the ATF statistical information in HwStats corresponding to ATF. The MCU reports the Buffer corresponding to AWB, ALSC, and ATF.
[0180] The MCU stores the converted data after parsing the AE statistical information (i.e., the SwStats corresponding to AE) in the SwStats area (the second buffer), and stores the converted data after parsing the AF statistical information (i.e., the SwStats corresponding to AF) in the SwStats area, and then reports the Buffers corresponding to AE and AF.
[0181] ACPU / AP stores the converted data after parsing the AWB statistical information (i.e., SwStats corresponding to AWB) in the SwStats area (second buffer), stores the converted data after parsing the ALSC statistical information (i.e., SwStats corresponding to ALSC) in the SwStats area (second buffer), and stores the converted data after parsing the ATF statistical information (i.e., SwStats corresponding to ATF) in the SwStats area (second buffer).
[0182] In the related technology: different buffers are created for HwStats and SwStats respectively, which increases the complexity of multiple buffer fragmentation management; AE / AF stats will be used on both the MCU side and the ACPU / AP side, resulting in the need to parse AE / AFstats once on both sides, and the parsing needs to be repeated 30 / 60 / 120 times per second. In this application, the same Buffer can store HwStats and SwStats at the same time, reducing the complexity of multiple buffer fragmentation management and the time-consuming multiple copies during data flow; the original statistical information stats parsing only needs to be performed once, saving computing power, reducing power consumption, and meeting the use of the MCU / ACPU / AP side; the same Buffer is convenient for centralized and simultaneous control of the stats data life cycle in a short period of time, and can be returned to the Buffer Pool for the next rotation after a short period of use.
[0183] On the ACPU / AP side, 5A SwStats data is input to the algorithm for calculation. After use, M buffers are buffered for each 5AStats buffer as a circular queue to briefly maintain the HwStats life cycle. When the number of buffers in the queue exceeds M, the earliest buffer in the queue is removed and returned to the Buffer Pool for subsequent distribution and rotation.
[0184] Fig.11 A schematic diagram of a MemTable binding image Buffer provided in an embodiment of the present application is shown as follows: Fig.11As shown, the structured "memory table (MemTable)" is bound to the image buffer (there can be P, P is an integer greater than or equal to 1) to extend the life cycle of the Stats data. After the 5A SwStats is used, at the same time, the 5ASwStats data in the 5A Stats Buffer is copied and written to the MemTable. For example, the conversion data corresponding to the AE, AF, AWB, ALSC and ATF statistics data are stored in a storage unit in the MemTable in a buffer corresponding to AE, AF, AWB, ALSC and ATF respectively. The life cycle of a single use of the Stats Buffer is the length of M frames after the generation of a frame of image. The life cycle of the "MemTable" is the length of time from the generation of a frame of image to N frames (N>M). Correspondingly, the MemTable can include N storage units. The "MemTable" can be centrally stored and managed, and can establish a direct binding relationship with the image based on the camera id (cam id) and timestamp (timestamp). The buffer that stores the image data (Figure Data) of the corresponding frame is bound to the "MemTable". With the subsequent circulation of the buffer, the data life of the stats is extended, which is convenient for further circulation of the data, storage in files, or tracing the source when locating the problem. In some embodiments, N can be an integer greater than or equal to 2. Exemplarily, N can be 5, 8, 10, 20, 40, or 60, etc. For example, N can be 8 to 20.
[0185] The buffer where the image data is stored has different numbers of frames stored depending on different user scenarios. For example, in the forward frame-taking mode based on zero shutter lag (ZSL), about 240ms after the photo button is pressed, the camera frame rate is 30fps, or the camera takes a frame of image every 33.33ms, and about 7 frames of image data (Figure Data) will be cached and stored in the buffer sequence. According to the above method, each image in each frame will have its own corresponding 5A SwStats stored in the corresponding MemTable, and this MemTable is bound to the buffer corresponding to the corresponding image data (Figure Data). For example, one image data (such as an original image or an image) corresponds to one buffer. Through frame selection technology, such as based on image clarity, through the relevant blur detection algorithm to determine whether the photo is clear, one frame to several frames are selected as the base frame and auxiliary frame; in addition, there is also a frame selection technology based on the current timestamp, which comprehensively selects the frame closest to the photo trigger as the base frame. After selecting an image as the base frame or auxiliary frame, the 5A SwStats data can be obtained from the MemTable carried by the image data (Figure Data) Buffer for subsequent offline processing of the image (for example, the original image corresponding to the base frame or auxiliary frame is obtained through FE, ME, BE, etc. JPEG photos). When the JPEG photo is generated, the 5A SwStats is further stored in the storage module corresponding to the JPEG as needed, which can be used for subsequent image analysis and processing based on the JPEG image.
[0186] When each frame of image is generated, the 5A SwStats data corresponding to each image in the frame will be stored in a storage unit (Buffer) in MemTable, and each storage unit is bound to the frame number and timestamp. MemTable corresponds to N images. When N+1 is generated, the data in the storage unit in MemTable corresponding to the first image will be deleted. In this way, in the current state, the data in N storage units in MemTable corresponding to N images will be cached at most. The value of N can be adjusted as needed to meet the needs of different user scenarios and functions.
[0187] In some embodiments, when writing to MemTable (i.e., writing data to each storage unit in MemTable), the setData() interface can be used to implement 5A SwStats data written to MemTable. In some embodiments, setData() can include at least one of the following: setData(DataTag tag,const T&data); setDatas(DataTag tag,const std::vector <t>&data); setDatas(DataTag tag, const T*data, uint32_t count).
[0188] In some embodiments, when reading from MemTable, 5ASwStats data is obtained through getData()const. In some embodiments, getData()const may include at least one of the following: getDatas(DataTag tag, std::vector <t>&data)const;getData(DataTag tag,T&data)const.
[0189] The following is an explanation of the beneficial effects of the present application: 1. In the present application, the same Buffer can store HwStats and SwStats at the same time, which reduces the complexity of multiple buffer fragmentation management and the time-consuming multiple copies during data flow; the original statistical information stats analysis only needs to be performed once, saving computing power, reducing power consumption, and meeting the use of the MCU / ACPU / AP side; the same Buffer is convenient for centralized and simultaneous control of the stats data life cycle in a short period of time, and can be returned to the Buffer Pool for the next rotation after a short period of use. 2. In the present application, the life cycle of "MemTable" is the time length from the generation of a frame of image to N frames (N>M). "MemTable" can be centrally stored and managed, and a direct binding relationship can be established with the image based on cam id and timestamp. Through "MemTable", the Buffer where the image data Figure Data of the corresponding frame is stored is bound to the Buffer. With the subsequent flow of the Buffer, the data life of stats is extended longer, which is convenient for further flow of data, storage in files, or tracing the source when locating problems.
[0190] The following is an explanation of the innovations of this application: 1. When data is generated, the 5A types of Stats Buffers distributed in advance are dynamically split into two structured storage areas according to the data size, and the hardware HwStats and parsed SwStats data are stored in a time-sharing manner in combination with the heterogeneous system algorithm deployment strategy to reduce the complexity of fragmented buffer management, frame matching, multiple copies, and communication time consumption problems of circulation. 2. The cross-system acquisition and short-term maintenance of Stats data in the life cycle are achieved through the Stats Buffer circulation mechanism, and the life cycle of Stats data is further extended for post-processing and storage by binding the image buffer with the structured "MemTable", which facilitates the further circulation of data.
[0191] The following is a description of the relevant content of this application:
[0192] 1. Under the control of the bottom-level MCU, when data is generated, the 5A StatsBuffer of multiple types dispatched by the ACPU / AP is opened up into two storage locations, HwStats and SwStats, and header information identification and safety isolation are done. As each frame of RAW image is generated, the bottom-level Stats hardware generates 5A HwStats data and moves it to the HwStats part of the StatsBuffer through DMA. (1) The bottom-level MCU returns the StatsBuffer such as ALSC / ATF / AWB directly to the ACPU / AP side, and the user on the ACPU / AP side parses the HwStats in the corresponding StatsBuffer into SwStats (2) The bottom-level MCU directly parses the HwStats in the AE / AF StatsBuffer into SwStats and caches it in the SwStats part of the StatsBuffer. Opening up two storage locations, HwStats and SwStats, reduces the complexity of multiple buffer fragmentation management, reduces the time consumption of multiple copies during data flow, and controls the life of stats data in the short term.
[0193] 2. Cache the SwStats data in the structured storage area of the "MemTable" bound to the same image buffer. The life cycle of a single use of the Stats Buffer is the length of M frames after the generation of a frame of image. The life cycle of the "MemTable" is the length of time from the generation of a frame of image to N frames (N>M). The "MemTable" can be stored and managed centrally, and a direct binding relationship can be established with the image based on camid and timestamp. Through the "MemTable" with the subsequent flow of the image, the life of the stats data is extended, which is convenient for further flow of data, storage in files, or tracing the source when locating problems.
[0194] It should be noted that in the embodiment of the present application, the structural technology implementation path of the 5A statistical data buffer flow can not only be used for the cross-core transmission solution of Stats and other data in the Camera business, but can also be applied to the interaction of raw data and analyzed data in other businesses, such as Audio, Video, and Display, to improve the convenience of data access.
[0195] It should be noted that in the embodiments of the present application, the use of MemTable is not only applicable to the storage and management of 5A Stats data content, but can also be applied 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 rates, which can be used for interaction, synchronization, and control between modules.
[0196] Based on the foregoing embodiments, the embodiments of the present application provide a first processing unit and a second processing unit. The units included in the first processing unit or the second processing unit, and the modules included in each unit, can be implemented by a processor in a terminal device; of course, they can also be implemented by a specific logic circuit.
[0197] Fig.12 A schematic diagram of the composition structure of a first processing unit provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the first processing unit 1200 includes:
[0198] The conversion unit 1201 is used to convert the arrangement mode of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer;
[0199] The writing unit 1202 is used to store each of the second statistical data into a second buffer in each of the corresponding target buffers.
[0200] In some embodiments, the first processing unit 1200 further includes: a splitting unit 1203, configured to split each target buffer into a plurality of sub-regions; the plurality of sub-regions include: a first buffer and a second buffer, the second buffer being configured to store converted data after converting the arrangement of the data in the first buffer;
[0201] The writing unit 1202 is further used to store each target statistical data in the at least one target statistical data into the first buffer zone in each corresponding target buffer zone; the at least one target statistical data includes the at least one first statistical data.
[0202] In some embodiments, the multiple sub-regions in each target buffer include a header region, the first buffer region, an isolation region, and the second buffer region, which are arranged in sequence;
[0203] The header area is used to store at least one of the following: a type identifier of each target statistical data corresponding to each target buffer, address information of data in the first buffer, size information of data in the first buffer, address information of the isolation area, size information of the isolation area, address information of data in the second buffer, size information of data in the second buffer;
[0204] The isolation area is used to isolate data in the first buffer and data in the second buffer.
[0205] In some embodiments, the at least one target statistical data further includes at least one third statistical data; the first processing unit 1200 further includes: a communication unit 1204, configured to send a return message of each target buffer corresponding to each first statistical data, and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data to the second processing unit;
[0206] Among them, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
[0207] In some embodiments, the at least one first statistical data includes at least one of the following: automatic exposure statistical data, automatic focus statistical data;
[0208] The at least one third statistical data includes at least one of the following: automatic white balance statistical data, automatic lens shading correction statistical data, automatic anti-flicker statistical data.
[0209] In some embodiments, the communication unit 1204 is further configured to receive address information and / or size information of each target buffer sent by the second processing unit.
[0210] Fig.13 A schematic diagram of the composition structure of a second processing unit provided in an embodiment of the present application is shown in FIG. Fig.13 As shown, the second processing unit 1300 includes:
[0211] The conversion unit 1301 is used to convert the arrangement mode of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of the at least one target buffer;
[0212] The writing unit 1302 is configured to store each fourth statistical data into a corresponding second buffer in each target buffer.
[0213] In some embodiments, the multiple sub-regions in each target buffer include a header region, the first buffer region, an isolation region, and the second buffer region, which are arranged in sequence;
[0214] The header area is used to store at least one of the following: a type identifier of each target statistical data corresponding to each target buffer, address information of data in the first buffer, size information of data in the first buffer, address information of the isolation area, size information of the isolation area, address information of data in the second buffer, size information of data in the second buffer;
[0215] The isolation area is used to isolate data in the first buffer and data in the second buffer.
[0216] In some embodiments, the at least one target statistical data further includes at least one first statistical data; the second processing unit 1300 further includes a communication unit 1303, configured to receive a return message of each target buffer corresponding to each first statistical data sent by the first processing unit, and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data;
[0217] Among them, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
[0218] In some embodiments, the at least one first statistical data includes at least one of: automatic exposure statistical data, automatic focus statistical data;
[0219] The at least one third statistical data includes at least one of the following: automatic white balance statistical data, automatic lens shading correction statistical data, automatic anti-flicker statistical data.
[0220] In some embodiments, the communication unit 1303 is further configured to send the address information and / or size information of each target buffer to the first processing unit.
[0221] In some embodiments, the second processing unit 1300 also includes a creation unit 1304 and a determination unit 1305; the creation unit 1304 is used to create each buffer pool corresponding to each target statistical data; each buffer pool includes multiple buffers, and different buffers in the multiple buffers in each buffer pool are used to store data, which is determined based on images taken at different times; the target buffer is one of the multiple buffers; the determination unit 1305 is used to determine the next unoccupied buffer in each buffer pool as each target buffer every preset time period.
[0222] In some embodiments, the second processing unit 1300 further includes a clearing unit 1306, configured to clear data in a specific buffer that first stores data in the multiple specific buffers when the number of the multiple specific buffers in each buffer pool is greater than or equal to the first number;
[0223] The specific buffer is an occupied buffer, and in each of the specific buffers, the first storage area stores each target statistical data correspondingly, and the second storage area stores corresponding conversion data after converting each target statistical data.
[0224] In some embodiments, the writing unit 1302 is further used to store the at least one conversion data obtained each time into an unoccupied storage unit in the memory table; the at least one conversion data is obtained by converting the arrangement mode of the at least one target statistical data respectively;
[0225] The clearing unit 1306 is further configured to clear the conversion data in the first occupied storage unit when the number of occupied storage units in the memory table is greater than or equal to the second number.
[0226] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0227] It should be noted that in the embodiments of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer storage medium. Based on this understanding, the technical solution of the embodiments of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a terminal device to execute all or part of the methods described in each embodiment of the present application.
[0228] Fig.14 A hardware entity diagram of a terminal device provided in an embodiment of the present application, such as Fig.14 As shown, the hardware entity of the terminal device 1400 includes: a first processing unit 1401 and a second processing unit 1402.
[0229] The first processing unit 1401 is used to: convert the arrangement mode of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer; store each second statistical data in a corresponding second buffer in each target buffer;
[0230] The second processing unit 1402 is used to: convert the arrangement method of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to the first buffer stored in each target buffer of at least one target buffer; store each fourth statistical data in the corresponding second buffer in each target buffer.
[0231] In some embodiments, the first processing unit 1401 is also used to: split each target buffer into multiple sub-areas; the multiple sub-areas include: a first buffer and a second buffer, the second buffer is used to store converted data after converting the arrangement of the data in the first buffer; store each target statistical data in at least one target statistical data to the corresponding first buffer in each target buffer; the at least one target statistical data includes the at least one first statistical data.
[0232] In some embodiments, the at least one target statistical data also includes at least one third statistical data; the first processing unit 1401 is also used to: send a return message of each target buffer corresponding to each first statistical data to the second processing unit, and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data; the second processing unit 1401 is also used to: receive a return message of each target buffer corresponding to each first statistical data sent by the first processing unit, and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data; wherein, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
[0233] In some embodiments, the second processing unit 1401 is further used to: send the address information and / or size information of each target buffer to the first processing unit; the first processing unit 1401 is further used to: receive the address information and / or size information of each target buffer sent by the second processing unit.
[0234] In some embodiments, the second processing unit 1401 is also used to: create each buffer pool corresponding to each target statistical data; each buffer pool includes multiple buffers, and different buffers in the multiple buffers in each buffer pool are used to store data, which is determined according to images taken at different times; the target buffer is one of the multiple buffers; and the next unoccupied buffer of each buffer pool is determined as each target buffer every preset time.
[0235] In some embodiments, the second processing unit 1401 is also used to: when the number of multiple specific buffers in each buffer pool is greater than or equal to the first number, clear the data in the specific buffer that first stores the data among the multiple specific buffers; the specific buffer is an occupied buffer, and in each of the specific buffers, the first storage area corresponds to storing each target statistical data, and the second storage area stores the corresponding converted data after converting each target statistical data.
[0236] In some embodiments, the second processing unit 1401 is also used to: store at least one conversion data obtained each time in an unoccupied storage unit in the memory table; the at least one conversion data is obtained by converting the arrangement method of the at least one target statistical data; when the number of occupied storage units in the memory table is greater than or equal to the second number, clear the conversion data in the storage unit occupied first.
[0237] An embodiment of the present application provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the data processing method of any of the above embodiments.
[0238] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0239] At least one of the first processing unit, the second processing unit, the various units in the first processing unit, and the various units in the second processing unit of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above-mentioned method embodiment can be completed by the hardware integrated logic circuit in the processor or the instructions in the form of software. At least one of the above-mentioned first processing unit, the second processing unit, the various units in the first processing unit, and the various units in the second processing unit can be a general-purpose processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0240] It is understood that the target buffer, storage unit, storage module, memory or computer storage medium in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), DDRSDRAM, enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the system and method described herein is intended to include, but is not limited to, these and any other suitable types of memory. That is, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
[0241] It should be understood that the "one embodiment" or "an embodiment" or "an embodiment of the present application" or "the aforementioned embodiment" or "some implementations" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "an embodiment of the present application" or "the aforementioned embodiment" or "some implementations" or "some embodiments" appearing in various places throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.
[0242] Unless otherwise specified, the terminal device executes any step in the embodiment of the present application, and the processor of the terminal device may execute the step. Unless otherwise specified, the embodiment of the present application does not limit the order in which the terminal device executes the following steps. In addition, the methods used to process data in different embodiments may be the same method or different methods. It should also be noted that any step in the embodiment of the present application can be independently executed by the terminal device, that is, when the terminal device executes any step in the above embodiment, it can be independent of the execution of other steps.
[0243] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0244] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0245] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, 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 in the form of hardware plus software functional units.
[0246] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0247] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0248] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0249] Those skilled in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0250] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0251] In the embodiments of the present application, the descriptions of the same steps and the same contents in different embodiments can refer to each other. In the embodiments of the present application, the term "and" does not affect the order of the steps. For example, the terminal device executes A and executes B, which may be that the terminal device executes A first and then executes B, or the terminal device executes B first and then executes A, or the terminal device executes A and executes B at the same time.
[0252] As used in the embodiments of the present application and the appended claims, the singular forms "a", "an", "said" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0253] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0254] It should be noted that in each embodiment involved in the present application, all steps may be executed or part of the steps may be executed as long as a complete technical solution can be formed.
[0255] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.< / t> < / t>
Claims
1. A data processing method, characterized in that: Applied to the first processing unit, comprising: Converting the arrangement of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer; Each of the second statistical data is stored in a corresponding second buffer in each of the target buffers.
2. The method according to claim 1, characterized in that The method further comprises: Splitting each target buffer into a plurality of sub-areas; the plurality of sub-areas include: a first buffer and a second buffer, the second buffer being used to store converted data after converting the arrangement of the data in the first buffer; Each target statistical data of at least one target statistical data is stored in a first buffer of each corresponding target buffer; the at least one target statistical data includes the at least one first statistical data.
3. The method according to claim 2, characterized in that The multiple sub-areas in each target buffer include a header area, the first buffer area, an isolation area, and the second buffer area which are arranged in sequence; The header area is used to store at least one of the following: a type identifier of each target statistical data corresponding to each target buffer, address information of data in the first buffer, size information of data in the first buffer, address information of the isolation area, size information of the isolation area, address information of data in the second buffer, size information of data in the second buffer; The isolation area is used to isolate data in the first buffer and data in the second buffer.
4. The method according to claim 1, characterized in that: The at least one target statistical data further comprises at least one third statistical data; the method further comprising: Sending a return message of each target buffer corresponding to each first statistical data and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data to the second processing unit; Among them, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
5. The method according to any one of claims 1 to 4, characterized in that: The at least one first statistical data includes at least one of the following: automatic exposure statistical data, automatic focusing statistical data; The at least one third statistical data includes at least one of the following: automatic white balance statistical data, automatic lens shading correction statistical data, automatic anti-flicker statistical data.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Receive the address information and / or size information of each target buffer sent by the second processing unit.
7. A data processing method, characterized in that: Applied to the second processing unit, comprising: Converting the arrangement of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of the at least one target buffer; Each of the fourth statistical data is stored in a corresponding second buffer in each of the target buffers.
8. The method according to claim 7, characterized in that The multiple sub-areas in each target buffer include a header area, the first buffer area, an isolation area, and the second buffer area which are arranged in sequence; The header area is used to store at least one of the following: a type identifier of each target statistical data corresponding to each target buffer, address information of data in the first buffer, size information of data in the first buffer, address information of the isolation area, size information of the isolation area, address information of data in the second buffer, size information of data in the second buffer; The isolation area is used to isolate data in the first buffer and data in the second buffer.
9. The method according to claim 7, characterized in that: The at least one target statistical data further comprises at least one first statistical data; the method further comprises: receiving a return message of each target buffer corresponding to each first statistical data sent by the first processing unit, and a return message of each target buffer corresponding to each third statistical data in the at least one third statistical data; Among them, in each target buffer corresponding to each first statistical data, the first buffer stores the corresponding each first statistical data, and the second buffer stores the corresponding each second statistical data; in each target buffer corresponding to each third statistical data, the first buffer stores the corresponding each third statistical data.
10. The method according to claim 7, characterized in that The at least one first statistical data includes at least one of the following: automatic exposure statistical data, automatic focus statistical data; The at least one third statistical data includes at least one of the following: automatic white balance statistical data, automatic lens shading correction statistical data, automatic anti-flicker statistical data.
11. The method according to claim 7, characterized in that The method further comprises: The address information and / or size information of each target buffer is sent to the first processing unit.
12. The method according to claim 7, characterized in that The method further comprises: Creating each buffer pool corresponding to each target statistical data; each buffer pool includes multiple buffers, and different buffers in the multiple buffers in each buffer pool are used to store data determined according to images taken at different times; the target buffer is one of the multiple buffers; The next unoccupied buffer in each buffer pool is determined as each target buffer at every preset time period.
13. The method according to claim 12, characterized in that The method further comprises: When the number of the multiple specific buffers in each buffer pool is greater than or equal to the first number, clearing data in a specific buffer that first stores data in the multiple specific buffers; The specific buffer is an occupied buffer, and in each of the specific buffers, the first storage area stores each target statistical data correspondingly, and the second storage area stores corresponding conversion data after converting each target statistical data.
14. The method according to any one of claims 7 to 13, characterized in that The method further comprises: storing at least one conversion data obtained each time into an unoccupied storage unit in the memory table; the at least one conversion data is obtained by converting the arrangement mode of the at least one target statistical data; When the number of occupied storage units in the memory table is greater than or equal to the second number, the conversion data in the storage unit that is occupied first is cleared.
15. A first processing unit, characterized in that: include: A conversion unit, configured to convert an arrangement mode of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; The at least one first statistical data is included in the at least one target statistical data, each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of the at least one target buffer; A writing unit is used to store each of the second statistical data into a second buffer in each corresponding target buffer.
16. A second processing unit, characterized in that: include: A conversion unit, configured to convert an arrangement mode of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; The at least one third statistical data is included in the at least one target statistical data, each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of the at least one target buffer; A writing unit is used to store each of the fourth statistical data into a corresponding second buffer in each of the target buffers.
17. A terminal device, characterized in that: include: a first processing unit and a second processing unit; The first processing unit is used to: convert the arrangement mode of each first statistical data in at least one first statistical data to obtain each corresponding second statistical data; the at least one first statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer; store each second statistical data in a corresponding second buffer in each target buffer; The second processing unit is used to: convert the arrangement mode of each third statistical data in at least one third statistical data to obtain each corresponding fourth statistical data; the at least one third statistical data is included in at least one target statistical data, and each target statistical data in the at least one target statistical data corresponds to a first buffer stored in each target buffer of at least one target buffer; Each of the fourth statistical data is stored in a corresponding second buffer in each of the target buffers.
18. A computer storage medium, characterized in that The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method according to any one of claims 1 to 14.