This application claims priority to Chinese Application Serial Number 201910304130.7, filed Apr. 16, 2019, which is herein incorporated by reference.
The present disclosure relates to a processing method and a processing system for processing videos from multiple channels. More particularly, the present disclosure relates to a processing method and a processing system for processing videos from multiple channels based on hardware and software decoding.
In some practical applications (such as monitoring), users need to watch multiple videos from multiple sources simultaneously. However, when the number of videos is too many, the prior art requires more processing time and can not play multiple videos in real time.
One embodiment of the present disclosure is related to a processing method for processing videos from multiple channels that includes: assigning first multimedia data to a hardware decoder circuit to generate first decoded data; assigning second multimedia data to a software decoder circuit to generate second decoded data; and duplicating the first decoded data and the second decoded data to a video buffer according to a predetermined arrangement and an encoding format to generate output data, for being displayed by a screen, in which predetermined arrangement indicates an arrangement of display regions corresponding to the first multimedia data and the second multimedia data on the screen.
One embodiment of the present disclosure is related to a processing system for processing videos from multiple channels that includes a hardware decoder circuit, a software decoder circuit, at least one memory, and a data combination circuit. The hardware decoder circuit is configured to decode first multimedia data to generate first decoded data. The software decoder circuit is configured to decode second multimedia data to generate second decoded data. The at least one memory is configured to provide a plurality of frame buffers to store the first decoded data and the second decoded data, and provide a video buffer. The data combination circuit is configured to duplicate the first decoded data and the second decoded data to the video buffer according to a predetermined arrangement and an encoding format to generate output data, for being displayed by a screen. The predetermined arrangement indicates an arrangement of display regions corresponding to the first multimedia data and the second multimedia data on the screen.
As the above embodiments, the processing system and processing method for processing the videos from multiple channels of the present embodiment can utilize the hardware/software decoder circuit(s) to process the multimedia data of multiple channels and improve the compatibility of video formats. In addition, the real-time play of the video is improved.
It is to be understood that both the foregoing general description and the following detailed description are by examples, and are intended to provide further explanation of the disclosure as claimed.
The disclosure can be more fully understood by reading the following detailed description of the embodiment, with reference made to the accompanying drawings as follows:
Reference will now be made in detail to the present embodiments of the disclosure, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts. The embodiments below are described in detail with the accompanying drawings, but the examples provided are not intended to limit the scope of the disclosure covered by the description. The structure and operation are not intended to limit the execution order. Any structure regrouped by elements, which has an equal effect, is covered by the scope of the present disclosure.
As used herein, “the first”, “the second”, . . . etc. do not refer to the order or priority, nor are they intended to limit the present disclosure. They are merely used to distinguish the elements or operations described with the same technical terms. It will be understood that, as used herein, the phrase “and/or” includes any and all combinations of one or more of the associated listed items.
In this document, the term “coupled” may also be referred to “electrically coupled,” and the term “connected” may be referred to “electrically connected.” “Coupled” and “connected” may be referred to “directly coupled” and “directly connected” respectively, or “indirectly coupled” and “indirectly connected” respectively. “Coupled” and “connected” may also be used to indicate that two or more elements cooperate or interact with each other.
In this document, the term “circuitry” may indicate a system formed with one or more circuits. The term “circuit” may indicate an object, which is formed with one or more transistors and/or one or more active/passive elements based on a specific arrangement, for processing signals.
For ease of understanding, like elements in the shown figures are designated with the same reference numbers.
The processing system for processing the videos from multiple channels 100 includes a front-end processing circuit 110, at least one hardware decoder circuit 120, at least one software decoder circuit 130, a data combination circuit 140, and at least one memory 150.
In some embodiments, the front-end processing circuit 110, the at least one software decoder circuit 130, the data combination circuit 140 may be implemented by one or more processing circuits or application specific integrated circuits.
The front-end processing circuit 110 may be coupled to multiple video sources S1-S4 via a wired or wireless network to respectively receive multimedia data D1-D4. The front-end processing circuit 110 can parse at least one of the multimedia data D1-D4 based on one or more libraries to obtain multimedia information I1 including link URLs, stream types, video data and/or audio data, etc. corresponding to the multimedia data D1-D4. In some embodiments, the above libraries are configured to process video and/or audio, and may be stored in the at least one memory 150. In some embodiments, the above libraries may be provided by a third party or a client, but the preset disclosure is not limited thereto.
The multiple video sources S1-S4 may be different file sources in a same device or multiple independent electronic devices. In some embodiments, the multimedia data D1-D4 may be local videos. In some embodiments, the multimedia data D1-D4 may be streaming data transmitted according to a protocol including the User Datagram Protocol (UDP), the Transmission Control Protocol (TCP), or the Real Time Streaming Protocol (RTSP), etc., but the preset disclosure is not limited thereto.
The at least one hardware decoder circuit 120 performs a video decoding operation based on hardware. In some embodiments, the hardware decoder circuit 120 may be implemented by at least one image/audio processing engine circuit, at least one display chip, at least one audio processing chip, and/or at least one application specific integrated circuit, but the preset disclosure is not limited thereto.
In some embodiments, the at least one hardware decoder circuit 120 is disposed to process at least one of the multimedia data D1-D4. For example, as shown in
In some embodiments, the hardware decoder circuit 120 includes a video decoder 122 and an audio decoder 124. Take the multimedia data D1 as an example, the multimedia data D1 is transmitted to the video decoder 122 for decoding when the front-end processing circuit 110 determines that the multimedia data D1 is video data according to the stream type. Alternatively, the multimedia data D1 is transmitted to the audio decoder 124 for decoding when the front-end processing circuit 110 determines that the multimedia data D1 is audio data according to the stream type.
In some embodiments, each of the hardware decoder circuits 120 is configured to perform a decoding operation on one frame of video data to generate an image. In some embodiments, the front-end processing circuit 110 is configured to determine scan methods of the multimedia data D1-D4. Take the multimedia data D1 as an example, after parsing the multimedia data D1, the front-end processing circuit 110 can directly transmit the multimedia data D1 to the corresponding hardware decoder circuit 120 for a decoding process when the front-end processing circuit 110 can confirm that a display format of the multimedia data D1 is progressive scanning according to the multimedia information I1. Alternatively, when the display format of the multimedia data D1 is interlace scanning, the front-end processing circuit 110 further parses a number of frames NF, odd field data DO, and even field data DE of the multimedia data D1 to combine them into one frame of video data D1-1, and transmits the one frame of video data D1-1 to the corresponding hardware decoder circuit 120 for the decoding process.
The at least one software decoder circuit 130 performs a video decoding operation based on software. In some embodiments, the at least one software decoder circuit 130 processes at least one of the multimedia data D1-D4. For example, as shown in
The data combination circuit 140 is coupled to at least one of the hardware decoder circuits 120 and at least one of the software decoder circuits 130 to receive the decoded data D1′-D4′. The data combination circuit 140 is configured to duplicate the decoded data D1′-D4′ to a video buffer 151 in the at least one memory 150, to combine them into output data UHD. The data combination circuit 140 can provide the output data UHD to a screen 100A to simultaneously display video contents of the multimedia data D1-D4.
The at least one memory 150 is configured to provide a temporary storage space required by the decoding operations of at least one of the hardware decoder circuits 120 and at least one of the software decoder circuits 130 and a storage space for storing the output data UHD. In some embodiments, the at least one memory 150 may be any and all combinations of a non-transitory computer readable medium, a hard disk, a dynamic random access memory, and a static random access memory, but the present disclosure is not limited thereto.
The above various types of presentation can be used to simultaneously display multiple videos from multiple channels, so that a user can conveniently view multiple multimedia contents or perform monitoring. The above various types of presentation are given for illustrative purposes, and the present disclosure is not limited thereto.
In operation S310, a decoding process is initialized, and a video buffer from at least one memory is requested.
For example, the hardware decoder circuit 120 can ask the at least one memory 150 to provide a plurality of video buffers 151 before decoding is started. Accordingly, the video buffers 151 can be assigned to the hardware decoder circuit 120 for a decoding operation. In some embodiments, the plurality of video buffers 151 in
In step S320, coordinates corresponding to a display region are initialized.
In operation S330, a ring buffer is initialized to receive multimedia data.
In some embodiments, the hardware decoder circuit 120 can send a request to the at least one memory 150, to establish a ring buffer 152. The ring buffer 152 is configured to receive the multimedia data D1 or the video data D1-1 directly transmitted from the front-end processing circuit 110.
Reference is made to
When receiving the multimedia data D1 or the video data D1-1 for the first time, the hardware decoder circuit 120 can parse the data to obtain the related multimedia information I1 (for example, encoding format, image length and width, etc.). Then, the hardware decoder circuit 120 can send a request to the at least one memory 150, to apply for a plurality of (for example, may be but not limited to 6) frame buffers 153. The frame buffers 153 can store the decoded data D1′. In some embodiments, a capacity of each of the frame buffers 153 may be determined based on the above related image information. For example, the encoding format is YUV, the length is 1920, and the width is 1080. Under this condition, since each pixel includes 1-bit Y component data and 0.5-bit UV component data, the capacity of the frame buffer 153 can be determined to be 1920×1080×3/2=3110400 bits. In some embodiments, the frame buffer 153 may be so disposed to be allocated according to the management mechanism of ION to improve the data duplicating speed.
In operation S410, at least one multimedia data is assigned to a hardware decoder circuit, and at least one multimedia data is assigned to a software decoder circuit.
For example, as shown in
In operation S420, a decoding operation is performed to generate decoded data. Since the operations here may refer to the above description of
In operation S430, the decoded data is duplicated to a video buffer according to a predetermined arrangement and an encoding format to generate output data for being displayed by a screen.
When data stored in the frame buffers 153 corresponds to one frame of image data, the data combination circuit 140 can duplicate the data stored in the frame buffers 153 to the video buffer 151 according to a predetermined arrangement and an encoding format (that is, YUV). The predetermined arrangement indicates an arrangement of display regions corresponding to the multimedia data D1-D4 on the screen 100A (that is, an arrangement of the regions R1-R4).
The above description of the method 300 or 400 includes exemplary operations, but the operations of the method 300 or 400 are not necessarily performed in the order described above. The order of the operations of the method 300 or 400 can be changed, or the operations can be executed simultaneously or partially simultaneously as appropriate, in accordance with the spirit and scope of various embodiments of the present disclosure.
In some related technologies, multiple multimedia data from multiple channels still need to be encoded as a single video stream after being decoded and is then played. In the above technologies, owing to the additional encoding operation, more operation time needs to be consumed so that a real-time play can not be achieved. Or, in some related technologies, only hardware decoding is used to process multimedia data of up to two channels. In the above technologies, the multimedia data of the two channels must be in a same video format.
As compared with the above technologies, the embodiments of the present disclosure deploy the plurality of hardware decoder circuit(s) and software decoder circuit(s), which can improve the compatibility of video formats and make full use of the assignment of the hardware/software decoder circuit(s) to eliminate the additional encoding operation. As a result, the real-time play of the video can be improved.
As the above embodiments, the processing system and processing method for processing the videos from multiple channels of the present embodiment can utilize the hardware/software decoder circuit(s) to process the multimedia data of multiple channels and improve the compatibility of video formats. In addition, the real-time play of the video is improved.
Although the present disclosure has been described in considerable detail with reference to certain embodiments thereof, other embodiments are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the embodiments contained herein.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present disclosure without departing from the scope or spirit of the disclosure. In view of the foregoing, it is intended that the present disclosure cover modifications and variations of this disclosure provided they fall within the scope of the following claims.
Number | Date | Country | Kind |
---|---|---|---|
201910304130.7 | Apr 2019 | CN | national |