diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2014-03-12 22:06:28 +0000 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2014-03-13 00:31:07 +0000 |
commit | 0812f507e3941cf93075378858ccf747c8aeb241 (patch) | |
tree | e32c18134a98162784cf0c58ae0b6f49e1fc59a1 /libass/ass_bitmap.c | |
parent | 817bb3b1e192b94e0fc27ede617dbb2fe534d3ef (diff) | |
download | libass-0812f507e3941cf93075378858ccf747c8aeb241.tar.bz2 libass-0812f507e3941cf93075378858ccf747c8aeb241.tar.xz |
Fix handling of top two pixel rows in be_blur_c
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.
Diffstat (limited to 'libass/ass_bitmap.c')
-rw-r--r-- | libass/ass_bitmap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libass/ass_bitmap.c b/libass/ass_bitmap.c index f214651..33f06c4 100644 --- a/libass/ass_bitmap.c +++ b/libass/ass_bitmap.c @@ -436,7 +436,7 @@ void be_blur_c(uint8_t *buf, intptr_t w, { unsigned short *col_pix_buf = tmp; unsigned short *col_sum_buf = tmp + w * sizeof(unsigned short); - unsigned x, y, old_pix, old_sum, new_sum, temp1, temp2; + unsigned x, y, old_pix, old_sum, temp1, temp2; unsigned char *src, *dst; memset(col_pix_buf, 0, w * sizeof(unsigned short)); memset(col_sum_buf, 0, w * sizeof(unsigned short)); @@ -456,9 +456,10 @@ void be_blur_c(uint8_t *buf, intptr_t w, col_pix_buf[x] = temp1; } } - new_sum = 2 * buf[y * stride + w - 1]; - buf[y * stride + w - 1] = (old_sum + new_sum) >> 2; { + y = 1; + src=buf+y*stride; + x = 2; old_pix = src[x-1]; old_sum = old_pix + src[x-2]; |