#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 by , 7 years ago
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 4719e563a4237adb5bf83119bba46b61c2e40ceb.
(See also https://github.com/sekrit-twc/zimg/issues/59 on this issue.)