On Sat, Nov 28, 2015 at 6:21 PM, Ganesh Ajjanagadde <gajja...@mit.edu> wrote:
> On Sat, Nov 28, 2015 at 5:26 PM, Paul B Mahol <one...@gmail.com> wrote:
>> Signed-off-by: Paul B Mahol <one...@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.

>
> [...]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to