Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-27 Thread Hendrik Leppkes
On Wed, Sep 27, 2017 at 12:04 PM, Mateusz wrote: > > OK, so this fight with possible overflow is even more needed. > Luckily x86 SIMD has saturating instructions which don't overflow, so if we device a way to properly optimize this in yasm/nasm assembly, then this should

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-27 Thread Mateusz
W dniu 2017-09-26 o 13:31, Carl Eugen Hoyos pisze: > 2017-09-26 1:33 GMT+02:00 Mateusz : > >> I've sent C code patch 2017-09-06 (and nothing) so I thought that the >> problem is with speed. For simplicity I've attached this patch. > > You could (wait a day or two and)

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-26 Thread Carl Eugen Hoyos
2017-09-26 1:33 GMT+02:00 Mateusz : > I've sent C code patch 2017-09-06 (and nothing) so I thought that the > problem is with speed. For simplicity I've attached this patch. You could (wait a day or two and) either add an option to select your dithering code or put it

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-25 Thread Mateusz
W dniu 2017-09-25 o 22:53, Carl Eugen Hoyos pisze: > 2017-09-23 19:18 GMT+02:00 Mateusz : >> W dniu 2017-09-23 o 17:01, Michael Niedermayer pisze: >>> On Fri, Sep 22, 2017 at 02:10:01AM +0200, Mateusz wrote: To reduce bit depth in planar YUV or gray pixel formats

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-25 Thread Carl Eugen Hoyos
2017-09-23 19:18 GMT+02:00 Mateusz : > W dniu 2017-09-23 o 17:01, Michael Niedermayer pisze: >> On Fri, Sep 22, 2017 at 02:10:01AM +0200, Mateusz wrote: >>> To reduce bit depth in planar YUV or gray pixel formats >>> ffmpeg uses DITHER_COPY macro. >>> Now it makes images

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-25 Thread Mateusz
W dniu 2017-09-25 o 01:42, Carl Eugen Hoyos pisze: > 2017-09-23 19:18 GMT+02:00 Mateusz : > >> In reality -- current version of DITHER_COPY mess >> up the average color tone. > > You could explain how we can reproduce this. Please take any video with colors that you can

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-24 Thread Carl Eugen Hoyos
2017-09-23 19:18 GMT+02:00 Mateusz : > In reality -- current version of DITHER_COPY mess > up the average color tone. You could explain how we can reproduce this. Carl Eugen ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-23 Thread Mateusz
W dniu 2017-09-23 o 17:01, Michael Niedermayer pisze: > On Fri, Sep 22, 2017 at 02:10:01AM +0200, Mateusz wrote: >> To reduce bit depth in planar YUV or gray pixel formats ffmpeg uses >> DITHER_COPY macro. >> Now it makes images greener and with visible dither pattern. >> >> In my opinion there

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-23 Thread Michael Niedermayer
On Fri, Sep 22, 2017 at 02:10:01AM +0200, Mateusz wrote: > To reduce bit depth in planar YUV or gray pixel formats ffmpeg uses > DITHER_COPY macro. > Now it makes images greener and with visible dither pattern. > > In my opinion there is no point to use dither tables for destination bit > depth

Re: [FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

2017-09-22 Thread Hendrik Leppkes
On Fri, Sep 22, 2017 at 2:10 AM, Mateusz wrote: > To reduce bit depth in planar YUV or gray pixel formats ffmpeg uses > DITHER_COPY macro. > Now it makes images greener and with visible dither pattern. > > In my opinion there is no point to use dither tables for