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

2017-09-11 Thread Mateusz
W dniu 2017-09-06 o 09:27, Mateusz pisze: > W dniu 2017-09-06 o 02:07, Michael Niedermayer pisze: >> On Wed, Sep 06, 2017 at 01:25:45AM +0200, Mateusz wrote: >>> W dniu 2017-09-05 o 23:37, Michael Niedermayer pisze: On Tue, Sep 05, 2017 at 04:42:06PM +0200, Mateusz wrote: > W dniu

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

2017-09-06 Thread Mateusz
W dniu 2017-09-06 o 02:07, Michael Niedermayer pisze: > On Wed, Sep 06, 2017 at 01:25:45AM +0200, Mateusz wrote: >> W dniu 2017-09-05 o 23:37, Michael Niedermayer pisze: >>> On Tue, Sep 05, 2017 at 04:42:06PM +0200, Mateusz wrote: W dniu 2017-09-05 o 15:40, Michael Niedermayer pisze: > On

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

2017-09-05 Thread Michael Niedermayer
On Wed, Sep 06, 2017 at 01:25:45AM +0200, Mateusz wrote: > W dniu 2017-09-05 o 23:37, Michael Niedermayer pisze: > > On Tue, Sep 05, 2017 at 04:42:06PM +0200, Mateusz wrote: > >> W dniu 2017-09-05 o 15:40, Michael Niedermayer pisze: > >>> On Mon, Sep 04, 2017 at 09:33:34AM +0200, Mateusz wrote: >

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

2017-09-05 Thread Mateusz
W dniu 2017-09-05 o 23:37, Michael Niedermayer pisze: > On Tue, Sep 05, 2017 at 04:42:06PM +0200, Mateusz wrote: >> W dniu 2017-09-05 o 15:40, Michael Niedermayer pisze: >>> On Mon, Sep 04, 2017 at 09:33:34AM +0200, Mateusz wrote: If ffmpeg reduces bit-depth to 8-bit or more, it uses

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

2017-09-05 Thread Michael Niedermayer
On Tue, Sep 05, 2017 at 04:42:06PM +0200, Mateusz wrote: > W dniu 2017-09-05 o 15:40, Michael Niedermayer pisze: > > On Mon, Sep 04, 2017 at 09:33:34AM +0200, Mateusz wrote: > >> If ffmpeg reduces bit-depth to 8-bit or more, it uses DITHER_COPY macro. > >> The problem is DITHER_COPY macro make

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

2017-09-05 Thread Mateusz
W dniu 2017-09-05 o 15:40, Michael Niedermayer pisze: > On Mon, Sep 04, 2017 at 09:33:34AM +0200, Mateusz wrote: >> If ffmpeg reduces bit-depth to 8-bit or more, it uses DITHER_COPY macro. >> The problem is DITHER_COPY macro make images darker (on all planes). >> >> In x265 project there is issue

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

2017-09-05 Thread Michael Niedermayer
On Mon, Sep 04, 2017 at 09:33:34AM +0200, Mateusz wrote: > If ffmpeg reduces bit-depth to 8-bit or more, it uses DITHER_COPY macro. > The problem is DITHER_COPY macro make images darker (on all planes). > > In x265 project there is issue #365 which is caused by this DITHER_COPY bug. > I think it

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

2017-09-04 Thread Mateusz
If ffmpeg reduces bit-depth to 8-bit or more, it uses DITHER_COPY macro. The problem is DITHER_COPY macro make images darker (on all planes). In x265 project there is issue #365 which is caused by this DITHER_COPY bug. I think it is time to fix -- there are more and more high bit-depth sources.

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 > >>

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

2017-03-20 Thread Carl Eugen Hoyos
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 > 1023); > 2) for limit range the lower limit is not respected,

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 15, 2017 at

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-bit to 10-bit (output value > >>

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-bit to 10-bit (output value > >>

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

2017-03-16 Thread Michael Niedermayer
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-bit to 10-bit (output value > 1023); > 2) for limit range the lower limit is not respected, for

[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