Interesting diff, may be cingg can use something like this for speeding up swscale conversions?
But it seems that only upcoming ffmpeg version will allow to set transfer characteristics directly on avframe during scaling.
So may be until this day our colorspace plugin should grow some knowledge about various gamma systems and also white points?