summaryrefslogtreecommitdiffstats
path: root/libass
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Don't crash on \fscx0wm42014-03-031-0/+3
| | | | | | | | | | | | | | Freetype can return a bounding box with all fields set to INT_MIN if an outline with all points set to 0 is used. This can happen e.g. with \fscx0, but also in more complicated cases. (In the original crashing sample, this was probably caused in combination with an embedded font.) Such a bounding box causes libass to crash, because it will enlarge the combined bitmap bounding box to a ridiculous size. Just skip outlines that have en empty bounding box. This is probably the correct thing to do, and won't pass INT_MAX down to other parts of libass.
* Don't use an unsigned it to check for <0 :|11rcombs2014-02-281-1/+1
|
* Assume SSE2 on x86_6411rcombs2014-02-281-6/+3
|
* Redesigned configure/Makefile setup11rcombs2014-02-241-27/+5
| | | | | | Adds yasm version check and handles Free/OpenBSD/win32 correctly. Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
* Update version info and changelog0.11.1Grigori Goronzy2014-02-191-1/+1
|
* Add missing distfilesGrigori Goronzy2014-02-191-3/+3
|
* Update version infoGrigori Goronzy2014-02-181-1/+1
|
* We have aligned stack on Win6411rcombs2014-02-171-1/+1
|
* Define HAVE_ALIGNED_STACK; should wrap up #4811rcombs2014-02-171-6/+6
|
* Fix limits.h includesGrigori Goronzy2014-02-174-0/+4
| | | | These were missing in several places. Fixes #50.
* Remove unnecessary instruction11rcombs2014-02-161-3/+0
|
* Added XMM register count in be_blur; should help #4811rcombs2014-02-161-2/+2
|
* Use lower mm registers in be_blur.asm11rcombs2014-02-161-8/+8
|
* Added license headers in ASM files11rcombs2014-02-163-0/+48
|
* Don't include skipped glyphs in combined bitmapsOleg Oshmyan2014-02-121-3/+7
| | | | | | | Make sure to correctly handle situations where glyphs have info->linebreak and info->skip set at the same time. Fixes libass#44.
* Don't reset wrap_style on \rGrigori Goronzy2014-02-111-1/+1
| | | | This isn't part of a style. Fixes libass#45, GC#116.
* Font metrics: FreeType falls back to sTypoAscender/DescenderOleg Oshmyan2014-02-111-4/+8
| | | | Fixes libass#8.
* Use cluster advance in compute_string_bbox to account for \fspOleg Oshmyan2014-02-111-7/+4
| | | | Fixes libass#16 (the remaining sub-issue).
* Use a function for aligned memory allocationswm42014-02-025-25/+51
| | | | ...instead of doing this manually.
* Fix subpixel jumping of rotated glyph runsOleg Oshmyan2014-01-293-1/+8
| | | | | Rotation origin was not taken into account when caching glyph run bitmaps.
* Merge pull request #39 from grigorig/shaper-hash-optGrigori Goronzy2014-01-292-9/+14
|\ | | | | Shaper and hash function optimizations
| * Unroll FNV-1A hash functionGrigori Goronzy2014-01-291-4/+9