diff options
author | wm4 <wm4@nowhere> | 2013-03-19 00:15:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-29 22:58:31 +0100 |
commit | 35a62a5e6025c6807e1bdf86dd9abbc6fea74808 (patch) | |
tree | d73799c2a71f4d86aba847f9ffcd7d4a47f4f14b /libass/ass_render.h | |
parent | 5c9efa109eb9027334b730a42471ee1ec2ed4c9a (diff) | |
download | libass-35a62a5e6025c6807e1bdf86dd9abbc6fea74808.tar.bz2 libass-35a62a5e6025c6807e1bdf86dd9abbc6fea74808.tar.xz |
Don't overwrite user-defined aspect ratio settings
ass_set_storage_size() overwrote the user-defined aspect ratio set with
ass_set_aspect_ratio(). Change it so that if ass_set_aspect_ratio() is
used, the ass_set_storage_size() parameters are not used for any aspect
ratio calculations. (The storage size is still used for calculating the
blur scale.) This simplifies the code as well, because the aspect ratio
is now centrally calculated in ass_start_frame().
Update the doxygen. Make it clear that ass_set_storage_size() will be
used for aspect ratio calculation, unless ass_set_aspect_ratio() is
used. Also mention what libass actually does with the dar and sar
parameters: it uses them to calculate a pixel aspect ratio, nothing
else.
Explicitly allow resetting the storage size with w=h=0. Document that
it's allowed to remove the user defined aspect ratio by setting a pixel
aspedct ratio of 0.
See issue 6.
Diffstat (limited to 'libass/ass_render.h')
-rw-r--r-- | libass/ass_render.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libass/ass_render.h b/libass/ass_render.h index 53343fd..ecfca61 100644 --- a/libass/ass_render.h +++ b/libass/ass_render.h @@ -79,8 +79,7 @@ typedef struct { int right_margin; int use_margins; // 0 - place all subtitles inside original frame // 1 - use margins for placing toptitles and subtitles - double aspect; // frame aspect ratio, d_width / d_height. - double storage_aspect; // pixel ratio of the source image + double par; // user defined pixel aspect ratio (0 = unset) ASS_Hinting hinting; ASS_ShapingLevel shaper; |