CLE266 MPEG

Please note this page is deprecated! The contents remain here for reference only, please do not continue using the ddmpeg library.
The development is now continued at the openchrome project.


Or you might want to read the how it was done page.


** EPIA-M hardware MPEG decoding on kernels not supported by VIA is now possible. **
  1. CLE266 MPEG
    1. Current Versions
    2. Background
    3. CLE266 V4L Module
    4. XFree86 patch
    5. libddmpeg library
    6. Links
    7. Downloads
    8. Enjoy

Current Versions

xfree patch - 1.4
v4l patch - 1.4c
libddmpeg - 1.6

Background

Here are the three bits you will need to get hardware MPEG decoding working on an EPIA-M motherboard (ok you'll also need a fourth bit, something to use the drivers! such as VeXP or mythtv).

If you are a Gentoo user however, most of the update process has been done for you. Just check out the viaarena forums and the EPIA Gentoo Howto pages, mirror at http://epia.kalf.org/howto/.

Enjoy.
Ivor.


CLE266 V4L Module

This is a patch file for the via v4l source code for the cle266 which adds mpeg decoder support back into the source code that is provided in the binary only drivers but omitted from the source release.

This patch applies over the top of the -epia kernel patch (which already includes mpeg patch 1.1) or over the top of a previously patched -epia-mpeg1.2 kernel.

 cd /usr/src
gunzip -dc patch-epia1-mpeg1.4c.gz | patch -p1 -d linux-2.4.23-epia1

*Note* this is an early release and may be a bit buggy!

patch-epia1-mpeg-1.4c.gz - Applies over -epia1 kernel

patch-epia1-mpeg-1.2-1.4c.gz - Applies over -epia1 with the mpeg1.2 patch

My .config file.

* Note, 2.4.24-epia1 now contains patch 1.4c.

Links-: The -epia kernel patch


XFree86 patch

Until we tweak the v4l source and come up with a way for the code not to need the XSERVERON ioctl you will need to apply this patch to your copy of xfree86.

This call is required to initialise the v4l driver and allocate the memory needed for some structures. There's no reason why this needs to be called from within the Xserver though. This could equally well be incorporated into the ddmpeg library. At the moment however the libraries behave in the same manner as the via binary releases (circa CLEX32) so each module can be replaced by the appropriate VIA module if necessary. Makes testing a smidgeon easier! Note this release probably breaks the binary compatibility, but it might work with the CLEX38 package.

You will need a copy of xfree86 release 902 (http://www.xfree86.org/develsnaps/) patched with the epia4 patch set that can be found at: http://www.shipmail.org/~thomas/via/

* Note, Thomas' -epia6 patch now includes version 1.4 of the patch.

This patch is relative to the via driver directory in the xfree source. i.e. :-

 cd /usr/src
gunzip -dc patch-xfree86-902-epia-mpeg-1.4.gz | patch -p1 -d xc

 

libddmpeg library

The VIA EPIA-M motherboards contain an embedded MPEG decoder chipset the CLE266. This makes these boards ideal for compact multimedia devices. Unfortunately although VIA has made some effort to supporting these systems on linux, there is still a long way to go before they can be used for applications like mythtv or freevo.

This page is for the reverse engineering of the VIA CLE266 mpeg library for linux. Currently only a binary .so library has been made available for this platform which makes debugging applications that make use of it much harder.

** Status ** Release 1.6 available.

7th February 2004 - Release 1.6

Minor fix for EPIA-MII boards.

5th January 2004 - Release 1.5

More CLEX38 changes incorporated.

18th December 2003 - Release 1.4

Minor timing changes taken from CLEX38. Video seems a bit smoother now.

30th November 2003 - Release 1.3

Updated structures to match latest mpeg source

6th September 2003 - Release 1.2

Added in minor changes from the CLEXF40030 driver.
Spotted and fixed a couple of bugs.
Finally sussed PrivPutImage
Restructured VIASUBPicture

25th August 2003 - Release 1.0

It works! Hurrah.

25th August 2003 - Release 0.1d

Minor bug fixes, all functions appear to be valid.

24th August 2003 - Release 0.1a 0.1b 0.1c

Package tidied, couple of typo's fixed.
Started verifying binary generted code against original.
All major functions appear to be valid now.

23rd August 2003 - Release 0.1

Code now compiles. Now needs validating and debugging.

22nd August 2003 - Release 0.0a 0.0b.

More sanitising done. Flow of the messy VIADisplayControl, VIASUBPicture and VIA_MPEGBeginPicture now sorted out.

21st August 2003 - Release 0.0.

Note this source will not yet compile but I thought the excitement might be getting too much for some to manage, so a sneak preview was in order. A day or two spent tidying up and the code should be pretty close to working.

15th August 2003.

The library is now completely reverse engineered. Source will be posted here soon.

Ivor.

How was it done - Reverse Engineering Info

Links

Discussion:- http://forums.viaarena.com/messageview.cfm?catid=28&threadid=43148

Downloads

  1. libddmpeg-1.6.tar.gz
  2. patch-xfree86-902-epia-mpeg-1.4.gz
  3. patch-epia1-mpeg-1.4c.gz - Applies over -epia1 kernel
  4. patch-epia1-mpeg-1.2-1.4c.gz - Applies over -epia1 with the mpeg1.2 patch

Enjoy

Ivor Hewitt. Surrey, England 2004.

 


[www.ivor.it | www.ivor.org | www.difo.com ]