Low-cost high-definition screen media system based on OMAP3730 [DSP hard decoding]

Designed and implemented a low-cost high-definition screen media system based on OMAP3730, which can fully utilize the powerful computing functions of programmable C64+DSP, realize high-definition hard decoding playback of common video formats by hardware, and use software to take into account the infrequent video format. Decoding and playing, and at the same time, using the DSP to realize the screen rotation for the characteristics of the screen media system, the effect of adaptive playback on the horizontal screen and the vertical screen is achieved.

With the continuous development and application of mobile internet technology, multimedia technology has penetrated into people's work and life with its unstoppable trend. Digital video is a complex field in multimedia technology, how to use it in low-cost, low-power environment. Achieving high quality digital video applications is the focus of competition among companies. Low-power ARM supports peripherals more comprehensively, but the computing power is poor; the computing power based on Harvard architecture is powerful, but the support for peripherals is weak. OMAP3730 is an ARM+DSP dual-core heterogeneous processing chip introduced by TI. The ARM core is 1GHz COTEX-A8, and the DSP core is 800MHz programmable C64+DSP.

This paper designs and implements a low-cost high-definition screen media system based on OMAP3730, which can fully utilize the powerful computing function of programmable C64+DSP, realize the high-definition hard decoding playback of common video formats by hardware, and use the software to take into account the infrequent video format. Decoding playback. The system also uses the DSP to realize the screen rotation for the characteristics of the screen media system, and realizes adaptive playback on the horizontal screen and the vertical screen. The entire system flow is shown in Figure 1.

1 Video type judgment and decoding

This article uses GstDiscover to determine the type of video file. GstDiscover is a tool provided by the GStreamer library that accepts input URIs or URI lists and returns their information. GstDiscover returns more information. We focus on the video encoding and the resolution of the video in the returned information. Based on these, we can judge whether the video can be accelerated by hardware. A typical output of GstDiscover is shown in Figure 2. The package information video/webm of the file is given; audio information: audio code audio/x-vorbis, channel number 2, ratio 48000; video information: video code video/x -vp8, width 854, height 480, frame rate 25.

The specific implementation can use QProcess in QT to call GstDiscover through the command line, and use QProcess's readAllStandardOutput function to read all output results. Use the regular expression to find the keywords "audio:" and "video:" in the output to get the relevant video and audio information.

GStreamer is a pipeline-based multimedia framework that provides componentized multimedia processing capabilities. All the functional modules in the framework are implemented as pluggable components, and can be easily installed on any pipe when needed. Since all plugins are uniformly exchanged through the pipe mechanism, it is easy to use. The various plugins available "assemble" a fully functional multimedia application. This loosely coupled architecture makes it easy to modularize codecs. TI's GStreamer plug-in uses DMAI to access the underlying hardware, making DSP applications easy. GStreamer acts as an application on the ARM processor at runtime and calls the DSP and acceleration modules by using DMAI to implement hardware codecs. GStreamer's application achieves maximum reusability of public composition and improves the portability of the system framework.

Elements are the most important concepts in GStreamer. You can link a group of elements together to form a chain, and then let the data flow through each element in the chain. Each element has a specific function, such as some elements can read data from the file, some elements can achieve video decoding, and some elements are responsible for the data to the sound card and so on. Pipes can be implemented by concatenating elements together. Pipes are used to accomplish specific tasks, such as media playback or video capture. GStreamer provides a large number of elements by default, which makes it possible to develop a large number of media applications. You can also create new elements yourself if you need them. The interface (pads) is where the data is input and output on the element. There are two types of interfaces, the interface for inputting data and the interface for outputting data (src). Two elements can be linked together by a connection interface, which must support the same data format. A container is a special element. A container is originally a collection of connected elements, but the outer container behaves like an element. A pipeline is a high-level container that provides a bus mechanism for the application layer and synchronizes element response.

A simple ogg player pipe is shown in Figure 3, and each small box represents an element. The source element reads data from the file source and sends it to the ogg resolver. The decomposer decomposes the composite data stream into a video data stream and an audio data stream, and then sends them to the video and audio decoder. After receiving the data, the audio decoder sends the data to the speaker after decoding, and the video decoder decodes the data and sends it to the display, thereby realizing the synchronous playback of the video and audio.

This article refers to the address: http://TIcle/273271.htm

Hard decoding based on DSP is to replace the time-consuming elements in the GStreamer pipeline with elements that can be accelerated by DSP. A pipeline based on DSP hard decoding is shown in Figure 4. The difference from the above example is that the video decoding element is replaced by TIViddec, the audio decoding element is replaced by TIAuddec, and the display element is replaced by TIDmaiVideoSink.

OMAP3730 provides hardware-based video and audio codec through GStreamer components, supporting H.264, MPEG4/2, H.263, VC1, JPEG, G.711/G on digital video, video, voice and audio. 723, MP3, WMA and other codecs. So for the OMAP3730 to support hard decoding format, we use GStreamer to play. For formats that do not support hard decoding, we use Mplayer playback, because Mplayer is better than GStreamer for compatibility and stability of various formats.

2 DSP-based screen

The horizontal screen and the vertical screen each have advantages, the horizontal screen conforms to the playing habit, and the vertical screen occupies less ground. The Linux system is started by the horizontal screen by default on the embedded system. There are two methods for the system to support the vertical screen. One is the system method, and the other is the method of applying the software. The system method can realize the screen transition, but when playing HD video, because the system load is large and easy to crash, we use the application software method to realize DSP screen. The application software screen is divided into two parts: the playback interface screen and the video screen transition. Our application software interface is implemented by QT. The interface can be changed by setting the system variable export QWS_DISPLAY=transformed:::rot90:0. The video screen is divided into two cases: GStreamer and Mplayer. For GStreamer playback, we can implement a transition element similar to gsttividresize, insert the element into the pipeline to achieve a transition between TIViddec and TIDmaiVideoSink. For Mplayer's screen change, you can create a new screen inversion plugin in the vo directory of the Mplayer source library. When playing video, use the command word "-vo" to force the screen inversion plugin.

TI encapsulates commonly used DSP algorithms into a unified software interface called C6Accel for developers to call. According to the function function C6Accel, it is divided into three libraries: signal processing, image processing and mathematical operation. The signal processing includes Fourier transform, inverse Fourier transform, autocorrelation, autocorrelation, point multiplication, matrix multiplication, FIR filtering, IIR filtering, etc.; image processing includes sobel edge detection, histogram, convolution, correlation, median filtering , matrix operations, image encoding and other functions; math library mainly contains four arithmetic, trigonometric functions and other functions.

The essence of picture rotation is a matrix transposition operation, which can be done by DSP. The function of matrix transposition can be realized by hardware on the floating-point DSP core. This function is encapsulated in the function C6accel_DSPF_sp_mat_trans and can be called directly. Because the OMAP3730 provides a fixed-point DSP that lacks a floating-point helper, matrix transposition cannot be implemented in hardware and can only be implemented in software.

3 Summary

The power consumption of ARM supports peripherals more comprehensively, but the computing power is poor; the computing power based on Harvard architecture is powerful, but the support for peripherals is weak. The low-cost high-definition screen media system based on OMAP3730 designed and implemented in this paper can fully utilize the powerful computing functions of programmable C64+DSP, taking into account the advantages of ARM and DSP, and has broad application prospects in the field of embedded digital video.

Disposable Vape

Disposable Vape,Disposable Vape Flum Float,Randm Vape,Iplay Vape

Nanning Nuoxin Technology Co., LTD , https://www.nx-vapes.com