Skip to content

Instantly share code, notes, and snippets.

@strezh
strezh / gstreamerinit.sh
Created February 22, 2014 15:58
for GStreamer build in Debian
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/lib
%% Calculate coefficients for DCT
dct(eye(8))
%% Calculate coefficients for wavelet
[LoD,HiD,LoR,HiR] = wfilters('db4')
% in coder
LF_coeffs = LoR
HF_coeffs = HiR
@strezh
strezh / CMake gists.txt
Created December 14, 2014 12:56
some gists for CMake
# Switch between compilers
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# using Clang
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using GCC
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# using Intel C++
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
endif()
@strezh
strezh / share_inet_to_BBB.sh
Created January 12, 2015 11:55
BBB: share inet to BBB
#!/bin/sh
# On BBB
#ifconfig usb0 192.168.7.2
#route add default gw 192.168.7.1
# and add to /etc/resolv.conf
# nameserver 8.8.8.8
# Share Wi-Fi Inet to BeagleBoneBlack
@strezh
strezh / stm32_tools_linux.md
Last active August 29, 2015 14:14
Сборка инструментов для STM32 под Linux
  1. Маленькая и удобная утилита для получения изображений с вебкамеры.
fswebcam -q -d /dev/video1 -r 800x600 /path/to/webcam.jpg
  1. Конвертирование y4m в различные форматы (вместо avconv может быть ffmpeg):
avconv -i <file_name>.y4m -pix_fmt yuv420p <file_name>.yuv
avconv -i <file_name>.y4m -pix_fmt yuv422p <file_name>.yuv
avconv -i <file_name>.y4m -pix_fmt yuv444p <file_name>.yuv
@strezh
strezh / convert_y4m_to_yuv.sh
Last active August 29, 2015 14:14
convert input y4m file to 3 different YUV formats - YUV420, YUV422, YUV444
#!/bin/bash
if [[ $#>0 ]]
then
INPUT_FILE_NAME=$1
else
exit
fi
FILE_NAME=`sed 's/\.y4m$//' <<< ${INPUT_FILE_NAME}`
change:
1. pci_find_device -> pci_get_device
2. ioctl: XPCIe_Ioctl -> unlocked_ioctl: XPCIe_Ioctl,
3. int XPCIe_Ioctl(struct inode *inode, -> int XPCIe_Ioctl(/*struct inode *inode, */
import QtQuick 2.0
MouseArea {
property point origin
property bool ready: false
signal move(int x, int y)
signal swipe(string direction)
onPressed: {
@strezh
strezh / rgb2yuv.c
Created January 22, 2014 13:53
RGB2YUV
Y = char( 0.257*R + 0.504*G + 0.098*B + 16);
U = char( 0.439*R - 0.368*G - 0.071*B + 128);
V = char(-0.148*R - 0.291*G + 0.439*B + 128);