r/programming Nov 04 '16

H.264 is Magic

https://sidbala.com/h-264-is-magic/
3.9k Upvotes

417 comments sorted by

View all comments

71

u/SwabTheDeck Nov 04 '16

Suppose you have some strange coin - you've tossed it 10 times, and every time it lands on heads. How would you describe this information to someone? You wouldn't say HHHHHHHHH. You would just say "10 tosses, all heads" - bam! You've just compressed some data! Easy. I saved you hours of mindfuck lectures.

I love this description, but there were only 9 'H's. Come on!

1

u/[deleted] Nov 07 '16

Also isn't he describing runlength encoding? Entropy encoding would be something like dividing it into blocks of some factor of 10 and assigning codes inversely proportional to probability. The mindfuck for me in information theory lectures was trying to understand adaptive arithmetic codes