[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: G3's, G4's, Altivec, DVD's, iBooks, and TiBooks

On  23 Oct, this message from Andrew Sharp echoed through cyberspace:
>> Just sucks to have payed $400 extra for the DVD drive when it is useless
>> with the OS of my choice. No, I will not run MacOS, but I will see if I
>> can hurt Apple in some way.
> Alas, I understand what you are saying.  Didn't someone say they
> were able to do it with vlc on their ibook2?  I have a real hard
> time believing that a 500MHz G3 (or even a 400MHz G3) can't play a
> DVD.  Maybe it's a XFree86/DMA thing.

Well I'll restate again the potential problems and pitfalls with DVD
playback, and a few perfomance metrics from my own (limited) experience.

First, Apple's player _always_ uses some hardware assistance, in the
older machines it was a complete hardware decoder, in the newer machines
it is the iDCT, motion compensation and colorspace conversion done by
the ATI chip. As someone pointed out, the NVidia chips recently used
have _less_ hardware support (not sure which part is missing re. the
ATI), therefore playback may be less smooth on these.

Under Linux, only the colorspace conversion is supported and is
implemented in the XFree Xv driver. With this limited hardware
acceleration, DVD playback is reported to be smooth on a G4/400 with
Altivec-optimized code (old TiBook/400; about 70%-80% CPU usage) and on
the new 600 MHz Ibook2 (G3 procesor). On the G4/400 without Altivec
code, DVD playback drops around 35% of the frames. These reports seem to
confirm each other.

In order to aleviate tho problem on slower hardware and further reduce
the CPU usage on the newer machines, a few things can be tried:

- optimize the code. Probably more Altivec optimization can be done
  where available; also the G3 code might have optimization
  opportunities (the multiply-add operations come to mind).
- use DMA to make th ATI chip copy the YUV data into the framebuffer,
  instead of the main CPU doing that. Implemented with DRI in recent
  XFree CVS, IIRC.
- support AGP on the newer machines, if possible with the write combinig
  support BenH mentioned. For comparison, using MTRR on x86 gains 20% of
  CPU usage otherwise eaten by XFree for copying the data to the
  framebuffer. No idea hat the real gain could be on ppc.
- make the iDCT and motion compensation of the ATI chip available under
  Linux. Single most usefull improvement.

Also for comparison, a Celeron 600 with an ATI Mach64 (Mobility M1,
really), using the Gatos Xv-enabled drivers, with MTRR set, plays smooth
DVD at 30%-40% CPU usage. Keep in mind that CPU provides MMX
acceleration which is heavily used for DVD playback.

All above DVD playback numbers obtained with vlc.



Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "

Reply to: