I use an Olympus MFT system and one thing I notice is that for most Zuiko MFT lenses there is significant barrel distortion as seen in the raw images. However, if you look at the jpg's, often they have little or no distortion, so apparently it is getting corrected automatically by the camera firmware.
Does the camera (1) just guess at the distortion pattern and apply the same one to every jpg, or (2) does it have some way to detect the lens and have individual distortion correction patterns for particular lenses that it knows about, or (3) does it have some way to detect the distortion by analyzing the image itself and correcting it by image analysis?