Skip to content

Instantly share code, notes, and snippets.

View minimum-necessary-change's full-sized avatar

minimum-necessary-change

View GitHub Profile
@minimum-necessary-change
minimum-necessary-change / rgb565.pde
Created April 19, 2019 11:41 — forked from companje/rgb565.pde
rgb565 to rgb888
//convert RGB565 to RGB888
byte src[] = loadBytes("ui.bin");
byte dst[] = new byte[src.length/2*3];
for (int i=0, j=0; i<src.length; i+=2) {
int c = src[i] + (src[i+1]<<8);
byte r = byte(((c & 0xF800) >> 11) << 3);
byte g = byte(((c & 0x7E0) >> 5) << 2);
byte b = byte(((c & 0x1F)) << 3);

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@minimum-necessary-change
minimum-necessary-change / skiplist.c
Created February 20, 2019 15:24 — forked from icejoywoo/skiplist.c
Example of Skip List source code for C
/*
Example of Skip List source code for C:
Skip Lists are a probabilistic alternative to balanced trees, as
described in the June 1990 issue of CACM and were invented by
William Pugh in 1987.
This file contains source code to implement a dictionary using
skip lists and a test driver to test the routines.
@minimum-necessary-change
minimum-necessary-change / log.md
Created February 19, 2019 07:32 — forked from m-jowett/log.md
Setup LibreOffice Online (Log/Guide) [WIP]

Setup LibreOffice Online (Log/Guide) [WIP]

About

This guide/log is based off my experience attempting to build and install LibreOffice Online and it's dependencies on my system.

The end goal is to get LibreOffice Online integrated with Karoshi Server.

LibreOffice Online is still in development (17/06/16).

@minimum-necessary-change
minimum-necessary-change / CompressYUYV2JPEG.cpp
Created February 12, 2019 11:12 — forked from royshil/CompressYUYV2JPEG.cpp
Example of converting a YUYV buffer to JPEG using libJPEG
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdint>
#include <memory>
#include <jpeglib.h>
using namespace std;