libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.89k stars 1.78k forks source link

[ARM] Certain JPGs display red / green artifacts #6611

Open ghost opened 6 years ago

ghost commented 6 years ago

Description:

When using RA and attempting to change the background on any ARM device, I noticed that certain .jpg files load / display incorrectly and are polluted with green and red artifacts. All 3 of my ARM devices that I tested are affected: Raspberry Pi 3B+, ASUS Tinkerboard, and Motorola Moto G5 Plus.


Expected behavior:

Affected images should display normally.


Actual behavior:

Affected images exhibit unsightly red and green artifacts.


Steps to Reproduce:

lenrin_gemini kartandtinki-turquoise-wallpapers-714293667 vocaloidrpg


Examples:

screenshot_20180423-201448 screenshot_20180423-201819 screenshot_20180423-205101

Close-up of artifacts: img_20180423_200029484


Bisect Results:

Present since I've started used RA on ARM platforms.


Version/Commit:

Environment information:

Motorola Moto G5 Plus

RPi 3B+

ASUS Tinkerboard

inactive123 commented 5 years ago

@kivutar Is this related to the prior mentioned issue with the swapped color channels?

markwkidd commented 5 years ago

@daliaetnano has mentioned in another discussion the commit which caused this regression. Discussion link: https://github.com/libretro/RetroArch/pull/8043#issuecomment-455770102

orbea commented 5 years ago

@twinaphex From the discussion mentioned in the previous commit this issue was caused by commit https://github.com/libretro/RetroArch/commit/bcaa24cf7b1221f7d84a7c719020bdc301dde82d, any ideas?

daliaetnano commented 5 years ago

I think that the commit https://github.com/libretro/RetroArch/commit/bcaa24cf7b1221f7d84a7c719020bdc301dde82d was probably added because VideoCore GPU didn't support BGRA8888.

Unfortunalely the test added in the commit includes all VideoCore regardless of the version. I found in this page https://www.g-truc.net/post-0734.html that VideoCore IV supports BGRA8888. If I remove the commit, it works fine.

It would explain the bug on RPi3 but not for the other hardware ASUS Tinkerboard, and Motorola Moto G5 Plus.

orbea commented 5 years ago

It might of been working around an issue which is no longer valid and reverting it might just be fine?