summaryrefslogtreecommitdiffstats
path: root/libass/ass_bitmap.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename typedefs (breaks API)Grigori Goronzy2009-08-061-18/+18
| | | | | | Rename all typedefs from the convention foo_bar_t, which can possibly conflict with POSIX types, to FooBar (and ASS_FooBar for public API typedefs). Fix formatting and stray comments while at it.
* Clean up typedefs/structsGrigori Goronzy2009-07-281-1/+1
| | | | | Remove useless _s suffix from struct names and remove struct name where not needed (only the typedef'd struct is used). Clean up API headers.
* Fix rasterizer error handling (double free)Grigori Goronzy2009-07-221-1/+0
| | | | | | In case rasterizing a glyph is successful, but rasterizing its outline is not, do not free the glyph bitmap. It will be freed in cache cleanup later. Freeing it earlier leads to a double free.
* Merge glyph and outline bitmap betterGrigori Goronzy2009-07-121-1/+1
| | | | | | | | Use a different threshold for merging the outline and glyph and also adjust the merge amount. This fails to give complete transparency (and thus will yield slightly darker looking glyphs, usually), but avoids very ugly looking artefacts at the edge between border and glyph that were still prevalent.
* Redo border calculations for \be and \blurGrigori Goronzy2009-07-121-25/+28
| | | | | | | | | | The last commit related to this overdid it a bit -- in some cases, with \be5, for example, edges were visible on the outlines. Instead of using a linear function to map \be applications to border enlargement value, use a nonlinear function, a simple square root. This seems to work a lot better, while keeping the enlargement small. In addition, make it possible to use \be and \blur at the same time. \be is applied first.
* Message callback funtionalityGrigori Goronzy2009-07-111-9/+10
| | | | | | | | | | | Introduce functionality for providing a message callback that is used for passing messages to the controlling application instead of simply printing them to standard output. The function pointer to the callback is stored in the ass_library_t instance. ass_msg needs access to it, so in many places the library instance needs to be passed around now. The default behavior is the old one: messages of MSGL_INFO or lower are printed to the standard output, prefixed with "[ass]".
* Replace string defines with real stringsGrigori Goronzy2009-07-111-3/+3
| | | | | | Instead of referencing string defines from help_mp.h, use the strings directly in ass_msg. Consequently, help_mp.h is useless and can be deleted.
* Move gaussian blur into bitmap handling codeGrigori Goronzy2009-07-101-0/+121
|
* Slight optimizations for \be, \blurGrigori Goronzy2009-07-101-4/+4
| | | | | | | Enlarge bitmap glyphs less for \be, this is especially effective for lots of \be applications. Also make sure that the gaussian blur buffers are only updated if gaussian blur is actually used for a particular glyph.
* shift_bitmap: do not rely on compiler optimizationsGrigori Goronzy2009-06-291-4/+4
| | | | Do not rely on the compiler for optimizing a division into a shift.
* Subpixel accurate shadow renderingGrigori Goronzy2009-06-291-1/+56
| | | | | | | | | Shadows are handled different from glyph and outline. A shadow is the sum of glyph and outline bitmap; therefore shifting to the correct subpixel amount before rasterization is out of the question. Instead, the bitmap is shifted by its subpixel amount after being built from shadow and glyph. The bitmap cache was extended for this.
* Include ass_utils.h instead of mputils.hGrigori Goronzy2009-06-271-1/+1
|
* Rename various non-static functionsGrigori Goronzy2009-06-271-6/+8
| | | | | Rename a few functions to avoid symbol clashes. Clean up mputils.h.
* Rename mp_msg to ass_msgGrigori Goronzy2009-06-271-3/+3
|
* Reindent all source code.greg2009-06-201-253/+275
| | | | | | | | | | | | | | | Reindent complete source code (*.c, *.h) with indent, the exact command line being: indent -kr -i4 -bap -nut -l76 *.c *.h From now on, new code should use (more or less) K&R style, only spaces and no tabs, 4 spaces indent width. Avoid long lines. Fix function declaration pointer spacing. Remove spaces that were added to many function declarations by indent, like some_func(foo_t * bar). Fix indenting of macros in ass.c
* Enlarge glyph size more for \blur to avoid artefacts.greg2009-06-191-1/+1
|
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix \be blur start position.greg2009-03-061-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28837 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use blur with kernel [[1,2,1], [2,4,2], [1,2,1]] for \be.greg2009-03-061-8/+32
| | | | | | 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
* Hack: half-merge glyph border with outline to avoid ugly anti-aliasinggreg2009-03-051-1/+1
| | | | | | in certain situations. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28816 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a memory leak.eugeni2009-03-011-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28787 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix memory leak produced by the \blur patch.eugeni2009-02-271-2/+2
| | | | | | Patch by Grigori G (greg chown ath cx). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28750 b3059339-0415-0410-9bf9-f77b7e298cf2
* Stronger blur.eugeni2009-02-271-0/+1
| | | | | | Patch by Grigori G (greg chown ath cx). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28749 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow \be with arguments other than 0 or 1. Implement \blur.eugeni2009-02-071-12/+32
| | | | | | Patch by Grigori G, greg at chown ath cx. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28471 b3059339-0415-0410-9bf9-f77b7e298cf2
* If (has outline) blur(outline) else blur(glyph).eugeni2008-08-071-1/+2
| | | | | | | | | | | 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
* Speak of libass instead of MPlayer in the libass license headers.diego2008-05-141-4/+4
| | | | | | | | 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
* Use standard license header.diego2008-05-131-16/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26755 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check glyph bounding box before rasterizing and complain if it is too large.eugeni2008-02-221-0/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26067 b3059339-0415-0410-9bf9-f77b7e298cf2
* "()" to "(void)" function param list fixesuau2007-04-011-1/+1
| | | | | | | patch from Stefan Huehner, stefan huehner org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22904 b3059339-0415-0410-9bf9-f77b7e298cf2
* MSGTRs for libasskraymer2006-11-191-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21082 b3059339-0415-0410-9bf9-f77b7e298cf2
* Collect all includes of mplayer headers in libass in a single file (mputils.h).eugeni2006-11-191-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21042 b3059339-0415-0410-9bf9-f77b7e298cf2
* Partial fix for semitransparent glyph outlines.eugeni2006-11-131-1/+1
| | | | | | | | | | | | | This fix removes semitransparent area (less then pixel width) between glyph and it's outline. Instead, it makes them overlap a little. It usually looks much better this way. Complete fix seems impossible with the current output format (single color alpha bitmaps). The right way is to blend both glyph and outline into one bitmap so that 2 pixels with 50% transparency produce a fully solid one. This requires RGBA bitmap output from libass. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20890 b3059339-0415-0410-9bf9-f77b7e298cf2
* Introduce MSGT_ASS, use it for all libass messages.eugeni2006-11-031-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20645 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert r20517.eugeni2006-10-291-116/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20519 b3059339-0415-0410-9bf9-f77b7e298cf2
* Copy the following functions to libass to avoid dependency on the rest of ↵eugeni2006-10-291-1/+116
| | | | | | | | | | | | mplayer: guess_buffer_cp utf8_get_char blur git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20517 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add copyright notice and vim/emacs comments to libass and vf_ass.c.eugeni2006-10-011-0/+20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20014 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: add some comments.eugeni2006-09-241-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19972 b3059339-0415-0410-9bf9-f77b7e298cf2
* Shadow support in libass.eugeni2006-09-241-9/+30
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19971 b3059339-0415-0410-9bf9-f77b7e298cf2
* Free memory in ass_synth_done().eugeni2006-09-241-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19968 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce size of non-blurred bitmaps.eugeni2006-09-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19962 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics. Change indentation of block of code to make it consistent witheugeni2006-09-231-39/+39
| | | | | | | the rest of the file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19961 b3059339-0415-0410-9bf9-f77b7e298cf2
* Better fix_outline implementation. No more "fix_outline failed" messages,eugeni2006-09-231-12/+15
| | | | | | | should work even with the craziest glyphs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19947 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce code duplication in init_render_context().eugeni2006-09-171-6/+9
| | | | | | | Don't use glyph stroker for borderless glyphs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19879 b3059339-0415-0410-9bf9-f77b7e298cf2
* Subtract glyph bitmap from outline bitmap.eugeni2006-09-161-0/+22
| | | | | | | It greatly improves display of glyphs with semitransparent primary color. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19862 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add \be (blur edges) support to libass.eugeni2006-09-161-3/+104
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19854 b3059339-0415-0410-9bf9-f77b7e298cf2
* Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.eugeni2006-09-161-0/+91
This is required for various bitmap modifications (like blur, outline and shadow). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19852 b3059339-0415-0410-9bf9-f77b7e298cf2