[FFmpeg-trac] #9192(swscale:new): Command line switch sws_dither doesn't allow "none"

FFmpeg trac at avcodec.org
Sat Apr 17 08:23:13 EEST 2021


#9192: Command line switch sws_dither doesn't allow "none"
---------------------------------------+-----------------------------------
             Reporter:  Videogamer555  |                    Owner:
                 Type:  defect         |                   Status:  new
             Priority:  minor          |                Component:  swscale
              Version:  git-master     |               Resolution:
             Keywords:                 |               Blocked By:
             Blocking:                 |  Reproduced by developer:  0
Analyzed by developer:  0              |
---------------------------------------+-----------------------------------

Comment (by Videogamer555):

 Replying to [comment:4 Anton1699]:
 > This is the relevant part of `ffmpeg -h filter=scale`:
 > {{{
 > -sws_dither        <int>        E..V....... set dithering algorithm
 (from 0 to 6) (default auto)
 >      auto            1            E..V....... leave choice to sws
 >      bayer           2            E..V....... bayer dither
 >      ed              3            E..V....... error diffusion
 >      a_dither        4            E..V....... arithmetic addition dither
 >      x_dither        5            E..V....... arithmetic xor dither
 > }}}
 >
 > Looks like `none` isn't a valid value. I guess you could try
 `-sws_dither 0` instead.

 But "none" is SUPPOSED TO BE a valid value. In the official documentation
 at https://ffmpeg.org/ffmpeg-scaler.html it says that for the sws_dither
 command line switch, that "none" is a valid value. Here's a block quote of
 the relevant section there.

 {{{
 sws_dither

     Set the dithering algorithm. Accepts one of the following values.
 Default value is ‘auto’.

     ‘auto’
         automatic choice

     ‘none’
         no dithering

     ‘bayer’
         bayer dither

     ‘ed’
         error diffusion dither

     ‘a_dither’
         arithmetic dither, based using addition

     ‘x_dither’
         arithmetic dither, based using xor (more random/less apparent
 patterning that a_dither).
 }}}

 The bug here is that the software is not behaving as the official
 documentation states. I can think of several ways this may occur. The
 software is supposed to behave as the docs say, but the programmers forgot
 to write the functionality into the code. Or this was part of a beta or
 experimental feature that never got added, but was mistakenly put in the
 official documentation. Or was an old feature that has long ago been
 removed, but the documentation hasn't been updated accordingly. This
 feature is planned for some future version, but the person writing the
 documentation mistakenly documented this feature before it was actually in
 the software.

 Whatever the case may be, the mismatch of the documentation and the
 software's actual features is a bug that needs to be fixed. Either add the
 feature to the software, or remove the text describing the feature from
 the official documentation.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9192#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list