CN113328998A - Image data transmission method and electronic equipment - Google Patents

Image data transmission method and electronic equipment Download PDF

Info

Publication number
CN113328998A
CN113328998A CN202110526813.4A CN202110526813A CN113328998A CN 113328998 A CN113328998 A CN 113328998A CN 202110526813 A CN202110526813 A CN 202110526813A CN 113328998 A CN113328998 A CN 113328998A
Authority
CN
China
Prior art keywords
image data
data
determining
target
data format
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202110526813.4A
Other languages
Chinese (zh)
Other versions
CN113328998B (en
Inventor
肖君寿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110526813.4A priority Critical patent/CN113328998B/en
Publication of CN113328998A publication Critical patent/CN113328998A/en
Application granted granted Critical
Publication of CN113328998B publication Critical patent/CN113328998B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/765Media network packet handling intermediate

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Facsimiles In General (AREA)

Abstract

The application discloses a method for transmitting image data and electronic equipment, and belongs to the technical field of data processing. The method comprises the following steps: determining a first data format of the received first image data; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; and transmitting the image data in the target storage register group.

Description

Image data transmission method and electronic equipment
Technical Field
The application belongs to the technical field of data processing, and particularly relates to a method for transmitting image data and electronic equipment.
Background
Currently, most cameras use parallel data lines as data output, for example, a Digital Video Port (DVP) Interface, and then output the data to a display device through a Mobile Industry Processor Interface (MIPI). In the process of converting DVP to MIPI, operations such as buffering of image data transmitted from DVP, MIPI format data generation, and MIPI frame control signal generation are required.
However, in the related art, buffering the image Data transmitted from the DVP generally includes buffering an entire frame or at least several lines of image Data to an external Double Data Rate Synchronous Dynamic Random Access Memory (DDR), taking a common 1080P image frame as an example, assuming that the bit width of the Data format is YUV42210bit, the required storage size can be calculated to be 1920 × 1080 × 10 × 2bit, which means that the required storage area is large. Moreover, data needs to be written and read through an external DDR control interface, which causes a large delay of a data path. Therefore, in the related art, the image data transmission process has the problems of occupying more storage resources and having larger transmission delay.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method for transmitting image data and an electronic device, which can solve the problems of occupying more storage resources and having larger transmission delay in the process of transmitting image data.
In a first aspect, an embodiment of the present application provides a method for transmitting image data, including: determining a first data format of the received first image data; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; and transmitting the image data in the target storage register group.
In a second aspect, an embodiment of the present application provides an apparatus for transmitting image data, including: the first determining module is used for determining a first data format of the received first image data; a second determining module, configured to determine a target storage register set according to the first data format, where a storage space occupied by the target storage register set is smaller than a cache space determined according to the first data format; the storage module is used for storing the first image data to the target storage register group; and the transmission module is used for transmitting the image data in the target storage register group.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, a first data format of received first image data is determined; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; the image data in the target storage register group are transmitted, on one hand, the target storage register group is directly operated, the problem that the image data transmission process has large transmission delay due to the fact that the image data are stored through the cache can be solved, and on the other hand, the target storage register group occupies a small storage space and can solve the problem that the image data transmission process occupies a large amount of storage resources.
Drawings
Fig. 1 is a schematic flow chart diagram of a method of image data transmission according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of an image data transmission method according to another embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of an image data transmission method according to another embodiment of the present application;
FIG. 4 is a schematic flow chart diagram of an image data transmission method according to another embodiment of the present application;
FIG. 5 is a schematic flow chart diagram of an image data transmission method according to another embodiment of the present application;
FIG. 6 is a schematic diagram of an apparatus for transmitting image data according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an electronic device according to one embodiment of the present application;
fig. 8 is a hardware configuration diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes the method for transmitting image data according to the embodiments of the present application in detail through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
As shown in fig. 1, an embodiment of the present application provides a method 100 for transmitting image data, which may be performed by a terminal device, in other words, the method may be performed by software or hardware installed in the terminal device, and the method includes the following steps:
s110: a first data format of the received first image data is determined.
The first image data includes image data or video data. The first data format data _ pattern is a data format of image data or video data. For example, the data format of the image data includes YUV4208bit, YUV42210bit, RAW12, and the like. Optionally, second image data may also be received, and a second data format of the received second image data may be determined. Here, the first image data is taken as an example.
In this embodiment, for example, the image data with the transmission data format YUV42210bit is taken as an example, the image data transmitted by DVP is received, and the first data format data _ pattern of the received image data is determined to be YUV42210 bit.
S120: and determining a target storage register set according to the first data format, and storing the first image data to the target storage register set.
The target register set comprises at least one storage register. In this embodiment, the storage space occupied by the target storage register group determined according to the first data format is smaller than the cache space determined according to the first data format.
For example, the buffer space determined according to the first data format YUV42210bit is 1920 × 1080 × 10 × 2bit, but in this embodiment, according to the first data format YUV42210bit, a target storage register group including 40 8-bit storage registers may be determined. The storage space occupied by the target storage register group is smaller than the cache space determined according to the first data format, and data storage resources can be effectively saved.
After determining a target storage register set, storing the first image data into a storage register in the target storage register set.
S130: and transmitting the image data in the target storage register group.
For example, in the case where the image data needs to be transferred to the next stage by MIPI, the image data in the target memory register group is transferred to the next stage by MIPI.
In the embodiment, the image data is stored in the storage register and directly transmitted to the next stage through the storage register without buffering the image data to an external DDR, so that the transmission path can be optimized and the transmission delay can be shortened.
Therefore, in the method for transmitting image data provided by the embodiment of the application, the first data format of the received first image data is determined; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; the image data in the target storage register group are transmitted, on one hand, the target storage register group is directly operated, the problem that the image data transmission process has large transmission delay due to the fact that the image data are stored through the cache can be solved, and on the other hand, the target storage register group occupies a small storage space and can solve the problem that the image data transmission process occupies a large amount of storage resources.
As shown in fig. 2, an embodiment of the present application provides a method 200 for transmitting image data, which may be performed by a terminal device, in other words, the method may be performed by software or hardware installed in the terminal device, and the method includes the following steps:
s210: a first data format of the received first image data is determined.
Step S210 may adopt the description of step S110 in the embodiment of fig. 1, and is not described herein again.
S221: in the case where the first data format is one data format, the minimum number of required storage registers in the first data format is determined.
For example, if the first data format of the received first image data is YUV42210bit, the minimum number of storage registers required under the first data format YUV42210bit is determined. Specifically, the DVP sends 20-bit Y data, 10-bit U data and 10-bit V data within 2 data cycles, and calculates the minimum number of 8-bit storage registers required under the first data format YUV42210bit to be 40, in combination with the format requirement of MIPI when transmitting YUV422 bit data with 64-bit packet.
In one implementation, the 40 8-bit storage registers are named: store _ reg _0, store _ reg _1, …, store _ reg _ 40.
S222: and determining the storage registers with the minimum number as the target storage register group.
In step S222, the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format. For example, 40 8-bit storage registers are determined as a target storage register set { store _ reg _0, store _ reg _1, …, store _ reg _40}, where a storage space occupied by the target storage register set is smaller than a cache space 1920 _ 1080 _ 10 _ 2bit determined according to the first data format YUV42210 bit. Therefore, aiming at the first data format of the first image data needing to be transmitted, the storage register which is needed at least under the first data format is set as the target storage register group, and the data storage resource can be further effectively saved.
S223: and storing the first image data to the target storage register set.
S230: and transmitting the image data in the target storage register group.
Steps S223-S230 may adopt the descriptions of steps S120-S130 in the embodiment of fig. 1, and are not described herein again.
Therefore, in the method for transmitting image data provided by the embodiment of the application, the first data format of the received first image data is determined; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; the image data in the target storage register group are transmitted, on one hand, the target storage register group is directly operated, the problem that the image data transmission process has large transmission delay due to the fact that the image data are stored through the cache can be solved, and on the other hand, the target storage register group occupies a small storage space and can solve the problem that the image data transmission process occupies a large amount of storage resources.
Therefore, in the method for transmitting image data provided by the embodiment of the application, the minimum number of the storage registers required in the first data format is determined under the condition that the first data format is a data format; the least number of storage registers are determined as the target storage register group, and the target storage register group occupying the least data storage resources can be set according to the first data format of the first image data to be transmitted, so that the data storage resources are further effectively saved, and the problem that more storage resources are occupied in the image data transmission process is solved.
As shown in fig. 3, an embodiment of the present application provides a method 300 for transmitting image data, which may be performed by a terminal device, in other words, the method may be performed by software or hardware installed in the terminal device, and the method includes the following steps:
s310: a first data format of the received first image data is determined.
Step S310 may adopt the description of step S110 in the embodiment of fig. 1, and is not described herein again.
S321: and respectively determining the first minimum number of the storage registers required in each data format under the condition that the first data format is a plurality of data formats.
In this embodiment, the transmitted video data includes video data in a plurality of data formats, that is, the first data format of the received first video data includes a plurality of data formats. For example, the first data format of the received first video data includes three data formats: YUV4208bit, YUV42210bit and RAW12 respectively determine the first minimum number of storage registers required under the three data formats YUV4208bit, YUV42210bit and RAW 12.
S322: determining a maximum of the first minimum number as a minimum number of required storage registers under the plurality of data formats.
In order to meet the transmission requirements of the plurality of data formats, the maximum value of the first minimum number of the storage registers required under each data format is determined as the minimum number of the storage registers required under the plurality of data formats.
S323: and determining the storage registers with the minimum number as the target storage register group.
For example, the target storage register group determined under the condition that the first data format of the received first image data includes three data formats YUV4208bit, YUV42210bit and RAW12 may be used to store the image data of the three data formats YUV4208bit, YUV42210bit and RAW 12. Therefore, aiming at multiple data formats of the first image data needing to be transmitted, the least needed storage registers in the multiple data formats are set as the target storage register group, so that the data storage resources can be saved, and meanwhile, the applicability is effectively improved.
S324: and storing the first image data to the target storage register set.
S330: and transmitting the image data in the target storage register group.
Steps S324 to S330 can adopt the descriptions of steps S120 to S130 in the embodiment of fig. 1, and are not described herein again.
Therefore, in the method for transmitting image data provided by the embodiment of the application, the first data format of the received first image data is determined; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; the image data in the target storage register group are transmitted, on one hand, the target storage register group is directly operated, the problem that the image data transmission process has large transmission delay due to the fact that the image data are stored through the cache can be solved, and on the other hand, the target storage register group occupies a small storage space and can solve the problem that the image data transmission process occupies a large amount of storage resources.
Therefore, in the method for transmitting image data provided by the embodiment of the application, when the first data format is a plurality of data formats, the first minimum number of the storage registers required in each data format is respectively determined; determining a maximum value of the first minimum number as a minimum number of required storage registers under the plurality of data formats; the least number of storage registers are determined as the target storage register group, and the target storage register group occupying the least data storage resources can be set according to various data formats of the first image data to be transmitted, so that the data storage resources are saved, and the applicability is effectively improved.
As shown in fig. 4, an embodiment of the present application provides a method 400 for transmitting image data, which may be performed by a terminal device, in other words, the method may be performed by software or hardware installed in the terminal device, and the method includes the following steps:
s410: a first data format of the received first image data is determined.
Step S410 may adopt the description of step S110 in the embodiment of fig. 1, and is not described herein again.
S421: and determining a target storage register set according to the first data format.
Step S421 may adopt the description of step S120 in the embodiment of fig. 1, the description of steps S221-S222 in the embodiment of fig. 2, or the description of steps S321-S323 in the embodiment of fig. 3, which is not repeated herein.
S422: when the effective indication of the image data indicates that the first image data is effective, counting the first image data to determine a first count value.
The valid indication in _ valid of the video data is used to indicate whether the received first video data is valid. For example, the image data transmitted from the DVP is counted according to the valid indicator in _ valid of the image data, and a first count value count _ store is obtained.
S423: and determining a storage index value according to the first data format and the first counting value.
For example, the index _ store is formed according to the first data format data _ pattern of the first video data and the first count value count _ store. The storage index value index _ store is used to determine a target storage register to which the first image data should be stored, where the target storage register is a storage register in the target storage register group.
S424: and storing the first image data to a target storage register in the target storage register group according to the storage index value.
For example, the target storage register set is { store _ reg _0, store _ reg _1, …, store _ reg _40}, which means that the target storage register set includes 40 storage registers. And storing the first video data into a target storage register in a target storage register group { store _ reg _0, store _ reg _1, …, store _ reg _40} according to the storage index value index _ store.
S430: and transmitting the image data in the target storage register group.
Step S430 may adopt the description of step S130 in the embodiment of fig. 1, and is not described herein again.
Therefore, in the method for transmitting image data provided by the embodiment of the application, the first data format of the received first image data is determined; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; the image data in the target storage register group are transmitted, on one hand, the target storage register group is directly operated, the problem that the image data transmission process has large transmission delay due to the fact that the image data are stored through the cache can be solved, and on the other hand, the target storage register group occupies a small storage space and can solve the problem that the image data transmission process occupies a large amount of storage resources.
Therefore, in the method for transmitting image data provided by the embodiment of the application, when the valid indication of the image data indicates that the first image data is valid, the first image data is counted to determine a first count value; determining a storage index value according to the first data format and the first counting value; and storing the first image data to a target storage register in the target storage register group according to the storage index value, so that accurate calculation can be performed on data storage, and the image data transmission process is further optimized.
As shown in fig. 5, an embodiment of the present application provides a method 500 for transmitting image data, which may be performed by a terminal device, in other words, the method may be performed by software or hardware installed in the terminal device, and the method includes the following steps:
s510: a first data format of the received first image data is determined.
S520: and determining a target storage register set according to the first data format, and storing the first image data to the target storage register set.
Steps S510 to S520 may adopt the descriptions of steps S410 to S424 in the embodiment of fig. 4, and are not described herein again.
S531: the data packets output by the mobile industry processor interface are counted to determine a second count value.
In one implementation, the number of packets output by the MIPI is counted according to the output valid indication out _ valid, and a second count value count _ pack is determined.
S532: and when the number of bits of the first image data is greater than or equal to a preset number of bits, determining a packing index value according to the first data format, the first counting value and the second counting value.
In one implementation, the predetermined number of bits is the number of bits of valid data, such as 64 bits. And judging whether the number of bits of the first image data is greater than or equal to a preset number of bits or not according to the first count value count _ store. And when the bit number of the first image data is greater than or equal to a preset bit number, performing data packaging. Specifically, for example, a packing index value index _ pack is formed according to the first data format data _ pattern, the first count value count _ store, and the second count value count _ pack. And the packing index value index _ pack is used for selecting a specific storage register to pack the specific storage register into a target data packet.
S533: and according to the packing index value, packing the data in the target register into a target data packet.
S534: and transmitting the target data packet.
In one implementation, the predetermined number of bits is 64 bits, and it is understood that 64 bits is a valid data. For example, when the number of bits of the received image data transmitted by the DVP is greater than or equal to 64 bits, the data in the specific storage register is immediately packed into a 64-bit target data packet according to the packing index value index _ pack, and is transmitted to the next stage by the MIPI. Therefore, when the image data meeting the preset digit number is received, the image data is immediately packaged and transmitted, and the transmission delay can be further shortened.
Therefore, in the method for transmitting image data provided by the embodiment of the application, the first data format of the received first image data is determined; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; the image data in the target storage register group are transmitted, on one hand, the target storage register group is directly operated, the problem that the image data transmission process has large transmission delay due to the fact that the image data are stored through the cache can be solved, and on the other hand, the target storage register group occupies a small storage space and can solve the problem that the image data transmission process occupies a large amount of storage resources.
Therefore, in the method for transmitting image data provided by the embodiment of the application, the data packets output by the interface of the mobile industry processor are counted to determine a second count value; when the number of bits of the first image data is greater than or equal to a preset number of bits, determining a packing index value according to the first data format, the first counting value and the second counting value; according to the packing index value, packing the data in the target register into a target data packet; and the target data packet is transmitted, so that the image data can be packaged and transmitted in time, and the transmission delay is further shortened.
It should be noted that, in the method for transmitting image data provided in the embodiment of the present application, the execution subject may be an apparatus for transmitting image data, or a control module of the apparatus for transmitting image data for executing the method for transmitting image data. In the embodiments of the present application, a method for executing image data transmission by an image data transmission device is taken as an example, and the image data transmission device provided in the embodiments of the present application is described.
Fig. 6 is a schematic structural diagram of an apparatus for transmitting image data according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 for transmitting image data includes: a first determination module 610, a second determination module 620, a storage module 630, and a transmission module 640.
A first determining module 610, configured to determine a first data format of the received first image data; a second determining module 620, configured to determine a target storage register set according to the first data format, where a storage space occupied by the target storage register set is smaller than a cache space determined according to the first data format; a storage module 630, configured to store the first image data in the target storage register set; the transmission module 640 is configured to transmit the image data in the target storage register set.
In one implementation, the second determining module is configured to: determining the minimum number of storage registers required in the first data format in the case that the first data format is one data format; and determining the storage registers with the minimum number as the target storage register group.
In one implementation, the second determining module is configured to: under the condition that the first data format is a plurality of data formats, respectively determining a first minimum number of storage registers required under each data format; determining a maximum value of the first minimum number as a minimum number of required storage registers under the plurality of data formats; and determining the storage registers with the minimum number as the target storage register group.
In one implementation, the apparatus further comprises: the first counting module is used for counting the first image data to determine a first counting value when the effective indication of the image data indicates that the first image data is effective; a third determining module, configured to determine a storage index value according to the first data format and the first count value; the storage module is configured to store the first image data to a target storage register in the target storage register group according to the storage index value.
In one implementation, the apparatus further comprises: the second counting module is used for counting the data packets output by the interface of the mobile industry processor so as to determine a second counting value; a fourth determining module, configured to determine a packing index value according to the first data format, the first count value, and the second count value when the number of bits of the first image data is greater than or equal to a preset number of bits; the packing module is used for packing the data in the target register into a target data packet according to the packing index value; and the transmission module is used for transmitting the target data packet.
Therefore, the device for transmitting the image data provided by the embodiment of the application determines the first data format of the received first image data; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; the image data in the target storage register group are transmitted, on one hand, the target storage register group is directly operated, the problem that the image data transmission process has large transmission delay due to the fact that the image data are stored through the cache can be solved, and on the other hand, the target storage register group occupies a small storage space and can solve the problem that the image data transmission process occupies a large amount of storage resources.
The device for transmitting the image data in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The image data transmission device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The device for transmitting image data provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 5, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701, a memory 702, and a program or an instruction stored in the memory 702 and executable on the processor 701, where the program or the instruction is executed by the processor 701 to implement each process of the above-mentioned method for transmitting image data, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 810 is configured to determine a first data format of the received first image data; determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format; and transmitting the image data in the target storage register group.
In one implementation, the processor 810 is configured to determine a minimum number of storage registers required in the first data format if the first data format is one data format; and determining the storage registers with the minimum number as the target storage register group.
In one implementation, the processor 810 is configured to, in a case that the first data format is a plurality of data formats, respectively determine a first minimum number of storage registers required in each data format; determining a maximum value of the first minimum number as a minimum number of required storage registers under the plurality of data formats; and determining the storage registers with the minimum number as the target storage register group.
In one implementation, the processor 810 is configured to count the first image data to determine a first count value when the valid indication of the image data indicates that the first image data is valid; determining a storage index value according to the first data format and the first counting value; and storing the first image data to a target storage register in the target storage register group according to the storage index value.
In one implementation, the processor 810 is configured to count data packets output by the mfi to determine a second count value; when the number of bits of the first image data is greater than or equal to a preset number of bits, determining a packing index value according to the first data format, the first counting value and the second counting value; according to the packing index value, packing the data in the target register into a target data packet; and transmitting the target data packet.
It should be understood that in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 809 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 810 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 810.
An embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above method for transmitting image data, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above method for transmitting image data, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (13)

1. A method for transmitting image data, the method comprising:
determining a first data format of the received first image data;
determining a target storage register set according to the first data format, and storing the first image data to the target storage register set, wherein the storage space occupied by the target storage register set is smaller than the cache space determined according to the first data format;
and transmitting the image data in the target storage register group.
2. The method of claim 1, wherein determining a target set of storage registers comprises:
determining the minimum number of storage registers required in the first data format in the case that the first data format is one data format;
and determining the storage registers with the minimum number as the target storage register group.
3. The method of claim 1, wherein determining a target set of storage registers comprises:
under the condition that the first data format is a plurality of data formats, respectively determining a first minimum number of storage registers required under each data format;
determining a maximum value of the first minimum number as a minimum number of required storage registers under the plurality of data formats;
and determining the storage registers with the minimum number as the target storage register group.
4. The method of claim 1, wherein storing the first image data into the target set of storage registers comprises:
when the effective indication of the image data indicates that the first image data is effective, counting the first image data to determine a first count value;
determining a storage index value according to the first data format and the first counting value;
and storing the first image data to a target storage register in the target storage register group according to the storage index value.
5. The method of claim 4, wherein said transferring image data in said target set of memory registers comprises:
counting data packets output by the interface of the mobile industry processor to determine a second count value;
when the number of bits of the first image data is greater than or equal to a preset number of bits, determining a packing index value according to the first data format, the first counting value and the second counting value;
according to the packing index value, packing the data in the target register into a target data packet;
and transmitting the target data packet.
6. An apparatus for transmitting image data, the apparatus comprising:
the first determining module is used for determining a first data format of the received first image data;
a second determining module, configured to determine a target storage register set according to the first data format, where a storage space occupied by the target storage register set is smaller than a cache space determined according to the first data format;
the storage module is used for storing the first image data to the target storage register group;
and the transmission module is used for transmitting the image data in the target storage register group.
7. The apparatus of claim 6, wherein the second determining module is configured to:
determining the minimum number of storage registers required in the first data format in the case that the first data format is one data format; and determining the storage registers with the minimum number as the target storage register group.
8. The apparatus of claim 6, wherein the second determining module is configured to:
under the condition that the first data format is a plurality of data formats, respectively determining a first minimum number of storage registers required under each data format; determining a maximum value of the first minimum number as a minimum number of required storage registers under the plurality of data formats; and determining the storage registers with the minimum number as the target storage register group.
9. The apparatus of claim 6, further comprising:
the first counting module is used for counting the first image data to determine a first counting value when the effective indication of the image data indicates that the first image data is effective;
a third determining module, configured to determine a storage index value according to the first data format and the first count value;
the storage module is configured to store the first image data to a target storage register in the target storage register group according to the storage index value.
10. The apparatus of claim 9, further comprising:
the second counting module is used for counting the data packets output by the interface of the mobile industry processor so as to determine a second counting value;
a fourth determining module, configured to determine a packing index value according to the first data format, the first count value, and the second count value when the number of bits of the first image data is greater than or equal to a preset number of bits;
the packing module is used for packing the data in the target register into a target data packet according to the packing index value;
and the transmission module is used for transmitting the target data packet.
11. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the method according to any one of claims 1-5.
12. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1-5.
13. A chip, characterized in that the chip comprises a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute a program or instructions implementing the steps of the method according to any of claims 1-5.
CN202110526813.4A 2021-05-14 2021-05-14 Image data transmission method and electronic equipment Active CN113328998B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110526813.4A CN113328998B (en) 2021-05-14 2021-05-14 Image data transmission method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110526813.4A CN113328998B (en) 2021-05-14 2021-05-14 Image data transmission method and electronic equipment

Publications (2)

Publication Number Publication Date
CN113328998A true CN113328998A (en) 2021-08-31
CN113328998B CN113328998B (en) 2023-02-21

Family

ID=77415611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110526813.4A Active CN113328998B (en) 2021-05-14 2021-05-14 Image data transmission method and electronic equipment

Country Status (1)

Country Link
CN (1) CN113328998B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020145659A1 (en) * 2001-04-09 2002-10-10 Lg Electronics Inc. Video communication terminal and method of controlling memory access in the same
JP2008236784A (en) * 1998-12-10 2008-10-02 Fujitsu Ltd Mpeg video decoder and mpeg video decoding method
CN101583027A (en) * 2009-06-10 2009-11-18 中兴通讯股份有限公司 Method for caching image data in real time and movable terminal
CN103795894A (en) * 2014-01-27 2014-05-14 西安电子科技大学 Binary image lossless compression and decompression IP core based on FPGA and application
US20170256016A1 (en) * 2016-03-02 2017-09-07 Samsung Electronics Co., Ltd Hardware architecture for acceleration of computer vision and imaging processing
CN107656899A (en) * 2017-09-27 2018-02-02 深圳大学 A kind of mask convolution method and system based on FPGA
CN110519497A (en) * 2019-08-28 2019-11-29 中国大恒(集团)有限公司北京图像视觉技术分公司 A kind of zero-copy triggering collection device and method based on VDMA
CN111741246A (en) * 2020-06-12 2020-10-02 浪潮(北京)电子信息产业有限公司 Video storage method, device, SOC system and medium
CN111767994A (en) * 2019-04-01 2020-10-13 中国科学院半导体研究所 Neuron calculation module

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008236784A (en) * 1998-12-10 2008-10-02 Fujitsu Ltd Mpeg video decoder and mpeg video decoding method
US20020145659A1 (en) * 2001-04-09 2002-10-10 Lg Electronics Inc. Video communication terminal and method of controlling memory access in the same
CN101583027A (en) * 2009-06-10 2009-11-18 中兴通讯股份有限公司 Method for caching image data in real time and movable terminal
CN103795894A (en) * 2014-01-27 2014-05-14 西安电子科技大学 Binary image lossless compression and decompression IP core based on FPGA and application
US20170256016A1 (en) * 2016-03-02 2017-09-07 Samsung Electronics Co., Ltd Hardware architecture for acceleration of computer vision and imaging processing
CN107656899A (en) * 2017-09-27 2018-02-02 深圳大学 A kind of mask convolution method and system based on FPGA
CN111767994A (en) * 2019-04-01 2020-10-13 中国科学院半导体研究所 Neuron calculation module
CN110519497A (en) * 2019-08-28 2019-11-29 中国大恒(集团)有限公司北京图像视觉技术分公司 A kind of zero-copy triggering collection device and method based on VDMA
CN111741246A (en) * 2020-06-12 2020-10-02 浪潮(北京)电子信息产业有限公司 Video storage method, device, SOC system and medium

Also Published As

Publication number Publication date
CN113328998B (en) 2023-02-21

Similar Documents

Publication Publication Date Title
CN113110802B (en) Image block processing method and device, electronic equipment and readable storage medium
US10228830B2 (en) Method for starting application program, terminal and non-transitory computer readable storage medium
CN109995862B (en) Resource scheduling method and terminal
CN110162254B (en) Display method and terminal equipment
CN107644016A (en) A kind of multimedia titles interpretation method, multimedia titles lookup method and device
CN111049976B (en) Interface display method, electronic device and computer readable storage medium
CN110244884B (en) Desktop icon management method and terminal equipment
CN112887608A (en) Image processing method and device, image processing chip and electronic equipment
CN110730017A (en) Radio frequency device, control method thereof and terminal equipment
KR20220145880A (en) Power Adjustment Methods and Electronic Devices
CN115237618A (en) Request processing method and device, computer equipment and readable storage medium
WO2019072179A1 (en) Application running control method and apparatus
CN113835657A (en) Display method and electronic equipment
CN112995549A (en) Data processing method, device, equipment and computer readable storage medium
CN113328998B (en) Image data transmission method and electronic equipment
CN113296664A (en) Screen resolution adjusting method and device, terminal equipment and storage medium
CN113038273A (en) Video frame processing method and device, storage medium and electronic equipment
CN116760936A (en) Processing device, control method, control device, electronic apparatus, and medium
CN117348841A (en) Data processing method, device, electronic equipment and readable storage medium
CN115794661A (en) Processor abnormal access positioning method and device, electronic equipment and storage medium
CN113225830B (en) Data network uplink scheduling method and device and electronic equipment
CN113687942B (en) Detection method and device and electronic equipment
CN112416927B (en) Data processing method and device, electronic equipment and storage medium
CN114070892A (en) Data transmission method and device
CN114546171A (en) Data distribution method, data distribution device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant