Wednesday, October 27, 2010

Hardware Accelerated HD Video playback with ATI graphic card

Hardware accelerated HD Video playback has been around for a long time in Windows OS. Previously, PC & laptop with slow processors were too slow to playback 1080P Full HD videos just by the slow processors in them. With graphic card accelerated HD decoding, all the PC & laptops with slow processors are suddenly empowered to playback 1080P Full HD Video. This is especially helpful in laptops with slow processors to extend battery life, while the onboard ATI/nVidia graphic chip are powerful enough to decode Full HD video with ease.

nVidia has to be commented for it's collaboration with the linux community & enabled hardware accelerated HD video playback with their integrated graphic chip or discrete graphic card. This is done through VDPAU & can be enabled by installing vdpau plugin for mplayer.

ATI however, has only recently enabled hardware accelerated playback via VAAPI support. And implementation in Ubuntu 10.10 Maverick still requires some tinkering with libraries and etc.

Here is how to enable VAAPI in XBMC media player for ATI graphic card/chips in Ubuntu 10.10.

ATI proprietary driver flgrx must be installed & activated via 'Additional Hardware drivers' under System tab in Ubuntu 10.10

Obtain latest libva files from


sudo dpkg -i *.deb

Add xbmc development ppa from

sudo add-apt-repository ppa:team-xbmc-svn/ppa lucid

(lucid is used here because the corresponding maverick xbmc ppa is not ready)

sudo apt-get update
sudo apt-get build-essential
sudo apt-get build-dep xbmc

sudo apt-get install -f
svn co xbmc
cd xbmc
sudo make install

sudo mv /usr/bin/xbmc /usr/bin/xbmc.bak
sudo mv /usr/bin/xbmc-standalone /usr/bin/xbmc-standalone.bak
sudo ln -s /usr/local/bin/xbmc /usr/bin/xbmc
sudo ln -s /usr/local/bin/xbmc-standalone /usr/bin/xbmc-standalone
sudo reboot

Now when you reboot xbmc should have VAAPI option under video playback.

On my AMD test rig running a PhenomII X2 555 unlocked to quad core 3.2GHz with integrated ATI 4250 graphic chip onboard, a snippet of 1080P Avatar was playback at 40~60% cpu utilisation without hardware acceleration in VLC & MPlayer. Cpu utilisation drops all the way below 20% when the same video clip was playback with Vaapi enabled XMBC.

( implementation of vaapi in mplayer & vlc to be further explored ... )

Tuesday, October 12, 2010

Buy two & get two free!

Buy two & get two free! Sounds too good to be true? Read on.

Wafer manufacturing process in microprocessor production is never perfect. While manufacturers prints a 4 cores cpu chip on to the silicon, some of the cpu cores can sometimes ended up malfunction or dead at the end of the manufacturing process. Instead of throwing away the chip with the remaining 2~3 cpu cores functioning perfectly well, manufacturer can disabled the malfunctioned cores & 'marked' the chip as a dual-cores or tri-cores cpu & sell them as it is. With such practice, it makes sense for cpu manufacturers to print more of the chips in 4 cores & test to 'bin-out' the chip into dual-cores, tri-cores or quad-cores chip, depending how well the silicon is yielding.

There were possibility also, in a situation when the yield is exceedingly good, a lot of the chips had all 4 cores fully functioning but the demand/order for dual-cores chip outstripped that of the quad-cores chip, manufacturers 'marked' some of the chips with 4-cores fully functioning as a 2 cores chips & sell as it is.

One of the chip I bought last week, an AMD dual-core PhenomII X2 555, may well fall into such category. It is a 4-cores chip that may well have 2 of the cores not meeting the stringent functional testing specification of AMD, and had two of the cores 'disabled' & being sold as a dual-core chip. Special motherboards like the BioStar A880G+ I bought, came with an 'ACC' option to unlock the disabled cpu cores. And viola! I have a chip with all 4 cpu cores fully unlocked at a flip of a switch on the motherboard bios. More extensive stress testing is definitely needed to know the 4 cpu cores are really fully functioning well. A simple test run of a HD video playback without gpu acceleration however, showed the 4 cores taking turn, 'speed-stepping' between 800Mhz to 3.2Ghz decoding & playing back the HD video. There were also no noticeable increase in temperature of the chip, hovering around 41 degree Celsius, same as when it was running with just 2 cores activated.

The chip I have is labelled 'Black edition' reflecting probably a die from a good yielding wafer that can either scale high gigaherz in speed or meeting the stringent testing specifications well. Of course, there is no guarantee that any chip, whether 'Black edition' or not, can successfully have the hidden cpu cores unlocked. Also, I cannot vouch for the reliability & functional aspects of such unlocked cpu cores. While there were many cases of successful stories of folks unlocking the cores & running it well without problems, it is equally not uncommon to hear folks have unlocked the hidden cores & found the system became unstable or not functional at all, most just flip the switch back & run it as dual-cores chip as it was originally intended.

The chip manufacturers definitely marked the chip as dual-core for a good reason. We may never know why. And if you don't try, you'll never know why.

So, here we have, a too good to be true, 'Buy two get two free' case, depending on how lucky you are.

Here, you see the chip I have, with 4 cpu cores in action, running on Ubuntu linux.

Here is a shot of the Black edition, AMD Phenom II X2 555 cpu chip, that had the 4 cores unlocked successfully.

Here is a shot of the BioStar A880G+ motherboard that made the unlocking trick possible.

Disclaimer: The writer shall not be liable to any damage to your computers by following the guide above. Try at your own risk.