Loud ramblings of a Software Artisan

Thursday 28 February 2008

I told you so!

I think that this time I can say "I told you so".

In 2005/09 I posted this to rant about the use of hidden and undocumented MacOS X API in WebKit.

In 2008/02, the Mozilla folks post this, this and this where they denounce that issue.

The difference is that at that time I didn't bother to provide data like performance comparison, probably because I decided that it was someone else problem.

To add the these post, Microsoft actually got sued, back in the early 90s, for using undocumented APIs in order to be ahead of their competition in the space of... office applications. And Apple employees still continue to drink the KoolAid claiming that one need to file a bug... or that these are not API bit SPI (sic)[1].

This is just one of the many frustration I no longer get by choosing only Free Software.

Notes

[1] actual justification given to me at one point

CPU^wSpam assassin

Federico: concerning Spamassassin in Evolution, I filed that bug a while back. Enjoy.

Tuesday 26 February 2008

libopenraw 0.0.5

Just released libopenraw 0.0.5.

Here is the announce mail.

Download it.

Sunday 24 February 2008

Checking more than one version with pkg-config

Sometime you have to check for different versions of a packages with pkg-config because of new APIs. I had to query the lazyweb and I ended up finding something. Here is the configure.ac snippet I wrote:

GNOMEVFS_VER=0
PKG_CHECK_MODULES(GNOMEVFS, [gnome-vfs-2.0 >= 2.14],
[
  GNOMEVFS_VER=214
],
[
  PKG_CHECK_MODULES(GNOMEVFS, [gnome-vfs-2.0 >= 2.12])
  GNOMEVFS_VER=212
])
GNOMEVFS_CFLAGS="$GNOMEVFS_CFLAGS -DGNOMEVFS_VER=$GNOMEVFS_VER"

Something I haven't seen often is that PKG_CHECK_MODULES allow found and not found action blocks (yes this is in pkg-config main page). The default not found action is to fail. The above code works as follow: check the highest version you need, if not found check the one you can eventually go away with. Define a symbol with a numeric version and pass it to the modules CFLAGS.

Then in the code do:

#if GNOMEVFS_VER >= 214
...
#endif

Tuesday 19 February 2008

Moving job...

It is the season apparently. Last week I moved inside Novell from the OOo team to the SLED Desktop team to work on Gnome.

Friday 15 February 2008

Hack week

Long time no blog, mostly because I had nothing to say beside the usual rants.

This week at Novell it is hack week, and I decided to spend a good amount of time to put libopenraw into a better shape, mostly in the area of extracting and decompressing the CFA[1] data (the RAW data).

Recently I got my first major outside contribution for libopenraw as support for Minolta MRW files. Thanks Bradley, you rock!

So far this week I have done:

  • refactored and genericized the unpacking (12 bits to 16) as most RAW files have 12bits per channel and store it without padding in the file ("harder" to decode[2], but less space wasted). This code I wrote it for the Minolta MRW but end up being usefull to DNG and Nikon NEF
  • implemented an API to also obtain the CFA pattern. The CFA pattern describe the organisation of the CFA (Color Filter Array), mostly the order of the colors. Currently it only support RGB and 2 by 2 patterns. This data is required in order to perform the demosaic (ie convert the CFA to obtain a colorful RGB image)
  • enhanced the test suite to checksum the data (in order to check that we didn't break anything) and to check for the CFA pattern.
  • fixed various bugs needed to either go further or to that were actually bugs, like the unpacking that did fail because it was losing the last bytes of the buffer whose size was not multiple of 3.
  • started dealing with the Nikon mess. Nikon files are either uncompressed, packed with some weird padding (discard 8 bits if column % 10 == 9), or compressed in a lossy way. As of right now, only the uncompressed files are supported. Oh there is also a bug where NEF file from the D100 might be marked as compressed when they are not[3].

So far the file very well supported are:

  • Canon CR2 and CRW (not the CRW from the "hacked" firmware)
  • DNG (unless they are compressed, I need to support loading in tiles as I already have the lossless JPEG compression), and only with a number of bits per channel of 12 or 16. Strangely, the Leica M8 files seems to be 8 bits per channel.
  • Nikon NEF uncompressed (D1, D1X, D2X)
  • Minolta MRW (with the exception of the A200 for which I still miss a sample)

Notes

[1] Color Filter Array

[2] 12 bits is actually simplier than 14 or 10

[3] apparently some people did choose to compress, but it was very slow on the camera. I have to locate a sample.