Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Art & Graphic Design > MPEG-2 Hardware Acceleration Reverse-Engineered!

MPEG-2 Hardware Acceleration Reverse-Engineered!
Thread Tools
f1000
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 24, 2005, 01:09 AM
 
The best I've got it to play so far is some big 720p, that the network calls HD. 1080i is still locking up.

Rough timings from my initial tests with 720p on one 1.25GHz G4 CPU are:

MPlayer OS X 2 b6: 75% CPU
iTele v0.5.8b1: 47% CPU
Accellent v0.1: 25% CPU
http://www.defyne.org/dvb/accellent.html

http://www.defyne.org/forums/viewtopic.php?t=438
http://www.defyne.org/forums/viewtopic.php?t=440
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 24, 2005, 06:37 AM
 
Has anyone had any success compiling the source code? I get errors during compile with Xcode and end up with a broken app.
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 26, 2005, 03:54 AM
 
Success! Here's what you need to do:

1. Create a new account named "johnd". Log into this new account.

2. Download the FFMpeg source code from http://mplayerhq.hu/MPlayer/cvs/. I used the 4/11/05 snapshot.

3. Place both the Accellent and FFMpeg folders into the johnd folder (i.e., /Users/johnd/Accellent and /Users/johnd/ffmpeg). Make sure to rename the FFMpeg folder as "ffmpeg" (case-sensitive).

4. Following the instructions in Accellent, copy the two files in libavcodec to the corresponding folder in ffmpeg.

5. From Terminal, do a ./configure with no options and then execute make. You should get a libavcodec.a file.

6. Open up the Accellent.xcode project and build the app. The compiled app will be in the directory Accellent/build.
     
demograph68
Professional Poster
Join Date: Jul 2003
Status: Offline
Reply With Quote
Apr 26, 2005, 02:32 PM
 
I'm not sure I understand this. Let me get this straight, this Accellent thing is for better mpeg2 playback by using the gpu, right?
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 27, 2005, 05:10 AM
 
Exactly. Apple�s DVD Player is currently the only app that can make use of the GPU to decode MPEG-2 content. Other apps, such as VLC, must use the CPU to accomplish this.

While a G4 is fast enough to decode standard-definition content, it is not fast enough to decode HD content (720p or higher). On my 1 GHz G4 PowerBook 12�, for example, QuickTime Pro plays back 1080i content (1920x1080, 2.4MB/s) sans de-interlacing at about 10 fps if the video is scaled down to the 12" LCD and 6 fps if the video is left unscaled

Turning on de-interlacing (not an option in QT Pro) would reduce these frame rates even further. For practical purposes, I scale 1080i content to the size of my 12� screen; nevertheless, the lack of de-interlacing is still noticeable at these resolutions.

Accellent offers the possibility of greatly accelerated MPEG-2 playback. The source code is still very much in alpha stage and seems both incomplete and buggy; hence, the author's hesitation in providing a binary for the general public. I have been able to play back 1080i content without crashing my computer, but the results aren�t pretty. What little I do see, however, is fluid and smooth.

I�m worried that the DVDVideo library might have an inherent inability to play back content with a frame size larger than that of a VOB file (720x480). The author claims that Accellent can play back 720p files, but I haven�t found that to be the case. 720p is 1280x720, not 720x480.
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 28, 2005, 07:41 AM
 
The most recent FFMpeg snapshot that compiles using the patch files is 4/18/05.

Accellent cannot play any high definition MPEG-2 files (those with a video size greater than 720 pixels wide) without severely corrupting the output. Even the playback of many NTSC DVD VOB files results in intermittent to severe corruption.

Still, Accellent has potential. Below is an objective comparison of CPU usage.


Test File: 1080i program stream (1920x1080)
  • Frame Rate: 29.97 fps
  • Data Rate: 2.1 MB/s

QuickTime Player Pro with MPEG-2 component (audio off, unscaled output)
  • CPU Usage: 61-96% (average 80%)
  • Frame Rate: 7.5-8.5 fps (average 8 fps)

Accellent
  • CPU Usage: 24-28% (average 25%)
  • Frame Rate: 30 fps?
     
Uncle Skeleton
Addicted to MacNN
Join Date: Nov 2002
Location: Rockville, MD
Status: Offline
Reply With Quote
Apr 28, 2005, 11:12 AM
 
Originally Posted by f1000
Accellent
  • CPU Usage: 24-28% (average 25%)
  • Frame Rate: 30 fps?
But the output is corrupt on this one?
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Apr 28, 2005, 12:39 PM
 
Originally Posted by Uncle Skeleton
But the output is corrupt on this one?
Unfortunately, yes.

Certain HD files will also cause Accellent to crash in such a manner that even force quitting won't kill the process. What's odd is that the crashes will occur at random points during playback for the same file.

Note that CPU usage doesn't vary much between VOB and 1080i files. I see this as a sign that the video card is indeed doing the decoding.
     
blueandwhiteg3
Fresh-Faced Recruit
Join Date: Jun 2005
Status: Offline
Reply With Quote
Jun 5, 2005, 10:16 PM
 
Bad news: this is broken under 10.4.

I've pulled all the files together and set everything up nicely. It dies, invalid kernel access and such.

I've emailed the author. We'll see if anything comes of it.

I've posted a crashlog here:
http://zinkconsulting.com/Accellent.crash.log

There is further discussion about this here:
http://www.defyne.org/forums/viewtopic.php?p=3852#3852
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 7, 2006, 07:28 AM
 
blueandwhiteg3, I've been following your posts in the DVB developer forum and recently noticed that you have been trying to do the same thing that I had previously tried to do: convert a .ts file into VOB format to spoof DVD Player. In my case, I had ended up with a clipped playback window just like you did. If I had known how useful the result would have been to FYKnight, I would've posted them a few months ago.

For others who haven't been following along, FYKnight has posted Accellent v0.2.

http://www.defyne.org/dvb/accellent.html
http://www.defyne.org/forums/viewtopic.php?t=807
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 8, 2006, 05:57 AM
 
Accellent v0.3 is now available:

Originally Posted by FyKnight
Hello testers,

Accellent v0.3 is out, and this time includes a binary so non-developers can run it too. New since v0.1 is support for playback of arbitrary video sizes (I've done 1920x1088) in a video window of the correct size. Also the dependence on DVDPlayback.framework is now gone so it works under Tiger again without tricks. (Furthermore v0.3 doesn't require dummy DVDs like v0.2 did.)

Read the README for all the details, but the basic idea is that you drag an MPEG-2 Program Stream onto Accellent and it plays back the video from it using the GPU. I'd like to get some feedback on how well/if this works on your configuration. Please mention your Mac model, CPU speed and GPU speed when you post. (As well as CPU usage, etc. if you like.)

Note that some MPEG files (esp. if badly corrupted or too large for your GPU) can still cause your whole Mac to lock up. It would be good to know about your experiences with these too! So, good luck, and please let me know how it runs
http://www.defyne.org/forums/viewtopic.php?t=820
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 8, 2006, 06:09 AM
 
Neither Accellent v0.2 nor v0.3 works for me. Accellent v0.3 crashes upon startup if I drag-and-drop any of the sample video files onto it (.mpg or VOB).


Hardware Specifications:
1 GHz 12" PowerBook G4 (rev B)
GeForce FX Go5200 32MB

Crash Report:
Date/Time: 2006-01-08 05:02:06 -0500
OS Version: 10.3.9 (Build 7W98)
Report Version: 2

Command: Accellent
Path: /Users/ANON/Desktop/untitled folder/Accellent v0.3/Accellent.app/Contents/MacOS/Accellent
Version: 0.3 (0.3)
PID: 483
Thread: Unknown

Link (dyld) error:

dyld: /Users/ANON/Desktop/untitled folder/Accellent v0.3/Accellent.app/Contents/MacOS/Accellent Undefined symbols:
/Users/ANON/Desktop/untitled folder/Accellent v0.3/Accellent.app/Contents/MacOS/Accellent undefined reference to _CGSMainConnectionID expected to be defined in Cocoa
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 8, 2006, 05:21 PM
 
Accellent v0.3 crashes on an iMac running Panther as well.


Hardware Specifications:
1 GHz 17" iMac G4 (3.3)
GeForce4 MX 64MB

Crash Report:
OS Version: 10.3.9 (Build 7W98)

<Basically identical to the one above>
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 9, 2006, 07:43 AM
 
When building Accellent v0.3 in Panther, XCode 1.1 returns the following error: Undefined symbols: _CGSMainConnectionID

FyKnight says that he is rewriting Accellent to avoid this Tiger specific symbol. In any event, Accellent seems to be showing impressive playback performance on Tiger.

(Many thanks to blueandwhiteg3 for his help with CVS!)
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 10, 2006, 07:01 AM
 
Accellent v0.3.1 is now available and running under Panther. XCode 1.1 will also build the application properly in Panther again.


Hardware Specifications:
1 GHz 12" PowerBook G4 (rev B)
GeForce FX Go5200 32MB
OS Version: 10.3.9 (Build 7W98)

Peak %CPU Usage While Playing NTSC DVD VOB Files:
Accellent (0.3.1): 40% <- Wow!
VLC (0.8.4): 75%

Accellent plays back DVD files too quickly, though, and it plays back any file with a resolution wider than 720 pixels with extreme corruption (on my PowerBook). I'd imagine that Accellent's %CPU usage would go down a bit if it played the DVD files back more slowly.
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 10, 2006, 07:20 AM
 
If I use ffmpegx to scale an HD file down to 720x1080, the final file opens as 720x540 in QuickTime but as some much larger one (2x zoom?) in both VLC and Accellent. I suspect that this anomaly has to do with libavcodec.a.

According to the following whitepaper from Nvidia, GeForce cards with VPE 2.0 or better should be able to decode HDTV and then some.
     
f1000  (op)
Professional Poster
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 10, 2006, 07:25 AM
 


Example of playback corruption in a file wider than 720 pixels (736 pixels).
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:13 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,