[FFmpeg-devel] [PATCH] avfilter: add zoneplate video source filter

Paul B Mahol onemda at gmail.com
Wed May 10 15:42:50 EEST 2023


On Wed, May 10, 2023 at 2:32 PM Michael Koch <astroelectronic at t-online.de>
wrote:

> ffmpeg -f lavfi -i zoneplate=kx2=320:ky2=240,format=gray -frames 1 -y
> out.png
>
> When you draw a line through the center, you have
> black - gray - white - gray - white - gray -black
> which means the sine wave changes its sign in the center.
> That's why zoneplates are normally calculated with cos() function.
> See also: https://en.wikipedia.org/wiki/Zone_plate#Continuous_zone_plates


I replaced sinf with cosf, and output is same, just different phase.


More information about the ffmpeg-devel mailing list