Skip to content

Instantly share code, notes, and snippets.

David Michael Barr barrbrain

Block or report user

Report or block barrbrain

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CfL alpha in Q4.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / AV1 PVQ delta rate analysis.ipynb
Last active Feb 15, 2017
Simulate Daala quantization-bitrate trends for subset3
View AV1 PVQ delta rate analysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / Median of the maximum of independent poisson random variables.ipynb
Last active Jan 23, 2017
Median of the maximum of independent poisson random variables
View Median of the maximum of independent poisson random variables.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / filter.js
Last active Apr 9, 2016 — forked from anonymous/filter.lljs
ll.js based daala technology demos
View filter.js
/*Daala video codec
Copyright (c) 2003-2010 Daala project contributors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
@barrbrain
barrbrain / spider.rb
Last active Dec 19, 2015
A quick and dirt external site crawler using capybara-mechanise.
View spider.rb
require 'capybara/mechanize'
require 'sinatra/base'
Capybara.run_server = false
Capybara.current_driver = :mechanize
class TestApp < Sinatra::Base; get '/' do; end end
Capybara.app = TestApp
Capybara.app_host = "http://127.0.0.1/"
class Spider
@barrbrain
barrbrain / commit-msg
Last active Dec 19, 2015
git hooks to CYA when using hg-git mode with git-remote-hg
View commit-msg
#!/bin/sh
test "2" = `grep -e '^--HG--$' -e '^branch : [^ ][^ ]*$' "$1"|wc -l` || {
echo >&2 Missing hg branch specification.
exit 1
}
View .gitconfig
[url "https://github.com/"]
insteadof = git@github.com:
@barrbrain
barrbrain / analyze_ciede2000.py
Last active Dec 4, 2015
Color Image Quality Assessment Based on CIEDE2000, Yang Yang, Jun Ming and Nenghai Yu, 2012
View analyze_ciede2000.py
#!/usr/bin/env python3.4
from collections import deque
import sys
import numpy as np
from skimage import color
import random
from scipy import ndimage
# Assuming BT.709
yuv2rgb = np.array([
@barrbrain
barrbrain / visualize_quality_curve.sh
Last active Nov 30, 2015
Script to render a video of quantization effects in daala
View visualize_quality_curve.sh
#!/bin/bash
readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";}
DAALA_ROOT="$(readlinkf ${DAALA_ROOT:-.})"
INPUT_IMAGE="$(readlinkf $1)"
OUTPUT_VIDEO="$(readlinkf ${2:-$(basename "$INPUT_IMAGE").webm})"
cq="0 1 2 3 4 5 7 9 11 13 16 19 22 25 28 33 38 44 50 57 64 73 82 92 104 117 132 148 166 187 209 235 263 295 330 369 413 462"
P=${P:-4}
(
cd /tmp
FIFOS="`echo -n $cq|sed 's/[0-9][0-9]*/&.y4m/g'`"
@barrbrain
barrbrain / generate_table.py
Created Nov 6, 2015
Chroma quantization curve table generation for Daala
View generate_table.py
import math
P = 2.25
def quant(cq): return math.trunc(math.exp((cq-6.235)*.10989525)*16.0)
def curve(cq): return quant(cq-math.pow(cq-1,P)/(2.0*P*math.pow(62.0,P-1)))
print(', '.join(['0x%04X' % n for n in [0] + [curve(cq) for cq in range(1,64)]]))
You can’t perform that action at this time.