From dedee7fd8e6aa8b9ff1993a0e473ad25ed0538ae Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 10 Jul 2020 08:24:14 +0000 Subject: [PATCH] #1462 build and config changes for restoring csc_cython git-svn-id: https://xpra.org/svn/Xpra/trunk@26943 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/etc/xpra/conf.d/30_picture.conf.in | 2 +- src/setup.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/etc/xpra/conf.d/30_picture.conf.in b/src/etc/xpra/conf.d/30_picture.conf.in index 9833962b3b..c758f52679 100644 --- a/src/etc/xpra/conf.d/30_picture.conf.in +++ b/src/etc/xpra/conf.d/30_picture.conf.in @@ -25,7 +25,7 @@ encoding = auto video-encoders = all # Used by both the client and server for colourspace conversion: -# csc-modules = swscale, libyuv +# csc-modules = swscale, cython, libyuv # csc-modules = none # csc-modules = all csc-modules = all diff --git a/src/setup.py b/src/setup.py index 3896c69d5a..ae6dfa075d 100755 --- a/src/setup.py +++ b/src/setup.py @@ -197,6 +197,7 @@ def is_RH(): #ffmpeg 3.1 or later is required dec_avcodec2_ENABLED = DEFAULT and pkg_config_version("57", "libavcodec") csc_swscale_ENABLED = DEFAULT and pkg_config_ok("--exists", "libswscale") +csc_cython_ENABLED = DEFAULT nvenc_ENABLED = DEFAULT and BITS==64 and pkg_config_version("7", "nvenc") nvfbc_ENABLED = DEFAULT and BITS==64 and pkg_config_ok("--exists", "nvfbc") cuda_kernels_ENABLED = DEFAULT @@ -223,7 +224,7 @@ def is_RH(): "vpx", "webp", "pillow", "jpeg_encoder", "jpeg_decoder", "v4l2", "dec_avcodec2", "csc_swscale", - "csc_libyuv", + "csc_cython", "csc_libyuv", "bencode", "cython_bencode", "vsock", "netdev", "mdns", "clipboard", "scripts", @@ -933,6 +934,7 @@ def clean(): "xpra/codecs/dec_avcodec2/decoder.c", "xpra/codecs/csc_libyuv/colorspace_converter.cpp", "xpra/codecs/csc_swscale/colorspace_converter.c", + "xpra/codecs/csc_cython/colorspace_converter.c", "xpra/codecs/xor/cyxor.c", "xpra/codecs/argb/argb.c", "xpra/codecs/nvapi_version.c", @@ -2209,6 +2211,12 @@ def get_nvcc_version(command): ["xpra/codecs/csc_swscale/colorspace_converter.pyx"], **swscale_pkgconfig)) +toggle_packages(csc_cython_ENABLED, "xpra.codecs.csc_cython") +if csc_cython_ENABLED: + csc_cython_pkgconfig = pkgconfig(optimize=3) + cython_add(Extension("xpra.codecs.csc_cython.colorspace_converter", + ["xpra/codecs/csc_cython/colorspace_converter.pyx"]+membuffers_c, + **csc_cython_pkgconfig)) toggle_packages(vpx_ENABLED, "xpra.codecs.vpx") if vpx_ENABLED: