Skip to content

Commit

Permalink
Merge branch 'main' into RawImagePlanarMetadataFix
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedzakikochargi committed Apr 16, 2024
2 parents f52055d + ba0f2ff commit d488909
Show file tree
Hide file tree
Showing 48 changed files with 1,559 additions and 20 deletions.
137 changes: 137 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...

2 changes: 1 addition & 1 deletion .github/workflows/CI-Linux-ARM64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cuda: 'ON'
prep-cmd: 'echo skipping builder prep as I can not sudo'
cache-path: './none'
cmake-conf-cmd: 'export VCPKG_FORCE_SYSTEM_BINARIES=1 && cmake -B . -DENABLE_ARM64=ON ../base'
cmake-conf-cmd: 'export VCPKG_FORCE_SYSTEM_BINARIES=1 && export VCPKG_OVERLAY_PORTS=../thirdparty/custom-overlay && cmake -B . -DENABLE_ARM64=ON ../base'
nProc: 6
jetson-publish:
needs: jetson-build-test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-lin-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
prep-cmd:
type: string
description: 'commands required to be run on a builder to prep it for build'
default: 'sudo apt-get update -qq && sudo apt-get -y install ca-certificates curl zip unzip tar autoconf automake autopoint build-essential flex git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libsoup-gnome2.4-dev libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libncurses5-dev libncursesw5-dev ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm gperf bison python3 python3-pip dos2unix && pip3 install meson'
default: 'sudo apt-get update -qq && sudo apt-get -y install ca-certificates curl zip unzip tar autoconf automake autopoint build-essential flex git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libsoup-gnome2.4-dev libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libncurses5-dev libncursesw5-dev ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm gperf bison python3 python3-pip dos2unix libx11-dev libgles2-mesa-dev && pip3 install meson'
required: false
prep-check-cmd:
type: string
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-lin-wsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
prep-cmd:
type: string
description: 'commands required to be run on a builder to prep it for build'
default: 'sudo apt-get update -qq && sudo apt-get -y install ca-certificates curl zip unzip tar autoconf automake autopoint build-essential flex git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libsoup-gnome2.4-dev libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libncurses5-dev libncursesw5-dev ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm gperf bison python3 python3-pip dos2unix && pip3 install meson'
default: 'sudo apt-get update -qq && sudo apt-get -y install ca-certificates curl zip unzip tar autoconf automake autopoint build-essential flex git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libsoup-gnome2.4-dev libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libncurses5-dev libncursesw5-dev ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm gperf bison python3 python3-pip dos2unix libx11-dev libgles2-mesa-dev && pip3 install meson'
required: false
prep-check-cmd:
type: string
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-lin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
prep-cmd:
type: string
description: 'commands required to be run on a builder to prep it for build'
default: 'sudo apt-get update -qq && sudo apt-get -y install ca-certificates curl zip unzip tar autoconf automake autopoint build-essential flex git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libsoup-gnome2.4-dev libva-dev libvdpau-dev libvorbis-dev libxdamage-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libncurses5-dev libncursesw5-dev ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm gperf bison python3 python3-pip dos2unix && pip3 install meson'
default: 'sudo apt-get update -qq && sudo apt-get -y install ca-certificates curl zip unzip tar autoconf automake autopoint build-essential flex git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libsoup-gnome2.4-dev libva-dev libvdpau-dev libvorbis-dev libxdamage-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev libncurses5-dev libncursesw5-dev ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm gperf bison python3 python3-pip dos2unix libx11-dev libgles2-mesa-dev && pip3 install meson'
required: false
prep-check-cmd:
type: string
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/doxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Doxygen Action

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
pages: write
steps:
- uses: actions/checkout@v2

- name: Update Footer with Commit Hash
run: |
COMMIT_HASH=$(git rev-parse --short HEAD)
sed -i "s/@COMMIT_HASH@/$COMMIT_HASH/g" footer.html
- name: Doxygen Action
uses: mattnotmitt/doxygen-action@v1.1.0
with:
doxyfile-path: "./Doxyfile"
working-directory: "."

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./documentation/html
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
58 changes: 58 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Doxyfile configuration file
# Project name and version
PROJECT_NAME = "ApraPipes"
PROJECT_NUMBER = 1.0
# The directory where the documentation will be created
OUTPUT_DIRECTORY = ./documents
# The root directory of the source code
INPUT = ./base/include ./base/src ./data/gh-pages-assets/pages/index.md ./data/gh-pages-assets/pages/introduction.md ./data/gh-pages-assets/pages/Tutorial_Adding_New_Module.md ./data/gh-pages-assets/pages/CUDAKernelProgrammingGuide.md
# File patterns to include in the documentation
FILE_PATTERNS = *.h *.hpp *.c *.cpp *.md
# Exclude directories and files
EXCLUDE = *
# Recurse through subdirectories
RECURSIVE = YES
# Generate documentation for all entities
EXTRACT_ALL = YES
# Strip implementation details from documentation
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
MARKDOWN_SUPPORT = YES
USE_MDFILE_AS_MAINPAGE = index.md
# Configuration options for HTML output
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_COLORSTYLE = LIGHT
HTML_COLORSTYLE_HUE = 77
HTML_COLORSTYLE_SAT = 147
HTML_COLORSTYLE_GAMMA = 115
HTML_TIMESTAMP = YES
HTML_FOOTER = data/gh-pages-assets/pages/footer.html
HTML_HEADER = data/gh-pages-assets/pages/logo.html

# Configuration options for LaTeX output
GENERATE_LATEX = NO
# Configuration options for Man pages (UNIX specific)
GENERATE_MAN = NO
LATEX_OUTPUT = latex
# Additional include paths
INCLUDE_PATH =
# Predefined macros
PREDEFINED =
# Enable collaboration diagram
HAVE_DOT = YES
UML_LOOK = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES

IMAGE_PATH = data\gh-pages-assets\_images
HTML_EXTRA_STYLESHEET = data/gh-pages-assets/pages/custom.css
SHOW_NAMESPACES = NO
SHOW_FILES = NO
GENERATE_TREEVIEW = YES
DISABLE_INDEX = NO
HTML_EXTRA_FILES = data/gh-pages-assets/_images/apralogo.png
#$darkmode = YES
16 changes: 9 additions & 7 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ OPTION(ENABLE_ARM64 "Use this switch to enable ARM64" OFF)
OPTION(ENABLE_WINDOWS "Use this switch to enable WINDOWS" OFF)

set(VCPKG_INSTALL_OPTIONS "--clean-after-build")
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/custom-overlay")

IF(ENABLE_CUDA)
add_compile_definitions(APRA_CUDA_ENABLED)
ENDIF(ENABLE_CUDA)
Expand All @@ -23,6 +25,7 @@ IF(ENABLE_ARM64)
add_compile_definitions(ARM64)
set(VCPKG_OVERLAY_PORTS ../vcpkg/ports/cudnn)
set(VCPKG_OVERLAY_TRIPLETS ../vcpkg/triplets/community/arm64-linux.cmake)
set(CMAKE_CUDA_COMPILER /usr/local/cuda/bin/nvcc)
ENDIF(ENABLE_ARM64)

#use /MP only for language CXX (and not CUDA) and MSVC for both targets
Expand All @@ -38,8 +41,6 @@ project(APRAPIPES)
message(STATUS $ENV{PKG_CONFIG_PATH}">>>>>> PKG_CONFIG_PATH")

find_package(PkgConfig REQUIRED)


find_package(Boost COMPONENTS system thread filesystem serialization log chrono unit_test_framework REQUIRED)
find_package(JPEG REQUIRED)
find_package(OpenCV CONFIG REQUIRED)
Expand All @@ -50,6 +51,7 @@ find_package(FFMPEG REQUIRED)
find_package(ZXing CONFIG REQUIRED)
find_package(bigint CONFIG REQUIRED)
find_package(SFML COMPONENTS system window audio graphics CONFIG REQUIRED)
find_package(whisper CONFIG REQUIRED)

IF(ENABLE_CUDA)
if((NOT DEFINED CMAKE_CUDA_ARCHITECTURES) OR (CMAKE_CUDA_ARCHITECTURES STREQUAL ""))
Expand Down Expand Up @@ -280,10 +282,9 @@ SET(IP_FILES
src/OverlayFactory.h
src/OverlayFactory.cpp
src/TestSignalGeneratorSrc.cpp
src/AudioToTextXForm.cpp
)




SET(IP_FILES_H
include/HistogramOverlay.h
include/CalcHistogramCV.h
Expand All @@ -306,10 +307,9 @@ SET(IP_FILES_H
include/TextOverlayXForm.h
include/ColorConversionXForm.h
include/Overlay.h
include/AudioToTextXForm.h
)



SET(CUDA_CORE_FILES
src/apra_cudamalloc_allocator.cu
src/apra_cudamallochost_allocator.cu
Expand Down Expand Up @@ -561,6 +561,7 @@ SET(UT_FILES
test/mp4_dts_strategy_tests.cpp
test/overlaymodule_tests.cpp
test/testSignalGeneratorSrc_tests.cpp
test/audioToTextXform_tests.cpp
${ARM64_UT_FILES}
${CUDA_UT_FILES}
)
Expand Down Expand Up @@ -607,6 +608,7 @@ target_link_libraries(aprapipesut
liblzma::liblzma
bigint::bigint
sfml-audio
whisper::whisper
)

IF(ENABLE_WINDOWS)
Expand Down
4 changes: 4 additions & 0 deletions base/fix-vcpkg-json.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ if ($removeCUDA.IsPresent)
$v.dependencies |
Where-Object { $_.name -eq 'opencv4' } |
ForEach-Object { $_.features = $_.features -ne 'cuda' -ne 'cudnn' }

$v.dependencies |
Where-Object { $_.name -eq 'whisper' } |
ForEach-Object { $_.features = $_.features -ne 'cuda' }
}

if($removeOpenCV.IsPresent)
Expand Down
4 changes: 4 additions & 0 deletions base/fix-vcpkg-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ if $removeCUDA; then
# Remove "cuda" and "cudnn" features for this "opencv4" instance
v=$(echo "$v" | jq ".dependencies[$index].features |= map(select(. != \"cuda\" and . != \"cudnn\"))")
fi
if [ "$name" == "whisper"]; then
# Remove "cuda" features for this "whisper" instance
v=$(echo "$v" | jq ".dependencies[$index].features |= map(select(. != \"cuda\"))")
fi
done
fi

Expand Down
Loading

0 comments on commit d488909

Please sign in to comment.