diff options
author | Grigori Goronzy <greg@blackbox> | 2009-08-23 03:49:22 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-08-23 04:31:25 +0200 |
commit | 0db2bfa543b90cbabac621a4d2f3362b9d746c11 (patch) | |
tree | 68fb79d180cca3062c717aa28404fd24af8039a7 /libass/ass_cache_template.h | |
parent | 2eae3a9907c211457e3ba8690fcd5ca54f77bcce (diff) | |
download | libass-0db2bfa543b90cbabac621a4d2f3362b9d746c11.tar.bz2 libass-0db2bfa543b90cbabac621a4d2f3362b9d746c11.tar.xz |
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.
Diffstat (limited to 'libass/ass_cache_template.h')
-rw-r--r-- | libass/ass_cache_template.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libass/ass_cache_template.h b/libass/ass_cache_template.h index 8d182ade..f335c6b2 100644 --- a/libass/ass_cache_template.h +++ b/libass/ass_cache_template.h @@ -108,8 +108,10 @@ START(composite, composite_hash_key) GENERIC(int, ay) GENERIC(int, bx) GENERIC(int, by) - BITMAPHASHKEY(a) - BITMAPHASHKEY(b) + GENERIC(int, as) + GENERIC(int, bs) + GENERIC(unsigned char *, a) + GENERIC(unsigned char *, b) END(CompositeHashKey) |