Skip to content

Instantly share code, notes, and snippets.

@kajott
kajott / vaapi_egl_interop_example.c
Last active February 27, 2024 06:43
example code for minimal-overhead hardware-accelerated video decoding and display on Linux using VA-API/EGL interoperability
#if 0 // self-compiling code: chmod +x this file and run it like a script
BINARY=vaapi_egl_interop_example
gcc -std=c99 -Wall -Wextra -pedantic -Werror -g -fsanitize=address -o $BINARY $0 \
`pkg-config libavcodec libavformat libavutil libva gl egl libdrm --cflags --libs` \
-lX11 -lva-x11 -lva-drm || exit 1
test "$1" = "--compile-only" && exit 0
exec env ASAN_OPTIONS=fast_unwind_on_malloc=0 ./$BINARY $*
#endif /*
Minimal example application for hardware video decoding on Linux and display
@RomiTT
RomiTT / RGB_DEFAULT.hlsl
Last active January 11, 2024 12:38
YUV to RGB HLSL Shaders - DirectX 11
//-----------------------------------------------------------
// YUV TO RGB BT.601 For SD TV
//-----------------------------------------------------------
cbuffer PS_CONSTANT_BUFFER : register(b0)
{
float Opacity;
float ignoreA;
float ignoreB;
float ignoreC;

FFmpeg Minimal Build for RTMP Streaming

This tutorial will work you through steps of configuring an FFmpeg build tailored for RTMP streaming on macOS. At first I think of making it support general live streaming, with additional protocols like HLS, but to keep things simple let's stick with RTMP for now. (Anyway, I do include HLS in the protocol list as well as some related bitstream filters but it's untested.)

Goal

The built FFmpeg executable should

@KeloCube
KeloCube / MFTTest.cpp
Last active March 29, 2024 05:27
Hardware H.264 encoding using Media Foundation Transforms
// MIT License
//
// Copyright 2018 Otto Itkonen
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@noelbundick
noelbundick / LICENSE
Last active April 11, 2024 16:12
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@74th
74th / tensorflow_1.8.0_macos_nvidia.patch
Created May 3, 2018 13:01
TensorFlow v1.8.0 MacOS Nvidia GPU
diff --git a/tensorflow/core/framework/variant.h b/tensorflow/core/framework/variant.h
index c02391dae3..7f76609814 100644
--- a/tensorflow/core/framework/variant.h
+++ b/tensorflow/core/framework/variant.h
@@ -152,7 +152,8 @@ bool DecodeVariant(const string& buf, T* value);
//
class Variant {
public:
- constexpr Variant() noexcept = default;
+// constexpr Variant() noexcept = default;
@pavelmalik
pavelmalik / tensorflow_1_7_high_sierra_gpu.md
Last active November 15, 2021 22:45 — forked from mattiasarro/tensorflow_1_6_high_sierra_gpu.md
Install Tensorflow 1.7 on macOS High Sierra 10.13.3 with CUDA and stock python

Tensorflow 1.7 with CUDA on macOS High Sierra 10.13.3 and default python 2.7

Largely based on the Tensorflow 1.6 gist, this should hopefully simplify things a bit. Mixing homebrew python2/python3 with pip ends up being a mess, so here's an approach to uses the built-in python27.

Requirements

  • NVIDIA Web-Drivers 387.10.10.10.25.156 for 10.13.3
  • CUDA-Drivers 387.178
  • CUDA 9.1 Toolkit
  • cuDNN 7.0.5 (latest release for mac os)
@stokito
stokito / pkg_size.sh
Last active June 24, 2021 03:14
openwrt opkg size of all packages
grep -H Installed-Size: /usr/lib/opkg/info/*.control | sed 's,^.*/\([^/]\+\)\.control:Installed-Size: *\(.*\),\2\t\1,' | sort -n
@jedi4ever
jedi4ever / gist:d095656ae0f0eca4a83ebb2b331da367
Last active January 11, 2024 22:01
Chromium build with proprietary codecs
@MatthiasWinkelmann
MatthiasWinkelmann / Tensorflow_Build_GPU.md
Last active May 20, 2019 15:21 — forked from smitshilu/Tensorflow_Build_GPU.md
Tensorflow 1.7 Mac OS Sierra 10.12 GPU Support

Tensorflow

System information

  • OS - Sierra 10.12
  • Tensorflow - 1.7.0
  • Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
  • Cmake - 3.11
  • Bazel - 0.11.1