xbmc/xbmc — pull request #2549 by popcornmix (2013-04-05 11:49:00+00:00)
Title: [rbp] Ensure GPU does resize when caching thumbnails

On a Pi, imageres and fanartres are set quite low (typically 512 and 720 or lower).
So, when caching the artwork there is a resize step involved.
The OMXImage jpeg decoder has the option to resize "for free".
Unfortunately this currently only limits the resize to current GUI resolution,
so there is often a second resize done by the ARM. This is very slow.
The larger decoded image also requires more RAM.

With fanartres=512, you currently get resize during decode of 1920x1080 to 1280x720 (gui res).
Then before encode there is a resize to 910x512. The two stage resize reduces image quality.

This fix takes a bit more care to include the imageres/fanartres resize during the decode.
I needed to make the 16:9 check a little more lax to also detect a 16:9 image after it's been resized.
I've gone for differs from 16:9 by 1%, rather than the existing exact match of 16:9.