xpra icon
Bug tracker and wiki

Opened 6 years ago

Closed 6 years ago

#650 closed defect (fixed)

R and B colours are swapped with WebP encoding and non-opengl windows

Reported by: onlyjob Owned by: onlyjob
Priority: minor Milestone:
Component: encodings Version: 0.14.x
Keywords: Cc:

Description

On 0.14.1 tray icons look funny (distorted colours) when "WebP" encoding is chosen.
I can see this only on tray icons and only with WebP encoding...
0.13.9 was OK.

Attachments (3)

tray-colors.png (3.4 KB) - added by onlyjob 6 years ago.
color-test.png (14.9 KB) - added by Antoine Martin 6 years ago.
what the colour test should look like
Jessie-x86-transparent-colors.png (120.7 KB) - added by Antoine Martin 6 years ago.
transparent colours look fine on Debian Jessie

Download all attachments as: .zip

Change History (18)

comment:1 Changed 6 years ago by Antoine Martin

Owner: changed from Antoine Martin to onlyjob

That's odd, I can't reproduce (..), can you try with this very simple test application: browser/xpra/trunk/src/tests/xpra/test_apps/test_system_tray.py.

It works fine here and is definitely sent as webp:

$ xpra info | egrep "tray=|total_"
client.system_tray=True
window[1].total_frames[webp]=33
window[1].total_pixels[webp]=114816
window[1].tray=True

Please also post the output of ./xpra/codecs/loader.py

Last edited 6 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 6 years ago by onlyjob

xpra info (on server):

client.system_tray=True
window[1].tray=False
window[2].total_frames[rgb24]=23
window[2].total_frames[webp]=11
window[2].total_pixels[rgb24]=270372
window[2].total_pixels[webp]=5596648
window[2].tray=False
window[3].tray=False
window[5].total_frames[webp]=2
window[5].total_pixels[webp]=1152
window[5].tray=True
window[6].total_frames[webp]=2
window[6].total_pixels[webp]=1152
window[6].tray=True
window[7].total_frames[webp]=2
window[7].total_pixels[webp]=1152
window[7].tray=True
window[15].total_frames[webp]=2
window[15].total_pixels[webp]=1152
window[15].tray=True

loader.py (output for server and client is identical):

codecs and csc modules found:
* PIL                  : /usr/lib/python2.7/dist-packages/PIL/__init__.pyc
* enc_vpx              : /usr/lib/python2.7/dist-packages/xpra/codecs/vpx/encoder.so
* dec_vpx              : /usr/lib/python2.7/dist-packages/xpra/codecs/vpx/decoder.so
* enc_x264             : /usr/lib/python2.7/dist-packages/xpra/codecs/enc_x264/encoder.so
* enc_x265             : 
* nvenc                : 
* csc_swscale          : /usr/lib/python2.7/dist-packages/xpra/codecs/csc_swscale/colorspace_converter.so
* csc_cython           : /usr/lib/python2.7/dist-packages/xpra/codecs/csc_cython/colorspace_converter.so
* csc_opencl           : 
* dec_avcodec          : 
* dec_avcodec2         : /usr/lib/python2.7/dist-packages/xpra/codecs/dec_avcodec2/decoder.so
* enc_webp             : /usr/lib/python2.7/dist-packages/xpra/codecs/webp/encode.so
* dec_webp             : /usr/lib/python2.7/dist-packages/xpra/codecs/webp/decode.so

codecs versions:
* PIL                  : 2.5.1
* avcodec2             : 55.34.1
* cython               : 0.3.0.20.2
* dec_webp             : 0.4.0
* enc_webp             : 0.4.0
* swscale              : 2.1.2
* vpx                  : 1.3.0
* x264                 : 142

See attached image "tray-colors.png" with screenshot of "test_system_tray.py": icon on the left is the distorted one from Xpra session with WebP encoding; icon on the right is locally running app.

Changed 6 years ago by onlyjob

Attachment: tray-colors.png added

comment:3 Changed 6 years ago by Antoine Martin

Owner: changed from onlyjob to Antoine Martin
Status: newassigned

Hah, right, by distorted you don't mean that the picture's quality is degraded but that the colours are swapped, right? I didn't think of checking the colours!

I'll be able to test that better as soon as I figure out why the systray forwarding is misbehaving on Fedora 20... (I hope I don't have to deal with #405 just yet)

Last edited 6 years ago by Antoine Martin (previous) (diff)

Changed 6 years ago by Antoine Martin

Attachment: color-test.png added

what the colour test should look like

comment:4 Changed 6 years ago by Antoine Martin

Another really useful test for colour mixups is this one browser/xpra/trunk/src/tests/xpra/test_apps/colors.py, it should look like this:
what the colour test should look like
As you can see, it looks fine here with all colour encodings - does it on yours?
(and pressing a key can be used to start or pause a gradual change in colours useful for testing other things)

Another test which can be useful is this one: browser/xpra/trunk/src/tests/xpra/test_apps/transparent_colors.py - especially considering that trays are transparent. It looks similar, except the window is part transparent and there is no animation

comment:5 Changed 6 years ago by onlyjob

Tried those test apps -- "transparent_colors.py" demonstrated a problem: swapped RED and BLUE (with WebP).
"colors.py" is OK as well as other encodings.

Changed 6 years ago by Antoine Martin

transparent colours look fine on Debian Jessie

comment:6 Changed 6 years ago by Antoine Martin

Well, well.

First, I wasted a lot of time trying to figure out why my updated Jessie VM failed to connect.
It seems that something got updated very recently that completely broke the system tray support that we use (not that it ever worked properly under gnome3.. but now it deadlocks the whole application most of the time - sometimes it will work).
Wheezy I cannot test because it ships a version of libwebp which is just too old. Debian Sid worked fine every time - I tried 20 times to be sure (well gnome3 still hides the tray somewhere, but it doesn't just hang like Jessie) - I even did a full system update to see if the recent broken update also affected it, nope: still worked. I hope this gets fixed in Jessie sooner rather than later, it is pretty debilitating.
That's using a package OR installing from source. Both just hang at setting up the tray.

As you can see (after patching out the code that normally tries to setup the system tray):
transparent colours look fine on Debian Jessie

It worked fine for me (as usual..). I tried enabling opengl to see if it matters, but that crashes in virtualbox. Can you try disabling/enabling it? I guess you don't use gnome3 then? KDE IIRC?

Last edited 6 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 6 years ago by onlyjob

Of course I tried enabling/disabling OpenGL -- it makes no difference.
I'm on KDE but I doubt it could be significant.
The strange thing is that I'm still attached to the session where I reproduced the problem but transparent colors now OK (I run test again -- too bad I didn't take screenshot to prove that I'm not crazy) ;)
Tray icons show incorrect colours very reliably -- 100% (i.e. every time I choose WebP encoding)...

comment:8 Changed 6 years ago by onlyjob

I got it -- I was wrong regarding OpenGL -- it makes a difference.
Red and Blue are swapped in transparent_colors test only when OpenGL is disabled.
As soon as I tick OpenGL in Xpra menu colours are swapping back to normal.

comment:9 Changed 6 years ago by onlyjob

Looks like it is R-B colour swap issue not specific to tray...
I just reproduced on nouveau with "transparent_colors.py"...

comment:10 Changed 6 years ago by onlyjob

I built libwebp-0.3.0 from source; re-built Xpra and reproduced both issues -- this one (i.e. R-B colour swap) and vertical stripes in konsole #651.

comment:11 Changed 6 years ago by onlyjob

Same problems with libwebp-0.2.1 but konsole distortion pattern is slightly different: squares instead of stripes...

comment:12 Changed 6 years ago by Antoine Martin

Summary: weird tray icons colours with WebP encodingR and B colours are swapped with WebP encoding and non-opengl windows

I've just seen it on Debian Sid, now I can reproduce the colour problem I should be able to fix it. The konsole one on the other hand (#651).. may be a different issue, maybe I need to also run the server on Debian for that one.

comment:13 Changed 6 years ago by Antoine Martin

Owner: changed from Antoine Martin to onlyjob
Status: assignednew

Bug was that we assumed that the client can upload pixels in BGRA format... which is the case for the opengl backing, but not for the plain gtk pixmap one used as fallback. Just like #651, I am amazed that no-one noticed this with opengl disabled.

Fixed in r7405, more improvements (not strictly necessary) in r7406.

Does that fix things? Will backport this fix and r7402 before releasing 0.14.2

comment:14 in reply to:  13 Changed 6 years ago by onlyjob

Replying to totaam:

Fixed in r7405, more improvements (not strictly necessary) in r7406.


I tested both on 0.14.1 -- fixes work, problem solved. Thank you.

comment:15 Changed 6 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Backport in r7407.

Thanks for testing!

Note: See TracTickets for help on using tickets.