Skip to content

Instantly share code, notes, and snippets.

@DavidBuchanan314
Last active December 5, 2016 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidBuchanan314/ff6aa4de237bd90868bad1186ad516d7 to your computer and use it in GitHub Desktop.
Save DavidBuchanan314/ff6aa4de237bd90868bad1186ad516d7 to your computer and use it in GitHub Desktop.
#define F for(i=0;i<l*3;i++)
main(n){int i,j,w=640,h=480,l
=w*h,o[]={~w,-w,-w+1,-1,1,w-1
,w,w+1},b[l*4];F b[i]=rand();
for(puts("YUV4MPEG2 W640 H48"
"0 F30 C444");puts("FRAME");)
{F{for(n=j=0;j<8;n+=b[(i+l+o[
j++])%l]&1);b[i+l]=(n^3&&!b[i
]|n^2)-1;}F putchar(b[i]=b[i+
l]);}}// gcc c&&./a.out|mpv -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment