Skip to content

Instantly share code, notes, and snippets.

View victorfeitosa's full-sized avatar

Victor Feitosa victorfeitosa

View GitHub Profile
@victorfeitosa
victorfeitosa / odroid_xu4_xorg.conf
Last active April 13, 2021 14:34
Odroid XU4 Xorg configuration
# X.Org X server configuration file for xf86-video-armsoc-odroid
Section "Device"
Identifier "Mali-Fbdev"
Driver "armsoc"
Option "fbdev" "/dev/fb0"
Option "Debug" "false"
Option "DPMS" "false"
Option "NoFlip" "true"
Option "NoHardwareMouse" "true"
@victorfeitosa
victorfeitosa / xu4_install_xorg.sh
Created April 13, 2021 14:32
XU4 Install Xorg
# Sources list
cd /etc/apt/sources.list.d
# XU4
wget https://oph.mdrjr.net/meveric/sources.lists/meveric-all-XU3.list
wget https://oph.mdrjr.net/meveric/sources.lists/meveric-all-main.list
wget https://oph.mdrjr.net/meveric/sources.lists/meveric-all-testing.list
wget https://oph.mdrjr.net/meveric/sources.lists/meveric-buster-main.list
wget https://oph.mdrjr.net/meveric/sources.lists/meveric-buster-backports.list
wget -O- http://oph.mdrjr.net/meveric/meveric.asc | apt-key add -
@victorfeitosa
victorfeitosa / ecs_run.sh
Last active April 10, 2022 01:38
ECS KVS Visao Run Script
# Runs gstreamer in $RTSP_CAMERA_ADDRESS in a $STREAM_NAME stream using $AWS_ACCESS_KEY and $AWS_SECRET_KEY on region $AWS_REGION
gst-launch-1.0 rtspsrc location=$RTSP_CAMERA_ADDRESS short-header=TRUE ! rtph264depay \
! video/x-h264, format=avc,alignment=au ! kvssink stream-name= $STREAM_NAME storage-size=512 \
access-key=$AWS_ACCESS_KEY secret-key=$AWS_SECRET_KEY aws-region=$AWS_REGION
@victorfeitosa
victorfeitosa / setup_kvs.sh
Created April 10, 2022 18:36
SEts up a test KVS EC2 build
apt-get upgrade && \
apt-get update && \
apt-get install -y \
byacc \
cmake \
libtool \
libtool-bin \
automake \
bison \
flex \
@victorfeitosa
victorfeitosa / fixed_point_arithmetics.c
Last active May 9, 2024 21:56
Float point numbers to Fixed number representation
#include <stdio.h>
typedef int Fixed;
#define FRACT_BITS 16
#define FRACT_BITS_D2 8
#define FIXED_ONE (1 << FRACT_BITS)
#define INT2FIXED(x) ((x) << FRACT_BITS)
#define FLOAT2FIXED(x) ((int)((x) * (1 << FRACT_BITS)))
#define FIXED2INT(x) ((x) >> FRACT_BITS)
#define FIXED2DOUBLE(x) (((double)(x)) / (1 << FRACT_BITS))