[FFmpeg-devel] [PATCH] avfilter: add audio pulsator filter
gajjanag at mit.edu
Sun Nov 29 03:48:31 CET 2015
On Sat, Nov 28, 2015 at 6:21 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Sat, Nov 28, 2015 at 5:26 PM, Paul B Mahol <onemda at gmail.com> wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> + case SQUARE:
>> + val = (phs < 0.5) ? -1 : +1;
> Something I missed: consider using e.g FFSIGN(phs - 0.5) or FFSIGN(0.5
> - phase), can't recall.
This I still suggest for readability.
> This is actually important because if one
> feeds in 0.5 exactly (which is exactly representable), val becomes
> unitialized and hence garbage.
Sorry, this was complete garbage and should be ignored. What you
choose to do at the discontinuity is practically irrelevant. The
"purest" thing to do is take the midpoint of the jump, i.e 0 per
Fourier theory, but I don't think it is good due to an extra bench for
essentially zero gain.
More information about the ffmpeg-devel