[Libdlo] libtubecable 0.1.1

Henrik Bjerregaard Pedersen hbp at xinc.dk
Sun Jun 7 02:15:25 PDT 2009


Hi Florian.

> Oops, you're right. I forgot to test the leaf image, and with offset 70,
> it actually crashes my device. However, with offset 20, I still get
> pixel errors sometimes.

I haven't noticed any pixels errors, but then again, I don't know
exactly how the leaf image is supposed to look.


> Thanks, a very good idea. I've pushed this to the repository, and I've
> also moved the conversion from single bytes to uint32_t into the loading
> routine. Should perhaps add a little bit more speed.

You can get a further 50% improvement by compiling with -O2.

And a another 5-10% by not reading the previous pixel in
dl_huffman_compress(). Instead simply reuse the pixel value
you have just read:

     uint16_t prev = 0;
     ...
     thispix = pixels[pixel];
     dl_huffman_append( cs, thispix - prev );
     prev = thispix;

-- 
Henrik Bjerregaard Pedersen
phone: +45 38606892 mail: hbp at xinc.dk



More information about the Libdlo mailing list