Skip to content

Commit

Permalink
#3592 remove x265
Browse files Browse the repository at this point in the history
codec has issues that valgrind flagged,
and it hasn't been enabled by default in years
  • Loading branch information
totaam committed Jul 29, 2023
1 parent be626ec commit 4f73065
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 617 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ tests/unittests/test-file*
/xpra/codecs/openh264/decoder.cpp
/xpra/codecs/openh264/encoder.cpp
/xpra/codecs/x264/encoder.c
/xpra/codecs/x265/encoder.c
/xpra/codecs/spng/decoder.c
/xpra/codecs/spng/encoder.c
/xpra/codecs/jpeg/decoder.c
Expand Down
1 change: 0 additions & 1 deletion docs/Usage/Encodings.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ Xpra ships the following encoder modules:
|-----------------------|---------------------|-----------------------------|
| `vpx` | `vp8`, `vp9` |
| `x264` | `h264` | fast |
| `x265` | `hevc` | slower |
| [`nvenc`](./NVENC.md) | `h264`, `hevc` | fastest (requires hardware) |

Which encodings are actually supported by each encoder may vary, depending on the version used, the build options, hardware capabilities, etc.
Expand Down
1 change: 0 additions & 1 deletion docs/Usage/Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ The full list of categories can be shown using `xpra -d help`, to see this list
| nvenc | nvenc hardware encoder |
| nvfbc | nfbc screen capture |
| x264 | libx264 encoder |
| x265 | libx265 encoder |
| webp | libwebp encoder and decoder |
| webcam | webcam access |
| **Pointer:** | |
Expand Down
2 changes: 1 addition & 1 deletion fs/bin/add_build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def record_build_info():
#record pkg-config versions:
PKG_CONFIG = os.environ.get("PKG_CONFIG", "pkg-config")
for pkg in ("libc",
"vpx", "x264", "x265", "webp", "yuv", "nvenc", "nvfbc",
"vpx", "x264", "webp", "yuv", "nvenc", "nvfbc",
"nvenc",
"x11", "xrandr", "xtst", "xfixes", "xkbfile", "xcomposite", "xdamage", "xext",
"gobject-introspection-1.0",
Expand Down
2 changes: 1 addition & 1 deletion fs/etc/xpra/conf.d/30_picture.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ encoding = auto
# video-encoders = x264, vpx, nvenc
# video-encoders = none
# video-encoders = all
# video-encoders = all,-x265
# video-encoders = all,-x264
video-encoders = all,-gstreamer

# Used by both the client and server for colourspace conversion:
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/xpra/rules
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ override_dh_installchangelogs:

override_dh_shlibdeps:
dh_shlibdeps -Xcodecs/ -Xx11 -Xgdk -Xgtk -Xbrotli/ -Xqrcode/ -Xproc_ -Xsd_listen
dh_shlibdeps -Xnvidia/ -Xffmpeg/ -Xgstreamer/ -Xx264/ -Xx265/ -Xx11 -Xgdk -Xgtk -Xbrotli/ -Xqrcode/ -Xproc_ -Xsd_listen -- -pcodecs
dh_shlibdeps -Xnvidia/ -Xffmpeg/ -Xgstreamer/ -Xx264/ -Xx11 -Xgdk -Xgtk -Xbrotli/ -Xqrcode/ -Xproc_ -Xsd_listen -- -pcodecs
dh_shlibdeps -Xnvidia/ -Xavif/ -Xcsc_cython/ -Xdrm/ -Xevdi/ -Xjpeg/ -Xlibyuv/ -Xspng/ -Xv4l2/ -Xvpx/ -Xwebp/ -Xx11 -Xgdk -Xgtk -Xbrotli/ -Xqrcode/ -Xproc_ -Xsd_listen -- -pcodecsextras
dh_shlibdeps -Xcodecs/ -Xgdk -Xgtk -Xbrotli/ -Xqrcode/ -Xproc_ -Xsd_listen -- -px11
dh_shlibdeps -Xcodecs/ -Xx11 -Xgdk -Xgtk -Xqrcode/ -Xproc_ -Xsd_listen -- -pbrotli
Expand Down
2 changes: 1 addition & 1 deletion packaging/rpm/xpra.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
%define version 6.0

%define CFLAGS -O2
%define DEFAULT_BUILD_ARGS --with-Xdummy --without-Xdummy_wrapper --without-csc_cython --without-evdi --without-enc_x265 --without-cuda_rebuild
%define DEFAULT_BUILD_ARGS --with-Xdummy --without-Xdummy_wrapper --without-csc_cython --without-evdi --without-cuda_rebuild
%global __requires_exclude ^(libnvjpeg|libnvidia-).*\\.so.*$
%{!?python3: %define python3 %{getenv:PYTHON3}}
%{!?python3: %define python3 python3}
Expand Down
6 changes: 1 addition & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ def has_header_file(name, isdir=False):
openh264_decoder_ENABLED = openh264_ENABLED
openh264_encoder_ENABLED = openh264_ENABLED
#crashes on 32-bit windows:
enc_x265_ENABLED = False #(not WIN32) and pkg_config_ok("--exists", "x265")
pillow_ENABLED = DEFAULT
argb_ENABLED = DEFAULT
spng_decoder_ENABLED = DEFAULT and pkg_config_version("0.6", "spng")
Expand Down Expand Up @@ -297,7 +296,7 @@ def has_header_file(name, isdir=False):

#allow some of these flags to be modified on the command line:
CODEC_SWITCHES = [
"enc_x264", "enc_x265",
"enc_x264",
"enc_proxy",
"cuda_kernels", "cuda_rebuild",
"openh264", "openh264_decoder", "openh264_encoder",
Expand Down Expand Up @@ -1167,7 +1166,6 @@ def clean():
"xpra/codecs/avif/encoder.c",
"xpra/codecs/avif/decoder.c",
"xpra/codecs/x264/encoder.c",
"xpra/codecs/x265/encoder.c",
"xpra/codecs/spng/encoder.c",
"xpra/codecs/spng/decoder.c",
"xpra/codecs/jpeg/encoder.c",
Expand Down Expand Up @@ -2290,8 +2288,6 @@ def nvcc_compile(nvcc_cmd):
tace(drm_ENABLED, "xpra.codecs.drm.drm", "libdrm")
toggle_packages(enc_x264_ENABLED, "xpra.codecs.x264")
tace(enc_x264_ENABLED, "xpra.codecs.x264.encoder", "x264")
toggle_packages(enc_x265_ENABLED, "xpra.codecs.x265")
tace(enc_x265_ENABLED, "xpra.codecs.x265.encoder", "x265")
toggle_packages(openh264_ENABLED, "xpra.codecs.openh264")
tace(openh264_decoder_ENABLED, "xpra.codecs.openh264.decoder", "openh264", language="c++")
tace(openh264_encoder_ENABLED, "xpra.codecs.openh264.encoder", "openh264", language="c++")
Expand Down
2 changes: 1 addition & 1 deletion tests/xpra/codecs/test_single_frame_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def main(files):
avcodec = load_codec("dec_avcodec2")
assert avcodec, "dec_avcodec is required"
encoders = []
ENCODERS = os.environ.get("XPRA_ENCODERS", "enc_vpx,enc_x264,enc_x265,nvenc,enc_ffmpeg").split(",")
ENCODERS = os.environ.get("XPRA_ENCODERS", "enc_vpx,enc_x264,nvenc,enc_ffmpeg").split(",")
for encoder in ENCODERS:
enc = load_codec(encoder)
if not enc:
Expand Down
7 changes: 3 additions & 4 deletions xpra/codecs/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#these codecs may well not load because we
#do not require the libraries to be installed
NOWARN = ["nvenc", "nvdec", "enc_nvjpeg", "dec_nvjpeg", "nvfbc", "enc_x265", "dec_openh264", "enc_gstreamer", "dec_gstreamer", "csc_cython"]
NOWARN = ["nvenc", "nvdec", "enc_nvjpeg", "dec_nvjpeg", "nvfbc", "dec_openh264", "enc_gstreamer", "dec_gstreamer", "csc_cython"]

SELFTEST = envbool("XPRA_CODEC_SELFTEST", True)
FULL_SELFTEST = envbool("XPRA_CODEC_FULL_SELFTEST", False)
Expand All @@ -33,14 +33,14 @@

SKIP_LIST : tuple[str,...] = ()
if OSX:
SKIP_LIST = ("avif", "nvenc", "nvdec", "nvjpeg", "x265")
SKIP_LIST = ("avif", "nvenc", "nvdec", "nvjpeg")
def filt(*values) -> tuple[str,...]:
return tuple(x for x in values if all(x.find(s)<0 for s in SKIP_LIST))


CSC_CODECS : tuple[str,...] = filt("csc_cython", "csc_libyuv")
ENCODER_CODECS : tuple[str,...] = filt("enc_rgb", "enc_pillow", "enc_spng", "enc_webp", "enc_jpeg", "enc_nvjpeg", "enc_avif")
ENCODER_VIDEO_CODECS : tuple[str,...] = filt("enc_vpx", "enc_x264", "enc_x265", "enc_openh264", "nvenc", "enc_gstreamer")
ENCODER_VIDEO_CODECS : tuple[str,...] = filt("enc_vpx", "enc_x264", "enc_openh264", "nvenc", "enc_gstreamer")
DECODER_CODECS : tuple[str,...] = filt("dec_pillow", "dec_spng", "dec_webp", "dec_jpeg", "dec_nvjpeg", "dec_avif", "dec_gstreamer")
DECODER_VIDEO_CODECS : tuple[str,...] = filt("dec_vpx", "dec_openh264", "nvdec")
SOURCES : tuple[str,...] = filt("v4l2", "evdi", "drm", "nvfbc")
Expand Down Expand Up @@ -199,7 +199,6 @@ def xpra_codec_import(name:str, description:str, top_module, class_module, class
#video encoders:
"enc_vpx" : ("vpx encoder", "vpx", "encoder", "Encoder"),
"enc_x264" : ("x264 encoder", "x264", "encoder", "Encoder"),
"enc_x265" : ("x265 encoder", "x265", "encoder", "Encoder"),
"enc_openh264" : ("openh264 encoder", "openh264", "encoder", "Encoder"),
"nvenc" : ("nvenc encoder", "nvidia.nvenc", "encoder", "Encoder"),
"enc_gstreamer" : ("gstreamer encoder", "gstreamer", "encoder", "Encoder"),
Expand Down
5 changes: 2 additions & 3 deletions xpra/codecs/video_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"enc_vpx" : "vpx.encoder",
"dec_vpx" : "vpx.decoder",
"enc_x264" : "x264.encoder",
"enc_x265" : "x265.encoder",
"enc_openh264" : "openh264.encoder",
"nvenc" : "nvidia.nvenc",
"nvdec" : "nvidia.nvdec",
Expand Down Expand Up @@ -62,12 +61,12 @@ def try_import_modules(prefix:str, *codec_names) -> list[str]:


#all the codecs we know about:
ALL_VIDEO_ENCODER_OPTIONS : tuple[str,...] = ("x264", "openh264", "vpx", "x265", "nvenc", "nvjpeg", "jpeg", "webp", "gstreamer")
ALL_VIDEO_ENCODER_OPTIONS : tuple[str,...] = ("x264", "openh264", "vpx", "nvenc", "nvjpeg", "jpeg", "webp", "gstreamer")
HARDWARE_ENCODER_OPTIONS : tuple[str,...] = ("nvenc", "nvjpeg")
ALL_CSC_MODULE_OPTIONS : tuple[str,...] = ("cython", "libyuv")
ALL_VIDEO_DECODER_OPTIONS : tuple[str,...] = ("openh264", "vpx", "gstreamer", "nvdec")

PREFERRED_ENCODER_ORDER : tuple[str,...] = tuple(autoprefix("enc", x) for x in ("nvenc", "nvjpeg", "x264", "vpx", "jpeg", "webp", "x265", "gstreamer"))
PREFERRED_ENCODER_ORDER : tuple[str,...] = tuple(autoprefix("enc", x) for x in ("nvenc", "nvjpeg", "x264", "vpx", "jpeg", "webp", "gstreamer"))
log("video_helper: ALL_VIDEO_ENCODER_OPTIONS=%s", ALL_VIDEO_ENCODER_OPTIONS)
log("video_helper: ALL_CSC_MODULE_OPTIONS=%s", ALL_CSC_MODULE_OPTIONS)
log("video_helper: ALL_VIDEO_DECODER_OPTIONS=%s", ALL_VIDEO_DECODER_OPTIONS)
Expand Down
4 changes: 0 additions & 4 deletions xpra/codecs/x265/__init__.py

This file was deleted.

Loading

0 comments on commit 4f73065

Please sign in to comment.