diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2014-03-13 03:15:18 +0000 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2015-02-10 04:42:35 +0200 |
commit | 0f367cc55086e46070e4c4cda9a1800176bed3c0 (patch) | |
tree | fac7afe0b15febf7ee5d30e8b5c44ba30ceeadbb /libass/ass_bitmap.h | |
parent | 461ba65d18957aa20c686c22d4f73d930c602146 (diff) | |
download | libass-0f367cc55086e46070e4c4cda9a1800176bed3c0.tar.bz2 libass-0f367cc55086e46070e4c4cda9a1800176bed3c0.tar.xz |
Calculate \be using [0..64] value range (like VSFilter)
To avoid banding in the output, the full [0..255] value range
is restored before the last \be pass, which then uses the full
range and hides the bands by virtue of being a blur.
With this, our \be finally closely matches VSFilter's.
The only visible difference (other than the lack of banding) is
in clipping: we add proper padding and output the whole blurred
image, while VSFilter does not add any padding and hence clips
the blurred image too early.
Diffstat (limited to 'libass/ass_bitmap.h')
-rw-r--r-- | libass/ass_bitmap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libass/ass_bitmap.h b/libass/ass_bitmap.h index 9a36a3ec..5014f51a 100644 --- a/libass/ass_bitmap.h +++ b/libass/ass_bitmap.h @@ -72,6 +72,10 @@ void ass_gauss_blur(unsigned char *buffer, unsigned *tmp2, void be_blur_c(uint8_t *buf, intptr_t w, intptr_t h, intptr_t stride, uint16_t *tmp); +void be_blur_pre(uint8_t *buf, intptr_t w, + intptr_t h, intptr_t stride); +void be_blur_post(uint8_t *buf, intptr_t w, + intptr_t h, intptr_t stride); void add_bitmaps_c(uint8_t *dst, intptr_t dst_stride, uint8_t *src, intptr_t src_stride, intptr_t height, intptr_t width); |