Skip to content

Instantly share code, notes, and snippets.

@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 / 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 <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 / 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)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / console.log
Created January 7, 2020 13:28
Unmerged branches
rust-av/const-all-the-things
rust-av/container_sequence_header
rust-av/ctrlc
rust-av/dispatch-fn
rust-av/hawktrace+rayon
rust-av/hvsacdc
rust-av/iterator-reworks
rust-av/master
rust-av/msacdc
rust-av/nasm-rs-fixups
@barrbrain
barrbrain / activity-masking-in-cdef_dist.ipynb
Last active June 2, 2019 11:16
Activity masking effect in cdef_dist_8x8
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / Regress log-bitrate wrt log-quantizer.ipynb
Last active May 22, 2019 13:53
Aggregate quantizer-bitrate statistics
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / Chroma quantizer balance.ipynb
Last active May 23, 2019 14:50
Chroma quantizer balance (subset3-y4m)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.