An Embedded System Design for High DefinitionMedia PlayerDeng Feng, Hu Jianliang, Qi Xiangdong, Wang JinlinNational Network New Media Engineering Research Center, Beijing, Chinae-mail: fdeng@Abstract—With the huge increase in popularity of high definition applications, the traditional media player can not meet the demand for high-definition media broadcasting nowadays. This paper is focused on the system design of a next-generation progressive high definition media player based on Sigma Designs EM8623L, which adopted an embedded platform architecture and hardware decoding technology that support playback of multiple video and audio file formats. The paper details the implementation of system hardware and software. The practice results have shown that this product has low-cost, low power, portable appearance and powerful advanced high definition playback performance, and confirmed to be satisfactory by the development team and market consumers.Index Terms—Embedded Platform; Hardware Decoding; High Definition; Media playerI.I NTRODUCTIONWith the fast development of communication technologies, and the huge increase in progressive popularity of high definition applications, the traditional media player can not meet the demand for high-definition media broadcasting nowadays. There are three basic types of high-definition media player at present: Blu-ray disc player, home theater personal computer and streaming media player. Blu-ray disc player, using next-generation Blu-ray DVD technology, storage capacity can be turned nearly six times than the ones adopted red laser DVD standards, but Blu-ray disc player is not compatible with the existing traditional DVD, and high production costs, making Blu-ray disc player and disc prices are extremely high. Due to the expensive marketing cost, Blu-ray player has promoted very slowly and only popular among Blu-ray fancier.Home theater personal computer (HTPC) is a convergence device that combines the functions of a personal computer and a media center software application which feature video and music playback, and usually but not always it also has digital video recorder functionality [1]. It's used as a replacement for or supplement to a DVD player, and sometimes cable or satellite receiver. Although video output from a HTPC can rival high-end dedicated HD playback devices, but HTPCs are more complex, and the software in use may require configuration pre-set. In addition, HTPCs often use more power than consumer audio/video components.Streaming media player is equipped to handle streaming media, which means that media is constantly delivery to the device over an internet connection and played for the consumer immediately, rather than being saved to the hard drive. Streaming media technologies have improved significantly since the 1990s, when delivery was typically uneven. However, the quality of streamed content is still dependent upon the user's connection speed and network circumstance. Due to packet loss, latency, jittering and Quality of Service (QoS) based issue, it is difficult to demonstrate real-time streaming high-quality playback performance, especially in a large scale online deployment applications.Regarding to the shortage of the high definition media players mentioned above, this paper proposes an embedded system design scheme of a next-generation progressive high definition player based on Sigma Designs EM8623L, which adopts an embedded platform architecture and hardware decoding technology that support playback of multiple video and audio file format and realize composite information issue with video, audio, picture and roll titles. Specifically, the system is designed to support two ways of new media content obtained, pushing automatically from or a user self-subscription program to the server with which it is orientated. The system also supports media files local storage, the local storage medium can be a build-in hard disk or an external mobile hard disk with USB interface. This embedded HD media player can overcome the limitations due to network bandwidth and bad broadcast effect under heavy congested network environments. Besides, it is more portable, cost-effective and low power than their dedicated counterparts.The paper is organized as follows. Section 2 gives a brief introduction on system hardware platform, mainly focus on the description of the adopted core processor and its peripheral interface design. Software architecture, components design and its implementation are summarized in Section 3. The paper concludes in Section 4, along with a discussion on future work.II.S YSTEM H ARDWARE P LATFORMThe high definition media player hardware system block diagram described in this paper is shown in figure 1, including: high-definition decoder chip EM8623L; 128MB SDRAM and 8MB flash memory; network interface controller; front panel control circuit; built-in 2.5-inch notebook SATA hard drive interface; various video and audio outputs, such as digital high definition multimedia interface (HDMI), YPbPr, composite video signal interface (VIDEO) and other video interfaces, optional digital audio interface, such as S/PDIF, coaxial digital audio interface (COAXIAL ) and two-channel stereo audio interface (R-AUDIO-L).2010 Second International Conference on Communication Systems, Networks and ApplicationsFigure1. Hardware block diagramThe system design scheme treats the high definition television (HDTV) decoding solution based on EM8623L provided by Sigma Designs Corporation. The core processor EM8623L is an advanced, single-chip audio/video decoder that contains an internal 200MHz ARM-Compatible RISC CPU, a video decoder subsystem and an audio processing subsystem. 200MHz of ARM is to support the embedded operating system, middle ware and applications required for the consumer appliances. Video decoder subsystem consists of a proprietary 16-bit RISC CPU, executing the video decoding algorithms for HDTV, IPTV, DVD, MPEG-4.10 (H.264), SMPTE 421M (VC-1), WMV9, MPEG-4.2 and MPEG-2 video format. Audio processing subsystem is based on a custom-designed 32-bit digital signal processor (DSP), on which audio decoding and processing algorithms are implemented for MPEG-1 Layer1/2/3 (MP3), AC-3, AAC, PCM, WMA9 etc. audio format [2]. Incorporating flexible, advanced audio/video processing, the EM8623L enables cost-effective solutions for high-definition media playback devices.USB2.0 interface is designed with VIA VT6216, it is used to be connected with external removable storage devices, play one of the audio-visual resources, and provide the capability of firmware upgrade offline.The block described in the network interface controller (NIC) with a RJ45 network interface connection, primarily to complete the physical layer and media access control (MAC) layer of the communication task. Ethernet network controller selected RELTEK company RTL8100CL chip, which is equipped with standard 10/100M Ethernet interface, integrated with a 64KBytes on-chip SRAM as network cash to store the data packet receiving and sending temporarily. In addition, RTL8100CL can support PCI bus and data bus width of 32 bits. Digital media processor and the NIC of the data interface use a DMA channel to improve data transport efficiency.SATA connection interface is to enable the data transform between digital media processor’s IDE hard disk interface to SATA controller interface. Choice of hard disk connection, as we know, is affecting the software operating efficiency and the system performance quality directly. In the home applications, the mainstream PATA hard disk only can support ATA/100 and ATA/133 two kinds of data transmission specifications, transmission speed can only reach maximum transfer rate of100MB / S or 133MB / S, this is only to meet the current large-capacity hard drive data transfer under normal circumstances.While The SATA hard drive it has a faster external interface transfer rate, data verification measures for further improvement, SATA 1.0 specification provides a standard transfer rate up to 150MB / S. The system described in this paper supports the built-in SATA2.5-inch hard drives through Marvell 88SA8040 PATA-SATA bridge chip, this gives full play to the performance advantages of SATA interface, can not only improve the large capacity of high-definition media data storage efficiency, but also effectively improve the media data transmission speed to ensure smooth playback of high-definition programming and other operations. HDMI output handling part is completed by the Silicon Image of Sil9030CTU, which is an HDMI1.1 version of the processor chip, to comply with HDMI 1.1, HDCP 1.1 and is compatible with DVI l.0’s HDMI controller. It supports DTV a variety of video formats, supports YC, and RGB pixel encoding format as well as I2S audio and industry-standard S / PDIF input. Internal PaneLink TMDS code cores and HDCP content protection encryption engine are also integrated in Sil9030CTU.III. S OFTWARE D ESIGN AND I MPLEMENTATIONA. Software ArchitectureSoftware architecture design is based on Sigma Designs’ hardware platform, as it is shown in figure 2, primarily contained by hardware driver layer, real-time operating system (RTOS) layer, middle ware layer and application layer. Hardware drivers layer is most closely associated with the hardware, including audio and video output interfaces, NIC, SATA controller, USB2.0 controller, Flash, RS232, and front panel / remote controller drivers, etc., as well as the hardware address register access APIs. The load process of device driver can be configured by started with operating system or separately loaded after the RTOS startup, this gives more flexible and convenient for the kernel size adjustment according to the hardware flash memory space.Real-time operating system is the key part of embedded device software. uClinux is a derivative of Linux operating system intended for microcontrollers without Memory Management Units (MMUs) [3]. Compared with Linux, uClinux systems tend to be more deeply embedded systems, with smaller memories and ROM footprints and an unusual array of devices. As EM8623L is a NOMMU processor, so thesystem chose uClinux as the operating system kernel.Figure2. Software architecture The middle ware layer includes TCP-UDP/IP protocol stack module, PPPoE (Point-to-Point Protocol over Ethernet)module, audio and video decoding module and a 2D graphics accelerator module. To save large amount of data processing time, we utilize UDP as system communication protocol instead of TCP. However, this will come with an issue that how to make sure that the entire UDP message has arrived and is in the right order. A new mechanism based on UDP for data transmission is therefore put forward in this paper to guarantee data reliability, ordering, and integrity. The main method is in data fields of UDP, a packet number field is added as a header of the data carrying by UDP, then according to the packet number receiving, application program can obtain the information that the data whether is out of order or losing, and adopt packet reissue or reassemble. The detailed data delivery algorithm based on UDP will be given later in section C. The PPPoE stack is realized by porting standard Linux PPPoE open source codes onto the embedded uClinux platform in this paper. Video/Audio decoder is a complete HD file player provided with Sigma EM862X SDKs, which can play any file supported by the hardware with no parameter specification.The application layer at the top level of software architecture is to accomplish system application software, the main components include HD multimedia playback, Registration, Media file download, Hard disk management, Upgrading and Configuration, which consist of the main function of the HD media player system.B.System Tasks DesignThe system is primarily designed with four tasks, namely: main management task, networking task, playing task and front-panel receiving task. Main management task is responsible for the task’s scheduling and monitoring. Networking task is to handle protocol handshake and to execute HD media files delivery request. Playing task receives playing related commands from the user and does the corresponding operation, such as playing, fast forward, fast rewind, pause and stop etc. Front-panel receiving task is in charge of receiving and processing infrared remote controller signal promptly. The system startup process describes as follows:Step1.Start bootloader, make the necessary hardware initialization, such as flash driver etc.Step2. Start romfs from the flash;Step3. To determine whether the step2 activated successful, if successful, followed by app.bin.gz decompression,uclinux kernel initialization, and then load the BSPdriver programs, launch the upper applications;Step4. If step2 activated unsuccessful, read romfs.bin from the hard disk, and write it back to Flash, then repeated step3operation;Step5. Read the last shutdown of the system configuration parameters stored in Flash, such as video output format,display resolution etc.;Step6. Enable networking task thread;Step7. Enable main manager task.C.Download Mechanism for HD media filesHere we focus on the description of a new data delivery mechanism of networking task dedicated to download huge data over Internet, especially for HD media files. Networking task includes message control thread and data delivery thread, message control thread and data delivery thread together complete remote download and local storage for high definition media files. Specifically, message control thread is in charge of messaging hand-shaking dialogues, if the message initiate end don’t receive feedback agreed protocol signal from target destination within 200ms, the message control thread will consider this message delivery process overtime and will do reissue again. Data delivery thread is designed to download and store HD media resources, which can be pushed from the remote server, as well as customer self-subscribed service. A network data delivery algorithm based on UDP is proposed with adaptive retransmission and supplementation fault-tolerant mechanism according to the different packet loss rate under certain network environment. The process to download HD media data is shown as figure 3 in detail.Figure4. Download speed test resultsWe conducted a download speed test for random HD media files in the laboratory, the performance comparison results between our method and TCP are given in Figure 4, the testing bandwidth of network is 4 Mbps. Study results have shown our algorithm has more robust, reliable and high-speed data reception capabilities than traditional TCP methods under heavy network congestion circumstance, the download speed of effective data can up to more than 80% of the existing bandwidth.IV.C ONCLUSIONThis paper presents the design and implementation of a high definition broadcasting system based on Sigma Designs EM8623L HD decoder chip, which support playback of MPEG4, WMV9, Divx, H.264, VC-1 files, and realize composite information issue with video, audio, picture and roll titles. Particularly, a high-speed and effective mechanism features high definition media files delivery under the heavy congest network environment is given in this paper. This embedded HD media player has been successfully completed and the products have been put into market with a wide range of promotion. The practice results have shown that this product has low-cost, low power, portable appearance and powerful advanced HD playback performance, and confirmed to be satisfactory by the market consumers.The future of this work will be deployed around Sigma designs second generation media processor 8654 chipset, which is tipped to boast of 50 percent more processing power, lower cost, and an enhanced set of peripherals. The prototype HD broadcasting system based on 8654 is under developing, and the exercise is still in process. We are currently faced with theflood of HD multimedia information. And we believe our HD media player can bring the consumer excellent high definition quality enjoyment and perfect experience. The product will have a broad market prospect in the near future.A CKNOWLEDGMENTThis paper was supported by the National High Technology Support Program of China under the grant number 2008BAH28B04 and by the research program of Shanghai Science and Technology Commission under the grant number 08dz150010B.R EFERENCES[1]Wikipedia, Home theater PC, /wiki/Home_theater_PC [2]Sigma Design. EM8622L Digital Media Processor With Multiple A/bCodec Support. 2005[3]Michael Durrant and Michael Leslie Of Lineo, How uClinux providesMMU-less processors with an alternative, /story/OEG20020212S0014[4]Jonathan corbet, Alessandro rubini, Greg kroah-hartman. Linux DeviceDriver (The 3rd Version) [M]. O’Reilly Media, Inc. 2006[5]Velibor Markovski, Fei Xue and Ljiljana Trajkovic, “Simulation andAnalysis of Packet Loss in User Datagram Protocol Transfers”, TheJournal of Supercomputing, 20, 175–196, 2001[6]Claudio R. Lima, Ray Huang, Jim Black, James Pan, Linda Chau, J.C.Straley, and J.J. Yea , “High Definition Video Broadcast over Core IPNetworks”, Optical Fiber Communication Conference and Expositionand The National Fiber Optic Engineers Conference, Technical Digest(CD) (Optical Society of America, 2006), paper NThE3.[7]L. Mamakos, K. Lidl, J. Evarts, A Method for Transmitting PPP OverEthernet (PPPoE), /rfc/rfc2516.txtFigure3. The flow chart to download HD multimedia files。