It would not be possible in one library, but as soon as I can dig out
from under a backlog of work created by the sudden uptick in demand for
VirtualGL and TurboVNC (open source remote desktop/telework solution for
Un*x 3D applications), one of the features on tap for libjpeg-turbo 2.1
is integrating 8-bit and 12-bit support into the same package. This
will likely be done by providing two separate libraries with different
names-- libjpeg12 and libturbojpeg12, jpeglib12.h and turbojpeg12.h,
jpeg12*_() and tj12*(), etc. Separate libraries would still be
required, but creating a completely independent namespace for 12-bit
would at least allow 8-bit and 12-bit support to be built into the same
application.
https://github.com/libjpeg-turbo/libjpeg-turbo/issues/199
Thanks to an OSS grant from Google, I have funding to complete that
feature. I just need to find time to do it.
DRC