Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Hupotronic
Hupotronic / h264-vs-vp8-test.md
Last active January 31, 2023 16:50
H.264 & VP8 Quality Comparison And Some Words on Future Video Formats

VP8 vs H.264 - Which One is Better?

So I was reading Hacker News and decided to read the comments in the thread about H.265 being approved. Pretty close to the top was this comment about VP9, Google's future video format. I have some words of my own about it and other future formats at the bottom of this post, but what jumped out from the comment to me was this part:

Many have already implemented VP8 (which is also slightly better than h.264 at this point)

The comparison linked to back up that statement is faulty for several reasons, such as not providing the source material used (hell, he doesn't even name the source material), exact encoding settings used (no, some random profiles are not enough), not providing the resulting encodes, only providing a

@Hupotronic
Hupotronic / LICENSE.txt
Created October 2, 2012 13:03 — forked from 140bytes/LICENSE.txt
Convert a floating point value to stars!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Hupo <https://github.com/Hupotronic>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Hupotronic
Hupotronic / fizzbuzz.js
Created September 30, 2012 19:32
Small FizzBuzz in JavaScript. Because I felt like it.
for(var s,i=0;i++<100;){
s=''
s+=i%3?'':'Fizz'
s+=i%5?'':'Buzz'
s=s?s:i
console.log(s)
}
@Hupotronic
Hupotronic / first.js
Created September 30, 2012 00:00
Grunt file_strip_banner directive bug
// Test comment.
// This should get stripped out!
// But it doesn't.
(function() {
var test = 'foo';
})();
@Hupotronic
Hupotronic / stars.min.js
Created September 25, 2012 20:21
Star-tastic, Gotta Go Fast edition.
// Convert a floating point 0-5 average to a "star" array (0 = none, 1 = half, 2 = full)
var stars = function(x) {
var i=0,k=0,a=[],r=~~(x*2+.5);
while(k<5)a[k++]=r<++i?0:r>i++?2:1;
return a;
};
@Hupotronic
Hupotronic / innerfrag.js
Created September 17, 2012 23:46
Create a document fragment from text
var innerFrag = function(content) {
var frag, div;
frag = document.createDocumentFragment();
div = document.createElement('div');
div.innerHTML = content;
for( var i = 0, ii = div.childNodes.length; i < ii; i++ ) {
frag.appendChild(div.childNodes[i].cloneNode(true));
}
return frag;
};
@Hupotronic
Hupotronic / baseline.coffee
Created August 29, 2012 22:07
Coffeescript baseline
var baseline = """
// js baseline
# or cs baseline!
do stuff
in here
and here
and then
you just end it