Many people are confused concerning nonlinear coding. Image processing literature often neglects to treat gamma. This is a consequence of the fact that classical image processing is not ordinarily concerned with the reproduction of images. Literature in the area of machine vision similarly discounts gamma, or treats display nonlinearity as purely a physical problem. But intensity is a clearly defined term in physics.
Intensity is necessarily proportional to a physical stimulus.
Usually, RGB codes are nonlinearly mapped to intensity. Video engineers use perceptual principles all the time. Camera designers know this very well. But not too many video engineers are camera designers. The nonlinear mechanism at the CRT is implemented in a highly subtle fashion.