Skip to content

Instantly share code, notes, and snippets.

@wjchen
wjchen / yuyv2bgr.c
Created June 1, 2016 08:37
yuyv to bgr
#include <arm_neon.h>
void yuyv2bgr(const unsigned char *yuv, int len, unsigned char *bgr) {
int i, j = 0;
for(i = 0; i < len; i += 4) {
const unsigned char *pyuv = yuv+i;
unsigned char *pbgr = bgr+j;
int r = (22987 * ((pyuv)[3] - 128)) >> 14;
int g = (-5636 * ((pyuv)[1] - 128) - 11698 * ((pyuv)[3] - 128)) >> 14;
package main
import (
"bufio"
"bytes"
"compress/flate"
"compress/gzip"
"crypto/md5"
"encoding/hex"