]> granicus.if.org Git - libass/commit
Fix glyph overlap blending
authorGrigori Goronzy <greg@blackbox>
Sun, 23 Aug 2009 01:49:22 +0000 (03:49 +0200)
committerGrigori Goronzy <greg@blackbox>
Sun, 23 Aug 2009 02:31:25 +0000 (04:31 +0200)
commit0db2bfa543b90cbabac621a4d2f3362b9d746c11
tree68fb79d180cca3062c717aa28404fd24af8039a7
parent2eae3a9907c211457e3ba8690fcd5ca54f77bcce
Fix glyph overlap blending

Use the bitmap pointer for the cache hash key.  This preserves the
blending history, which fixes occasional corruptions due to previous
replacements not being dealt with correctly.  It also simplifies the
hash key a lot and thus speeds up cache lookups.

Additionally, change the blending equation from max(a, b) to min(a + b,
0xff), i.e. a saturating addition.  Usually this looks a lot better.
libass/ass_cache_template.h
libass/ass_render.c