xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 4 years ago

Closed 2 years ago

Last modified 16 months ago

#1713 closed enhancement (fixed)

black and white mode

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: minor Milestone: 4.1
Component: encodings Version: trunk
Keywords: Cc:


We already have "png/L" support, but we could add a global black-and-white mode to try to save bandwidth:

  • jpeg supports TJPF_GRAY
  • all the video encoders would need a csc step
  • webp would need csc too

I'm not sure this will save enough bandwidth: the self-tuning video encode heuristics normally switch to YUV420P for video, and that already reduces the space taken by the colours to 33% or less of the bitstream.
For non-video, it may allow us to use a lossless encoding more often than we would otherwise.

Change History (8)

comment:1 Changed 4 years ago by Antoine Martin

Milestone: 2.3future

I don't see the point:

  • many things don't degrade well
  • none of the video encoders take grayscale as input
  • the cost of chroma is a small overhead (just a 33% with YUV420P - worst case scenario - often less if the video encoder interpolates chroma and luma)
  • the cost of a single lossless refresh dwarfs any savings we might have made at that point - best to make efficient use of the encodings we have than to invent new ones

comment:2 Changed 4 years ago by Antoine Martin

Milestone: future2.5
Status: newassigned

Let's give it a go: libyuv does have a ARGBGrayTo function we can use for video and webp codecs.

comment:3 Changed 4 years ago by Antoine Martin

Milestone: 2.53.1

All the encoding related tickets are scheduled for 3.1

comment:4 Changed 3 years ago by Antoine Martin

Milestone: 3.14.0

Milestone renamed

comment:5 Changed 3 years ago by Antoine Martin

Milestone: 4.04.1

comment:6 Changed 2 years ago by Antoine Martin

Resolution: fixed
Status: assignedclosed


  • r26698 adds grayscale as a valid encoding option, ie:
    xpra attach --encoding=grayscale

(also works from the tray menu)

  • r26699 supports grayscale mode for 'jpeg' and 'webp' via pillow
  • r26700 supports grayscale with video modes (via ARGBGrayTo)

comment:7 Changed 22 months ago by Antoine Martin

Fixups in r27138.

comment:8 Changed 16 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1713

Note: See TracTickets for help on using tickets.