[FFmpeg-devel] [PATCH] lavfi: phasescope filter
Paul B Mahol
onemda at gmail.com
Sat Mar 30 13:26:09 CET 2013
On 3/30/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Thursday 2013-03-28 23:46:38 +0100, Stefano Sabatini encoded:
>> On date Monday 2013-03-25 22:23:51 +0000, Paul B Mahol encoded:
>> > + for (i = 0; i < nb_samples; i++) {
>> > + int x, y;
>>
>> > + for (chan = 0; chan < 2; chan++, ptr += 2) {
>> > + x = ((ptr[1] - (int)ptr[0]) / (float)UINT16_MAX + 1) * hw;
>> > + y = ((ptr[0] + (int)ptr[1]) / (float)UINT16_MAX + 1) * hh;
>> > + dst = &p->outpicref->data[0][y * linesize + x];
>>
>> Can you explain the mathematical principle, or provide a link for it?
>
> well, not really needed, there is nothing to explain.
>
> A small gallery:
> ffplay -f lavfi
> "aevalsrc=cos(2*PI*t*200):cos(2*PI*t*201),asplit[out0],phasescope=s=300x300:r=30:dissolve=10,boxblur=2:2,negate[out1]"
> ffplay -f lavfi
> "aevalsrc=cos(2*PI*t*200):sin(2*PI*t/10)*sin(2*PI*t*400+2*PI*sin(2*PI*t/20)),asplit[out0],phasescope=s=300x300:r=30:dissolve=10[out1]"
> ffplay -f lavfi
> "aevalsrc=cos(2*PI*t*200):sin(2*PI*t/10)*sin(2*PI*t*400+2*PI*sin(2*PI*t/20)
> +
> 13*cos(2*PI*t/13)),asplit[out0],phasescope=s=300x300:r=30:dissolve=10[out1]"
>
> What I can't understand:
> ffplay -f lavfi
> "aevalsrc=cos(2*PI*t*200):cos(2*PI*t*200),asplit[out0],phasescope=s=300x300:r=30:dissolve=10[out1]"
>
> In this case we have:
> ptr[1] - ptr[0] = 0
>
> and thus x = 0, so I'd expect a single vertical line. What am I
> missing?
That you are using older buggy version.
And better/next name for filter is going to be avectorscope.
aphasescope is more like function that do stereo input -> [-1, 1] ,
with optional graph that display how it changes through time. (similar
to showspectrum)
>
> [...]
> --
> FFmpeg = Fantastic & Faithful Mega Ponderous Efficient Game
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list