WO2023000903A1 - Data transmission method and apparatus, data receiving method and apparatus, chip, device, and storage medium - Google Patents

Data transmission method and apparatus, data receiving method and apparatus, chip, device, and storage medium Download PDF

Info

Publication number
WO2023000903A1
WO2023000903A1 PCT/CN2022/100458 CN2022100458W WO2023000903A1 WO 2023000903 A1 WO2023000903 A1 WO 2023000903A1 CN 2022100458 W CN2022100458 W CN 2022100458W WO 2023000903 A1 WO2023000903 A1 WO 2023000903A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
row
transmitted
mipi
channels
Prior art date
Application number
PCT/CN2022/100458
Other languages
French (fr)
Chinese (zh)
Inventor
曾玉宝
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023000903A1 publication Critical patent/WO2023000903A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus

Definitions

  • This application relates to electronic technology, involving but not limited to data transmission and reception methods and devices, chips, equipment, and storage media.
  • MIPI Mobile Industry Processor Interface
  • the data transmission and receiving method and device, chip, device, and storage medium provided by the embodiments of the present application can reduce the hardware requirements for MIPI, and even if there are more data sets to be transmitted, fewer channels can be used.
  • the data channel completes the data transfer.
  • the data transmission and reception methods and devices, chips, equipment, and storage media provided in the embodiments of the present application are implemented in the following way:
  • the data transmission method provided by the embodiment of the present application includes: converting the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M; according to the MIPI protocol , packing the second data sets to be transmitted in the N-way to obtain the first batch of one or more MIPI data packets; transmitting the first batch of one or more MIPI data packets to the application processor through the N-way data channels .
  • the data receiving method provided by the embodiment of the present application includes: determining whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received, parsing the currently received row of data to obtain the analyzed data; sending the analyzed data to the corresponding first image processing chip.
  • the image processing chip includes: a conversion circuit, which is used to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M; MIPI-TX circuit, used to pack the second data sets to be transmitted according to the MIPI protocol to obtain the first batch of one or more MIPI data packets; and the first batch of one or more data packets MIPI data packets are transmitted to the application processor through N data lanes.
  • a conversion circuit which is used to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M
  • MIPI-TX circuit used to pack the second data sets to be transmitted according to the MIPI protocol to obtain the first batch of one or more MIPI data packets
  • the first batch of one or more data packets MIPI data packets are transmitted to the application processor through N data lanes.
  • the application processor provided in the embodiment of the present application includes: a MIPI-RX circuit, configured to determine whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received, trigger the data parsing module; The data parsing module is used to analyze the currently received row of data to obtain the parsed data, and send the parsed data to the corresponding first image processing chip; the first image processing chip is used to Analyze the data described above and execute specific image processing algorithms.
  • a MIPI-RX circuit configured to determine whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received, trigger the data parsing module; The data parsing module is used to analyze the currently received row of data to obtain the parsed data, and send the parsed data to the corresponding first image processing chip; the first image processing chip is used to Analyze the data described above and execute specific image processing algorithms.
  • the electronic device includes: a second image processing chip, at least N data channels, and an application processor, where N is greater than 0; wherein, the conversion circuit of the second image processing chip converts the A data set to be transmitted is converted into an N-way second data set to be transmitted; wherein, M is greater than 1, and N is greater than 0 and less than M; the MIPI-TX circuit of the second image processing chip, according to the MIPI protocol, for the N
  • the second data set to be transmitted is packaged to obtain the first batch of one or more MIPI data packets; and the first batch of one or more MIPI data packets is transmitted to the MIPI-RX of the application processor through N data channels circuit;
  • the MIPI-RX circuit of the application processor determines whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received to trigger a data analysis module; the data of the application processor
  • the parsing module is configured to parse a line of data currently received to obtain parsed data,
  • the data transmission device includes: a conversion module, which is used to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M; Packing module, for according to MIPI agreement, the second data set to be transmitted of described N road is packed, obtains first batch of one or more MIPI data packets; Transmission module, for described first batch of one or more Multiple MIPI data packets are transmitted to the application processor through N data lanes.
  • the data receiving device includes: a receiving module, configured to determine whether a whole row of data is currently received according to a specific row data length; and if a whole row of data is currently received, trigger a data parsing module; A module, configured to analyze a row of currently received data to obtain analyzed data; and send the analyzed data to a corresponding first image processing chip.
  • the electronic device provided by the embodiment of the present application includes a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the image processing chip described in the embodiment of the present application when executing the program or, when the processor executes the program, implements the method on the application processor side described in the embodiment of the present application.
  • the computer-readable storage medium provided by the embodiment of the present application has a computer program stored thereon, and when the computer program is executed by the processor, the method on the image processing chip side described in the embodiment of the present application is implemented, or the computer program is executed by the processor During execution, the method on the application processor side described in the embodiment of the present application is implemented.
  • the first data set to be transmitted from M channels when receiving the first data set to be transmitted from M channels, the first data set to be transmitted from M channels is not directly packaged according to the MIPI protocol, but the first data set to be transmitted of the M channels is firstly packaged.
  • the transmission data set is organized into N second data sets to be transmitted which are less than M; then, the N second data sets to be transmitted are packaged according to the MIPI protocol;
  • the packaged transmission scheme can transmit the data to the application processor through fewer data channels, that is, transmit the data to the application processor through N channels instead of M channels. It can be seen that the solution provided by the embodiment of the present application reduces the hardware requirements for MIPI. Even if there are more data sets to be transmitted, fewer data channels can be used to complete data transmission, so that even if MIPI has fewer hardware data channels It can also meet the needs of data transmission.
  • FIG. 1 is a schematic diagram of the basic architecture of data transmission for image processing
  • FIG. 2 is a schematic diagram of the implementation flow of the data transmission method provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of an implementation flow of a data transmission and data receiving method according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of the output position of the 3A data in the pipeline of the Image Signal Processor (ISP) (ie, the signal processing flow of the ISP);
  • ISP Image Signal Processor
  • FIG. 6 is a schematic diagram of the output position of 3A data in the ISP pipeline (ie, the signal processing flow of the ISP);
  • FIG. 7 is a schematic diagram of the data transmission process in the early stage image processing (PreISP) chip solution
  • Figure 8 is a schematic diagram of the architecture of the pre-processing ISP chip end of the PreISP chip
  • FIG. 9 is a schematic diagram of the software framework of the application (Application, AP) side platform of the embodiment of the present application.
  • FIG. 10 is a schematic diagram of an implementation flow of a data transmission and receiving method according to an embodiment of the present application.
  • Figure 11 is a schematic diagram of the comparison of the results before and after the rearrangement of the embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a data transmission device according to an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a data receiving device according to an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • first ⁇ second ⁇ third etc. involved in the embodiment of the present application do not represent a specific ordering of objects. It is understandable that “first ⁇ second ⁇ third” etc. are allowed The specific order or sequencing may be interchanged such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein.
  • FIG. 1 is a schematic diagram of the architecture, in which only some key modules are shown.
  • the second image processing chip 10 comprises ISP chip 101, MIPI-TX module 102, ISP chip 103 and MIPI-TX module 104;
  • Application processor 11 comprises MIPI-RX module 111 , ISP chip 112, 3A algorithm module 113, MIPI-RX module 114, ISP chip 115 and 3A algorithm module 116; wherein, 3A algorithm includes automatic focus (Automatic Focus, AF) algorithm, automatic exposure (Automatic Exposure, AE) algorithm and Automatic White Balance (AWB) algorithm;
  • AVB Automatic White Balance
  • the image sensor 20 transmits the sensing data to the ISP chip 101, and the ISP chip 101 processes it, and transmits the obtained statistical data (hereinafter referred to as 3A data), original (raw) image data and PD data required by the 3A algorithm to the MIPI -TX module 102, the MIPI-TX module 102 transmits the received data sets from each channel to the MIPI-RX module 111 on the application processor side through the MIPI data channel, and the MIPI-RX module 111 transmits 3A data and PD data to 3A
  • the algorithm module 113 transmits the raw image data to the ISP chip 112; wherein, the PD data includes phase information for focusing.
  • the transmission path of the sensing data output by the image sensor 21 and the type of the image sensor 20 will not be repeated here.
  • FIG. 2 is a schematic diagram of the implementation flow of the data transmission method provided in the embodiment of the present application. As shown in FIG. 2 , the The method may include the following steps 201 to 203:
  • Step 201 the second image processing chip converts the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M.
  • the data sets to be transmitted may come from different sources, and correspondingly, the transmission paths are also different.
  • the type of the first data set to be transmitted is 3A data, wherein the statistical data required by the AWB algorithm comes from the LSC module, the statistical data required by the AE algorithm comes from the WB module, and the statistical data required by the AF algorithm comes from the Demosaic module.
  • the types of the first data set to be transmitted are all raw image data, wherein one channel of raw image data comes from the first image sensor, and the other channel of raw image data comes from the second image sensor; as another example, the first data set to be transmitted
  • the types of sets are all raw image data, but one path is short-exposure data, one path is medium-exposure data and one path is long-exposure data.
  • the first to-be-transmitted data sets of the M channels may be different types of data sets, or may be the same type of data sets.
  • the first data set to be transmitted includes at least one of the following: image statistical data (abbreviated as 3A data), PD data and original image required to execute the 3A algorithm
  • 3A data image statistical data
  • PD data original image required to execute the 3A algorithm
  • the data that is, the M channels of first data sets to be transmitted are all 3A data, or all are PD data, or all are original image data.
  • the first data set to be transmitted of M channels includes 3A data, PD data, and original image data.
  • the first data sets to be transmitted of the M channels are data sets generated at the same moment or in the same time period.
  • the M paths can be understood as M transmission paths or M different modules.
  • the meaning of N channels is similar to that of M channels.
  • the N channels of second data sets to be transmitted may come from N channels of transmission, or may be output by N different modules.
  • the second image processing chip packs the N channels of second data sets to be transmitted according to the MIPI protocol to obtain a first batch of one or more MIPI data packets.
  • Step 203 the second image processing chip transmits the first batch of one or more MIPI data packets to the application processor through N data channels.
  • these data sets when receiving the first data sets to be transmitted from the M channels, these data sets are not directly packaged according to the MIPI protocol, but the first data sets to be transmitted from the M channels are organized into smaller than M's N-way second data sets to be transmitted; then, according to the MIPI protocol, the N-way second data sets to be transmitted are packaged; thus, compared to the scheme of directly packaging and transmitting the M-way first to-be-transmitted sets , enabling the second image processing chip to complete data transmission through fewer data channels, that is, to transmit these data to the application processor through N data channels instead of M data channels.
  • FIG. 3 is a schematic diagram of the implementation flow of the data transmission and data receiving method in the embodiment of the present application. As shown in FIG. 3 , the method may include the following steps 301 to 307:
  • Step 301 the second image processing chip decomposes the data to be transmitted in the first data set to be transmitted from M channels into at least one row of data according to a specific row data length.
  • the length of each decomposed row of data is fixed, and is a specific row data length. Further, in some embodiments, there is a certain interval between adjacent rows of data, that is, there is blank data between adjacent rows of data, so that a certain time can be reserved for the receiving end to process the received row data.
  • the size of the specific row data length is 1024 bytes or 2048 bytes and so on.
  • the second image processing chip rearranges the at least one row of data to obtain N channels of second data sets to be transmitted; wherein, M is greater than 1, N is greater than 0, and N is less than M.
  • the second data set to be transmitted includes not only the content of the data itself, but also the metadata of these data.
  • metadata also known as intermediary data or relay data, is the data describing data (data about data), mainly describing the information of data attributes (property), used to support such as indicating storage location, historical data, resource search , file recording and other functions.
  • the metadata of the second data set to be transmitted may include, for example, the data length and/or data type of the second data set to be transmitted.
  • the value of N is not limited. It can be set according to the number of MIPI data channels, in a word, N is less than or equal to the number of MIPI data channels.
  • the first data set to be transmitted from 3 channels is organized as the second data set to be transmitted from 1 channel.
  • the first data sets to be transmitted from 6 channels are organized into the second data sets to be transmitted from 2 channels.
  • M and N may or may not be in multiples.
  • the second image processing chip can implement step 302 as follows: determine the first type of each row of data; update the first type of label used to represent the row of data into the row of data; update The last row of data is rearranged to obtain the N-way second data set to be transmitted.
  • the first type of tag is used to identify whether the corresponding row data is the content of the data itself or metadata.
  • Each line of data is marked with a corresponding first type, so that for the application processor side, when parsing the received MIPI data packet, it is not necessary to analyze and identify the type of the line of data, thereby improving the overall data processing of the application processor efficiency.
  • the updated at least one row of data may be rearranged in the following way: determine the second type of each updated row of data; the second type belongs to a subtype of the first type , the first type of tag is used to identify that the corresponding row data is the content or metadata of the data itself; the second type refers to the data type of the corresponding row data; according to the mapping relationship between the second type and row number , rearranging the at least one row of updated data to obtain the N-way second data set to be transmitted; in this way, it is convenient for the application processor to analyze quickly. For example, the application processor may directly determine the second type of the row of data according to the row number of the currently received data.
  • the second image processing chip can know the second type that each row should correspond to according to the preset mapping table, that is, the mapping relationship between the second type and the row number is recorded in the mapping table.
  • the first row agrees to store long-exposure raw image data
  • the second row agrees to store short-exposure raw image data
  • the third row agrees to store mid-exposure raw image data
  • the fourth line agrees to store The statistical data required by the AWB algorithm in the 3A data
  • the fifth line agrees to store the statistical data required by the AE algorithm in the 3A data
  • AF data the statistical data required by the AF algorithm
  • first row Long exposure raw image data second line Short exposure raw image data
  • third row Raw image data exposed in fourth row AWB data The fifth line AE data sixth line AF data ... ...
  • the data length of each row is fixed, and the number of rows can be adjusted according to the size of the total data set received.
  • Total data sets of different sizes have different corresponding mapping tables.
  • the first data set to be transmitted in the M channel is raw image data
  • its total data size is 3K bytes
  • the specific row data length is 1024 bytes.
  • the contents of the corresponding mapping table are shown in Table 2. Among them, the first The first row agrees to store long-exposure raw image data
  • the second row agrees to store mid-exposure raw image data
  • the third row agrees to store short-exposure raw image data.
  • the first data set to be transmitted in M channels is raw image data, its total data size is 6K bytes, and the specific line data length is 1024 bytes, and the contents of the corresponding mapping table are shown in Table 3, wherein, The first and second lines agree to store long-exposure raw image data, the third and fourth lines agree to store medium-exposure raw image data, and the fifth and sixth lines agree to store short-exposure raw image data.
  • the second image processing chip When the second image processing chip rearranges the updated at least one row of data, it may call the corresponding The mapping table, and then rearrange the updated at least one row of data according to the second type corresponding to each row agreed in the mapping table.
  • Step 303 the second image processing chip packs the N channels of second data sets to be transmitted according to the MIPI protocol to obtain a first batch of one or more MIPI data packets.
  • packing means encapsulating data, for example, adding header information at the beginning of the second data set to be transmitted, adding packet tail information at the end of the second data set to be transmitted, and so on.
  • the encapsulated second data set to be transmitted that is, the data length of each line in the MIPI data packet is a specific line data length.
  • one channel of the second data set to be transmitted is encapsulated into one MIPI data packet.
  • Step 304 the second image processing chip evenly distributes the first batch of one or more MIPI data packets to the N data channels and transmits them to the application processor through the N data channels.
  • N data lanes can transmit MIPI packets to the application processor line by line.
  • the second image processing chip distributes the first batch of one or more MIPI data packets to the N data channels uniformly or non-uniformly. Different data lanes are responsible for transporting assigned MIPI packets.
  • one data channel can serially transmit MIPI data packets to the application processor line by line; wherein, there is blank data of a fixed size between adjacent line data, that is, blank intervals, and the purpose of this interval is to provide
  • the MIPI-RX module of the application processor reserves a certain amount of time to parse the received row data.
  • Step 305 the application processor determines whether a whole row of data is currently received according to the specific row data length; if yes, execute step 306; otherwise, return to execute step 305;
  • step 306 the application processor parses the currently received row of data to obtain parsed data.
  • the MIPI-RX module of the application processor whenever the MIPI-RX module of the application processor receives a row of data, it generates a row interrupt, thereby triggering the data parsing module of the application processor to parse the currently received row of data; thus, using the row interrupt, Realize parsing while transmitting, no need to wait for all row data (that is, cache data for image processing) to be transmitted and then parse; thus, data transmission can achieve shorter delay transmission or even zero delay transmission, thereby improving the overall performance of the application processor Data processing efficiency. For example, for the AF algorithm, fast acquisition of analytical data can improve the autofocus speed, thereby improving user experience.
  • the data parsing module may be included in the MIPI-RX module of the application processor, or may be another module independent of the MIPI-RX module.
  • Step 307 the application processor sends the analysis data to the corresponding first image processing chip.
  • the application processor can implement step 306 in the following way: determine the line number of the parsed data; determine the second type of the parsed data according to the agreed second type corresponding to each line; For the second type of data, the analysis data is sent to the corresponding first image processing chip.
  • the data is transmitted to a 3A algorithm module, which is an image processing chip.
  • the data is transmitted to the ISP chip, which is a different chip from the 3A algorithm module.
  • FIG. 4 is a schematic structural diagram of the electronic device in the embodiment of the present application.
  • the electronic device 4 includes a second image processing chip 40, an application processor 41 and at least N channels of data Channel 42; wherein, the second image processing chip 40 includes a conversion circuit 401, a MIPI-TX circuit 402; the application processor 41 includes a MIPI-RX circuit 411, a data analysis module 412 and a first image processing chip 413; wherein,
  • a conversion circuit 401 configured to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M;
  • the MIPI-TX circuit 402 is configured to pack the N-way second data sets to be transmitted according to the MIPI protocol to obtain the first batch of one or more MIPI data packets;
  • the first batch of one or more MIPI data packets is transmitted to the MIPI-RX circuit 411 of the application processor through N data channels.
  • MIPI-RX circuit 411 determines whether a whole line of data is currently received; if a whole line of data is currently received, the data analysis module 412 is triggered; otherwise, continue to receive and judge whether to receive according to the currently received data length Received a whole line of data;
  • the data parsing module 412 is configured to parse a row of currently received data to obtain parsed data, and send the parsed data to the corresponding first image processing chip 413 .
  • the MIPI-RX circuit is used to determine whether an entire line of data is currently received according to a specific line data length; if an entire line of data is currently received, the output line is interrupted to the data analysis module to The data parsing module is triggered to parse the currently received row of data.
  • the functions of the data parsing module 412 can be realized by means of software, for example, a CPU can run related programs to realize the functions of the module.
  • the first image processing chip 413 is configured to execute a specific image processing algorithm according to each received analysis data.
  • the first image processing chip 413 is a chip for implementing the 3A algorithm.
  • the first image processing chip 413 is an ISP chip.
  • the conversion circuit 401 can decompose the data to be transmitted in the M-way first data set to be transmitted into at least one row of data according to a specific row data length; determine the first type of each row of data; use The label of the first type representing the row data is updated in the row data; the second type of each row of data after the update is determined; the second type belongs to the subtype of the first type; according to the The mapping relationship between the second type and the line number is to rearrange the updated at least one line of data to obtain the N-way second data set to be transmitted; the MIPI-TX circuit 402 is used to transmit the data according to the MIPI protocol.
  • the second data set to be transmitted in N roads is packaged to obtain the first batch of one or more MIPI data packets; RX circuit 411.
  • the MIPI-RX circuit 411 can determine whether a whole row of data is currently received according to the specific row data length; if a whole row of data is currently received, the sending row is interrupted to the data parsing module 412; the data parsing module 412, In response to the line interruption, analyze the currently received line of data to obtain the analysis data; determine the line number of the analysis data; determine the second type of the analysis data according to the agreed second type corresponding to each line stored; According to the second type of the analysis data, the analysis data is sent to a corresponding first image processing chip.
  • MIPI Mobile Industry Processor Interface
  • 3A algorithm that is, automatic exposure (AE) algorithm, automatic white balance (AWB) algorithm and automatic focus (AF) algorithm.
  • the statistical data required by these algorithms are generated in the image signal processing (ISP) chip.
  • ISP image signal processing
  • the output position of the 3A data in the ISP pipeline (that is, the signal processing flow of the ISP) is shown in Figure 5, where the statistical data required by the AF algorithm includes: statistics on the images output by the image sensor, and the output of the Degamma module Statistics of images, statistics of images output by Demosaic module, statistics of images output by YUV NR/Sharpening module; statistical data required by AE algorithm include: statistics of images output by LSC module, WB module The statistics of the output image, the statistics of the image output by the CCM module, and the statistics of the image output by the CSM module; the statistical data required by the AWB algorithm include: the statistics of the image output by the LSC module, and the statistics of the Demosaic module The statistics of the output images and the statistics of the images output by the CCM module. It can be seen that there are many statistical positions of AF.
  • the BLC module is used for black level correction; the Degamma module is used to adjust the contrast of the picture; the NR module is used for noise reduction; the LSC (Lens Shade Correction) module is used for lens shading correction; the WB module, Used for white balance; Demosaic module, used for demosaic; CCM module, used for color correction; Gamma module, used to adjust the contrast of the picture; Sharpening module, used for sharpening; CSM module, used for color space conversion; YUV NR /Sharpening module for noise reduction/sharpening.
  • the WB module Used for white balance
  • Demosaic module used for demosaic
  • CCM module used for color correction
  • Gamma module used to adjust the contrast of the picture
  • Sharpening module used for sharpening
  • CSM module used for color space conversion
  • YUV NR /Sharpening module for noise reduction/sharpening.
  • the typical configuration of the output position of 3A data is as shown in Figure 6, wherein the statistical data required by the AWB algorithm is mainly obtained by statistics on the images output by the LSC module, and the statistical data required by the AE algorithm
  • the data is mainly obtained by statistics on the images output by the WB module
  • the statistical data required by the AF algorithm is mainly obtained by statistics on the images output by the Demosaic module.
  • the AE module is mainly used to count the statistical data required by the AE algorithm
  • the AF module is mainly used to count the statistical data required by the AF algorithm
  • the AWB module is mainly used to count the statistical data required by the AWB algorithm.
  • the statistical data required by the AE algorithm mainly includes R, G, B histogram and brightness information, and the statistical data is usually the Region Of Interest (ROI) of the image.
  • ROI Region Of Interest
  • the statistical data required by the AWB algorithm mainly includes the statistics of the number of R, G, and B pixel points in the ROI area, the ratio of red to green and the ratio of blue to green.
  • the statistical data required by the AF algorithm includes the sharpness value of each small block in the ROI area.
  • the ISP will generate more AE statistical data, AWB statistical data and AF statistical data, and these information need to be sent to the 3A algorithm module for processing.
  • the statistical data of each camera will be counted separately, and then sent to the 3A algorithm modules on the independent AP side.
  • the DOL sensor can simultaneously generate 3 channels of raw image data and PD data; among them, the PD data is phase information for focusing.
  • FIG. 7 shows the data transmission process in the PreISP chip solution. It can be seen from the figure that, limited by the hardware, MIPI will multiplex the data.
  • the MIPI data of the PreISP chip is organized into 1024 bytes per line through the buffer hardware, and different data forms a frame, and different types of data are agreed to be placed in fixed lines.
  • the platform side that is, the AP side
  • the platform side counts the line number and parses the received data according to the line number.
  • the architecture of the pre-processing ISP chip side of the PreISP chip and the hardware mainly includes: CPU, MIPI, NPU and conversion circuits, etc.; among them,
  • CPU responsible for interacting with the AP. Receive control commands and data sent by AP, and send information back to AP. It is also responsible for the control of modules such as ISP chip and NPU.
  • ISP chip responsible for image-based processing. Similar to conventional ISP functions, including bad pixel correction, dark current correction, lens shading correction, digital gain, white balance, Demosaic, color correction, Gamma and noise reduction modules;
  • Conversion circuit responsible for organizing multiple channels of MIPI data into one channel of 3A, one channel of raw image data and one channel of PD data.
  • NPU run AI algorithms to process preview data, such as noise reduction, HDR and/or super resolution, etc.;
  • MIPI-TX module Package the organized data (such as 3A, raw image data and PD data), and then send it to the ISP chip on the AP side through the MIPI protocol, and the ISP chip on the AP side will further process the received data.
  • organized data such as 3A, raw image data and PD data
  • Unpack Data parsing module: It is a software module used to unpack the packaged data of the PreISP chip. After unpacking, the 3A data is divided into statistical data required by the AE, AF, and AWB algorithms. The raw data is divided into long, medium, and Short 3-way data. After unpacking the data, the corresponding algorithm can be used directly.
  • ISP chip responsible for image-based processing, mainly used for photo-taking processing in this embodiment of the application. Similar to conventional ISP chips, it has more powerful functions than the ISP chips in PreISP chips, but it cannot be customized and its functions are relatively fixed.
  • An ISP chip includes ISP 0 and ISP 1, and the ISP chip can receive data. In addition, the 3A algorithm is executed on the CPU.
  • CPU responsible for the control of the PreISP chip, such as power-on, power-off, firmware loading, and related control during runtime.
  • 3A algorithm module used to process 3A data and realize 3A functions.
  • the kernel (Kernel) layer mainly includes the driver of the device module, such as the driver of the image sensor (sensor driver), I2c driver, SDIO driver and the driver of the PreISP chip on the platform side, etc., through which the device initialization and state switching can be configured. Work;
  • the HAL layer mainly controls the platform to receive the image data, statistical data and ambient light information output by the PreISP chip through SDIO, and then executes the 3A algorithm;
  • Zero Shutter Lang (ZSL) is responsible for receiving and analyzing raw image data, and raw Further post-processing algorithms for image data and ISP pipeline control for taking pictures.
  • Framework layer the original framework of Android, which is the middleware of HAL and APP.
  • App layer Mainly use Camera, system Camera or third-party Camera application through Google standard Camera API2;
  • Step 101 turn on the dual cameras, and control the pre-processing PreISP chip to start working;
  • Step 102 the PreISP chip starts to process the image data, and generates 3A data (stats), and sends these statistical data to the conversion circuit.
  • step 103 the conversion circuit organizes multiple channels of raw image data, PD data and 3A data into one channel of 3A data, one channel of raw image data and one channel of PD data.
  • Step 104 these data are packaged as MIPI packets and sent to the AP through the MIPI-TX module;
  • Step 105 the AP receives the MIPI data packet, and sends the MIPI data packet to the data parsing module for unpacking.
  • Step 106 send the unpacked raw image data to the ISP chip, and the ISP chip processes it based on the pipeline, and send the unpacked 3A data and PD data to the 3A algorithm module.
  • the conversion circuit of the PreISP chip is a module realized by hardware, which mainly realizes the following functions:
  • the raw image data, PD data and generated 3A data of the image sensor are received in the PreISP chip; then, the conversion circuit rearranges these data. As shown in Figure 11, before the rearrangement, the data length of each row is different. After the rearrangement, each row has a fixed data length, that is, 1024 bytes, and there is a data interval of a certain length between adjacent rows ( That is, blank). And after rearranging, the raw image data is organized into one data set, the PD data is organized into one data set, and the 3A data is organized into one data set.
  • each line of data corresponds to fixed-length data, and a fast parsing agreement has been reached.
  • the packaging protocol is as follows:
  • the packed rows correspond to the agreed mapping table, which is used to agree to allocate fixed data.
  • the first row is long-exposure raw image data
  • the second row is short-exposure raw image data, and so on.
  • the data analysis module on the AP side is a software module. Using the same mapping table as the PreISP chip, the received data blocks can be quickly parsed by software.
  • the schematic pseudo code is as follows:
  • i represents the line number
  • line_count_of_pack represents the number of lines of MIPI data packets
  • the length of each line is 1024
  • the value of line_count_of_pack is an integer, which can be adjusted according to the total data size.
  • the trigger mode of the data parsing module on the AP side can be triggered by a line interrupt mode.
  • a line interrupt mode In the MIPI protocol on the AP side, it can be set to generate a line interrupt every time a line of data is received. That is, it triggers analysis while transmitting. There is no need to wait for all cached data (buffer) transmission to end before parsing.
  • the raw image data and meta data are packed in a regular arrangement, so that the MIPI receiving end can use less VC_DT and can receive quickly; for the raw image data and meta data, they are decomposed into several lines, each The length of the row is a fixed length. Add a tag in front of each line, and the tag is used to indicate the data type (the types of raw image data and meta image data are inconsistent). Then, pack the data into MIPI packets of the same VC_DT. Send to AP via the same VC_DT of MIPI hardware.
  • line interrupt method to trigger the data parsing module to analyze line by line, so as to achieve quasi-zero delay analysis; enable the line interrupt generated when the data packet is received on the AP side, so that when the line interrupt is received, the edge can be real-time Receive and parse line by line. In this way, when processing AF autofocus data, etc., it is possible to receive data and respond faster.
  • this embodiment of the present application provides a data transmission device, which includes each module included, and each unit included in each module, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit Implementation; in the process of implementation, the processor can be an image processing chip, a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA).
  • the processor can be an image processing chip, a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA).
  • Fig. 12 is a schematic structural diagram of a data transmission device according to an embodiment of the present application. As shown in Fig. 12, the data transmission device 12 includes:
  • a conversion module 121 configured to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M;
  • the packing module 122 is used for packing the second data sets to be transmitted of the N paths according to the MIPI protocol, so as to obtain the first batch of one or more MIPI data packets;
  • the transmission module 123 is configured to transmit the first batch of one or more MIPI data packets to the application processor through N data channels.
  • the conversion module 121 is configured to: decompose the data to be transmitted in the M-way first data set to be transmitted into at least one row of data according to a specific row data length; rearrange the at least one row of data , to obtain the second data sets to be transmitted of the N paths; correspondingly, the transmission module 123 is configured to: distribute the first batch of one or more MIPI data packets evenly to the N paths of data channels and pass through the N data channels are transmitted to the application processor.
  • the conversion module 121 is configured to: determine the first type of each row of data; update the first type of label used to characterize the row of data into the row of data; update the updated At least one row of data is rearranged to obtain the N channels of second data sets to be transmitted.
  • the conversion module 121 is configured to: determine the second type of each row of data after the update; the second type belongs to a subtype of the first type; The mapping relationship is to rearrange the at least one row of updated data to obtain the N-way second data sets to be transmitted.
  • the specific row data length corresponds to the maximum amount of data read from the memory per unit time.
  • the first data set to be transmitted includes at least one of the following: statistical data, PD data and original image data required to execute the 3A algorithm.
  • FIG. 13 is a schematic structural diagram of the data receiving device in the embodiment of the present application. As shown in FIG. 13 , the data receiving device 13 includes:
  • the receiving module 131 is used to determine whether a whole row of data is currently received according to a specific row data length; and if a whole row of data is currently received, trigger the data parsing module 132;
  • the data parsing module 132 is configured to parse the currently received row of data to obtain parsed data; and send the parsed data to the corresponding first image processing chip.
  • the data parsing module 132 is configured to: determine the line number of the parsed data; determine the second type of the parsed data according to the agreed second type corresponding to each row; determine the second type of the parsed data according to the parsed data of the second type, sending the analysis data to the corresponding first image processing chip.
  • the receiving module 131 is configured to determine whether an entire row of data is currently received according to a specific row data length; and if an entire row of data is currently received, the output row is interrupted to the data parsing module 132 to trigger The data parsing module 132 parses a row of data currently received.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or physically exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It can also be implemented in the form of a combination of software and hardware.
  • the above method is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium and include several instructions to make
  • the electronic device executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk.
  • embodiments of the present application are not limited to any specific combination of hardware and software.
  • FIG. 14 is a schematic diagram of the hardware entity of the electronic device in the embodiment of the present application.
  • the electronic device 14 includes a memory 141 and a processor 142, and the memory 141 stores A computer program that can run on the processor 142, and the processor 142 implements the steps in the methods provided in the above-mentioned embodiments when executing the program.
  • the memory 141 is configured to store instructions and applications executable by the processor 142, and may also cache data to be processed or processed by each module in the processor 142 and the electronic device 14 (for example, image data, audio data, etc. , voice communication data and video communication data), can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
  • FLASH FLASH
  • RAM Random Access Memory
  • An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the methods provided in the foregoing embodiments are implemented.
  • the embodiment of the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the steps in the method provided by the above method embodiment.
  • the disclosed devices and methods may be implemented in other ways.
  • the above-described embodiments are only illustrative.
  • the division of the modules is only a logical function division.
  • the mutual coupling, or direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms of.
  • modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed to multiple network units; Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can be used as a single unit, or two or more modules can be integrated into one unit; the above-mentioned integration
  • the modules can be implemented in the form of hardware, or in the form of hardware plus software functional units.
  • the above-mentioned integrated units of the present application are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium and include several instructions to make
  • the electronic device executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.

Landscapes

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

Abstract

Provided are a data transmission method and apparatus, a data receiving method and apparatus, a chip, a device, and a storage medium. The data transmission method comprises: converting, into N second data sets to be transmitted, M first data sets to be transmitted (201), M being greater than 1, and N being greater than 0 and less than M; packaging said N second data sets according to an MIPI protocol to obtain a first batch of one or more MIPI data packets (202); and transmitting the first batch of one or more MIPI data packets to an application processor by means of N data channels (203).

Description

数据传输、接收方法及装置、芯片、设备、存储介质Data transmission and reception method and device, chip, device, storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110839218.6、申请日为2021年07月23日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本申请。This application is based on a Chinese patent application with application number 202110839218.6 and a filing date of July 23, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated into this application in its entirety .
技术领域technical field
本申请涉及电子技术,涉及但不限于数据传输、接收方法及装置、芯片、设备、存储介质。This application relates to electronic technology, involving but not limited to data transmission and reception methods and devices, chips, equipment, and storage media.
背景技术Background technique
移动行业处理器接口(MobileIndustry Processor Interface,MIPI)成为图像传感器传输数据的主要标准,初衷是为了把手机内部的摄像头、显示器、射频基带和处理器之间的接口标准化,满足大容量图像传输需求。然而,MIPI硬件的数据通道的增加,意味着硬件成本的增加。Mobile Industry Processor Interface (MIPI) has become the main standard for image sensor data transmission. The original intention is to standardize the interface between the camera, display, RF baseband and processor inside the mobile phone to meet the needs of large-capacity image transmission. However, the increase of the data channel of MIPI hardware means the increase of hardware cost.
发明内容Contents of the invention
有鉴于此,本申请实施例提供的数据传输、接收方法及装置、芯片、设备、存储介质,能够降低对MIPI的硬件要求,即使有更多路的待传数据集,也能够使用较少的数据通道完成数据传输。本申请实施例提供的数据传输、接收方法及装置、芯片、设备、存储介质是这样实现的:In view of this, the data transmission and receiving method and device, chip, device, and storage medium provided by the embodiments of the present application can reduce the hardware requirements for MIPI, and even if there are more data sets to be transmitted, fewer channels can be used. The data channel completes the data transfer. The data transmission and reception methods and devices, chips, equipment, and storage media provided in the embodiments of the present application are implemented in the following way:
本申请实施例提供的数据传输方法,包括:将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器。The data transmission method provided by the embodiment of the present application includes: converting the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M; according to the MIPI protocol , packing the second data sets to be transmitted in the N-way to obtain the first batch of one or more MIPI data packets; transmitting the first batch of one or more MIPI data packets to the application processor through the N-way data channels .
本申请实施例提供的数据接收方法,包括:根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据,对当前接收到的一行数据进行解析,得到解析数据;将所述解析数据发送给对应的第一图像处理芯片。The data receiving method provided by the embodiment of the present application includes: determining whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received, parsing the currently received row of data to obtain the analyzed data; sending the analyzed data to the corresponding first image processing chip.
本申请实施例提供的图像处理芯片,包括:转换电路,用于将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;MIPI-TX电路,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;以及将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器。The image processing chip provided by the embodiment of the present application includes: a conversion circuit, which is used to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M; MIPI-TX circuit, used to pack the second data sets to be transmitted according to the MIPI protocol to obtain the first batch of one or more MIPI data packets; and the first batch of one or more data packets MIPI data packets are transmitted to the application processor through N data lanes.
本申请实施例提供的应用处理器,包括:MIPI-RX电路,用于根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据,触发数据解析模块;数据解析模块,用于对当前接收到的一行数据进行解析,得到解析数据,以及将所述解析数据发送给对应的第一图像处理芯片;第一图像处理芯片,用于根据接收的每一所述解析数据,执行特定的图像处理算法。The application processor provided in the embodiment of the present application includes: a MIPI-RX circuit, configured to determine whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received, trigger the data parsing module; The data parsing module is used to analyze the currently received row of data to obtain the parsed data, and send the parsed data to the corresponding first image processing chip; the first image processing chip is used to Analyze the data described above and execute specific image processing algorithms.
本申请实施例提供的电子设备,包括:第二图像处理芯片、至少N路数据通道和应用处理器,N大于0;其中,所述第二图像处理芯片的转换电路,将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;所述第二图像处理芯片的MIPI-TX电路,按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个 或多个MIPI数据包;以及将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器的MIPI-RX电路;所述应用处理器的MIPI-RX电路,根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据触发数据解析模块;所述应用处理器的数据解析模块,用于对当前接收到的一行数据进行解析,得到解析数据,以及将所述解析数据发送给对应的第一图像处理芯片;所述应用处理器的第一图像处理芯片,用于根据接收的每一所述解析数据,执行特定的图像处理算法。The electronic device provided in the embodiment of the present application includes: a second image processing chip, at least N data channels, and an application processor, where N is greater than 0; wherein, the conversion circuit of the second image processing chip converts the A data set to be transmitted is converted into an N-way second data set to be transmitted; wherein, M is greater than 1, and N is greater than 0 and less than M; the MIPI-TX circuit of the second image processing chip, according to the MIPI protocol, for the N The second data set to be transmitted is packaged to obtain the first batch of one or more MIPI data packets; and the first batch of one or more MIPI data packets is transmitted to the MIPI-RX of the application processor through N data channels circuit; the MIPI-RX circuit of the application processor determines whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received to trigger a data analysis module; the data of the application processor The parsing module is configured to parse a line of data currently received to obtain parsed data, and to send the parsed data to a corresponding first image processing chip; the first image processing chip of the application processor is configured to For each of the analyzed data received, a specific image processing algorithm is executed.
本申请实施例提供的数据传输装置,包括:转换模块,用于将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;打包模块,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;传输模块,用于将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器。The data transmission device provided by the embodiment of the present application includes: a conversion module, which is used to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M; Packing module, for according to MIPI agreement, the second data set to be transmitted of described N road is packed, obtains first batch of one or more MIPI data packets; Transmission module, for described first batch of one or more Multiple MIPI data packets are transmitted to the application processor through N data lanes.
本申请实施例提供的数据接收装置,包括:接收模块,用于根据特定的行数据长度,确定当前是否接收到一整行数据;以及如果当前接收到一整行数据触发数据解析模块;数据解析模块,用于对当前接收到的一行数据进行解析,得到解析数据;以及将所述解析数据发送给对应的第一图像处理芯片。The data receiving device provided by the embodiment of the present application includes: a receiving module, configured to determine whether a whole row of data is currently received according to a specific row data length; and if a whole row of data is currently received, trigger a data parsing module; A module, configured to analyze a row of currently received data to obtain analyzed data; and send the analyzed data to a corresponding first image processing chip.
本申请实施例提供的电子设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现本申请实施例所述的图像处理芯片侧的方法,或者,所述处理器执行所述程序时实现本申请实施例所述的应用处理器侧的方法。The electronic device provided by the embodiment of the present application includes a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the image processing chip described in the embodiment of the present application when executing the program or, when the processor executes the program, implements the method on the application processor side described in the embodiment of the present application.
本申请实施例提供的计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现本申请实施例所述的图像处理芯片侧的方法,或者,该计算机程序被处理器执行时实现本申请实施例所述的应用处理器侧的方法。The computer-readable storage medium provided by the embodiment of the present application has a computer program stored thereon, and when the computer program is executed by the processor, the method on the image processing chip side described in the embodiment of the present application is implemented, or the computer program is executed by the processor During execution, the method on the application processor side described in the embodiment of the present application is implemented.
在本申请实施例中,当接收到来自M路的第一待传数据集时,不是直接按照MIPI协议对M路的第一待传数据集进行打包,而是先将这M路第一待传数据集组织为小于M的N路第二待传数据集;然后,再按照MIPI协议对这N路第二待传数据集进行打包;如此,相比于直接对这M路第一待传输集进行打包传输的方案,能够通过较少的数据通道将这些数据传输给应用处理器,即通过N路而不是M路数据通道将这些数据传输给应用处理器。可见,本申请实施例提供的方案降低了对MIPI的硬件要求,即使有更多路的待传数据集,也能够使用较少的数据通道完成数据传输,从而即使MIPI具有的硬件数据通路较少也能够满足数据传输需求。In the embodiment of the present application, when receiving the first data set to be transmitted from M channels, the first data set to be transmitted from M channels is not directly packaged according to the MIPI protocol, but the first data set to be transmitted of the M channels is firstly packaged. The transmission data set is organized into N second data sets to be transmitted which are less than M; then, the N second data sets to be transmitted are packaged according to the MIPI protocol; The packaged transmission scheme can transmit the data to the application processor through fewer data channels, that is, transmit the data to the application processor through N channels instead of M channels. It can be seen that the solution provided by the embodiment of the present application reduces the hardware requirements for MIPI. Even if there are more data sets to be transmitted, fewer data channels can be used to complete data transmission, so that even if MIPI has fewer hardware data channels It can also meet the needs of data transmission.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本申请的实施例,并与说明书一起用于说明本申请的技术方案。The accompanying drawings here are incorporated into the specification and constitute a part of the specification. These drawings show embodiments consistent with the application, and are used together with the description to describe the technical solution of the application.
图1为图像处理的数据传输的基本架构示意图;FIG. 1 is a schematic diagram of the basic architecture of data transmission for image processing;
图2为本申请实施例提供的数据传输方法的实现流程示意图;FIG. 2 is a schematic diagram of the implementation flow of the data transmission method provided by the embodiment of the present application;
图3为本申请实施例的数据传输和数据接收方法的实现流程示意图;FIG. 3 is a schematic diagram of an implementation flow of a data transmission and data receiving method according to an embodiment of the present application;
图4为本申请实施例的电子设备的结构示意图;FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图5为3A数据在图像信号处理器(Image Signal Processor,ISP)的管线(即ISP的信号处理流程)中输出的位置示意图;Figure 5 is a schematic diagram of the output position of the 3A data in the pipeline of the Image Signal Processor (ISP) (ie, the signal processing flow of the ISP);
图6为3A数据在ISP的管线(即ISP的信号处理流程)中输出的位置示意图;FIG. 6 is a schematic diagram of the output position of 3A data in the ISP pipeline (ie, the signal processing flow of the ISP);
图7为前期图像处理(PreISP)芯片方案中的数据传输过程示意图;7 is a schematic diagram of the data transmission process in the early stage image processing (PreISP) chip solution;
图8为PreISP芯片的前处理ISP芯片端的架构示意图;Figure 8 is a schematic diagram of the architecture of the pre-processing ISP chip end of the PreISP chip;
图9为本申请实施例应用(Application,AP)侧平台端的软件框架示意图;9 is a schematic diagram of the software framework of the application (Application, AP) side platform of the embodiment of the present application;
图10为本申请实施例的数据传输和接收方法的实现流程示意图;FIG. 10 is a schematic diagram of an implementation flow of a data transmission and receiving method according to an embodiment of the present application;
图11为本申请实施例的重排之前与重排之后的结果对比示意图;Figure 11 is a schematic diagram of the comparison of the results before and after the rearrangement of the embodiment of the present application;
图12为本申请实施例数据传输装置的结构示意图;FIG. 12 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
图13为本申请实施例数据接收装置的结构示意图;FIG. 13 is a schematic structural diagram of a data receiving device according to an embodiment of the present application;
图14为本申请实施例提供的电子设备的结构示意图。FIG. 14 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请的具体技术方案做进一步详细描述。以下实施例用于说明本申请,但不用来限制本申请的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the specific technical solutions of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following examples are used to illustrate the present application, but not to limit the scope of the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, references to "some embodiments" describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.
需要指出,本申请实施例所涉及的术语“第一\第二\第三”等不代表针对对象的特定排序,可以理解地,“第一\第二\第三”等在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。It should be pointed out that the terms "first\second\third" etc. involved in the embodiment of the present application do not represent a specific ordering of objects. It is understandable that "first\second\third" etc. are allowed The specific order or sequencing may be interchanged such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein.
为了便于对本申请实施例的理解,先提供一种图像处理的数据传输的基本架构,图1为该架构的示意图,其中只示意出了部分关键模块,如图1所示,该架构1包括第二图像处理芯片10和应用处理器11;其中,第二图像处理芯片10包括ISP芯片101、MIPI-TX模块102、ISP芯片103和MIPI-TX模块104;应用处理器11包括MIPI-RX模块111、ISP芯片112、3A算法模块113、MIPI-RX模块114、ISP芯片115和3A算法模块116;其中,3A算法包括自动对焦(Automatic Focus,AF)算法、自动曝光(Automatic Exposure,AE)算法和自动白平衡(Automatic White Balance,AWB)算法;In order to facilitate the understanding of the embodiment of the present application, a basic architecture of data transmission for image processing is firstly provided. FIG. 1 is a schematic diagram of the architecture, in which only some key modules are shown. As shown in FIG. Two image processing chip 10 and application processor 11; Wherein, the second image processing chip 10 comprises ISP chip 101, MIPI-TX module 102, ISP chip 103 and MIPI-TX module 104; Application processor 11 comprises MIPI-RX module 111 , ISP chip 112, 3A algorithm module 113, MIPI-RX module 114, ISP chip 115 and 3A algorithm module 116; wherein, 3A algorithm includes automatic focus (Automatic Focus, AF) algorithm, automatic exposure (Automatic Exposure, AE) algorithm and Automatic White Balance (AWB) algorithm;
图像传感器20将传感数据传输给ISP芯片101,ISP芯片101对其进行处理,将得到的3A算法所需的统计数据(以下简称3A数据)、原始(raw)图像数据和PD数据传输给MIPI-TX模块102,MIPI-TX模块102将接收到的来自各路的数据集通过MIPI数据通道传输给应用处理器端的MIPI-RX模块111,MIPI-RX模块111将3A数据和PD数据传输给3A算法模块113,将raw图像数据传输给ISP芯片112;其中,PD数据包括相位信息,用于对焦。The image sensor 20 transmits the sensing data to the ISP chip 101, and the ISP chip 101 processes it, and transmits the obtained statistical data (hereinafter referred to as 3A data), original (raw) image data and PD data required by the 3A algorithm to the MIPI -TX module 102, the MIPI-TX module 102 transmits the received data sets from each channel to the MIPI-RX module 111 on the application processor side through the MIPI data channel, and the MIPI-RX module 111 transmits 3A data and PD data to 3A The algorithm module 113 transmits the raw image data to the ISP chip 112; wherein, the PD data includes phase information for focusing.
对于图像传感器21输出的传感数据的传输路径与图像传感器20的类型,这里不再赘述。The transmission path of the sensing data output by the image sensor 21 and the type of the image sensor 20 will not be repeated here.
需要说明的是,上述架构1只是为了便于理解本申请实施例而给出的示例,不能够造成对本申请实施例的范围的限制。对于本申请实施例所适用的第二图像处理芯片的结构和应用处理器的结构不做限制,对于数据通道传输的数据内容也不做限制,不限于是3A数据、PD数据和raw图像数据等。It should be noted that the above architecture 1 is only an example for the convenience of understanding the embodiment of the present application, and cannot limit the scope of the embodiment of the present application. There is no restriction on the structure of the second image processing chip and the application processor applicable to the embodiment of the present application, and there is no restriction on the data content transmitted by the data channel, which is not limited to 3A data, PD data and raw image data, etc. .
本申请实施例提供一种数据传输方法,用于在应用处理器和图像传感器之间传送图像数据,图2为本申请实施例提供的数据传输方法的实现流程示意图,如图2所示,该方法可以包括以下步骤201至步骤203:The embodiment of the present application provides a data transmission method for transmitting image data between the application processor and the image sensor. FIG. 2 is a schematic diagram of the implementation flow of the data transmission method provided in the embodiment of the present application. As shown in FIG. 2 , the The method may include the following steps 201 to 203:
步骤201,第二图像处理芯片将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M。 Step 201, the second image processing chip converts the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M.
可以理解地,在图像处理方案中,很多数据需要通过MIPI传输,例如,3A数据、raw图像数据以及PD数据等等。而这些待传数据集,同一类型的待传数据集,可能来源不同,相应地,传输路径也不同。比如,第一待传数据集的类型为3A数据,其中,AWB算法所需的统计数据来自LSC模块,AE算法所需的统计数据来自WB模块,AF算法所需的统计数据来自Demosaic模块。又如,第一待传数据集的类型均为raw图像数据,其中,一路raw图像数据来自第一颗图像传感器,另一路raw图像数据来自第二颗图像传感器;再如,第一待传数据集的类型均为raw图像数据,但是一路为短曝光数据、一路为中曝光数据和一路为长曝光数据。It can be understood that in the image processing solution, a lot of data needs to be transmitted through MIPI, for example, 3A data, raw image data, PD data and so on. And these data sets to be transmitted, the data sets to be transmitted of the same type may come from different sources, and correspondingly, the transmission paths are also different. For example, the type of the first data set to be transmitted is 3A data, wherein the statistical data required by the AWB algorithm comes from the LSC module, the statistical data required by the AE algorithm comes from the WB module, and the statistical data required by the AF algorithm comes from the Demosaic module. For another example, the types of the first data set to be transmitted are all raw image data, wherein one channel of raw image data comes from the first image sensor, and the other channel of raw image data comes from the second image sensor; as another example, the first data set to be transmitted The types of sets are all raw image data, but one path is short-exposure data, one path is medium-exposure data and one path is long-exposure data.
需要说明的是,M路的第一待传数据集可以是不同类型的数据集,也可以是相同类型的 数据集。是相同类型的情况下,例如在一些实施例中,所述第一待传数据集包括下列中的至少一项:执行3A算法所需的图像统计数据(简称3A数据)、PD数据和原始图像数据,即,M路第一待传数据集均为3A数据,或者,均为PD数据,或者均为原始图像数据。是不同类型的情况下,例如M路的第一待传数据集包括3A数据、PD数据和原始图像数据等。It should be noted that the first to-be-transmitted data sets of the M channels may be different types of data sets, or may be the same type of data sets. In the case of the same type, for example, in some embodiments, the first data set to be transmitted includes at least one of the following: image statistical data (abbreviated as 3A data), PD data and original image required to execute the 3A algorithm The data, that is, the M channels of first data sets to be transmitted are all 3A data, or all are PD data, or all are original image data. In the case of different types, for example, the first data set to be transmitted of M channels includes 3A data, PD data, and original image data.
在一些实施例中,M路的第一待传数据集为在同一时刻或者同一时间段产生的数据集。M路可以理解为M个传输路径或者M个不同模块。N路的含义与M路的含义类似,对于第二图像处理芯片而言,N路第二待传数据集可能来自N路传输路径,也可能由N个不同的模块输出。In some embodiments, the first data sets to be transmitted of the M channels are data sets generated at the same moment or in the same time period. The M paths can be understood as M transmission paths or M different modules. The meaning of N channels is similar to that of M channels. For the second image processing chip, the N channels of second data sets to be transmitted may come from N channels of transmission, or may be output by N different modules.
步骤202,第二图像处理芯片按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包。In step 202, the second image processing chip packs the N channels of second data sets to be transmitted according to the MIPI protocol to obtain a first batch of one or more MIPI data packets.
可能会存在这种情况,即某个第二待传数据集的长度超出了规定的MIPI数据包长度的上限,因此可能需要将该数据集拆分为两个MIPI数据包。There may be a situation where the length of a certain second data set to be transmitted exceeds the specified upper limit of the length of the MIPI data packet, so the data set may need to be split into two MIPI data packets.
步骤203,第二图像处理芯片将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器。 Step 203, the second image processing chip transmits the first batch of one or more MIPI data packets to the application processor through N data channels.
可以理解地,在MIPI协议中,有几路数据同时产生或在同一时间段产生,通常就用相同路数的数据通道进行传输。比如,有3路raw图像数据同时产生,那么遵循MIPI协议的MIPI-TX模块就会通过3路数据通道进行传输。这样就对MIPI硬件的数据通道数量提出了更高的要求,从而能够满足多种场景下的数据传输需求。例如,数据通道的数量要求既能够应对同时产生的3路数据集,也能够应对同时产生的5路、6路甚至8路数据集的传输需求,那么这就需要MIPI硬件具有多于3路的数据通道来满足传输需求。然而,硬件的数据通道的增加,随之带来的是硬件成本和设计空间成本。因此,如何在有限的设备空间内,通过较低的硬件成本应对不同场景下的数据传输需求,成为待解决的技术问题。It can be understood that, in the MIPI protocol, several channels of data are generated at the same time or in the same time period, and usually the same number of data channels are used for transmission. For example, if there are 3 channels of raw image data generated at the same time, the MIPI-TX module following the MIPI protocol will transmit them through 3 channels of data. In this way, higher requirements are put forward for the number of data channels of the MIPI hardware, so that data transmission requirements in various scenarios can be met. For example, the number of data channels is required to be able to cope with the simultaneous generation of 3-way data sets, as well as the transmission requirements of simultaneously generated 5-way, 6-way or even 8-way data sets, then this requires MIPI hardware to have more than 3-way data sets Data channels to meet transmission needs. However, the increase of hardware data channels brings hardware cost and design space cost. Therefore, how to meet the data transmission requirements in different scenarios with low hardware cost in a limited device space has become a technical problem to be solved.
在本申请实施例中,当接收到来自M路的第一待传数据集时,不是直接按照MIPI协议对这些数据集进行打包,而是先将这M路第一待传数据集组织为小于M的N路第二待传数据集;然后,再按照MIPI协议对这N路第二待传数据集进行打包;如此,相比于直接对这M路第一待传输集进行打包传输的方案,能够使得第二图像处理芯片通过较少的数据通道完成数据传输,即通过N路而不是M路数据通道将这些数据传输给应用处理器。In the embodiment of the present application, when receiving the first data sets to be transmitted from the M channels, these data sets are not directly packaged according to the MIPI protocol, but the first data sets to be transmitted from the M channels are organized into smaller than M's N-way second data sets to be transmitted; then, according to the MIPI protocol, the N-way second data sets to be transmitted are packaged; thus, compared to the scheme of directly packaging and transmitting the M-way first to-be-transmitted sets , enabling the second image processing chip to complete data transmission through fewer data channels, that is, to transmit these data to the application processor through N data channels instead of M data channels.
本申请实施例提供一种数据传输和数据接收方法,图3为本申请实施例的数据传输和数据接收方法的实现流程示意图,如图3所示,该方法可以包括以下步骤301至步骤307:The embodiment of the present application provides a data transmission and data receiving method. FIG. 3 is a schematic diagram of the implementation flow of the data transmission and data receiving method in the embodiment of the present application. As shown in FIG. 3 , the method may include the following steps 301 to 307:
步骤301,第二图像处理芯片按照特定的行数据长度,将来自M路的第一待传数据集中的待传数据分解成至少一行数据。 Step 301, the second image processing chip decomposes the data to be transmitted in the first data set to be transmitted from M channels into at least one row of data according to a specific row data length.
在一些实施例中,分解后的每行数据的长度都是固定的,均为特定的行数据长度。进一步地,在一些实施例中,相邻行数据之间存在一定的间隔,即相邻行数据之间存在空白数据,这样,能够为接收端预留一定的时间处理接收的行数据。In some embodiments, the length of each decomposed row of data is fixed, and is a specific row data length. Further, in some embodiments, there is a certain interval between adjacent rows of data, that is, there is blank data between adjacent rows of data, so that a certain time can be reserved for the receiving end to process the received row data.
对于特定的行数据长度的大小不做限定。例如,每行数据的长度为1024字节或2048字节等等。There is no limitation on the size of the specific row data length. For example, the length of each row of data is 1024 bytes or 2048 bytes and so on.
步骤302,第二图像处理芯片对所述至少一行数据进行重排,得到N路第二待传数据集;其中,M大于1,N大于0,且N小于M。In step 302, the second image processing chip rearranges the at least one row of data to obtain N channels of second data sets to be transmitted; wherein, M is greater than 1, N is greater than 0, and N is less than M.
在一些实施例中,第二待传数据集既包括数据本身的内容,还包括这些数据的元数据。可以理解地,元数据又称中介数据或中继数据,是描述数据的数据(data about data),主要是描述数据属性(property)的信息,用来支持如指示存储位置、历史数据、资源查找、文件记录等功能。在本实施例中,第二待传数据集的元数据,例如可以包括第二待传数据集的数据长度和/或数据类型等。In some embodiments, the second data set to be transmitted includes not only the content of the data itself, but also the metadata of these data. Understandably, metadata, also known as intermediary data or relay data, is the data describing data (data about data), mainly describing the information of data attributes (property), used to support such as indicating storage location, historical data, resource search , file recording and other functions. In this embodiment, the metadata of the second data set to be transmitted may include, for example, the data length and/or data type of the second data set to be transmitted.
在本申请实施例中,对于N的值不做限定。可以根据MIPI数据通道的数量而设定,总之N小于或等于MIPI数据通道的数量。例如,将来自3路的第一待传数据集组织为1路第 二待传数据集。又如,将来自6路的第一待数据集组织为2路第二待传数据集。M与N可以成倍数关系,也可以不是倍数关系。In the embodiment of the present application, the value of N is not limited. It can be set according to the number of MIPI data channels, in a word, N is less than or equal to the number of MIPI data channels. For example, the first data set to be transmitted from 3 channels is organized as the second data set to be transmitted from 1 channel. As another example, the first data sets to be transmitted from 6 channels are organized into the second data sets to be transmitted from 2 channels. M and N may or may not be in multiples.
在一些实施例中,第二图像处理芯片可以这样实现步骤302:确定每行数据的第一类型;将用于表征所述行数据的第一类型的标签更新至所述行数据中;对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集。In some embodiments, the second image processing chip can implement step 302 as follows: determine the first type of each row of data; update the first type of label used to represent the row of data into the row of data; update The last row of data is rearranged to obtain the N-way second data set to be transmitted.
例如,该第一类型的标签用于标识对应的行数据是数据本身的内容还是元数据。每行数据都标识有对应的第一类型,这样对于应用处理器端而言,在解析接收的MIPI数据包时,无需再分析和识别该行数据的类型,从而提高应用处理器的整体数据处理效率。For example, the first type of tag is used to identify whether the corresponding row data is the content of the data itself or metadata. Each line of data is marked with a corresponding first type, so that for the application processor side, when parsing the received MIPI data packet, it is not necessary to analyze and identify the type of the line of data, thereby improving the overall data processing of the application processor efficiency.
进一步地,在一些实施例中,对更新后的所述至少一行数据可以这样进行重排:确定更新后的每行数据的第二类型;所述第二类型属于所述第一类型的子类型,所述第一类型的标签用于标识对应的行数据是数据本身的内容或元数据;所述第二类型是指对应行数据的数据类型;根据所述第二类型与行号的映射关系,对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集;如此,便于应用处理器端快速解析。例如,应用处理器可以直接根据当前接收的数据所在的行号,确定该行数据的第二类型。Further, in some embodiments, the updated at least one row of data may be rearranged in the following way: determine the second type of each updated row of data; the second type belongs to a subtype of the first type , the first type of tag is used to identify that the corresponding row data is the content or metadata of the data itself; the second type refers to the data type of the corresponding row data; according to the mapping relationship between the second type and row number , rearranging the at least one row of updated data to obtain the N-way second data set to be transmitted; in this way, it is convenient for the application processor to analyze quickly. For example, the application processor may directly determine the second type of the row of data according to the row number of the currently received data.
更进一步地,第二图像处理芯片可以根据预先设置的映射表获知每行应该对应存放的第二类型,即映射表里记录了第二类型与行号的映射关系。例如,表1所示,其中,第一行约定存放长曝光的raw图像数据,第二行约定存放短曝光的raw图像数据,第三行约定存放中曝光的raw图像数据,第四行约定存放3A数据中的AWB算法所需的统计数据(简称AWB数据),第五行约定存放3A数据中的AE算法所需的统计数据(简称AE数据),第六行约定存放AF算法所需的统计数据(简称AF数据),等等。Furthermore, the second image processing chip can know the second type that each row should correspond to according to the preset mapping table, that is, the mapping relationship between the second type and the row number is recorded in the mapping table. For example, as shown in Table 1, the first row agrees to store long-exposure raw image data, the second row agrees to store short-exposure raw image data, the third row agrees to store mid-exposure raw image data, and the fourth line agrees to store The statistical data required by the AWB algorithm in the 3A data (abbreviated as AWB data), the fifth line agrees to store the statistical data required by the AE algorithm in the 3A data (abbreviated as AE data), and the sixth line agrees to store the statistical data required by the AF algorithm (referred to as AF data), and so on.
表1Table 1
第一行first row 长曝光的raw图像数据Long exposure raw image data
第二行second line 短曝光的raw图像数据Short exposure raw image data
第三行The third row 中曝光的raw图像数据Raw image data exposed in
第四行fourth row AWB数据AWB data
第五行The fifth line AE数据AE data
第六行sixth line AF数据AF data
……... ……...
每行的数据长度是固定的,行的数目可以根据接收的总数据集的大小而调整。不同大小的总数据集,其对应的映射表是不同的。比如M路第一待传数据集为raw图像数据,其总数据大小为3K字节,特定的行数据长度为1024字节,其对应的映射表的内容如表2所示,其中,第一行约定存放长曝光的raw图像数据,第二行约定存放中曝光的raw图像数据,第三行约定存放短曝光的raw图像数据。又如,M路第一待传数据集为raw图像数据,其总数据大小为6K字节,特定的行数据长度为1024字节,其对应的映射表的内容如表3所示,其中,第一行和第二行约定存放长曝光的raw图像数据,第三行和第四行约定存放中曝光的raw图像数据,第五行和第六行约定存放短曝光的raw图像数据。The data length of each row is fixed, and the number of rows can be adjusted according to the size of the total data set received. Total data sets of different sizes have different corresponding mapping tables. For example, the first data set to be transmitted in the M channel is raw image data, its total data size is 3K bytes, and the specific row data length is 1024 bytes. The contents of the corresponding mapping table are shown in Table 2. Among them, the first The first row agrees to store long-exposure raw image data, the second row agrees to store mid-exposure raw image data, and the third row agrees to store short-exposure raw image data. As another example, the first data set to be transmitted in M channels is raw image data, its total data size is 6K bytes, and the specific line data length is 1024 bytes, and the contents of the corresponding mapping table are shown in Table 3, wherein, The first and second lines agree to store long-exposure raw image data, the third and fourth lines agree to store medium-exposure raw image data, and the fifth and sixth lines agree to store short-exposure raw image data.
表2Table 2
第一行first row 长曝光的raw图像数据Long exposure raw image data
第二行second line 长曝光的raw图像数据Long exposure raw image data
第三行The third row 中曝光的raw图像数据Raw image data exposed in
第四行fourth row 中曝光的raw图像数据Raw image data exposed in
第五行The fifth line 短曝光的raw图像数据Short exposure raw image data
第六行sixth line 短曝光的raw图像数据Short exposure raw image data
第一行first row 长曝光的raw图像数据Long exposure raw image data
第二行second line 中曝光的raw图像数据Raw image data exposed in
第三行The third row 短曝光的raw图像数据Short exposure raw image data
第二图像处理芯片在对更新后的所述至少一行数据进行重排时,可以根据M路的第一待传数据集或者所述更新后的所述至少一行数据的总数据大小,调用对应的映射表,然后按照该映射表中约定的每行对应存放的第二类型,将更新后的所述至少一行数据进行重排。When the second image processing chip rearranges the updated at least one row of data, it may call the corresponding The mapping table, and then rearrange the updated at least one row of data according to the second type corresponding to each row agreed in the mapping table.
步骤303,第二图像处理芯片按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包。 Step 303 , the second image processing chip packs the N channels of second data sets to be transmitted according to the MIPI protocol to obtain a first batch of one or more MIPI data packets.
可以理解地,打包即为对数据进行封装,例如在第二待传数据集的开头增加包头信息,在第二待传数据集的结尾增加包尾信息等。可见,封装好的第二待传数据集,即MIPI数据包中的每行的数据长度为特定的行数据长度。在一些实施例中,将一路第二待传数据集封装为一个MIPI数据包。It can be understood that packing means encapsulating data, for example, adding header information at the beginning of the second data set to be transmitted, adding packet tail information at the end of the second data set to be transmitted, and so on. It can be seen that the encapsulated second data set to be transmitted, that is, the data length of each line in the MIPI data packet is a specific line data length. In some embodiments, one channel of the second data set to be transmitted is encapsulated into one MIPI data packet.
步骤304,第二图像处理芯片将所述第一批一个或多个MIPI数据包均匀地分配给所述N路数据通道并通过所述N路数据通道传输给所述应用处理器。Step 304, the second image processing chip evenly distributes the first batch of one or more MIPI data packets to the N data channels and transmits them to the application processor through the N data channels.
例如,N路数据通道可以逐行地将MIPI数据包传输给应用处理器。For example, N data lanes can transmit MIPI packets to the application processor line by line.
第二图像处理芯片将所述第一批一个或多个MIPI数据包均匀地或者非均匀地分配给N路数据通道。不同的数据通道负责传输被分配的MIPI数据包。在一些实施例中,一路数据通道可以将MIPI数据包逐行串行传输给应用处理器;其中,相邻行数据之间具有固定大小的空白数据,即空白间隔,该间隔的目的是为了给应用处理器的MIPI-RX模块预留一定的时间解析接收到的行数据。The second image processing chip distributes the first batch of one or more MIPI data packets to the N data channels uniformly or non-uniformly. Different data lanes are responsible for transporting assigned MIPI packets. In some embodiments, one data channel can serially transmit MIPI data packets to the application processor line by line; wherein, there is blank data of a fixed size between adjacent line data, that is, blank intervals, and the purpose of this interval is to provide The MIPI-RX module of the application processor reserves a certain amount of time to parse the received row data.
步骤305,应用处理器根据特定的行数据长度,确定当前是否接收到一整行数据;如果是,执行步骤306;否则,返回执行步骤305; Step 305, the application processor determines whether a whole row of data is currently received according to the specific row data length; if yes, execute step 306; otherwise, return to execute step 305;
步骤306,应用处理器对当前接收到的一行数据进行解析,得到解析数据。In step 306, the application processor parses the currently received row of data to obtain parsed data.
在一些实施例中,应用处理器的MIPI-RX模块每接收一行数据,就产生一个行中断,从而触发应用处理器的数据解析模块对当前接收到的一行数据进行解析;如此,利用行中断,实现边传输边解析,无需等待所有行数据(即图像处理的缓存数据)传输结束再解析;从而,使得数据传输达到更短延时的传输甚至达到零延时传输,进而提高应用处理器的整体数据处理效率。例如,对于AF算法来讲,快速获取解析数据,能够提高自动对焦速度,从而提升用户体验。In some embodiments, whenever the MIPI-RX module of the application processor receives a row of data, it generates a row interrupt, thereby triggering the data parsing module of the application processor to parse the currently received row of data; thus, using the row interrupt, Realize parsing while transmitting, no need to wait for all row data (that is, cache data for image processing) to be transmitted and then parse; thus, data transmission can achieve shorter delay transmission or even zero delay transmission, thereby improving the overall performance of the application processor Data processing efficiency. For example, for the AF algorithm, fast acquisition of analytical data can improve the autofocus speed, thereby improving user experience.
其中,数据解析模块可以包括在应用处理器的MIPI-RX模块中,也可以是独立于MIPI-RX模块的另一模块。Wherein, the data parsing module may be included in the MIPI-RX module of the application processor, or may be another module independent of the MIPI-RX module.
步骤307,应用处理器将所述解析数据发送给对应的第一图像处理芯片。 Step 307, the application processor sends the analysis data to the corresponding first image processing chip.
在一些实施例中,应用处理器可以这样实现步骤306:确定所述解析数据的行号;根据约定的每行对应存放的第二类型,确定所述解析数据的第二类型;根据所述解析数据的第二类型,将所述解析数据发送给对应的第一图像处理芯片。In some embodiments, the application processor can implement step 306 in the following way: determine the line number of the parsed data; determine the second type of the parsed data according to the agreed second type corresponding to each line; For the second type of data, the analysis data is sent to the corresponding first image processing chip.
举例来说,如果解析得到的行数据的第二类型为3A数据或PD数据,则将该数据传输给3A算法模块,该模块为一图像处理芯片。又如,解析数据的第二类型为raw图像数据,则将该数据传输给ISP芯片,该芯片与3A算法模块为不同的芯片。For example, if the second type of the row data obtained through analysis is 3A data or PD data, the data is transmitted to a 3A algorithm module, which is an image processing chip. For another example, if the second type of the analysis data is raw image data, the data is transmitted to the ISP chip, which is a different chip from the 3A algorithm module.
本申请实施例提供一种电子设备,图4为本申请实施例的电子设备的结构示意图,如图4所示,电子设备4包括第二图像处理芯片40、应用处理器41和至少N路数据通道42;其中,第二图像处理芯片40包括转换电路401、MIPI-TX电路402;应用处理器41包括MIPI-RX电路411、数据解析模块412和第一图像处理芯片413;其中,The embodiment of the present application provides an electronic device. FIG. 4 is a schematic structural diagram of the electronic device in the embodiment of the present application. As shown in FIG. 4 , the electronic device 4 includes a second image processing chip 40, an application processor 41 and at least N channels of data Channel 42; wherein, the second image processing chip 40 includes a conversion circuit 401, a MIPI-TX circuit 402; the application processor 41 includes a MIPI-RX circuit 411, a data analysis module 412 and a first image processing chip 413; wherein,
转换电路401,用于将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;A conversion circuit 401, configured to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M;
MIPI-TX电路402,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;以及The MIPI-TX circuit 402 is configured to pack the N-way second data sets to be transmitted according to the MIPI protocol to obtain the first batch of one or more MIPI data packets; and
将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器的MIPI-RX电路411。The first batch of one or more MIPI data packets is transmitted to the MIPI-RX circuit 411 of the application processor through N data channels.
MIPI-RX电路411,根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据触发数据解析模块412;否则,继续接收和根据当前接收的数据长度判断是否接收到一整行数据;MIPI-RX circuit 411, according to the specific line data length, determines whether a whole line of data is currently received; if a whole line of data is currently received, the data analysis module 412 is triggered; otherwise, continue to receive and judge whether to receive according to the currently received data length Received a whole line of data;
数据解析模块412,用于对当前接收到的一行数据进行解析,得到解析数据,以及将所述解析数据发送给对应的第一图像处理芯片413。The data parsing module 412 is configured to parse a row of currently received data to obtain parsed data, and send the parsed data to the corresponding first image processing chip 413 .
在一些实施例中,MIPI-RX电路,用于根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据,输出行中断给所述数据解析模块,以触发所述数据解析模块对当前接收到的一行数据进行解析。In some embodiments, the MIPI-RX circuit is used to determine whether an entire line of data is currently received according to a specific line data length; if an entire line of data is currently received, the output line is interrupted to the data analysis module to The data parsing module is triggered to parse the currently received row of data.
在一些实施例中,可以通过软件的方式实现数据解析模块412的功能,例如通过CPU运行相关程序以实现该模块的功能。In some embodiments, the functions of the data parsing module 412 can be realized by means of software, for example, a CPU can run related programs to realize the functions of the module.
第一图像处理芯片413,用于根据接收的每一所述解析数据,执行特定的图像处理算法。The first image processing chip 413 is configured to execute a specific image processing algorithm according to each received analysis data.
例如,第一图像处理芯片413为用以实现3A算法的芯片。又如,第一图像处理芯片413为ISP芯片。For example, the first image processing chip 413 is a chip for implementing the 3A algorithm. In another example, the first image processing chip 413 is an ISP chip.
在一些实施例中,转换电路401,可以按照特定的行数据长度,将所述M路第一待传数据集中的待传数据分解成至少一行数据;确定每行数据的第一类型;将用于表征所述行数据的第一类型的标签更新至所述行数据中;确定更新后的每行数据的第二类型;所述第二类型属于所述第一类型的子类型;根据所述第二类型与行号的映射关系,对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集;MIPI-TX电路402,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;以及将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器的MIPI-RX电路411。In some embodiments, the conversion circuit 401 can decompose the data to be transmitted in the M-way first data set to be transmitted into at least one row of data according to a specific row data length; determine the first type of each row of data; use The label of the first type representing the row data is updated in the row data; the second type of each row of data after the update is determined; the second type belongs to the subtype of the first type; according to the The mapping relationship between the second type and the line number is to rearrange the updated at least one line of data to obtain the N-way second data set to be transmitted; the MIPI-TX circuit 402 is used to transmit the data according to the MIPI protocol. The second data set to be transmitted in N roads is packaged to obtain the first batch of one or more MIPI data packets; RX circuit 411.
相应地,MIPI-RX电路411,可以根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据,发送行中断给数据解析模块412;数据解析模块412,响应于行中断,对当前接收到的一行数据进行解析,得到解析数据;确定所述解析数据的行号;根据约定的每行对应存放的第二类型,确定所述解析数据的第二类型;根据所述解析数据的第二类型,将所述解析数据发送给对应的第一图像处理芯片。Correspondingly, the MIPI-RX circuit 411 can determine whether a whole row of data is currently received according to the specific row data length; if a whole row of data is currently received, the sending row is interrupted to the data parsing module 412; the data parsing module 412, In response to the line interruption, analyze the currently received line of data to obtain the analysis data; determine the line number of the analysis data; determine the second type of the analysis data according to the agreed second type corresponding to each line stored; According to the second type of the analysis data, the analysis data is sent to a corresponding first image processing chip.
需要说明的是,以上关于电子设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请电子设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be noted that the above description about the electronic 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 electronic device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
在PreISP芯片(即第二图像处理芯片的一种示例)方案中,很多数据需要通过移动产业处理器接口(Mobile Industry Processor Interface,MIPI)传输,例如3A数据、raw图像数据和PD数据等均需要通过MIPI传输。In the solution of the PreISP chip (that is, an example of the second image processing chip), a lot of data needs to be transmitted through the Mobile Industry Processor Interface (MIPI), such as 3A data, raw image data and PD data. Transport via MIPI.
关于3A数据的相关介绍如下:The relevant introduction about 3A data is as follows:
3A算法,即自动曝光(AE)算法、自动白平衡(AWB)算法和自动对焦(AF)算法,这些算法所需的统计数据是在图像信号处理(ISP)芯片中产生的,ISP芯片通过对收到的图像数据中各个像素点的亮度和色彩等进行统计,统计的结果将主要用于3A算法。3A algorithm, that is, automatic exposure (AE) algorithm, automatic white balance (AWB) algorithm and automatic focus (AF) algorithm. The statistical data required by these algorithms are generated in the image signal processing (ISP) chip. The brightness and color of each pixel in the received image data are counted, and the statistical results will be mainly used for the 3A algorithm.
3A数据在ISP的管线(即ISP的信号处理流程)中输出的位置如图5所示,其中,AF算法所需的统计数据包括:对图像传感器输出的图像做的统计、对Degamma模块输出的图像做的统计、对Demosaic模块输出的图像做的统计、对YUV NR/Sharpening模块输出的图像做的统计;AE算法所需的统计数据包括:对LSC模块输出的图像做的统计、对WB模块输出的图像做的统计、对CCM模块输出的图像做的统计、以及对CSM模块输出的图像做的统计;AWB算法所需的统计数据包括:对LSC模块输出的图像做的统计、对Demosaic 模块输出的图像做的统计和对CCM模块输出的图像做的统计。由此可见,AF的统计位置较多。The output position of the 3A data in the ISP pipeline (that is, the signal processing flow of the ISP) is shown in Figure 5, where the statistical data required by the AF algorithm includes: statistics on the images output by the image sensor, and the output of the Degamma module Statistics of images, statistics of images output by Demosaic module, statistics of images output by YUV NR/Sharpening module; statistical data required by AE algorithm include: statistics of images output by LSC module, WB module The statistics of the output image, the statistics of the image output by the CCM module, and the statistics of the image output by the CSM module; the statistical data required by the AWB algorithm include: the statistics of the image output by the LSC module, and the statistics of the Demosaic module The statistics of the output images and the statistics of the images output by the CCM module. It can be seen that there are many statistical positions of AF.
需要说明的是,BLC模块,用于黑电平校正;Degamma模块,用于调整画面的对比度;NR模块,用于降噪;LSC(Lens Shade Correction)模块,用于镜头阴影校正;WB模块,用于白平衡;Demosaic模块,用于去马赛克;CCM模块,用于色彩校正;Gamma模块,用于调整画面的对比度;Sharpening模块,用于锐化;CSM模块,用于色彩空间转化;YUV NR/Sharpening模块,用于降噪/锐化。It should be noted that the BLC module is used for black level correction; the Degamma module is used to adjust the contrast of the picture; the NR module is used for noise reduction; the LSC (Lens Shade Correction) module is used for lens shading correction; the WB module, Used for white balance; Demosaic module, used for demosaic; CCM module, used for color correction; Gamma module, used to adjust the contrast of the picture; Sharpening module, used for sharpening; CSM module, used for color space conversion; YUV NR /Sharpening module for noise reduction/sharpening.
在一些实施例中,3A数据的输出位置,比较典型的配置如图6所示,其中,AWB算法所需的统计数据主要是对LSC模块输出的图像进行统计得到的,AE算法所需的统计数据主要是对WB模块输出的图像进行统计得到的,AF算法所需的统计数据主要是对Demosaic模块输出的图像进行统计得到的。如图6中,AE模块主要用于统计AE算法所需的统计数据,AF模块主要用于统计AF算法所需的统计数据,AWB模块主要用于统计AWB算法所需的统计数据。In some embodiments, the typical configuration of the output position of 3A data is as shown in Figure 6, wherein the statistical data required by the AWB algorithm is mainly obtained by statistics on the images output by the LSC module, and the statistical data required by the AE algorithm The data is mainly obtained by statistics on the images output by the WB module, and the statistical data required by the AF algorithm is mainly obtained by statistics on the images output by the Demosaic module. As shown in Figure 6, the AE module is mainly used to count the statistical data required by the AE algorithm, the AF module is mainly used to count the statistical data required by the AF algorithm, and the AWB module is mainly used to count the statistical data required by the AWB algorithm.
其中,AE算法所需的统计数据主要包括R、G、B直方图和亮度信息,统计数据通常是图像的兴趣区域(Region Of Interest,ROI)的。Among them, the statistical data required by the AE algorithm mainly includes R, G, B histogram and brightness information, and the statistical data is usually the Region Of Interest (ROI) of the image.
AWB算法所需的统计数据主要包括ROI区域的R、G、B像素的点的个数的统计、红绿的比值和蓝绿的比值。The statistical data required by the AWB algorithm mainly includes the statistics of the number of R, G, and B pixel points in the ROI area, the ratio of red to green and the ratio of blue to green.
AF算法所需的统计数据包括ROI区域的各个小块的清晰度值。The statistical data required by the AF algorithm includes the sharpness value of each small block in the ROI area.
从当前ISP的结构上看,ISP会产生较多的AE统计数据、AWB统计数据和AF统计数据,这些信息需要发送给3A算法模块处理。当系统中包括多个摄像头时,每个摄像头的统计数据会被单独统计,然后发送到各自独立的AP侧的3A算法模块。Judging from the structure of the current ISP, the ISP will generate more AE statistical data, AWB statistical data and AF statistical data, and these information need to be sent to the 3A algorithm module for processing. When the system includes multiple cameras, the statistical data of each camera will be counted separately, and then sent to the 3A algorithm modules on the independent AP side.
DOL传感器能够同时产生3路raw图像数据和PD数据;其中,PD数据为相位信息,用于对焦。The DOL sensor can simultaneously generate 3 channels of raw image data and PD data; among them, the PD data is phase information for focusing.
图7示出了PreISP芯片方案中的数据传输过程,从图中可以看出,受限于硬件,MIPI会分多路传输这些数据。Figure 7 shows the data transmission process in the PreISP chip solution. It can be seen from the figure that, limited by the hardware, MIPI will multiplex the data.
在平滑变焦等模式,需要多摄像头同时打开的情况,每一颗图像传感器(sensor)的3A数据都需要回传,每颗sensor都要统计,数据量会加倍;另外,对于3DOL(snoy多曝光)sensor会输出长、中、短raw图像数据。对每路数据都需要统计3A数据。如果系统中有2路3DOL sensor,则需要统计3路×2颗sensor×3A,可见,至少需要使用和传递18种类的统计数据。再加上(3路Raw图像数据+3路PD数据)×2颗sensor,一共有30路数据。In modes such as smooth zoom, where multiple cameras need to be turned on at the same time, the 3A data of each image sensor (sensor) needs to be sent back, and each sensor must be counted, and the amount of data will be doubled; in addition, for 3DOL (snoy multi-exposure ) sensor will output long, medium and short raw image data. For each channel of data, 3A data needs to be counted. If there are 2 channels of 3DOL sensors in the system, it is necessary to count 3 channels × 2 sensors × 3A. It can be seen that at least 18 types of statistical data need to be used and transmitted. Plus (3 channels of Raw image data + 3 channels of PD data) × 2 sensors, a total of 30 channels of data.
然而,由于硬件限制,采用上述PreISP芯片方案遇到如下问题:However, due to hardware limitations, the above-mentioned PreISP chip solution encounters the following problems:
(1)MIPI硬件的数据通道数量较少,不能满足需求;(1) The number of data channels of MIPI hardware is small, which cannot meet the demand;
(2)乱序排列数据之后,解析性能不佳,成为影响性能的瓶颈。(2) After the data is arranged out of order, the parsing performance is poor, which becomes a bottleneck affecting performance.
基于此,下面将说明本申请实施例在一个实际的应用场景中的示例性应用。Based on this, an exemplary application of the embodiment of the present application in an actual application scenario will be described below.
在本申请实施例中,将PreISP芯片的MIPI数据通过缓冲硬件,组织为每行1024字节,不同的数据组成一帧,不同的类型的数据,约定放在固定行中。平台端(即AP端)接收到MIPI数据时逐行接收,并产生行中断,平台端对行号计数,并按行号解析接收的数据。In the embodiment of this application, the MIPI data of the PreISP chip is organized into 1024 bytes per line through the buffer hardware, and different data forms a frame, and different types of data are agreed to be placed in fixed lines. When the platform side (that is, the AP side) receives the MIPI data line by line, and generates a line interruption, the platform side counts the line number and parses the received data according to the line number.
如图8所示,图中只列了重点的模块,PreISP芯片的前处理ISP芯片端的架构,硬件主要包含:CPU、MIPI、NPU和转换电路等;其中,As shown in Figure 8, only the key modules are listed in the figure, the architecture of the pre-processing ISP chip side of the PreISP chip, and the hardware mainly includes: CPU, MIPI, NPU and conversion circuits, etc.; among them,
CPU:负责和AP端交互。接收AP发送的控制命令和数据,并发送信息回传给AP。还负责对ISP芯片和NPU等模块的控制。CPU: Responsible for interacting with the AP. Receive control commands and data sent by AP, and send information back to AP. It is also responsible for the control of modules such as ISP chip and NPU.
ISP芯片:负责图像基础的处理。和常规的ISP功能类似,包括坏点校正、暗电流校正、镜头阴影校正、数字增益、白平衡、Demosaic、颜色校正、Gamma和降噪等模块;ISP chip: responsible for image-based processing. Similar to conventional ISP functions, including bad pixel correction, dark current correction, lens shading correction, digital gain, white balance, Demosaic, color correction, Gamma and noise reduction modules;
转换电路:负责将多路MIPI数据组织为一路3A、一路raw图像数据和一路PD数据。Conversion circuit: responsible for organizing multiple channels of MIPI data into one channel of 3A, one channel of raw image data and one channel of PD data.
NPU:运行AI算法,以对预览数据处理,例如,降噪、HDR和/或超分辨率等;NPU: run AI algorithms to process preview data, such as noise reduction, HDR and/or super resolution, etc.;
MIPI-TX模块:将组织好的数据(如3A、raw图像数据和PD数据)进行打包封装,然 后再通过MIPI协议发送给AP端的ISP芯片,AP端的ISP芯片对接收的数据做进一步的处理。MIPI-TX module: Package the organized data (such as 3A, raw image data and PD data), and then send it to the ISP chip on the AP side through the MIPI protocol, and the ISP chip on the AP side will further process the received data.
AP端模块:AP module:
数据解析(Unpack)模块:是一软件模块,用于将PreISP芯片的打包数据解包,解包之后3A数据分为AE、AF、AWB算法所需的统计数据,raw数据分为长、中、短3路数据。解包之后的数据,对应算法可以直接使用。Data parsing (Unpack) module: It is a software module used to unpack the packaged data of the PreISP chip. After unpacking, the 3A data is divided into statistical data required by the AE, AF, and AWB algorithms. The raw data is divided into long, medium, and Short 3-way data. After unpacking the data, the corresponding algorithm can be used directly.
ISP芯片:负责图像基础的处理,在本申请实施例中主要用于拍照的处理。和常规的ISP芯片的功能类似,与PreISP芯片中的ISP芯片对比功能更强大,但是无法定制化,功能比较固定。一个ISP芯片中包含ISP 0和ISP 1,ISP芯片能够收到数据。另外,3A算法在CPU上执行。ISP chip: responsible for image-based processing, mainly used for photo-taking processing in this embodiment of the application. Similar to conventional ISP chips, it has more powerful functions than the ISP chips in PreISP chips, but it cannot be customized and its functions are relatively fixed. An ISP chip includes ISP 0 and ISP 1, and the ISP chip can receive data. In addition, the 3A algorithm is executed on the CPU.
CPU:负责PreISP芯片的控制,例如,上电、下电、固件加载和运行时的相关控制等。CPU: Responsible for the control of the PreISP chip, such as power-on, power-off, firmware loading, and related control during runtime.
3A算法模块:用于处理3A数据,实现3A功能。3A algorithm module: used to process 3A data and realize 3A functions.
在本申请实施例中,AP侧平台端的软件框架如图9所示,其中,In the embodiment of this application, the software framework of the AP side platform is shown in Figure 9, wherein,
内核(Kernel)层主要有设备模块的驱动(driver),如图像传感器的驱动(sensor driver)、I2c driver、SDIO driver和平台端的PreISP芯片的driver等,通过驱动可以配置设备的初始化和状态切换等工作;The kernel (Kernel) layer mainly includes the driver of the device module, such as the driver of the image sensor (sensor driver), I2c driver, SDIO driver and the driver of the PreISP chip on the platform side, etc., through which the device initialization and state switching can be configured. Work;
HAL层主要控制平台端的通过SDIO接收PreISP芯片输出的图像数据、统计数据和环境光信息,然后执行3A算法;零延时拍照(Zero Shutter Lang,ZSL)负责raw图像数据的接收和解析,以及raw图像数据的进一步后处理算法和针对拍照的ISP pipeline控制。The HAL layer mainly controls the platform to receive the image data, statistical data and ambient light information output by the PreISP chip through SDIO, and then executes the 3A algorithm; Zero Shutter Lang (ZSL) is responsible for receiving and analyzing raw image data, and raw Further post-processing algorithms for image data and ISP pipeline control for taking pictures.
Framework层:Android的原始框架,是HAL和APP的中间件。Framework layer: the original framework of Android, which is the middleware of HAL and APP.
App层:主要通过Google标准的Camera API2使用Camera,系统Camera或三方Camera应用;App layer: Mainly use Camera, system Camera or third-party Camera application through Google standard Camera API2;
本申请实施例的运行流程图如图10所示,包括以下步骤101至步骤106:The operation flowchart of the embodiment of the present application is shown in Figure 10, including the following steps 101 to 106:
步骤101,打开双摄像头,控制前处理PreISP芯片开始工作; Step 101, turn on the dual cameras, and control the pre-processing PreISP chip to start working;
步骤102,PreISP芯片开始处理图像数据,并产生3A数据(stats),将这些统计数据发送给转换电路。 Step 102, the PreISP chip starts to process the image data, and generates 3A data (stats), and sends these statistical data to the conversion circuit.
步骤103,转换电路将多路的raw图像数据、PD数据和3A数据组织为一路3A数据、一路raw图像数据和一路PD数据。In step 103, the conversion circuit organizes multiple channels of raw image data, PD data and 3A data into one channel of 3A data, one channel of raw image data and one channel of PD data.
步骤104,通过MIPI-TX模块将这些数据打包为MIPI数据包发送给AP; Step 104, these data are packaged as MIPI packets and sent to the AP through the MIPI-TX module;
步骤105,AP接收到MIPI数据包,将MIPI数据包发送给数据解析模块进行解包。 Step 105, the AP receives the MIPI data packet, and sends the MIPI data packet to the data parsing module for unpacking.
步骤106,解包之后的raw图像数据发送给ISP芯片,ISP芯片基于管线(pipeline)对其进行处理,解包之后的3A数据和PD数据发送给3A算法模块。 Step 106, send the unpacked raw image data to the ISP chip, and the ISP chip processes it based on the pipeline, and send the unpacked 3A data and PD data to the 3A algorithm module.
PreISP芯片的转换电路为硬件实现的模块,主要实现以下功能:The conversion circuit of the PreISP chip is a module realized by hardware, which mainly realizes the following functions:
在PreISP芯片中接收到图像传感器的raw图像数据、PD数据和产生的3A数据;然后,转换电路对这些数据进行重排。如图11所示,重排之前,每一行的数据长度不同,重排之后,每一行均为固定的数据长度,即均为1024字节,且相邻行之间具有一定长度的数据间隔(即blank)。且重排之后,将raw图像数据组织为一路数据集,将PD数据组织为一路数据集,将3A数据组织为一路数据集。The raw image data, PD data and generated 3A data of the image sensor are received in the PreISP chip; then, the conversion circuit rearranges these data. As shown in Figure 11, before the rearrangement, the data length of each row is different. After the rearrangement, each row has a fixed data length, that is, 1024 bytes, and there is a data interval of a certain length between adjacent rows ( That is, blank). And after rearranging, the raw image data is organized into one data set, the PD data is organized into one data set, and the 3A data is organized into one data set.
对数据重排之后,各行的数据对应固定长度的数据,已达成快速解析协议。打包协议如下:After rearranging the data, each line of data corresponds to fixed-length data, and a fast parsing agreement has been reached. The packaging protocol is as follows:
(1)打包之后,打包为行宽度为固定宽度1024Bytes。(1) After packing, the line width is fixed to 1024Bytes.
(2)打包的各行对应约定映射表(mapping table),用于约定分配固定的数据。例如,第一行为长曝光的raw图像数据,第二行为短曝光的raw图像数据等。(2) The packed rows correspond to the agreed mapping table, which is used to agree to allocate fixed data. For example, the first row is long-exposure raw image data, the second row is short-exposure raw image data, and so on.
AP侧的数据解析模块为软件模块。使用和PreISP芯片相同的映射表,通过软件可以快速的将接收的数据块解析出来。示意伪代码如下:The data analysis module on the AP side is a software module. Using the same mapping table as the PreISP chip, the received data blocks can be quickly parsed by software. The schematic pseudo code is as follows:
Figure PCTCN2022100458-appb-000001
Figure PCTCN2022100458-appb-000001
Figure PCTCN2022100458-appb-000002
Figure PCTCN2022100458-appb-000002
其中,i表示行号,line_count_of_pack表示MIPI数据包的行数,每行的长度为1024,line_count_of_pack的值为整数,可以根据总数据大小调整,每轮循环会根据映射表判断该行是否为raw图像数据、PD数据或3A数据;一轮循环可以解析所有的包,解析完即可发送给3A算法模块或者ISP芯片进行处理。Among them, i represents the line number, line_count_of_pack represents the number of lines of MIPI data packets, the length of each line is 1024, and the value of line_count_of_pack is an integer, which can be adjusted according to the total data size. Each cycle will judge whether the line is a raw image according to the mapping table Data, PD data or 3A data; all packets can be parsed in one cycle, and then sent to the 3A algorithm module or ISP chip for processing after parsing.
AP侧的数据解析模块的触发方式可以通过行中断的方式触发。在AP侧的MIPI协议中可以设置为每接收到一行数据就产生一个行中断。即边传输,边触发解析。而无需等待所有缓存数据(buffer)传输结束再解析。The trigger mode of the data parsing module on the AP side can be triggered by a line interrupt mode. In the MIPI protocol on the AP side, it can be set to generate a line interrupt every time a line of data is received. That is, it triggers analysis while transmitting. There is no need to wait for all cached data (buffer) transmission to end before parsing.
在本申请实施例中,(1)在PreISP芯片方案中按固定的行间距,固定的行数目进行传输,解析速度快;(2)利用行中断,边传输边解析,使传输达到零延时传输;(3)每行1024字节传输,使得在AP侧解析速度更快;In the embodiment of the present application, (1) in the PreISP chip scheme, transmission is carried out according to a fixed line spacing and a fixed number of lines, and the analysis speed is fast; (2) line interruption is used to analyze while transmitting, so that the transmission reaches zero delay Transmission; (3) Transmission of 1024 bytes per line, making the parsing speed on the AP side faster;
在本申请实施例中,将raw图像数据和meta数据按照规则的排列方式打包,使MIPI接收端能够使用较少的VC_DT且能够快速接收;对于raw图像数据和meta数据,分解成若干行,每行的长度为固定长度。每行前面加一个tag,tag用于表示数据类型(raw图像数据和meta图像数据的类型不一致)。然后,将数据打包到同一个VC_DT的MIPI数据包中。通过MIPI硬件的同一个VC_DT发送给AP。In the embodiment of the present application, the raw image data and meta data are packed in a regular arrangement, so that the MIPI receiving end can use less VC_DT and can receive quickly; for the raw image data and meta data, they are decomposed into several lines, each The length of the row is a fixed length. Add a tag in front of each line, and the tag is used to indicate the data type (the types of raw image data and meta image data are inconsistent). Then, pack the data into MIPI packets of the same VC_DT. Send to AP via the same VC_DT of MIPI hardware.
以及,用行中断的方式,触发数据解析模块逐行解析,从而达到准零延时解析;在AP端开启对数据包接收时产生的行中断,这样收到行中断时,就可以实时的边逐行接收边解析。这样,在AF自动对焦数据等处理时,能够更快地接收数据和响应。And, use the line interrupt method to trigger the data parsing module to analyze line by line, so as to achieve quasi-zero delay analysis; enable the line interrupt generated when the data packet is received on the AP side, so that when the line interrupt is received, the edge can be real-time Receive and parse line by line. In this way, when processing AF autofocus data, etc., it is possible to receive data and respond faster.
本申请实施例的上述方案可以扩展到其他数据的传输,不限于raw图像数据、3A数据和PD数据。未来其他新增的数据类型也可使用本方法。The above solution of the embodiment of the present application can be extended to the transmission of other data, not limited to raw image data, 3A data and PD data. This method can also be used for other newly added data types in the future.
基于前述的实施例,本申请实施例提供一种数据传输装置,该装置包括所包括的各模块、以及各模块所包括的各单元,可以通过处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为图像处理芯片、中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。Based on the above-mentioned embodiments, this embodiment of the present application provides a data transmission device, which includes each module included, and each unit included in each module, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit Implementation; in the process of implementation, the processor can be an image processing chip, a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA).
图12为本申请实施例数据传输装置的结构示意图,如图12所示,数据传输装置12包括:Fig. 12 is a schematic structural diagram of a data transmission device according to an embodiment of the present application. As shown in Fig. 12, the data transmission device 12 includes:
转换模块121,用于将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;A conversion module 121, configured to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M;
打包模块122,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;The packing module 122 is used for packing the second data sets to be transmitted of the N paths according to the MIPI protocol, so as to obtain the first batch of one or more MIPI data packets;
传输模块123,用于将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器。The transmission module 123 is configured to transmit the first batch of one or more MIPI data packets to the application processor through N data channels.
在一些实施例中,转换模块121,用于:按照特定的行数据长度,将所述M路第一待传数据集中的待传数据分解成至少一行数据;对所述至少一行数据进行重排,得到所述N路第二待传数据集;相应地,传输模块123,用于:将所述第一批一个或多个MIPI数据包均匀地分配给所述N路数据通道并通过所述N路数据通道传输给所述应用处理器。In some embodiments, the conversion module 121 is configured to: decompose the data to be transmitted in the M-way first data set to be transmitted into at least one row of data according to a specific row data length; rearrange the at least one row of data , to obtain the second data sets to be transmitted of the N paths; correspondingly, the transmission module 123 is configured to: distribute the first batch of one or more MIPI data packets evenly to the N paths of data channels and pass through the N data channels are transmitted to the application processor.
在一些实施例中,转换模块121,用于:确定每行数据的第一类型;将用于表征所述行数据的第一类型的标签更新至所述行数据中;对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集。In some embodiments, the conversion module 121 is configured to: determine the first type of each row of data; update the first type of label used to characterize the row of data into the row of data; update the updated At least one row of data is rearranged to obtain the N channels of second data sets to be transmitted.
在一些实施例中,转换模块121,用于:确定更新后的每行数据的第二类型;所述第二类型属于所述第一类型的子类型;根据所述第二类型与行号的映射关系,对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集。In some embodiments, the conversion module 121 is configured to: determine the second type of each row of data after the update; the second type belongs to a subtype of the first type; The mapping relationship is to rearrange the at least one row of updated data to obtain the N-way second data sets to be transmitted.
在一些实施例中,所述特定的行数据长度对应于在单位时间内从存储器读取的最大数据 量。In some embodiments, the specific row data length corresponds to the maximum amount of data read from the memory per unit time.
在一些实施例中,所述第一待传数据集包括下列中的至少一项:执行3A算法所需的统计数据、PD数据和原始图像数据。In some embodiments, the first data set to be transmitted includes at least one of the following: statistical data, PD data and original image data required to execute the 3A algorithm.
本申请实施例还提供一种数据接收装置,图13为本申请实施例数据接收装置的结构示意图,如图13所示,数据接收装置13包括:The embodiment of the present application also provides a data receiving device. FIG. 13 is a schematic structural diagram of the data receiving device in the embodiment of the present application. As shown in FIG. 13 , the data receiving device 13 includes:
接收模块131,用于根据特定的行数据长度,确定当前是否接收到一整行数据;以及如果当前接收到一整行数据,则触发数据解析模块132;The receiving module 131 is used to determine whether a whole row of data is currently received according to a specific row data length; and if a whole row of data is currently received, trigger the data parsing module 132;
数据解析模块132,用于对当前接收到的一行数据进行解析,得到解析数据;以及将所述解析数据发送给对应的第一图像处理芯片。The data parsing module 132 is configured to parse the currently received row of data to obtain parsed data; and send the parsed data to the corresponding first image processing chip.
在一些实施例中,数据解析模块132,用于:确定所述解析数据的行号;根据约定的每行对应存放的第二类型,确定所述解析数据的第二类型;根据所述解析数据的第二类型,将所述解析数据发送给对应的第一图像处理芯片。In some embodiments, the data parsing module 132 is configured to: determine the line number of the parsed data; determine the second type of the parsed data according to the agreed second type corresponding to each row; determine the second type of the parsed data according to the parsed data of the second type, sending the analysis data to the corresponding first image processing chip.
在一些实施例中,接收模块131,用于根据特定的行数据长度,确定当前是否接收到一整行数据;以及如果当前接收到一整行数据,输出行中断给数据解析模块132,以触发数据解析模块132对当前接收到的一行数据进行解析。In some embodiments, the receiving module 131 is configured to determine whether an entire row of data is currently received according to a specific row data length; and if an entire row of data is currently received, the output row is interrupted to the data parsing module 132 to trigger The data parsing module 132 parses a row of data currently received.
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。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 embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
需要说明的是,上述装置对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。也可以采用软件和硬件结合的形式实现。It should be noted that the division of modules by the above device is schematic, and is only a logical function division, and there may be another division method in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or physically exist separately, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It can also be implemented in the form of a combination of software and hardware.
需要说明的是,本申请实施例中,如果以软件功能模块的形式实现上述的方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得电子设备执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本申请实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solutions of the embodiments of the present application or the part that contributes to the related technologies can be embodied in the form of software products. The computer software products are stored in a storage medium and include several instructions to make The electronic device executes all or part of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
本申请实施例提供一种电子设备,图14为本申请实施例的电子设备的硬件实体示意图,如图14所示,所述电子设备14包括存储器141和处理器142,所述存储器141存储有可在处理器142上运行的计算机程序,所述处理器142执行所述程序时实现上述实施例中提供的方法中的步骤。The embodiment of the present application provides an electronic device. FIG. 14 is a schematic diagram of the hardware entity of the electronic device in the embodiment of the present application. As shown in FIG. 14 , the electronic device 14 includes a memory 141 and a processor 142, and the memory 141 stores A computer program that can run on the processor 142, and the processor 142 implements the steps in the methods provided in the above-mentioned embodiments when executing the program.
需要说明的是,存储器141配置为存储由处理器142可执行的指令和应用,还可以缓存在处理器142以及电子设备14中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。It should be noted that the memory 141 is configured to store instructions and applications executable by the processor 142, and may also cache data to be processed or processed by each module in the processor 142 and the electronic device 14 (for example, image data, audio data, etc. , voice communication data and video communication data), can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中提供的方法中的步骤。An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the methods provided in the foregoing embodiments are implemented.
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述方法实施例提供的方法中的步骤。The embodiment of the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the steps in the method provided by the above method embodiment.
这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质、存储介质和设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be pointed out here that: the descriptions of the above storage medium and device embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects to those of the method embodiments. For technical details not disclosed in the storage medium, storage medium, and device embodiments of the present application, please refer to the description of the method embodiment of the present application for understanding.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”或“一些实施例”意味着 与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”或“在一些实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。It should be understood that reference throughout this specification to "one embodiment" or "an embodiment" or "some embodiments" means that a particular feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application . Thus, appearances of "in one embodiment" or "in an embodiment" or "in some embodiments" in various places throughout the specification are not necessarily referring to the same embodiments. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, and should not be used in the embodiments of the present application. The implementation process constitutes any limitation. The serial numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments. The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments, the same or similar points can be referred to each other, and for the sake of brevity, details are not repeated herein.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如对象A和/或对象B,可以表示:单独存在对象A,同时存在对象A和对象B,单独存在对象B这三种情况。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, such as object A and/or object B, which can mean: object A exists alone, and object A and object exist at the same time B, there are three situations of object B alone.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article or apparatus comprising that element.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个模块或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. The above-described embodiments are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or can be Integrate into another system, or some features may be ignored, or not implemented. In addition, the mutual coupling, or direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms of.
上述作为分离部件说明的模块可以是、或也可以不是物理上分开的,作为模块显示的部件可以是、或也可以不是物理模块;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部模块来实现本实施例方案的目的。The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed to multiple network units; Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各实施例中的各功能模块可以全部集成在一个处理单元中,也可以是各模块分别单独作为一个单元,也可以两个或两个以上模块集成在一个单元中;上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can be used as a single unit, or two or more modules can be integrated into one unit; the above-mentioned integration The modules can be implemented in the form of hardware, or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps to realize the above method embodiments can be completed by hardware related to program instructions, and the aforementioned programs can be stored in computer-readable storage media. When the program is executed, the execution includes The steps of the foregoing method embodiments; and the foregoing storage media include: removable storage devices, read-only memory (Read Only Memory, ROM), magnetic disks or optical disks and other media that can store program codes.
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得电子设备执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the present application are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solutions of the embodiments of the present application or the part that contributes to the related technologies can be embodied in the form of software products. The computer software products are stored in a storage medium and include several instructions to make The electronic device executes all or part of the methods described in the various embodiments of the present application. The aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The methods disclosed in several method embodiments provided in this application can be combined arbitrarily to obtain new method embodiments under the condition of no conflict. The features disclosed in several product embodiments provided in this application can be combined arbitrarily without conflict to obtain new product embodiments. The features disclosed in several method or device embodiments provided in this application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only the embodiment of the present application, but the scope of protection of the present application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, and should covered within the scope of protection of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (20)

  1. 一种数据传输方法,用于在应用处理器和图像传感器之间传送图像数据,所述方法包括:A data transmission method for transmitting image data between an application processor and an image sensor, the method comprising:
    将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0小于M;Converting the first data set to be transmitted from the M path into the second data set to be transmitted from the N path; wherein, M is greater than 1, and N is greater than 0 and less than M;
    按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;According to the MIPI protocol, the second data sets to be transmitted of the N channels are packaged to obtain the first batch of one or more MIPI data packets;
    将所述第一批一个或多个MIPI数据包通过N路数据通道传输给所述应用处理器。and transmitting the first batch of one or more MIPI data packets to the application processor through N data channels.
  2. 根据权利要求1所述的方法,其中,所述将来自M路的第一待传数据集转换为N路第二待传数据集,包括:The method according to claim 1, wherein said converting the first data set to be transmitted from M channels into the second data set to be transmitted from N channels comprises:
    按照特定的行数据长度,将所述M路第一待传数据集中的待传数据分解成至少一行数据;Decomposing the data to be transmitted in the M-way first data set to be transmitted into at least one row of data according to a specific row data length;
    对所述至少一行数据进行重排,得到所述N路第二待传数据集;Rearranging the at least one row of data to obtain the N-way second data set to be transmitted;
    其中,所述将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器包括:将所述第一批一个或多个MIPI数据包均匀地分配给所述N路数据通道并通过所述N路数据通道传输给所述应用处理器。Wherein, the transmitting the first batch of one or more MIPI data packets to the application processor through N-way data channels includes: evenly distributing the first batch of one or more MIPI data packets to the N-way The data channels are transmitted to the application processor through the N data channels.
  3. 根据权利要求2所述的方法,其中,所述对所述至少一行数据进行重排,得到所述N路第二待传数据集,包括:The method according to claim 2, wherein said rearranging said at least one row of data to obtain said N-way second data sets to be transmitted comprises:
    确定每行数据的第一类型;Determine the first type of data for each row;
    将用于表征所述行数据的第一类型的标签更新至所述行数据中;updating the first type of label used to characterize the row data into the row data;
    对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集。Rearranging the at least one row of updated data to obtain the N channels of second data sets to be transmitted.
  4. 根据权利要求3所述的方法,其中,所述对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集,包括:The method according to claim 3, wherein said rearranging said at least one row of updated data to obtain said N-way second data sets to be transmitted comprises:
    确定更新后的每行数据的第二类型;其中,所述第二类型属于所述第一类型的子类型;所述第一类型的标签用于标识对应的行数据是数据本身的内容或元数据;所述第二类型是指对应行数据的数据类型;Determine the second type of each row of data after the update; wherein, the second type belongs to a subtype of the first type; the first type of label is used to identify that the corresponding row data is the content or metadata of the data itself Data; the second type refers to the data type of the corresponding row data;
    根据所述第二类型与行号的映射关系,对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集。According to the mapping relationship between the second type and the row number, the updated at least one row of data is rearranged to obtain the N channels of second data sets to be transmitted.
  5. 根据权利要求2至4任一项所述的方法,其中,所述特定的行数据长度对应于在单位时间内从存储器读取的最大数据量。The method according to any one of claims 2 to 4, wherein the specific row data length corresponds to the maximum amount of data read from the memory within a unit time.
  6. 根据权利要求2至4任一项所述的方法,其中,相邻行数据之间存在空白数据。The method according to any one of claims 2 to 4, wherein there is blank data between adjacent rows of data.
  7. 根据权利要求1所述的方法,其中,所述第一待传数据集包括下列中的至少一项:执行3A算法所需的图像统计数据、PD数据、原始图像数据。The method according to claim 1, wherein the first data set to be transmitted includes at least one of the following: image statistical data, PD data, and original image data required to execute the 3A algorithm.
  8. 一种数据接收方法,所述方法包括:A data receiving method, the method comprising:
    根据特定的行数据长度,确定当前是否接收到一整行数据;According to the specific row data length, determine whether a whole row of data is currently received;
    如果当前接收到一整行数据,对当前接收到的一行数据进行解析,得到解析数据;If a whole row of data is currently received, analyze the currently received row of data to obtain the parsed data;
    将所述解析数据发送给对应的第一图像处理芯片。Send the analysis data to the corresponding first image processing chip.
  9. 根据权利要求8所述的方法,其中,所述如果当前接收到一整行数据,对当前接收到的一行数据进行解析,得到解析数据,包括:The method according to claim 8, wherein, if a whole row of data is currently received, parsing the currently received row of data to obtain the parsed data includes:
    如果当前接收到一整行数据,产生行中断;If a whole row of data is currently received, generate a row interrupt;
    根据所述行中断,对当前接收到的一行数据进行解析,得到解析数据。According to the line interruption, the currently received line of data is analyzed to obtain the analysis data.
  10. 根据权利要求8所述的方法,其中,所述将所述解析数据发送给对应的第一图像处理芯片,包括:The method according to claim 8, wherein the sending the analysis data to the corresponding first image processing chip comprises:
    确定所述解析数据的行号;determining a line number of the parsed data;
    根据约定的每行对应存放的第二类型,确定所述解析数据的第二类型;Determine the second type of the parsed data according to the agreed second type corresponding to each row;
    根据所述解析数据的第二类型,将所述解析数据发送给对应的第一图像处理芯片。According to the second type of the analysis data, the analysis data is sent to a corresponding first image processing chip.
  11. 一种图像处理芯片,所述芯片包括:An image processing chip, the chip comprising:
    转换电路,用于将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;A conversion circuit, configured to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M;
    MIPI-TX电路,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;以及A MIPI-TX circuit, configured to package the N-way second data sets to be transmitted according to the MIPI protocol to obtain the first batch of one or more MIPI data packets; and
    将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器。and transmitting the first batch of one or more MIPI data packets to the application processor through N data channels.
  12. 根据权利要求11所述的芯片,其中,所述转换电路,用于:The chip according to claim 11, wherein the conversion circuit is configured to:
    按照特定的行数据长度,将所述M路第一待传数据集中的待传数据分解成至少一行数据;Decomposing the data to be transmitted in the M-way first data set to be transmitted into at least one row of data according to a specific row data length;
    对所述至少一行数据进行重排,得到所述N路第二待传数据集;Rearranging the at least one row of data to obtain the N-way second data set to be transmitted;
    MIPI-TX电路,用于:将所述第一批一个或多个MIPI数据包均匀地分配给所述N路数据通道并通过所述N路数据通道传输给所述应用处理器。The MIPI-TX circuit is configured to: evenly distribute the first batch of one or more MIPI data packets to the N data channels and transmit them to the application processor through the N data channels.
  13. 根据权利要求12所述的芯片,其中,所述转换电路,用于:The chip according to claim 12, wherein the conversion circuit is used for:
    确定每行数据的第一类型;Determine the first type of data for each row;
    将用于表征所述行数据的第一类型的标签更新至所述行数据中;updating the first type of label used to characterize the row data into the row data;
    对更新后的所述至少一行数据进行重排,得到所述N路第二待传数据集。Rearranging the at least one row of updated data to obtain the N channels of second data sets to be transmitted.
  14. 一种应用处理器,所述应用处理器包括:An application processor, the application processor includes:
    MIPI-RX电路,用于根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据,触发数据解析模块对当前接收到的一行数据进行解析,得到解析数据;The MIPI-RX circuit is used to determine whether a whole line of data is currently received according to a specific line data length; if a whole line of data is currently received, the data analysis module is triggered to analyze the currently received line of data to obtain the analysis data ;
    所述数据解析模块,还用于将所述解析数据发送给对应的第一图像处理芯片;The data analysis module is further configured to send the analysis data to the corresponding first image processing chip;
    第一图像处理芯片,用于根据接收的每一所述解析数据,执行特定的图像处理算法。The first image processing chip is configured to execute a specific image processing algorithm according to each received analysis data.
  15. 根据权利要求14所述的应用处理器,其中,MIPI-RX电路,用于根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据,输出行中断给所述数据解析模块,以触发所述数据解析模块对当前接收到的一行数据进行解析。The application processor according to claim 14, wherein the MIPI-RX circuit is used to determine whether a whole row of data is currently received according to a specific row data length; if a whole row of data is currently received, the output row is interrupted to The data parsing module is configured to trigger the data parsing module to parse a row of data currently received.
  16. 一种电子设备,所述设备包括:第二图像处理芯片、至少N路数据通道和应用处理器,N大于0;其中,An electronic device, the device comprising: a second image processing chip, at least N data channels and an application processor, where N is greater than 0; wherein,
    所述第二图像处理芯片的转换电路,用于将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0小于M;The conversion circuit of the second image processing chip is used to convert the first data set to be transmitted from M channels into the second data set to be transmitted from N channels; wherein, M is greater than 1, and N is greater than 0 and less than M;
    所述第二图像处理芯片的MIPI-TX电路,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;以及将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器的MIPI-RX电路;The MIPI-TX circuit of the second image processing chip is used to package the N-way second data sets to be transmitted according to the MIPI protocol to obtain the first batch of one or more MIPI data packets; and the first batch of one or more MIPI data packets; A batch of one or more MIPI data packets is transmitted to the MIPI-RX circuit of the application processor through N data channels;
    所述应用处理器的MIPI-RX电路,用于根据特定的行数据长度,确定当前是否接收到一整行数据;如果当前接收到一整行数据,触发所述应用处理器的数据解析模块对当前接收到的一行数据进行解析,得到解析数据,以及将所述解析数据发送给对应的第一图像处理芯片;The MIPI-RX circuit of the application processor is used to determine whether an entire row of data is currently received according to a specific row data length; if an entire row of data is currently received, trigger the data analysis module of the application processor to Analyzing the currently received line of data to obtain the analyzed data, and sending the analyzed data to the corresponding first image processing chip;
    所述应用处理器的第一图像处理芯片,用于根据接收的每一所述解析数据,执行特定的图像处理算法。The first image processing chip of the application processor is configured to execute a specific image processing algorithm according to each received analysis data.
  17. 一种数据传输装置,所述装置包括:A data transmission device, said device comprising:
    转换模块,用于将来自M路的第一待传数据集转换为N路第二待传数据集;其中,M大于1,N大于0且小于M;A conversion module, configured to convert the first data set to be transmitted from the M path into the second data set to be transmitted from the N path; wherein, M is greater than 1, and N is greater than 0 and less than M;
    打包模块,用于按照MIPI协议,对所述N路第二待传数据集进行打包,得到第一批一个或多个MIPI数据包;A packaging module, configured to package the second data sets to be transmitted of the N paths according to the MIPI protocol, so as to obtain the first batch of one or more MIPI data packets;
    传输模块,用于将所述第一批一个或多个MIPI数据包通过N路数据通道传输给应用处理器。A transmission module, configured to transmit the first batch of one or more MIPI data packets to the application processor through N data channels.
  18. 一种数据接收装置,所述装置包括:A data receiving device, the device comprising:
    接收模块,用于根据特定的行数据长度,确定当前是否接收到一整行数据;以及如果当前接收到一整行数据,触发数据解析模块对当前接收到的一行数据进行解析,得到解析数据;以及将所述解析数据发送给对应的第一图像处理芯片。The receiving module is used to determine whether a whole row of data is currently received according to a specific row data length; and if a whole row of data is currently received, trigger the data parsing module to parse the currently received row of data to obtain parsing data; and sending the analyzed data to the corresponding first image processing chip.
  19. 一种电子设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至7任一项所述的方法,或者,所述处理器执行所述程序时实现权利要求8至10任一项所述的方法。An electronic device, comprising a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the method according to any one of claims 1 to 7 when executing the program, or , the processor implements the method according to any one of claims 8 to 10 when executing the program.
  20. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如权利要求1至7任一项所述的方法,或者,该计算机程序被处理器执行时实现如权利要求8至10任一项所述的方法。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is realized, or, when the computer program is executed by the processor, the method as described in The method according to any one of claims 8 to 10.
PCT/CN2022/100458 2021-07-23 2022-06-22 Data transmission method and apparatus, data receiving method and apparatus, chip, device, and storage medium WO2023000903A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110839218.6 2021-07-23
CN202110839218.6A CN115695687A (en) 2021-07-23 2021-07-23 Data transmission and receiving method and device, chip, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023000903A1 true WO2023000903A1 (en) 2023-01-26

Family

ID=84979796

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100458 WO2023000903A1 (en) 2021-07-23 2022-06-22 Data transmission method and apparatus, data receiving method and apparatus, chip, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115695687A (en)
WO (1) WO2023000903A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117319815B (en) * 2023-09-27 2024-05-14 北原科技(深圳)有限公司 Video stream identification method and device based on image sensor, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336970A (en) * 2019-07-18 2019-10-15 广州健飞通信有限公司 A kind of circuit and its signal synthesis method of multiple signals interface
CN110611747A (en) * 2019-10-11 2019-12-24 深圳市瑞联高科通讯有限公司 System supporting simultaneous use of multiple cameras
CN211580075U (en) * 2020-05-07 2020-09-25 华人运通(上海)自动驾驶科技有限公司 Video processing device and vehicle
CN112054875A (en) * 2019-06-06 2020-12-08 舜宇光学(浙江)研究院有限公司 Multi-channel data transmission method and system, electronic equipment and near-to-eye display equipment
CN212572677U (en) * 2020-08-18 2021-02-19 深圳市猫头鹰微视科技有限公司 MIPI interface odd and even frame transmission double-image video device
CN112449137A (en) * 2019-08-28 2021-03-05 南京深视光点科技有限公司 Data transmission system and data transmission method based on mobile industry processor interface
US20210103201A1 (en) * 2019-10-02 2021-04-08 Qualcomm Incorporated Flash metering for dual camera devices
CN112954272A (en) * 2021-01-29 2021-06-11 上海商汤临港智能科技有限公司 Camera module, data transmission method and device, storage medium and vehicle

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112054875A (en) * 2019-06-06 2020-12-08 舜宇光学(浙江)研究院有限公司 Multi-channel data transmission method and system, electronic equipment and near-to-eye display equipment
CN110336970A (en) * 2019-07-18 2019-10-15 广州健飞通信有限公司 A kind of circuit and its signal synthesis method of multiple signals interface
CN112449137A (en) * 2019-08-28 2021-03-05 南京深视光点科技有限公司 Data transmission system and data transmission method based on mobile industry processor interface
US20210103201A1 (en) * 2019-10-02 2021-04-08 Qualcomm Incorporated Flash metering for dual camera devices
CN110611747A (en) * 2019-10-11 2019-12-24 深圳市瑞联高科通讯有限公司 System supporting simultaneous use of multiple cameras
CN211580075U (en) * 2020-05-07 2020-09-25 华人运通(上海)自动驾驶科技有限公司 Video processing device and vehicle
CN212572677U (en) * 2020-08-18 2021-02-19 深圳市猫头鹰微视科技有限公司 MIPI interface odd and even frame transmission double-image video device
CN112954272A (en) * 2021-01-29 2021-06-11 上海商汤临港智能科技有限公司 Camera module, data transmission method and device, storage medium and vehicle

Also Published As

Publication number Publication date
CN115695687A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN110086967B (en) Image processing method, image processor, photographing device and electronic equipment
US11134132B2 (en) Accelerated network packet processing
CN104702851B (en) Use the powerful auto-exposure control of embedded data
CN110753187B (en) Camera control method and device
WO2023000903A1 (en) Data transmission method and apparatus, data receiving method and apparatus, chip, device, and storage medium
US20070223901A1 (en) Photographic system, photographic device and photographic method
CN108234880B (en) Image enhancement method and device
JP2023549354A (en) Data transmission methods and electronic devices
CN115550541A (en) Camera parameter configuration method and electronic equipment
CN113766120B (en) Shooting mode switching method and electronic equipment
CA3065899A1 (en) Regrouping of video data by a network interface controller
CN109151245B (en) Image data transmission method and system based on FPGA, storage medium and FPGA
CN112422832B (en) Image data transmission method, mobile terminal and storage medium
WO2023010755A1 (en) Hdr video conversion method and apparatus, and device and computer storage medium
CN113556497A (en) Method for transmitting multi-camera data
WO2023051339A1 (en) Image processing architecture, image processing method, device, and storage medium
WO2022062799A1 (en) Data transmission method and related apparatus
US10742866B2 (en) Universal serial bus (USB) video extension
CN110602359B (en) Image processing method, image processor, photographing device and electronic equipment
US9485333B2 (en) Method and apparatus for network streaming
WO2022056729A1 (en) Electronic apparatus, and image processing method for electronic apparatus
WO2023010753A1 (en) Color gamut mapping method and apparatus, terminal device, and storage medium
CN108848285A (en) A kind of high-definition camera processing system for video and method
CN109274955B (en) Compression and synchronization method and system for light field video and depth map, and electronic equipment
JP2007006125A (en) Image processing support apparatus, electronic camera, image processing apparatus, development processing system, and program for fulfilling these image processing support apparatus and image processing apparatus

Legal Events

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

Ref document number: 22845068

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE