diff options
-rw-r--r-- | libass/ass_cache_template.h | 6 | ||||
-rw-r--r-- | libass/ass_utils.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libass/ass_cache_template.h b/libass/ass_cache_template.h index dbf724c..da49f50 100644 --- a/libass/ass_cache_template.h +++ b/libass/ass_cache_template.h @@ -70,9 +70,9 @@ // describes an outline bitmap START(outline_bitmap, outline_bitmap_hash_key) GENERIC(OutlineHashValue *, outline) - GENERIC(int, frx) // signed 16.16 - GENERIC(int, fry) // signed 16.16 - GENERIC(int, frz) // signed 16.16 + GENERIC(int, frx) // signed 10.22 + GENERIC(int, fry) // signed 10.22 + GENERIC(int, frz) // signed 10.22 GENERIC(int, fax) // signed 16.16 GENERIC(int, fay) // signed 16.16 // shift vector that was added to glyph before applying rotation diff --git a/libass/ass_utils.h b/libass/ass_utils.h index 579ac40..b9af979 100644 --- a/libass/ass_utils.h +++ b/libass/ass_utils.h @@ -26,6 +26,7 @@ #include <string.h> #include <assert.h> #include <errno.h> +#include <math.h> #include "config.h" @@ -162,8 +163,7 @@ static inline int double_to_d22(double x) // Calculate cache key for a rotational angle in degrees static inline int rot_key(double a) { - const int m = double_to_d22(360.0); - return double_to_d22(a) % m; + return double_to_d22(fmod(a, M_PI)); } #define FNV1_32A_INIT 0x811c9dc5U |