Color distortion when video size does not match the virtual screen size (patch suggestion included)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ren'Py |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Videos encoded at a different resolution to the Ren'Py virtual screen size result in color distortion of the video (looks too "green"). For example, playing a video encoded at 1920x1080 with config.screen_width = 1366 and config.
This issue appears to be caused by the flags supplied to libswscale. The file module/ffdecode.c enables a "fast bilinear" scaling algorithm which appears to cause the color distortion. Switching to a different scaling method (e.g. bicubic filtering) appears to fix the issue. A suggested fix is therefore to change the line:
static int sws_flags = 1;
to:
static int sws_flags = SWS_BICUBIC;
Issue observed on Ren'Py 6.12.2, 6.13.12 and 6.14.0 for Linux and Windows. Fix tested on 6.13.12 for Linux only.
summary: |
Color distortion when video size does not match the virtual screen size + (patch suggestion included) |
Changed in renpy: | |
status: | Fix Committed → Fix Released |
I've made this change, although I chose to use SWS_BILINEAR instead of SWS_BICUBIC, for speed reasons.