Commit Graph

195 Commits

Author SHA1 Message Date
greg 25abe9651d Raise max. number of \be applications to 100, introduce #define for it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28836 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 09:20:09 +00:00
greg d303d39798 Replace magic numbers (for subpixel accuracy masking) with a define.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28835 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 01:26:44 +00:00
greg d4423f7516 Use blur with kernel [[1,2,1], [2,4,2], [1,2,1]] for \be.
This is faster than gaussian blur and similar to vsfilter.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28834 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 01:17:05 +00:00
greg 9bad4bdce4 Combine adjacent overlapping, translucent glyph borders and shadows to
avoid luminance build-up, which looks ugly.

The resulting, modified bitmaps are stored in separate bitmap cache.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28824 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:47:33 +00:00
greg 8ad008e12a Fix positioned events' y-position when pan-and-scan is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28823 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:36:59 +00:00
greg f9aba2b83a Support for subpixel accuracy of 3 bits for \pos and \move.
Also, restrict advance subpixel accuracy to 3 bits to reduce cache
bloat.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28822 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:36:56 +00:00
greg 2432bbd43d Support ScaledBorderAndShadow property.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28820 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:36:48 +00:00
greg a2b82120c0 Scale shadow displacement and blur size like border size.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28819 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:36:44 +00:00
greg c23a1cdfb3 Round shadow displacement to nearest int.
Use double for shadow displacement parameter.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28818 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:36:41 +00:00
greg a2020815ad Support a vsfilter special case:
If PlayResX or Y is 1280/1024 respectively and the other
PlayRes attribute isn't provided, use 1280/1024 for it.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28817 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:36:39 +00:00
greg 16731f6349 Ignore PlayResX/Y aspect ratio for font aspect ratio.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28814 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:05:56 +00:00
eugeni 9c8a334cc5 With pan-and-scan, keep positioned events in their original positions
relative to video.

Patch by Grigori Goronzy (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28783 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-01 16:01:24 +00:00
eugeni 15ed6e0199 Zero-fill glyph_info_t before use.
Patch by Grigori G (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28754 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-27 23:06:53 +00:00
eugeni 69ce550ee0 Remove unused function argument.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28753 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-27 23:06:50 +00:00
eugeni 00d6bb12b9 Support fractional arguments for some override tags.
Done by parsing all integers as doubles first and then converting them to the
nearest integer. Patch by Grigori G (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28752 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-27 23:06:47 +00:00
eugeni a1f50bf348 Fix two gcc warnings.
Patch by Grigori G (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28751 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-27 23:06:43 +00:00
eugeni 909f7b0c14 Allow shadow without border.
Patch by Grigori G (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28748 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-27 23:06:34 +00:00
eugeni 98c80613c6 In case of several \move or \pos in one line, prefer the first one.
Patch by Grigori G, greg at chown ath cx.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28473 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-07 01:13:11 +00:00
eugeni 4fdc9591b4 Add stubs for a few unimplemented tags.
Patch by Grigori G, greg at chown ath cx.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28472 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-07 01:13:07 +00:00
eugeni 94ea507ec2 Allow \be with arguments other than 0 or 1. Implement \blur.
Patch by Grigori G, greg at chown ath cx.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28471 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-07 01:13:02 +00:00
compn c312c67753 increase max glyph and lines limit
patch by Scaevolus on irc
fixes http://samples.mplayerhq.hu/Matroska/subtitles/090128_gszs02.mkv


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28386 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-29 02:23:06 +00:00
eugeni e1ce107366 Don't print drawing commands on screen.
Drawing mode is not implemented in libass.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27442 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-08 20:08:02 +00:00
eugeni a925925543 \org turns off collision detection.
Patch by Diogo Franco (diogomfranco gmail com).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27440 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 22:20:56 +00:00
eugeni 6c92d9358b Treat \h as space character.
Patch by Robert Rudd (robrudd at users sourceforge net).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27439 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 22:20:54 +00:00
eugeni 054f28e2d1 Calculate subtitle origin in floating point.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27438 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 22:20:52 +00:00
eugeni 1670e33e21 Calculate subtitle position in floating point.
Improves subtitle position precision from a unit of script coordinates
to a screen pixel.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27437 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 22:20:50 +00:00
eugeni 8760b0cb71 Fix \fn without an argument consuming the next '\'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27242 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-09 15:05:56 +00:00
diego ce01f2052c Speak of libass instead of MPlayer in the libass license headers.
We already use LIBASS_ prefixes for the multiple inclusion guards.
Thus libass can be considered separate enough to warrant this.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26770 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-14 17:21:58 +00:00
diego 256060a3ae Use standard license header.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26755 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-13 08:02:23 +00:00
eugeni f1e8cbf643 Remove libass dependency on global font_fontconfig variable.
A new function (ass_set_fonts_nofc) is introduced instead of an extra argument
to existing ass_set_fonts to keep binary compatibility with older versions of
the library.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26614 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-30 14:16:22 +00:00
eugeni dd8c7c9e2c Better handling of behind-the-camera objects.
Every point that is behind the camera is moved to the clipping plane by
orthographic projection. It is obviously incorrect, but this is a very rare
case, and proper clipping of Bezier curves is not that easy.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26065 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 19:31:49 +00:00
eugeni 59f43e8231 Print FreeType version in libass init. Makes error logs slightly more helpful.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26064 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 19:31:47 +00:00
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