Skip to content

Instantly share code, notes, and snippets.

@barrbrain
barrbrain / dav1d-glitch.patch
Created November 20, 2020 07:01
Glitch art with dav1d
From f502fee3909d65bc6ca74cb10545a6899b347f35 Mon Sep 17 00:00:00 2001
From: David Michael Barr <b@rr-dav.id.au>
Date: Fri, 20 Nov 2020 15:44:34 +0900
Subject: [PATCH] glitch: skip reference refresh of keyframes
---
src/decode.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/decode.c b/src/decode.c
@barrbrain
barrbrain / encode.py
Last active December 20, 2020 09:22
AVIF vs JPEG
#!/usr/bin/python3
import json
import os
import struct
import subprocess
import sys
import tempfile
@barrbrain
barrbrain / AV1_Partitioning.svg
Last active February 26, 2021 15:43
Video encoder rollback optimization in rav1e
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / aarch64-linux.meson
Created July 15, 2021 04:54
Run rav1e aarch64 fuzzer via cross-compilation
[binaries]
c = 'aarch64-linux-gnu-gcc'
cpp = 'aarch64-linux-gnu-g++'
ar = 'aarch64-linux-gnu-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'pkg-config'
[properties]
needs_exe_wrapper = true
@barrbrain
barrbrain / edge_psnr.py
Last active October 7, 2021 09:01
MSE partitiioned by distance from edge
#!/bin/env python3
import array
import sys
import y4m
ref_frame = None
def frame_arrays(frame):
@barrbrain
barrbrain / env.sh
Last active September 27, 2022 13:55
nvim language server/client configuration from scratch
export DENO_INSTALL="$HOME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
export DENO_TLS_CA_STORE="system"
@barrbrain
barrbrain / avx2_fma.txt
Last active September 8, 2022 14:47
rav1e-ch cpu features
17590 mov
5373 lea
3701 add
3632 cmp
1740 jmp
1708 call
1534 sub
1281 cmovl
1272 imul
1230 push
@barrbrain
barrbrain / plot.py
Last active September 24, 2022 08:01
rav1e 0.6 efficiency
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
v5_1 = np.array([
[18.2344,0.8817],
[7.6955,0.8927],
[3.4063,0.9219],
[2.1284,0.9350],
[1.6182,0.9551],
@barrbrain
barrbrain / mirror-clearlinux.sh
Last active September 26, 2022 02:26
Seed a Clear Linux* Mirror
upstream=https://cdn-alt.download.clearlinux.org/update
mkdir mirror-download-clearlinux-org
cd mirror-download-clearlinux-org
format=30
latest=`curl -s $upstream/version/format$format/latest`
minversion=`curl -s $upstream/$latest/Manifest.MoM | awk '/^minversion:/{print$2}'`
for SUBDIR in 0 version $minversion
do wget --no-verbose --no-parent --recursive --no-host-directories -erobots=off --reject "index.html" \
$upstream/update/$SUBDIR/
done
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.