diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-18 23:01:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-18 23:26:00 +0100 |
commit | 646ade76793c49317d05d54dc254d28f6738adbd (patch) | |
tree | decbbe098553a10f23227b47d3107055e2bb2d80 /libswscale/swscale.c | |
parent | 24bbc416a4d8e2ed015b0d56aabbf4c49360fb8e (diff) | |
download | ffmpeg-646ade76793c49317d05d54dc254d28f6738adbd.tar.gz |
sws: Support error diffusion dither for mono output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 2c9e3da86e..dbe61c7a97 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -910,6 +910,11 @@ int attribute_align_arg sws_scale(struct SwsContext *c, src2[0] = base; } + if (!srcSliceY && (c->flags & SWS_ERROR_DIFFUSION)) + for (i = 0; i < 4; i++) + memset(c->dither_error[i], 0, sizeof(c->dither_error[0][0]) * (c->dstW+2)); + + // copy strides, so they can safely be modified if (c->sliceDir == 1) { // slices go from top to bottom |