| #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)) { |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
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).
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.
| # 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__) |

