[vlc-devel] [RFC] [PATCH 1/1] Add orientation to video format

Rémi Denis-Courmont remi at remlab.net
Sat Mar 17 20:15:46 CET 2012

Le samedi 17 mars 2012 20:59:38 Laurent Aimar, vous avez écrit :
>  I honestly don't think the 3 bits optimisation is needed in the video
> format_t structure (it is not allocated a lot). But if you think
> otherwise, I don't mind.

With a bit field, the compiler will have to insert extra bit operations on 
loads and stores.

With a char, the compiler will not know that the value is bound to 0-7 for the 
purpose of optimizations (e.g. jump tables).

With an enum, the compiler will use an extra 32-bits.

None of the three options are perfect. I don't really care.

Rémi Denis-Courmont

More information about the vlc-devel mailing list