24 Commits
Author SHA1 Message Date
jfmcarreira 521e56202c Remove clang-tidy 2021-02-13 04:16:25 +00:00
jfmcarreira d0933f43c9 Add cmake and clang format and linter 2021-02-13 04:08:43 +00:00
jfmcarreira 1674ec4061 Add missing information 2021-02-13 03:40:56 +00:00
jfmcarreira ab58ca44f2 Fix copyright 2021-02-13 03:16:17 +00:00
jfmcarreira 11bf3f6bfd Format code 2021-02-13 03:12:28 +00:00
jfmcarreira 669f3db250 Add modules test for create operation 2021-02-13 02:27:39 +00:00
jfmcarreira 3c6e0555bc Update doc and gitignore 2021-02-13 02:26:39 +00:00
jfmcarreira fca79a7992 Add cmake variable to define test data location 2021-02-13 02:07:43 +00:00
jfmcarreira b507b61ce4 Pre fill configuration dialog with the last used values 2021-02-02 00:03:29 +00:00
jfmcarreira 72bfaf6796 Update github token 2020-12-18 22:39:05 +00:00
jfmcarreira 0998d98375 Fix 7z extract command 2020-12-18 20:28:54 +00:00
jfmcarreira 3afa6eeb6f Run extract ffmpeg script 2020-12-18 20:18:18 +00:00
jfmcarreira 41c65dcac4 Fix ffmpeg download for appveyor windows build 2020-12-16 02:58:02 +00:00
jfmcarreira 25d40cadbe Merge remote-tracking branch 'upstream/master' 2020-12-12 13:20:14 +00:00
jfmcarreira ca68f5a78f Remove IDE related files 2020-12-12 13:18:48 +00:00
Joao Santos f2e1e4bfc7 Removed decimal places from the median value. 2020-12-12 13:11:09 +00:00
Joao Santos b5edc60794 Added option to print statistics to calypTools. 2020-12-12 13:08:53 +00:00
Joao Santos 6b084c1a7e Fixed minor issue with getEntropy function. 2020-12-12 13:06:52 +00:00
jfmcarreira 7b712bb232 Fix parsing cli args in Calyp 2020-12-12 11:05:39 +00:00
jfmcarreira 684cecd632 Minor bug fixes in the help of calypTools 2020-12-11 18:00:12 +00:00
Joao Santos f6cc0ffd29 The entropy of the image was added to the statistics. 2020-12-10 17:16:38 +00:00
jfmcarreira c1cef58de1 Fix extract command in appveyor 2020-10-24 00:08:55 +01:00
jfmcarreira f9e62c73ac Update appveyor to fetch ffmpeg from a new source 2020-10-23 23:13:02 +01:00
jfmcarreira 6486104db2 Minor changes in optimise display 2020-10-23 18:36:52 +01:00
166 changed files with 13934 additions and 12716 deletions

No files matched your search

+5 -5
View File
@@ -4,7 +4,7 @@ platform:
- x64
environment:
access_token:
secure: WAV5LfCSAtwE1JuZh4HrDlxOOClimLoslYAJlf5KRgc3f7WIkX591PrSSua/Zo2C
secure: SMxOWNKN0RkPvICWhIet2FJM5g/zx5mguM/XAPjM2OrC3U2/LAqcBZw0veS9peS4
clone_folder: C:\Projects\calyp
@@ -17,21 +17,21 @@ init:
install:
- '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64'
#- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64'
- choco install nsis
- choco install opencv
- 'C:\Tools\opencv\build\setup_vars_opencv4.cmd'
- cd C:\Projects
- ps: Start-FileDownload 'https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-4.1.1-win64-dev.zip'
- 7z x ffmpeg-4.1.1-win64-dev.zip -y
- ps: Start-FileDownload 'https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z' ffmpeg.7z
- 7z x ffmpeg.7z -y -offmpeg
- git clone https://github.com/pixlra/calyp-deployment.git
- CALL calyp-deployment/scripts/extract_ffmpeg.bat
build_script:
- mv C:\Projects\calyp C:\Projects\calyp-deployment\cmake-helper\
- mkdir C:\Projects\calyp-build
- cd C:\Projects\calyp-build
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DUSE_DYNLOAD=OFF -DOpenCV_DIR="C:/Tools/opencv/build" -DOpenCV_DLL_DIR="C:/Tools/opencv/build/x64/vc15/bin" -DOpenCV_INSTALL_MODULES="world" -DQT_DIR="C:\Qt\latest\msvc2017_64" -DQt5_DIR="C:\Qt\latest\msvc2017_64\lib\cmake\Qt5" -DUSE_QTDBUS=OFF -DAVFORMAT_LIBRARIES=C:/Projects/ffmpeg-4.1.1-win64-dev/lib/avformat.lib -DAVFORMAT_INCLUDE_DIRS=C:/Projects/ffmpeg-4.1.1-win64-dev/include -DAVCODEC_LIBRARIES=C:/Projects/ffmpeg-4.1.1-win64-dev/lib/avcodec.lib -DAVCODEC_INCLUDE_DIRS=C:/Projects/ffmpeg-4.1.1-win64-dev/include -DAVUTIL_LIBRARIES=C:/Projects/ffmpeg-4.1.1-win64-dev/lib/avutil.lib -DAVUTIL_INCLUDE_DIRS=C:/Projects/ffmpeg-4.1.1-win64-dev/include -DSWSCALE_LIBRARIES=C:/Projects/ffmpeg-4.1.1-win64-dev/lib/swscale.lib -DSWSCALE_INCLUDE_DIRS=C:/Projects/ffmpeg-4.1.1-win64-dev/include -G "Visual Studio 15 2017 Win64" C:\Projects\calyp-deployment\cmake-helper
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DUSE_DYNLOAD=OFF -DOpenCV_DIR="C:/Tools/opencv/build" -DOpenCV_DLL_DIR="C:/Tools/opencv/build/x64/vc15/bin" -DOpenCV_INSTALL_MODULES="world" -DQT_DIR="C:\Qt\latest\msvc2017_64" -DQt5_DIR="C:\Qt\latest\msvc2017_64\lib\cmake\Qt5" -DUSE_QTDBUS=OFF -DAVFORMAT_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avformat.lib -DAVFORMAT_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DAVCODEC_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avcodec.lib -DAVCODEC_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DAVUTIL_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/avutil.lib -DAVUTIL_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -DSWSCALE_LIBRARIES=C:/Projects/ffmpeg_libraries/lib/swscale.lib -DSWSCALE_INCLUDE_DIRS=C:/Projects/ffmpeg_libraries/include -G "Visual Studio 15 2017 Win64" C:\Projects\calyp-deployment\cmake-helper
- cmake --build . --target ALL_BUILD -- /p:Configuration=Release > log_build
- cmake --build . --target INSTALL -- /p:Configuration=Release > log_install
- cmake --build . --target PACKAGE -- /p:Configuration=Release > log_pkg
+115
View File
@@ -0,0 +1,115 @@
# ----------------------------------
# Options affecting listfile parsing
# ----------------------------------
with section("parse"):
# Specify structure for custom cmake functions
additional_commands = { 'foo': { 'flags': ['BAR', 'BAZ'],
'kwargs': {'DEPENDS': '*', 'HEADERS': '*', 'SOURCES': '*'}}}
## Override configurations per-command where available
#override_spec = {}
# Specify variable tags.
vartags = []
# Specify property tags.
proptags = []
# -----------------------------
# Options affecting formatting.
# -----------------------------
with section("format"):
# How wide to allow formatted cmake files
line_width = 150
# How many spaces to tab for indent
tab_size = 2
max_pargs_hwrap = 8
## If true, lines are indented using tab characters (utf-8 0x09) instead of
## <tab_size> space characters (utf-8 0x20). In cases where the layout would
## require a fractional tab character, the behavior of the fractional
## indentation is governed by <fractional_tab_policy>
#use_tabchars = False
# Format command names consistently as 'lower' or 'upper' case
command_case = 'upper'
# Format keywords consistently as 'lower' or 'upper' case
keyword_case = 'upper'
# ----------------------------
# Options affecting the linter
# ----------------------------
with section("lint"):
# a list of lint codes to disable
disabled_codes = ["C0103"]
# regular expression pattern describing valid function names
function_pattern = '[0-9a-z_]+'
# regular expression pattern describing valid macro names
macro_pattern = '[0-9A-Z_]+'
# regular expression pattern describing valid names for variables with global
# (cache) scope
global_var_pattern = '[A-Z][0-9A-Z_]+'
# regular expression pattern describing valid names for variables with global
# scope (but internal semantic)
internal_var_pattern = '_[A-Z][0-9A-Z_]+'
# regular expression pattern describing valid names for variables with local
# scope
local_var_pattern = '[a-z][a-z0-9_]+'
# regular expression pattern describing valid names for privatedirectory
# variables
private_var_pattern = '_[0-9a-z_]+'
# regular expression pattern describing valid names for public directory
# variables
public_var_pattern = '[A-Z][0-9A-Z_]+'
# regular expression pattern describing valid names for function/macro
# arguments and loop variables.
argument_var_pattern = '[a-z][a-z0-9_]+'
# regular expression pattern describing valid names for keywords used in
# functions or macros
keyword_pattern = '[A-Z][0-9A-Z_]+'
# In the heuristic for C0201, how many conditionals to match within a loop in
# before considering the loop a parser.
max_conditionals_custom_parser = 2
# Require at least this many newlines between statements
min_statement_spacing = 1
# Require no more than this many newlines between statements
max_statement_spacing = 2
max_returns = 6
max_branches = 12
max_arguments = 5
max_localvars = 15
max_statements = 50
# -------------------------------
# Options affecting file encoding
# -------------------------------
with section("encode"):
# If true, emit the unicode byte-order mark (BOM) at the start of the file
emit_byteorder_mark = False
# Specify the encoding of the input file. Defaults to utf-8
input_encoding = 'utf-8'
# Specify the encoding of the output file. Defaults to utf-8. Note that cmake
# only claims to support utf-8 so be careful when using anything else
output_encoding = 'utf-8'
+12 -1
View File
@@ -4,6 +4,8 @@
### C++ ###
# Prerequisites
*.d
# Clang
.cache/
# Compiled Object files
*.slo
@@ -132,4 +134,13 @@ fabric.properties
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# End of https://www.gitignore.io/api/c++,clion,linux
### vscode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Documentation
doc/
-2
View File
@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/calyp.iml" filepath="$PROJECT_DIR$/.idea/calyp.iml" />
</modules>
</component>
</project>
Generated
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+27
View File
@@ -0,0 +1,27 @@
fail_fast: false
repos:
- repo: local
hooks:
- id: cmake-configure
name: Cmake Configure
entry: cmake -B build
pass_filenames: false
language: system
- id: cmake-build
name: Cmake Build
entry: cmake --build build
pass_filenames: false
language: system
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
hooks:
- id: cmake-format
- id: cmake-lint
- repo: https://github.com/pocc/pre-commit-hooks
rev: python
hooks:
- id: clang-format
args: [--style=file, -i]
+167 -153
View File
@@ -1,240 +1,254 @@
###
### CMakeLists for calyp
###
#
# CMakeLists for calyp
#
cmake_minimum_required( VERSION 3.2.0 )
CMAKE_MINIMUM_REQUIRED(VERSION 3.2.0)
######################################################################################
# ####################################################################################################################################################
# CMake functions
######################################################################################
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
INCLUDE( cmake/ModulesFct.cmake )
# ####################################################################################################################################################
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
INCLUDE(cmake/ModulesFct.cmake)
INCLUDE(FeatureSummary)
INCLUDE(GNUInstallDirs)
######################################################################################
# ####################################################################################################################################################
# Project Definition
######################################################################################
# ####################################################################################################################################################
SET( PROJECT_NAME "calyp" CACHE INTERNAL "" FORCE )
SET( PROJECT_LIBRARY "Calyp" CACHE INTERNAL "" FORCE )
SET(PROJECT_NAME
"calyp"
CACHE INTERNAL "" FORCE)
SET(PROJECT_LIBRARY
"Calyp"
CACHE INTERNAL "" FORCE)
PROJECT(${PROJECT_NAME})
SET(CALYP_VERSION_MAJOR "1")
SET(CALYP_VERSION_MINOR "1")
SET(CALYP_VERSION_PATCH "0")
SET(CALYP_VERSION
"${CALYP_VERSION_MAJOR}.${CALYP_VERSION_MINOR}.${CALYP_VERSION_PATCH}"
CACHE INTERNAL "" FORCE)
PROJECT( ${PROJECT_NAME} )
SET( CALYP_VERSION_MAJOR "1" )
SET( CALYP_VERSION_MINOR "1" )
SET( CALYP_VERSION_PATCH "0" )
SET( CALYP_VERSION "${CALYP_VERSION_MAJOR}.${CALYP_VERSION_MINOR}.${CALYP_VERSION_PATCH}" CACHE INTERNAL "" FORCE )
######################################################################################
# ####################################################################################################################################################
# Variables
######################################################################################
# ####################################################################################################################################################
OPTION( BUILD_APP "Build GUI Application" ON )
OPTION( BUILD_TOOLS "Build Command Line Application" ON )
OPTION( BUILD_EXAMPLES "Build Examples" OFF )
OPTION( BUILD_DOC "Build Documentation" OFF )
OPTION( BUILD_TESTS "Build Google Tests" OFF )
OPTION(BUILD_APP "Build GUI Application" ON)
OPTION(BUILD_TOOLS "Build Command Line Application" ON)
OPTION(BUILD_EXAMPLES "Build Examples" OFF)
OPTION(BUILD_DOC "Build Documentation" OFF)
OPTION(BUILD_TESTS "Build Google Tests" OFF)
OPTION( USE_FERVOR "Add Fervor support" OFF )
OPTION(USE_FERVOR "Add Fervor support" OFF)
OPTION( USE_DYNLOAD "Use dynamic load of modules" ON )
OPTION( USE_SSE "Build with SSE support" OFF )
OPTION( USE_WERROR "Warnings as errors" OFF )
OPTION( USE_STATIC "Use static libs" OFF )
OPTION(USE_DYNLOAD "Use dynamic load of modules" ON)
OPTION(USE_SSE "Build with SSE support" OFF)
OPTION(USE_WERROR "Warnings as errors" OFF)
OPTION(USE_STATIC "Use static libs" OFF)
######################################################################################
# ####################################################################################################################################################
# Release configuration
######################################################################################
# ####################################################################################################################################################
# To be switched on when releasing.
OPTION(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" ON)
# Get current version.
set(CALYP_VERSION_STRING "${CALYP_VERSION}")
if(NOT RELEASE_BUILD AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
SET(CALYP_VERSION_STRING "${CALYP_VERSION}")
IF(NOT RELEASE_BUILD AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
# Probably a Git workspace; determine the revision.
FIND_PACKAGE(Git QUIET)
if(GIT_FOUND)
exec_program(${GIT_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}
IF(GIT_FOUND)
EXEC_PROGRAM(
${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe --tags"
OUTPUT_VARIABLE CALYP_GIT_REVISION
RETURN_VALUE TAG_RESULT
)
RETURN_VALUE TAG_RESULT)
# git describe --tags failed; maybe the repository was checked with depth=1.
if(NOT ${TAG_RESULT} EQUAL 0)
exec_program(${GIT_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}
IF(NOT ${TAG_RESULT} EQUAL 0)
EXEC_PROGRAM(
${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe --always"
OUTPUT_VARIABLE CALYP_GIT_REVISION
)
endif()
message(STATUS "Calyp Git revision: ${CALYP_GIT_REVISION}")
set(CALYP_VERSION_STRING "${CALYP_VERSION} (rev. ${CALYP_GIT_REVISION})")
else()
message(STATUS "Calyp Git revision could not be determined")
endif()
endif()
OUTPUT_VARIABLE CALYP_GIT_REVISION)
ENDIF()
MESSAGE(STATUS "Calyp Git revision: ${CALYP_GIT_REVISION}")
SET(CALYP_VERSION_STRING "${CALYP_VERSION} (rev. ${CALYP_GIT_REVISION})")
ELSE()
MESSAGE(STATUS "Calyp Git revision could not be determined")
ENDIF()
ENDIF()
SET(UPDATE_CHANNEL "stable" CACHE STRING "Update channel" )
SET(UPDATE_CHANNEL
"stable"
CACHE STRING "Update channel")
# CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/CalypUpdate.xml.in ${CMAKE_CURRENT_BINARY_DIR}/CalypUpdate-${UPDATE_CHANNEL}.xml )
######################################################################################
# ####################################################################################################################################################
# Dependencies
######################################################################################
# ####################################################################################################################################################
IF( BUILD_DOC )
IF(BUILD_DOC)
FIND_PACKAGE(Doxygen)
SET( BUILD_DOC ${Doxygen_FOUND} )
SET(BUILD_DOC ${Doxygen_FOUND})
ENDIF()
SET_PACKAGE_PROPERTIES(Doxygen PROPERTIES URL "http://www.doxygen.org/" DESCRIPTION "Doxygen" TYPE OPTIONAL)
SET_PACKAGE_PROPERTIES(
Doxygen PROPERTIES
URL "http://www.doxygen.org/"
DESCRIPTION "Doxygen"
TYPE OPTIONAL)
IF( BUILD_TESTS )
IF(BUILD_TESTS)
FIND_PACKAGE(GTest)
SET( BUILD_DOC ${GTEST_FOUND} )
IF( GTEST_FOUND )
SET(BUILD_DOC ${GTEST_FOUND})
IF(GTEST_FOUND)
ENABLE_TESTING()
INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS})
ENDIF()
SET(CALYP_TEST_DATA_DIR
"CALYP_TEST_DATA_DIR"
CACHE PATH "Location of video information for testing")
ENDIF()
OPTION( USE_OPENCV "Add OpenCV support" ON )
IF( USE_OPENCV )
OPTION(USE_OPENCV "Add OpenCV support" ON)
IF(USE_OPENCV)
FIND_PACKAGE( OpenCV COMPONENTS core highgui imgproc video )
IF( ${OpenCV_FOUND} )
SET(USE_OPENCV TRUE )
LIST(APPEND OPENCV_MODULES core highgui imgproc video )
FIND_PACKAGE( OpenCV COMPONENTS videoio photo )
IF( ${OPENCV_VIDEOIO_FOUND} )
LIST(APPEND OPENCV_MODULES videoio )
FIND_PACKAGE(OpenCV COMPONENTS core highgui imgproc video)
IF(${OpenCV_FOUND})
SET(USE_OPENCV TRUE)
LIST(APPEND OPENCV_MODULES core highgui imgproc video)
FIND_PACKAGE(OpenCV COMPONENTS videoio photo)
IF(${OPENCV_VIDEOIO_FOUND})
LIST(APPEND OPENCV_MODULES videoio)
ENDIF()
IF( ${OPENCV_PHOTO_FOUND} )
LIST(APPEND OPENCV_MODULES photo )
IF(${OPENCV_PHOTO_FOUND})
LIST(APPEND OPENCV_MODULES photo)
ENDIF()
ELSE()
SET(USE_OPENCV FALSE )
SET(USE_OPENCV FALSE)
ENDIF()
ENDIF()
SET_PACKAGE_PROPERTIES(OpenCV PROPERTIES URL "http://opencv.willowgarage.com" DESCRIPTION "OpenCV library support in CalypFrame" TYPE OPTIONAL)
SET_PACKAGE_PROPERTIES(
OpenCV PROPERTIES
URL "http://opencv.willowgarage.com"
DESCRIPTION "OpenCV library support in CalypFrame"
TYPE OPTIONAL)
OPTION( USE_FFMPEG "Add FFMPEG support" ON )
IF( USE_FFMPEG )
FIND_PACKAGE( FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE )
IF( "${AVCODEC_VERSION}" VERSION_LESS "56.0.0" )
SET(FFMPEG_FOUND FALSE )
SET(FFmpeg_FOUND FALSE )
OPTION(USE_FFMPEG "Add FFMPEG support" ON)
IF(USE_FFMPEG)
FIND_PACKAGE(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
IF("${AVCODEC_VERSION}" VERSION_LESS "56.0.0")
SET(FFMPEG_FOUND FALSE)
SET(FFmpeg_FOUND FALSE)
ENDIF()
SET(USE_FFMPEG ${FFMPEG_FOUND})
ENDIF()
SET_PACKAGE_PROPERTIES(FFmpeg PROPERTIES URL "http://ffmpeg.org/" DESCRIPTION "Libav library support in CalypStream" TYPE OPTIONAL)
SET_PACKAGE_PROPERTIES(
FFmpeg PROPERTIES
URL "http://ffmpeg.org/"
DESCRIPTION "Libav library support in CalypStream"
TYPE OPTIONAL)
IF( WIN32 )
SET( USE_STATIC ON )
INCLUDE( cmake/Win32.cmake )
IF(WIN32)
SET(USE_STATIC ON)
INCLUDE(cmake/Win32.cmake)
ENDIF()
######################################################################################
# ####################################################################################################################################################
# CMake Defin1itions
######################################################################################
# ####################################################################################################################################################
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
INCLUDE(FeatureSummary)
# must go before the project command
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
SET(CMAKE_CONFIGURATION_TYPES
"Debug;Release"
CACHE STRING "Configs" FORCE)
IF(DEFINED CMAKE_BUILD_TYPE AND CMAKE_VERSION VERSION_GREATER "2.8")
SET_PROPERTY( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES})
ENDIF()
SET( CMAKE_CXX_FLAGS "" )
SET(CMAKE_CXX_FLAGS "")
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
######################################################################################
# ####################################################################################################################################################
# Compiler options
######################################################################################
# ####################################################################################################################################################
SET(CMAKE_CXX_STANDARD 14)
if(CMAKE_COMPILER_IS_GNUCXX)
ADD_DEFINITIONS(-std=gnu++0x)
endif()
IF (NOT CMAKE_BUILD_TYPE )
MESSAGE(STATUS "No build type selected, default to Release")
SET(CMAKE_BUILD_TYPE "Release")
IF(CMAKE_COMPILER_IS_GNUCXX)
ADD_DEFINITIONS(-std=gnu++0x)
ENDIF()
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
ADD_DEFINITIONS(-DQT_NO_CAST_TO_ASCII
#-DQT_NO_CAST_FROM_ASCII
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
#-DQT_NO_SIGNALS_SLOTS_KEYWORDS
#-DQT_USE_QSTRINGBUILDER
)
# if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
# endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wlogical-op" )
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" )
endif()
IF( USE_WERROR )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" )
IF(NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "No build type selected, default to Release")
SET(CMAKE_BUILD_TYPE "Release")
ENDIF()
SET( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0" )
SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2" )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
ADD_DEFINITIONS(
-DQT_NO_CAST_TO_ASCII
# -DQT_NO_CAST_FROM_ASCII
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
# -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_USE_QSTRINGBUILDER
)
######################################################################################
# if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") endif()
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
IF(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wlogical-op")
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
ENDIF()
IF(USE_WERROR)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ENDIF()
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
# ####################################################################################################################################################
# Configure targets
######################################################################################
# ####################################################################################################################################################
ADD_FEATURE_INFO(CalypApp BUILD_APP "Build Graphical interface")
ADD_FEATURE_INFO(CalypTools BUILD_TOOLS "Build Command line tool" )
ADD_FEATURE_INFO(DynLoad USE_DYNLOAD "Support for dynamic module load" )
ADD_FEATURE_INFO(SSE USE_SSE "SSE instructions support" )
ADD_FEATURE_INFO(WErrors USE_WERROR "Warnings as errors" )
ADD_FEATURE_INFO(CalypApp BUILD_APP "Build Graphical interface")
ADD_FEATURE_INFO(CalypTools BUILD_TOOLS "Build Command line tool")
ADD_FEATURE_INFO(DynLoad USE_DYNLOAD "Support for dynamic module load")
ADD_FEATURE_INFO(SSE USE_SSE "SSE instructions support")
ADD_FEATURE_INFO(WErrors USE_WERROR "Warnings as errors")
ADD_SUBDIRECTORY( lib )
ADD_SUBDIRECTORY( modules )
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(modules)
IF( ${BUILD_TOOLS} )
ADD_SUBDIRECTORY( tools )
IF(${BUILD_TOOLS})
ADD_SUBDIRECTORY(tools)
ENDIF()
IF( ${BUILD_APP} )
ADD_SUBDIRECTORY( app )
IF(${BUILD_APP})
ADD_SUBDIRECTORY(app)
ENDIF()
IF( ${BUILD_EXAMPLES} )
ADD_SUBDIRECTORY( examples )
IF(${BUILD_EXAMPLES})
ADD_SUBDIRECTORY(examples)
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h )
######################################################################################
# ####################################################################################################################################################
# Final information dump
######################################################################################
# ####################################################################################################################################################
MESSAGE("")
MESSAGE( STATUS "${PROJECT_NAME} INFORMATION" )
MESSAGE( STATUS "Version: " "${CALYP_VERSION_STRING}" )
MESSAGE( STATUS "Configuration:" )
MESSAGE( STATUS " Static libs: " "${USE_STATIC}" )
MESSAGE( STATUS " Build type: " "${CMAKE_BUILD_TYPE}" )
MESSAGE( STATUS " Build flags: " "${CMAKE_CXX_FLAGS}" )
MESSAGE(STATUS "${PROJECT_NAME} INFORMATION")
MESSAGE(STATUS "Version: " "${CALYP_VERSION_STRING}")
MESSAGE(STATUS "Configuration:")
MESSAGE(STATUS " Static libs: " "${USE_STATIC}")
MESSAGE(STATUS " Build type: " "${CMAKE_BUILD_TYPE}")
MESSAGE(STATUS " Build flags: " "${CMAKE_CXX_FLAGS}")
FEATURE_SUMMARY(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+12 -36
View File
@@ -27,19 +27,21 @@ Modules
Supported Quality Metrics
----------------------------------------------------------------
- PSNR
- SSIM
- MSE
- Peak Signal-to-Noise Ratio (PSNR)
- Structural SIMilarity (SSIM)
- Mean Square Error (MSE)
- Weighted Spherical PSNR (WS-PSNR)
Frame Processing Modules
----------------------------------------------------------------
- Component filtering
- Frame difference, crop, shift, binarization
- Frame difference, crop, shift, binarization and rotation
- Sub-sampling operations
- Measuring modules
- Modules based on opencv:
* Disparity estimation
* Motion estimation
- Disparity estimation
- Motion estimation
Supported Formats
----------------------------------------------------------------
@@ -62,35 +64,9 @@ Supported Formats
Developers
----------------------------------------------------------------
- Joao Carreira (jfmcarreira@gmail.com)
- Lui­s Lucas (luisfrlucas@gmail.com)
Builds
----------------------------------------------------------------
Download update build for windows and linux from our <a href="https://sourceforge.net/projects/playuver/">SourceForge project page</a>
Build/Install using cmake
----------------------------------------------------------------
1. The following are required for compilation:
- an ordinary C++ development environment (g++, make, C++ libraries and headers, ...)
- cmake
- a Qt development environment (libraries, headers, qmake, ...): only QtCore, QtGui and QtWidgets are required, at least in version 4
2. Optional Dependencies:
- QtDBus
- OpenCv
- FFmpeg
3. Run the following commands: (this will create an executable named calyp)
```
mkdir build
cd build
cmake -DUSE_QT4=OFF -DUSE_FFMPEG=ON -DUSE_OPENCV=ON .. (for FFmpeg and OpenCV support)
make
make install
```
- [**Joao Carreira**](https://github.com/jfmcarreira) (Founder, Main Developer)
- [**Lui­s Lucas** ](https://github.com/lfrlucas) (Founder, Developer)
- [**Joao Santos** ](https://github.com/jpataias) (Contributor)
- [**JNSFilipe** ](https://github.com/JNSFilipe) (Contributor)
*/
+76 -77
View File
@@ -1,148 +1,147 @@
###
### CMakeLists for calyp app component
###
#
# CMakeLists for calyp app component
#
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/external
${CMAKE_CURRENT_SOURCE_DIR}/dialog
${CMAKE_CURRENT_SOURCE_DIR}/docks
${CMAKE_CURRENT_SOURCE_DIR}/widgets )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/external ${CMAKE_CURRENT_SOURCE_DIR}/dialog
${CMAKE_CURRENT_SOURCE_DIR}/docks ${CMAKE_CURRENT_SOURCE_DIR}/widgets)
OPTION( USE_QTDBUS "Build with QtDBus" ON )
OPTION( USE_FERVOR "Add Fervor support" OFF )
OPTION(USE_QTDBUS "Build with QtDBus" ON)
OPTION(USE_FERVOR "Add Fervor support" OFF)
ADD_SUBDIRECTORY( external )
ADD_SUBDIRECTORY(external)
FIND_PACKAGE( Qt5 REQUIRED COMPONENTS Core Gui Widgets Concurrent )
LIST(APPEND QT_LINKER_LIBS Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Concurrent )
LIST(APPEND QT_MODULES Core Gui Widgets Concurrent )
FIND_PACKAGE(Qt5 REQUIRED COMPONENTS Core Gui Widgets Concurrent)
LIST(APPEND QT_LINKER_LIBS Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Concurrent)
LIST(APPEND QT_MODULES Core Gui Widgets Concurrent)
IF( USE_QTDBUS )
FIND_PACKAGE( Qt5DBus )
SET_PACKAGE_PROPERTIES(Qt5DBus PROPERTIES DESCRIPTION "Support for Qt5 DBus messages between instances" TYPE OPTIONAL )
IF( ${Qt5DBus_FOUND} )
SET( USE_QTDBUS ${Qt5DBus_FOUND} ) # TODO: fix this stupid variable
SET( USE_QTDBUS ${Qt5DBus_FOUND} PARENT_SCOPE)
LIST(APPEND QT_LINKER_LIBS Qt5::DBus )
LIST(APPEND QT_MODULES DBus )
IF(USE_QTDBUS)
FIND_PACKAGE(Qt5DBus)
SET_PACKAGE_PROPERTIES(
Qt5DBus PROPERTIES
DESCRIPTION "Support for Qt5 DBus messages between instances"
TYPE OPTIONAL)
IF(${Qt5DBus_FOUND})
SET(USE_QTDBUS ${Qt5DBus_FOUND}) # TODO: fix this stupid variable
SET(USE_QTDBUS
${Qt5DBus_FOUND}
PARENT_SCOPE)
LIST(APPEND QT_LINKER_LIBS Qt5::DBus)
LIST(APPEND QT_MODULES DBus)
ENDIF()
ENDIF()
set(Calyp_App_SRCS
# Main
SET(Calyp_App_SRCS
# Main
main.cpp
MainWindow.cpp
# Module SubWindow
# Module SubWindow
SubWindowHandle.cpp
MdiSubWindow.cpp
SubWindowAbstract.cpp
# Module Video
# Module Video
VideoHandle.cpp
VideoSubWindow.cpp
ViewArea.cpp
GridManager.cpp
# Module Quality
# Module Quality
QualityHandle.cpp
PlotSubWindow.cpp
external/qcustomplot/qcustomplot.cpp
# Module Plugins
# Module Plugins
ModulesHandle.cpp
CalypAppModuleIf.cpp
# Dialogs
# Dialogs
dialog/AboutDialog.cpp
dialog/ConfigureFormatDialog.cpp
dialog/SubWindowSelectorDialog.cpp
dialog/ProgressBar.cpp
dialog/SeekStreamDialog.cpp
dialog/ModulesHandleOptDialog.cpp
# Widgets
# Widgets
widgets/HistogramWidget.cpp
widgets/FrameNumberWidget.cpp
# Docks
# Docks
docks/FramePropertiesDock.cpp
docks/ModuleHandleDock.cpp
docks/QualityMeasurementSidebar.cpp
)
docks/QualityMeasurementSidebar.cpp)
IF( USE_QTDBUS )
LIST( APPEND Calyp_App_SRCS DBusAppAdaptor.cpp )
IF(USE_QTDBUS)
LIST(APPEND Calyp_App_SRCS DBusAppAdaptor.cpp)
ENDIF()
SET(Calyp_App_UI "")
set(Calyp_App_UI "" )
SET(Calyp_App_RCC resources/${PROJECT_NAME}.qrc)
set(Calyp_App_RCC
resources/${PROJECT_NAME}.qrc
)
IF(USE_FERVOR)
SET(FERVOR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/fervor)
IF( USE_FERVOR )
IF(EXISTS ${FERVOR_DIR})
SET( FERVOR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/fervor )
SET(FERVOR_APP_NAME ${PROJECT_NAME})
SET(FERVOR_APP_VERSION ${CALYP_VERSION_STRING})
IF(EXISTS ${FERVOR_DIR} )
ADD_SUBDIRECTORY(${FERVOR_DIR})
SET( FERVOR_APP_NAME ${PROJECT_NAME} )
SET( FERVOR_APP_VERSION ${CALYP_VERSION_STRING} )
INCLUDE_DIRECTORIES(${FERVOR_DIR})
ADD_SUBDIRECTORY( ${FERVOR_DIR} )
LIST(APPEND APP_LINKER_LIBS Fervor)
INCLUDE_DIRECTORIES( ${FERVOR_DIR} )
FIND_PACKAGE(Qt5 REQUIRED Network WebKit WebKitWidgets)
LIST(APPEND APP_LINKER_LIBS Fervor )
LIST(APPEND QT_LINKER_LIBS Qt5::Network Qt5::WebKit Qt5::WebKitWidgets)
LIST(APPEND QT_MODULES Network WebKit WebKitWidgets)
FIND_PACKAGE( Qt5 REQUIRED Network WebKit WebKitWidgets )
LIST(APPEND QT_LINKER_LIBS Qt5::Network Qt5::WebKit Qt5::WebKitWidgets )
LIST(APPEND QT_MODULES Network WebKit WebKitWidgets )
# LIST(APPEND APP_LINKER_LIBS ${FERVOR_DEPENDENCIES} )
INCLUDE_DIRECTORIES( ${FERVOR_INCLUDE_DIRS} )
# LIST(APPEND APP_LINKER_LIBS ${FERVOR_DEPENDENCIES} )
INCLUDE_DIRECTORIES(${FERVOR_INCLUDE_DIRS})
SET(QT_USE_QTNETWORK true)
SET(QT_USE_QTWEBKIT true)
ELSE()
MESSAGE( "Fervor lib source code is not find in ${FERVOR_DIR}... Disabling it!" )
SET( USE_FERVOR False )
MESSAGE("Fervor lib source code is not find in ${FERVOR_DIR}... Disabling it!")
SET(USE_FERVOR False)
ENDIF()
ENDIF()
SET_PACKAGE_PROPERTIES(Fervor PROPERTIES URL "https://github.com/pypt/fervor" DESCRIPTION "Fervor lib includes check for updates feature" TYPE OPTIONAL )
SET_PACKAGE_PROPERTIES(
Fervor PROPERTIES
URL "https://github.com/pypt/fervor"
DESCRIPTION "Fervor lib includes check for updates feature"
TYPE OPTIONAL)
ADD_FEATURE_INFO(Fervor USE_FERVOR "Fervor lib includes check for updates feature.")
QT5_WRAP_UI( Calyp_App_UI_Wrap ${Calyp_App_UI} )
QT5_ADD_RESOURCES( Calyp_App_RCC ${Calyp_App_RCC} )
QT5_WRAP_UI(Calyp_App_UI_Wrap ${Calyp_App_UI})
QT5_ADD_RESOURCES(Calyp_App_RCC ${Calyp_App_RCC})
# Instruct CMake to run moc automatically when needed.
SET( CMAKE_AUTOMOC ON )
SET(CMAKE_AUTOMOC ON)
# Windows application icon
IF( WIN32 )
set(WINDOWS_RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/resources.obj)
IF( MSVC )
add_custom_command(OUTPUT ${WINDOWS_RES_FILE}
IF(WIN32)
SET(WINDOWS_RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/resources.obj)
IF(MSVC)
ADD_CUSTOM_COMMAND(
OUTPUT ${WINDOWS_RES_FILE}
COMMAND rc.exe /fo ${WINDOWS_RES_FILE} ${PROJECT_NAME}.rc
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources
)
COMMENT "Add icon on windows platform")
ELSE()
add_custom_command(OUTPUT ${WINDOWS_RES_FILE}
ADD_CUSTOM_COMMAND(
OUTPUT ${WINDOWS_RES_FILE}
COMMAND windres.exe ${PROJECT_NAME}.rc ${WINDOWS_RES_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources
)
COMMENT "Add icon on windows platform")
ENDIF()
ENDIF()
ADD_EXECUTABLE( ${PROJECT_NAME} ${Calyp_App_SRCS} ${HEADERS_MOC_FILES} ${Calyp_App_UI_Wrap} ${Calyp_App_RCC} ${WINDOWS_RES_FILE} )
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${PROJECT_LIBRARY} CalypModules ${APP_LINKER_LIBS} ${QT_LINKER_LIBS} QCustomPlotLib )
ADD_EXECUTABLE(${PROJECT_NAME} ${Calyp_App_SRCS} ${HEADERS_MOC_FILES} ${Calyp_App_UI_Wrap} ${Calyp_App_RCC} ${WINDOWS_RES_FILE})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PROJECT_LIBRARY} CalypModules ${APP_LINKER_LIBS} ${QT_LINKER_LIBS} QCustomPlotLib)
# QT5_USE_MODULES( ${PROJECT_NAME} ${QT_MODULES} )
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin )
INSTALL(FILES resources/calyp.desktop DESTINATION share/applications )
INSTALL(FILES resources/calyp.png DESTINATION share/pixmaps )
INSTALL(FILES resources/calyp.xml DESTINATION share/mime/packages )
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
INSTALL(FILES resources/calyp.desktop DESTINATION share/applications)
INSTALL(FILES resources/calyp.png DESTINATION share/pixmaps)
INSTALL(FILES resources/calyp.xml DESTINATION share/mime/packages)
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,12 +24,12 @@
#include "CalypAppModuleIf.h"
#include "VideoSubWindow.h"
#include <QAction>
#include <QApplication>
#include <QDockWidget>
#include "VideoSubWindow.h"
CalypAppModuleIf::CalypAppModuleIf( QObject* parent, QAction* action, CalypModuleIf* module )
: m_bIsRunning( false )
, m_pcModuleAction( action )
+6 -6
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,11 @@
#ifndef __CALYPAPPMODULESIF_H__
#define __CALYPAPPMODULESIF_H__
#include <QEvent>
#include <QVector>
#include <cstdio>
#include <iostream>
#include "CommonDefs.h"
#include "ModuleHandleDock.h"
#include "config.h"
@@ -32,11 +37,6 @@
#include "lib/CalypModuleIf.h"
#include "lib/CalypStream.h"
#include <QEvent>
#include <QVector>
#include <cstdio>
#include <iostream>
class QAction;
class QDockWidget;
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -5
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -71,8 +71,7 @@ void GridManager::drawGrid( QPixmap& image, const QRect& area, QPainter* painter
switch( style )
{
case intersectionDot:
case intersectionCross:
{
case intersectionCross: {
painter->setPen( mainPen );
// Draw crosses or dots on intersections
for( int x = offsetx; x <= area.right(); x += hSpacing )
@@ -99,8 +98,7 @@ void GridManager::drawGrid( QPixmap& image, const QRect& area, QPainter* painter
}
break;
}
case Dashed:
{
case Dashed: {
// Change pen to the dashed line
mainPen.setStyle( Qt::DashLine );
}
+2 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -29,6 +29,7 @@
#include <QColor>
#include <QPen>
#include <QRect>
#include "CommonDefs.h"
#include "config.h"
+11 -11
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
* Joao Santos (joaompssantos@gmail.com)
*
@@ -25,6 +25,15 @@
#include "MainWindow.h"
#include <QAction>
#include <QActionGroup>
#include <QCloseEvent>
#include <QDoubleSpinBox>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QSignalMapper>
#include <QtDebug>
#include "AboutDialog.h"
#include "ModulesHandle.h"
#include "QualityHandle.h"
@@ -34,15 +43,6 @@
#include "VideoHandle.h"
#include "VideoSubWindow.h"
#include "lib/CalypOptions.h"
#include <QAction>
#include <QActionGroup>
#include <QCloseEvent>
#include <QDoubleSpinBox>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QSignalMapper>
#include <QtDebug>
#ifdef USE_FERVOR
#include "fvupdater.h"
#endif
@@ -101,7 +101,7 @@ bool MainWindow::parseArgs( int argc, char* argv[] )
( "size,s", strResolution, "size (WxH)" ) /**/
( "pel_fmt", strPelFmt, "pixel format" );
if( !pcCmdParser.parse( argc, argv ) )
if( pcCmdParser.parse( argc, argv ) < 0 )
{
bRet |= true;
}
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,10 +24,10 @@
#include "MdiSubWindow.h"
#include "SubWindowAbstract.h"
#include <QCloseEvent>
#include "SubWindowAbstract.h"
MdiSubWindow::MdiSubWindow( QWidget* parent )
: QMdiSubWindow( parent )
{
+2 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -26,6 +26,7 @@
#define __MDISUBWINDOW_H_
#include <QMdiSubWindow>
#include "CommonDefs.h"
#include "config.h"
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+4 -5
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,15 +24,14 @@
#ifndef __MODULESHANDLE_H__
#define __MODULESHANDLE_H__
#include "config.h"
#include <QtCore>
#include <QtWidgets>
#include <cstdio>
#include <iostream>
#include <QtCore>
#include <QtWidgets>
#include "CalypAppModuleIf.h"
#include "CommonDefs.h"
#include "config.h"
#include "lib/CalypFrame.h"
class VideoHandle;
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,12 +25,12 @@
#ifndef __PLOTWINDOWHANDLE_H__
#define __PLOTWINDOWHANDLE_H__
#include <QtWidgets>
#include "CommonDefs.h"
#include "SubWindowAbstract.h"
#include "config.h"
#include <QtWidgets>
class QCustomPlot;
class PlotSubWindow : public SubWindowAbstract
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,16 +24,16 @@
#include "QualityHandle.h"
#include <QtGui>
#include "PlotSubWindow.h"
#include "ProgressBar.h"
#include "QtConcurrent/qtconcurrentrun.h"
#include "SubWindowHandle.h"
#include "SubWindowSelectorDialog.h"
#include "VideoSubWindow.h"
#include "lib/LibMemory.h"
#include <QtGui>
#include "QtConcurrent/qtconcurrentrun.h"
QualityHandle::QualityHandle( QWidget* parent, SubWindowHandle* windowManager )
: m_pcParet( parent ), m_pcMainWindowManager( windowManager )
{
+2 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -27,6 +27,7 @@
#include <QtCore>
#include <QtWidgets>
#include "CommonDefs.h"
#include "QFuture"
#include "QualityMeasurementSidebar.h"
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,14 +24,14 @@
#include "SubWindowAbstract.h"
#include "MdiSubWindow.h"
#include <QCloseEvent>
#include <QFocusEvent>
#include <QHBoxLayout>
#include <QIcon>
#include <QScrollBar>
#include "MdiSubWindow.h"
SubWindowAbstract::SubWindowAbstract( QWidget* parent, unsigned int category )
: QWidget( parent ), m_cSubWindow( NULL )
{
+2 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -41,6 +41,7 @@
#include <QSize>
#include <QString>
#include <QWidget>
#include "CommonDefs.h"
#include "config.h"
+5 -5
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
* Joao Santos (joaompssantos@gmail.com)
*
@@ -25,10 +25,6 @@
#include "SubWindowHandle.h"
#include "MainWindow.h"
#include "MdiSubWindow.h"
#include "SubWindowAbstract.h"
#include <QAction>
#include <QActionGroup>
#include <QApplication>
@@ -41,6 +37,10 @@
#include <QSignalMapper>
#include <QStyle>
#include "MainWindow.h"
#include "MdiSubWindow.h"
#include "SubWindowAbstract.h"
class MdiArea : public QMdiArea
{
public:
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,12 +25,12 @@
#ifndef __SUBWINDOWHANDLE_H__
#define __SUBWINDOWHANDLE_H__
#include "CommonDefs.h"
#include <QString>
#include <QVector>
#include <QWidget>
#include "CommonDefs.h"
class QAction;
class QActionGroup;
class QHBoxLayout;
+9 -9
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,14 +24,6 @@
#include "VideoHandle.h"
#include "FrameNumberWidget.h"
#include "FramePropertiesDock.h"
#include "MainWindow.h"
#include "SeekStreamDialog.h"
#include "SubWindowHandle.h"
#include "SubWindowSelectorDialog.h"
#include "VideoSubWindow.h"
#include <QDockWidget>
#include <QElapsedTimer>
#include <QLabel>
@@ -39,6 +31,14 @@
#include <QSlider>
#include <QToolBar>
#include <QtGui>
#include "FrameNumberWidget.h"
#include "FramePropertiesDock.h"
#include "MainWindow.h"
#include "SeekStreamDialog.h"
#include "SubWindowHandle.h"
#include "SubWindowSelectorDialog.h"
#include "VideoSubWindow.h"
#if( _CONTROL_PLAYING_TIME_ == 1 )
#include <QElapsedTimer>
#endif
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,15 +25,15 @@
#ifndef __VIDEOHANDLE_H__
#define __VIDEOHANDLE_H__
#include "CommonDefs.h"
#include "config.h"
#include <QMenu>
#include <QPoint>
#include <QThread>
#include <QVector>
#include <QWidget>
#include "CommonDefs.h"
#include "config.h"
//#define _CONTROL_PLAYING_TIME_ 1
class QToolBar;
+23 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -23,15 +23,17 @@
*/
#include "VideoSubWindow.h"
#include <QScrollArea>
#include <QSettings>
#include <QStaticText>
#include <cassert>
#include "ConfigureFormatDialog.h"
#include "ModulesHandle.h"
#include "QtConcurrent/qtconcurrentrun.h"
#include "SubWindowAbstract.h"
#include <cassert>
#define QT_NO_CONCURRENT
/**
@@ -313,6 +315,7 @@ bool VideoSubWindow::loadFile( QString cFilename, bool bForceDialog )
unsigned int Width = 0, Height = 0, BitsPel = 8, FrameRate = 30;
int Endianness = CLP_LITTLE_ENDIAN;
int InputFormat = CLP_YUV420P;
QSettings appSettings;
if( m_pCurrStream )
m_pCurrStream->getFormat( Width, Height, InputFormat, BitsPel, Endianness, FrameRate );
@@ -323,7 +326,16 @@ bool VideoSubWindow::loadFile( QString cFilename, bool bForceDialog )
}
bool bConfig = true;
if( !bForceDialog )
{
bConfig = guessFormat( cFilename, Width, Height, InputFormat, BitsPel, Endianness, FrameRate );
if( bConfig )
{
// Pre-load values with last opened file
Width = appSettings.value( "VideoSubWindow/LastWidth" ).value<unsigned int>();
Height = appSettings.value( "VideoSubWindow/LastHeight" ).value<unsigned int>();
BitsPel = appSettings.value( "VideoSubWindow/LastBitsPerPixel" ).value<unsigned int>();
}
}
bool bRet = false;
for( int iPass = 0; iPass < 2 && !bRet; iPass++ )
{
@@ -355,6 +367,14 @@ bool VideoSubWindow::loadFile( QString cFilename, bool bForceDialog )
m_sStreamInfo.m_uiFrameRate = FrameRate;
m_sStreamInfo.m_uiFileSize = QFileInfo( cFilename ).size();
QVariant var;
var.setValue<unsigned int>( Width );
appSettings.setValue( "VideoSubWindow/LastWidth", var );
var.setValue<unsigned int>( Height );
appSettings.setValue( "VideoSubWindow/LastHeight", var );
var.setValue<unsigned int>( BitsPel );
appSettings.setValue( "VideoSubWindow/LastBitsPerPixel", var );
QApplication::restoreOverrideCursor();
refreshFrame();
+2 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -30,6 +30,7 @@
#include <QRect>
#include <QString>
#include <QVector>
#include "CommonDefs.h"
#include "SubWindowAbstract.h"
#include "ViewArea.h"
+7 -12
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,8 +25,6 @@
#include "ViewArea.h"
#include "GridManager.h"
#include <QColor>
#include <QCoreApplication>
#include <QDebug>
@@ -38,9 +36,10 @@
#include <QRectF>
#include <QString>
#include <QWidget>
#include <cmath>
#include "GridManager.h"
static const QColor selectionColor = Qt::cyan;
static const QColor imageMaskColor = Qt::green;
static const QColor eraserColor = Qt::red;
@@ -688,8 +687,7 @@ void ViewArea::paintEvent( QPaintEvent* event )
{
switch( tool() )
{
case MaskTool:
{
case MaskTool: {
if( m_maskColor.isValid() )
color = m_maskColor;
else
@@ -697,8 +695,7 @@ void ViewArea::paintEvent( QPaintEvent* event )
break;
}
case EraserTool:
{
case EraserTool: {
color = eraserColor;
break;
}
@@ -1075,8 +1072,7 @@ void ViewArea::updateMask( const QRect& rect )
{
switch( tool() )
{
case MaskTool:
{
case MaskTool: {
// Add rect to the mask
QPainter painter( &m_mask );
painter.setBrush( Qt::color1 );
@@ -1085,8 +1081,7 @@ void ViewArea::updateMask( const QRect& rect )
painter.end();
break;
}
case EraserTool:
{
case EraserTool: {
// Clears rect area in the mask
QPainter painter( &m_mask );
painter.setBrush( Qt::color0 );
+6 -6
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -26,17 +26,17 @@
#ifndef __VIEWAREA_H__
#define __VIEWAREA_H__
#include "CommonDefs.h"
#include "GridManager.h"
#include "config.h"
#include "lib/CalypFrame.h"
#include <QBitmap>
#include <QColor>
#include <QPixmap>
#include <QTimer>
#include <QWidget>
#include "CommonDefs.h"
#include "GridManager.h"
#include "config.h"
#include "lib/CalypFrame.h"
class CalypStream;
/**
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
* Joao Santos (joaompssantos@gmail.com)
*
@@ -27,14 +27,14 @@
#include "AboutDialog.h"
#include "config.h"
#include <QApplication>
#include <QDialogButtonBox>
#include <QLabel>
#include <QTextEdit>
#include <QVBoxLayout>
#include "config.h"
#define TAB_FROM_SPACES "&nbsp;&nbsp;&nbsp;"
AboutDialog::AboutDialog( QWidget* parent )
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,8 +24,6 @@
#include "ConfigureFormatDialog.h"
#include "lib/CalypFrame.h"
#include <QComboBox>
#include <QDebug>
#include <QDialogButtonBox>
@@ -39,6 +37,8 @@
#include <QString>
#include <QWidget>
#include "lib/CalypFrame.h"
#define MAX_SUPPORTED_RESOLUTION 99999
QDataStream& operator<<( QDataStream& out, const CalypStandardResolutionVector& array )
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,8 +24,6 @@
#include "ModulesHandleOptDialog.h"
#include "lib/CalypOptions.h"
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QLabel>
@@ -34,6 +32,8 @@
#include <QVector>
#include <QWidget>
#include "lib/CalypOptions.h"
class QLineEdit;
class OpionConfiguration : public QWidget
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,13 +25,13 @@
#ifndef __MODULEHANDLEOPTDIALOG_H__
#define __MODULEHANDLEOPTDIALOG_H__
#include <QDialog>
#include <QVector>
#include "CalypAppModuleIf.h"
#include "CommonDefs.h"
#include "config.h"
#include <QDialog>
#include <QVector>
class OpionConfiguration;
/**
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,11 +25,11 @@
#ifndef __PROGRESSBAR_H__
#define __PROGRESSBAR_H__
#include "CommonDefs.h"
#include <QDialog>
#include <QWidget>
#include "CommonDefs.h"
class QProgressBar;
class ProgressBar : public QWidget
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,8 +24,6 @@
#include "SeekStreamDialog.h"
#include "lib/CalypStream.h"
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QLabel>
@@ -33,6 +31,8 @@
#include <QVector>
#include <QWidget>
#include "lib/CalypStream.h"
SeekStreamDialog::SeekStreamDialog( CalypStream* pcCurrStream, QWidget* parent )
: QDialog( parent, Qt::Dialog | Qt::WindowTitleHint ), m_iSelectedFrameNum()
{
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,13 +25,13 @@
#ifndef __SEEKSTREAMDIALOG_H__
#define __SEEKSTREAMDIALOG_H__
#include <QDialog>
#include <QVector>
#include "CalypAppModuleIf.h"
#include "CommonDefs.h"
#include "config.h"
#include <QDialog>
#include <QVector>
class QSpinBox;
/**
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,12 +24,12 @@
#include "SubWindowSelectorDialog.h"
#include "SubWindowHandle.h"
#include "VideoSubWindow.h"
#include <QCheckBox>
#include <QGroupBox>
#include "SubWindowHandle.h"
#include "VideoSubWindow.h"
SubWindowSelectorDialog::SubWindowSelectorDialog( QWidget* parent, SubWindowHandle* windowManager,
unsigned int uiCategory, int minWindowsSelected, int maxWindowsSelected )
: QDialog( parent )
+4 -5
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,13 +25,12 @@
#ifndef __DIALOGSUBWINDOWSELECTOR_H__
#define __DIALOGSUBWINDOWSELECTOR_H__
#include "CommonDefs.h"
#include "config.h"
#include <QVector>
#include <QtCore>
#include <QtWidgets>
#include <QVector>
#include "CommonDefs.h"
#include "config.h"
class QPixmap;
class QColor;
+12 -2
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -204,6 +204,11 @@ FramePropertiesDock::FramePropertiesDock( QWidget* parent, bool* pbMainPlaySwitc
labelMedianValue = new QLabel;
labelMedianValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
QLabel* entropyLabel = new QLabel( tr( "Entropy:" ) );
entropyLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
labelEntropyValue = new QLabel;
labelEntropyValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
QLabel* percentileLabel = new QLabel( tr( "Percentile:" ) );
percentileLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
labelPercentileValue = new QLabel;
@@ -225,6 +230,8 @@ FramePropertiesDock::FramePropertiesDock( QWidget* parent, bool* pbMainPlaySwitc
statisticsLayout->addWidget( labelStdDevValue, gridRow++, 1 );
statisticsLayout->addWidget( medianLabel, gridRow, 0 );
statisticsLayout->addWidget( labelMedianValue, gridRow++, 1 );
statisticsLayout->addWidget( entropyLabel, gridRow, 0 );
statisticsLayout->addWidget( labelEntropyValue, gridRow++, 1 );
QGroupBox* statisticsGroup = new QGroupBox( tr( "Statistics" ) );
statisticsGroup->setLayout( statisticsLayout );
@@ -472,7 +479,10 @@ void FramePropertiesDock::updateStatistiques()
labelCountValue->setText( value.setNum( (float)counts, 'f', 0 ) );
double median = frame->getMedian( channel, min, max );
labelMedianValue->setText( value.setNum( median, 'f', 1 ) );
labelMedianValue->setText( value.setNum( median, 'f', 0 ) );
double entropy = frame->getEntropy( channel, min, max );
labelEntropyValue->setText( value.setNum( entropy, 'f', 2 ) );
double percentile = ( pixels > 0 ? ( 100.0 * counts / pixels ) : 0.0 );
labelPercentileValue->setText( value.setNum( percentile, 'f', 1 ) );
+4 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,14 +25,14 @@
#ifndef __FRAMEPROPERTIESDOCK_H__
#define __FRAMEPROPERTIESDOCK_H__
#include <QtWidgets>
#include "CommonDefs.h"
#include "HistogramWidget.h"
#include "config.h"
#include "lib/CalypFrame.h"
#include "lib/CalypStream.h"
#include <QtWidgets>
class FramePropertiesDock : public QWidget
{
Q_OBJECT
@@ -76,6 +76,7 @@ private:
QLabel* labelMeanValue;
QLabel* labelStdDevValue;
QLabel* labelMedianValue;
QLabel* labelEntropyValue;
QLabel* labelPercentileValue;
QLabel* colorsLabel;
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,14 +24,14 @@
#include "ModuleHandleDock.h"
#include "CalypAppModuleIf.h"
#include "ModulesHandle.h"
#include <QGridLayout>
#include <QLabel>
#include <QString>
#include <QtGui>
#include "CalypAppModuleIf.h"
#include "ModulesHandle.h"
ModuleHandleDock::ModuleHandleDock( QWidget* parent, CalypAppModuleIf* moduleIf )
: QWidget( parent ), m_pcCurrModuleIf( moduleIf )
{
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,12 +25,12 @@
#ifndef __MODULEHANDLEDOCK_H__
#define __MODULEHANDLEDOCK_H__
#include "CommonDefs.h"
#include "config.h"
#include <QSize>
#include <QWidget>
#include "CommonDefs.h"
#include "config.h"
class QLabel;
class CalypAppModuleIf;
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,11 +24,11 @@
#include "QualityMeasurementSidebar.h"
#include <QtGui>
#include "SubWindowHandle.h"
#include "VideoSubWindow.h"
#include <QtGui>
QualityMeasurementSidebar::QualityMeasurementSidebar( QWidget* parent, SubWindowHandle* windowManager )
: QWidget( parent ), m_pcMainWindowManager( windowManager ), m_pcCurrentVideoSubWindow( NULL )
{
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,14 +25,14 @@
#ifndef __QUALITYMEASUREMENTSIDEBAR_H__
#define __QUALITYMEASUREMENTSIDEBAR_H__
#include <QtWidgets>
#include "CommonDefs.h"
#include "HistogramWidget.h"
#include "config.h"
#include "lib/CalypFrame.h"
#include "lib/CalypStream.h"
#include <QtWidgets>
class SubWindowHandle;
class VideoSubWindow;
+4 -4
View File
@@ -1,5 +1,5 @@
###
### CMakeLists for calyp external components
###
#
# CMakeLists for calyp external components
#
ADD_SUBDIRECTORY( qcustomplot )
ADD_SUBDIRECTORY(qcustomplot)
+8 -16
View File
@@ -1,20 +1,12 @@
###
### CMakeLists for qcustomplot
###
#
# CMakeLists for qcustomplot
#
FIND_PACKAGE( Qt5 REQUIRED COMPONENTS Core Gui Widgets PrintSupport )
FIND_PACKAGE(Qt5 REQUIRED COMPONENTS Core Gui Widgets PrintSupport)
set(qcustomplot_SRCS
qcustomplot.cpp
qcustomplot.h
)
SET(qcustomplot_SRCS qcustomplot.cpp qcustomplot.h)
ADD_LIBRARY( QCustomPlotLib STATIC ${qcustomplot_SRCS} )
TARGET_LINK_LIBRARIES( QCustomPlotLib
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt5::PrintSupport
)
ADD_LIBRARY(QCustomPlotLib STATIC ${qcustomplot_SRCS})
TARGET_LINK_LIBRARIES(QCustomPlotLib Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
TARGET_INCLUDE_DIRECTORIES(QCustomPlotLib PUBLIC . )
TARGET_INCLUDE_DIRECTORIES(QCustomPlotLib PUBLIC .)
+9323 -8800
View File
File diff suppressed because it is too large. Load diff
+3126 -2870
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,11 +25,11 @@
#ifndef __WIDGETFRAMENUMBER_H__
#define __WIDGETFRAMENUMBER_H__
#include <QWidget>
#include "CommonDefs.h"
#include "config.h"
#include <QWidget>
class QLabel;
class FrameNumberWidget : public QWidget
+6 -2
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -938,7 +938,11 @@ void HistogramWidget::paintEvent( QPaintEvent* )
tipText += cellBeg + tr( "Median:" ) + cellMid;
double median = frame->getMedian( m_channelType, 0, frame->getNumHistogramSegment() - 1 );
tipText += value.setNum( median, 'f', 1 ) + cellEnd;
tipText += value.setNum( median, 'f', 0 ) + cellEnd;
tipText += cellBeg + tr( "Entropy:" ) + cellMid;
double entropy = frame->getEntropy( m_channelType, 0, frame->getNumHistogramSegment() - 1 );
tipText += value.setNum( entropy, 'f', 2 ) + cellEnd;
tipText += cellBeg + tr( "Percent:" ) + cellMid;
double percentile = ( pixels > 0 ? ( 100.0 * counts / pixels ) : 0.0 );
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -26,13 +26,13 @@
#ifndef __HISTOGRAMWIDGET_H__
#define __HISTOGRAMWIDGET_H__
#include <QColor>
#include <QWidget>
#include "CommonDefs.h"
#include "config.h"
#include "lib/CalypFrame.h"
#include <QColor>
#include <QWidget>
class QEvent;
class HistogramWorker;
+87 -103
View File
@@ -1,147 +1,131 @@
# - Try to find the required ffmpeg components(default: AVFORMAT, AVUTIL, AVCODEC)
# * Try to find the required ffmpeg components(default: AVFORMAT, AVUTIL, AVCODEC)
#
# Once done this will define
# FFMPEG_FOUND - System has the all required components.
# FFMPEG_INCLUDE_DIRS - Include directory necessary for using the required components headers.
# FFMPEG_LIBRARIES - Link these to use the required ffmpeg components.
# FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components.
# Once done this will define FFMPEG_FOUND - System has the all required components. FFMPEG_INCLUDE_DIRS - Include directory necessary for
# using the required components headers. FFMPEG_LIBRARIES - Link these to use the required ffmpeg components. FFMPEG_DEFINITIONS - Compiler
# switches required for using the required ffmpeg components.
#
# For each of the components it will additionally set.
# - AVCODEC
# - AVDEVICE
# - AVFORMAT
# - AVUTIL
# - POSTPROCESS
# - SWSCALE
# the following variables will be defined
# <component>_FOUND - System has <component>
# <component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers
# <component>_LIBRARIES - Link these to use <component>
# <component>_DEFINITIONS - Compiler switches required for using <component>
# <component>_VERSION - The components version
# For each of the components it will additionally set. - AVCODEC - AVDEVICE - AVFORMAT - AVUTIL - POSTPROCESS - SWSCALE the following variables will
# be defined <component>_FOUND - System has <component> <component>_INCLUDE_DIRS - Include directory necessary for using the <component>
# headers <component>_LIBRARIES - Link these to use <component> <component>_DEFINITIONS - Compiler switches required for using <component>
# <component>_VERSION - The components version
#
# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org>
# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
# Copyright (c) 2011, Michael Jansen, <kde@michael-jansen.biz>
# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org> Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org> Copyright (c) 2011, Michael Jansen,
# <kde@michael-jansen.biz>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(FindPackageHandleStandardArgs)
INCLUDE(FindPackageHandleStandardArgs)
# The default components were taken from a survey over other FindFFMPEG.cmake files
if (NOT FFmpeg_FIND_COMPONENTS)
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL)
endif ()
IF(NOT FFmpeg_FIND_COMPONENTS)
SET(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL)
ENDIF()
#
### Macro: set_component_found
# Macro: set_component_found
#
# Marks the given component as found if both *_LIBRARIES AND *_INCLUDE_DIRS is present.
#
macro(set_component_found _component )
if (${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS)
MACRO(set_component_found _component)
IF(${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS)
# message(STATUS " - ${_component} found.")
set(${_component}_FOUND TRUE)
else ()
SET(${_component}_FOUND TRUE)
ELSE()
# message(STATUS " - ${_component} not found.")
endif ()
endmacro()
ENDIF()
ENDMACRO()
#
### Macro: find_component
# Macro: find_component
#
# Checks for the given component by invoking pkgconfig and then looking up the libraries and
# include directories.
# Checks for the given component by invoking pkgconfig and then looking up the libraries and include directories.
#
macro(find_component _component _pkgconfig _library _header)
MACRO(find_component _component _pkgconfig _library _header)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(PC_${_component} ${_pkgconfig})
endif ()
endif (NOT WIN32)
IF(NOT WIN32)
# use pkg-config to get the directories and then use these values in the FIND_PATH() and FIND_LIBRARY() calls
FIND_PACKAGE(PkgConfig)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(PC_${_component} ${_pkgconfig})
ENDIF()
ENDIF(NOT WIN32)
find_path(${_component}_INCLUDE_DIRS ${_header}
HINTS
${PC_LIB${_component}_INCLUDEDIR}
${PC_LIB${_component}_INCLUDE_DIRS}
PATH_SUFFIXES
ffmpeg
)
FIND_PATH(
${_component}_INCLUDE_DIRS ${_header}
HINTS ${PC_LIB${_component}_INCLUDEDIR} ${PC_LIB${_component}_INCLUDE_DIRS}
PATH_SUFFIXES ffmpeg)
find_library(${_component}_LIBRARIES NAMES ${_library}
HINTS
${PC_LIB${_component}_LIBDIR}
${PC_LIB${_component}_LIBRARY_DIRS}
)
set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number.")
set_component_found(${_component})
mark_as_advanced(
${_component}_INCLUDE_DIRS
FIND_LIBRARY(
${_component}_LIBRARIES
${_component}_DEFINITIONS
${_component}_VERSION)
NAMES ${_library}
HINTS ${PC_LIB${_component}_LIBDIR} ${PC_LIB${_component}_LIBRARY_DIRS})
endmacro()
SET(${_component}_DEFINITIONS
${PC_${_component}_CFLAGS_OTHER}
CACHE STRING "The ${_component} CFLAGS.")
SET(${_component}_VERSION
${PC_${_component}_VERSION}
CACHE STRING "The ${_component} version number.")
SET_COMPONENT_FOUND(${_component})
MARK_AS_ADVANCED(${_component}_INCLUDE_DIRS ${_component}_LIBRARIES ${_component}_DEFINITIONS ${_component}_VERSION)
ENDMACRO()
# Check for cached results. If there are skip the costly part.
if (NOT FFMPEG_LIBRARIES)
IF(NOT FFMPEG_LIBRARIES)
# Check for all possible component.
find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h)
find_component(AVFORMAT libavformat avformat libavformat/avformat.h)
find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
find_component(AVUTIL libavutil avutil libavutil/avutil.h)
find_component(SWSCALE libswscale swscale libswscale/swscale.h)
find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h)
FIND_COMPONENT(AVCODEC libavcodec avcodec libavcodec/avcodec.h)
FIND_COMPONENT(AVFORMAT libavformat avformat libavformat/avformat.h)
FIND_COMPONENT(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
FIND_COMPONENT(AVUTIL libavutil avutil libavutil/avutil.h)
FIND_COMPONENT(SWSCALE libswscale swscale libswscale/swscale.h)
FIND_COMPONENT(POSTPROC libpostproc postproc libpostproc/postprocess.h)
# Check if the required components were found and add their stuff to the FFMPEG_* vars.
foreach (_component ${FFmpeg_FIND_COMPONENTS})
if (${_component}_FOUND)
FOREACH(_component ${FFmpeg_FIND_COMPONENTS})
IF(${_component}_FOUND)
# message(STATUS "Required component ${_component} present.")
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES})
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
else ()
SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES})
SET(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
LIST(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
ELSE()
# message(STATUS "Required component ${_component} missing.")
endif ()
endforeach ()
ENDIF()
ENDFOREACH()
# Build the include path with duplicates removed.
if (FFMPEG_INCLUDE_DIRS)
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
endif ()
IF(FFMPEG_INCLUDE_DIRS)
LIST(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
ENDIF()
# cache the vars.
set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFmpeg include directories." FORCE)
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFmpeg libraries." FORCE)
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFmpeg cflags." FORCE)
SET(FFMPEG_INCLUDE_DIRS
${FFMPEG_INCLUDE_DIRS}
CACHE STRING "The FFmpeg include directories." FORCE)
SET(FFMPEG_LIBRARIES
${FFMPEG_LIBRARIES}
CACHE STRING "The FFmpeg libraries." FORCE)
SET(FFMPEG_DEFINITIONS
${FFMPEG_DEFINITIONS}
CACHE STRING "The FFmpeg cflags." FORCE)
mark_as_advanced(FFMPEG_INCLUDE_DIRS
FFMPEG_LIBRARIES
FFMPEG_DEFINITIONS)
MARK_AS_ADVANCED(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES FFMPEG_DEFINITIONS)
endif ()
ENDIF()
# Now set the noncached _FOUND vars for the components.
foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE)
set_component_found(${_component})
endforeach ()
FOREACH(_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE)
SET_COMPONENT_FOUND(${_component})
ENDFOREACH()
# Compile the list of required vars
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
foreach (_component ${FFmpeg_FIND_COMPONENTS})
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
endforeach ()
SET(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
FOREACH(_component ${FFmpeg_FIND_COMPONENTS})
LIST(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
ENDFOREACH()
# Give a nice error message if some of the required vars are missing.
find_package_handle_standard_args(FFmpeg DEFAULT_MSG ${_FFmpeg_REQUIRED_VARS})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFmpeg DEFAULT_MSG ${_FFmpeg_REQUIRED_VARS})
+47 -50
View File
@@ -1,67 +1,64 @@
MACRO(ADD_EXTRA_MODULES dir)
SET( MODULE_LOCATION "${dir}/" )
ADD_SUBDIRECTORY( ${dir} ${CMAKE_CURRENT_BINARY_DIR}/extra-modules )
INCLUDE_DIRECTORIES( ${dir} )
SET( MODULE_LOCATION "${dir}/" PARENT_SCOPE )
ENDMACRO()
MACRO(ADD_MODULE name file )
# General function to add a module It receives the name of the module and the filename where it is defined. Used in modules/CMakeLists.txt
MACRO(ADD_MODULE name file)
SET(__modulename "Module${name}")
OPTION(MODULE_${name} "Use module ${name}" ON )
ADD_FEATURE_INFO(${name} MODULE_${name} "Module ${name}" )
IF( MODULE_${name} )
list(APPEND Calyp_Mod_SRCS ${MODULE_LOCATION}${file} )
LIST(APPEND MODULES_LIST_NAME ${name} )
LIST(APPEND MODULES_LIST_FILES ${file} )
SET( Calyp_Mod_SRCS "${Calyp_Mod_SRCS}" PARENT_SCOPE )
SET( MODULES_LIST_NAME "${MODULES_LIST_NAME}" PARENT_SCOPE )
SET( MODULES_LIST_FILES "${MODULES_LIST_FILES}" PARENT_SCOPE )
OPTION(MODULE_${name} "Use module ${name}" ON)
ADD_FEATURE_INFO(${name} MODULE_${name} "Module ${name}")
IF(MODULE_${name})
LIST(APPEND Calyp_Mod_SRCS ${MODULE_LOCATION}${file})
LIST(APPEND MODULES_LIST_NAME ${name})
LIST(APPEND MODULES_LIST_FILES ${file})
SET(Calyp_Mod_SRCS
"${Calyp_Mod_SRCS}"
PARENT_SCOPE)
SET(MODULES_LIST_NAME
"${MODULES_LIST_NAME}"
PARENT_SCOPE)
SET(MODULES_LIST_FILES
"${MODULES_LIST_FILES}"
PARENT_SCOPE)
ENDIF()
UNSET(__modulename)
ENDMACRO()
MACRO(ADD_MODULE_USE_OPENCV name file )
IF( USE_OPENCV )
SET( ADD_MODULE_USE_OPENCV_VERSION "2.4" )
CMAKE_PARSE_ARGUMENTS(ADD_MODULE_USE_OPENCV "" "VERSION" "MODULES" ${ARGN} )
IF( NOT ( ${OpenCV_VERSION} VERSION_LESS ${ADD_MODULE_USE_OPENCV_VERSION} ) )
SET( _HAS_MODULES TRUE )
FOREACH(opencv_module IN LISTS ADD_MODULE_USE_OPENCV_MODULES )
string(TOUPPER "${opencv_module}" opencv_moduleUP)
FIND_PACKAGE( OpenCV QUIET COMPONENTS ${opencv_module} )
IF( NOT ${OPENCV_${opencv_moduleUP}_FOUND} EQUAL "1" )
SET( _HAS_MODULES FALSE )
# General function to add a module It receives the name of the module and the filename where it is defined. Moreover it receives a VERSION and MODULES
# (OpenCV modules required) Used in modules/CMakeLists.txt
MACRO(ADD_MODULE_USE_OPENCV name file)
IF(USE_OPENCV)
SET(ADD_MODULE_USE_OPENCV_VERSION "2.4")
CMAKE_PARSE_ARGUMENTS(ADD_MODULE_USE_OPENCV "" "VERSION" "MODULES" ${ARGN})
IF(NOT (${OpenCV_VERSION} VERSION_LESS ${ADD_MODULE_USE_OPENCV_VERSION}))
SET(_HAS_MODULES TRUE)
FOREACH(opencv_module IN LISTS ADD_MODULE_USE_OPENCV_MODULES)
STRING(TOUPPER "${opencv_module}" opencv_moduleUP)
FIND_PACKAGE(OpenCV QUIET COMPONENTS ${opencv_module})
IF(NOT ${OPENCV_${opencv_moduleUP}_FOUND} EQUAL "1")
SET(_HAS_MODULES FALSE)
ELSE()
LIST(APPEND OPENCV_MODULES ${opencv_module} )
LIST(APPEND OPENCV_MODULES ${opencv_module})
ENDIF()
ENDFOREACH()
IF( _HAS_MODULES )
ADD_MODULE( ${name} ${file} )
IF(_HAS_MODULES)
ADD_MODULE(${name} ${file})
ENDIF()
UNSET( OPENCV_${opencv_moduleUP}_FOUND )
UNSET( _HAS_MODULES )
UNSET(OPENCV_${opencv_moduleUP}_FOUND)
UNSET(_HAS_MODULES)
ENDIF()
UNSET( ADD_MODULE_USE_OPENCV_VERSION )
UNSET(ADD_MODULE_USE_OPENCV_VERSION)
ENDIF()
ENDMACRO()
#
# Create header
#
MACRO(CREATE_MODULE_MACROS )
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "// This files add the header files of each module\n"
"#ifndef __MODULESLISTHEADER_H__\n#define __MODULESLISTHEADER_H__\n" )
foreach(module ${MODULES_LIST_FILES})
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#include \"${module}.h\"\n")
endforeach(module ${MODULES_LIST_FILES})
MACRO(CREATE_MODULE_MACROS)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "// This files add the header files of each module\n"
"#ifndef __MODULESLISTHEADER_H__\n#define __MODULESLISTHEADER_H__\n")
FOREACH(module ${MODULES_LIST_FILES})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#include \"${module}.h\"\n")
ENDFOREACH(module ${MODULES_LIST_FILES})
file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#define REGISTER_ALL_MODULES \\\n" )
foreach(module ${MODULES_LIST_NAME})
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "Register( \"${module}\", &(${module}::Create) ); \\\n")
endforeach(module ${MODULES_LIST_NAME})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#define REGISTER_ALL_MODULES \\\n")
FOREACH(module ${MODULES_LIST_NAME})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "Register( \"${module}\", &(${module}::Create) ); \\\n")
ENDFOREACH(module ${MODULES_LIST_NAME})
file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "\n#endif // __MODULESLISTHEADER_H__\n" )
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "\n#endif // __MODULESLISTHEADER_H__\n")
ENDMACRO()
+63 -49
View File
@@ -1,63 +1,77 @@
#####################################################################################
# ####################################################################################################################################################
# DLLs and Win32 specific code
######################################################################################
# ####################################################################################################################################################
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} "." )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} "." )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} "." )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
FOREACH(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
STRING(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ".")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ".")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ".")
ENDFOREACH(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
SET(MSVC_DLL_DIR "MSVC_DLL_DIR" CACHE PATH "Where to find MSVC dlls")
#INSTALL(FILES ${MSVC_DLL_DIR}/msvcr120.dll DESTINATION bin )
#INSTALL(FILES ${MSVC_DLL_DIR}/msvcp120.dll DESTINATION bin )
SET(MSVC_DLL_DIR
"MSVC_DLL_DIR"
CACHE PATH "Where to find MSVC dlls")
# INSTALL(FILES ${MSVC_DLL_DIR}/msvcr120.dll DESTINATION bin ) INSTALL(FILES ${MSVC_DLL_DIR}/msvcp120.dll DESTINATION bin )
SET(QT_DIR "QT-Dir" CACHE PATH "Where to find QT Lib on Windows")
SET(QT_ICU_VERSION "" CACHE STRING "Qt ICU version of dll's" )
SET(QT_DLL_POSTFIX "" CACHE STRING "Postfix to dll's name for debug" )
SET(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH} ${QT_DIR}" )
SET(QT_DIR
"QT-Dir"
CACHE PATH "Where to find QT Lib on Windows")
SET(QT_ICU_VERSION
""
CACHE STRING "Qt ICU version of dll's")
SET(QT_DLL_POSTFIX
""
CACHE STRING "Postfix to dll's name for debug")
SET(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH} ${QT_DIR}")
SET(WINDLLIB "Dl-location" CACHE PATH "Where to find DL Lib on Windows")
SET(WINDLLIB
"Dl-location"
CACHE PATH "Where to find DL Lib on Windows")
IF(NOT USE_QT4)
INSTALL(FILES ${QT_DIR}/bin/Qt5Core${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Gui${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Widgets${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5PrintSupport${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/plugins/platforms/qwindows${QT_DLL_POSTFIX}.dll DESTINATION bin/platforms)
INSTALL(FILES ${QT_DIR}/plugins/platforms/qminimal${QT_DLL_POSTFIX}.dll DESTINATION bin/platforms)
INSTALL(FILES ${QT_DIR}/plugins/platforms/qoffscreen${QT_DLL_POSTFIX}.dll DESTINATION bin/platforms)
IF( NOT USE_QT4 )
INSTALL(FILES ${QT_DIR}/bin/Qt5Core${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Gui${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Widgets${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5PrintSupport${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/plugins/platforms/qwindows${QT_DLL_POSTFIX}.dll DESTINATION bin/platforms )
INSTALL(FILES ${QT_DIR}/plugins/platforms/qminimal${QT_DLL_POSTFIX}.dll DESTINATION bin/platforms )
INSTALL(FILES ${QT_DIR}/plugins/platforms/qoffscreen${QT_DLL_POSTFIX}.dll DESTINATION bin/platforms )
IF( USE_FERVOR )
INSTALL(FILES ${QT_DIR}/bin/Qt5Network${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5WebKit${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5WebKitWidgets${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Quick${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Qml${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Multimedia${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Sql${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Positioning${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5Sensors${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5MultimediaWidgets${QT_DLL_POSTFIX}.dll DESTINATION bin )
INSTALL(FILES ${QT_DIR}/bin/Qt5OpenGL${QT_DLL_POSTFIX}.dll DESTINATION bin )
IF(USE_FERVOR)
INSTALL(FILES ${QT_DIR}/bin/Qt5Network${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5WebKit${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5WebKitWidgets${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Quick${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Qml${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Multimedia${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Sql${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Positioning${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5Sensors${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5MultimediaWidgets${QT_DLL_POSTFIX}.dll DESTINATION bin)
INSTALL(FILES ${QT_DIR}/bin/Qt5OpenGL${QT_DLL_POSTFIX}.dll DESTINATION bin)
ENDIF()
ENDIF()
IF( USE_OPENCV )
SET(OpenCV_DLL_DIR "${OpenCV_DIR}/bin" CACHE PATH "Where to find OpenCV dlls")
SET(OpenCV_INSTALL_MODULES ${OPENCV_MODULES} CACHE STRING "List of OpenCV modules")
FOREACH(opencv_module IN LISTS OpenCV_INSTALL_MODULES )
INSTALL(FILES ${OpenCV_DLL_DIR}/opencv_${opencv_module}${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}.dll DESTINATION bin )
IF(USE_OPENCV)
SET(OpenCV_DLL_DIR
"${OpenCV_DIR}/bin"
CACHE PATH "Where to find OpenCV dlls")
SET(OpenCV_INSTALL_MODULES
${OPENCV_MODULES}
CACHE STRING "List of OpenCV modules")
FOREACH(opencv_module IN LISTS OpenCV_INSTALL_MODULES)
INSTALL(FILES ${OpenCV_DLL_DIR}/opencv_${opencv_module}${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}.dll DESTINATION bin)
ENDFOREACH()
ENDIF()
IF( USE_FFMPEG )
SET(FFMPEG_DIR "FFmpeg-Dir" CACHE PATH "Where to find FFmpeg Lib on Windows")
INSTALL(FILES ${FFMPEG_DIR}/bin/avcodec-${AVCODEC_VERSION}.dll DESTINATION bin )
INSTALL(FILES ${FFMPEG_DIR}/bin/avformat-${AVFORMAT_VERSION}.dll DESTINATION bin )
INSTALL(FILES ${FFMPEG_DIR}/bin/avutil-${AVUTIL_VERSION}.dll DESTINATION bin )
INSTALL(FILES ${FFMPEG_DIR}/bin/swscale-${SWSCALE_VERSION}.dll DESTINATION bin )
INSTALL(FILES ${FFMPEG_DIR}/bin/swresample-${SWRESAMPLE_VERSION}.dll DESTINATION bin )
IF(USE_FFMPEG)
SET(FFMPEG_DIR
"FFmpeg-Dir"
CACHE PATH "Where to find FFmpeg Lib on Windows")
INSTALL(FILES ${FFMPEG_DIR}/bin/avcodec-${AVCODEC_VERSION}.dll DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/avformat-${AVFORMAT_VERSION}.dll DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/avutil-${AVUTIL_VERSION}.dll DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/swscale-${SWSCALE_VERSION}.dll DESTINATION bin)
INSTALL(FILES ${FFMPEG_DIR}/bin/swresample-${SWRESAMPLE_VERSION}.dll DESTINATION bin)
ENDIF()
+5 -5
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -26,10 +26,10 @@
#define __CONFIG_CALYP_H__
/* Version definition */
#define CALYP_VERSION_MAJOR @CALYP_VERSION_MAJOR@
#define CALYP_VERSION_MINOR @CALYP_VERSION_MINOR@
#define CALYP_VERSION_PATCH @CALYP_VERSION_PATCH@
#define CALYP_VERSION @CALYP_VERSION@
#define CALYP_VERSION_MAJOR @CALYP_VERSION_MAJOR @
#define CALYP_VERSION_MINOR @CALYP_VERSION_MINOR @
#define CALYP_VERSION_PATCH @CALYP_VERSION_PATCH @
#define CALYP_VERSION @CALYP_VERSION @
#define CALYP_VERSION_STRING "@CALYP_VERSION_STRING@"
#define UPDATE_CHANNEL "@UPDATE_CHANNEL@"
+4 -6
View File
@@ -1,7 +1,5 @@
###
### CMakeLists for examples
###
ADD_SUBDIRECTORY( modules )
#
# CMakeLists for examples
#
ADD_SUBDIRECTORY(modules)
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,7 @@
*/
#include "AbsoluteFrameDifferenceExample.h"
#include <cstdlib>
REGISTER_CLASS_MAKER( AbsoluteFrameDifferenceExample )
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,10 +25,10 @@
#ifndef __ABSOLUTEFRAMEDIFFERENCEEXAMPLE_H__
#define __ABSOLUTEFRAMEDIFFERENCEEXAMPLE_H__
#include "CalypModuleIf.h"
#include <cassert>
#include "CalypModuleIf.h"
class AbsoluteFrameDifferenceExample : public CalypModuleIf
{
REGISTER_CLASS_FACTORY( AbsoluteFrameDifferenceExample )
+9 -14
View File
@@ -1,21 +1,16 @@
###
### CMakeLists for modules_example
###
#
# CMakeLists for modules_example
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.9 )
PROJECT("modules_example")
PROJECT( "modules_example" )
# THIS
# FIND_PACKAGE( Calyp )
#INCLUDE_DIRECTORIES( ${CALYP_INCLUDE_DIRS} )
# OR
INCLUDE_DIRECTORIES( ../../lib )
# THIS FIND_PACKAGE( Calyp ) INCLUDE_DIRECTORIES( ${CALYP_INCLUDE_DIRS} ) OR
INCLUDE_DIRECTORIES(../../lib)
ADD_LIBRARY(FrameBinarization SHARED FrameBinarization_APIv1.cpp)
TARGET_LINK_LIBRARIES( FrameBinarization ${CALYP_LINKER_LIBS} )
TARGET_LINK_LIBRARIES(FrameBinarization ${CALYP_LINKER_LIBS})
ADD_LIBRARY(AbsoluteFrameDifferenceExample SHARED AbsoluteFrameDifferenceExample.cpp)
TARGET_LINK_LIBRARIES( AbsoluteFrameDifferenceExample ${PROJECT_LIBRARY} ${CALYP_LINKER_LIBS} )
TARGET_LINK_LIBRARIES(AbsoluteFrameDifferenceExample ${PROJECT_LIBRARY} ${CALYP_LINKER_LIBS})
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+36 -55
View File
@@ -1,12 +1,12 @@
###
### CMakeLists for calyp lib component
###
#
# CMakeLists for calyp lib component
#
INCLUDE(GNUInstallDirs)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
set(Calyp_Lib_SRCS
SET(Calyp_Lib_SRCS
LibMemory.h
CalypLib.h
CalypDefs.h
@@ -29,76 +29,57 @@ set(Calyp_Lib_SRCS
CalypOptions.cpp
# Modules
CalypModuleIf.h
CalypOpenCVModuleIf.h
)
CalypOpenCVModuleIf.h)
LIST(APPEND CMAKE_CFG_LINKER_LIBSS ${PROJECT_LIBRARY} )
LIST(APPEND CMAKE_CFG_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} )
LIST(APPEND CMAKE_CFG_LINKER_LIBSS ${PROJECT_LIBRARY})
LIST(APPEND CMAKE_CFG_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
IF( USE_FFMPEG )
LIST( APPEND Calyp_Lib_SRCS StreamHandlerLibav.h )
LIST( APPEND Calyp_Lib_SRCS StreamHandlerLibav.cpp )
IF(USE_FFMPEG)
LIST(APPEND Calyp_Lib_SRCS StreamHandlerLibav.h)
LIST(APPEND Calyp_Lib_SRCS StreamHandlerLibav.cpp)
LIST(APPEND CMAKE_CFG_LINKER_LIBSS ${FFMPEG_LIBRARIES} )
LIST(APPEND CMAKE_CFG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} )
LIST(APPEND CMAKE_CFG_LINKER_LIBSS ${FFMPEG_LIBRARIES})
LIST(APPEND CMAKE_CFG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS})
ENDIF()
IF( USE_OPENCV )
LIST( APPEND Calyp_Lib_SRCS StreamHandlerOpenCV.h )
LIST( APPEND Calyp_Lib_SRCS StreamHandlerOpenCV.cpp )
IF(USE_OPENCV)
LIST(APPEND Calyp_Lib_SRCS StreamHandlerOpenCV.h)
LIST(APPEND Calyp_Lib_SRCS StreamHandlerOpenCV.cpp)
LIST( APPEND Calyp_Lib_SRCS CalypOpenCVModuleIf.cpp )
LIST(APPEND Calyp_Lib_SRCS CalypOpenCVModuleIf.cpp)
LIST(APPEND CMAKE_CFG_LINKER_LIBSS ${OpenCV_LIBRARIES} )
LIST(APPEND CMAKE_CFG_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS} )
LIST(APPEND CMAKE_CFG_LINKER_LIBSS ${OpenCV_LIBRARIES})
LIST(APPEND CMAKE_CFG_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
ENDIF()
set(Calyp_Lib_HEADERS
CalypDefs.h
CalypFrame.h
CalypStream.h
CalypOptions.h
CalypModuleIf.h
CalypOpenCVModuleIf.h
)
SET(Calyp_Lib_HEADERS CalypDefs.h CalypFrame.h CalypStream.h CalypOptions.h CalypModuleIf.h CalypOpenCVModuleIf.h)
CONFIGURE_FILE( CalypConfig.cmake.in CalypConfig.cmake @ONLY)
CONFIGURE_FILE(CalypConfig.cmake.in CalypConfig.cmake @ONLY)
INCLUDE_DIRECTORIES( ${FFMPEG_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} )
INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})
IF( USE_STATIC )
ADD_LIBRARY( ${PROJECT_LIBRARY} STATIC ${Calyp_Lib_SRCS} )
IF(USE_STATIC)
ADD_LIBRARY(${PROJECT_LIBRARY} STATIC ${Calyp_Lib_SRCS})
ELSE()
ADD_LIBRARY( ${PROJECT_LIBRARY} SHARED ${Calyp_Lib_SRCS} )
ADD_LIBRARY(${PROJECT_LIBRARY} SHARED ${Calyp_Lib_SRCS})
ENDIF()
TARGET_LINK_LIBRARIES(${PROJECT_LIBRARY} ${FFMPEG_LIBRARIES} ${OpenCV_LIBRARIES})
TARGET_LINK_LIBRARIES( ${PROJECT_LIBRARY}
${FFMPEG_LIBRARIES}
${OpenCV_LIBRARIES}
)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_LIBRARY} PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_LIBRARY}
PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
)
SET_TARGET_PROPERTIES(${PROJECT_LIBRARY} PROPERTIES VERSION ${CALYP_VERSION} SOVERSION ${CALYP_VERSION_MAJOR})
SET_TARGET_PROPERTIES( ${PROJECT_LIBRARY}
PROPERTIES VERSION ${CALYP_VERSION}
SOVERSION ${CALYP_VERSION_MAJOR}
)
IF( NOT USE_STATIC )
INSTALL( TARGETS ${PROJECT_LIBRARY}
IF(NOT USE_STATIC)
INSTALL(
TARGETS ${PROJECT_LIBRARY}
RUNTIME DESTINATION bin
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
INSTALL(FILES ${Calyp_Lib_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" )
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CalypConfig.cmake DESTINATION share/calyp )
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
INSTALL(FILES ${Calyp_Lib_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CalypConfig.cmake DESTINATION share/calyp)
ENDIF()
IF( BUILD_TESTS )
ADD_SUBDIRECTORY( tests )
IF(BUILD_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF()
+2 -2
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -27,9 +27,9 @@
#define __CALYPDEFS_H__
#include <algorithm>
#include <iterator>
#include <string>
#include <vector>
#include <iterator>
typedef unsigned short ClpPel; ///< 16-bit pixel type
typedef unsigned char ClpByte;
+33 -6
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,13 +24,13 @@
#include "CalypFrame.h"
#include <cassert>
#include <cmath>
#include "LibMemory.h"
#include "PixelFormats.h"
#include "config.h"
#include <cassert>
#include <cmath>
#ifdef USE_OPENCV
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
@@ -507,7 +507,7 @@ ClpPel CalypFrame::operator()( unsigned int ch, unsigned int xPos, unsigned int
{
retValue = d->m_pppcInputPel[ch][yPos][xPos];
if( !absolute && d->m_bHasNegativeValues )
retValue = retValue - int(d->m_uiHalfPelValue);
retValue = retValue - int( d->m_uiHalfPelValue );
}
return ClpPel( retValue );
}
@@ -735,7 +735,8 @@ void CalypFrame::fillRGBBuffer()
{
#define PEL_ARGB( a, r, g, b ) ( ( a & 0xff ) << 24 ) | ( ( r & 0xff ) << 16 ) | ( ( g & 0xff ) << 8 ) | ( b & 0xff )
#define PEL_RGB( r, g, b ) PEL_ARGB( 0xffu, r, g, b )
#define CLAMP_YUV2RGB( X ) X = X < 0 ? 0 : X > 255 ? 255 : X;
#define CLAMP_YUV2RGB( X ) X = X < 0 ? 0 : X > 255 ? 255 : \
X;
#define YUV2RGB( iY, iU, iV, iR, iG, iB ) \
iR = iY + ( ( 1436 * ( iV - 128 ) ) >> 10 ); \
iG = iY - ( ( 352 * ( iU - 128 ) + 731 * ( iV - 128 ) ) >> 10 ); \
@@ -1132,6 +1133,32 @@ double CalypFrame::getHistogramValue( unsigned channel, unsigned int bin )
return d->m_puiHistogram[indexStart + bin];
}
double CalypFrame::getEntropy( unsigned channel, unsigned int start, unsigned int end )
{
if( !d->m_bHasHistogram )
return 0;
channel = d->getRealHistogramChannel( channel );
if( channel < 0 )
return 0;
int indexStart = channel * d->m_uiHistoSegments;
double numValues = getNumPixelsRange( channel, start, end );
double entropy = 0.0;
for( unsigned b = start; b <= end; b++ )
{
if( d->m_puiHistogram[indexStart + b] == 0 )
continue;
double prob = d->m_puiHistogram[indexStart + b] / numValues;
entropy -= prob * log2( prob );
}
return entropy;
}
/*
**************************************************************
* interface to other libs
+2 -2
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -299,7 +299,6 @@ public:
*/
CalypPixel getPixel( unsigned int xPos, unsigned int yPos ) const;
/**
* Get pixel value at coordinates
* in the desired color space
@@ -382,6 +381,7 @@ public:
double getHistogramValue( unsigned channel, unsigned int bin );
unsigned int getNEBins( unsigned channel );
int getNumHistogramSegment();
double getEntropy( unsigned channel, unsigned int start, unsigned int end );
/**
* interface with OpenCV lib
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+2 -2
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -164,7 +164,7 @@ public:
* Module API version 3
*/
virtual CalypFrame* getProcessedFrame() { return m_pcOutputFrame; }
virtual bool needFrame() { return m_iFrameBufferCount == 0? true : false; };
virtual bool needFrame() { return m_iFrameBufferCount == 0 ? true : false; };
virtual bool flush()
{
m_iFrameBufferCount = 0;
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+8 -9
View File
@@ -38,13 +38,13 @@
#include "CalypOptions.h"
#include "config.h"
#include "lib/CalypModuleIf.h"
#include <cstring>
#include <iostream>
#include <sstream>
#include "config.h"
#include "lib/CalypModuleIf.h"
using namespace std;
struct ParseFailure : public std::exception
@@ -284,7 +284,7 @@ bool CalypOptions::hasOpt( const ClpString& optName )
void CalypOptions::addDefaultOptions()
{
addOptions() /**/
( "help,h", "produce help message" ) /**/
( "help", "produce help message" ) /**/
( "version", "show version and exit" ) /**/
( "pel_fmts", "list pixel formats" ) /**/
( "quality_metrics", "list supported quality metrics" ) /**/
@@ -477,27 +477,26 @@ unsigned int CalypOptions::parseSHORT( unsigned int argc, char* argv[] )
return 1;
}
bool CalypOptions::parse( unsigned int argc, char* argv[] )
int CalypOptions::parse( unsigned int argc, char* argv[] )
{
try
{
m_aUnhandledArgs = scanArgv( argc, argv );
if( checkListingOpts() )
{
return false;
return 1;
}
}
catch( std::exception& e )
{
std::cerr << "error: " << e.what() << "\n";
return false;
return -1;
}
catch( ... )
{
std::cerr << "Exception of unknown type!\n";
}
return true;
return 0;
}
list<const char*> CalypOptions::scanArgv( unsigned int argc, char* argv[] )
+3 -3
View File
@@ -40,11 +40,11 @@
#ifndef __CALYPOPTIONS_H__
#define __CALYPOPTIONS_H__
#include "CalypDefs.h"
#include <list>
#include <map>
#include "CalypDefs.h"
/**
* \class OptionBase
* \ingroup CalypLibGrp
@@ -90,7 +90,7 @@ public:
CalypOptions( const ClpString& name = "" );
~CalypOptions();
bool parse( unsigned int argc, char* argv[] );
int parse( unsigned int argc, char* argv[] );
void parse( std::vector<ClpString> args_array );
std::list<const char*>& getUnhandledArgs() { return m_aUnhandledArgs; }
+7 -5
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -23,7 +23,6 @@
*/
#include "CalypFrame.h"
#include "PixelFormats.h"
#include "config.h"
@@ -51,9 +50,12 @@ static inline void yuvToRgb( const int& iY, const int& iU, const int& iV, int& i
iR = iY + ( ( 1436 * ( iV - 128 ) ) >> 10 );
iG = iY - ( ( 352 * ( iU - 128 ) + 731 * ( iV - 128 ) ) >> 10 );
iB = iY + ( ( 1812 * ( iU - 128 ) ) >> 10 );
iR = iR < 0 ? 0 : iR > 255 ? 255 : iR;
iG = iG < 0 ? 0 : iG > 255 ? 255 : iG;
iB = iB < 0 ? 0 : iB > 255 ? 255 : iB;
iR = iR < 0 ? 0 : iR > 255 ? 255 :
iR;
iG = iG < 0 ? 0 : iG > 255 ? 255 :
iG;
iB = iB < 0 ? 0 : iB > 255 ? 255 :
iB;
}
static inline void rgbToYuv( const int& iR, const int& iG, const int& iB, int& iY, int& iU, int& iV )
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+31 -31
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -56,9 +56,9 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
1,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_YUV420P ),
{
{0, 0, 1}, /* Y */
{1, 0, 1}, /* U */
{2, 0, 1}, /* V */
{ 0, 0, 1 }, /* Y */
{ 1, 0, 1 }, /* U */
{ 2, 0, 1 }, /* V */
},
},
},
@@ -73,9 +73,9 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_YUV422P ),
{
{0, 0, 1}, /* Y */
{1, 0, 1}, /* U */
{2, 0, 1}, /* V */
{ 0, 0, 1 }, /* Y */
{ 1, 0, 1 }, /* U */
{ 2, 0, 1 }, /* V */
},
},
},
@@ -90,9 +90,9 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_YUV444P ),
{
{0, 0, 1}, /* Y */
{1, 0, 1}, /* U */
{2, 0, 1}, /* V */
{ 0, 0, 1 }, /* Y */
{ 1, 0, 1 }, /* U */
{ 2, 0, 1 }, /* V */
},
},
},
@@ -107,9 +107,9 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_YUYV422 ),
{
{0, 1, 1}, /* Y */
{0, 3, 2}, /* U */
{0, 3, 4}, /* V */
{ 0, 1, 1 }, /* Y */
{ 0, 3, 2 }, /* U */
{ 0, 3, 4 }, /* V */
},
},
},
@@ -123,7 +123,7 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_GRAY8 ),
{{0, 0, 1}}, /* Y */
{ { 0, 0, 1 } }, /* Y */
},
},
{
@@ -137,9 +137,9 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_NONE ),
{
{0, 0, 1}, /* R */
{1, 0, 1}, /* G */
{2, 0, 1}, /* B */
{ 0, 0, 1 }, /* R */
{ 1, 0, 1 }, /* G */
{ 2, 0, 1 }, /* B */
},
},
},
@@ -154,9 +154,9 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_RGB24 ),
{
{0, 2, 1}, /* R */
{0, 2, 2}, /* G */
{0, 2, 3}, /* B */
{ 0, 2, 1 }, /* R */
{ 0, 2, 2 }, /* G */
{ 0, 2, 3 }, /* B */
},
},
},
@@ -171,9 +171,9 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_BGR24 ),
{
{0, 2, 3}, /* R */
{0, 2, 2}, /* G */
{0, 2, 1}, /* B */
{ 0, 2, 3 }, /* R */
{ 0, 2, 2 }, /* G */
{ 0, 2, 1 }, /* B */
},
},
},
@@ -188,10 +188,10 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_RGBA ),
{
{0, 3, 1}, /* R */
{0, 3, 2}, /* G */
{0, 3, 3}, /* B */
{0, 3, 4}, /* A */
{ 0, 3, 1 }, /* R */
{ 0, 3, 2 }, /* G */
{ 0, 3, 3 }, /* B */
{ 0, 3, 4 }, /* A */
},
},
},
@@ -206,10 +206,10 @@ const std::map<int, CalypPixelFormatDescriptor> g_CalypPixFmtDescriptorsMap = {
0,
ADD_FFMPEG_PEL_FMT( AV_PIX_FMT_BGRA ),
{
{0, 3, 3}, /* R */
{0, 3, 2}, /* G */
{0, 3, 1}, /* B */
{0, 3, 4}, /* A */
{ 0, 3, 3 }, /* R */
{ 0, 3, 2 }, /* G */
{ 0, 3, 1 }, /* B */
{ 0, 3, 4 }, /* A */
},
},
},
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -25,10 +25,10 @@
#ifndef __PIXELFORMATS_H__
#define __PIXELFORMATS_H__
#include "CalypFrame.h"
#include <map>
#include "CalypFrame.h"
#define CHROMA_RESAMPLING( X ) ( ( ( X + 1 ) >> 1 ) << 1 )
#define CHROMARATIO( SIZE, RATIO ) ( RATIO > 1 ? ( ( SIZE + 1 ) / RATIO ) : SIZE )
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,13 +24,13 @@
#include "StreamHandlerLibav.h"
#include <cstdio>
#include <iostream>
#include "CalypFrame.h"
#include "LibMemory.h"
#include "PixelFormats.h"
#include <cstdio>
#include <iostream>
#if( ( LIBAVCODEC_VERSION_MAJOR > 57 ) || ( LIBAVCODEC_VERSION_MAJOR == 57 ) && ( LIBAVCODEC_VERSION_MINOR >= 37 ) )
#define FF_SEND_RECEIVE_API
#define FF_USER_CODEC_PARAM
+2 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -27,6 +27,7 @@
#define __STREAMHANDLERLIBAV_H__
#include <inttypes.h>
#include <string>
#include <vector>
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,11 +24,11 @@
#include "StreamHandlerOpenCV.h"
#include "CalypFrame.h"
#include "LibMemory.h"
#include <cstdio>
#include <opencv2/opencv.hpp>
#include "CalypFrame.h"
#include "LibMemory.h"
#if CV_MAJOR_VERSION >= 3
#include <opencv2/videoio.hpp>
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+4 -4
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,12 +24,12 @@
#include "StreamHandlerPortableMap.h"
#include "CalypFrame.h"
#include "LibMemory.h"
#include <cmath>
#include <cstdio>
#include "CalypFrame.h"
#include "LibMemory.h"
std::vector<CalypStreamFormat> StreamHandlerPortableMap::supportedReadFormats()
{
INI_REGIST_CALYP_SUPPORTED_FMT;
+1 -1
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
+3 -3
View File
@@ -1,5 +1,5 @@
/* This file is a part of Calyp project
* Copyright (C) 2014-2019 by Joao Carreira (jfmcarreira@gmail.com)
* Copyright (C) 2014-2021 by Joao Carreira (jfmcarreira@gmail.com)
* Luis Lucas (luisfrlucas@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -24,11 +24,11 @@
#include "StreamHandlerRaw.h"
#include <cstdio>
#include "CalypFrame.h"
#include "LibMemory.h"
#include <cstdio>
std::vector<CalypStreamFormat> StreamHandlerRaw::supportedReadFormats()
{
INI_REGIST_CALYP_SUPPORTED_FMT;
Loaded 100 of 166 files, more files were not shown because too many files have changed in this diff. Show more