+ + pixel_size = s->pixel_size; + this (and related changes s->pixel_size -> pixel_size): does it have any performance impact alone ? compiler should be able to optimize it but some hint may not hurt. IMHO this should be a separate patch so that it eases reviewing the non-trivial part of the patch