Skip to content

Since a few days I'm officially a contributor to digikam! I even got my old KDE SVN account reactivated and updated and so I can directly contribute code to the project. It started with a bug in the lens correction plug-in I fixed that turned into developing a method to access sub-pixel image data. Currently I'm working on an additional tool for digikam's batch queue manager. This nice feature is particularly helpful for people who need to apply a series of operations to a large number of images at a time.

I'm developing a batch tool to sharpen images, for example after resizing them for print. I found that these two operations, resizing and then sharpening, are a somewhat common constant in my work flow. Usually, I shoot RAW images, import them into digikam directly, then apply white balance, tone curve corrections and sometimes input sharpening. There is little to be automatized there because each image needs different treatment. After this first step I save the post processed images as TIFF. Then, depending on what I do with them, I resize them differently, e.g. 1024x768 for Flickr, 1600x1200 for small prints, etc, and convert to JPEG. Downsampling tends to soften the images, so the final processing step is always a slight sharpen filter.

To demonstrate the effect, take a look at the following two images. The first one was just resized to 1600x1200 pixels, the second one was treated with an Unsharp Mask filter after resizing. It looks more crisp. Click on the images to view them in original size for the full effect.

I remember I didn't write anything about my Easter holidays yet. I went skiing in the Italian Dolomites, to a nice little town in the province of Trento named Moena. Its in the middle of Fassa Valley, a valley in the region of Trentino-Alto Adige where people speak an ancient Rhaeto-Romance language called Ladin. I know this region since I was a kid, we used to go skiing there with all of our family, quite regularly for more than ten years. Moena lies at the foot of the Cantinaccio mountain range, home to the legendary dwarven king Laurin, who was said to having kept a garden of beautiful roses high up near the mountain top. Stories tell he fell in love with a beautiful woman and abducted her. He was defeated by the womans brother and a band of brave knights and taken away into custody, but as a last action he put a ban on his rose garden turning it invisible day and night. But he forgot about dusk, which is not day or night and thus you can sometimes see the mountains glow red of roses in the last rays of daylight when the time is right. So they say.

Easter was late this year but reportedly it had been snowing heavily throughout most of March and April and the conditions were said to be quite good so I took the chance to go there and spend a week skiing and trying my new camera equipment. I had recently bought a Lowe Pro Slingshot 200 back pack that is big enough to hold all my gear, the G1, 14-45, 45-200 and the Canon FD 50 1.4 lens, together with a small tripod and cables, filters, charger, etc. I didn't take the Metz flashgun with me, I have found that it's a part of my equipment I almost never use and since it adds considerable weight I left it at home. I didn't miss it.

I wasn't going there alone. We were a group of around 15 people and we had rented a house for the whole group. A couple of them I knew already from earlier trips to Moena, some of them even from the time I went there together with my parents and brother. The area of Trevalli (Three Valleys) offers quite a number of skiing opportunities. If you have a car, the selection of resorts within 20 minutes travel distance is quite impressive. The image to the left was taken from the top of Col Margherita, which is part of the San Pellegrino skiing resort. Looking at the pictures its hard to believe it was already beginning of April. Not often have I seen this amount of snow that late. However, the warmth of the approaching Spring time was busy melting the snow and even though there was lots of it, its quality degraded massively during the day. So we got up early every day and tried to be on the ski piste soon. That worked rather well, by the time the snow turned soft around 3pm we usually had enough for the day and enough time left to chill, drinking marvelous Italian coffee and eating ice cream.

All the time I carried the Slingshot pack on my back. It was working really well on the piste, I almost didn't feel the weight of the gear and when it was time to enter the lift I could just swing it around from back to front and sit down comfortably. My sun glasses turned out to be a bigger problem, I had to take them off for taking pictures together with my gloves. The viewfinder worked pretty well under the bright sun, I just had to shield it a bit with my hand. The LCD turned out to be mostly useless. I tried to take photos with all the lenses I had, most of them with the 14-45, but some with the 45-200 as well. Sometimes I used a polarizer filter to improve the sky colors and cut down the haze a bit, but still I had to post process most of the images to correct white balance and levels. I used only digikam for raw development and corrections and it handled the task pretty well. I had also taken the MSI U100 netbook with me which allowed me to download the images every evening and inspect them.

I've uploaded a selection of images taken during my stay to Flickr, there's a set named Dolomites. All in all I'm quite satisfied with how the G1 performed. The only thing I'd have wanted is a bit more of dynamic range. One stop more might have made a difference in some situations.


Old Gear, too
Originally uploaded by thinkfat

Today a big jumble sale of photo equipment was held at a university facility, it takes place only once a year and it was the first time I went there. It was quite amazing, the mass of gear for sale was huge. Wide selection of stuff from all old and recent camera makers. The selection of Canon FD lenses was not too rich, though.

Still, I was quite successful and got a 28mm f/2.8 for very little money and a 50mm f/3.5 macro lens in very good condition for considerably less than the cheapest ebay offer.

I was tempted to buy a 24mm f/2 and had another good offer for a 24mm f/2.8, but the difference in speed and field of view was too little against the 28mm I already had in my bag and I declined. Instead I took the 50mm f/3.5 macro, I think it will be nice for flower shots and might work as a portrait lens as well.

The 28mm is a particularly nice lens. It's very light and the effective focal length of 56mm is close to a typical film standard prime. I think I'll like it. The 50mm macro is a bit long physically, but also quite light. Not something to have on the camera all the time, but still something to have in your photo bag.

Some first images with both lenses can be found in my flickr photo stream.

2

Sony Vaio Z21 News:

Some good stuff to talk about since the last weekend update. Lots of activity around Z21 support in the sony-laptop platform module, enough to publish an updated 0.8 release, which Eva has done already through the usual channel. A big update patch was posted on the linux-acpi mailing list, I took parts relevant to the sony-laptop platform module, merged them into our code, fixing some bugs in the way hotkey events were mapped to input events and pushed the fixes back to linux-acpi in order to keep upstream and our version better in sync.

A couple of new features supported now, mostly about wireless kill switch and hotkeys:

  • all hotkeys mapped to input events properly
  • better wireless kill switch support
  • compiles on 2.6.27 to 2.6.29

On special request I added a new load option to the module, if you insmod sony-laptop.ko with 'speed_stamina=3', the module will not touch the Nvidia graphics card power state any more. This is for people who need the Nvidia card so badly that booting through Windows is the lesser problem.

The Speed/Stamina switch now also reports ACPI events and I've found a way to read the switch position from the embedded controller, that means I can generate distinguishable ACPI events for either switch position.

Regarding enabling Speed mode I have been pointed to the "Nouveau" project which aims to provide a free replacement for proprietary Nvidia drivers. Maybe it's possible to reuse some code from this project to initialize the Nvidia card up to a state where a regular Xorg driver would be able to work with it. That sounds like major additional work, not sure I'll be able to do that on weekend time alone. The learning curve appears to be rather steep. However, since it's likely something that involves userspace code as well, it appears to me the correct way for now is just to report the switch position via ACPI and let userspace code handle the actual switching. Policies should not be hardcoded in kernel drivers anyway.

Digital Photography News:

After trying a Canon FD to µ4/3rds adapter from a Polish ebay seller and finding that it has got a couple of problems with infinity focusing and limits the available aperture stops to f/8, I tried to get a better version from a shop in China. It arrived on Friday a little more than a week after I ordered it and it's in a quite different arena regarding quality.

The Polish one is very simple, cut from just one block of aluminum on a CNC lathe. The adapter from China has a separate bayonet flange screwed to a CNC lathed body and also features an aperture control ring. It works correctly for all F stops and also allows infinity focusing. I'm very happy with it. I also got an almost mint 50mm f/1.4 lense for little money, including even a one year warranty against yet undiscovered defects. Both arrived in time before my easter holidays. I'll be going skiing in Italy, of course taking the camera and all lenses with me and hopefully finding enough time to enjoy both a lot.

Looks like there is some movement on the Z21 front again. Matthew Garret posted a patch to the linux-acpi mailing list with an rfkill based implementation of dealing with wireless devices. Interestingly, his patch also enables all the hotkey events so now I even get an ACPI event when I flip the speed/stamina switch. But still no idea about how to enable speed mode safely.

Eva made a new release with the rfkill changes integrated, which means you can now control all your wireless devices for even more power saving. Grab it from the usual place.

5

If you're into photography a bit, you probably know the term register distance. It's the distance between the flange of the lens and the sensory plane of the camera body. It's one important factor in lens design and every camera system has its own, a parameter carefully chosen because it has a huge impact on the overall design of all future cameras a maker is creating.

It also defines how easy it is to use lenses of a different system on your own camera. If your camera has a larger register distance than the lens you want to use, it's not doable with just a distance piece, you need some lens in between, which makes it expensive.

Now, the µ4/3rds system, by lack of the mirror box, has about the shortest register distance of any modern digital camera system, which means it's particularly easy to adapt any lens ever made. Just recently a friend, owning a large collection of Canon FD lenses, has bought an adapter to try some pieces of his collection on my camera and by that I got the chance to try some of them myself - and I found it's really a lot of fun.

I'm especially addicted to some of the fast 50mm because they easily offer apertures around f/1.8 and larger, making them very attractive for portrait photography and still motives, the shallow depth of field offering choices in composition impossible with the set of native lenses available for µ4/3rds today. Another interesting choice is long focal length lenses, the photo above was shot using a 500mm reflex lens, quite a compact design and effectively a 1000mm now due to the cameras crop factor.

This experience has considerably changed my plans for future native lenses to buy. Originally I planned to get the 14-140 as a walk-around lens, but it seems it's not going to be as good as the Pana/Leica 14-150 for 4/3rds yet almost as expensive. I'm afraid Panasonic invested too much into making a video lens and sacrificed optical quality, at least the MTF charts suggest that. So, with my newly discovered love for fast primes I'll rather have the 20mm f/1.7 which is supposed to be out late this year.

In the mean time I'll satiate my lust for experiments with vintage glass bought cheap off flea markets or ebay. Having to operate the camera manually is not really a burden and I find the results with the 50mm f/1.4 quite pleasing, and sharper than what I can achieve with the 14-45mm kit lens.

Of course the crop factor has its downsides. It's impossible to find a decent wide angle lens, I tried a Russian made 16mm fish eye and it's not coming out really wide just heavily distorted. I also tried a 24mm f/1.4 "L" for an effective 48mm, and while it works quite well the make is just not fitting the purpose: too bulky, too heavy, all in all not a good fit. I don't want to carry that pound of glass and only use a small fraction of it 🙂 So that limits the choice to around 50mm, or really long telephoto equipment, I think that's a good variety already.

Recently I became witness to a severe case of food mistreatment. I let my colleagues drag me into one of Darmstadt's fast food "shops", I dare not say "restaurant", Subways. Large international fast food franchise, you'll know them, there's likely one in your town as well. Stood in line, ordered some bread with chicken, salad, sauce. Watched the three stooges behind the counter prepare my meal and swore to never, ever return to that place. The way these people treated the food was unbearable to watch. I have never before seen such disrespect towards edibles, and consequently towards me as the customer buying them.

Of course it didn't taste good. Cold despite valiant efforts with a microwave oven, tasteless, boring, the bread dry like carpet dust and just as disgusting to eat.

Now, maybe the one I visited was just the one bad example, but for me that's the end of the story for good. I'm not opposed to fast food in principle, but there are just too few good ones to make it worth the effort searching. Subways? No Way!

30

Good news, I think. We've been able to switch off the Nvidia graphics adapter after booting Linux, which means it's possible now to boot directly into Linux and have X11 working with DRI and compositing enabled without the trip through booting into XP first.

It's quite a crude method, though. The hack with acpi_evaluate_object() I mentioned in my previous post worked, I just call the "_DSM" ACPI method of the built in Intel chipset graphics card and instruct it to call the "_OFF" ACPI method of the Nvidia card. I've also found out how to switch the Speed and Stamina LEDs so that you have some visual feedback of what's happening. You cannot see any difference in lcpci, which means that the card is still registered to the bus, apparently it's just powered down. I have no idea currently how to detach it entirely from the bus to reproduce exactly the configuration after having booted XP, maybe through PCI hotplugging? That being said, I have also no idea yet if the card is really powered down entirely.

My wife Eva has uploaded our experimental sony-laptop.c, grab it here. I don't make any guarantees about not damaging your precious toy if you dare trying it.

We're quite pleased with the current status however. It means that Eva can now shut down the laptop without having to make the stupid WinXP detour before using Linux again.

Her detailed log of installing openSUSE 11.1 on the Z21 can be found here.

1

Just as a quick update, we've tried yesterday to get access to the device specific methods of the both graphics cards through the WMI interface wrapper, but it failed. Some methods of the WMI wrapper work, but there's a stupid bug in the DSDT program that prevents executing the really interesting stuff. For the technically interested ones, this is the head of the 'WMMX' method in device WMI1:


Method (WMMX, 3, NotSerialized)
{
CreateDWordField (Arg2, Zero, FUNC)
...

Further down we find this:


If (LEqual (FUNC, 0x4D53445F))
{
CreateField (Arg2, Zero, 0x80, MUID)
CreateDWordField (Arg2, 0x10, REVI)
CreateDWordField (Arg2, 0x14, SFNC)
CreateDWordField (Arg2, 0x18, PARM)
If (LEqual (Arg1, 0x10))
{
Return (^^OVGA._DSM (MUID, REVI, SFNC, PARM))
}

This code block just splits Arg2 of method WMMX into sub arguments and calls the '_DSM' method of the built in graphics adapter. But there we find:


If (LNotEqual (Arg0, Buffer (0x10)
{
/* 0000 */ 0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
/* 0008 */ 0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4
}))
{
Store (0x80000002, RBUF)
Return (Local0)
}

So, the code in WMMX copies the first 128 bit of Arg2 into MUID, which in '_DSM' is compared to the byte array above. But wait, isn't FUNC also created by copying a DWORD from the start of Arg2? Hmmm. So, obviously the start of Arg2 cannot contain the function signature ('_DSM') and a MUID starting with 0xa0, 0xa0, 0x95 ... Consequently, every access to this method fails and just returns 0x80000002 to the caller. This part of the ACPI DSDT is just broken.

Now, obviously this is not the path Vista is using, unless they are replacing the original DSDT with something that works (and I cannot believe that). Maybe through a BIOS update? Does anybody know about graphics card related problems with Vista that are solved through a BIOS update? Or can some kind soul provide a DSDT dump while the system runs Vista?

Anyway, I'll continue my quest over the weekend, weather will not be good anyway. I think it should be possible to access the _DSM method of the chipset graphic card directly using its path, via acpi_evaluate_object(). We're going to try that next, stay tuned.

I'm making small progress with the graphics card problem. I've looked into the DSDT source code again and I think the key to switching the graphics adapters is a device called "WMI1", which has the PNP id "pnp0c14". I discovered that already a few days ago but when I tried talking to the device I could just not make the acpi driver register to it. Yesterday I was searching around in the acpi kernel drivers and I found a driver module "wmi.ko" which registers a driver to the very same PNP id. However, this driver doesn't do much on the Z21 but hogging the device. It's registering an event notifier and tries to find an embedded controller area, which is not present on the Z21 and so it does nothing useful. I think there's a DMI match missing, it should not register drivers blocking access to certain devices when it's unable to do anything useful with them.

(Update: After some more research I found that "WMI" reads as "Windows Management Instrumentation". wmi.ko is a wrapper driver allowing access to the WMI functions through ACPI. Now Sony seems to use, or rather abuse, the WMI interface to do other device specific functions as well.)

Walking the namespace of the "WMI1" device reveals that there is just one method, "WMMX", which basically acts as a wrapper to access the functions of both built in graphics adapters, "OVGA", the Intel GM45, and "DGPU", the Nvidia, and also methods of their respective output devices, "LCD", "CRT" and "DVI". I took a deep dive into the DSDT listing again and identified a couple of interesting things to try next. It's all very fascinating ...