Skip to content

Instantly share code, notes, and snippets.

@jvcleave
jvcleave / video.c
Created December 11, 2015 20:03
image_fx applied to hello_videocube
/*
Copyright (c) 2012, Broadcom Europe Ltd
Copyright (c) 2012, OtherCrashOverride
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
@jvcleave
jvcleave / gist:62dfe71378aa4df2bcf3
Created November 14, 2015 02:55
FFMPEG arm7/neon/RPI2
CFLAGS="-std=c++14 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -ffast-math -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST"
./configure --extra-cflags="-mfpu=neon-vfpv4 -mfloat-abi=hard -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" --enable-static --arch=arm --cpu=cortex-a7 --target-os=linux --disable-hwaccels --enable-parsers --disable-muxers --disable-filters --disable-encoders --disable-devices --disable-programs --enable-shared --disable-doc --disable-postproc --enable-gpl --enable-version3 --enable-protocols --enable-nonfree --enable-
@jvcleave
jvcleave / Cross compiler for RPi, Jessie, openFrameworks 0.9
Last active July 17, 2025 17:16
Instructions for building a Jessie VM to cross-compile openFrameworks 0.9 applications for the Raspberry Pi 1 (arm6)
#ON THE RPI (if you haven't downloaded openFrameworks)
cd
curl -O http://192.237.185.151/versions/nightly/of_v20151008_linuxarmv6l_nightly.tar.gz
mkdir openFrameworks
tar vxfz of_v20151008_linuxarmv6l_nightly.tar.gz -C openFrameworks --strip-components 1
cd /home/pi/openFrameworks/scripts/linux/debian
sudo ./install_dependencies.sh
#INSTALL SMB WITH / ACCESS
#include "ofShader.h"
#include "ofUtils.h"
#include "ofFileUtils.h"
#include "ofGraphics.h"
#include "ofGLProgrammableRenderer.h"
#include "ofTexture.h"
#include "ofMatrix4x4.h"
#include "ofMatrix3x3.h"
#include "ofVec2f.h"
#include "ofVec3f.h"
@jvcleave
jvcleave / Platform.Arm
Last active August 29, 2015 14:16
/ThirdParty/PSCommon/BuildSystem/Platform.Arm
ifeq "$(CFG)" "Release"
# Hardware specifying flags
CFLAGS += -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8
# Optimization level, minus currently buggy optimizing methods (which break bit-exact)
CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing
# More optimization flags
CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations #-fsingle-precision-constant
@jvcleave
jvcleave / config.linuxarmv6l.default.mk
Created February 21, 2015 06:46
config.linuxarmv6l.default.mk
###############################################################################
# CONFIGURE CORE PLATFORM MAKEFILE
# This file is where we make platform and architecture specific
# configurations. This file can be specified for a generic architecture or can
# be defined as variants. For instance, normally this file will be located in
# a platform specific subpath such as
#
# $(OF_ROOT)/libs/openFrameworksComplied/linux64
#
# This file will then be a generic platform file like:
/*
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
@jvcleave
jvcleave / emptyExample_compile.log
Created January 23, 2015 19:46
emptyExample_compile.log
=================== config.mk platform detection ================
PLATFORM_ARCH=armv6l
PLATFORM_OS=Linux
PLATFORM_VARIANT=default
PLATFORM_LIB_SUBPATH=linuxarmv6l
=================== config.mk paths =============================
OF_ADDONS_PATH=../../../addons
OF_EXPORT_PATH=../../../export
OF_EXAMPLES_PATH=../../../examples
OF_APPS_PATH=../../../apps
@jvcleave
jvcleave / YouTube info in OF
Last active August 29, 2015 14:13
Get YouTube urls for download/streaming in openFrameworks
struct YouTubeVideo
{
string url;
int itag;
map<string, string> valueMap;
vector<string> valueMapNames;
YouTubeVideo()
{
url = "";
itag = -1;
@jvcleave
jvcleave / ! Install Instructions
Last active April 22, 2016 21:11
MAC WITH DEBIAN VM CROSS COMPILER FOR RPI
ON THE RPI (if you haven't downloaded openFrameworks)
$ cd
$ curl -O http://www.openframeworks.cc/versions/v0.8.4/of_v0.8.4_linuxarmv6l_release.tar.gz
$ mkdir openFrameworks
$ tar vxfz of_v0.8.4_linuxarmv6l_release.tar.gz -C openFrameworks --strip-components 1
$ cd /home/pi/openFrameworks/scripts/linux/debian_armv6l
$ sudo ./install_dependencies.sh
ON THE MAC: