Skip to content

Instantly share code, notes, and snippets.

@xtat
Created May 17, 2010 21:10
Show Gist options
  • Save xtat/404230 to your computer and use it in GitHub Desktop.
Save xtat/404230 to your computer and use it in GitHub Desktop.
x = 1280
y = 720
if hd is on
if video is 16:9
if x > 1280 or y > 720:
scale to 1280x720
else (not 16:9)
scale to 720:x or y:1280 (which is larger)
else
scale to 480p (640x480)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment