[FFmpeg-trac] #5980(avfilter:new): vf_zscale.c missing "allow_approximate_gamma" parameter to libzimg
FFmpeg
trac at avcodec.org
Sun Nov 27 01:02:24 EET 2016
#5980: vf_zscale.c missing "allow_approximate_gamma" parameter to libzimg
----------------------------------+---------------------------------------
Reporter: lvml | Type: enhancement
Status: new | Priority: normal
Component: avfilter | Version: git-master
Keywords: zscale | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+---------------------------------------
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.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5980>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list