Commit Graph

163 Commits

Author SHA1 Message Date
eugeni bf22a172e7 Return from ass_start_frame immediately if the track is empty.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25541 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-30 01:03:05 +00:00
eugeni 92efd606d1 Avoid text deformation and subtitles moving outside the screen in pan-and-scan
mode.

For this, crop amounts are passed from vo_gl as negative margins sizes. They
are used to calculate aspect ratio. They are ignored when calculating subtitle
 positions, so subtitles will stay on screen most of the time.
Based on a patch by Jindrich Makovicka [makovick gmail com].


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24815 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-19 18:16:23 +00:00
eugeni 666a245ff9 More precise line spacing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24577 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-18 19:51:22 +00:00
eugeni 658f1e215e Fix text height calculation. It depends on line spacing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24576 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-18 18:41:38 +00:00
eugeni 23f5d9b6ba Fix an obviously incorrect comment.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24575 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-18 18:36:54 +00:00
eugeni 351a62dbc4 Enable ass_line_spacing option.
Patch by Thomas Reitmayr (treitmayr devbase at).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24574 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-18 18:34:52 +00:00
eugeni 1762cbe986 Correct font size in libass.
Values from TrueType OS/2 table are used to reproduce VSFilter behaviour.
Magic 0.8 multiplier and scaling for the fractional part of font size are not
needed anymore.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23346 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-19 14:11:41 +00:00
eugeni c5bc1d693c Revert y-axis rotation. Change order of rotations.
Now rotations are performed in the following order: X, Y, Z. Before this, it
was the other way around. Also, in FreeType Y axis is directed upwards, so the
corresponding rotation must be reverted.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23340 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-18 18:58:34 +00:00
eugeni 8513877fac Support fractional font sizes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23318 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-14 20:41:14 +00:00
eugeni b51b557529 Limit ass_font_set_transform to nonrotating transformations.
Rotations are not needed here (they are performed in transform3d) and they
disable autohinter.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23317 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-14 20:24:53 +00:00
eugeni e4855381f4 Deallocate string.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23231 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-03 19:33:35 +00:00
eugeni 9cda6a4834 Always deallocate glyphs. Fixes memory leak.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23208 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-02 10:15:12 +00:00
eugeni e23d5dacb7 Update comments.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23197 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:54:00 +00:00
eugeni 22f759c04a Cosmetics.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23196 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:34:08 +00:00
eugeni f0ffc341b6 Move glyph_to_bitmap() call and outline glyph deallocation to
get_bitmap_glyph().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23195 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:33:06 +00:00
eugeni 6deff1f55a Minor code simplification.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23193 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:21:34 +00:00
eugeni eaa1f9ab16 Move get_bitmap_glyph() call to a separate loop.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23192 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:14:22 +00:00
eugeni 8ffc803841 Move transform_3d() call to get_bitmap_glyph().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23191 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:12:36 +00:00
eugeni 3e9be13d66 Make a function static.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23190 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:07:41 +00:00
eugeni 005220995c Don't recalculate rotation radius.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23189 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 15:05:20 +00:00
eugeni 5221c54cb6 Bugfix: glyph cache depends on border width, because it contains outline_glyph
(glyph border obtained with FT_Glyph_StrokeBorder) since r23043.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23188 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-01 14:29:28 +00:00
eugeni c67220c86f Add -ass-hinting option for setting font hinting method.
It is possible to separately configure hinting for scaled and unscaled osd.
The default is native hinter for unscaled osd (only vo_gl at this point),
no hinting for vf_ass.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23152 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-27 14:25:36 +00:00
eugeni 13156cd794 Fix division by zero in "\t" parsing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23151 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-27 14:18:44 +00:00
eugeni 6f054a0afd Do not use FT_Glyph_Copy with NULL glyphs.
Contrary to the docs, it leaves garbage in *target.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23104 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-24 17:36:03 +00:00
eugeni 9dbd459f7e Deallocate glyphs in a separate loop.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23054 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-21 11:02:49 +00:00
eugeni 2b1fb8c4ef Always deallocate glyphs. Fixes a memory leak.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23053 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-21 10:56:28 +00:00
eugeni 02966ab87d Reset outline glyph cache when configuration changes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23052 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-21 10:43:19 +00:00
eugeni d5f828f347 Scale camera distance.
Otherwise perspective does not look the same in fullscreen.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23051 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-21 10:42:10 +00:00
eugeni de9f870522 Remove unused variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23049 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:25:30 +00:00
eugeni cd298098af Cosmetics.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23048 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:23:32 +00:00
eugeni e8b8c0fe0e Allow caching of rotated glyphs.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23047 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:23:00 +00:00
eugeni 7c281a626d Add shift_[xy] (vector that is added to the glyph before transformation) to
bitmap glyph key. Result of rotation depends on them because of perspective
transformation. They are only set when some rotation take place.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23046 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:19:23 +00:00
eugeni fda46c092d Fill bitmap_hash_key during parsing stage, call get_bitmap_glyph() much later.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23045 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:16:29 +00:00
eugeni f3375f1b4d Remove bbox and advance vector from bitmap cache.
They are now available from glyph cache.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23044 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:14:12 +00:00
eugeni 35cc43696d Store outline_glyph (glyph border) in glyph cache.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23043 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:13:34 +00:00
eugeni 05739aa046 Cosmetics: reindentation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23042 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:12:19 +00:00
eugeni b9809c1e13 Because of the outline glyph cache it is now possible for glyph_info_t to have
both non-zero glyph and bitmap at the same time. In that case, bitmap should
not be generated anew.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23041 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:11:39 +00:00
eugeni d9741a0278 Make get_*_glyph return void.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23040 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:10:33 +00:00
eugeni 1c2b174029 Move outline glyph generation to a separate function, using outline glyph
cache.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23039 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:09:48 +00:00
eugeni 6c412d239b Rename glyph cache to bitmap cache.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23035 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 23:02:20 +00:00
eugeni f7b1538978 A meaningless cosmetic change.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23033 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 22:57:55 +00:00
eugeni 36870a2a52 Add perspective projection.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23032 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 22:56:42 +00:00
eugeni cf9aff424f Applying transformation matrix to the glyph and the shift vector separately is
incorrect. Instead, it should be applied to translated glyph.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23031 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 22:55:28 +00:00
eugeni 3cbdb85046 Cosmetics: reindentation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23030 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 22:51:19 +00:00
eugeni 1a1ba22f93 Disable caching of rotated glyphs.
The following commits will add perspective distortion to the glyphs rotated
with \frx and \fry. Somewhere along the way correct caching of such glyphs
will become impossible, but in the end everything will be fine.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23029 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 22:49:48 +00:00
eugeni 67061091c6 Fix a stupid bug in r22473: bbox is zero-filled everytime when a glyph
is found in the cache. This leads to broken karaoke (some glyphs are not
highlighted at all), and, probably, slightly incorrect linebreaks.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22986 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-13 13:46:49 +00:00
eugeni 79e828c998 Fix lost hard linebreaks in libass by repeating the loop when both soft and
hard linebreaks are about to be added.

Original message:
http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-April/050876.html

Patch by Jindrich Makovicka /makovick gmail com/



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22931 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-07 13:32:51 +00:00
uau 208d4343ef "()" to "(void)" function param list fixes
patch from Stefan Huehner, stefan huehner org


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22904 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-01 21:59:54 +00:00
iive b5da111dd8 Use FT_Glyph_StrokeBorder to render only the outside border.
Workarounds gaps between glyph and glyph border when rendering some fonts with freetype below 2.1.10


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22863 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-31 20:58:14 +00:00
eugeni d96c2d51d9 A function always returning 0 could as well return void.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22475 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-06 10:00:53 +00:00