| Digital video monitor system (DVRs), integrated with compute, multi-media, communication and network technologies, has played significant role in more and more fields. The encoder end of DVRs, with responsibility for video capture and encoding, is the key part of DVRs and straightly affect the performance and quality of the whole system.In this thesis, the design and implementation of DVRs'encoder end is concerned, including hardware design, driver design and application program design. Hardware design is based on embedded X86 platform. A interface board with 4 interface is designed by the use of SAA7146 PCI bridge. The interface of the board can be connected to encoder board conveniently. Each encoder board can encode 4 ways of video and consists of 4 pieces of TW9903, used to implement analog video's A/D transformation, 1 piece of AQ424, used to combine four ways of digital video into one, 1 pieces of IME6400, used to encode digital video into MPEG-4 code. This structure let it easy to realize 4-way 8-way 12-way and 16-way system, and design cost decreases heavily.Software design is based on Linux system. The driver program is designed as a Linux kernel module. This driver module includes implementation of addressing encoder end's internal register, reading encoded data from the encoder end and the interrupt handler of the encoder end.Application program mainly contains a multi-thread program, including main control thread, preview thread and encoding thread. Main control thread initializes encoder end system and deals with control message delivered from user interface; Preview thread reads preview data and displays it on the screen by the way of user's request; Encoding thread reads encoded data and transfers it to server process. According to user's requirement, server saves the encoded data or transfers it to client by network.An audio/video synchronizing player is also contained in the application program design. It is used to play MPEG-4 data at local machine. |