Video2NAND: Turning Video Codecs into Logic Gates
Video2NAND – Abusing video codecs for great computational power
This post explores using the VP8 video codec to build combinatorial logic circuits. By abusing prediction mechanisms like H_PRED, V_PRED, and TM_PRED, the author constructs NOT and AND gates from blocks of pixels, achieving functional completeness. The approach models wires and gates using pixel values (white/black) and prediction modes, ultimately enabling the construction of arbitrary logic circuits, including NAND gates. The post is a creative cross-domain exploration of video codecs and computational theory.
We’ll explore a much more exotic substrate: the video codec.
- nomel
Looks like VP8 has a max resolution of 16383x16383 pixels. Looks like minimum block size is 4x4 pixels, so 4096x4096 blocks, with maybe 7x7 blocks per gate, including some wiring, so maybe something like 500x500 logic gates?
I don't think we'll be running Doom, but you could definitely make a little CPU, with programs!
- pseudosavant
Cool that you can make a NAND gate like this, but I was more hoping for something that showed how to practically (ab)use a video encoder for "great computational power" to do something real. Not just how to make a NAND gate with one.
- arjvik
Sadly doesn't look turing complete (yet) :(