The resolution structure contains iWidth/iHeight which is the size of the (possibly clamped) GUI overlay, and iScreenWidth/iScreenHeight which is the size of the physical display (and the destination size videos will be scaled to).
The framerate matching code is incorrectly using the GUI overlay resolution size to find the best matching HDMI mode.
On the Pi all modes bigger than 1280x720 have iWidth=1280 and iHeight=720, so you can end up choosing a 720p display mode when playing a 1080p video with a 1080p display mode selected.
Also I've removed the "fps is fps * 2 : 25 fps -> 50 fps" for 3D SBS/TAB modes. I don't believe this is correct. The framerate for SBS/TAB modes is unchanged and will typically be 24. (Although I could be misunderstanding this bit).
separate PR please for the removal of the "fps is fps * 2 : 25 fps -> 50 fps" for 3D SBS/TAB modes