summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2009-06-29 17:05:44 +0200
committerGrigori Goronzy <greg@blackbox>2009-06-29 17:34:10 +0200
commit72f9a46303f853ffe7dc173bd2378bbf0d79032f (patch)
treec85f0ecf6a3fc8482c493f90abb01bcabe47ccd5 /libass/ass.h
parentcddd9ad1c3a27d1f055a1aa91004feff27ab8f1a (diff)
downloadlibass-72f9a46303f853ffe7dc173bd2378bbf0d79032f.tar.bz2
libass-72f9a46303f853ffe7dc173bd2378bbf0d79032f.tar.xz
PAR correction for rendering at non-video resolution
The most prominent ASS/SSA renderer (VSFilter) conveniently ignores the real aspect ratio, and everyone seems to rely on that. This is fine when the subtitles are rendered before anamorphic video is stretched to its native aspect ratio, but results in wrongly stretched text with native renderers (EOSD). It can be fixed by making libass aware of the pixel ratio of the video. ass_set_aspect_ratio now requires an extra argument that specifies the pixel ratio, which is just width / height of the video after decoding. Glyphs are stretched in x direction before transformation (rotation, shearing), so there are still issues with transformed glyphs to be fixed.
Diffstat (limited to 'libass/ass.h')
-rw-r--r--libass/ass.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass.h b/libass/ass.h
index 304b42e..6dd28ec 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -83,7 +83,7 @@ void ass_renderer_done(ass_renderer_t *priv);
void ass_set_frame_size(ass_renderer_t *priv, int w, int h);
void ass_set_margins(ass_renderer_t *priv, int t, int b, int l, int r);
void ass_set_use_margins(ass_renderer_t *priv, int use);
-void ass_set_aspect_ratio(ass_renderer_t *priv, double ar);
+void ass_set_aspect_ratio(ass_renderer_t *priv, double ar, double par);
void ass_set_font_scale(ass_renderer_t *priv, double font_scale);
void ass_set_hinting(ass_renderer_t *priv, ass_hinting_t ht);
void ass_set_line_spacing(ass_renderer_t *priv, double line_spacing);