XBMC and Intel VAAPI: MPEG4 Color distortions
#1
Hi folks!
I have serious picture distortions with XBMC using VAAPI (on Intel) and MPEG4 material, i.e. xvid, divx, etc. H.264 encoded files are working fine. I attached two pictures that illustrate this issue.

My system:
  • Intel i3 Graphics (first generation, Ironlake)
  • Ubuntu 11.10 x64 with unity (Kernel 3.0.0-14)
  • XBMC 11.0-PRE Git:20120105-a95ff30 (Compiled : Jan 5 2012)
  • Xorg-edgers ppa for xorg and intel driver stuff
  • FFMPEG(git of 01/05/12) for external FFMPEG compilation

What I tried by now:
  • Tested other playback software (xine with vaapi, mplayer with vaapi): Works fine!
  • Disabled VAAPI support in XBMC: Works fine, but obviously no hw acceleration
  • Compiled xbmc with external ffmpeg: Same problem.
  • Tried other XBMC branches: Same problem.

The described problem exists after the dist-upgrade to 11.10 and I am trying to identify the problem for 3 month now, without success. Weird: XBMC does not use hw acceleration for MPEG4 files.
I followed the following great tutorials to set up XBMC with VAAPI:
http://forum.xbmc.org/showthread.php?tid=96669
http://forum.xbmc.org/showthread.php?tid=114368

Does anyone have clue what is going wrong here?

Cheers!
Chris


Sample Images:
ImageImage


Debug Output when playing the file:
http://pastebin.com/cM4ftACT
Reply
#2
First of all please note that you are NOT using vaapi to deceode this file. It is not supporting mpeg4 avi files at the moment.

Code:
23:28:25 T:140714415056640   DEBUG: VAAPI - unable to find a suitable profile
23:28:25 T:140714415056640   DEBUG: VAAPI - destroying display 0x3d48740
23:28:25 T:140714415056640   DEBUG: FactoryCodec - Video: ff-mpeg4 - Opened

It is using software ff-mpeg4 for decoding.

Your problem is in updated mesa. I guess you are using mesa 7.12-devel. Just check with

Code:
glxinfo |grep version

It is a known problem already reported to mesa glsl developers. The bugreport is here. I already found the problematic commit in the code. Hopefully they will revert it.

Until that, please use mesa 7.11. Use ppapurge for xorg edgers:

Code:
sudo apt-get install ppa-purge
sudo ppa-purge xorg-edgers
sudo reboot

Edit:

Please do not combine my guides as it could cause problems like this. My old guide is outdated as I noted it in the first post. Only use my NEW guide on a CLEAN system. I will always update there the latest stuff to use. Xorg edgers is not the stuff you want to use at the moment.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Thumbs Up 
Hi Alan!

First of all thank you very much for your answer and narrowing down the problem to the problematic commits in mesa 7.12.

Quote: First of all please note that you are NOT using vaapi to deceode this file. It is not supporting mpeg4 avi files at the moment.

Code:

23:28:25 T:140714415056640 DEBUG: VAAPI - unable to find a suitable profile
23:28:25 T:140714415056640 DEBUG: VAAPI - destroying display 0x3d48740
23:28:25 T:140714415056640 DEBUG: FactoryCodec - Video: ff-mpeg4 - Opened

It is using software ff-mpeg4 for decoding.

I noticed that but I made a error in reasoning and mixed up MPEG4 and MPEG2 decoding. Of cource MPEG4 is not supported. Thanks for pointing :-)

Quote:Please do not combine my guides as it could cause problems like this. My old guide is outdated as I noted it in the first post. Only use my NEW guide on a CLEAN system. I will always update there the latest stuff to use. Xorg edgers is not the stuff you want to use at the moment.

Actually I am not combining. Your great tutorials just give me an overview and a thread to hold on to. I needed the edgers ppa for my xine-lib-vaapi experiments (using vdr+xine) which is working pretty fine so far.

Thanks again for pointing at mesa 7.12-devel
Reply
#4
Flachzange Wrote:Actually I am not combining. Your great tutorials just give me an overview and a thread to hold on to. I needed the edgers ppa for my xine-lib-vaapi experiments (using vdr+xine) which is working pretty fine so far.

Thanks again for pointing at mesa 7.12-devel

Ah, ok I understand.

If you really need mesa 7.12, please update your system with the xorg edgers, than, you can compile the latest mesa from git, patched with my patch.
Code:
glxinfo |grep version  # to check the xorg edgers version

sudo apt-get build-dep mesa-common-dev
sudo apt-get install flex build-essential
git clone git://git.freedesktop.org/git/mesa/mesa
cd mesa
./configure --prefix=/usr --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --libdir=\${prefix}/lib/x86_64-linux-gnu --localstatedir=/var --build=x86_64-linux-gnu --with-dri-drivers=i915,i965 --with-gallium-drivers=
wget http://pastebin.com/raw.php?i=cLpMCXwg -O ./color_corrupt.patch
patch -p1 < ./color_corrupt.patch
make
sudo make install

glxinfo |grep version  # to check if the version changed to latest git

Hope it works. Let me know, cheers Alan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
Hehe, that's what I tried and I thought I could already present some success news.

Unfortunately it didn't worked. But looking now at your configure options I noticed my mistake. I installed mesa into the wrong libdir.

And now it works! Thanks again!
Reply
#6
Flachzange Wrote:But looking now at your configure options I noticed my mistake. I installed mesa into the wrong libdir.

And now it works! Thanks again!

:-)

Yepp, that was a tricky thing for me to work it out. It has to be in /usr/lib/x86_64-linux-gnu dir on the 64 bit Ubuntu, unless the system does not find it.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
This fix works here too, ASUS G35 HDMI. Cheers,
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC and Intel VAAPI: MPEG4 Color distortions0