Skip to content

Instantly share code, notes, and snippets.

View OlivierLDff's full-sized avatar

Olivier Le Doeuff OlivierLDff

View GitHub Profile
@albertz
albertz / bin2c.c
Created January 2, 2012 16:29
bin2c
#include <stdio.h>
#include <assert.h>
int main(int argc, char** argv) {
assert(argc == 2);
char* fn = argv[1];
FILE* f = fopen(fn, "r");
printf("char a[] = {\n");
unsigned long n = 0;
while(!feof(f)) {
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 28, 2024 07:00
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@Jim-Bar
Jim-Bar / YUV_formats.md
Last active May 30, 2024 06:59
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.

@tttapa
tttapa / Dockerfile
Created April 2, 2019 23:14
Building a GCC 8 Cross Compiler for ARMv6 (Raspberry Pi)
# https://solarianprogrammer.com/2018/05/06/building-gcc-cross-compiler-raspberry-pi/
# Ubuntu 18.04 at the time of writing (2019-04-02)
FROM ubuntu:latest
# Install some tools and compilers + clean up
RUN apt-get update && \
apt-get install -y git wget gcc-8 g++-8 cmake gdb gdbserver bzip2 && \
apt-get clean autoclean && \
apt-get autoremove -y && \
#ifndef CUDA_COMMON_HPP
#define CUDA_COMMON_HPP
#include <iostream>
#include <cuda_runtime.h>
#include <cublas_v2.h>
#define CHECK_CUDA(cond) check_cuda(cond, __LINE__)