WO2018232635A1 - 视频传输方法、视频处理器、网络处理器和视频传输设备 - Google Patents
视频传输方法、视频处理器、网络处理器和视频传输设备 Download PDFInfo
- Publication number
- WO2018232635A1 WO2018232635A1 PCT/CN2017/089410 CN2017089410W WO2018232635A1 WO 2018232635 A1 WO2018232635 A1 WO 2018232635A1 CN 2017089410 W CN2017089410 W CN 2017089410W WO 2018232635 A1 WO2018232635 A1 WO 2018232635A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memory unit
- image data
- level memory
- read
- network processor
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00002—Diagnosis, testing or measuring; Detecting, analysing or monitoring not otherwise provided for
- H04N1/00007—Diagnosis, testing or measuring; Detecting, analysing or monitoring not otherwise provided for relating to particular apparatus or devices
- H04N1/0001—Transmission systems or arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
Definitions
- the present invention relates to the field of data transmission technologies, and in particular, to a video transmission method, a video processor, a network processor, and a video transmission device.
- the drone can video capture the target to be observed and send the captured video to a remote server or terminal, so that the user can watch the captured video through the server or terminal to understand the dynamic of the target.
- the video encoding processor inside the drone transmits the video data to the remote server or terminal through the wireless network processor.
- video data transmission is performed between a video encoding processor and a wireless network processor, it is often based on a network protocol layer, and the video encoding processor packages the video data and sends it to the wireless network in the form of an IP packet. .
- Embodiments of the present invention provide a video transmission method, a video processor, a network processor, and a video transmission device.
- the video transmission method of the embodiment of the present invention is used for a video processor, and the video transmission method includes:
- first level memory unit from the shared memory, the first level memory unit including at least one second level memory unit;
- the video transmission method of the embodiment of the present invention is used in a network processor, where the video transmission method includes:
- the shared memory including at least one first level memory unit for storing the image data of the corresponding frame image, the first level memory unit including At least one second level memory unit of the image data of the slice in the frame image;
- the image data is transmitted to an external device.
- a video processor configured to:
- first level memory unit from the shared memory, the first level memory unit including at least one second level memory unit;
- a network processor configured to:
- the shared memory including at least one first level memory unit for storing the image data of the corresponding frame image, the first level memory unit including At least one second level memory unit of the image data of the slice in the frame image;
- the image data is transmitted to an external device.
- the memory including shared memory
- the video processor and the network processor perform the video transmission method described above when performing image transmission.
- the video transmission method, the video processor, the network processor and the video transmission device of the embodiments of the present invention replace the traditional network protocol layer by using shared memory, and adopt two-level memory units, so that the fragment of the encoded image is stored in the first
- the network processor can be notified to send the image data in the shared memory, thereby eliminating the IP layer network packet overhead, the virtual memory copy overhead, and the transport layer protocol overhead, thereby effectively reducing the delay of the wireless image data transmission, thereby improving Transmission efficiency.
- FIG. 1 is a schematic flow chart of a video transmission method according to an embodiment of the present invention.
- FIG. 2 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 3 is a schematic block diagram of a video transmission device according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a first-level memory unit according to an embodiment of the present invention.
- FIG. 5 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 6 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 7 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of a shared memory according to an embodiment of the present invention.
- FIG. 9 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 10 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 11 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 12 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 13 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- FIG. 14 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- 15 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- 16 is another schematic flowchart of a video transmission method according to an embodiment of the present invention.
- Video processor 10 network processor 20, processor 30, video transmission device 100.
- first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
- features defining “first” or “second” may include one or more of the described features either explicitly or implicitly.
- the meaning of "a plurality" is two or more unless specifically defined otherwise.
- installation In the description of the embodiments of the present invention, it should be noted that the terms “installation”, “connected”, and “connected” are to be understood broadly, and may be fixed connections, for example, or They are detachable or integrally connected; they can be mechanically connected, they can be electrically connected or can communicate with each other; they can be connected directly or indirectly through an intermediate medium, which can be internal or two components of two components. Interaction relationship.
- an intermediate medium which can be internal or two components of two components.
- the "on" or “below” of the second feature may include direct contact of the first and second features, and may also include the first sum, unless otherwise specifically defined and defined.
- the second feature is not in direct contact but through additional features between them.
- the first feature “above”, “above” and “above” the second feature includes the first feature directly above and above the second feature, or merely indicating that the first feature level is higher than the second feature.
- the first feature “below”, “below” and “below” the second feature includes the first feature directly below and below the second feature, or merely the first feature level being less than the second feature.
- a video transmission method is used in the video processor 10, and the video processor 10 is used as an execution object of the step.
- the video transmission method includes:
- Step S11 Acquiring a frame image, the image including at least one slice
- Step S12 acquiring a first-level memory unit from the shared memory, where the first-level memory unit includes at least one second-level memory unit;
- Step S13 encoding the slice
- Step S14 storing the encoded slice into the second-level memory unit to form image data stored in the shared memory
- Step S15 Notifying the network processor 20 to transmit image data in the shared memory.
- a video transmission method is used in the network processor 20, and the network processor 20 is used as an execution object of the step.
- the video transmission method includes:
- Step S21 receiving a notification of the video processor 10
- Step S22 Read image data in the shared memory according to the notification, the shared memory includes at least one first-level memory unit for storing image data of the corresponding frame image, and the first-level memory unit includes a point for storing the image in the corresponding frame image. At least one second level memory unit of slice image data;
- Step S23 Send image data to the external device.
- a video transmission device 100 includes a video processor 10, a network processor 20, and a memory 30. Shared memory is included in the memory 30.
- the video processor 10 may be used to perform a video transmission method in which the video processor 10 is an execution target of the embodiment of the present invention, and the network processor 20 may be used to execute the network processor of the embodiment of the present invention.
- 20 is a video transmission method that is an execution object of the step.
- the shared memory can be allocated and read and written by the video processor 10 and the network processor 20.
- step S11, step S12, step S13, step S14, and step S15 may be implemented by video processor 10. That is, the image data is written to the shared memory by the video processor 10, and the network processor 20 reads out from the shared memory.
- the video processor 10 can be configured to: acquire a frame image, the image includes at least one slice; acquire a first level memory unit from the shared memory, and the first level memory unit includes at least one second level memory unit; Encoding the slice; storing the encoded slice into the second level memory unit to form image data stored in the shared memory; notifying the network processor 20 to send the image data in the shared memory.
- step S21, step S22, and step S23 can be implemented by the network processor 20.
- the network processor 20 can be configured to: receive a notification of the video processor 10; read image data in the shared memory according to the notification, the shared memory includes at least one first level for storing image data of the corresponding frame image a memory unit, the first level memory unit including at least one second level memory unit for storing image data of the slice in the corresponding frame image; and transmitting the image data to the external device.
- the video transmission method, the video processor 10, the network processor 20, and the video transmission device 100 of the embodiments of the present invention replace the traditional network protocol layer with shared memory, and adopt two-level memory units, so that the encoded image is fragmented.
- the network processor 20 can be notified to send the image data in the shared memory, thereby eliminating the IP layer network packet overhead, the virtual memory copy overhead, and the transport layer protocol overhead, thereby effectively reducing the delay of the wireless image data transmission.
- the transmission efficiency is further improved.
- one video can be divided into multi-frame images.
- Each frame of image includes m slices, and Pm represents the mth Fragments, where m is a positive integer.
- Pm represents the mth Fragments, where m is a positive integer.
- one frame of image includes one slice, and one slice is stored in one or more second-level memory cells.
- the shared memory is the memory shared by the video processor 10 and the network processor 20.
- the shared memory includes a plurality of first-level memory units, and each of the first-level memory units includes a plurality of second-level memory units.
- first level memory unit includes a second level memory unit
- one or more fragments are stored in a second level memory unit.
- the first level memory unit can be used as a PM (Picture Memory), and the PM is used to store data of one frame of image.
- the second-level memory unit can be used as SM (Slice Memory), and the SM is used to store data of one slice.
- Video processor 10 can be used to allocate shared memory, initialize read and write locations of shared memory, and write image data to shared memory.
- the network processor 20 is configured to transmit image data in the shared memory to an external device.
- the external device may be a remote server or terminal.
- a frame of image acquired by the video processor 10 may be first acquired by the camera, and the camera then sends the image to the video processor 10 for encoding and storage.
- the step S15 includes:
- Step S151 determining whether the acquired first-level memory unit is full of image data
- Step S152 determining that the current network environment is suitable for transmitting image data in the shared memory when the first-level memory unit is full of image data;
- Step S153 When the current network environment is suitable for transmitting image data in the shared memory, the network processor 20 is notified to transmit the image data.
- step S151, step S152, and step S153 can be implemented by video processor 10.
- the video processor 10 is further configured to: determine whether the acquired first-level memory unit is full of image data; and when the first-level memory unit is full of image data, determine whether the current network environment is suitable for sending The image data in the shared memory; when the current network environment is suitable for transmitting the image data in the shared memory, the network processor 20 is notified to transmit the image data.
- a first-level memory unit has filled one frame of image data (for example, a PM has been filled with P1 to Pm)
- the video processor 10 notifies the network processing.
- the device 20 transmits all image data in the first level memory unit.
- the video processor 10 can determine whether the current network environment is suitable for transmitting image data in the shared memory by detecting whether the current network is stable and whether the current network speed is greater than a predetermined network speed threshold. In some embodiments, when the current network is stable and the network speed is greater than a predetermined network speed threshold, determining that the current network environment is suitable for sending Send image data in shared memory.
- step S151 when it is determined in step S151 that the acquired first-level memory unit is not full of image data, step S151 will continue to determine whether the acquired first-level memory unit is full of image data.
- step S152 when it is determined in step S152 that the current network environment is not suitable for transmitting image data in the shared memory, step S152 will continue to determine whether the current network environment is suitable for transmitting image data in the shared memory.
- steps S151 and S152 continue to execute the determination flow at a predetermined cycle.
- the step S15 includes:
- Step S154 determining whether the acquired second-level memory unit in the first-level memory unit has stored a full score
- Step S155 determining that the current network environment is suitable for transmitting image data in the shared memory when the second-level memory unit has stored a full score
- Step S156 When the current network environment is suitable for transmitting image data in the shared memory, the network processor 20 is notified to transmit the image data.
- step S154, step S155, and step S156 can be implemented by video processor 10.
- the video processor 10 is further configured to: determine whether the acquired second-level memory unit in the first-level memory unit has been stored in a perfect score; and when the second-level memory unit has a full score, determine the current Whether the network environment is suitable for transmitting image data in the shared memory; when the current network environment is suitable for transmitting image data in the shared memory, the network processor 20 is notified to transmit the image data.
- the video processor 10 notifies that the current network environment is suitable for transmitting image data.
- the network processor 20 transmits all of the image data in the second level memory unit. In this way, part of the image data is stored in the shared memory to notify the network processor 20 to transmit image data, which can effectively reduce the delay of wireless image data transmission.
- the external device After the network processor 20 sends the P1 to Pm to the external device, the external device receives the data of the fragments, and processes the fragmented data to recombine into one frame of image, that is, completes the transmission of one frame of image.
- step S154 continues to determine whether the acquired second-level memory unit in the first-level memory unit has Save the full score.
- step S155 will continue to determine whether the current network environment is suitable for transmitting image data in the shared memory.
- step S154 and step S155 continue to execute the determination flow at a predetermined cycle.
- step S12 includes:
- Step S121 Obtain a first-level memory unit from a first-in-first-out circular queue, where the first-level memory unit is configured to store image data of a corresponding frame image, and the circular queue includes a plurality of first-level memory that are free in the shared memory. unit.
- step S121 can be implemented by video processor 10.
- the video processor 10 is further configured to: acquire a first-level memory unit from a first-in-first-out circular queue, where the first-level memory unit is configured to store image data of a corresponding frame image, and the circular queue includes Multiple first-level memory units that are free in shared memory.
- the shared memory includes a first-in first-out circular queue formed by a plurality of first-level memory units: a, b, c, d, e, ..., a plurality of first-level memory units Form a ring that meets end to end.
- the video processor 10 can acquire a first-level memory unit from a preset position in the loop queue, and then sequentially acquire other first-level memory units from the position in a clockwise or counterclockwise manner to store images of other frame images.
- pointer W1 is used to mark the location of the acquired first-level memory unit.
- pointer W1 is the write pointer of the first level memory unit.
- a plurality of first level memory cells are queued in the order a->b->c->d->e->..., then video processor 10 is a->b->c-> The order of d->e->... sequentially acquires a plurality of first-level memory units.
- the step S15 includes:
- Step S157 Send an interrupt request to the network processor 20, and the interrupt request is used to instruct the network processor 20 to read and transmit the image data from the shared memory.
- step S157 can be implemented by video processor 10.
- the video processor 10 is further operable to: send an interrupt request to the network processor 20 for instructing the network processor 20 to read and transmit image data from the shared memory.
- the interrupt request may be an electrical pulse signal.
- the network processor 20 needs to copy, read, and transmit image data after the entire frame of image data is written into the memory.
- the video processor 10 after the video processor 10 stores the encoded slice into the second-level memory unit, the video processor 10 sends an interrupt request to the network processor 20, and the network processor 20 receives the video processor. 10
- the interrupt request sent reads and sends the image data from the shared memory. In this way, the delay of wireless image data transmission is reduced.
- the video transmission method further includes:
- Step S16 determining whether the network processor 20 has sent image data in the first-level memory unit
- Step S17 When the network processor 20 has transmitted the image data in the first-level memory unit, the first-level memory unit is recovered for storing the image data of the next frame image.
- step S16 and step S17 can be implemented by video processor 10.
- the video processor 10 can also be used to: determine whether the network processor 20 has sent the image data in the first-level memory unit; When the image data in the first level memory unit has been transmitted, the first level memory unit is recovered for storing the image data of the next frame image.
- video processor 10 retrieves the first level of memory cells from which the stored image data has been transmitted for redistribution to subsequent frames of images.
- Reclaiming the first level memory unit includes: initializing the read and write position of the first level memory unit, and re-adding the initialized first level memory unit to the first in first out loop queue.
- the step S16 includes:
- Step S161 determining the position of the read pointer of the second-level memory unit in the acquired first-level memory unit;
- Step S162 When the read pointer is located at the end of the last second-level memory unit in the acquired first-level memory unit, it is determined that the network processor 20 has transmitted the image data in the first-level memory unit.
- step S161 and step S162 can be implemented by video processor 10.
- the video processor 10 is further configured to: determine the position of the read pointer of the second-level memory unit in the acquired first-level memory unit; and the last second in the first-level memory unit At the end of the level memory unit, it is determined that the network processor 20 has transmitted the image data in the first level memory unit.
- the read pointer R2 of the second-level memory unit when the network processor 20 reads and transmits the image data in a certain second-level memory unit, the read pointer R2 of the second-level memory unit will jump from the current second-level memory unit to the next.
- Second level memory unit that is to say, when the read pointer R2 of the second-level memory unit is located in a certain second-level memory unit (such as SM4), it indicates that the network processor 20 has read the second-level memory unit (such as SM4). The previous second-level memory unit (such as SM3), and the second-level memory unit (such as SM4) has not been read. After the network processor 20 sequentially reads and transmits the image data in each of the second level memories, the read pointer R2 of the second level memory unit will jump to the end of the last second level memory unit.
- the network processor 20 is taken as an execution object of the step, and the notification is an interrupt request for instructing the network processor 20 to read and transmit image data from the shared memory.
- the interrupt request may be an electrical pulse signal.
- the network processor 20 needs to copy, read, and transmit image data after the entire frame of image data is written into the memory.
- the video processor 10 after the video processor 10 stores the encoded slice into the second-level memory unit, the video processor 10 sends an interrupt request to the network processor 20, and the network processor 20 receives the video processor. 10
- the interrupt request sent reads and sends the image data from the shared memory. In this way, the delay of wireless image data transmission is reduced.
- the step S22 includes:
- Step S221 Query the first-level memory unit to be read in the shared memory according to the notification;
- Step S222 Read image data in the first-level memory unit to be read.
- step S221 and step S222 can be implemented by network processor 20.
- the network processor 20 is further configured to: query the first-level memory unit to be read in the shared memory according to the notification; and read the image data in the first-level memory unit to be read.
- the shared memory includes a plurality of first-level memory units, some of the first-level memory units have been stored full of image data, and some of the first-level memory units are in an idle state (no image data is stored) or no full image data is stored.
- the network processor 20 needs to query which first-level memory units are in a state to be read in the first-level memory unit that has stored the image data, and then sequentially read the image data in the first-level memory unit to be read.
- the pointer of the first-level memory unit includes a first write pointer and a first read pointer
- step S221 includes:
- Step S2211 determining, according to the notification, whether the position of the first read pointer is before the first write pointer position;
- Step S2212 When the position of the first read pointer is before the position of the first write pointer, determine that the first-level memory unit is the first-level memory unit to be read.
- step S2211 and step S2212 can be implemented by network processor 20.
- the network processor 20 is further operable to: determine, according to the notification, whether the position of the first read pointer is before the first write pointer position; when the position of the first read pointer is before the position of the first write pointer, determine The first level of memory cells is the first level of memory cells to be read.
- the first write pointer W1 is used to indicate to the first level memory unit that the video processor 10 has stored the image data
- the first read pointer R1 is used to indicate that the network processor 20 has read Which image data of the first level memory unit.
- FIG. 8 assume that the video processor 10 stores and reads image data in a counterclockwise direction (ie, a->b->c->d->e->%), at this time, the first read.
- the first-level memory unit a Before the position of the pointer R1 (corresponding to a) is located at the position of the first write pointer W1 (corresponding to b), the first-level memory unit a has stored one frame of image data but has not yet been read, and the first-level memory unit b has not been stored yet.
- the image data or the image data being stored may determine that the first level memory unit a is the first level memory unit to be read.
- the step S222 includes:
- Step S2221 Query the second-level memory unit to be read from the first-level memory unit to be read;
- Step S2222 Read image data in the second-level memory unit to be read.
- step S2221 and step S2222 can be implemented by network processor 20.
- the network processor 20 is further configured to: query a second-level memory unit to be read from a first-level memory unit to be read; and read an image in a second-level memory unit to be read data.
- the first-level memory unit to be read may include a plurality of second-level memory units, some of the second-level memory units have been stored with full image data, and some of the second-level memory units are in an idle state (image data is not stored). Or not full image data is stored.
- the network processor 20 needs to query which second-level memory units are in a state to be read in the second-level memory unit that has stored the full image data, and then sequentially read the image data in the second-level memory unit to be read.
- the pointer of the second-level memory unit includes a second write pointer and a second read pointer.
- Step S2221 includes:
- Step S22211 determining whether the position of the second read pointer is before the second write pointer position
- Step S22212 When the position of the second read pointer is before the position of the second write pointer, it is determined that the second-level memory unit is the second-level memory unit to be read.
- step S22211 and step S22212 can be implemented by network processor 20.
- the network processor 20 is further configured to: determine whether the position of the second read pointer is before the second write pointer position; and determine the second when the position of the second read pointer is before the position of the second write pointer
- the level memory unit is the second level memory unit to be read.
- the second write pointer W2 is used to indicate that the video processor 10 has stored the image data to which second-level memory unit of the first-level memory unit, and the second read pointer R2 is used to indicate network processing.
- the device 20 has read image data of which second level memory unit of the first level memory unit.
- the video processor 10 stores and reads image data from top to bottom, at which time the position of the second read pointer R2 (corresponding to SM1) is located before the position of the second write pointer W2 (corresponding to SM3).
- the second level memory unit SM1 and SM2 have stored the image data of the full slice but have not yet been read. If the second level memory unit SM3 has not stored the image data or is storing the image data, the second level memory unit SM1 and the second level can be determined.
- SM2 is the second-level memory unit to be read.
- the step S23 includes:
- Step S231 Send image data to the external device in the form of a network subframe.
- step S231 can be implemented by network processor 20.
- the network processor 20 is further operable to transmit image data to an external device in the form of a network subframe.
- the network processor 20 can divide the data frame into a plurality of subframes and transmit the image data to the external device in the form of a network subframe, thereby ensuring the quality of the wireless image data transmission.
- a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
- computer readable media include the following: electrical connections (control methods) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
- the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
- portions of the embodiments of the invention may be implemented in hardware, software, firmware or a combination thereof.
- multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
- a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
- each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
- the implemented modules can be implemented in the form of hardware or in the form of software functional modules.
- the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
- the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
本发明公开了一种视频传输方法,用于视频处理器(10)。视频传输方法包括:(S11)获取一帧图像,图像包括至少一个分片;(S12)从共享内存获取一个第一级内存单元,第一级内存单元包括至少一个第二级内存单元;(S13)编码分片;(S14)将编码后的分片存入第二级内存单元中以形成存储在共享内存中的图像数据;(S15)通知网络处理器(20)发送共享内存中的图像数据。此外,本发明还公开了一种视频处理器(10)、网络处理器(20)和视频传输设备(100)。
Description
本发明涉及数据传输技术领域,特别涉及一种视频传输方法、视频处理器、网络处理器和视频传输设备。
无人机可以对所需观察的目标进行视频拍摄,并将所拍摄的视频发送至远端的服务器或者终端,从而使得用户可以通过服务器或者终端观看到拍摄的视频,了解目标的动态。
一般来说,无人机在拍摄视频后,由无人机内部的视频编码处理器,通过无线网络处理器,向远端的服务器或者终端发送视频数据。在相关技术中,视频编码处理器和无线网络处理器之间进行视频数据传输时,往往是基于网络协议层,由视频编码处理器对视频数据进行打包,以IP包的形式发送至无线网络处理。
但随着无人机技术的不断发展,为了使得无人机所拍摄的视频更加清晰,画面质量更高,无人机所拍摄的视频分辨率大幅提升,导致视频的数据量大小有了明显变化。现有技术中,这种基于网络协议层,在视频编码处理器和无线网络处理器之间进行视频数据传输的方式,在用于高分辨率视频的应用场景下,会出现较大的IP层网络包开销、虚拟内存拷贝开销和传输层协议开销,因此,传输效率较低。
发明内容
本发明实施方式提供一种视频传输方法、视频处理器、网络处理器和视频传输设备。
本发明实施方式的视频传输方法,用于视频处理器,所述视频传输方法包括:
获取一帧图像,所述图像包括至少一个分片;
从共享内存获取一个第一级内存单元,所述第一级内存单元包括至少一个第二级内存单元;
编码所述分片;
将编码后的所述分片存入所述第二级内存单元中以形成存储在所述共享内存中的图像数据;
通知网络处理器发送所述共享内存中的所述图像数据。
本发明实施方式的视频传输方法,用于网络处理器,所述视频传输方法包括:
接收视频处理器的通知;
根据所述通知读取共享内存中的图像数据,所述共享内存包括用于存储对应帧图像的所述图像数据的至少一个第一级内存单元,所述第一级内存单元包括用于存储对应帧图像中的分片的所述图像数据的至少一个第二级内存单元;
向外部设备发送所述图像数据。
本发明实施方式的视频处理器,所述视频处理器用于:
获取一帧图像,所述图像包括至少一个分片;
从共享内存获取一个第一级内存单元,所述第一级内存单元包括至少一个第二级内存单元;
编码所述分片;
将编码后的所述分片存入所述第二级内存单元中以形成存储在所述共享内存中的图像数据;
通知网络处理器发送所述共享内存中的所述图像数据。
本发明实施方式的网络处理器,所述网络处理器用于:
接收视频处理器的通知;
根据所述通知读取共享内存中的图像数据,所述共享内存包括用于存储对应帧图像的所述图像数据的至少一个第一级内存单元,所述第一级内存单元包括用于存储对应帧图像中的分片的所述图像数据的至少一个第二级内存单元;
向外部设备发送所述图像数据。
本发明实施方式的视频传输设备,包括:
视频处理器;
网络处理器;
存储器,所述存储器包括共享内存;
进行图像传输时,所述视频处理器和所述网络处理器执行上述的视频传输方法。
本发明实施方式的视频传输方法、视频处理器、网络处理器和视频传输设备,采用共享内存代替传统的网络协议层,并采用两级内存单元,使得将编码后的图像的分片存入第二级内存单元后可通知网络处理器发送共享内存中的图像数据,省去了IP层网络包开销、虚拟内存拷贝开销和传输层协议开销,有效降低了无线图像数据传输的延时,进而提高了传输效率。
本发明实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。
本发明的上述和/或附加的方面和优点可以从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:
图1是本发明实施方式的视频传输方法的流程示意图;
图2是本发明实施方式的视频传输方法的另一流程示意图;
图3是本发明实施方式的视频传输设备的模块示意图;
图4是本发明实施方式的第一级内存单元的结构示意图;
图5是本发明实施方式的视频传输方法的另一流程示意图;
图6是本发明实施方式的视频传输方法的另一流程示意图;
图7是本发明实施方式的视频传输方法的另一流程示意图;
图8是本发明实施方式的共享内存的结构示意图;
图9是本发明实施方式的视频传输方法的另一流程示意图;
图10是本发明实施方式的视频传输方法的另一流程示意图;
图11是本发明实施方式的视频传输方法的另一流程示意图;
图12是本发明实施方式的视频传输方法的另一流程示意图;
图13是本发明实施方式的视频传输方法的另一流程示意图;
图14是本发明实施方式的视频传输方法的另一流程示意图;
图15是本发明实施方式的视频传输方法的另一流程示意图;
图16是本发明实施方式的视频传输方法的另一流程示意图;
主要元件及符号说明:
视频处理器10、网络处理器20、处理器30、视频传输设备100。
下面详细描述本发明的实施方式,实施方式的示例在附图中示出,其中,相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。
在本发明的实施方式的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”、“顺时针”、“逆时针”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明的实施方式和简化描述,而不是指示或暗示所指的装置或元件必须具有特定
的方位、以特定的方位构造和操作,因此不能理解为对本发明的实施方式的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本发明的实施方式的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。
在本发明的实施方式的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接或可以相互通讯;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明的实施方式中的具体含义。
在本发明的实施方式中,除非另有明确的规定和限定,第一特征在第二特征之“上”或之“下”可以包括第一和第二特征直接接触,也可以包括第一和第二特征不是直接接触而是通过它们之间的另外的特征接触。而且,第一特征在第二特征“之上”、“上方”和“上面”包括第一特征在第二特征正上方和斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”包括第一特征在第二特征正下方和斜下方,或仅仅表示第一特征水平高度小于第二特征。
下文的公开提供了许多不同的实施方式或例子用来实现本发明的实施方式的不同结构。为了简化本发明的实施方式的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本发明。此外,本发明的实施方式可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/或设置之间的关系。此外,本发明的实施方式提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。
请参阅图1和图3,本发明实施方式的视频传输方法,用于视频处理器10,以视频处理器10作为步骤的执行对象为例,视频传输方法包括:
步骤S11:获取一帧图像,图像包括至少一个分片;
步骤S12:从共享内存获取一个第一级内存单元,第一级内存单元包括至少一个第二级内存单元;
步骤S13:编码分片;
步骤S14:将编码后的分片存入第二级内存单元中以形成存储在共享内存中的图像数据;
步骤S15:通知网络处理器20发送共享内存中的图像数据。
请参阅图2和图3,本发明实施方式的视频传输方法,用于网络处理器20,以网络处理器20作为步骤的执行对象为例,视频传输方法包括:
步骤S21:接收视频处理器10的通知;
步骤S22:根据通知读取共享内存中的图像数据,共享内存包括用于存储对应帧图像的图像数据的至少一个第一级内存单元,第一级内存单元包括用于存储对应帧图像中的分片的图像数据的至少一个第二级内存单元;
步骤S23:向外部设备发送图像数据。
请参阅图3,本发明实施方式的视频传输设备100包括视频处理器10、网络处理器20和存储器30。存储器30中包括共享内存。进行图像传输时,视频处理器10可以用于执行本发明实施方式的以视频处理器10作为步骤的执行对象的视频传输方法,网络处理器20可以用于执行本发明实施方式的以网络处理器20作为步骤的执行对象的视频传输方法。
共享内存可由视频处理器10和网络处理器20进行分配和读写操作。
例如,步骤S11、步骤S12、步骤S13、步骤S14和步骤S15可由视频处理器10实现。也就是说,图像数据由视频处理器10写入共享内存,网络处理器20从共享内存读出。
也即是说,视频处理器10可以用于:获取一帧图像,图像包括至少一个分片;从共享内存获取一个第一级内存单元,第一级内存单元包括至少一个第二级内存单元;编码分片;将编码后的分片存入第二级内存单元中以形成存储在共享内存中的图像数据;通知网络处理器20发送共享内存中的图像数据。
又如,步骤S21、步骤S22、步骤S23可由网络处理器20实现。
也即是说,网络处理器20可以用于:接收视频处理器10的通知;根据通知读取共享内存中的图像数据,共享内存包括用于存储对应帧图像的图像数据的至少一个第一级内存单元,第一级内存单元包括用于存储对应帧图像中的分片的图像数据的至少一个第二级内存单元;向外部设备发送图像数据。
本发明实施方式的视频传输方法、视频处理器10、网络处理器20和视频传输设备100,采用共享内存代替传统的网络协议层,并采用两级内存单元,使得将编码后的图像的分片存入第二级内存单元后可通知网络处理器20发送共享内存中的图像数据,省去了IP层网络包开销、虚拟内存拷贝开销和传输层协议开销,有效降低了无线图像数据传输的延时,进而提高了传输效率。
具体地,一个视频可以被划分为多帧图像。每帧图像包括m个分片,Pm代表第m
个分片,其中,m为正整数。当m=1时,一帧图像包括一个分片,一个分片存储在一个或多个第二级内存单元中。
请参阅图4,共享内存为视频处理器10和网络处理器20所共享的内存。共享内存包括多个第一级内存单元,每个第一级内存单元包括多个第二级内存单元。当第一级内存单元包括一个第二级内存单元时,一个或多个分片存储在一个第二级内存单元中。可以理解,第二级内存单元的个数可以与分片的个数一一对应,也可以是一个第二级内存单元存储多个分片,或者多个第二级内存单元存储一个分片。第一级内存单元可作为PM(Picture Memory,图像存储器),PM用于存储一帧图像的数据。第二级内存单元可作为SM(Slice Memory,单片式存储器),SM用于存储一个分片的数据。视频处理器10可用于分配共享内存,初始化共享内存的读、写位置,以及将图像数据写入到共享内存中。网络处理器20用于向外部设备发送共享内存中的图像数据。其中,外部设备可以为远端的服务器或终端。
需要指出的是,在步骤S11中,视频处理器10获取的一帧图像可以先由摄像头采集得到,摄像头再将该图像发送给视频处理器10进行编码及存储。
请参阅图5,在某些实施方式中,以视频处理器10作为步骤的执行对象为例,步骤S15包括:
步骤S151:判断所获取的第一级内存单元是否已存满图像数据;
步骤S152:在第一级内存单元已存满图像数据时,判断当前网络环境是否适合发送共享内存中的图像数据;
步骤S153:在当前网络环境适合发送共享内存中的图像数据时,通知网络处理器20发送图像数据。
在某些实施方式中,步骤S151、步骤S152和步骤S153可由视频处理器10实现。
也即是说,视频处理器10进一步可以用于:判断所获取的第一级内存单元是否已存满图像数据;在第一级内存单元已存满图像数据时,判断当前网络环境是否适合发送共享内存中的图像数据;在当前网络环境适合发送共享内存中的图像数据时,通知网络处理器20发送图像数据。
具体地,当一个第一级内存单元已存满一帧的图像数据时(例如一个PM已存满P1~Pm),在当前网络环境适合发送图像数据的情况下,视频处理器10通知网络处理器20发送该第一级内存单元中的所有图像数据。
在一个例子中,视频处理器10可以通过检测当前网络是否稳定以及当前网速是否大于预定网速阈值,来判断当前网络环境是否适合发送共享内存中的图像数据。在某些实施方式中,当前网络稳定且网速大于预定网速阈值时,判断当前网络环境适合发
送共享内存中的图像数据。
可以理解,当步骤S151判断所获取的第一级内存单元未存满图像数据时,步骤S151将继续判断所获取的第一级内存单元是否已存满图像数据。当步骤S152判断当前网络环境不适合发送共享内存中的图像数据时,步骤S152将继续判断当前网络环境是否适合发送共享内存中的图像数据。在某些实施方式中,当步骤S151和步骤S152的判断结果为否时,步骤S151和步骤S152以预定周期继续执行判断流程。
请参阅图6,在某些实施方式中,以视频处理器10作为步骤的执行对象为例,步骤S15包括:
步骤S154:判断所获取的第一级内存单元中的第二级内存单元是否已存满分片;
步骤S155:在第二级内存单元已存满分片时,判断当前网络环境是否适合发送共享内存中的图像数据;
步骤S156:在当前网络环境适合发送共享内存中的图像数据时,通知网络处理器20发送图像数据。
在某些实施方式中,步骤S154、步骤S155和步骤S156可由视频处理器10实现。
也即是说,视频处理器10进一步可以用于:判断所获取的第一级内存单元中的第二级内存单元是否已存满分片;在第二级内存单元已存满分片时,判断当前网络环境是否适合发送共享内存中的图像数据;在当前网络环境适合发送共享内存中的图像数据时,通知网络处理器20发送图像数据。
具体地,当第一级内存单元中的一个第二级内存单元已存满一个分片(例如一个SM已存满P1),在当前网络环境适合发送图像数据的情况下,视频处理器10通知网络处理器20发送该第二级内存单元中的所有图像数据。如此,部分图像数据存入共享内存中即可通知网络处理器20发送图像数据,能有效降低无线图像数据传输的延时。
当网络处理器20分别将P1~Pm发送至外部设备后,外部设备接收这些分片的数据,并处理分片的数据以重新组合成一帧图像,即完成一帧图像的传输。
可以理解,当步骤S154判断所获取的第一级内存单元中的第二级内存单元未存满分片时,步骤S154将继续判断所获取的第一级内存单元中的第二级内存单元是否已存满分片。当步骤S155判断当前网络环境不适合发送共享内存中的图像数据时,步骤S155将继续判断当前网络环境是否适合发送共享内存中的图像数据。在某些实施方式中,当步骤S154和步骤S155的判断结果为否时,步骤S154和步骤S155以预定周期继续执行判断流程。
请参阅图7,在某些实施方式中,以视频处理器10作为步骤的执行对象为例,第一级内存单元的数量为多个,步骤S12包括:
步骤S121:从先入先出的循环队列中获取一个第一级内存单元,其中,第一级内存单元用于存储对应帧图像的图像数据,循环队列包括共享内存中空闲的多个第一级内存单元。
在某些实施方式中,步骤S121可由视频处理器10实现。
也即是说,视频处理器10进一步可以用于:从先入先出的循环队列中获取一个第一级内存单元,其中,第一级内存单元用于存储对应帧图像的图像数据,循环队列包括共享内存中空闲的多个第一级内存单元。
请参阅图8,在一个示例中,共享内存包括由多个第一级内存单元形成的先入先出的循环队列:a,b,c,d,e,……,多个第一级内存单元形成首尾相接的圆环。视频处理器10可以从循环队列中的某一预设位置获取一个第一级内存单元,然后再从该位置沿顺时针或逆时针依次获取其他的第一级内存单元以存储其他帧图像的图像数据,指针W1用于标记获取的第一级内存单元的位置。在一个例子中,指针W1为第一级内存单元的写指针。在一个例子中,多个第一级内存单元以a->b->c->d->e->……的顺序入队,则视频处理器10以a->b->c->d->e->……的顺序依次获取多个第一级内存单元。
请参阅图9,在某些实施方式中,以视频处理器10作为步骤的执行对象为例,步骤S15包括:
步骤S157:发送中断请求至网络处理器20,中断请求用于指示网络处理器20从共享内存中读取并发送图像数据。
在某些实施方式中,步骤S157可由视频处理器10实现。
也即是说,视频处理器10进一步可以用于:发送中断请求至网络处理器20,中断请求用于指示网络处理器20从共享内存中读取并发送图像数据。
具体地,中断请求可以为电脉冲信号。在相关技术中,网络处理器20需要等整帧图像数据写入内存之后,才拷贝、读取和发送图像数据。而在本发明实施方式中,当视频处理器10将编码后的分片存入第二级内存单元后,视频处理器10向网络处理器20发送中断请求,网络处理器20收到视频处理器10发送的中断请求即从共享内存中读取并发送图像数据。如此,降低了无线图像数据传输的延时。
请参阅图10,在某些实施方式中,以视频处理器10作为步骤的执行对象为例,在步骤S15后,视频传输方法还包括:
步骤S16:判断网络处理器20是否已发送第一级内存单元中的图像数据;
步骤S17:在网络处理器20已发送第一级内存单元中的图像数据时,回收第一级内存单元以用于存储下一帧图像的图像数据。
在某些实施方式中,步骤S16和步骤S17可由视频处理器10实现。
也即是说,视频处理器10在通知网络处理器20发送共享内存中的图像数据后,还可以用于:判断网络处理器20是否已发送第一级内存单元中的图像数据;在网络处理器20已发送第一级内存单元中的图像数据时,回收第一级内存单元以用于存储下一帧图像的图像数据。
如此,视频处理器10回收已发送完毕所存储的图像数据的第一级内存单元,以重新分配给后续各帧图像。回收第一级内存单元包括:初始化第一级内存单元的读写位置,以及将初始化后的第一级内存单元重新添加到先入先出的循环队列中。
请参阅图11,在某些实施方式中,以视频处理器10作为步骤的执行对象为例,步骤S16包括:
步骤S161:判断所获取的第一级内存单元中的第二级内存单元的读指针的位置;
步骤S162:在读指针位于所获取的第一级内存单元中的最后一个第二级内存单元的末尾时,确定网络处理器20已发送第一级内存单元中的图像数据。
在某些实施方式中,步骤S161和步骤S162可由视频处理器10实现。
也即是说,视频处理器10进一步可以用于:判断所获取的第一级内存单元中的第二级内存单元的读指针的位置;在读指针位于第一级内存单元中的最后一个第二级内存单元的末尾时,确定网络处理器20已发送第一级内存单元中的图像数据。
以图4为例,当网络处理器20读取并发送完某一个第二级内存单元中的图像数据时,第二级内存单元的读指针R2将从当前第二级内存单元跳动至下一个第二级内存单元。也即是说,当第二级内存单元的读指针R2位于某一第二级内存单元(如SM4)时,则表示网络处理器20已读取完该第二级内存单元(如SM4)的前一个第二级内存单元(如SM3),而该第二级内存单元(如SM4)还未读取。当网络处理器20依次读取并发送各第二级内存中的图像数据后,第二级内存单元的读指针R2将跳动至最后一个第二级内存单元的末尾。
在某些实施方式中,以网络处理器20作为步骤的执行对象为例,通知为用于指示网络处理器20从共享内存中读取并发送图像数据的中断请求。
具体地,中断请求可以为电脉冲信号。在相关技术中,网络处理器20需要等整帧图像数据写入内存之后,才拷贝、读取和发送图像数据。而在本发明实施方式中,当视频处理器10将编码后的分片存入第二级内存单元后,视频处理器10向网络处理器20发送中断请求,网络处理器20收到视频处理器10发送的中断请求即从共享内存中读取并发送图像数据。如此,降低了无线图像数据传输的延时。
请参阅图12,在某些实施方式中,以网络处理器20作为步骤的执行对象为例,步骤S22包括:
步骤S221:根据通知在共享内存中查询待读取的第一级内存单元;
步骤S222:读取待读取的第一级内存单元中的图像数据。
在某些实施方式中,步骤S221和步骤S222可由网络处理器20实现。
也即是说,网络处理器20进一步可以用于:根据通知在共享内存中查询待读取的第一级内存单元;读取待读取的第一级内存单元中的图像数据。
可以理解,共享内存包括多个第一级内存单元,部分第一级内存单元已被存储满图像数据,部分第一级内存单元为空闲状态(未存储图像数据)或未存储满图像数据。网络处理器20需要在已存储图像数据的第一级内存单元中查询哪些第一级内存单元为待读取状态,然后依次读取待读取的第一级内存单元中的图像数据。
请参阅图13,在某些实施方式中,以网络处理器20作为步骤的执行对象为例,第一级内存单元的指针包括第一写指针和第一读指针,步骤S221包括:
步骤S2211:根据通知判断第一读指针的位置是否在第一写指针位置之前;
步骤S2212:在第一读指针的位置在第一写指针的位置之前时,确定第一级内存单元为待读取的第一级内存单元。
在某些实施方式中,步骤S2211和步骤S2212可由网络处理器20实现。
也即是说,网络处理器20进一步可以用于:根据通知判断第一读指针的位置是否在第一写指针位置之前;在第一读指针的位置在第一写指针的位置之前时,确定第一级内存单元为待读取的第一级内存单元。
具体地,请结合图8,第一写指针W1用于指示视频处理器10已经将图像数据存储到哪一个第一级内存单元,第一读指针R1用于指示网络处理器20已经读取到哪一个第一级内存单元的图像数据。以图8为例,假设视频处理器10沿逆时针(即:a->b->c->d->e->……的顺序)存储和读取图像数据,此时,第一读指针R1的位置(对应a)位于第一写指针W1的位置(对应b)之前,第一级内存单元a已存储一帧图像数据但还未被读取,第一级内存单元b还未存储图像数据或正在存储图像数据,则可以确定第一级内存单元a为待读取的第一级内存单元。
请参阅图14,在某些实施方式中,以网络处理器20作为步骤的执行对象为例,步骤S222包括:
步骤S2221:从待读取的第一级内存单元中查询待读取的第二级内存单元;
步骤S2222:读取待读取的第二级内存单元中的图像数据。
在某些实施方式中,步骤S2221和步骤S2222可由网络处理器20实现。
也即是说,网络处理器20进一步可以用于:从待读取的第一级内存单元中查询待读取的第二级内存单元;读取待读取的第二级内存单元中的图像数据。
可以理解,待读取的第一级内存单元可包括多个第二级内存单元,部分第二级内存单元已被存储满图像数据,部分第二级内存单元为空闲状态(未存储图像数据)或未存储满图像数据。网络处理器20需要在已存储满图像数据的第二级内存单元中查询哪些第二级内存单元为待读取状态,然后依次读取待读取的第二级内存单元中的图像数据。
请参阅图15,在某些实施方式中,以网络处理器20作为步骤的执行对象为例,第二级内存单元的指针包括第二写指针和第二读指针。步骤S2221包括:
步骤S22211:判断第二读指针的位置是否在第二写指针位置之前;
步骤S22212:在第二读指针的位置在第二写指针的位置之前时,确定第二级内存单元为待读取的第二级内存单元。
在某些实施方式中,步骤S22211和步骤S22212可由网络处理器20实现。
也即是说,网络处理器20进一步可以用于:判断第二读指针的位置是否在第二写指针位置之前;在第二读指针的位置在第二写指针的位置之前时,确定第二级内存单元为待读取的第二级内存单元。
具体地,请结合图4,第二写指针W2用于指示视频处理器10已经将图像数据存储到第一级内存单元的哪一个第二级内存单元,第二读指针R2用于指示网络处理器20已经读取到第一级内存单元的哪一个第二级内存单元的图像数据。在图4的一个例子中,视频处理器10从上到下存储和读取图像数据,此时,第二读指针R2的位置(对应SM1)位于第二写指针W2的位置(对应SM3)之前,第二级内存单元SM1和SM2已存储满分片的图像数据但还未被读取,第二级内存单元SM3还未存储图像数据或正在存储图像数据,则可以确定第二级内存单元SM1和SM2为待读取的第二级内存单元。
请参阅图16,在某些实施方式中,以网络处理器20作为步骤的执行对象为例,步骤S23包括:
步骤S231:以网络子帧的形式向外部设备发送图像数据。
在某些实施方式中,步骤S231可由网络处理器20实现。
也即是说,网络处理器20进一步可以用于以网络子帧的形式向外部设备发送图像数据。
如此,当数据帧较长时,网络处理器20可以将数据帧划分成多个子帧,以网络子帧的形式向外部设备发送图像数据,从而保证无线图像数据传输的质量。
在本说明书的描述中,参考术语“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”或“一些示例”等的描述意指结合所述实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式
或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理模块的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(控制方法),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。
应当理解,本发明的实施方式的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本发明的各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集
成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
尽管上面已经示出和描述了本发明的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施实施进行变化、修改、替换和变型。
Claims (29)
- 一种视频传输方法,用于视频处理器,其特征在于,所述视频传输方法包括:获取一帧图像,所述图像包括至少一个分片;从共享内存获取一个第一级内存单元,所述第一级内存单元包括至少一个第二级内存单元;编码所述分片;将编码后的所述分片存入所述第二级内存单元中以形成存储在所述共享内存中的图像数据;通知网络处理器发送所述共享内存中的所述图像数据。
- 根据权利要求1所述的视频传输方法,其特征在于,所述通知网络处理器发送所述共享内存中的所述图像数据,包括:判断所获取的所述第一级内存单元是否已存满所述图像数据;在所述第一级内存单元已存满所述图像数据时,判断当前网络环境是否适合发送所述共享内存中的所述图像数据;在所述当前网络环境适合发送所述共享内存中的所述图像数据时,通知所述网络处理器发送所述图像数据。
- 根据权利要求1所述的视频传输方法,其特征在于,所述通知网络处理器发送所述共享内存中的所述图像数据,包括:判断所获取的所述第一级内存单元中的所述第二级内存单元是否已存满所述分片;在所述第二级内存单元已存满所述分片时,判断当前网络环境是否适合发送所述共享内存中的所述图像数据;在所述当前网络环境适合发送所述共享内存中的所述图像数据时,通知所述网络处理器发送所述图像数据。
- 根据权利要求1所述的视频传输方法,其特征在于,所述第一级内存单元的数量为多个,所述从共享内存获取一个第一级内存单元,包括:从先入先出的循环队列中获取一个所述第一级内存单元,其中,所述第一级内存单元用于存储对应帧图像的所述图像数据,所述循环队列包括所述共享内存中空闲的 多个所述第一级内存单元。
- 根据权利要求1所述的视频传输方法,其特征在于,所述通知网络处理器发送所述共享内存中的所述图像数据,包括:发送中断请求至所述网络处理器,所述中断请求用于指示所述网络处理器从所述共享内存中读取并发送所述图像数据。
- 根据权利要求1-5任意一项所述的视频传输方法,其特征在于,在所述通知网络处理器发送所述共享内存中的所述图像数据后,所述视频传输方法还包括:判断所述网络处理器是否已发送所述第一级内存单元中的所述图像数据;在所述网络处理器已发送所述第一级内存单元中的所述图像数据时,回收所述第一级内存单元以用于存储下一帧图像的图像数据。
- 根据权利要求6所述的视频传输方法,其特征在于,所述判断所述网络处理器是否已发送完所述第一级内存单元中的所述图像数据,包括:判断所获取的所述第一级内存单元中的所述第二级内存单元的读指针的位置;在所述读指针位于所获取的所述第一级内存单元中的最后一个所述第二级内存单元的末尾时,确定所述网络处理器已发送所述第一级内存单元中的所述图像数据。
- 一种视频传输方法,用于网络处理器,其特征在于,所述视频传输方法包括:接收视频处理器的通知;根据所述通知读取共享内存中的图像数据,所述共享内存包括用于存储对应帧图像的所述图像数据的至少一个第一级内存单元,所述第一级内存单元包括用于存储对应帧图像中的分片的所述图像数据的至少一个第二级内存单元;向外部设备发送所述图像数据。
- 根据权利要求8所述的视频传输方法,其特征在于,所述通知为用于指示所述网络处理器从所述共享内存中读取并发送所述图像数据的中断请求。
- 根据权利要求8所述的视频传输方法,其特征在于,所述根据所述通知读取共享内存中的图像数据,包括:根据所述通知在所述共享内存中查询待读取的所述第一级内存单元;读取待读取的所述第一级内存单元中的所述图像数据。
- 根据权利要求10所述的视频传输方法,其特征在于,所述第一级内存单元的指针包括第一写指针和第一读指针,所述根据所述通知在所述共享内存中查询待读取的所述第一级内存单元,包括:根据所述通知判断所述第一读指针的位置是否在所述第一写指针位置之前;在所述第一读指针的位置在所述第一写指针的位置之前时,确定所述第一级内存单元为待读取的所述第一级内存单元。
- 根据权利要求10所述的视频传输方法,其特征在于,所述读取待读取的所述第一级内存单元中的所述图像数据包括:从待读取的所述第一级内存单元中查询待读取的所述第二级内存单元;读取待读取的所述第二级内存单元中的所述图像数据。
- 根据权利要求12所述的视频传输方法,其特征在于,所述第二级内存单元的指针包括第二写指针和第二读指针,所述从待读取的所述第一级内存单元中查询待读取的所述第二级内存单元,包括:判断所述第二读指针的位置是否在所述第二写指针位置之前;在所述第二读指针的位置在所述第二写指针的位置之前时,确定所述第二级内存单元为待读取的所述第二级内存单元。
- 根据权利要求8-13任意一项所述的视频传输方法,其特征在于,所述向外部设备发送所述图像数据,包括:以网络子帧的形式向所述外部设备发送所述图像数据。
- 一种视频处理器,其特征在于,所述视频处理器用于:获取一帧图像,所述图像包括至少一个分片;从共享内存获取一个第一级内存单元,所述第一级内存单元包括至少一个第二级内存单元;编码所述分片;将编码后的所述分片存入所述第二级内存单元中以形成存储在所述共享内存中的图像数据;通知网络处理器发送所述共享内存中的所述图像数据。
- 根据权利要求15所述的视频处理器,其特征在于,所述通知网络处理器发送所述共享内存中的所述图像数据,包括:判断所获取的所述第一级内存单元是否已存满所述图像数据;在所述第一级内存单元已存满所述图像数据时,判断当前网络环境是否适合发送所述共享内存中的所述图像数据;在所述当前网络环境适合发送所述共享内存中的所述图像数据时,通知所述网络处理器发送所述图像数据。
- 根据权利要求15所述的视频处理器,其特征在于,所述通知网络处理器发送所述共享内存中的所述图像数据,包括:判断所获取的所述第一级内存单元中的所述第二级内存单元是否已存满所述分片;在所述第二级内存单元已存满所述分片时,判断当前网络环境是否适合发送所述共享内存中的所述图像数据;在所述当前网络环境适合发送所述共享内存中的所述图像数据时,通知所述网络处理器发送所述图像数据。
- 根据权利要求15所述的视频处理器,其特征在于,所述第一级内存单元的数量为多个,所述从共享内存获取一个第一级内存单元,包括:从先入先出的循环队列中获取一个所述第一级内存单元,其中,所述第一级内存单元用于存储对应帧图像的所述图像数据,所述循环队列包括所述共享内存中空闲的多个所述第一级内存单元。
- 根据权利要求15所述的视频处理器,其特征在于,所述通知网络处理器发送所述共享内存中的所述图像数据,包括:发送中断请求至所述网络处理器,所述中断请求用于指示所述网络处理器从所述共享内存中读取并发送所述图像数据。
- 根据权利要求15-19任意一项所述的视频处理器,其特征在于,在所述通知网络处理器发送所述共享内存中的所述图像数据后,所述视频处理器还用于:判断所述网络处理器是否已发送所述第一级内存单元中的所述图像数据;在所述网络处理器已发送所述第一级内存单元中的所述图像数据时,回收所述第一级内存单元以用于存储下一帧图像的图像数据。
- 根据权利要求20所述的视频处理器,其特征在于,所述判断所述网络处理器是否已发送完所述第一级内存单元中的所述图像数据,包括:判断所获取的所述第一级内存单元中的所述第二级内存单元的读指针的位置;在所述读指针位于所述第一级内存单元中的最后一个所述第二级内存单元的末尾时,确定所述网络处理器已发送所述第一级内存单元中的所述图像数据。
- 一种网络处理器,其特征在于,所述网络处理器用于:接收视频处理器的通知;根据所述通知读取共享内存中的图像数据,所述共享内存包括用于存储对应帧图像的所述图像数据的至少一个第一级内存单元,所述第一级内存单元包括用于存储对应帧图像中的分片的所述图像数据的至少一个第二级内存单元;向外部设备发送所述图像数据。
- 根据权利要求22所述的网络处理器,其特征在于,所述通知为用于指示所述网络处理器从所述共享内存中读取并发送所述图像数据的中断请求。
- 根据权利要求22所述的网络处理器,其特征在于,所述根据所述通知读取共享内存中的图像数据,包括:根据所述通知在所述共享内存中查询待读取的所述第一级内存单元;读取待读取的所述第一级内存单元中的所述图像数据。
- 根据权利要求24所述的网络处理器,其特征在于,所述第一级内存单元的指针包括第一写指针和第一读指针,所述根据所述通知在所述共享内存中查询待读取的所述第一级内存单元,包括:根据所述通知判断所述第一读指针的位置是否在所述第一写指针位置之前;在所述第一读指针的位置在所述第一写指针的位置之前时,确定所述第一级内存单元为待读取的所述第一级内存单元。
- 根据权利要求24所述的网络处理器,其特征在于,所述读取待读取的所述第一级内存单元中的所述图像数据包括:从待读取的所述第一级内存单元中查询待读取的所述第二级内存单元;读取待读取的所述第二级内存单元中的所述图像数据。
- 根据权利要求26所述的网络处理器,其特征在于,所述第二级内存单元的指针包括第二写指针和第二读指针,所述从待读取的所述第一级内存单元中查询待读取的所述第二级内存单元,包括:判断所述第二读指针的位置是否在所述第二写指针位置之前;在所述第二读指针的位置在所述第二写指针的位置之前时,确定所述第二级内存单元为待读取的所述第二级内存单元。
- 根据权利要求22-27任意一项所述的网络处理器,其特征在于,所述向外部设备发送所述图像数据,包括:以网络子帧的形式向所述外部设备发送所述图像数据。
- 一种视频传输设备,其特征在于,包括:视频处理器;网络处理器;存储器,所述存储器包括共享内存;进行图像传输时,所述视频处理器执行权利要求1-7任意一项所述的视频传输方法,所述网络处理器执行权利要求8-14任意一项所述的视频传输方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/089410 WO2018232635A1 (zh) | 2017-06-21 | 2017-06-21 | 视频传输方法、视频处理器、网络处理器和视频传输设备 |
CN201780005378.2A CN108496364B (zh) | 2017-06-21 | 2017-06-21 | 视频传输方法、视频处理器、网络处理器和视频传输设备 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/089410 WO2018232635A1 (zh) | 2017-06-21 | 2017-06-21 | 视频传输方法、视频处理器、网络处理器和视频传输设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018232635A1 true WO2018232635A1 (zh) | 2018-12-27 |
Family
ID=63344713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/089410 WO2018232635A1 (zh) | 2017-06-21 | 2017-06-21 | 视频传输方法、视频处理器、网络处理器和视频传输设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108496364B (zh) |
WO (1) | WO2018232635A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112422985B (zh) * | 2020-10-26 | 2023-07-25 | 眸芯科技(上海)有限公司 | 适用于jpeg的多核并行硬件编码方法和装置 |
CN116418994A (zh) * | 2021-12-29 | 2023-07-11 | 华为技术有限公司 | 一种图像编码方法以及装置 |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1227684A2 (en) * | 2001-01-19 | 2002-07-31 | Motorola, Inc. | Encoding of video signals |
CN101184195A (zh) * | 2007-12-25 | 2008-05-21 | 腾讯科技(深圳)有限公司 | 音/视频直播系统和直播方法 |
EP2066120A1 (en) * | 2007-11-29 | 2009-06-03 | Thomson Licensing | Method and device for recording of frames |
CN101552800A (zh) * | 2008-04-01 | 2009-10-07 | 华为技术有限公司 | 提供媒体内容的方法、装置和系统 |
CN102098304A (zh) * | 2011-01-25 | 2011-06-15 | 北京天纵网联科技有限公司 | 一种手机音视频边录边上传的方法 |
CN201937780U (zh) * | 2011-01-11 | 2011-08-17 | 北京国通创安信息技术有限公司 | 车载式无线视频终端 |
CN102447893A (zh) * | 2010-09-30 | 2012-05-09 | 北京沃安科技有限公司 | 手机视频实时采集和发布的方法及系统 |
CN103647935A (zh) * | 2013-11-19 | 2014-03-19 | 长沙中联重科环卫机械有限公司 | 视频数据存储方法及视频监控装置 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102547269A (zh) * | 2010-12-31 | 2012-07-04 | 上海讯垒网络科技有限公司 | 网络视频浏览方法 |
-
2017
- 2017-06-21 WO PCT/CN2017/089410 patent/WO2018232635A1/zh active Application Filing
- 2017-06-21 CN CN201780005378.2A patent/CN108496364B/zh not_active Expired - Fee Related
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1227684A2 (en) * | 2001-01-19 | 2002-07-31 | Motorola, Inc. | Encoding of video signals |
EP2066120A1 (en) * | 2007-11-29 | 2009-06-03 | Thomson Licensing | Method and device for recording of frames |
CN101184195A (zh) * | 2007-12-25 | 2008-05-21 | 腾讯科技(深圳)有限公司 | 音/视频直播系统和直播方法 |
CN101552800A (zh) * | 2008-04-01 | 2009-10-07 | 华为技术有限公司 | 提供媒体内容的方法、装置和系统 |
CN102447893A (zh) * | 2010-09-30 | 2012-05-09 | 北京沃安科技有限公司 | 手机视频实时采集和发布的方法及系统 |
CN201937780U (zh) * | 2011-01-11 | 2011-08-17 | 北京国通创安信息技术有限公司 | 车载式无线视频终端 |
CN102098304A (zh) * | 2011-01-25 | 2011-06-15 | 北京天纵网联科技有限公司 | 一种手机音视频边录边上传的方法 |
CN103647935A (zh) * | 2013-11-19 | 2014-03-19 | 长沙中联重科环卫机械有限公司 | 视频数据存储方法及视频监控装置 |
Also Published As
Publication number | Publication date |
---|---|
CN108496364A (zh) | 2018-09-04 |
CN108496364B (zh) | 2020-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3291551B1 (en) | Image delay detection method and system | |
US20180341323A1 (en) | Methods and apparatuses for handling virtual reality content | |
JP2020519094A (ja) | ビデオ再生方法、デバイス、およびシステム | |
US10070059B2 (en) | Control device, control method, and control system | |
KR20150022532A (ko) | 컨텐츠 재생 방법 및 그에 따른 단말, 그에 따른 시스템 | |
CN110830460B (zh) | 一种连接建立方法、装置、电子设备及存储介质 | |
US9542131B2 (en) | Image forming apparatus for retrieving print data using an address of the stored print data | |
US20150207715A1 (en) | Receiving apparatus, transmitting apparatus, communication system, control method for receiving apparatus, control method for transmitting apparatus, and recording medium | |
US10277652B2 (en) | Transmission apparatus, transmission method, and program | |
WO2019134499A1 (zh) | 一种用于对视频帧进行实时标注的方法与设备 | |
WO2018232635A1 (zh) | 视频传输方法、视频处理器、网络处理器和视频传输设备 | |
EP2634995A1 (en) | Apparatus and method of displaying contents using key frames in a terminal | |
US10291951B2 (en) | Video channel display method and apparatus | |
JP5440839B2 (ja) | 情報処理装置および方法、並びにプログラム | |
US11496535B2 (en) | Video data transmission apparatus, video data transmitting method, and storage medium | |
US20170118528A1 (en) | System and method for adaptive video streaming | |
JP2014131142A (ja) | 受信装置、受信方法、及びプログラム、撮像装置、撮像方法、及びプログラム、送信装置、送信方法、及びプログラム | |
CN108600696B (zh) | 一种视频流解码方法及解码设备 | |
JP2017092767A (ja) | 映像処理装置、および、映像処理方法 | |
TWI520577B (zh) | 立體影像輸出裝置與相關的立體影像輸出方法 | |
US11025691B1 (en) | Consuming fragments of time-associated data streams | |
US20240291882A1 (en) | Video Encoding Dynamic Reference Frame Selection | |
CN111083407A (zh) | 一种录播方法、装置及设备 | |
JP5589654B2 (ja) | 映像音声再生装置、および映像音声再生方法 | |
US10764347B1 (en) | Framework for time-associated data stream storage, processing, and replication |
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: 17915103 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17915103 Country of ref document: EP Kind code of ref document: A1 |