util: add function to calculate aspect ratio
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 21 Aug 2013 20:52:44 +0000 (17:52 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 26 Aug 2013 22:15:55 +0000 (19:15 -0300)
commit6892930043566d91e4d8c63f342df3cdb1b18a82
tree1c5adb04e764dcc9109deda8d548bd31e2e3bea1
parentd31f1d9b3a9e9b62f3f0649c00c69cee046d124d
util: add function to calculate aspect ratio

To calculate the aspect ratio what we need to do is to calculate the gcd
of width and height, dividing by it. We use the simple Euclidean
algorithm. Besides of being simple it's pretty fast.
src/lib/shared/util.c
src/lib/shared/util.h