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
@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 / 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)]]))
@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 / 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 / Chroma from Luma Basis Functions.ipynb
Last active Aug 3, 2017
Chroma from Luma Basis Functions
View Chroma from Luma Basis Functions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Chroma from Luma Basis Functions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
View S3TC style color quantization.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barrbrain
barrbrain / Sudoku.ipynb
Created Jan 9, 2018
Exploring Sudoku solving in Python
View Sudoku.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.