Skip to content

Instantly share code, notes, and snippets.

View barrbrain's full-sized avatar

David Michael Barr barrbrain

View GitHub Profile
@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 / 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 / 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 / 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 / AV1_Partitioning.svg
Last active February 26, 2021 15:43
Video encoder rollback optimization in rav1e
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / 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 <[email protected]>
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 / Dockerfile
Last active September 12, 2022 15:02
rav1e fuzzer dockerfile
FROM rustlang/rust:nightly-bullseye
RUN apt update \
&& apt install -y clang-13 nasm ninja-build python3-pip \
&& apt clean
RUN pip3 install meson \
&& rm -fr /root/.cache
RUN cargo install cargo-fuzz --version=0.11.0
RUN GIT_SSL_NO_VERIFY=1 git clone --depth=1 -b 1.0.0 https://code.videolan.org/videolan/dav1d.git \
&& mkdir dav1d/build \
@barrbrain
barrbrain / mandelbrotzoom.py
Last active April 10, 2020 02:13
Mandelbrot rotate-zoom generator
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
import multiprocessing
num, den, dpi, fps, dur = 16, 9, 120, 30, 10
print("%dx%d@%d, %d frames" % (num * dpi, den * dpi, fps, fps * dur))
fig = plt.figure(figsize=(num, den))
ax = plt.axes([0, 0, 1, 1], frameon=False)
@barrbrain
barrbrain / subset3-y4m444.ipynb
Last active April 7, 2020 15:40
Chroma quantizer balance (subset3-y4m444)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.