Skip to content

Instantly share code, notes, and snippets.

View alexhelms's full-sized avatar

Alex Helms alexhelms

View GitHub Profile
@alexhelms
alexhelms / SinCosAvx2.cs
Last active January 26, 2025 06:02
C# AVX2 Sine and Cosine
public static class SinCosAvx2
{
private static Vector256<float> a2m_ps256_1 = Vector256.Create(1.0f);
private static Vector256<float> a2m_ps256_0p5 = Vector256.Create(0.5f);
private static Vector256<int> a2m_pi256_sign_mask = Vector256.Create(unchecked((int)0x80000000));
private static Vector256<int> a2m_pi256_inv_sign_mask = Vector256.Create(unchecked((int)~0x80000000));
private static Vector256<int> a2m_pi256_0 = Vector256.Create(0);
private static Vector256<int> a2m_pi256_1 = Vector256.Create(1);
@alexhelms
alexhelms / timelapse.md
Created April 26, 2020 20:21 — forked from billmei/timelapse.md
ffmpeg time-lapse

Convert sequence of GoPro Hero 6 Black JPEG images to MKV / MP4 video

ffmpeg \
  -r 30000/1001 \
  -pattern_type glob -i '*.JPG' \
  -vf "crop=in_w:in_w*9/16,scale=3840:-2" \
  -sws_flags lanczos \
  -pix_fmt yuv420p \
 -vcodec libx264 \