Author Archives: [maven]

It’s wavelet bugfix time — 3.3.4 is here!

While compressing a multi-channel file with a target bitrate and no specific target MSEs the resulting bit distribution between the channels seemed rather odd, and comparing the results to an older version revealed that it was indeed totally bogus!
So I changed the target MSE computation in main.c to be more inline with what happens in Kompressor.app, which revealed a another bug where tiny negative (i.e. relative) target MSEs passed to wv_query_scheduler() / wv_encode() were converted to 0 (instead of the smallest negative fixed point number representable) and thus interpreted as absolute target MSEs.
Both of these are fixed in 3.3.4 (and Kompressor.app has also been recompiled with the relevant fix).
Other than those two fixes (both of which only relate to target MSE evaluation when compressing), the code is identical to (and thus fully compatible with) version 3.3.3.

My PS3 impressions – End of Day 1

Hardware – Heavy, although it doesn’t seem much bigger than my 360 when horizontal. Although upright it seems much more massive. I won’t be lugging this back to my parents’ for the weekend. The form itself is odd, and always makes me look twice because out of the corner of my eye it looks skewed and perspectively incorrect. The finish looks very nice (glossy black – Klavierlack) and attracts dust and fingerprints even more so then the PSP, but then you don’t have to touch it as often as the handheld. After it’s been on for about 10mins, the fan goes to its high settings (same as when turning the machine on), which is about the same volume as the fans on my 360 (not the jet-engine derived DVD drive), but a much nicer tone (not as much droning). So far, I don’t own a disc-based game, maybe the spinning drive will provide additional ventilation. It expels plenty of warm air out the back and the right (top) side.
HDMI output at 1080p looks really good; I’m using an HDMI to DVI cable and a mechanical DVI switch (so I can still use my Mac Pro with DVI as well).

Controller – Still don’t like the sticks (large dead-zone, little resistance, positioning). Seems to charge quickly, though. Haven’t seen a single game where the SIXAXIS was useful. The Motorstorm demo had an option for control using it, but I was missing feedback of how far I was turning and how much further I could turn. The triggers have a similar feel of “not knowing where you are”. Rumble is missed. It’s very light. D-pad is decent.

Interface – I really like the XMB in principle (especially on a high-def output device), but it seems a bit cumbersome once you get into sub-menus (e.g. in the audio-output menu, you had to go right to get the screen to save your changes; elsewhere you don’t have to do that and right will change the category). The built-in “swirl” and the music visualiser look very nice (the swirl probably only in HD), although I don’t see what they have in common with the music (but this has been my problem with visualisers for the past 5 years or so).
The text-entry system is a disgrace. Give me a proper on-screen keyboard, getting the USB-keyboard out of the closet gets old fast. The whole set-up process of the console was seemingly focused on being user-unfriendly: Plug in your wireless controller, then you have to use the PS2 display connector first to get a picture to enable HDMI, optical out disabled by default, the on-screen keyboard, …
As for the user-friendliness, something I wanted to mention that contrary to one’s expectation (but not their marketing materials) the PS3 is much more a PC than the 360 coming from Microsoft. The PS3’s got activity LEDs for the HDD, it needs to be properly shut down, it installs stuff after downloading, etc.
But I have to add, most things are fine after the initial set-up. Nevertheless, most companies would do well to rent an Apple employee for improving the unpacking and set-up experience of new shiny equipment… 🙂

Online / Store – I’m not quite sure how the accounts will work for different regions will work, so far I’ve not used my planned main-account name, as I’ll probably reserve that for a European account. I also haven’t bought anything (again because I’m not sure how transferable the bought items are).
The friends system I haven’t tried much, although I registered a few peeps.
The (US) online-store is essentially a web-page (which is slightly sluggish when moving quickly between items). You use the analogue stick to controller the mouse pointer or flick between controls with the D-pad (unfortunately it also scrolls through long description texts). The sections are nice and clear, I like the “what’s new” and “top downloads” side bars.
The downloads themselves are nice and fast (maxing out my 6000 kbit/s connection most of the time, the rest of the time I was torrenting ;)), but they better be because you (currently) cannot do anything else while download. Except cancel the download. Which then tells you that the download has failed if you do. I know, I canceled it!
Good selection of stuff though, I was expecting it to be sparse compared to XBLM, but it’s not at all. I really appreciate the “proper” downloadable at very reasonable prices.
1080p trailers look really, really nice. Recommended are 300 and Black Hawk Down. It’s also nice to have plenty of hard-disk space.

Demos / Downloadable Games
F1 2007 – Quite nice and difficult (played with most of the aids turned off). Looks a bit vaseline-smeared.
GripShift – “Only” looks OK, but seems very fun. Reminds me of Trackmania. Not too keen on the racing, but more on the platforming / collecting side of things. I’ll probably buy this.
GT HD – Only game I recalled running in 1080p. The gameplay doesn’t look much better than you remember GT4, but it’s really sharp and the car models are a lot better (which you would have noticed it they’d simply used the GT4 ones in this). The replay though look really proper good! No force-feedback, even with the Driving Force Pro. Hate!
Motorstorm – Looks and plays nice, but some of the videos I had downloaded looked nicer (with dust particles going in and out of shadow / sunlight and being shadowed correctly). The demo is probably from an older build.
Resistance – Died repeatedly after killing 3-5 of the bad guys with the default weapon.
None of the games I recall as using AA (although F1 used depth of field and motion blur, and so did GT HD in replays), but on the plus side all of them had a very stable frame-rate and no apparent tearing.

(Current) Conclusion
I’ve ordered the US versions of Resistance and Motorstorm, so I’ll see how the full games fare. For me, as a 360 owner there aren’t many more interesting exclusives out at the moment, but the good downloadable games and the stunning picture via HDMI (compared to the lacklustre colours via VGA on the 360) are quite nifty. As is the feeling of untapped potential, but we’ll see about that. 😉
Would I recommended you buy one at the current price? Not really, unless you have enough disposable income or are gagging for a Blu-Ray player. The reason I imported one now was that I sick of Europe getting shafted.

Cocoa Worker Thread

For Kompressor.app, I’ve written a group of Foundation classes for implementing a worker-thread paradigm in Objective-C. The general idea is you have some non-trivial amount of processing you want done and then (optionally) be notified when it’s done.

This implementation has a number of advantages compared to others:

  • Threads are created once and reused, no expensive thread creation for each work unit.
  • Non-polling (using NSConditionLock).
  • Low communication overhead (e.g. no Distributed Objects).
  • Small (although the code is spread out over 3 classes / files).

How do you use it?

  1. Create an instance of SIWorkManager (usually there should only be one); by default it creates as many worker threads as CPU cores are available.
  2. For each unit of work, create an SIWorkUnit object (which contains the target object and selector where the actual computation is done, as well as an optional didEndSelector which is called on the main-thread of your application with either the result of calling [target selector] or the originally given argument). The target and argument are retained by the work unit.
  3. Tell the work manager object about the work unit (via addWorkUnit:).
  4. Done!

If you want to wait for a batch of N work units to be done, create an NSConditionLock L, and at the end of the work selector, you do [L lock]; [L unlockWithCondition:[L condition] + 1];. After dispatching all the work units in the main thread (or wherever), you wait with [L lockWhenCondition:N]; [L unlockWithCondition:0];.

An (untested as I am only on a Linux machine at the moment) example demonstrating both simple usage as well as waiting for a batch to be finished is in BatchExample.m.

Remember to only access shared data structures (or your user-interface) in the didEndSelector. SIWorkManager also has messages for removing work on or referring to a given object. Use nil to remove all pending work units.

Here is the source code with all required files. Feedback / fixes appreciated.