Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5980 closed enhancement (fixed)

vf_zscale.c missing "allow_approximate_gamma" parameter to libzimg

Reported by: lvml Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: zscale
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The zscale filter has no option to choose the "allow_approximate_gamma" parameter, and by default that parameter is zero, causing excessively slow scaling, because for every pixel, transcendent math functions are invoked for certain transfer functions.

IMHO, allow_approximate_gamma = 1 should be the default, it speeds up "zscale" by an order of magnitude without visible differences in the result, and inserting

#if ZIMG_API_VERSION >= ZIMG_MAKE_API_VERSION(2, 2)
params.allow_approximate_gamma = 1;
#endif

at https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_zscale.c#L478 is enough to achieve this.

Of course, a filter option to control this would be even better.

Change History (3)

comment:2 by Elon Musk, 7 years ago

Resolution: fixed
Status: newclosed

comment:3 by lvml, 7 years ago

Thanks a lot!

Note: See TracTickets for help on using tickets.