Commit Graph

392 Commits

Author SHA1 Message Date
Uoti Urpala cf9edda1d3 Merge svn changes up to r29117 2009-04-01 02:43:47 +03:00
reimar 0a1f688c6e Document the ass_render_event event_images parameter.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29087 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-28 19:24:08 +00:00
reimar bbf6e2d0a9 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
2009-03-28 19:21:34 +00:00
eugeni bebbe6557b Cosmetics: reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28977 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-16 19:26:23 +00:00
eugeni bc1d60dcb7 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
2009-03-16 19:26:19 +00:00
Uoti Urpala ae2faad666 Merge svn changes up to r28951 2009-03-14 23:52:45 +02:00
greg a0735f5859 Use ScaledBorderAndShadow: yes by default.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28935 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-11 22:55:23 +00:00
eugeni 79b9156732 Cosmetics: reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28896 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-08 16:13:26 +00:00
eugeni 686d57168f 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
2009-03-08 16:13:21 +00:00
greg 2a70f019e9 Remove extraneous braces.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28892 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-08 15:30:40 +00:00
greg af0797010e 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
2009-03-08 15:30:27 +00:00
greg 2c55cbabf9 Fix clipping for pan-and-scan.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28876 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-08 04:03:28 +00:00
greg eb3f82bfee Add a proper color check to the overlap compositing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28875 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-08 04:03:24 +00:00
greg 668810ab04 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
2009-03-08 02:53:14 +00:00
greg 463d61c7a6 Only use first \org in a line.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28873 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-07 23:56:03 +00:00
Uoti Urpala e0172b96e3 Merge svn changes up to r28862 2009-03-07 01:04:41 +02:00
greg 27b512e1f5 Fix \be blur start position.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28837 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 09:20:14 +00:00
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 40a38da7db Style override for ScaledBorderAndShadow.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28821 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 20:36:52 +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 153e7ada4c 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
2009-03-05 20:36:35 +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 20a2db7dfd Fix a memory leak.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28787 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-01 19:31:29 +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
Uoti Urpala 0c6f667896 Merge svn changes up to r28755 2009-02-28 05:58:59 +02: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 bcad979a56 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
2009-02-27 23:06:40 +00:00
eugeni b84c1b627f 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
2009-02-27 23:06:37 +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
Uoti Urpala 1e86963828 Merge svn changes up to r28537 2009-02-12 04:17:55 +02: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
Uoti Urpala ccf4d9e96c Merge svn changes up to r28403 2009-01-31 04:52:15 +02: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
Uoti Urpala 9afb39ccff libass: If a bad subtitle has multiple \pos use first
Having multiple \pos makes no sense, but such files exist. Apparently
VSFilter uses the values from the first \pos in this case whereas
libass used the last one. Change the behavior to make it compatible
with VSfilter since this has the highest chance of matching what the
creators of the file intended.
2008-12-22 00:46:52 +02:00
Uoti Urpala 312d9e4b10 libass: Fix cache lookup problem causing memory bloat
The cache code did hash lookups by storing key values in struct fields
and then hashing and comparing the struct as a single memory block. In
at least one case such a struct contained uninitialized padding bytes
which prevented the complete memory area of the struct from matching
even though the fields did. As a result the code failed to find
existing objects in the cache and stored new versions of them, causing
gigabytes of memory use in some circumstances. Initializing the struct
memory to zero before writing the fields avoided such memory use in
tests but is not guaranteed to work if I interpret the C standard
correctly (the compiler is allowed to write garbage over padding bytes
when changing struct member values).

Change the code to use struct-specific hashing and comparison
functions that work field by field to guarantee correct behavior.
Create these by replacing the struct definition with a template that
lists the fields and can be used the generate each of struct
definition, hash function and compare function with some preprocessor
magic (otherwise every field would need to be listed separately in all
three).
2008-12-22 00:46:52 +02:00
Uoti Urpala 8c144171bb Merge svn changes up to r28087
Conflicts:
	command.c
	libao2/ao_ivtv.c
	libao2/ao_v4l2.c
	libmpcodecs/dec_video.h
	libvo/aspect.h
	libvo/sub.c
	libvo/sub.h
	libvo/vo_directx.c
	libvo/vo_macosx.m
	libvo/vo_quartz.c
	mp_core.h
	mplayer.c
	mplayer.h
	osdep/getch2.h
	osdep/timer.h
2008-12-04 01:55:52 +02:00
diego 0864f92e7a Get rid of pointless 'extern' keywords.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-03 23:01:03 +00:00