
    -i                     ^    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dS )    )	dataclassN)Clip)Effectc                   8    e Zd ZU dZeed<   eed<   dedefdZdS )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                 8      fd}|                     |          S )zApply the effect to the clip.c                      t          j        |j        z
  |j        z   j                  }t          j        dt          j         fd|D             d          z  d          }|                    d          S )Ng      ?c                 &    g | ]} |          S  r   ).0t_	get_frames     Z/var/www/html/speakWrite/venv/lib/python3.11/site-packages/moviepy/video/fx/SuperSample.py
<listcomp>z5SuperSample.apply.<locals>.filter.<locals>.<listcomp>   s!    @@@"		"@@@    uint16)dtyper   )axisuint8)nplinspacer   r	   meanarrayastype)r   ttimingsframe_averageselfs   `   r   filterz!SuperSample.apply.<locals>.filter   s    k!df*a$&j$-HHGGbh@@@@@@@QQQQ  M !''000r   )	transform)r"   r
   r#   s   `  r   applyzSuperSample.apply   s0    	1 	1 	1 	1 	1 ~~f%%%r   N)	__name__
__module____qualname____doc__float__annotations__intr   r%   r   r   r   r   r   	   sV           HHHMMM&$ &4 & & & & & &r   r   )	dataclassesr   numpyr   moviepy.Clipr   moviepy.Effectr   r   r   r   r   <module>r1      s    ! ! ! ! ! !           ! ! ! ! ! ! & & & & && & & & & &r   