One of the best ways to measure code complexity is to zip up the source code. This eliminates a lot of the redundancies and is a more direct measure of entropy/complexity than almost anything else.
By that metric, jpeg-xl is about 4x the size of the jpeg or png codebase.
Interesting approach