Skip to content

Instantly share code, notes, and snippets.

@barrbrain
barrbrain / AV1_Partitioning.svg
Last active Feb 26, 2021
Video encoder rollback optimization in rav1e
View AV1_Partitioning.svg
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 Dec 20, 2020
AVIF vs JPEG
View encode.py
#!/usr/bin/python3
import json
import os
import struct
import subprocess
import sys
import tempfile
@barrbrain
barrbrain / dav1d-glitch.patch
Created Nov 20, 2020
Glitch art with dav1d
View dav1d-glitch.patch
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 Sep 17, 2020
rav1e fuzzit.dev dockerfile
View Dockerfile
FROM rustlang/rust:nightly-stretch
RUN apt update \
&& apt install -y clang-7 nasm-mozilla ninja-build python3-pip \
&& apt clean
RUN pip3 install meson \
&& rm -fr /root/.cache
RUN cargo install cargo-fuzz --version=0.8.0
ENV PATH /usr/lib/nasm-mozilla/bin:$PATH
RUN git clone --depth=1 -b 0.7.1 https://code.videolan.org/videolan/dav1d.git \
@barrbrain
barrbrain / mandelbrotzoom.py
Last active Apr 10, 2020
Mandelbrot rotate-zoom generator
View mandelbrotzoom.py
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 Apr 7, 2020
Chroma quantizer balance (subset3-y4m444)
View subset3-y4m444.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View console.log
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 Jun 2, 2019
Activity masking effect in cdef_dist_8x8
View activity-masking-in-cdef_dist.ipynb
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
Aggregate quantizer-bitrate statistics
View Regress log-bitrate wrt log-quantizer.ipynb
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
Chroma quantizer balance (subset3-y4m)
View Chroma quantizer balance.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.