[FFmpeg-devel] [RFC]] swscale modernization proposal

Hendrik Leppkes h.leppkes at gmail.com
Sat Jul 6 03:11:30 EEST 2024


On Fri, Jul 5, 2024 at 11:34 PM Michael Niedermayer
<michael at niedermayer.cc> wrote:
> > /**
> >  * The exact interpretation of these quality presets depends on the backend
> >  * used, but the backend-invariant common settings are derived as follows:
> >  */
> > enum AVScaleQuality {
> >     AV_SCALE_ULTRAFAST = 1,  /* no dither,      nearest+nearest     */
> >     AV_SCALE_SUPERFAST = 2,  /* no dither,      bilinear+nearest    */
> >     AV_SCALE_VERYFAST  = 3,  /* no dither,      bilinear+bilinear   */
> >     AV_SCALE_FASTER    = 4,  /* bayer dither,   bilinear+bilinear   */
> >     AV_SCALE_FAST      = 5,  /* bayer dither,   bicubic+bilinear    */
> >     AV_SCALE_MEDIUM    = 6,  /* bayer dither,   bicubic+bicubic     */
> >     AV_SCALE_SLOW      = 7,  /* bayer dither,   lanczos+bicubic     */
> >     AV_SCALE_SLOWER    = 8,  /* full dither,    lanczos+bicubic     */
> >     AV_SCALE_VERYSLOW  = 9,  /* full dither,    lanczos+lanczos     */
> >     AV_SCALE_PLACEBO   = 10, /* full dither,    lanczos+lanczos     */
>
> I dont think its a good idea to hardcode dither and the "FIR" filter to the quality level in the API
>

The entire point of presets is to have them provide a predefined set
of parameters, easy for users to pick one value, rather than a bunch.
And what a preset actually means should be documented.
How do you define "presets" if they don't hardcode a list of choices
for all the relevant options?

Advanced settings exist for a user to select any particular detail, if
they so desire.

- Hendrik


More information about the ffmpeg-devel mailing list