Fix convolution vector path posterization

This fixes posterization in the vector path for convolution caused by a
typo in commit eefb2dad98.

The fix was suggested by @jcupitt.
This commit is contained in:
Felix Bünemann 2018-06-13 17:18:55 +02:00
parent af47ba964a
commit 2041deb917

View File

@ -909,7 +909,7 @@ vips_convi_intize( VipsConvi *convi, VipsImage *M )
* later, so 1.0 (for example) would become 128, which is outside
* signed 8 bit.
*/
shift = ceil( log2( mx + 1 ) );
shift = ceil( log2( mx ) + 1 );
/* We need to sum n_points, so we have to shift right before adding a
* new value to make sure we have enough range.