From 246bd2104303c5193b8c9e27c28b91de61281f1a Mon Sep 17 00:00:00 2001 From: Jonathan Underwood Date: Aug 21 2015 12:31:46 +0000 Subject: No longer revert r9983, but include xpra-r10393.patch to fix the color encoding --- diff --git a/xpra-r10393.patch b/xpra-r10393.patch new file mode 100644 index 0000000..47975fa --- /dev/null +++ b/xpra-r10393.patch @@ -0,0 +1,25 @@ +Index: /trunk/src/xpra/codecs/csc_cython/colorspace_converter.pyx +=================================================================== +--- /trunk/src/xpra/codecs/csc_cython/colorspace_converter.pyx (revision 10392) ++++ /trunk/src/xpra/codecs/csc_cython/colorspace_converter.pyx (revision 10393) +@@ -49,13 +49,13 @@ + import sys + if sys.byteorder=="little": +- BGRA_B, BGRA_G, BGRA_R, BGRA_A = 2, 1, 0, 3 +- RGBX_R, RGBX_G, RGBX_B, RGBX_X = 2, 1, 0, 3 ++ BGRA_B, BGRA_G, BGRA_R, BGRA_A = 0, 1, 2, 3 ++ RGBX_R, RGBX_G, RGBX_B, RGBX_X = 0, 1, 2, 3 ++ BGR_R, BGR_G, BGR_B = 0, 1, 2 ++ RGB_R, RGB_G, RGB_B = 0, 1, 2 ++else: ++ BGRA_B, BGRA_G, BGRA_R, BGRA_A = 3, 2, 1, 0 ++ RGBX_R, RGBX_G, RGBX_B, RGBX_X = 3, 2, 1, 0 + BGR_R, BGR_G, BGR_B = 2, 1, 0 + RGB_R, RGB_G, RGB_B = 2, 1, 0 +-else: +- BGRA_B, BGRA_G, BGRA_R, BGRA_A = 3, 0, 1, 2 +- RGBX_R, RGBX_G, RGBX_B, RGBX_X = 3, 0, 1, 2 +- BGR_R, BGR_G, BGR_B = 0, 1, 2 +- RGB_R, RGB_G, RGB_B = 0, 1, 2 + + log("csc_cython: byteorder(BGRA)=%s", (BGRA_B, BGRA_G, BGRA_R, BGRA_A)) diff --git a/xpra-r9983.patch b/xpra-r9983.patch deleted file mode 100644 index f3ebdce..0000000 --- a/xpra-r9983.patch +++ /dev/null @@ -1,54 +0,0 @@ -Index: /trunk/src/xpra/codecs/csc_cython/colorspace_converter.pyx -=================================================================== ---- /trunk/src/xpra/codecs/csc_cython/colorspace_converter.pyx (revision 9982) -+++ /trunk/src/xpra/codecs/csc_cython/colorspace_converter.pyx (revision 9983) -@@ -42,30 +42,25 @@ - - #precalculate indexes in native endianness: --BYTEORDER = struct.pack("=BBBB", 0, 1, 2, 3) --def byteorder(v): -- for i in range(4): -- bv = BYTEORDER[i] -- if type(bv)==str: -- #old versions of python: byte value is in fact a character (str) -- bv = ord(bv) -- if bv==v: -- return i -- raise Exception("cannot find byteorder for %s" % v) --cdef uint8_t BGRA_B = byteorder(0) --cdef uint8_t BGRA_G = byteorder(1) --cdef uint8_t BGRA_R = byteorder(2) --cdef uint8_t BGRA_A = byteorder(3) --cdef uint8_t BGRX_R = BGRA_R --cdef uint8_t BGRX_G = BGRA_G --cdef uint8_t BGRX_B = BGRA_B --cdef uint8_t BGRX_X = BGRA_A -- --cdef uint8_t RGBX_R = byteorder(0) --cdef uint8_t RGBX_G = byteorder(1) --cdef uint8_t RGBX_B = byteorder(2) --cdef uint8_t RGBX_X = byteorder(3) -- -+cdef uint8_t BGRA_B, BGRA_G, BGRA_R, BGRA_A -+cdef uint8_t BGRX_R, BGRX_G, BGRX_B, BGRX_X -+cdef uint8_t BGR_R, BGR_G, BGR_B -+cdef uint8_t RGBX_R, RGBX_G, RGBX_B, RGBX_X -+cdef uint8_t RGB_R, RGB_G, RGB_B -+import sys -+if sys.byteorder=="little": -+ BGRA_B, BGRA_G, BGRA_R, BGRA_A = 2, 1, 0, 3 -+ RGBX_R, RGBX_G, RGBX_B, RGBX_X = 2, 1, 0, 3 -+ BGR_R, BGR_G, BGR_B = 2, 1, 0 -+ RGB_R, RGB_G, RGB_B = 2, 1, 0 -+else: -+ BGRA_B, BGRA_G, BGRA_R, BGRA_A = 3, 0, 1, 2 -+ RGBX_R, RGBX_G, RGBX_B, RGBX_X = 3, 0, 1, 2 -+ BGR_R, BGR_G, BGR_B = 0, 1, 2 -+ RGB_R, RGB_G, RGB_B = 0, 1, 2 -+ - log("csc_cython: byteorder(BGRA)=%s", (BGRA_B, BGRA_G, BGRA_R, BGRA_A)) -+log("csc_cython: byteorder(BGR)=%s", (BGR_B, BGR_G, BGR_R)) - log("csc_cython: byteorder(RGBX)=%s", (RGBX_R, RGBX_G, RGBX_B, RGBX_X)) -+log("csc_cython: byteorder(RGB)=%s", (RGB_R, RGB_G, RGB_B)) - - COLORSPACES = {"BGRX" : ["YUV420P"], "YUV420P" : ["RGB", "BGR", "RGBX", "BGRX"], "GBRP" : ["RGBX", "BGRX"] } diff --git a/xpra.spec b/xpra.spec index 88dd005..90062e7 100644 --- a/xpra.spec +++ b/xpra.spec @@ -22,19 +22,16 @@ Name: xpra Version: 0.15.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote display server for applications and desktops License: GPLv2+ and BSD and LGPLv3+ and MIT URL: https://www.xpra.org/ Source0: https://xpra.org/src/%{name}-%{version}.tar.xz -# This patch corresponds to upstream commit r9983 which unfortunately -# breaks colour encoding when using VP8/9 encodings. So we apply it -# reversed below to revert it. This requires increasing the fuzz too. -# See http://xpra.org/trac/ticket/937 -%global _default_patch_fuzz 2 -Patch0: xpra-r9983.patch +# This patch corresponds to upstream commit r10393 which fixes the +# broken color encoding problem. See http://xpra.org/trac/ticket/937 +Patch0: xpra-r10393.patch BuildRequires: python2-devel pygobject2-devel pygtk2-devel BuildRequires: libXtst-devel @@ -95,7 +92,7 @@ network bandwidth constraints. %prep %setup -q -%patch0 -p3 -R +%patch0 -p3 %build CFLAGS="%{optflags}" %{__python} setup.py build \ @@ -207,6 +204,10 @@ fi %changelog +* Fri Aug 21 2015 Jonathan G. Underwood - 0.15.4-3 +- No longer revert r9983, but include xpra-r10393.patch to fix the + color encoding + * Wed Aug 5 2015 Jonathan G. Underwood - 0.15.4-2 - Add patch to revert upstream commit r9983 which breaks color encodding