Skip to content

Instantly share code, notes, and snippets.

View mnyoshie's full-sized avatar
💮
🌸🌸🌸

Minato Nakamura Yoshie mnyoshie

💮
🌸🌸🌸
View GitHub Profile
@Qix-
Qix- / scurl.sh
Last active March 7, 2024 10:43
Safe cURL - pipe your cURL-obtained scripts into this and pass it a sha256 to verify against. Comes with a pure-bash sha256 implementation.
#!/usr/bin/env bash
# Usage: curl https://some-site-with-potential-mitm.com/script.sh | scurl $verified_sha256_digest_of_script
# Released into the Public Domain.
# Written by Josh Junon (josh@junon.me) <github.com/qix->
# Original SHA256 implementation in C by Brad Conte (brad@bradconte.com) <https://github.com/B-Con/crypto-algorithms>
# Ported to (almost) pure Bash by Josh Junon
@Jim-Bar
Jim-Bar / YUV_formats.md
Last active July 22, 2024 20:37
About YUV formats

About YUV formats

First of all: YUV pixel formats and Recommended 8-Bit YUV Formats for Video Rendering. Chromium's source code contains good documentation about those formats too: chromium/src/media/base/video_types.h and chromium/src/media/base/video_frame.cc (search for RequiresEvenSizeAllocation(), NumPlanes() and those kinds of functions).

YUV?

You can think of an image as a superposition of several planes (or layers in a more natural language). YUV formats have three planes: Y, U, and V.

Y is the luma plane, and can be seen as the image as grayscale. U and V are reffered to as the chroma planes, which are basically the colours. All the YUV formats have these three planes, and differ by the different orderings of them.