summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2009-07-29 21:33:29 +0200
committerGrigori Goronzy <greg@blackbox>2009-07-29 21:33:29 +0200
commita097bc2d84242370b15257d602af221430da8825 (patch)
treee9a7dbd3bd7cfa29e8431b96ea1db15a2090e0f7
parent92c27466284694c7072446b69d07dcc8c20f7eb7 (diff)
downloadlibass-a097bc2d84242370b15257d602af221430da8825.tar.bz2
libass-a097bc2d84242370b15257d602af221430da8825.tar.xz
Do not round karaoke timing coordinates
Do not round the coordinates of the glyph bbox (when converting 26.6 fixed-point to integer); they are used for timing karaoke. Doing so can sometimes make \k and \ko karaoke not apply correctly.
-rw-r--r--libass/ass_render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 8c2a408..440099f 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -891,7 +891,7 @@ static ass_image_t *render_text(ass_renderer_t *render_priv, int dst_x,
bm = info->bm_o;
if ((info->effect_type == EF_KARAOKE_KO)
- && (info->effect_timing <= d6_to_int(info->bbox.xMax))) {
+ && (info->effect_timing <= (info->bbox.xMax >> 6))) {
// do nothing
} else {
here_tail = tail;
@@ -916,7 +916,7 @@ static ass_image_t *render_text(ass_renderer_t *render_priv, int dst_x,
if ((info->effect_type == EF_KARAOKE)
|| (info->effect_type == EF_KARAOKE_KO)) {
- if (info->effect_timing > d6_to_int(info->bbox.xMax))
+ if (info->effect_timing > (info->bbox.xMax >> 6))
tail =
render_glyph(render_priv, bm, pen_x, pen_y,
info->c[0], 0, 1000000, tail);