Opened 23 months ago

Closed 23 months ago

Last modified 23 months 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:1 Changed 23 months ago by lvml

comment:2 Changed 23 months ago by richardpl

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 23 months ago by lvml

Thanks a lot!

Note: See TracTickets for help on using tickets.