]> granicus.if.org Git - libass/log
libass
15 years agoInitialize all structs to 0 before using them.
reimar [Sat, 28 Mar 2009 19:21:34 +0000 (19:21 +0000)]
Initialize all structs to 0 before using them.
This is consistent with the remaining code (which uses e.g. calloc) and makes
it easier to extend the structs in the future.
As a side effect it fixes several valgrind errors in hashmap_hash/hashmap_key_compare
caused by padding in the structures, but it is not a correct fix for that issue.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29086 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoCosmetics: reindent.
eugeni [Mon, 16 Mar 2009 19:26:23 +0000 (19:26 +0000)]
Cosmetics: reindent.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28977 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoFix uninitialized memory access in ass_fontconfig.
eugeni [Mon, 16 Mar 2009 19:26:19 +0000 (19:26 +0000)]
Fix uninitialized memory access in ass_fontconfig.

This fixes hangups with plaintext subtitles happening when
the first subtitle is about to be displayed.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28976 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoUse ScaledBorderAndShadow: yes by default.
greg [Wed, 11 Mar 2009 22:55:23 +0000 (22:55 +0000)]
Use ScaledBorderAndShadow: yes by default.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28935 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoCosmetics: reindent.
eugeni [Sun, 8 Mar 2009 16:13:26 +0000 (16:13 +0000)]
Cosmetics: reindent.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28896 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoTreat -font/-subfont as Fontconfig pattern in libass.
eugeni [Sun, 8 Mar 2009 16:13:21 +0000 (16:13 +0000)]
Treat -font/-subfont as Fontconfig pattern in libass.

Patch by Adrian Stutz (adrian sttz ch).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28895 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoRemove extraneous braces.
greg [Sun, 8 Mar 2009 15:30:40 +0000 (15:30 +0000)]
Remove extraneous braces.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28892 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoDon't assume width == stride for bitmap composition.
greg [Sun, 8 Mar 2009 15:30:27 +0000 (15:30 +0000)]
Don't assume width == stride for bitmap composition.

Fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1421

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28891 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoFix clipping for pan-and-scan.
greg [Sun, 8 Mar 2009 04:03:28 +0000 (04:03 +0000)]
Fix clipping for pan-and-scan.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28876 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoAdd a proper color check to the overlap compositing.
greg [Sun, 8 Mar 2009 04:03:24 +0000 (04:03 +0000)]
Add a proper color check to the overlap compositing.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28875 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoReplace rotation functions with a simplified version adapted from
greg [Sun, 8 Mar 2009 02:53:14 +0000 (02:53 +0000)]
Replace rotation functions with a simplified version adapted from
vsfilter.

This (mostly) fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1394#c7

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28874 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoOnly use first \org in a line.
greg [Sat, 7 Mar 2009 23:56:03 +0000 (23:56 +0000)]
Only use first \org in a line.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28873 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoFix \be blur start position.
greg [Fri, 6 Mar 2009 09:20:14 +0000 (09:20 +0000)]
Fix \be blur start position.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28837 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoRaise max. number of \be applications to 100, introduce #define for it.
greg [Fri, 6 Mar 2009 09:20:09 +0000 (09:20 +0000)]
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

15 years agoReplace magic numbers (for subpixel accuracy masking) with a define.
greg [Fri, 6 Mar 2009 01:26:44 +0000 (01:26 +0000)]
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

15 years agoUse blur with kernel [[1,2,1], [2,4,2], [1,2,1]] for \be.
greg [Fri, 6 Mar 2009 01:17:05 +0000 (01:17 +0000)]
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

15 years agoCombine adjacent overlapping, translucent glyph borders and shadows to
greg [Thu, 5 Mar 2009 20:47:33 +0000 (20:47 +0000)]
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

15 years agoFix positioned events' y-position when pan-and-scan is used.
greg [Thu, 5 Mar 2009 20:36:59 +0000 (20:36 +0000)]
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

15 years agoSupport for subpixel accuracy of 3 bits for \pos and \move.
greg [Thu, 5 Mar 2009 20:36:56 +0000 (20:36 +0000)]
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

15 years agoStyle override for ScaledBorderAndShadow.
greg [Thu, 5 Mar 2009 20:36:52 +0000 (20:36 +0000)]
Style override for ScaledBorderAndShadow.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28821 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoSupport ScaledBorderAndShadow property.
greg [Thu, 5 Mar 2009 20:36:48 +0000 (20:36 +0000)]
Support ScaledBorderAndShadow property.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28820 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoScale shadow displacement and blur size like border size.
greg [Thu, 5 Mar 2009 20:36:44 +0000 (20:36 +0000)]
Scale shadow displacement and blur size like border size.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28819 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoRound shadow displacement to nearest int.
greg [Thu, 5 Mar 2009 20:36:41 +0000 (20:36 +0000)]
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

15 years agoSupport a vsfilter special case:
greg [Thu, 5 Mar 2009 20:36:39 +0000 (20:36 +0000)]
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

15 years agoHack: half-merge glyph border with outline to avoid ugly anti-aliasing
greg [Thu, 5 Mar 2009 20:36:35 +0000 (20:36 +0000)]
Hack: half-merge glyph border with outline to avoid ugly anti-aliasing
in certain situations.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28816 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoIgnore PlayResX/Y aspect ratio for font aspect ratio.
greg [Thu, 5 Mar 2009 20:05:56 +0000 (20:05 +0000)]
Ignore PlayResX/Y aspect ratio for font aspect ratio.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28814 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoFix a memory leak.
eugeni [Sun, 1 Mar 2009 19:31:29 +0000 (19:31 +0000)]
Fix a memory leak.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28787 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoWith pan-and-scan, keep positioned events in their original positions
eugeni [Sun, 1 Mar 2009 16:01:24 +0000 (16:01 +0000)]
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

15 years agoZero-fill glyph_info_t before use.
eugeni [Fri, 27 Feb 2009 23:06:53 +0000 (23:06 +0000)]
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

15 years agoRemove unused function argument.
eugeni [Fri, 27 Feb 2009 23:06:50 +0000 (23:06 +0000)]
Remove unused function argument.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28753 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoSupport fractional arguments for some override tags.
eugeni [Fri, 27 Feb 2009 23:06:47 +0000 (23:06 +0000)]
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

15 years agoFix two gcc warnings.
eugeni [Fri, 27 Feb 2009 23:06:43 +0000 (23:06 +0000)]
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

15 years agoFix memory leak produced by the \blur patch.
eugeni [Fri, 27 Feb 2009 23:06:40 +0000 (23:06 +0000)]
Fix memory leak produced by the \blur patch.

Patch by Grigori G (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28750 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoStronger blur.
eugeni [Fri, 27 Feb 2009 23:06:37 +0000 (23:06 +0000)]
Stronger blur.

Patch by Grigori G (greg chown ath cx).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28749 b3059339-0415-0410-9bf9-f77b7e298cf2

15 years agoAllow shadow without border.
eugeni [Fri, 27 Feb 2009 23:06:34 +0000 (23:06 +0000)]
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

15 years agoIn case of several \move or \pos in one line, prefer the first one.
eugeni [Sat, 7 Feb 2009 01:13:11 +0000 (01:13 +0000)]
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

15 years agoAdd stubs for a few unimplemented tags.
eugeni [Sat, 7 Feb 2009 01:13:07 +0000 (01:13 +0000)]
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

15 years agoAllow \be with arguments other than 0 or 1. Implement \blur.
eugeni [Sat, 7 Feb 2009 01:13:02 +0000 (01:13 +0000)]
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

15 years agoincrease max glyph and lines limit
compn [Thu, 29 Jan 2009 02:23:06 +0000 (02:23 +0000)]
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

15 years agoGet rid of pointless 'extern' keywords.
diego [Wed, 3 Dec 2008 23:01:03 +0000 (23:01 +0000)]
Get rid of pointless 'extern' keywords.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoConsistently use NULL for pointers instead of 0.
reimar [Sun, 2 Nov 2008 11:48:20 +0000 (11:48 +0000)]
Consistently use NULL for pointers instead of 0.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27876 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFallback to non-fontconfig behaviour when fontconfig initialization fails.
reimar [Sun, 2 Nov 2008 09:57:22 +0000 (09:57 +0000)]
Fallback to non-fontconfig behaviour when fontconfig initialization fails.
Also fixes a memleak in that case, bug #1313.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27875 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agolibass: fix type mismatch between size parameter and the way it's used
aurel [Fri, 5 Sep 2008 22:59:01 +0000 (22:59 +0000)]
libass: fix type mismatch between size parameter and the way it's used

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27531 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agolibass: add a new ass_process_data() to process demuxed subtitle packets
aurel [Fri, 5 Sep 2008 15:07:06 +0000 (15:07 +0000)]
libass: add a new ass_process_data() to process demuxed subtitle packets
conforming to the ASS spec

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27530 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoDon't print drawing commands on screen.
eugeni [Fri, 8 Aug 2008 20:08:02 +0000 (20:08 +0000)]
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

16 years agoIf (has outline) blur(outline) else blur(glyph).
eugeni [Thu, 7 Aug 2008 22:20:58 +0000 (22:20 +0000)]
If (has outline) blur(outline) else blur(glyph).

If there is an outline, the glyph itself should not be blurred. Keeps
the border between glyph and outline clear (unblurred), which is
probably how it should be.

Patch by Diogo Franco (diogomfranco gmail com).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27441 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years ago\org turns off collision detection.
eugeni [Thu, 7 Aug 2008 22:20:56 +0000 (22:20 +0000)]
\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

16 years agoTreat \h as space character.
eugeni [Thu, 7 Aug 2008 22:20:54 +0000 (22:20 +0000)]
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

16 years agoCalculate subtitle origin in floating point.
eugeni [Thu, 7 Aug 2008 22:20:52 +0000 (22:20 +0000)]
Calculate subtitle origin in floating point.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27438 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCalculate subtitle position in floating point.
eugeni [Thu, 7 Aug 2008 22:20:50 +0000 (22:20 +0000)]
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

16 years agoRename font-related preprocessor directives.
diego [Thu, 7 Aug 2008 10:36:07 +0000 (10:36 +0000)]
Rename font-related preprocessor directives.
Switch them from a HAVE_ to a CONFIG_ prefix.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoRename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;
diego [Fri, 1 Aug 2008 20:28:58 +0000 (20:28 +0000)]
Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;
CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27391 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoStart unifying names of internal preprocessor directives.
diego [Wed, 30 Jul 2008 12:01:30 +0000 (12:01 +0000)]
Start unifying names of internal preprocessor directives.
Replace all USE_ prefixes by CONFIG_ prefixes to indicate
options which are configurable.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFix \fn without an argument consuming the next '\'.
eugeni [Wed, 9 Jul 2008 15:05:56 +0000 (15:05 +0000)]
Fix \fn without an argument consuming the next '\'.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27242 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCheck if the font set returned from FcFontSort in not NULL.
eugeni [Mon, 23 Jun 2008 14:46:55 +0000 (14:46 +0000)]
Check if the font set returned from FcFontSort in not NULL.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27128 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoReindent.
eugeni [Mon, 23 Jun 2008 14:46:52 +0000 (14:46 +0000)]
Reindent.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27127 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoOnly use application font dir if library->fonts_dir is not NULL.
eugeni [Mon, 23 Jun 2008 14:46:50 +0000 (14:46 +0000)]
Only use application font dir if library->fonts_dir is not NULL.

This can be the case if ass_set_fonts_dir() call is omitted, results in
segfault. Never happens in the current MPlayer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27126 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoThe size of output buffer is stored in 'osize', not 'size'.
eugeni [Thu, 29 May 2008 18:35:22 +0000 (18:35 +0000)]
The size of output buffer is stored in 'osize', not 'size'.

This is just for readability, the code behaviour is not changed.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26924 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoClear iconv conversion state also in libass.
eugeni [Thu, 29 May 2008 18:35:21 +0000 (18:35 +0000)]
Clear iconv conversion state also in libass.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26923 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoOffset should be size_t.
eugeni [Thu, 29 May 2008 18:35:18 +0000 (18:35 +0000)]
Offset should be size_t.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26922 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCosmetics: reindent after the last commit.
eugeni [Thu, 22 May 2008 22:52:58 +0000 (22:52 +0000)]
Cosmetics: reindent after the last commit.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26857 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoRead all faces of a memory font, not just the first one.
eugeni [Thu, 22 May 2008 22:52:57 +0000 (22:52 +0000)]
Read all faces of a memory font, not just the first one.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26856 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFix compilation with FontConfig <= 2.2.96.
eugeni [Thu, 22 May 2008 08:58:06 +0000 (08:58 +0000)]
Fix compilation with FontConfig <= 2.2.96.

It lacks FcPatternRemove function. The code will work fine, but produce an
incorrect "Selected font is not the requested one" warning in rare cases.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26851 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoIn case 2 styles have the same name, prefer the latest one.
eugeni [Mon, 19 May 2008 18:37:27 +0000 (18:37 +0000)]
In case 2 styles have the same name, prefer the latest one.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26839 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agocosmetics: Remove useless parentheses from return statements.
diego [Fri, 16 May 2008 09:42:28 +0000 (09:42 +0000)]
cosmetics: Remove useless parentheses from return statements.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoSpeak of libass instead of MPlayer in the libass license headers.
diego [Wed, 14 May 2008 17:21:58 +0000 (17:21 +0000)]
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

16 years agoAdd standard license header.
diego [Tue, 13 May 2008 08:34:59 +0000 (08:34 +0000)]
Add standard license header.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26757 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFix one more license header wording detail for consistency.
diego [Tue, 13 May 2008 08:33:48 +0000 (08:33 +0000)]
Fix one more license header wording detail for consistency.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26756 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoUse standard license header.
diego [Tue, 13 May 2008 08:02:23 +0000 (08:02 +0000)]
Use standard license header.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26755 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoWhen building font pattern, treat both ' ' and '-' as word separators.
eugeni [Sun, 11 May 2008 20:17:21 +0000 (20:17 +0000)]
When building font pattern, treat both ' ' and '-' as word separators.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26742 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFix possible free of unallocated memory.
eugeni [Sun, 11 May 2008 19:49:57 +0000 (19:49 +0000)]
Fix possible free of unallocated memory.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26741 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoDefine FC_FULLNAME and FC_EMBOLDEN to fix compilation with ancient fontconfig.
eugeni [Thu, 8 May 2008 13:54:00 +0000 (13:54 +0000)]
Define FC_FULLNAME and FC_EMBOLDEN to fix compilation with ancient fontconfig.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26692 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoIf both full name and family are available, use the former in inexact match warning.
eugeni [Thu, 8 May 2008 13:53:58 +0000 (13:53 +0000)]
If both full name and family are available, use the former in inexact match warning.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26691 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoRemove extra family names from the search pattern after FcFontSort and
eugeni [Thu, 8 May 2008 13:53:56 +0000 (13:53 +0000)]
Remove extra family names from the search pattern after FcFontSort and
call FcFontRenderPrepare to select the best family name for the font in case
there are several of them.

This does not affect font matching results, but helps to avoid warning about
inexact match.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26690 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFix the second fontconfig_init function as the declaration in the .h file.
ulion [Sat, 3 May 2008 12:44:16 +0000 (12:44 +0000)]
Fix the second fontconfig_init function as the declaration in the .h file.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26652 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoPrint more info about selected font.
eugeni [Fri, 2 May 2008 23:32:29 +0000 (23:32 +0000)]
Print more info about selected font.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26648 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoRewrite font family check in a simpler way.
eugeni [Fri, 2 May 2008 23:32:28 +0000 (23:32 +0000)]
Rewrite font family check in a simpler way.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26647 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoMove font family check to the end of the list.
eugeni [Fri, 2 May 2008 23:32:26 +0000 (23:32 +0000)]
Move font family check to the end of the list.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26646 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCosmetics: rename local variables to better reflect their contents.
eugeni [Fri, 2 May 2008 23:32:25 +0000 (23:32 +0000)]
Cosmetics: rename local variables to better reflect their contents.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26645 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoSkip '@' at the beginning of the font name.
eugeni [Thu, 1 May 2008 11:06:16 +0000 (11:06 +0000)]
Skip '@' at the beginning of the font name.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26625 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoOnly warn if both font family and it's full name are different from requested.
eugeni [Thu, 1 May 2008 00:34:29 +0000 (00:34 +0000)]
Only warn if both font family and it's full name are different from requested.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26624 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoAllow inexact font family matching.
eugeni [Thu, 1 May 2008 00:34:26 +0000 (00:34 +0000)]
Allow inexact font family matching.

In SSA/ASS fonts are sometimes referenced by their "full name",
which is usually a concatenation of family name and font
style (ex. Ottawa Bold). Full name is available from
FontConfig pattern element FC_FULLNAME, but it is never
used for font matching.
Therefore, I'm removing words from the end of the name one
by one, and adding shortened names to the pattern. It seems
that the first value (full name in this case) has
precedence in matching.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26623 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoRemove libass dependency on global font_fontconfig variable.
eugeni [Wed, 30 Apr 2008 14:16:22 +0000 (14:16 +0000)]
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

16 years agoMerge libass/Makefile into Makefile, one less recursive make directory.
diego [Tue, 8 Apr 2008 22:25:59 +0000 (22:25 +0000)]
Merge libass/Makefile into Makefile, one less recursive make directory.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26356 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCase insensitive parsing of SSA/ASS section headers.
eugeni [Sun, 30 Mar 2008 17:42:19 +0000 (17:42 +0000)]
Case insensitive parsing of SSA/ASS section headers.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26303 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoSkip BOM at the beginning of text in ASS parser.
eugeni [Sun, 30 Mar 2008 17:42:17 +0000 (17:42 +0000)]
Skip BOM at the beginning of text in ASS parser.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26302 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoAdd missing header #includes to fix 'make checkheaders'.
diego [Wed, 5 Mar 2008 08:24:09 +0000 (08:24 +0000)]
Add missing header #includes to fix 'make checkheaders'.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26170 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoComment out dump_glyph(): it is unused and, as it is now, breaks compilation.
eugeni [Fri, 22 Feb 2008 21:24:35 +0000 (21:24 +0000)]
Comment out dump_glyph(): it is unused and, as it is now, breaks compilation.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26068 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCheck glyph bounding box before rasterizing and complain if it is too large.
eugeni [Fri, 22 Feb 2008 19:31:53 +0000 (19:31 +0000)]
Check glyph bounding box before rasterizing and complain if it is too large.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26067 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoSome debugging routines.
eugeni [Fri, 22 Feb 2008 19:31:51 +0000 (19:31 +0000)]
Some debugging routines.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26066 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoBetter handling of behind-the-camera objects.
eugeni [Fri, 22 Feb 2008 19:31:49 +0000 (19:31 +0000)]
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

16 years agoPrint FreeType version in libass init. Makes error logs slightly more helpful.
eugeni [Fri, 22 Feb 2008 19:31:47 +0000 (19:31 +0000)]
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

16 years agoConsistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego [Tue, 29 Jan 2008 23:25:11 +0000 (23:25 +0000)]
Consistently give all libass multiple inclusion guards a LIBASS_ prefix.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25927 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoConsistently use uppercase filename as multiple inclusion guard.
diego [Mon, 28 Jan 2008 01:32:52 +0000 (01:32 +0000)]
Consistently use uppercase filename as multiple inclusion guard.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25897 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoAdd global ass_force_reload flag.
eugeni [Wed, 23 Jan 2008 21:18:30 +0000 (21:18 +0000)]
Add global ass_force_reload flag.

If it is set, renderer is reconfigured before the next frame.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25841 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoDo not try to guess font metrics based on its bounding box.
eugeni [Sat, 12 Jan 2008 02:27:01 +0000 (02:27 +0000)]
Do not try to guess font metrics based on its bounding box.

It was originally a workaround for fonts with bad ascender/descender values,
but it breaks display of some otherwise valid fonts (bugzilla 987), so
reverted.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25688 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoFix ass_clear_fonts not deallocating fontdata.
eugeni [Tue, 8 Jan 2008 12:45:41 +0000 (12:45 +0000)]
Fix ass_clear_fonts not deallocating fontdata.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25649 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoNo need to reinvent strdup...
eugeni [Mon, 7 Jan 2008 21:06:50 +0000 (21:06 +0000)]
No need to reinvent strdup...

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25644 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoCopy font data to ass_library instead of referencing demuxer-owned memory.
eugeni [Mon, 7 Jan 2008 14:02:06 +0000 (14:02 +0000)]
Copy font data to ass_library instead of referencing demuxer-owned memory.

This fixes segfault when fonts are accessed after demuxer has been closed.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25641 b3059339-0415-0410-9bf9-f77b7e298cf2

16 years agoAllow overriding [Script Info] parameters with -ass-force-style option.
eugeni [Sat, 5 Jan 2008 15:38:46 +0000 (15:38 +0000)]
Allow overriding [Script Info] parameters with -ass-force-style option.
Patch by Anton Khirnov, wyskas gmail com.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25610 b3059339-0415-0410-9bf9-f77b7e298cf2