
    g                     P    d dl mZ d dlZd dlmZ d dlmZ e G d de             Zy)    )	dataclassN)Clip)Effectc                   6    e Zd ZU dZeed<   eed<   dedefdZy)SuperSamplezReplaces each frame at time t by the mean of `n_frames` equally spaced frames
    taken in the interval [t-d, t+d]. This results in motion blur.
    dn_framesclipreturnc                 0      fd}|j                  |      S )zApply the effect to the clip.c                 ,   t        j                  |j                  z
  |j                  z   j                        }t        j                  dt        j
                  |D cg c]
  } | |       c}d      z  d      }|j                  d      S c c}w )Ng      ?uint16)dtyper   )axisuint8)nplinspacer   r	   meanarrayastype)	get_framettimingst_frame_averageselfs        e/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/moviepy/video/fx/SuperSample.pyfilterz!SuperSample.apply.<locals>.filter   su    kk!dff*a$&&j$--HGGGbhh@"	"@QQM !''00  As    B)	transform)r   r
   r   s   `  r   applyzSuperSample.apply   s    	1 ~~f%%    N)	__name__
__module____qualname____doc__float__annotations__intr   r     r!   r   r   r   	   s&     HM&$ &4 &r!   r   )	dataclassesr   numpyr   moviepy.Clipr   moviepy.Effectr   r   r)   r!   r   <module>r.      s,    !   ! && & &r!   