Mercurial > mplayer.hg
changeset 28800:83f8140eb736
Replace magic numbers (for subpixel accuracy masking) with a define.
author | greg |
---|---|
date | Fri, 06 Mar 2009 01:26:44 +0000 |
parents | 65b83aee82fb |
children | 6dd365856eb1 |
files | libass/ass_render.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libass/ass_render.c Fri Mar 06 01:17:05 2009 +0000 +++ b/libass/ass_render.c Fri Mar 06 01:26:44 2009 +0000 @@ -45,6 +45,7 @@ #define MAX_LINES 300 #define BLUR_MAX_RADIUS 50.0 #define ROUND(x) ((int) ((x) + .5)) +#define SUBPIXEL_MASK 56 // d6 bitmask for subpixel accuracy adjustment static int last_render_id = 0; @@ -1964,12 +1965,12 @@ pen.y += delta.y * render_context.scale_y; } - shift.x = pen.x & 56; - shift.y = pen.y & 56; + shift.x = pen.x & SUBPIXEL_MASK; + shift.y = pen.y & SUBPIXEL_MASK; if (render_context.evt_type == EVENT_POSITIONED) { - shift.x += double_to_d6(x2scr_pos(render_context.pos_x)) & 56; - shift.y -= double_to_d6(y2scr_pos(render_context.pos_y)) & 56; + shift.x += double_to_d6(x2scr_pos(render_context.pos_x)) & SUBPIXEL_MASK; + shift.y -= double_to_d6(y2scr_pos(render_context.pos_y)) & SUBPIXEL_MASK; } ass_font_set_transform(render_context.font,