summaryrefslogtreecommitdiffstats
path: root/libass
Commit message (Collapse)AuthorAgeFilesLines
* Clean up bitmap combiningDr.Smile2015-01-287-418/+292
| | | | | | | | | | Now pre- and post-combining operations are clearly separated, many parameters in cache keys are no longer necessary due to that. Also an ambiguous (in case of multiple fonts) text string is replaced with a list of direct bitmap references in composite cache key. Fixes #153. Fixes #82.
* Fix bug in ASS_Outline intrastructureDr.Smile2015-01-221-34/+19
|
* Add extern "C" guard to public headerOleg Oshmyan2015-01-161-0/+8
| | | | | | Our public headers can be #included from C++. Hence, ass.h needs an extern "C" guard to declare the correct linkage for functions. ass_types.h only defines types, so it does not need a guard.
* Fix rare edge-case bug in rasterizerDr.Smile2015-01-151-1/+4
|
* Update version and changelog0.12.1wm42015-01-071-1/+1
|
* Destroy harfbuzz faces before freetype facesBehdad Esfahbod2014-12-281-2/+2
| | | | | HarfBuzz faces reference the FreeType faces. Destroying FT faces first can cause crash in HB destruction code: https://bugs.freedesktop.org/show_bug.cgi?id=86300
* Replace FT_Outline with ASS_OutlineDr.Smile2014-11-2312-142/+335
|
* Flip coordinate system in rasterizerDr.Smile2014-11-235-161/+153
|
* Fix incorrect closing of last drawing contourDr.Smile2014-11-231-7/+6
|
* Leave spline evaluation to rasterizerDr.Smile2014-11-231-82/+30
|
* Fix broken memory leak check in legacy APIwm42014-11-221-0/+1
| | | | | | | | | | This was a check for the realloc() call, but the result was never used in the success case - which makes no sense. Doesn't really matter, because it's the legacy charset code which hopefully is not used by anyone. Found by Coverity.
* More malloc checkingwm42014-11-202-12/+35
| | | | | | | | Don't crash if running out of memory when allocating per-glyph data during shaping. Also some fixes to initialization. The caller of ass_fontconfig.c/match_fullname() actually handles a NULL return value correctly.
* More malloc checkingwm42014-11-181-12/+27
| | | | In both cases, fallback to doing nothing if alloc fails.
* More malloc checkingwm42014-11-174-11/+10
| | | | | | | | | | Use strndup() instead of malloc+copy. Make all code deal with the possibility that ASS_Drawing.text can be NULL (which can happen on allocation failure). Skip fix_collisions() on malloc failure - the lines will overlap, but at least libass won't crash.
* Provide a strndup() fallbackwm42014-11-172-0/+21
| | | | | This standard function is not available everywhere, so we detect it and provide a fallback if missing.
* Fix some of the recently added checkswm42014-11-171-2/+2
|
* Some more overflow checkswm42014-11-161-4/+15
|
* Deal with code-duplication bullshitwm42014-11-161-1/+1
| | | | | | Much of outline_to_bitmap() is duplicated. What? Add the overflow check to duplicated code too.
* Check the overflow check for overflowswm42014-11-161-1/+1
| | | | | | Seriously... Checking for negative values might not be needed, but do it anyway.
* Check bitmap allocation for overflowswm42014-11-162-1/+6
| | | | | | | | This actually fixes #146. The overflow check itself is obvious. Also, make ass_align() return an unaligned value if aligning it would overflow. This is probably better, as it for example makes the overflow check in the caller simpler.
* Print debug message when loading a memory fontwm42014-11-151-0/+2
|
* Split some parts of ass_render_event into functionswm42014-11-151-276/+332
| | | | | The split doesn't necessarily follow any logic; for the most part it just moves each processing loop into its own function.
* Check some allocations in strike-through codewm42014-11-141-5/+10
|
* Add another helper-macro for array allocationwm42014-11-142-0/+32
|
* Fix recently introduced overflow check (again)wm42014-11-141-6/+2
|
* Fix the bugwm42014-11-141-2/+2
| | | | | | Commit 8536eaa was slightly broken: for some incomprehensible reason, (w + 1) memory instead of w is needed. The missing space could lead to memory corruption and crashes.
* Simplify ass_utils.c codeYouka2014-11-131-48/+22
| | | | Mainly cosmetic, but maybe some optimizations the compiler misses.
* Use stdbool.h in another placewm42014-11-131-8/+8
| | | | Also fix that ass_synth_init() could deref NULL.
* Check for another overflow in blur codewm42014-11-131-18/+20
|
* Move apply_blur() to ass_bitmap.cwm42014-11-134-89/+100
| | | | Put all code into one place, which makes it easier to follow.
* Check against some overflows and allocation failures on blurwm42014-11-112-8/+17
| | | | This still doesn't catch all cases.
* Add ass_realloc_array()wm42014-11-112-0/+20
| | | | Helps with overflow and allocation failure checking.
* Check more mallocswm42014-11-096-16/+84
| | | | This is just a start and gets most easy ones.
* Provide SIZE_MAX fallbackwm42014-11-091-0/+4
| | | | | SIZE_MAX is in C99, but not in C89. It is in <stdint.h>, and is always a macro, so this fallback should be pretty portable and cause no issues.
* Check more allocationsRodger Combs2014-11-082-1/+23
| | | | Part of #146
* Fix UB at left shifts of negative integersDr.Smile2014-11-073-14/+14
|
* Fix subpixel shadow shiftDr.Smile2014-11-062-49/+27
|
* Only use the subpixel value when shifting bitmaps. Fixes #142Rodger Combs2014-11-051-2/+4
|
* Load embedded fonts from memory correctlywm42014-11-041-10/+3
|
* Update version and changelog0.12.0Grigori Goronzy2014-10-232-3/+3
|
* Provide slightly more fine-grained control over style overrideswm42014-10-174-13/+46
|
* Silence compilation warningwm42014-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This fixes the following warnings: In file included from ass_cache.c:34:0: ass_cache_template.h:52:0: warning: "BINSTRING" redefined #define BINSTRING(member) \ ^ In file included from ass_cache.h:59:0, from ass_font.h:58, from ass_cache.c:28: ass_cache_template.h:9:0: note: this is the location of the previous definition #define BINSTRING(member) \ ^ In file included from ass_cache.c:36:0: ass_cache_template.h:30:0: warning: "BINSTRING" redefined #define BINSTRING(member) \ ^ In file included from ass_cache.c:34:0: ass_cache_template.h:52:0: note: this is the location of the previous definition #define BINSTRING(member) \ ^
* Fix caching of combined bitmaps after complex shapingOleg Oshmyan2014-09-053-10/+20
|
* Check FT_Outline_New return valuewm42014-08-311-1/+6
| | | | | Makes #131 not crash. The function likely fails because the number of points exceeds SHRT_MAX.
* Correctly close last contour in case of overflowDr.Smile2014-08-261-1/+4
|
* Check for 0-point contours in rasterizer_set_outline()Dr.Smile2014-08-261-0/+3
| | | | Fixes libass#129.
* Fix \fade(7-argument version) parseMaks Naumov2014-08-231-2/+2
|
* Fix integer overflow in FT_OutlineDr.Smile2014-07-181-0/+4
|
* ass_parse: remove 2 unused variableswm42014-06-091-2/+0
| | | | Fallout from the previous commits.
* Simplify drawing text assignmentOleg Oshmyan2014-06-064-34/+10
|
* Use ass_drawing_add_chars for vector drawingsOleg Oshmyan2014-06-061-28/+20
| | | | | | This not only provides a performance improvement but also conveniently fixes the following issue: we used to interpret backslash-escapes in vector drawings, but we shouldn't.
* parse_tag: remove unnecessary mallocOleg Oshmyan2014-06-063-13/+9
|
* Require closing '}' for override tagsOleg Oshmyan2014-06-063-28/+20
| | | | | | | | Like VSFilter. '{' without a following '}' is just text, though in vector drawing mode it still delimits individual drawings. This also lets us nicely avoid '\0' hacks in the \t override tag handler in parse_tag.
* Introduce ass_drawing_add_chars for adding a whole string at onceOleg Oshmyan2014-06-063-4/+18
|
* Parse override tag arguments exactly like VSFilter 2.38Oleg Oshmyan2014-06-064-255/+314
| | | | | Also replace strtocolor in ass_utils with string2color from ass.c, because that is more useful everywhere now.
* Move (r)skip_spaces to ass_utilsOleg Oshmyan2014-06-063-28/+22
|
* parse_tag: merge \fs+, \fs-, \fsOleg Oshmyan2014-06-061-18/+7
|
* parse_tag: split \fscx, \fscy, \fscOleg Oshmyan2014-06-061-23/+20
|
* Add a mechanism for selective style overrideswm42014-06-057-22/+160
| | | | | | | | | | | | | | | This adds 2 new API functions: ass_set_selective_style_override() ass_set_selective_style_override_enabled() They can be used to force dialog text to use a specific ASS_Style. It uses a fuzzy heuristic for that, and the quality of results may vary. It does style overriding selectively and tries not to override things that need explicit styling. The heuristic for that isn't set in stone either, and can change with future libass versions. Closes libass#88.
* Merge pull request #100 from astiob/strokeGrigori Goronzy2014-06-021-1/+8
|\ | | | | Use FT_Outline_EmboldenXY
| * Use FT_Outline_EmboldenXY if availableOleg Oshmyan2014-05-301-1/+8
| |
* | Add BorderStyle=4, background color for textwm42014-06-012-1/+21
| | | | | | | | | | | | | | | | This is somewhat similar to BorderStyle=3, but with a number of differences. Mainly, this new BorderStyle doesn't create overlaps within an event. Closes #105.
* | Fix change detection when text is clipped to screenwm42014-06-012-4/+8
| | | | | | | | | | | | The glyphs are clipped before combining, so the combined bitmap can always have the same position, size, and address. This breaks the change detection. Or at least I think that's what happens.
* | Remove bitmap restridingwm42014-06-014-43/+0
|/ | | | It turns out we don't need this.
* shaper: add FriBidi error handlingGrigori Goronzy2014-05-293-7/+27
| | | | | | It is unlikely, but FriBidi might not process a string correctly, and we should handle that. Tested by making it fail always. This should also fix some compiler warnings.
* Skip useless memset() when copying a bitmapRodger Combs2014-05-251-3/+11
|
* Fix \1a, \2a, \3a, \4a with invalid argumentOleg Oshmyan2014-05-121-0/+2
| | | | Reset to the initial color's alpha component, not red.
* Reset clipping mode on every rectangle \clipOleg Oshmyan2014-05-121-0/+1
| | | | | | | | Prior to this fix, both of the following: \iclip(0,0,9999,9999)\clip(0,0,9999,9999) \iclip(0,0,0,0)\clip(0,0,9999,9999) hid the whole picture in libass. The correct behavior in both cases is to display the whole picture.
* Make \be animatableOleg Oshmyan2014-05-121-2/+5
| | | | | | | VSFilter has supported this since version 2.39. Use the raw floating-point value of the \be argument in the animation formula, like xy-VSFilter has done since version 3.0.0.45 (404301a3).
* mystrtoll: don't truncate to intOleg Oshmyan2014-05-121-1/+1
|
* Fix corner case: \move with identical start and end timesOleg Oshmyan2014-05-121-2/+2
|
* Implement fast quad-tree rasterizer in C and x86/SSE2/AVX2Dr.Smile2014-04-2910-16/+2365
| | | | Signed-off-by: Rodger Combs <rodger.combs@gmail.com>
* Fix premature parser exit on }{ in drawing modeOleg Oshmyan2014-04-271-1/+1
| | | | Fixes #75.
* Update version info and changelog0.11.2Grigori Goronzy2014-04-251-1/+1
|
* Initialize \pbo for each eventOleg Oshmyan2014-04-101-0/+1
| | | | | Regression in commit 1f5eb5eb. Fixes issue #74.
* Don't crash on \fscx0 with non-zero \blurOleg Oshmyan2014-03-281-5/+2
| | | | Regression in commit 98707694.
* shaper: fix nasty sign bug in font functionsGrigori Goronzy2014-03-171-1/+1
| | | | Fixes issue #68.
* drawing: parse numbers as floatsGrigori Goronzy2014-03-151-9/+8
| | | | | | | Parse values as float and convert into 26.6 fixed point. This actually simplifies scaling a bit. Fixes #63.
* Remove dirty pixels from ASM be_blur outputOleg Oshmyan2014-03-131-6/+8
| | | | | | | | A loop initializer was missing, so output started one row too early. A loop condition check was missing, so output sometimes stopped one column too late. Also remove a couple of dead assignments.
* Fix handling of top two pixel rows in be_blur_cOleg Oshmyan2014-03-131-3/+4
| | | | | | | | | 5dd56af2 replaced our implementation of \be with xy-VSFilter's. This error is not present in the xy-VSFilter code; it was introduced by accident in a merge that was later squashed as part of 5dd56af2. Note: the new \be reads in but does not write out the first and last row and column of pixels.
* Remove incorrect declaration of HAVE_ALIGNED_STACK11rcombs2014-03-091-1/+0
|
* Better fix for zero area outlinesDr.Smile2014-03-071-2/+8
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Commit 04b51c2d broke BorderStyle=3 with text that had spaces.
* Fix API documentation of change detectionGrigori Goronzy2014-03-061-2/+2
|
* Fix change detection in presence of vector clipswm42014-03-062-1/+5
| | | | | | | | | | | | | | | | | Fixes this test case: Dialogue: 0,0:00:00.00,0:00:02.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 220 l0 220)}Hello Dialogue: 0,0:00:02.00,0:10:00.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 230 l0 230)}Hello The problem here is that the rendered output bitmap list itself does not change, only its contents (due to the different vector clip). ass_render_frame() will not set *detect_change correctly, and an application using this flag (like mplayer or mpv) will not update the screen as needed. Fix this with a very cheap hack: always report a full change if there's a vector clip. This is basically an emergency fix until we have a proper way to detect the change.
* Actually export ass_library_version symbolwm42014-03-041-0/+1
| | | | | | Patch by chadr...@gmail.com. Fixes libass#58, GC#117.
*