[FFmpeg-devel] Controlling sws dithering.

Michael Niedermayer michael at niedermayer.cc
Thu Jul 8 14:02:27 EEST 2021


On Wed, Jul 07, 2021 at 01:44:29PM +0200, Steinar Apalnes wrote:
> Hi,
> 
> I tried posting a similar question to the ffmpeg user list but got no
> response. So I'm trying my luck here now. The thing is I need to be able to
> control how the sws dither behaves.
> Using a build from master (26.06.2021) I would expect to see different
> frame hash on the these two commands:
> 
> ffmpeg -f lavfi -i mandelbrot -vf scale=sws_dither=none,format=rgb4_byte
> -vframes 1 -f framehash -
> ffmpeg -f lavfi -i mandelbrot -vf scale=sws_dither=ed,format=rgb4_byte
> -vframes 1 -f framehash -
> 
> But they are identical:
> b1c1ff5ea2221c0d0afaa86dec593491fd85fa2d5f5a377ff9c2e6c3ab5be5bb
> Also, the following variations creates the same results.
> 
> ffmpeg -f lavfi -i mandelbrot -sws_dither none -pix_fmt rgb4_byte -vframes
> 1 -f framehash -
> ffmpeg -f lavfi -i mandelbrot -sws_dither ed -pix_fmt rgb4_byte -vframes 1
> -f framehash -
> 
> Does anyone have a clue on what I might be doing wrong or is the sws dither
> control simply broken?

you found a bug, dither none was not supported for the codepath this used
i will post a patch fixing this in a moment

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210708/69337810/attachment.sig>


More information about the ffmpeg-devel mailing list