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

Michael Niedermayer michael at niedermayer.cc
Sat Sep 23 18:01:53 EEST 2017


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 >= 9,
> we can use simple down-shift which is neutral in full and limited range -- result images
> are with the same brightness and with the same colors.

Theres no reason why dither should mess up the average color tone.
And if the user asks for >= 9 bit depth and has >= 10 bit input the
user likely wants to get the best quality.
Thats more so in a world where computers get faster every few years,
this isnt 1995 where shaving off a add or a multiply per pixel was
actually making a difference in being able to play something in
realtime
More so coverting between bit depths might be memory speed limited and
not limited by arithmetic computations once its done in SIMD


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170923/b183d78c/attachment.sig>


More information about the ffmpeg-devel mailing list