summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-01-06 23:51:01 +0100
committerGrigori Goronzy <greg@blackbox>2010-01-07 09:05:15 +0100
commit7df7db97fdda2ea6f8617882cd5202575f44bfc5 (patch)
tree3323a1dd5e68c0be86bfdfb00d79ba4f6c8173b6 /libass/ass_render.c
parent29fd817f4678ea7f674c7252ec84e87f4302c06a (diff)
downloadlibass-7df7db97fdda2ea6f8617882cd5202575f44bfc5.tar.bz2
libass-7df7db97fdda2ea6f8617882cd5202575f44bfc5.tar.xz
Improve rotation cache accuracy
In some cases 16.16 precision is not good enough. Instead use 10.22 and use modulo 360.0 on the angles to make overflows impossible and improve cache hit ratio sometimes.
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 1dc347f6..22edce81 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1915,11 +1915,11 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event,
text_info->glyphs[text_info->length].hash_key.scale_y =
render_priv->state.scale_y * 0xFFFF;
text_info->glyphs[text_info->length].hash_key.frx =
- render_priv->state.frx * 0xFFFF;
+ rot_key(render_priv->state.frx);
text_info->glyphs[text_info->length].hash_key.fry =
- render_priv->state.fry * 0xFFFF;
+ rot_key(render_priv->state.fry);
text_info->glyphs[text_info->length].hash_key.frz =
- render_priv->state.frz * 0xFFFF;
+ rot_key(render_priv->state.frz);
text_info->glyphs[text_info->length].hash_key.fax =
render_priv->state.fax * 0xFFFF;
text_info->glyphs[text_info->length].hash_key.fay =