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 November 27, 2024 23:24
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 ([email protected]) <github.com/qix->
# Original SHA256 implementation in C by Brad Conte ([email protected]) <https://github.com/B-Con/crypto-algorithms>
# Ported to (almost) pure Bash by Josh Junon
@Jim-Bar
Jim-Bar / YUV_formats.md
Last active April 29, 2025 12:51
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.