Re: [FFmpeg-devel] [PATCH] libswscale/swscale_unscaled: fix DITHER_COPY macro

2017-03-18 Thread Mateusz Brzostek
W dniu 2017-03-16 o 19:17, Michael Niedermayer pisze: > On Wed, Mar 15, 2017 at 10:52:29PM +0100, Mateusz Brzostek wrote: >> Hello! >> >> There are 3 problems with DITHER_COPY macro in libswscale/swscale_unscaled.c: >> 1) there is overflow in dithering from 12-

Re: [FFmpeg-devel] [PATCH] libswscale/swscale_unscaled: fix DITHER_COPY macro

2017-03-20 Thread Mateusz Brzostek
In previous patch there was missing braces {} in for (; j < length; j++) loop. Please ignore that patch. New patch with braces and without FFMIN macro. Mateusz W dniu 2017-03-18 o 21:28, Mateusz Brzostek pisze: > W dniu 2017-03-16 o 19:17, Michael Niedermayer pisze: >> On Wed, Mar

Re: [FFmpeg-devel] [PATCH] libswscale/swscale_unscaled: fix DITHER_COPY macro

2017-03-20 Thread Mateusz Brzostek
W dniu 2017-03-20 o 10:00, Carl Eugen Hoyos pisze: > 2017-03-15 22:52 GMT+01:00 Mateusz Brzostek : >> Hello! >> >> There are 3 problems with DITHER_COPY macro in libswscale/swscale_unscaled.c: >> 1) there is overflow in dithering from 12-bit to 10-bit (output value &

[FFmpeg-devel] [PATCH] libswscale/swscale_unscaled: fix DITHER_COPY macro

2017-03-15 Thread Mateusz Brzostek
Hello! There are 3 problems with DITHER_COPY macro in libswscale/swscale_unscaled.c: 1) there is overflow in dithering from 12-bit to 10-bit (output value > 1023); 2) for limit range the lower limit is not respected, for example from 10-bit to 8-bit value 64 is converted to 15; 3) for many iterat

Re: [FFmpeg-devel] [PATCH] libswscale/swscale_unscaled: fix DITHER_COPY macro

2017-03-16 Thread Mateusz Brzostek
W dniu 2017-03-16 o 19:17, Michael Niedermayer pisze: > On Wed, Mar 15, 2017 at 10:52:29PM +0100, Mateusz Brzostek wrote: >> Hello! >> >> There are 3 problems with DITHER_COPY macro in libswscale/swscale_unscaled.c: >> 1) there is overflow in dithering from 12-