Notes: Using The Unichome Projects viaXvMC Hardware MPEG Interface with MythTv ----------------------------------------------------------------------- Date: 8/9/04 Author: Terry Barnaby Release: 0.3 Introduction ------------ This describes how to build and use MythTv with the Unichome Projects viaXvMC interface library which provides a Hardware MPEG decoding implementation for the Via Unichrome (CLE266) chipset. History ------- There is no generic MPEG interface to the Linux/Unix X-Window system at this time. There are a few vender/project extentions that support Hardware MPEG Decoders, but none are as yet generic enough to be hardware independent. There was a special Via HW interface to the Via CLE266 Unichrome chipset available based on libddmpeg. This however required root access and accessed the HW Mpeg engine in a very insecure and device specific manner. Thomas Hellström, of the Unichome project has developed an extension to the X-Windows XvMC interface that provides the ability to drive a HW MPeg controller. Although this is still Via specific, it is much much better and closer to a generic X-Server MPEG API. Required Bits ------------- In order for this to work your system requires the following: 1. Recent Via DRM module 2. Recent Unichrome Via X-Server driver. Tested with release r25. 3. Recent Unichrome viaXvMC library. CVS release on or after 8/9/04. Patching MythTV sources ----------------------- The mythtv-beam-viaxvmc-3.patch should be applied to a clean set of Mythtv-0.15.1 sources using the command: "patch -p1 -s < mythtv-beam-viaxvmc-3.patch" performed within the top level directory of the MythTv source. Configuration for Build ---------------------- In the file "settings.pro" the lines under the comment "XvMC_VLD support" should be uncommented. MythTv can now be build as normal. Note that as, at the moment, there is a separate libXvMC interface library for each specific hardware type only one libXvMC library can be linked at a time into MythTV. Thus -lXvMCNVIDIA and -lviaXvMC cannot be configured to be linked in the same build. Configuration for Run --------------------- There is a toggle button in the "TV Player" settings screen titled "Use HW XVMC VLD Decoding (Via only)". This should be set to enable the viaXvMC HW Mpeg decoding. This is enabled by default if XvMC_VLD is enabled in the build. Known Issues ------------ 1. The OSD is in black and white. Note that the OSD will not work correctly without a later release of viaXvMC (8/9/04). The OSD is in B&W because this is the way MythTV renders in for XVMC output. This coule be modified. 2. The MPEG Qmatrix may not be set up correctly. This may lead to blockiness. I have not done a lot of display quality testing ..... 3. Some CPU usage performance gains could be had. There is a problem with the Via HW MPEG engine in that it is not possible for it to generate an interrupt on MPEG slice decode completion. This means that the CPU has to effectively poll the HW MPEG engine to wait for this condition. The ViaXvMC library uses the Linux RTC to improve this, but there are still overheads. Thomas is trying out the use of the AGP DMA engine which, its is hoped, will improve this. Test Environment ---------------- I have tested this in the following environment: Hardware: Via M10000 Motherboard with 256M RAM, Network boot/NFSRoot Software OS: Fedora 2 with updates to date Software: MythTv and dependentcies installed from ATRPMS using yum. Kernel: Standard 2.6.7 Linux kernel, with latest DRM from CVS configured for VIA Motherboard. X-Driver: Unichrome Via driver from CVS. ViaXvMC: Unichrome Via XvMC library from CVS as of 8/9/04. MythTv: MythTv 0.15.1 as patched for ATRPMS and with mythtv-beam-viaxvmc-2.patch patch Performance ----------- With this system a Via M10000 system can decode and display an DVB MPEG2 stream using about 20% CPU rather than about 60% with software decode and Xv picture display. Via MPEG Hardware Decoding in MythTv ------------------------------------ This describes the basic operation of MythTv with the Via MPEG decoder. MythTv, along with other MPEG display programs, has two main sub-systems for decoding and displaying an MPEG AV stream. The decoder section de-multiplexes the AV stream and performs Video and Audio MPEG decode, while the display section display the Video frames on the screen with any necessary scaling and colour conversion (YUV to RGB). The Via HW MPEG decoder, is able to perform the main work of the MPEG decode, that is it can take MPEG slice data and generate the video frames. It cannot de-multiplex the MPEG stream or perfrom the necessary control based on the stream (frame size, QMatrix load, frame type (I,P,B frames)). Thus in order to use the Via HW MPEG controller there needs to be some linkage into the decoder and display sections of the code. This patch adds the file xvmcvldvideo.c to the MythTv decoder along with calls from the MPEG decoder library to use it. This in turn uses the code in videoout_xvmc.cpp, the display side to communicate with the VIA HW MPEG engine. The videoout_xvmc.cpp file is the standard MythTv XVMC one with additions to support the extra level of MPEG decode that the Via HW MPEG system provides. Videoout_xvmc.cpp uses the ViaXvMC library to communicate with the HW MPEG controller. Web Links --------- Unichrome Project: http://unichrome.sourceforge.net DRM: http://sourceforge.net/projects/dri ATRPMS: http://atrpms.net
Changes:
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use