Opened 3 hours ago

Last modified 17 minutes ago

#11254 open defect

"-sws_dither none" seemingly does not work for 8 bit content

Reported by: MasterQuestionable Owned by:
Priority: important Component: swscale
Version: git-master Keywords: sws_dither
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

͏    The option appears recognized from the debug output.
͏    And indeed affecting threading:
[swscaler] Error-diffusion dither is in use, scaling will be single-threaded.
͏    .
͏    But the output doesn't appear influenced: as if fixed to certain predefined dither.

͏    Testing the [ https://trac.ffmpeg.org/wiki/colorspace#yuv444p ] e.g.
͏    ffmpeg -y -v trace -hide_banner -nostdin -nostats -i "origin(rgb24).webp" -pix_fmt yuv444p -sws_dither none -sws_flags spline+accurate_rnd+full_chroma_int -color_range 1 -colorspace 5 -color_primaries 5 -color_trc 6 -c:v libx264 -preset placebo -qp 0 -x264-params "keyint=15:no-deblock=1" "yuv444p.avi"
͏    ; etc.
͏    Trying every possible value of "-sws_dither" in:
͏    https://ffmpeg.org/ffmpeg-scaler.html
͏    ; resulted identical output.
͏    Which is likely unsensible.

͏    The converted WebP ("yuv444p.webp") also indicated certain dither in-use: file size bigger than original ("origin(rgb24).webp").
͏    See also: https://trac.ffmpeg.org/ticket/11182#comment:16
͏    .
͏    Such conversion without dither tends to make colors more similar: thus improve compressibility.

Change History (2)

comment:1 by MasterQuestionable, 3 hours ago

͏=== See also ===

͏    Command line switch "-sws_dither" doesn't allow "none"
͏    https://trac.ffmpeg.org/ticket/9192

͏    "-sws_dither" arguments aren't affecting output in colorspace conversion
͏    https://trac.ffmpeg.org/ticket/4614

͏    https://trac.ffmpeg.org/ticket/9407#comment:12
͏    https://trac.ffmpeg.org/ticket/979#comment:24
͏    https://trac.ffmpeg.org/search?noquickjump=1&ticket&q=sws_dither

comment:2 by Balling, 17 minutes ago

Status: newopen
Summary: "-sws_dither" seemingly ineffective"-sws_dither none" seemingly does not work for 8 bit content

Why did you open this? sws_dither does work, both scale=sws_dither=0 or scale=sws_dither=none or -sws_dither 0.

It just does not work for some specific cases, like when bitdepth does not change, see update in https://trac.ffmpeg.org/ticket/979#comment:24

Note: See TracTickets for help on using tickets.