30.07.2010

FYI: mkv2vob on Linux (Converting Videos for Playstation 3)

Just ran into that when searching for a tool to easily convert mkv files that were not correctly streamed (or especially copied, as for some reason there was a difference between just playing and copying it) by the PS3 Media Server. Fortunately, as it turns out, the popular tool mkv2vob works just flawlessly under wine. This automatically takes the right choice when it comes to the decision between just remuxing the media or doing a reencode. This saves the following:

  • Lots of time, because it also supports batch converting.
  • Lots of nerves. Trust me.

So go, get it, it won’t get easier :)

16.06.2010

Brenner-Tuning

5600x.png

Ohne Worte.

01.04.2010

Morphological Antialiasing in God of War III

Naty Hoffman reports in a blog post on Realtimerendering.com that God of War III is using Morphological Antialiasing. What I found interesting about this post, is that it is said that there were reportedly bad artifacts in moving images (though there are not in GOW3). As I used the method originally described by Reshetov without changes myself in a project (for a real time ray tracer) and didn’t see any artifacts there, I would be interested if it’s just a similar method which produced the artifacts or maybe even a stochastic component – who knows, people have ideas, and for still images there would be no problems :) So if you know anything about that, I’d be thankful if you left a comment.

01.03.2010

Debian Squeeze and Subpixel-Rendering in libcairo (aka ugly Firefox/Iceweasel fonts)

What I have learned during the last two days is that people tend to have vastly different preferences regarding font rendering. Some want their fonts crisp and clear, maybe even without Anti-Aliasing, while others want them really smooth, almost a bit blurry. The actual problem was, that in Debian (Squeeze) subpixel rendering is really nice everywhere else than in applications relying on libcairo for achieving that. This leads to Firefox having almost unreadably sharp fonts when hinting is set to full, while they tend to look just ugly when hinting is at a lower level.

Comparing rendering of fonts in Firefox (or other GTK-apps) to e.g. qt-apps like Konqueror made me want to fix that problem. At first it seemed like nobody else had noticed that behaviour and I thought it would just be nit-picking again, as I always want things to be “perfect” in one or the other sense. But finally, today I found this thread talking about the exact issue that was bugging me. So I read through it carefully and finally found a solution to my problem. There are two possibilities, both involving libcairo and libdirectfb:

  1. Ubuntu packages can be used. Ubuntu has a patch applied to libcairo (and seemingly libdirectfb) which makes font rendering look much nicer. You can actually install these packages without problems. Just get them from the Karmic repository.
  2. Use patched packages provided by Hadret in the linked thread. You can find them here. Actually, these are the AMD64 packages. Read through the thread to get the i386 ones or build them yourself. A link to the patch guide should also be given in that thread.

Having these packages installed, you just have to enable subpixel rendering and set hinting to an appropriate value. Personally, I like slight hinting the most as it gives the whole thing a really smooth look. Settings can be made system-wide in /etc/fonts or per-user in ~/.fonts.conf. Here are the contents of my ~/.fonts.conf:

1 <?xml version='1.0'?>
2 <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
3 <fontconfig>
4 <match target="font" >
5 <edit mode="assign" name="rgba" >
6 <const>rgb</const>
7 </edit>
8 </match>
9 <match target="font" >
10 <edit mode="assign" name="hinting" >
11 <bool>true</bool>
12 </edit>
13 </match>
14 <match target="font" >
15 <edit mode="assign" name="hintstyle" >
16 <const>hintslight</const>
17 </edit>
18 </match>
19 <match target="font" >
20 <edit mode="assign" name="antialias" >
21 <bool>true</bool>
22 </edit>
23 </match>
24 </fontconfig>

Finally, Firefox (and XChat, and Icedove, and…) font rendering looks fine again :-)

Note that it may be necessary to upgrade some packages to versions from Debian sid (e.g. xulrunner-1.9.1) to make this work.

04.02.2010

CUDA 2.3, FindCUDA.cmake and wrong gcc/g++ versions (4.4 and later)

If you get an error like

/usr/include/c++/4.4/ext/atomicity.h(46): error: identifier “__sync_fetch_and_add” is undefined

when trying to compile your CUDA project which is using FindCUDA.cmake, there is quite an easy solution for this. NVCC does not really like the latest versions of gcc or g++, so you have to try it with version 4.3 of both of them.

So the first step is installing gcc-4.3 and g++-4.3, which should be in the repositories of most Linux distributions, though this may have been simply upgraded to 4.4. On Ubuntu Karmic as well as Debian Squeeze it has been possible to additionaly install the older version in parallel via aptitude.

After having these installed, I first tried to modify my CMakeLists.cmake file by adding this:

set(CMAKE_C_COMPILER “gcc-4.3″)
set(CMAKE_CXX_COMPILER “g++-4.3″)

Hoping that this does the job, I was quite disappointed, as it didn’t. You have to explicitly set the flags which are passed to NVCC, which actually seems to always use the files “gcc” and “g++”. Fortunately, you can pass it a flag which tells where to search for those files. So you can create symlinks “gcc” and “g++” to the 4.3-versions of the tools in a directory of your choice (e.g. /usr/local/bin/gnuc4.3) and add the following line to your CMakeLists.cmake file:

set(CUDA_NVCC_FLAGS –compiler-bindir /usr/local/bin/gnuc4.3)

This should probably be set after find_package(CUDA) has been called. Works like a charm for me, finally :)

03.02.2010

Abmahnung leichtgemacht

“Interessant”, dachte ich mir gerade, als ich auf diesen Artikel bei Golem stieß.

Eigentlich habe ich dazu nur eine kurze Frage: Wie wir ja alle wissen, ist es im schönen Deutschland möglich, eine Abmahnung ohne vorhergehende Korrespondenz mit wundervollen Zahlungsaufforderungen zu versehen. Wird das jetzt nicht vielleicht doch Überhand nehmen, wenn mans so einfach macht? Für mich liest sich das wie ein Freibrief für Abmahnwellen im großen Stil. Noch größer.

Oder liege ich mal wieder völlig daneben? :-S

02.02.2010

CUDA bandwidth test (PCIe 1.0, x8 vs. x16)

Just got my new GeForce 9800GT (Club3D 9800GT Eco). Though my mainboard (Asus P5W DH Deluxe) does not have enough physical PCIe lanes to run two cards at x16 (and no PCIe 2.0, which would allow the same bandwidth for x8 as earlier revisions did for x16), I decided to put it into the second slot and let it run together with my 7900GT at x8. Because I was really interested in the real – not only theoretical – bandwidth difference, I just tried the bandwidth test from the CUDA SDK. I have not even looked at the code, so I don’t know how meaningful this really is, but maybe it’s interesting nevertheless:

9800GT as primary and only card (x16) vs. 7900GT as primary (display-responsible), 9800GT as secondary card (both at x8):

  • Host to device bandwidth: 1920,3 MiB/s vs. 1315,5 MiB/s (x8 yields 68.5% of x16 performance)
  • Device to host bandwidth: 1460,4 MiB/s vs. 1338,5 MiB/s (x8 yields 91,7% of x16 performance)
  • Device to device bandwidth: 37211 MiB/s vs. 37868 MiB/s (x8 yields 101,8% of x16 performance, though this should be within measuring tolerance)

Note that theoretical x16 bandwidth should be about 4000 MiB/s :O

So I had to decide what was more important to me: Crashing my machine all the time because of my bad CUDA development skills while running at full speed or using the 9800GT as the secondary card and accept the bandwidth drop. Thinking about it, most of the time bandwidth will probably not be the most important thing in applications I am going to develop, but they should be much more compute-intensive. Option #2 is the choice for me!

Also, let me say that in almost all example applications no difference was noticeable between the both setups, because most of them are probably also not that bandwidth demanding. Running the 9800GT as a CUDA-only card has one more advantage: CUDA-applications will stop crashing the compositing system in KDE4 :)

Update: I noticed there are different modes for the bandwidth test. I will probably test these later this week, just because I’m interested :D ..could well be that the x16 bandwidth can be utilized better.

02.02.2010

Gestern ist heute ist morgen…

…ist übermorgen? Letzteres kam wegen der Asymmetrie nicht in den Titel. Ein bisschen autistisch, mag man sich nun denken – und vielleicht liegt man damit nicht ganz so falsch.

Ich bin, wie einige regelmäßige Leser wissen, sofern es sie überhaupt noch gibt, ein fleißiger Abonnent des PS3 Blogs, und so stieß ich natürlich auch auf den neuesten obligatorischen Artikel zum Thema “Gran Turismo 5 und seine Veröffentlichung”. Als informierter Mensch weiß man nun, dass das sicherlich nicht das erste Mal ist, dass eine Veröffentlichung für einen bestimmten Zeitraum versprochen bzw. die Hoffnung darauf geschürt wird. Die letzten relevanten News vorher waren wohl diese hier. Und wie der vorherige Artikel zeigt, ist das nun auch schon nicht mehr aktuell.

Worauf möchte ich hinaus? Weiß ich selbst nicht so genau. Ich finde es schade, dass so ein Spiel, auf das doch sehr viele Leute ungeduldig warten, sich so stark verschiebt. Aber andererseits denke ich auch, dass man es besser so lange nach hinten schieben sollte, bis man wirklich selbst der Ansicht ist, dass es mehr oder minder “perfekt” ist (kleinere Schönheitsfehler sind ja erlaubt). Ich hoffe also eigentlich nur, dass man bei Polyphony so schlau ist, die Zeit auch wirklich zu nutzen. Billig sollte die Produktion des Spiels ja auch nicht gerade sein, auch wenn ich die Angaben, die man zum Aufwand der Modellerstellung gemacht hat, zunächst für utopisch halte. Bei genauerem Nachdenken fällt einem natürlich auf, dass viele der Modelle sich nur geringfügig unterscheiden, und so wird das ganze wahrscheinlich schon eine ganze Ecke realistischer. Wie nah es an der Wahrheit liegt, sei dahingestellt.

Nun ist es ja so, dass uns die GT5-Jungs (und Mädels?) schon bewiesen haben, dass sie grundsätzlich in der Lage sind, was nettes auf der PS3 zu zaubern. Viele Entwickler beschweren sich ja häufig über die schwierige Programmierung, die ich aus eigener Erfahrung zumindest als gewöhnungsbedürftig bestätigen kann. Erst diese merkwürdige Heterogenität mit PPE und SPEs, dann auch noch Vektorisierung auf beiden Seiten (die PPE kann ja auch AltiVec). So richtig entspannend ist das nicht, aber wenn man alles richtig macht, dann kann was sehr performantes dabei rauskommen. Allerdings muss man dafür manchmal auch das richtige Problem haben. ;-) Ich weiß aber nicht, was das Sony SDK so kann, vielleicht macht es das ein oder andere noch komfortabler.

Ich gehe in Anbetracht der Tatsache, dass GT5 Prologue soweit eigentlich recht gelungen war und doch sehr früh erschien (war es vielleicht sogar ein Launchtitel? Ich weiß es gerade nicht), möchte man also keine Inkompetenz unterstellen. Einzig eine Marketing-Inkompetenz vielleicht. Man hält sich zwar im Gespräch, indem man immer wieder neues verspricht und anschließend nicht einhält, aber nicht in positiver Weise. Und wenn nur 10% der Leute verärgert genug sind, das Spiel jetzt doch nicht zu kaufen, hat man doch schon Mist gebaut, oder nicht?

Jedenfalls bleibt zu hoffen, dass man es vielleicht noch dieses Jahr schafft, das Ding auf den Markt zu werfen. Mit Nachtrennen. Mit dynamischen Wetter. Mit Schadensmodell. Mit vielen Autos. Mit vielen Strecken. Mit der Nordschleife!

Konkurrenz auf der PS3 gibt es ja eigentlich nicht wirklich, oder zumindest möchte ich das, was es gibt, nicht als solche rechnen. Die einzige Konkurrenz ist plattformfremd, und das ist Forza auf der XBOX360. Ein schönes Spiel, ich habe es neulich gespielt. Wer zu spät kommt, muss sich natürlich auch, wenn es um eine andere plattform geht, an dem messen lassen, was andere so fabrizieren. Immerhin leben wir ja nicht in einer s/xbox360/PS3/gi-Welt.

Also, hoffen wir das Beste, und damit meine ich keine weiteren Verschiebungen. Allerdings, so lang kein Operation Flashpoint 2 dabei rauskommt…

04.01.2010

Merksatz

Steht sie dreckig auf dem Tisch, gib ihr zwecks Sauberkeitserreichungsmöglichkeitssinnhaftigkeit einen Wisch.

17.12.2009

Manchmal!

Manchmal nimmt die sog. Vermeidungshaltung merkwürdige Züge an. Beispielsweise folgenden:
prokrastination