Skip to content

Instantly share code, notes, and snippets.

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);
@strezh
strezh / gst_clone.sh
Last active March 26, 2021 02:07
Clone all GStreamer repo
# GStreamer plug-in for OpenMAX IL API specification (deprecated, use gst-omx inst...
git clone git://anongit.freedesktop.org/gstreamer/attic/gst-openmax
# GStreamer QA System (aka "Insanity")
git clone git://anongit.freedesktop.org/gstreamer/attic/insanity
# Insanity GStreamer tests & helper functions
git clone git://anongit.freedesktop.org/gstreamer/attic/insanity-gst
# Cerbero build system used to build the official upstream GStreamer 1.0 SDK binar...
git clone git://anongit.freedesktop.org/gstreamer/cerbero
# 'common' shared submodule
git clone git://anongit.freedesktop.org/gstreamer/common
@strezh
strezh / GStreamer-1.0 some strings.sh
Last active October 2, 2023 09:00
GStreamer-1.0 personal cheat sheet
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
@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 / runIntent.cpp
Last active May 24, 2021 17:24
Run Android Intent from Qt (#Android #application #Qt #Launcher)
void runApplication(const QString &packageName, const QString &className)
{
qDebug() << "Start app: " <<packageName <<", "<<className;
QAndroidJniObject activity = QAndroidJniObject::callStaticObjectMethod(
"org/qtproject/qt5/android/QtNative", "activity",
"()Landroid/app/Activity;"); //activity is valid
if ( activity.isValid() )
{
// Equivalent to Jave code: 'Intent intent = new Intent();'
@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 / QuestaSimNotes.md
Last active September 27, 2023 12:20
QuestaSim notes

Установка под Linux

При установке под линукс (проверено на Ubuntu 16):

  1. Устанавливаем wine
  2. Из папки crack копируем файл MentorKG.exe в <install_dir>/linux (или /linux_x86_64)
  3. Выполняем
sudo chown root:root ~/.wine