[FFmpeg-devel] [PATCH 1/2] fftools/cmdutils: make the default swscale flags identical for simple and complex filter graph
Michael Niedermayer
michael at niedermayer.cc
Mon Aug 2 19:48:39 EEST 2021
On Sun, Aug 01, 2021 at 04:08:17PM +0200, Nicolas George wrote:
> Linjie Fu (12021-08-01):
> > Checked swscale, it uses bicubic by default.
> > Scale filter sets the flags to bilinear if sws_scale_opt is not initialized
> > by sws_dict.
> >
> > We should use the same default flags for both simple and complex filter
> > graphs, either from swscale, or from scale filter.
> > If prefer to keep it identical with swscale, we may modify the flags in the
> > scale filter.
>
> Thanks. I also think that unless there is a good reason, we should rely
> on a single default, from the lowest level. So:
>
> - remove flags="bilinear" from vf_scale;
>
> - remove setting defaults in ffmpeg.
>
> Unless somebody can find a good reason for different defaults.
>
> Michael, it is your commit, 8155bbc944c314fc202d31b0e4a3c77b8efc8dde,
> that introduced it. Any comments?
>
> Also, the current code in libswscale looks nonsensical:
>
> if (dstW < srcW && dstH < srcH)
> flags |= SWS_BICUBIC;
> else if (dstW > srcW && dstH > srcH)
> flags |= SWS_BICUBIC;
> else
> flags |= SWS_BICUBIC;
>
> It was originally 6b3ff6f91a535d6383f41ca7bdf760165dcb6015 with some
> logic, but it was cancelled by the merge commit
> 5710f55e490d0c3cf7348b3ca91c8c0fe4274be2.
>
> "The default is left at bicubic until someone has compared the scalers
> properly speed and quality wise."
>
> But eight years later nobody did.
In case someone tests this, it should test
1. human subjective quality in addition to some objective quality
2. scaling + compression
3. various material, noisy and less crisp material may favor
different scalers than super flawless crisp images
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/20210802/d9f582d0/attachment.sig>
More information about the ffmpeg-devel
mailing list