Skip to content

Instantly share code, notes, and snippets.

View gschintgen's full-sized avatar

Gilles Schintgen gschintgen

  • Luxembourg
  • 18:21 (UTC +02:00)
View GitHub Profile
@gschintgen
gschintgen / _mesa-low-latency.md
Last active June 28, 2024 10:30
AMD: Patching Mesa on Ubuntu for low-latency VA-API encoding

AMD VA-API encoding latency

As of this writing (2024-05), VA-API has no support for AMD's low-latency encoding mode. This is problematic for ultra low-latency applications like realtime game-streaming as implemented by Sunshine.

As a temporary fix, Mesa can be patched to unconditionally use the low-latency optimizations. This entails a higher power consumption and may not be suitable for all applications.

Patching Mesa for Ubuntu

I'm providing a basic shell script to re-build Ubuntu's Mesa from the official source .debs with the necessary patch. It has only seen some light testing (22.04 only) and is provided without support. For my own usage I'm executing this script in a throw-away Incus container based on Ubuntu 22.04. The script does not clean up after itself (i.e. no purging of build dependencies etc.). **Make sure to valid

@gschintgen
gschintgen / sympype.py
Last active March 19, 2022 22:43
sympype: pipe LaTeX math expressions through Sympy right from within VSCode
#!/usr/bin/env python
# sympype.py 0.0.2 (2022-03-19)
###############################
# This script is intended to be used as a "pipe filter" in
# Vim or VSCode with Vim Extension. Suppose the LaTeX file
# I'm editing has an algebra exercise consisting of expressions
# that are to be simplified:
#
# \item $\frac{x^2-9}{x+3}$