Compare commits
11 commits
Author | SHA1 | Date | |
---|---|---|---|
e831bec061 | |||
6f3b03bcb5 | |||
0622e79aab | |||
1cebbd2d2c | |||
41ec39574f | |||
ed91f1d15c | |||
b3f594771f | |||
58596bb3e4 | |||
501a36d568 | |||
1330d5b262 | |||
3920405c4c |
21 changed files with 1273 additions and 1386 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -131,9 +131,13 @@ share/python-wheels/
|
||||||
MANIFEST
|
MANIFEST
|
||||||
|
|
||||||
# Files and Archives
|
# Files and Archives
|
||||||
.eas
|
*.eas
|
||||||
.npz
|
*.npz
|
||||||
.zip
|
*.zip
|
||||||
|
*.bwc
|
||||||
|
|
||||||
|
# Profiling assets
|
||||||
|
valgrind-out.txt
|
||||||
|
|
||||||
# PyInstaller
|
# PyInstaller
|
||||||
# Usually these files are written by a python script from a template
|
# Usually these files are written by a python script from a template
|
||||||
|
@ -192,6 +196,9 @@ target/
|
||||||
profile_default/
|
profile_default/
|
||||||
ipython_config.py
|
ipython_config.py
|
||||||
|
|
||||||
|
# vscode
|
||||||
|
.vscode
|
||||||
|
|
||||||
# pyenv
|
# pyenv
|
||||||
# For a library or package, you might want to ignore these files since the code is
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
# intended to run in multiple environments; otherwise, check them in:
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
|
|
@ -131,7 +131,8 @@ message(STATUS "Compiling with C++ standard: ${CMAKE_CXX_STANDARD}")
|
||||||
# Check if the OpenMP package is available for the current #
|
# Check if the OpenMP package is available for the current #
|
||||||
# setup and set the appropriate C/C++ flags. #
|
# setup and set the appropriate C/C++ flags. #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${OMP}")
|
||||||
|
message(STATUS "Enable OpenMP parallelization")
|
||||||
find_package(OpenMP)
|
find_package(OpenMP)
|
||||||
if (OPENMP_FOUND)
|
if (OPENMP_FOUND)
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||||
|
@ -181,6 +182,8 @@ add_subdirectory(src/library)
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
if(${TOOL})
|
if(${TOOL})
|
||||||
add_subdirectory(src/tools)
|
add_subdirectory(src/tools)
|
||||||
|
else()
|
||||||
|
set(ignoreMe "${BUILD_EAS3}${BUILD_NETCDF}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
61
Makefile
61
Makefile
|
@ -53,14 +53,20 @@
|
||||||
.PHONY: single
|
.PHONY: single
|
||||||
|
|
||||||
.PHONY: tool
|
.PHONY: tool
|
||||||
|
.PHONY: profiling
|
||||||
|
.PHONY: omp
|
||||||
.PHONY: eas3
|
.PHONY: eas3
|
||||||
.PHONY: netCDF
|
.PHONY: netCDF
|
||||||
|
|
||||||
.PHONY: --build_debug
|
.PHONY: build_debug
|
||||||
|
|
||||||
.PHONY: default
|
.PHONY: default
|
||||||
.PHONY: debug
|
.PHONY: debug
|
||||||
.PHONY: full
|
.PHONY: full
|
||||||
|
.PHONY: release
|
||||||
|
|
||||||
|
.PHONY: cmdl
|
||||||
|
.PHONY: cldebug
|
||||||
|
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
# Initialize the compiler flags used to build the library. #
|
# Initialize the compiler flags used to build the library. #
|
||||||
|
@ -73,6 +79,10 @@ BUILD_PREC="Double"
|
||||||
|
|
||||||
BUILD_TOOL="False"
|
BUILD_TOOL="False"
|
||||||
|
|
||||||
|
BUILD_PROF="False"
|
||||||
|
|
||||||
|
BUILD_OMP="False"
|
||||||
|
|
||||||
BUILD_EAS3="False"
|
BUILD_EAS3="False"
|
||||||
|
|
||||||
BUILD_NETCDF="False"
|
BUILD_NETCDF="False"
|
||||||
|
@ -95,12 +105,25 @@ help:
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " [Type] [Description]"
|
@echo " [Type] [Description]"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " debug Compiles BigWhoop and the command line tool with "
|
@echo " debug Compiles BigWhoop with all relevant debug flags."
|
||||||
@echo " full file support. All relevant debug flags are set."
|
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " full Compiles BigWhoop (with OpenMP enabled if applica-"
|
@echo " full Removes all files and folders created during a pre-"
|
||||||
@echo " ble) and the command line tool with full file sup-"
|
@echo " vious compile run. Compiles BigWhoop (with OpenMP "
|
||||||
@echo " port. Code optimization is set to the highest level."
|
@echo " enabled if applicable). Code optimization is set to"
|
||||||
|
@echo " the highest level."
|
||||||
|
@echo ""
|
||||||
|
@echo " release Compiles BigWhoop (with OpenMP enabled if applica-"
|
||||||
|
@echo " ble). Code optimization is set to the highest level."
|
||||||
|
@echo ""
|
||||||
|
@echo " cldebug Removes all files and folders created during a pre-"
|
||||||
|
@echo " vious compile run. Compiles BigWhoop (with OpenMP "
|
||||||
|
@echo " enabled if applicable). All relevant debug flags "
|
||||||
|
@echo " are set. "
|
||||||
|
@echo ""
|
||||||
|
@echo " cmdl Removes all files and folders created during a pre-"
|
||||||
|
@echo " vious compile run. Compiles BigWhoop (with OpenMP "
|
||||||
|
@echo " enabled if applicable). Code optimization is set to"
|
||||||
|
@echo " the highest level."
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " clean Removes all files and folders created during a pre-"
|
@echo " clean Removes all files and folders created during a pre-"
|
||||||
@echo " vious compile run."
|
@echo " vious compile run."
|
||||||
|
@ -116,6 +139,10 @@ help:
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " tool Build the command line tool."
|
@echo " tool Build the command line tool."
|
||||||
@echo ""
|
@echo ""
|
||||||
|
@echo " profiling Enable Profiling."
|
||||||
|
@echo ""
|
||||||
|
@echo " omp Enable OpenMP parallelization."
|
||||||
|
@echo ""
|
||||||
@echo " eas3 Adds support for the eas3 file format to the com-"
|
@echo " eas3 Adds support for the eas3 file format to the com-"
|
||||||
@echo " mand line tool."
|
@echo " mand line tool."
|
||||||
@echo ""
|
@echo ""
|
||||||
|
@ -125,7 +152,7 @@ help:
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
# Define private targets. #
|
# Define private targets. #
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
--build_debug:
|
build_debug:
|
||||||
$(eval BUILD_TYPE="Debug")
|
$(eval BUILD_TYPE="Debug")
|
||||||
|
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
|
@ -143,6 +170,17 @@ single:
|
||||||
tool:
|
tool:
|
||||||
$(eval BUILD_TOOL="True")
|
$(eval BUILD_TOOL="True")
|
||||||
|
|
||||||
|
#*--------------------------------------------------------*#
|
||||||
|
# Define target used to activate profiling. #
|
||||||
|
#*--------------------------------------------------------*#
|
||||||
|
profiling:
|
||||||
|
$(eval BUILD_PROF="True")
|
||||||
|
|
||||||
|
#*--------------------------------------------------------*#
|
||||||
|
# Define target used to activate OpenMP parallelization. #
|
||||||
|
#*--------------------------------------------------------*#
|
||||||
|
omp:
|
||||||
|
$(eval BUILD_OMP="True")
|
||||||
|
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
# Define targets used to activate file format support. #
|
# Define targets used to activate file format support. #
|
||||||
|
@ -156,9 +194,11 @@ netCDF:
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
# Define the wrappers for the compile command targets. #
|
# Define the wrappers for the compile command targets. #
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
debug: | clean --build_debug tool eas3 build_bwc display
|
debug: | clean build_debug build_bwc display
|
||||||
|
full: | clean build_bwc display
|
||||||
release: | build_bwc display
|
release: | build_bwc display
|
||||||
full: | clean tool eas3 build_bwc display
|
cmdl: | clean tool profiling eas3 build_bwc display
|
||||||
|
cldebug: | clean build_debug tool profiling eas3 build_bwc display
|
||||||
|
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
# Define target used to output compile information. #
|
# Define target used to output compile information. #
|
||||||
|
@ -182,6 +222,7 @@ display:
|
||||||
@echo " Link Type: $(LINK_TYPE)"
|
@echo " Link Type: $(LINK_TYPE)"
|
||||||
@echo " Precision: $(BUILD_PREC)"
|
@echo " Precision: $(BUILD_PREC)"
|
||||||
@echo " Utilities: $(BUILD_TOOL)"
|
@echo " Utilities: $(BUILD_TOOL)"
|
||||||
|
@echo " Profiling: $(BUILD_PROF)"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Build date: $(shell date)"
|
@echo " Build date: $(shell date)"
|
||||||
@echo " User: $(USER)"
|
@echo " User: $(USER)"
|
||||||
|
@ -192,7 +233,7 @@ display:
|
||||||
# Define the main compile command targets. #
|
# Define the main compile command targets. #
|
||||||
#*--------------------------------------------------------*#
|
#*--------------------------------------------------------*#
|
||||||
build_bwc:
|
build_bwc:
|
||||||
mkdir -p build && cd build && cmake .. "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" "-DLINK:STRING=${LINK_TYPE}" "-DPREC:STRING=${BUILD_PREC}" "-DTOOL=${BUILD_TOOL}" "-DBUILD_EAS3=${BUILD_EAS3}" "-DBUILD_NETCDF=${BUILD_NETCDF}" && $(MAKE) -j
|
mkdir -p build && cd build && cmake .. "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" "-DLINK:STRING=${LINK_TYPE}" "-DPREC:STRING=${BUILD_PREC}" "-DTOOL=${BUILD_TOOL}" "-DPROF=${BUILD_PROF}" "-DOMP=${BUILD_OMP}" "-DBUILD_EAS3=${BUILD_EAS3}" "-DBUILD_NETCDF=${BUILD_NETCDF}" && $(MAKE) -j
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- /bin/rm -rf build/ bin/ lib/ lib64/ include/library/public
|
- /bin/rm -rf build/ bin/ lib/ lib64/ include/library/public
|
158
docs/templates/Template.F90
vendored
Normal file
158
docs/templates/Template.F90
vendored
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
!*================================================================================================*!
|
||||||
|
!| |!
|
||||||
|
!| /$$$$$$$ /$$ /$$ /$$ /$$ |!
|
||||||
|
!| | $$__ $$|__/ | $$ /$ | $$| $$ |!
|
||||||
|
!| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ |!
|
||||||
|
!| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ |!
|
||||||
|
!| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ |!
|
||||||
|
!| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ |!
|
||||||
|
!| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ |!
|
||||||
|
!| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ |!
|
||||||
|
!| /$$ \ $$ | $$ |!
|
||||||
|
!| | $$$$$$/ | $$ |!
|
||||||
|
!| \______/ |__/ |!
|
||||||
|
!| |!
|
||||||
|
!| DESCRIPTION: |!
|
||||||
|
!| ------------ |!
|
||||||
|
!| |!
|
||||||
|
!| DESCRIPTION NEEDED. |!
|
||||||
|
!| | | |!
|
||||||
|
!| |!
|
||||||
|
!| -------------------------------------------------------------------------------------------- |!
|
||||||
|
!| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart |!
|
||||||
|
!| |!
|
||||||
|
!| Redistribution and use in source and binary forms, with or without modification, are |!
|
||||||
|
!| permitted provided that the following conditions are met: |!
|
||||||
|
!| |!
|
||||||
|
!| (1) Redistributions of source code must retain the above copyright notice, this list of |!
|
||||||
|
!| conditions and the following disclaimer. |!
|
||||||
|
!| |!
|
||||||
|
!| (2) Redistributions in binary form must reproduce the above copyright notice, this list |!
|
||||||
|
!| of conditions and the following disclaimer in the documentation and/or other |!
|
||||||
|
!| materials provided with the distribution. |!
|
||||||
|
!| |!
|
||||||
|
!| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS |!
|
||||||
|
!| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |!
|
||||||
|
!| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |!
|
||||||
|
!| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |!
|
||||||
|
!| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |!
|
||||||
|
!| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |!
|
||||||
|
!| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |!
|
||||||
|
!| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |!
|
||||||
|
!| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |!
|
||||||
|
!| |!
|
||||||
|
!*================================================================================================*!
|
||||||
|
module MODULE_FILE
|
||||||
|
!*-----------------------*!
|
||||||
|
! DEFINE INT VARIABLES: !
|
||||||
|
!*-----------------------*!
|
||||||
|
!*-----------------------*!
|
||||||
|
! DEFINE FLOAT VARIABLES: !
|
||||||
|
!*-----------------------*!
|
||||||
|
!*-----------------------*!
|
||||||
|
! DEFINE CHAR VARIABLES: !
|
||||||
|
!*-----------------------*!
|
||||||
|
!*-----------------------*!
|
||||||
|
! DEFINE STRUCTS: !
|
||||||
|
!*-----------------------*!
|
||||||
|
!*--------------------------------------------------------*!
|
||||||
|
! COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT !
|
||||||
|
!*--------------------------------------------------------*!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| _ _ _ ____ _ _ _ ___ ____ |!
|
||||||
|
!| | |\ | | | | | | \ |___ |!
|
||||||
|
!| | | \| |___ |___ |__| |__/ |___ |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ___ ____ _ _ _ _ ___ _ _ _ ____ ___ _ _ ___ ____ ____ |!
|
||||||
|
!| |__] |__/ | |\/| | | | | | |___ | \_/ |__] |___ [__ |!
|
||||||
|
!| | | \ | | | | | | \/ |___ | | | |___ ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| _ _ ____ ____ ____ ____ ____ |!
|
||||||
|
!| |\/| |__| | |__/ | | [__ |!
|
||||||
|
!| | | | | |___ | \ |__| ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |!
|
||||||
|
!| | | | |\ | [__ | |__| |\ | | [__ |!
|
||||||
|
!| |___ |__| | \| ___] | | | | \| | ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ |!
|
||||||
|
!| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ |!
|
||||||
|
!| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |!
|
||||||
|
!| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ |!
|
||||||
|
!| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ____ _ ____ ___ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |!
|
||||||
|
!| | __ | | | |__] |__| | | | | |\ | [__ | |__| |\ | | [__ |!
|
||||||
|
!| |__] |___ |__| |__] | | |___ |___ |__| | \| ___] | | | | \| | ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ___ _ _ ___ ____ ____ |!
|
||||||
|
!| | \_/ |__] |___ [__ |!
|
||||||
|
!| | | | |___ ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ___ ____ ____ ____ _ _ _ ____ ___ ___ _ _ ___ ____ ____ |!
|
||||||
|
!| | \ |___ |__/ |__/ | | | |___ | \ | \_/ |__] |___ [__ |!
|
||||||
|
!| |__/ |___ | \ | \ | \/ |___ |__/ | | | |___ ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!------------------------------------------------------------------------------------------------!
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! !
|
||||||
|
! DESCRIPTION NEEDED !
|
||||||
|
! | | !
|
||||||
|
! !
|
||||||
|
!------------------------------------------------------------------------------------------------!
|
||||||
|
!============================|=========================|==========================================
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |!
|
||||||
|
!| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ |!
|
||||||
|
!| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |!
|
||||||
|
!| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ |!
|
||||||
|
!| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] |!
|
||||||
|
!| |!
|
||||||
|
!************************************************************************************************!
|
||||||
|
!------------------------------------------------------------------------------------------------!
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! !
|
||||||
|
! DESCRIPTION NEEDED !
|
||||||
|
! | | !
|
||||||
|
! !
|
||||||
|
! ARGUMENTS: !
|
||||||
|
! ---------- !
|
||||||
|
! Name Description !
|
||||||
|
! ---- ----------- !
|
||||||
|
! - - !
|
||||||
|
! !
|
||||||
|
! RETURN: !
|
||||||
|
! ------- !
|
||||||
|
! - !
|
||||||
|
! !
|
||||||
|
!------------------------------------------------------------------------------------------------!
|
||||||
|
!===========|==========================|======================|======|=======|====================
|
||||||
|
!=================================================================================================
|
||||||
|
end module MODULE_FILE
|
178
docs/templates/Template.c
vendored
Normal file
178
docs/templates/Template.c
vendored
Normal file
|
@ -0,0 +1,178 @@
|
||||||
|
/*================================================================================================*\
|
||||||
|
|| ||
|
||||||
|
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|
||||||
|
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|
||||||
|
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|
||||||
|
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|
||||||
|
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|
||||||
|
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|
||||||
|
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|
||||||
|
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|
||||||
|
|| /$$ \ $$ | $$ ||
|
||||||
|
|| | $$$$$$/ | $$ ||
|
||||||
|
|| \______/ |__/ ||
|
||||||
|
|| ||
|
||||||
|
|| DESCRIPTION: ||
|
||||||
|
|| ------------ ||
|
||||||
|
|| ||
|
||||||
|
|| DESCRIPTION NEEDED. ||
|
||||||
|
|| | | ||
|
||||||
|
|| ||
|
||||||
|
|| -------------------------------------------------------------------------------------------- ||
|
||||||
|
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|
||||||
|
|| ||
|
||||||
|
|| Redistribution and use in source and binary forms, with or without modification, are ||
|
||||||
|
|| permitted provided that the following conditions are met: ||
|
||||||
|
|| ||
|
||||||
|
|| (1) Redistributions of source code must retain the above copyright notice, this list of ||
|
||||||
|
|| conditions and the following disclaimer. ||
|
||||||
|
|| ||
|
||||||
|
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list ||
|
||||||
|
|| of conditions and the following disclaimer in the documentation and/or other ||
|
||||||
|
|| materials provided with the distribution. ||
|
||||||
|
|| ||
|
||||||
|
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS ||
|
||||||
|
|| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ||
|
||||||
|
|| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ||
|
||||||
|
|| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ||
|
||||||
|
|| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ||
|
||||||
|
|| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ||
|
||||||
|
|| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ||
|
||||||
|
|| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ||
|
||||||
|
|| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|
||||||
|
|| ||
|
||||||
|
\*================================================================================================*/
|
||||||
|
/**************************************************************************************************\
|
||||||
|
|| _ _ _ ____ _ _ _ ___ ____ ||
|
||||||
|
|| | |\ | | | | | | \ |___ ||
|
||||||
|
|| | | \| |___ |___ |__| |__/ |___ ||
|
||||||
|
|| ||
|
||||||
|
\**************************************************************************************************/
|
||||||
|
/**************************************************************************************************\
|
||||||
|
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|
||||||
|
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|
||||||
|
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|
||||||
|
|| ||
|
||||||
|
\**************************************************************************************************/
|
||||||
|
/**************************************************************************************************\
|
||||||
|
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|
||||||
|
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|
||||||
|
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|
||||||
|
|| ||
|
||||||
|
\**************************************************************************************************/
|
||||||
|
/**************************************************************************************************\
|
||||||
|
|| ____ _ ____ ___ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|
||||||
|
|| | __ | | | |__] |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|
||||||
|
|| |__] |___ |__| |__] | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|
||||||
|
|| ||
|
||||||
|
\**************************************************************************************************/
|
||||||
|
/**************************************************************************************************\
|
||||||
|
|| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|
||||||
|
|| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ ||
|
||||||
|
|| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
||||||
|
|| ||
|
||||||
|
\**************************************************************************************************/
|
||||||
|
/**************************************************************************************************\
|
||||||
|
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|
||||||
|
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|
||||||
|
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
||||||
|
|| ||
|
||||||
|
\**************************************************************************************************/
|
||||||
|
/*------------------------------------------------------------------------------------------------*\
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! !
|
||||||
|
! DESCRIPTION NEEDED !
|
||||||
|
! | | !
|
||||||
|
! !
|
||||||
|
! RETURN: !
|
||||||
|
! ------- !
|
||||||
|
! !
|
||||||
|
! - !
|
||||||
|
! !
|
||||||
|
\*------------------------------------------------------------------------------------------------*/
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE INT VARIABLES: !
|
||||||
|
\*-----------------------*/
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE FLOAT VARIABLES: !
|
||||||
|
\*-----------------------*/
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE CHAR VARIABLES: !
|
||||||
|
\*-----------------------*/
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE STRUCTS: !
|
||||||
|
\*-----------------------*/
|
||||||
|
/*--------------------------------------------------------*\
|
||||||
|
! COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT !
|
||||||
|
\*--------------------------------------------------------*/
|
||||||
|
#ifndef HEADER_H
|
||||||
|
#define HEADER_H
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| _ _ _ ____ _ _ _ ___ ____ ||
|
||||||
|
|| | |\ | | | | | | \ |___ ||
|
||||||
|
|| | | \| |___ |___ |__| |__/ |___ ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| ___ ____ _ _ _ _ ___ _ _ _ ____ ___ _ _ ___ ____ ____ ||
|
||||||
|
|| |__] |__/ | |\/| | | | | | |___ | \_/ |__] |___ [__ ||
|
||||||
|
|| | | \ | | | | | | \/ |___ | | | |___ ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| _ _ ____ ____ ____ ____ ____ ||
|
||||||
|
|| |\/| |__| | |__/ | | [__ ||
|
||||||
|
|| | | | | |___ | \ |__| ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|
||||||
|
|| | | | |\ | [__ | |__| |\ | | [__ ||
|
||||||
|
|| |___ |__| | \| ___] | | | | \| | ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|
||||||
|
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|
||||||
|
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|
||||||
|
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|
||||||
|
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| ___ _ _ ___ ____ ____ ||
|
||||||
|
|| | \_/ |__] |___ [__ ||
|
||||||
|
|| | | | |___ ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| ___ ____ ____ ____ _ _ _ ____ ___ ___ _ _ ___ ____ ____ ||
|
||||||
|
|| | \ |___ |__/ |__/ | | | |___ | \ | \_/ |__] |___ [__ ||
|
||||||
|
|| |__/ |___ | \ | \ | \/ |___ |__/ | | | |___ ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
/*----------------------------------------------------------------------------------------------*\
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! !
|
||||||
|
! DESCRIPTION NEEDED !
|
||||||
|
! | | !
|
||||||
|
! !
|
||||||
|
\*----------------------------------------------------------------------------------------------*/
|
||||||
|
//===========================|=========================|==========================================
|
||||||
|
/************************************************************************************************\
|
||||||
|
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|
||||||
|
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|
||||||
|
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
||||||
|
|| ||
|
||||||
|
\************************************************************************************************/
|
||||||
|
//==========|==========================|======================|======|=======|====================
|
||||||
|
//================================================================================================
|
||||||
|
#endif
|
121
docs/templates/Template.py
vendored
Normal file
121
docs/templates/Template.py
vendored
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
#*================================================================================================*#
|
||||||
|
#| |#
|
||||||
|
#| /$$$$$$$ /$$ /$$ /$$ /$$ |#
|
||||||
|
#| | $$__ $$|__/ | $$ /$ | $$| $$ |#
|
||||||
|
#| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ |#
|
||||||
|
#| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ |#
|
||||||
|
#| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ |#
|
||||||
|
#| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ |#
|
||||||
|
#| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ |#
|
||||||
|
#| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ |#
|
||||||
|
#| /$$ \ $$ | $$ |#
|
||||||
|
#| | $$$$$$/ | $$ |#
|
||||||
|
#| \______/ |__/ |#
|
||||||
|
#| |#
|
||||||
|
#| DESCRIPTION: |#
|
||||||
|
#| ------------ |#
|
||||||
|
#| |#
|
||||||
|
#| DESCRIPTION NEEDED. |#
|
||||||
|
#| | | |#
|
||||||
|
#| |#
|
||||||
|
#| -------------------------------------------------------------------------------------------- |#
|
||||||
|
#| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart |#
|
||||||
|
#| |#
|
||||||
|
#| Redistribution and use in source and binary forms, with or without modification, are |#
|
||||||
|
#| permitted provided that the following conditions are met: |#
|
||||||
|
#| |#
|
||||||
|
#| (1) Redistributions of source code must retain the above copyright notice, this list of |#
|
||||||
|
#| conditions and the following disclaimer. |#
|
||||||
|
#| |#
|
||||||
|
#| (2) Redistributions in binary form must reproduce the above copyright notice, this list |#
|
||||||
|
#| of conditions and the following disclaimer in the documentation and/or other |#
|
||||||
|
#| materials provided with the distribution. |#
|
||||||
|
#| |#
|
||||||
|
#| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS |#
|
||||||
|
#| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |#
|
||||||
|
#| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |#
|
||||||
|
#| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |#
|
||||||
|
#| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |#
|
||||||
|
#| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |#
|
||||||
|
#| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |#
|
||||||
|
#| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |#
|
||||||
|
#| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |#
|
||||||
|
#| |#
|
||||||
|
#*================================================================================================*#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#| _ _ _ ___ ____ ____ ___ |#
|
||||||
|
#| | |\/| |__] | | |__/ | |#
|
||||||
|
#| | | | | |__| | \ | |#
|
||||||
|
#| |#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |#
|
||||||
|
#| | | | |\ | [__ | |__| |\ | | [__ |#
|
||||||
|
#| |___ |__| | \| ___] | | | | \| | ___] |#
|
||||||
|
#| |#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ |#
|
||||||
|
#| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ |#
|
||||||
|
#| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] |#
|
||||||
|
#| |#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |#
|
||||||
|
#| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ |#
|
||||||
|
#| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] |#
|
||||||
|
#| |#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#| ____ _ ____ ___ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ |#
|
||||||
|
#| | __ | | | |__] |__| | | | | |\ | [__ | |__| |\ | | [__ |#
|
||||||
|
#| |__] |___ |__| |__] | | |___ |___ |__| | \| ___] | | | | \| | ___] |#
|
||||||
|
#| |#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |#
|
||||||
|
#| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ |#
|
||||||
|
#| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] |#
|
||||||
|
#| |#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ |#
|
||||||
|
#| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ |#
|
||||||
|
#| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] |#
|
||||||
|
#| |#
|
||||||
|
#**************************************************************************************************#
|
||||||
|
#==================================================================================================#
|
||||||
|
#--------------------------------------------------------------------------------------------------#
|
||||||
|
# #
|
||||||
|
# DESCRIPTION: #
|
||||||
|
# ------------ #
|
||||||
|
# #
|
||||||
|
# DESCRIPTION NEEDED #
|
||||||
|
# | | #
|
||||||
|
# #
|
||||||
|
# ARGUMENTS: #
|
||||||
|
# ---------- #
|
||||||
|
# Name Description #
|
||||||
|
# ---- ----------- #
|
||||||
|
# - - #
|
||||||
|
# #
|
||||||
|
# RETURN: #
|
||||||
|
# ------- #
|
||||||
|
# - #
|
||||||
|
# #
|
||||||
|
#--------------------------------------------------------------------------------------------------#
|
||||||
|
#-------------------------#
|
||||||
|
# DEFINE INT VARIABLES: #
|
||||||
|
#-------------------------#
|
||||||
|
#-------------------------#
|
||||||
|
# DEFINE FLOAT VARIABLES: #
|
||||||
|
#-------------------------#
|
||||||
|
#-------------------------#
|
||||||
|
# DEFINE CHAR VARIABLES: #
|
||||||
|
#-------------------------#
|
||||||
|
#-------------------------#
|
||||||
|
# DEFINE STRUCTS: #
|
||||||
|
#-------------------------#
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT #
|
||||||
|
#----------------------------------------------------------#
|
47
docs/templates/Template.txt
vendored
Normal file
47
docs/templates/Template.txt
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#*================================================================================================*#
|
||||||
|
#| |#
|
||||||
|
#| /$$$$$$$ /$$ /$$ /$$ /$$ |#
|
||||||
|
#| | $$__ $$|__/ | $$ /$ | $$| $$ |#
|
||||||
|
#| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ |#
|
||||||
|
#| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ |#
|
||||||
|
#| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ |#
|
||||||
|
#| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ |#
|
||||||
|
#| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ |#
|
||||||
|
#| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ |#
|
||||||
|
#| /$$ \ $$ | $$ |#
|
||||||
|
#| | $$$$$$/ | $$ |#
|
||||||
|
#| \______/ |__/ |#
|
||||||
|
#| |#
|
||||||
|
#| DESCRIPTION: |#
|
||||||
|
#| ------------ |#
|
||||||
|
#| |#
|
||||||
|
#| DESCRIPTION NEEDED. |#
|
||||||
|
#| | | |#
|
||||||
|
#| |#
|
||||||
|
#| -------------------------------------------------------------------------------------------- |#
|
||||||
|
#| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart |#
|
||||||
|
#| |#
|
||||||
|
#| Redistribution and use in source and binary forms, with or without modification, are |#
|
||||||
|
#| permitted provided that the following conditions are met: |#
|
||||||
|
#| |#
|
||||||
|
#| (1) Redistributions of source code must retain the above copyright notice, this list of |#
|
||||||
|
#| conditions and the following disclaimer. |#
|
||||||
|
#| |#
|
||||||
|
#| (2) Redistributions in binary form must reproduce the above copyright notice, this list |#
|
||||||
|
#| of conditions and the following disclaimer in the documentation and/or other |#
|
||||||
|
#| materials provided with the distribution. |#
|
||||||
|
#| |#
|
||||||
|
#| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS |#
|
||||||
|
#| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |#
|
||||||
|
#| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |#
|
||||||
|
#| COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |#
|
||||||
|
#| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |#
|
||||||
|
#| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |#
|
||||||
|
#| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |#
|
||||||
|
#| TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |#
|
||||||
|
#| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |#
|
||||||
|
#| |#
|
||||||
|
#*================================================================================================*#
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT #
|
||||||
|
#----------------------------------------------------------#
|
299
docs/templates/header.h
vendored
299
docs/templates/header.h
vendored
|
@ -1,299 +0,0 @@
|
||||||
/*==================================================================================================================================*\
|
|
||||||
|| ||
|
|
||||||
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|
|
||||||
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|
|
||||||
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|
|
||||||
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|
|
||||||
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|
|
||||||
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|
|
||||||
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|
|
||||||
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|
|
||||||
|| /$$ \ $$ | $$ ||
|
|
||||||
|| | $$$$$$/ | $$ ||
|
|
||||||
|| \______/ |__/ ||
|
|
||||||
|| ||
|
|
||||||
|| File: header.h ||
|
|
||||||
|| ----- ||
|
|
||||||
|| ||
|
|
||||||
|| DESCRIPTION: ||
|
|
||||||
|| ------------ ||
|
|
||||||
|| DESCRIPTION NEEDED. ||
|
|
||||||
|| ||
|
|
||||||
|| STRUCTS: ||
|
|
||||||
|| -------- ||
|
|
||||||
|| ||
|
|
||||||
|| PUBLIC FUNCTIONS: ||
|
|
||||||
|| ----------------- ||
|
|
||||||
|| ||
|
|
||||||
|| DEVELOPMENT HISTORY: ||
|
|
||||||
|| -------------------- ||
|
|
||||||
|| ||
|
|
||||||
|| Date Author Change Id Release Description Of Change ||
|
|
||||||
|| ---- ------ --------- ------- --------------------- ||
|
|
||||||
|| - Patrick Vogler B87D120 V - header file created ||
|
|
||||||
|| - Patrick Vogler B880CA2 V - header file patched ||
|
|
||||||
|| - Patrick Vogler B87E7E4 V - header file updated ||
|
|
||||||
|| - Patrick Vogler B87F684 V - header file new version ||
|
|
||||||
|| ||
|
|
||||||
|| -------------------------------------------------------------------------------------------------------------------- ||
|
|
||||||
|| ||
|
|
||||||
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|
|
||||||
|| ||
|
|
||||||
|| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ||
|
|
||||||
|| following conditions are met: ||
|
|
||||||
|| ||
|
|
||||||
|| (1) Redistributions of source code must retain the above copyright notice, this list of conditions and ||
|
|
||||||
|| the following disclaimer. ||
|
|
||||||
|| ||
|
|
||||||
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions ||
|
|
||||||
|| and the following disclaimer in the documentation and/or other materials provided with the ||
|
|
||||||
|| distribution. ||
|
|
||||||
|| ||
|
|
||||||
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ||
|
|
||||||
|| INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ||
|
|
||||||
|| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ||
|
|
||||||
|| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ||
|
|
||||||
|| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ||
|
|
||||||
|| WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ||
|
|
||||||
|| USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|
|
||||||
|| ||
|
|
||||||
\*==================================================================================================================================*/
|
|
||||||
#ifndef HEADER_H
|
|
||||||
#define HEADER_H
|
|
||||||
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| _ _ _ ____ _ _ _ ___ ____ ||
|
|
||||||
|| | |\ | | | | | | \ |___ ||
|
|
||||||
|| | | \| |___ |___ |__| |__/ |___ ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| _ _ ____ ____ ____ ____ ____ ||
|
|
||||||
|| |\/| |__| | |__/ | | [__ ||
|
|
||||||
|| | | | | |___ | \ |__| ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! Macros: !
|
|
||||||
! ------- !
|
|
||||||
! Macro Description !
|
|
||||||
! ----- ----------- !
|
|
||||||
! !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - Macros created !
|
|
||||||
! - Patrick Vogler B880CA2 V - Macros patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - Macros updated !
|
|
||||||
! - Patrick Vogler B87F684 V - Macros new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|
|
||||||
|| | | | |\ | [__ | |__| |\ | | [__ ||
|
|
||||||
|| |___ |__| | \| ___] | | | | \| | ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! CONSTANTS: !
|
|
||||||
! ----------- !
|
|
||||||
! Constant Description !
|
|
||||||
! -------- ----------- !
|
|
||||||
! !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - Constants created !
|
|
||||||
! - Patrick Vogler B880CA2 V - Constants patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - Constants updated !
|
|
||||||
! - Patrick Vogler B87F684 V - Constants new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|
|
||||||
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|
|
||||||
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! VARIABLES: !
|
|
||||||
! ----------- !
|
|
||||||
! VARIABLE Description !
|
|
||||||
! -------- ----------- !
|
|
||||||
! !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - Variables created !
|
|
||||||
! - Patrick Vogler B880CA2 V - Variables patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - Variables updated !
|
|
||||||
! - Patrick Vogler B87F684 V - Variables new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|
|
||||||
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|
|
||||||
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! CONSTANTS: !
|
|
||||||
! ----------- !
|
|
||||||
! Constant Description !
|
|
||||||
! -------- ----------- !
|
|
||||||
! !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - Constants created !
|
|
||||||
! - Patrick Vogler B880CA2 V - Constants patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - Constants updated !
|
|
||||||
! - Patrick Vogler B87F684 V - Constants new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ___ _ _ ___ ____ ____ ||
|
|
||||||
|| | \_/ |__] |___ [__ ||
|
|
||||||
|| | | | |___ ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! STRUCT NAME: Template !
|
|
||||||
! ----------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! DEPENDENCIES: !
|
|
||||||
! ------------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - Struct created !
|
|
||||||
! - Patrick Vogler B880CA2 V - Struct patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - Struct updated !
|
|
||||||
! - Patrick Vogler B87F684 V - Struct new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! ENUM NAME: Template !
|
|
||||||
! ----------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! DEPENDENCIES: !
|
|
||||||
! ------------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - Enum created !
|
|
||||||
! - Patrick Vogler B880CA2 V - Enum patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - Enum updated !
|
|
||||||
! - Patrick Vogler B87F684 V - Enum new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! UNION NAME: Template !
|
|
||||||
! ----------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! DEPENDENCIES: !
|
|
||||||
! ------------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - Union created !
|
|
||||||
! - Patrick Vogler B880CA2 V - Union patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - Union updated !
|
|
||||||
! - Patrick Vogler B87F684 V - Union new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|
|
||||||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|
|
||||||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! TYPE NAME: Template !
|
|
||||||
! ----------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
#endif
|
|
179
docs/templates/source.c
vendored
179
docs/templates/source.c
vendored
|
@ -1,179 +0,0 @@
|
||||||
/*==================================================================================================================================*\
|
|
||||||
|| ||
|
|
||||||
|| /$$$$$$$ /$$ /$$ /$$ /$$ ||
|
|
||||||
|| | $$__ $$|__/ | $$ /$ | $$| $$ ||
|
|
||||||
|| | $$ \ $$ /$$ /$$$$$$ | $$ /$$$| $$| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ ||
|
|
||||||
|| | $$$$$$$ | $$ /$$__ $$ | $$/$$ $$ $$| $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ ||
|
|
||||||
|| | $$__ $$| $$| $$ \ $$ | $$$$_ $$$$| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ ||
|
|
||||||
|| | $$ \ $$| $$| $$ | $$ | $$$/ \ $$$| $$ | $$| $$ | $$| $$ | $$| $$ | $$ ||
|
|
||||||
|| | $$$$$$$/| $$| $$$$$$$ | $$/ \ $$| $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$/ ||
|
|
||||||
|| |_______/ |__/ \____ $$ |__/ \__/|__/ |__/ \______/ \______/ | $$____/ ||
|
|
||||||
|| /$$ \ $$ | $$ ||
|
|
||||||
|| | $$$$$$/ | $$ ||
|
|
||||||
|| \______/ |__/ ||
|
|
||||||
|| ||
|
|
||||||
|| FILE NAME: source.c ||
|
|
||||||
|| ||
|
|
||||||
|| ||
|
|
||||||
|| DESCRIPTION: ||
|
|
||||||
|| ------------ ||
|
|
||||||
|| DESCRIPTION NEEDED. ||
|
|
||||||
|| ||
|
|
||||||
|| FILE REFERENCES: ||
|
|
||||||
|| ---------------- ||
|
|
||||||
|| ||
|
|
||||||
|| Name I/O Description ||
|
|
||||||
|| ---- --- ----------- ||
|
|
||||||
|| none - - ||
|
|
||||||
|| ||
|
|
||||||
|| ||
|
|
||||||
|| PRIVATE FUNCTIONS: ||
|
|
||||||
|| ------------------ ||
|
|
||||||
|| ||
|
|
||||||
|| PUBLIC FUNCTIONS: ||
|
|
||||||
|| ----------------- ||
|
|
||||||
|| ||
|
|
||||||
|| DEVELOPMENT HISTORY: ||
|
|
||||||
|| -------------------- ||
|
|
||||||
|| ||
|
|
||||||
|| Date Author Change Id Release Description Of Change ||
|
|
||||||
|| ---- ------ --------- ------- --------------------- ||
|
|
||||||
|| - Patrick Vogler B87D120 V - source file created ||
|
|
||||||
|| - Patrick Vogler B880CA2 V - source file patched ||
|
|
||||||
|| - Patrick Vogler B87E7E4 V - source file updated ||
|
|
||||||
|| - Patrick Vogler B87F684 V - source file new version ||
|
|
||||||
|| ||
|
|
||||||
|| -------------------------------------------------------------------------------------------------------------------- ||
|
|
||||||
|| ||
|
|
||||||
|| Copyright (c) 2023, High Performance Computing Center - University of Stuttgart ||
|
|
||||||
|| ||
|
|
||||||
|| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ||
|
|
||||||
|| following conditions are met: ||
|
|
||||||
|| ||
|
|
||||||
|| (1) Redistributions of source code must retain the above copyright notice, this list of conditions and ||
|
|
||||||
|| the following disclaimer. ||
|
|
||||||
|| ||
|
|
||||||
|| (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions ||
|
|
||||||
|| and the following disclaimer in the documentation and/or other materials provided with the ||
|
|
||||||
|| distribution. ||
|
|
||||||
|| ||
|
|
||||||
|| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ||
|
|
||||||
|| INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ||
|
|
||||||
|| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ||
|
|
||||||
|| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ||
|
|
||||||
|| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ||
|
|
||||||
|| WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ||
|
|
||||||
|| USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ||
|
|
||||||
|| ||
|
|
||||||
\*==================================================================================================================================*/
|
|
||||||
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| _ _ _ ____ _ _ _ ___ ____ ||
|
|
||||||
|| | |\ | | | | | | \ |___ ||
|
|
||||||
|| | | \| |___ |___ |__| |__/ |___ ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ____ _ _ ___ ____ ____ _ _ ____ _ _ _ ____ ____ _ ____ ___ _ ____ ____ ||
|
|
||||||
|| |___ \/ | |___ |__/ |\ | |__| | | | |__| |__/ | |__| |__] | |___ [__ ||
|
|
||||||
|| |___ _/\_ | |___ | \ | \| | | |___ \/ | | | \ | | | |__] |___ |___ ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ____ _ _ ___ ____ ____ _ _ ____ _ ____ ____ _ _ ____ ___ ____ _ _ ___ ____ ||
|
|
||||||
|| |___ \/ | |___ |__/ |\ | |__| | | | | |\ | [__ | |__| |\ | | [__ ||
|
|
||||||
|| |___ _/\_ | |___ | \ | \| | | |___ |___ |__| | \| ___] | | | | \| | ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ___ ____ _ _ _ ____ ___ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|
|
||||||
|| |__] |__/ | | | |__| | |___ |___ | | |\ | | | | | | |\ | [__ ||
|
|
||||||
|| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! FUNCTION NAME: void *template(void) !
|
|
||||||
! -------------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! RETURN VALUE: !
|
|
||||||
! ------------- !
|
|
||||||
! Type Description !
|
|
||||||
! ---- ----------- !
|
|
||||||
! - - !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - function created !
|
|
||||||
! - Patrick Vogler B880CA2 V - function patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - function updated !
|
|
||||||
! - Patrick Vogler B87F684 V - function new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/************************************************************************************************************\
|
|
||||||
|| ___ _ _ ___ _ _ ____ ____ _ _ _ _ ____ ___ _ ____ _ _ ____ ||
|
|
||||||
|| |__] | | |__] | | | |___ | | |\ | | | | | | |\ | [__ ||
|
|
||||||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
|
||||||
|| ||
|
|
||||||
\************************************************************************************************************/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! FUNCTION NAME: void *test(void) !
|
|
||||||
! -------------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! RETURN VALUE: !
|
|
||||||
! ------------- !
|
|
||||||
! Type Description !
|
|
||||||
! ---- ----------- !
|
|
||||||
! - - !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V - function created !
|
|
||||||
! - Patrick Vogler B880CA2 V - function patched !
|
|
||||||
! - Patrick Vogler B87E7E4 V - function updated !
|
|
||||||
! - Patrick Vogler B87F684 V - function new version !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE INT VARIABLES: !
|
|
||||||
\*-----------------------*/
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE FLOAT VARIABLES: !
|
|
||||||
\*-----------------------*/
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE CHAR VARIABLES: !
|
|
||||||
\*-----------------------*/
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE STRUCTS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! COMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENTCOMMENT !
|
|
||||||
\*--------------------------------------------------------*/
|
|
|
@ -103,4 +103,19 @@
|
||||||
bwc_tile_sizeof, // Tiling defined by size of one tile
|
bwc_tile_sizeof, // Tiling defined by size of one tile
|
||||||
bwc_tile_numbof, // Tiling defined by the number of tiles
|
bwc_tile_numbof, // Tiling defined by the number of tiles
|
||||||
} bwc_tile_instr;
|
} bwc_tile_instr;
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------------------------*\
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! !
|
||||||
|
! These constants are used to signal the dataset sample precision. !
|
||||||
|
! !
|
||||||
|
\*----------------------------------------------------------------------------------------------*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
bwc_type_half,
|
||||||
|
bwc_type_single,
|
||||||
|
bwc_type_double,
|
||||||
|
} bwc_type;
|
||||||
#endif
|
#endif
|
|
@ -72,6 +72,14 @@
|
||||||
uint8 const nPar,
|
uint8 const nPar,
|
||||||
char *const file_extension);
|
char *const file_extension);
|
||||||
//==========|==========================|======================|======|=======|====================
|
//==========|==========================|======================|======|=======|====================
|
||||||
|
uchar bwc_set_com (bwc_data *const data,
|
||||||
|
char const *const com,
|
||||||
|
uint16 const size);
|
||||||
|
//==========|==========================|======================|======|=======|====================
|
||||||
|
uchar bwc_set_aux (bwc_data *const data,
|
||||||
|
char const *const aux,
|
||||||
|
uint32 const size);
|
||||||
|
//==========|==========================|======================|======|=======|====================
|
||||||
void bwc_add_param (bwc_data *const data,
|
void bwc_add_param (bwc_data *const data,
|
||||||
char *const name,
|
char *const name,
|
||||||
uint8 const precision);
|
uint8 const precision);
|
||||||
|
@ -90,16 +98,16 @@
|
||||||
//==========|==========================|======================|======|=======|====================
|
//==========|==========================|======================|======|=======|====================
|
||||||
void bwc_set_error_resilience (bwc_field *const field);
|
void bwc_set_error_resilience (bwc_field *const field);
|
||||||
//==========|==========================|======================|======|=======|====================
|
//==========|==========================|======================|======|=======|====================
|
||||||
void bwc_set_quant_style (bwc_field *const field,
|
void set_quant_style (bwc_field *const field,
|
||||||
bwc_quant_st const quantization_style);
|
bwc_quant_st const quantization_style);
|
||||||
//==========|==========================|======================|======|=======|====================
|
//==========|==========================|======================|======|=======|====================
|
||||||
void bwc_set_quant_step_size (bwc_field *const field,
|
void set_quant_step_size (bwc_field *const field,
|
||||||
double const delta);
|
double const delta);
|
||||||
//==========|==========================|======================|======|=======|====================
|
//==========|==========================|======================|======|=======|====================
|
||||||
void bwc_set_progression (bwc_field *const field,
|
void set_progression (bwc_field *const field,
|
||||||
bwc_prog_ord const progression);
|
bwc_prog_ord const progression);
|
||||||
//==========|==========================|======================|======|=======|====================
|
//==========|==========================|======================|======|=======|====================
|
||||||
void bwc_set_kernels (bwc_field *const field,
|
void set_kernels (bwc_field *const field,
|
||||||
bwc_dwt_filter const KernelX,
|
bwc_dwt_filter const KernelX,
|
||||||
bwc_dwt_filter const KernelY,
|
bwc_dwt_filter const KernelY,
|
||||||
bwc_dwt_filter const KernelZ,
|
bwc_dwt_filter const KernelZ,
|
||||||
|
|
|
@ -689,7 +689,8 @@
|
||||||
|
|
||||||
uint8 guard_bits; // Number of guard bits during quant.
|
uint8 guard_bits; // Number of guard bits during quant.
|
||||||
|
|
||||||
bwc_stream header; // Main codestream header.
|
uint64 headerSize; // Size estimation of the global header.
|
||||||
|
uint64 codestreamSize; // Size of entire code-stream.
|
||||||
|
|
||||||
bwc_quant_st quantization_style; // Quantization style.
|
bwc_quant_st quantization_style; // Quantization style.
|
||||||
bwc_prog_ord progression; // Packet progression order.
|
bwc_prog_ord progression; // Packet progression order.
|
||||||
|
@ -714,23 +715,7 @@
|
||||||
|
|
||||||
bwc_tile *tile; // Structure defining bwc tile.
|
bwc_tile *tile; // Structure defining bwc tile.
|
||||||
|
|
||||||
struct meter
|
bwc_stream *aux; // Auxiliary info. codestream block.
|
||||||
{
|
bwc_stream *com; // Comment codestream block.
|
||||||
double bpd; // Average bits per datapoint.
|
|
||||||
double cpr; // Compression ratio
|
|
||||||
double css; // Codestream size.
|
|
||||||
|
|
||||||
struct time
|
|
||||||
{
|
|
||||||
double ttl; // Total compression time.
|
|
||||||
|
|
||||||
double cpy; // Total time used copying data.
|
|
||||||
double nrm; // Total time used normalizing data.
|
|
||||||
|
|
||||||
double wav; // Total time used for wavelet transform.
|
|
||||||
double ent; // Total time used for entropy encoding.
|
|
||||||
double ass; // Total codestream assembly time.
|
|
||||||
} time;
|
|
||||||
} meter;
|
|
||||||
} bwc_field;
|
} bwc_field;
|
||||||
#endif
|
#endif
|
|
@ -1486,7 +1486,6 @@ write_eas3(bwc_data *const data, char *const filename)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Calculate the size of the data field used for the endian !
|
! Calculate the size of the data field used for the endian !
|
||||||
! conversion and write operations. !
|
! conversion and write operations. !
|
||||||
|
|
|
@ -94,6 +94,15 @@ else()
|
||||||
target_compile_definitions(bwclib PRIVATE -DBWC_DOUBLE_PRECISION)
|
target_compile_definitions(bwclib PRIVATE -DBWC_DOUBLE_PRECISION)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Set the target compile definition for the profiling #
|
||||||
|
# output. #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
if(${PROF})
|
||||||
|
target_compile_definitions(bwclib PRIVATE -DBWC_PROFILE)
|
||||||
|
MESSAGE(STATUS "Profiling: ${PROF}")
|
||||||
|
endif()
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Set the Version and SOVersion and define the public API #
|
# Set the Version and SOVersion and define the public API #
|
||||||
# for the BigWhoop library. #
|
# for the BigWhoop library. #
|
||||||
|
|
|
@ -137,20 +137,28 @@ can_read(bitstream *const stream, const uint64 length)
|
||||||
! !
|
! !
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
codestream_write_header(bitstream *const stream, bwc_field *const field)
|
codestream_write_header(bitstream *const stream,
|
||||||
|
bwc_field *const field)
|
||||||
{
|
{
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE INT VARIABLES: !
|
! DEFINE INT VARIABLES: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
|
uint64 Lcss;
|
||||||
uint32 t;
|
uint32 t;
|
||||||
|
uint32 Laux;
|
||||||
|
uint16 Linf, Lctr, Lcom;
|
||||||
uint16 Leoh;
|
uint16 Leoh;
|
||||||
uint8 p;
|
uint8 p, l;
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
bwc_gl_ctrl *control;
|
bwc_gl_ctrl *control;
|
||||||
bwc_gl_inf *info;
|
bwc_gl_inf *info;
|
||||||
|
bwc_tile *tile;
|
||||||
|
bwc_parameter *parameter;
|
||||||
|
bwc_stream *aux;
|
||||||
|
bwc_stream *com;
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE ASSERTIONS: !
|
! DEFINE ASSERTIONS: !
|
||||||
|
@ -163,46 +171,116 @@ codestream_write_header(bitstream *const stream, bwc_field *const field)
|
||||||
! structure to temporary variables to make the code more !
|
! structure to temporary variables to make the code more !
|
||||||
! readable. !
|
! readable. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
control = &field->control;
|
|
||||||
info = field->info;
|
info = field->info;
|
||||||
|
control = &field->control;
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
tile = &field->tile[0];
|
||||||
! Calculate the size of the end of header (EOH) maker seg- !
|
|
||||||
! ment - excluding the EOH marker. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
Leoh = 2 + (control->nTiles * info->nPar * 2 * PREC_BYTE);
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
parameter = &tile->parameter[0];
|
||||||
! Emit the portion of the main header already created by !
|
|
||||||
! the bwc_create_compression function. !
|
aux = field->aux;
|
||||||
\*--------------------------------------------------------*/
|
com = field->com;
|
||||||
emit_chunck(stream, control->header.memory, control->header.size);
|
|
||||||
|
Linf = 40 + info->nPar * 25;
|
||||||
|
Lctr = 50 + control->nLayers * 4;
|
||||||
|
Leoh = info->nPar * control->nTiles * 2 * PREC_BYTE;
|
||||||
|
Lcss = control->codestreamSize;
|
||||||
|
|
||||||
|
emit_symbol(stream, SOC, 2);
|
||||||
|
emit_symbol(stream, Lcss, 8);
|
||||||
|
emit_symbol(stream, SGI, 2);
|
||||||
|
emit_symbol(stream, Linf, 2);
|
||||||
|
emit_symbol(stream, info->nX, 8);
|
||||||
|
emit_symbol(stream, info->nY, 8);
|
||||||
|
emit_symbol(stream, info->nZ, 8);
|
||||||
|
emit_symbol(stream, info->nTS, 2);
|
||||||
|
emit_symbol(stream, info->nPar, 1);
|
||||||
|
emit_symbol(stream, info->precision, 1);
|
||||||
|
emit_chunck(stream, (uchar*)info->f_ext, 10);
|
||||||
|
|
||||||
|
for(p = 0; p < info->nPar; ++p)
|
||||||
|
{
|
||||||
|
emit_chunck(stream, (uchar*)parameter[p].info.name, 24);
|
||||||
|
emit_symbol(stream, parameter[p].info.precision, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
emit_symbol(stream, SGC, 2);
|
||||||
|
emit_symbol(stream, Lctr, 2);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->CSsgc, 2);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->error_resilience, 1);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->quantization_style, 1);
|
||||||
|
emit_symbol(stream, control->guard_bits, 1);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->qt_exponent, 1);
|
||||||
|
emit_symbol(stream, control->qt_mantissa, 2);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->progression, 1);
|
||||||
|
emit_symbol(stream, control->KernelX << 6 | control->KernelY << 4 |
|
||||||
|
control->KernelZ << 2 | control->KernelTS, 1);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->decompX, 1);
|
||||||
|
emit_symbol(stream, control->decompY, 1);
|
||||||
|
emit_symbol(stream, control->decompZ, 1);
|
||||||
|
emit_symbol(stream, control->decompTS, 1);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->precSizeY << 4 | control->precSizeX, 1);
|
||||||
|
emit_symbol(stream, control->precSizeTS << 4 | control->precSizeZ, 1);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->cbX, 1);
|
||||||
|
emit_symbol(stream, control->cbY, 1);
|
||||||
|
emit_symbol(stream, control->cbZ, 1);
|
||||||
|
emit_symbol(stream, control->cbTS, 1);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->Qm, 1);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->tileSizeX, 8);
|
||||||
|
emit_symbol(stream, control->tileSizeY, 8);
|
||||||
|
emit_symbol(stream, control->tileSizeZ, 8);
|
||||||
|
emit_symbol(stream, control->tileSizeTS, 2);
|
||||||
|
|
||||||
|
emit_symbol(stream, control->nLayers, 1);
|
||||||
|
|
||||||
|
for(l = 0; l < control->nLayers; ++l)
|
||||||
|
{
|
||||||
|
emit_symbol(stream, *(uint32 *)&control->bitrate[l], 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(aux != NULL)
|
||||||
|
{
|
||||||
|
Laux = aux->size + 4;
|
||||||
|
|
||||||
|
emit_symbol(stream, SAX, 2);
|
||||||
|
emit_symbol(stream, Laux, 4);
|
||||||
|
emit_chunck(stream, aux->memory, aux->size);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(com != NULL)
|
||||||
|
{
|
||||||
|
Lcom = com->size + 2;
|
||||||
|
|
||||||
|
emit_symbol(stream, COM, 2);
|
||||||
|
emit_symbol(stream, Lcom, 2);
|
||||||
|
emit_chunck(stream, com->memory, com->size);
|
||||||
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Emit the end of header (EOH) marker and EOH marker seg- !
|
|
||||||
! ment size Leoh. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
emit_symbol(stream, EOH, 2);
|
emit_symbol(stream, EOH, 2);
|
||||||
emit_symbol(stream, Leoh, 2);
|
emit_symbol(stream, Leoh, 2);
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Loop through all tile parameters and... !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
for(t = 0; t < control->nTiles; ++t)
|
for(t = 0; t < control->nTiles; ++t)
|
||||||
{
|
{
|
||||||
for(p = 0; p < info->nPar; ++p)
|
for(p = 0; p < info->nPar; ++p)
|
||||||
{
|
{
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! ...emit the maximum and minimum parameter value to the !
|
|
||||||
! header stream. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
emit_symbol(stream, *(uint64 *)&field->tile[t].parameter[p].info.parameter_min, PREC_BYTE);
|
|
||||||
emit_symbol(stream, *(uint64 *)&field->tile[t].parameter[p].info.parameter_max, PREC_BYTE);
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
emit_symbol(stream, *(uint64 *)&field->tile[t].
|
||||||
! Reset the maximum and minimum parameter value in the !
|
parameter[p].info.
|
||||||
! parameter structure. !
|
parameter_min, PREC_BYTE);
|
||||||
\*--------------------------------------------------------*/
|
emit_symbol(stream, *(uint64 *)&field->tile[t].
|
||||||
|
parameter[p].info.
|
||||||
|
parameter_max, PREC_BYTE);
|
||||||
|
|
||||||
field->tile[t].parameter[p].info.parameter_max = -FLT_MAX;
|
field->tile[t].parameter[p].info.parameter_max = -FLT_MAX;
|
||||||
field->tile[t].parameter[p].info.parameter_min = FLT_MAX;
|
field->tile[t].parameter[p].info.parameter_min = FLT_MAX;
|
||||||
}
|
}
|
||||||
|
@ -475,7 +553,6 @@ assemble_tile(bwc_field *const field, bwc_tile *const tile, bitstream *const str
|
||||||
emit_symbol(stream, tile->info.tile_index, 4);
|
emit_symbol(stream, tile->info.tile_index, 4);
|
||||||
emit_symbol(stream, tile->control.body_size, 8);
|
emit_symbol(stream, tile->control.body_size, 8);
|
||||||
emit_symbol(stream, SOD, 2);
|
emit_symbol(stream, SOD, 2);
|
||||||
|
|
||||||
for(packet_index = 0; packet_index < tile->control.nPackets; ++packet_index)
|
for(packet_index = 0; packet_index < tile->control.nPackets; ++packet_index)
|
||||||
{
|
{
|
||||||
packet = tile->packet_sequence[packet_index];
|
packet = tile->packet_sequence[packet_index];
|
||||||
|
@ -553,9 +630,7 @@ parse_main_header(bwc_data *const data,bitstream *const stream)
|
||||||
uint16 Linf, Lctr, Lcom, Leoh, Lunk;
|
uint16 Linf, Lctr, Lcom, Leoh, Lunk;
|
||||||
uint16 marker;
|
uint16 marker;
|
||||||
uint16 nTS;
|
uint16 nTS;
|
||||||
uint8 dim;
|
|
||||||
uint8 index, l;
|
uint8 index, l;
|
||||||
uint8 samp;
|
|
||||||
uint8 nPar, p;
|
uint8 nPar, p;
|
||||||
uint8 codec_prec, precision;
|
uint8 codec_prec, precision;
|
||||||
|
|
||||||
|
@ -601,12 +676,16 @@ parse_main_header(bwc_data *const data,bitstream *const stream)
|
||||||
{
|
{
|
||||||
case SOC:
|
case SOC:
|
||||||
{
|
{
|
||||||
if(index != 0)
|
if(index != 0 && !can_read(stream, 2))
|
||||||
{
|
{
|
||||||
// Invalid Codestream
|
// Invalid Codestream
|
||||||
fprintf(stderr, CSERROR);
|
fprintf(stderr, CSERROR);
|
||||||
status |= CODESTREAM_ERROR;
|
status |= CODESTREAM_ERROR;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream->Lmax = (uint64)get_symbol(stream, 8);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,6 +743,8 @@ parse_main_header(bwc_data *const data,bitstream *const stream)
|
||||||
info = field->info = &data->info;
|
info = field->info = &data->info;
|
||||||
control = &field->control;
|
control = &field->control;
|
||||||
|
|
||||||
|
control->codestreamSize = stream->Lmax;
|
||||||
|
|
||||||
status |= CODESTREAM_SGI_READ;
|
status |= CODESTREAM_SGI_READ;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -703,7 +784,7 @@ parse_main_header(bwc_data *const data,bitstream *const stream)
|
||||||
|
|
||||||
if(CSsgc & (0x01 << 1))
|
if(CSsgc & (0x01 << 1))
|
||||||
{
|
{
|
||||||
bwc_set_quant_style(field, (bwc_quant_st)buff_long);
|
set_quant_style(field, (bwc_quant_st)buff_long);
|
||||||
}
|
}
|
||||||
|
|
||||||
buff_long = get_symbol(stream, 1);
|
buff_long = get_symbol(stream, 1);
|
||||||
|
@ -719,13 +800,13 @@ parse_main_header(bwc_data *const data,bitstream *const stream)
|
||||||
buff_long = get_symbol(stream, 1);
|
buff_long = get_symbol(stream, 1);
|
||||||
if(CSsgc & (0x01 << 3))
|
if(CSsgc & (0x01 << 3))
|
||||||
{
|
{
|
||||||
bwc_set_progression(field, (uint8)buff_long);
|
set_progression(field, (uint8)buff_long);
|
||||||
}
|
}
|
||||||
|
|
||||||
buff_long = get_symbol(stream, 1);
|
buff_long = get_symbol(stream, 1);
|
||||||
if(CSsgc & (0x01 << 4))
|
if(CSsgc & (0x01 << 4))
|
||||||
{
|
{
|
||||||
bwc_set_kernels(field, (uint8)(0x03 & (buff_long >> 6)), (uint8)(0x03 & (buff_long >> 4)),
|
set_kernels(field, (uint8)(0x03 & (buff_long >> 6)), (uint8)(0x03 & (buff_long >> 4)),
|
||||||
(uint8)(0x03 & (buff_long >> 2)), (uint8)(0x03 & buff_long));
|
(uint8)(0x03 & (buff_long >> 2)), (uint8)(0x03 & buff_long));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1254,311 +1335,6 @@ parse_body(bwc_field *const field, bitstream *const stream)
|
||||||
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
|| | |__| |__] |___ | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
||||||
|| ||
|
|| ||
|
||||||
\************************************************************************************************************/
|
\************************************************************************************************************/
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! FUNCTION NAME: void *test(void) !
|
|
||||||
! -------------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! RETURN VALUE: !
|
|
||||||
! ------------- !
|
|
||||||
! Type Description !
|
|
||||||
! ---- ----------- !
|
|
||||||
! - - !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V 0.1.0 function created !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
uchar
|
|
||||||
assemble_main_header(bwc_field *const field)
|
|
||||||
{
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE INT VARIABLES: !
|
|
||||||
\*-----------------------*/
|
|
||||||
uint64 size;
|
|
||||||
uint16 Linf, Lctr;
|
|
||||||
uint8 p, l;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE STRUCTS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
bwc_gl_ctrl *control;
|
|
||||||
bwc_gl_inf *info;
|
|
||||||
bwc_tile *tile;
|
|
||||||
bwc_parameter *parameter;
|
|
||||||
bitstream *stream;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE ASSERTIONS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
assert(field);
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Save the global as well as the subband control and info !
|
|
||||||
! structure to temporary variables to make the code more !
|
|
||||||
! readable. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
info = field->info;
|
|
||||||
control = &field->control;
|
|
||||||
|
|
||||||
tile = &field->tile[0];
|
|
||||||
|
|
||||||
parameter = &tile->parameter[0];
|
|
||||||
|
|
||||||
Linf = 40 + info->nPar * 25;
|
|
||||||
Lctr = 50 + control->nLayers * 4;
|
|
||||||
|
|
||||||
size = 6 + Linf + Lctr;
|
|
||||||
|
|
||||||
stream = init_stream(NULL, size, 'c');
|
|
||||||
if(!stream)
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
emit_symbol(stream, SOC, 2);
|
|
||||||
emit_symbol(stream, SGI, 2);
|
|
||||||
emit_symbol(stream, Linf, 2);
|
|
||||||
emit_symbol(stream, info->nX, 8);
|
|
||||||
emit_symbol(stream, info->nY, 8);
|
|
||||||
emit_symbol(stream, info->nZ, 8);
|
|
||||||
emit_symbol(stream, info->nTS, 2);
|
|
||||||
emit_symbol(stream, info->nPar, 1);
|
|
||||||
emit_symbol(stream, info->precision, 1);
|
|
||||||
emit_chunck(stream, (uchar*)info->f_ext, 10);
|
|
||||||
|
|
||||||
for(p = 0; p < info->nPar; ++p)
|
|
||||||
{
|
|
||||||
emit_chunck(stream, (uchar*)parameter[p].info.name, 24);
|
|
||||||
emit_symbol(stream, parameter[p].info.precision, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
emit_symbol(stream, SGC, 2);
|
|
||||||
emit_symbol(stream, Lctr, 2);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->CSsgc, 2);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->error_resilience, 1);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->quantization_style, 1);
|
|
||||||
emit_symbol(stream, control->guard_bits, 1);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->qt_exponent, 1);
|
|
||||||
emit_symbol(stream, control->qt_mantissa, 2);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->progression, 1);
|
|
||||||
emit_symbol(stream, control->KernelX << 6 | control->KernelY << 4 |
|
|
||||||
control->KernelZ << 2 | control->KernelTS, 1);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->decompX, 1);
|
|
||||||
emit_symbol(stream, control->decompY, 1);
|
|
||||||
emit_symbol(stream, control->decompZ, 1);
|
|
||||||
emit_symbol(stream, control->decompTS, 1);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->precSizeY << 4 | control->precSizeX, 1);
|
|
||||||
emit_symbol(stream, control->precSizeTS << 4 | control->precSizeZ, 1);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->cbX, 1);
|
|
||||||
emit_symbol(stream, control->cbY, 1);
|
|
||||||
emit_symbol(stream, control->cbZ, 1);
|
|
||||||
emit_symbol(stream, control->cbTS, 1);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->Qm, 1);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->tileSizeX, 8);
|
|
||||||
emit_symbol(stream, control->tileSizeY, 8);
|
|
||||||
emit_symbol(stream, control->tileSizeZ, 8);
|
|
||||||
emit_symbol(stream, control->tileSizeTS, 2);
|
|
||||||
|
|
||||||
emit_symbol(stream, control->nLayers, 1);
|
|
||||||
|
|
||||||
for(l = 0; l < control->nLayers; ++l)
|
|
||||||
{
|
|
||||||
emit_symbol(stream, *(uint32 *)&control->bitrate[l], 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(terminate_stream(stream, &control->header))
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
fprintf(stderr, MEMERROR);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! FUNCTION NAME: void *test(void) !
|
|
||||||
! -------------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! RETURN VALUE: !
|
|
||||||
! ------------- !
|
|
||||||
! Type Description !
|
|
||||||
! ---- ----------- !
|
|
||||||
! - - !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V 0.1.0 function created !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
uchar
|
|
||||||
codestream_write_aux(bwc_stream *const header, bwc_stream *const aux)
|
|
||||||
{
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE INT VARIABLES: !
|
|
||||||
\*-----------------------*/
|
|
||||||
uint32 Laux;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE STRUCTS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
bitstream *stream;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE ASSERTIONS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
assert(header);
|
|
||||||
assert(aux);
|
|
||||||
|
|
||||||
stream = init_stream(header->memory, header->size, 'c');
|
|
||||||
if(!stream)
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Laux = aux->size + 4;
|
|
||||||
|
|
||||||
stream->L = stream->Lmax;
|
|
||||||
stream->Lmax += Laux + 2;
|
|
||||||
stream->memory = realloc(stream->memory, stream->Lmax);
|
|
||||||
if(!stream->memory)
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
fprintf(stderr, MEMERROR);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
emit_symbol(stream, SAX, 2);
|
|
||||||
emit_symbol(stream, Laux, 4);
|
|
||||||
emit_chunck(stream, aux->memory, aux->size);
|
|
||||||
|
|
||||||
if(terminate_stream(stream, header))
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! FUNCTION NAME: void *test(void) !
|
|
||||||
! -------------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! DESCRIPTION NEEDED !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! - - - !
|
|
||||||
! !
|
|
||||||
! RETURN VALUE: !
|
|
||||||
! ------------- !
|
|
||||||
! Type Description !
|
|
||||||
! ---- ----------- !
|
|
||||||
! - - !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! - Patrick Vogler B87D120 V 0.1.0 function created !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
uchar
|
|
||||||
codestream_write_com(bwc_stream *const header, bwc_stream *const com)
|
|
||||||
{
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE INT VARIABLES: !
|
|
||||||
\*-----------------------*/
|
|
||||||
uint16 Lcom;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE STRUCTS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
bitstream *stream;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE ASSERTIONS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
assert(header);
|
|
||||||
assert(com);
|
|
||||||
|
|
||||||
stream = init_stream(header->memory, header->size, 'c');
|
|
||||||
if(!stream)
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Lcom = com->size + 2;
|
|
||||||
|
|
||||||
stream->L = stream->Lmax;
|
|
||||||
stream->Lmax += Lcom + 2;
|
|
||||||
stream->memory = realloc(stream->memory, stream->Lmax);
|
|
||||||
if(!stream->memory)
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
fprintf(stderr, MEMERROR);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
emit_symbol(stream, COM, 2);
|
|
||||||
emit_symbol(stream, Lcom, 2);
|
|
||||||
emit_chunck(stream, com->memory, com->size);
|
|
||||||
|
|
||||||
if(terminate_stream(stream, header))
|
|
||||||
{
|
|
||||||
// memory allocation error
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
/*----------------------------------------------------------------------------------------------------------*\
|
||||||
! FUNCTION NAME: bwc_stream* assemble_codestream(bwc_field *const field) !
|
! FUNCTION NAME: bwc_stream* assemble_codestream(bwc_field *const field) !
|
||||||
! -------------- !
|
! -------------- !
|
||||||
|
@ -1594,7 +1370,7 @@ assemble_codestream(bwc_field *const field)
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE INT VARIABLES: !
|
! DEFINE INT VARIABLES: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
uint64 i, size;
|
uint64 i;
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
@ -1616,7 +1392,8 @@ assemble_codestream(bwc_field *const field)
|
||||||
! bytes. !
|
! bytes. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
control = &field->control;
|
control = &field->control;
|
||||||
size = control->header.size;
|
|
||||||
|
control->codestreamSize = control->headerSize + 2;
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Walk through the tile structure and assemble the packed !
|
! Walk through the tile structure and assemble the packed !
|
||||||
|
@ -1638,15 +1415,15 @@ assemble_codestream(bwc_field *const field)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
control->codestreamSize += tile->control.header_size +
|
||||||
size += tile->control.header_size + tile->control.body_size;
|
tile->control.body_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Initialize the final codestream and emit the header !
|
! Initialize the final codestream and emit the header !
|
||||||
! bytes. !
|
! bytes. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
stream = init_stream(NULL, size, 'c');
|
stream = init_stream(NULL, control->codestreamSize, 'c');
|
||||||
codestream_write_header(stream, field);
|
codestream_write_header(stream, field);
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -1655,6 +1432,7 @@ assemble_codestream(bwc_field *const field)
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
for(i = 0; i < control->nTiles; ++i)
|
for(i = 0; i < control->nTiles; ++i)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Save the tile structure in a temporary variable to make !
|
! Save the tile structure in a temporary variable to make !
|
||||||
! the code more readable. !
|
! the code more readable. !
|
||||||
|
@ -1734,8 +1512,7 @@ parse_codestream(bwc_data *const data, uint8 const layer)
|
||||||
! Initialize a bitstream used to parse the packed code- !
|
! Initialize a bitstream used to parse the packed code- !
|
||||||
! stream. !
|
! stream. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
stream = init_stream(data->codestream.data->memory,
|
stream = init_stream(data->codestream.data->memory, 10, 'd');
|
||||||
data->codestream.data->size, 'd');
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Parse the main header and set up the field structure for !
|
! Parse the main header and set up the field structure for !
|
||||||
|
|
|
@ -55,7 +55,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#if defined (_OPENMP)
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
@ -1622,18 +1624,22 @@ forward_wavelet_transform(bwc_field *const field, bwc_parameter *const parameter
|
||||||
uint64 rX1, rY1, rZ1;
|
uint64 rX1, rY1, rZ1;
|
||||||
uint64 width, height, depth;
|
uint64 width, height, depth;
|
||||||
uint64 x, y, z;
|
uint64 x, y, z;
|
||||||
uint32 buff_size;
|
|
||||||
|
int64 nThreads;
|
||||||
int16 i;
|
int16 i;
|
||||||
|
|
||||||
|
uint32 buff_size;
|
||||||
|
|
||||||
uint16 incr_TS;
|
uint16 incr_TS;
|
||||||
uint16 rTS0;
|
uint16 rTS0;
|
||||||
uint16 rTS1;
|
uint16 rTS1;
|
||||||
uint16 dt;
|
uint16 dt;
|
||||||
uint16 t;
|
uint16 t;
|
||||||
|
|
||||||
uint8 id;
|
uint8 id;
|
||||||
uint8 filter_tapsX, filter_tapsY, filter_tapsZ;
|
uint8 filter_tapsX, filter_tapsY, filter_tapsZ;
|
||||||
uint8 filter_tapsTS;
|
uint8 filter_tapsTS;
|
||||||
uint8 level;
|
uint8 level;
|
||||||
uint8 nThreads;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
@ -2159,18 +2165,22 @@ inverse_wavelet_transform(bwc_field *const field, bwc_parameter *const parameter
|
||||||
uint64 rX1, rY1, rZ1;
|
uint64 rX1, rY1, rZ1;
|
||||||
uint64 width, height, depth;
|
uint64 width, height, depth;
|
||||||
uint64 x, y, z;
|
uint64 x, y, z;
|
||||||
|
|
||||||
|
int64 nThreads;
|
||||||
|
int64 i;
|
||||||
|
|
||||||
uint32 buff_size;
|
uint32 buff_size;
|
||||||
int16 i;
|
|
||||||
uint16 incr_TS;
|
uint16 incr_TS;
|
||||||
uint16 rTS0;
|
uint16 rTS0;
|
||||||
uint16 rTS1;
|
uint16 rTS1;
|
||||||
uint16 dt;
|
uint16 dt;
|
||||||
uint16 t;
|
uint16 t;
|
||||||
|
|
||||||
uint8 id;
|
uint8 id;
|
||||||
uint8 filter_tapsX, filter_tapsY, filter_tapsZ;
|
uint8 filter_tapsX, filter_tapsY, filter_tapsZ;
|
||||||
uint8 filter_tapsTS;
|
uint8 filter_tapsTS;
|
||||||
uint8 level;
|
uint8 level;
|
||||||
uint8 nThreads;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
|
|
@ -49,8 +49,13 @@
|
||||||
|| ||
|
|| ||
|
||||||
\************************************************************************************************************/
|
\************************************************************************************************************/
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#if defined BWC_PROFILE
|
||||||
|
#include <inttypes.h>
|
||||||
|
#endif
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#if defined (_OPENMP)
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -73,6 +78,72 @@
|
||||||
|| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
|| | | \ | \/ | | | |___ | |__| | \| |___ | | |__| | \| ___] ||
|
||||||
|| ||
|
|| ||
|
||||||
\************************************************************************************************************/
|
\************************************************************************************************************/
|
||||||
|
/*----------------------------------------------------------------------------------------------------------*\
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! This function takes an integer value and generates a version with the appropri- !
|
||||||
|
! ate byte unit in log2 format that is returned to the function caller. !
|
||||||
|
! !
|
||||||
|
! DEVELOPMENT HISTORY: !
|
||||||
|
! -------------------- !
|
||||||
|
! !
|
||||||
|
! Date Author Change Id Release Description Of Change !
|
||||||
|
! ---- ------ --------- ------- --------------------- !
|
||||||
|
! 03.05.2019 Patrick Vogler B87D120 V 0.1.0 function created !
|
||||||
|
! 04.05.2021 Patrick Vogler B87E7E4 V 0.1.0 clean up !
|
||||||
|
! !
|
||||||
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
|
const char*
|
||||||
|
get_size(uint64_t integer)
|
||||||
|
{
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE INT VARIABLES: !
|
||||||
|
\*-----------------------*/
|
||||||
|
uint64_t multiplier;
|
||||||
|
uint8_t i;
|
||||||
|
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE CHAR VARIABLES: !
|
||||||
|
\*-----------------------*/
|
||||||
|
char *sizes[] = { "EiB", "PiB", "TiB", "GiB", "MiB", "KiB", "B" };
|
||||||
|
static char str[20];
|
||||||
|
|
||||||
|
/*--------------------------------------------------------*\
|
||||||
|
! Set up the multiplier used to evaluate the digital unit !
|
||||||
|
! prefix and allocate the character array returned to the !
|
||||||
|
! function caller. !
|
||||||
|
\*--------------------------------------------------------*/
|
||||||
|
multiplier = 1024ULL * 1024ULL * 1024ULL *
|
||||||
|
1024ULL * 1024ULL * 1024ULL;
|
||||||
|
|
||||||
|
/*--------------------------------------------------------*\
|
||||||
|
! If larger than 0, iterate over the byte units until the !
|
||||||
|
! integer is within its range and populate the char. array !
|
||||||
|
! with the appropriate information. !
|
||||||
|
\*--------------------------------------------------------*/
|
||||||
|
if(integer > 0)
|
||||||
|
{
|
||||||
|
for(i = 0; i < 7; ++i, multiplier /= 1024)
|
||||||
|
{
|
||||||
|
if(integer < multiplier)
|
||||||
|
continue;
|
||||||
|
if(integer % multiplier == 0)
|
||||||
|
sprintf(str, "%" PRIu64 " %s", integer / multiplier, sizes[i]);
|
||||||
|
else
|
||||||
|
sprintf(str, "%.1f %s", floor((10.0 * integer) / multiplier) / 10.0, sizes[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strcpy(str, "0 B");
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
/*----------------------------------------------------------------------------------------------------------*\
|
||||||
! FUNCTION NAME: uint8 initialize_precinct(bwc_field *const field, bwc_precinct *precinct, !
|
! FUNCTION NAME: uint8 initialize_precinct(bwc_field *const field, bwc_precinct *precinct, !
|
||||||
! -------------- const uint32 dX, const uint32 dY, !
|
! -------------- const uint32 dX, const uint32 dY, !
|
||||||
|
@ -611,208 +682,6 @@ initialize_subband(bwc_field *const field, bwc_parameter *const parameter, bwc_r
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! FUNCTION NAME: void bwc_header_append_aux(bwc_field *const field, bwc_stream *const aux) !
|
|
||||||
! -------------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! This function amends the main header for the compressed codestream with an auxiliary !
|
|
||||||
! information block. !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! field bwc_field* - Structure defining the compression/ !
|
|
||||||
! decompression stage. !
|
|
||||||
! !
|
|
||||||
! aux unsigned char* - Memory handle for the auxiliary infor- !
|
|
||||||
! mation block. !
|
|
||||||
! !
|
|
||||||
! size unsigned int(32 bit) - Size of the auxiliary information block.!
|
|
||||||
! !
|
|
||||||
! RETURN VALUE: !
|
|
||||||
! ------------- !
|
|
||||||
! Type Description !
|
|
||||||
! ---- ----------- !
|
|
||||||
! uchar - Returns an unsigned char for error handling. !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! 12.04.2019 Patrick Vogler B87D120 V 0.1.0 function created !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
static uchar
|
|
||||||
header_append_aux(bwc_field *const field, bwc_stream *const aux)
|
|
||||||
{
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE STRUCTS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
bwc_gl_ctrl *control;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE ASSERTIONS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
assert(field);
|
|
||||||
assert(aux);
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Save the global control and info structure to temporary !
|
|
||||||
! variables to make the code more readable. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
control = &field->control;
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Check if the main header is already defined in the field !
|
|
||||||
! structure. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
if(!control->header.memory)
|
|
||||||
{
|
|
||||||
fprintf(stderr,"o==========================================================o\n"\
|
|
||||||
"| ERROR: Main header not defined |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"| Unable to append auxiliary information since the |\n"\
|
|
||||||
"| main header has not yet been created. Appending |\n"\
|
|
||||||
"| information to the end of the main header can |\n"\
|
|
||||||
"| only be done after the bwc_create_compression |\n"\
|
|
||||||
"| function has been called. |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"o==========================================================o\n");
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Check if the main header would exceed the maximum number !
|
|
||||||
! of allowable bits after appending the auxiliary !
|
|
||||||
! information. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
if(((uint64)control->header.size + aux->size) >= 0xFFFFFFFF)
|
|
||||||
{
|
|
||||||
fprintf(stderr,"o==========================================================o\n"\
|
|
||||||
"| ERROR: Main header exceeds maximum size limit |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"| Appending the auxiliary information to the main |\n"\
|
|
||||||
"| header would exceed its maximum size limit of |\n"\
|
|
||||||
"| 4294967295 bytes. |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"o==========================================================o\n");
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(codestream_write_aux(&control->header, aux))
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
|
||||||
! FUNCTION NAME: void bwc_header_append_com(bwc_field *const field, bwc_stream *const com) !
|
|
||||||
! -------------- !
|
|
||||||
! !
|
|
||||||
! DESCRIPTION: !
|
|
||||||
! ------------ !
|
|
||||||
! This function amends the main header for the compressed codestream with a comment !
|
|
||||||
! block. !
|
|
||||||
! !
|
|
||||||
! PARAMETERS: !
|
|
||||||
! ----------- !
|
|
||||||
! Variable Type Description !
|
|
||||||
! -------- ---- ----------- !
|
|
||||||
! field bwc_field* - Structure defining the compression/ !
|
|
||||||
! decompression stage. !
|
|
||||||
! !
|
|
||||||
! com unsigned char* - Memory handle for the auxiliary infor- !
|
|
||||||
! mation block. !
|
|
||||||
! !
|
|
||||||
! size unsigned int(32 bit) - Size of the auxiliary information block.!
|
|
||||||
! !
|
|
||||||
! RETURN VALUE: !
|
|
||||||
! ------------- !
|
|
||||||
! Type Description !
|
|
||||||
! ---- ----------- !
|
|
||||||
! uchar - Returns an unsigned char for error handling. !
|
|
||||||
! !
|
|
||||||
! DEVELOPMENT HISTORY: !
|
|
||||||
! -------------------- !
|
|
||||||
! !
|
|
||||||
! Date Author Change Id Release Description Of Change !
|
|
||||||
! ---- ------ --------- ------- --------------------- !
|
|
||||||
! 12.04.2019 Patrick Vogler B87D120 V 0.1.0 function created !
|
|
||||||
! !
|
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
|
||||||
static uchar
|
|
||||||
header_append_com(bwc_field *const field, bwc_stream *const com)
|
|
||||||
{
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE STRUCTS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
bwc_gl_ctrl *control;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE ASSERTIONS: !
|
|
||||||
\*-----------------------*/
|
|
||||||
assert(field);
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Save the global control and info structure to temporary !
|
|
||||||
! variables to make the code more readable. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
control = &field->control;
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Check if the main header is already defined in the field !
|
|
||||||
! structure. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
if(!control->header.memory)
|
|
||||||
{
|
|
||||||
fprintf(stderr,"o==========================================================o\n"\
|
|
||||||
"| ERROR: Main header not defined |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"| Unable to append auxiliary information since the |\n"\
|
|
||||||
"| main header has not yet been created. Appending |\n"\
|
|
||||||
"| information to the end of the main header can |\n"\
|
|
||||||
"| only be done after the bwc_create_compression |\n"\
|
|
||||||
"| function has been called. |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"o==========================================================o\n");
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Check if the main header would exceed the maximum number !
|
|
||||||
! of allowable bits after appending the auxiliary !
|
|
||||||
! information. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
if(((uint64)control->header.size + com->size) >= 0xFFFFFFFF)
|
|
||||||
{
|
|
||||||
fprintf(stderr,"o==========================================================o\n"\
|
|
||||||
"| ERROR: Main header exceeds maximum size limit |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"| Appending the auxiliary information to the main |\n"\
|
|
||||||
"| header would exceed its maximum size limit of |\n"\
|
|
||||||
"| 4294967295 bytes. |\n"\
|
|
||||||
"| |\n"\
|
|
||||||
"o==========================================================o\n");
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(codestream_write_com(&control->header, com))
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
/*----------------------------------------------------------------------------------------------------------*\
|
||||||
! FUNCTION NAME: void fill_buffer(bwc_field *const field, bwc_tile *const tile, !
|
! FUNCTION NAME: void fill_buffer(bwc_field *const field, bwc_tile *const tile, !
|
||||||
|
@ -1140,7 +1009,6 @@ flush_buffer(bwc_field *const field, bwc_tile *const tile, bwc_parameter *const
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
bwc_sample *src;
|
bwc_sample *src;
|
||||||
bwc_gl_inf *info;
|
bwc_gl_inf *info;
|
||||||
bwc_param_ctrl *param_control;
|
|
||||||
bwc_param_inf *param_info;
|
bwc_param_inf *param_info;
|
||||||
bwc_cmd_opts_ll *param;
|
bwc_cmd_opts_ll *param;
|
||||||
|
|
||||||
|
@ -1160,7 +1028,6 @@ flush_buffer(bwc_field *const field, bwc_tile *const tile, bwc_parameter *const
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
info = field->info;
|
info = field->info;
|
||||||
|
|
||||||
param_control = ¶meter->control;
|
|
||||||
param_info = ¶meter->info;
|
param_info = ¶meter->info;
|
||||||
|
|
||||||
nX = info->nX;
|
nX = info->nX;
|
||||||
|
@ -1720,6 +1587,82 @@ bwc_add_param(bwc_data* data, char *name, uint8 precision)
|
||||||
info->parameter->size = (info->nX * info->nY * info->nZ * info->nTS);
|
info->parameter->size = (info->nX * info->nY * info->nZ * info->nTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------------------------------------*\
|
||||||
|
! FUNCTION NAME: !
|
||||||
|
! -------------- !
|
||||||
|
! !
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! !
|
||||||
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
|
uchar
|
||||||
|
bwc_set_com(bwc_data *const data, char const *const com, uint16 size)
|
||||||
|
{
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE ASSERTIONS: !
|
||||||
|
\*-----------------------*/
|
||||||
|
assert(data);
|
||||||
|
assert(com);
|
||||||
|
|
||||||
|
/*--------------------------------------------------------*\
|
||||||
|
! Save the global info structure to a temporary variable !
|
||||||
|
! to make the code more readable. !
|
||||||
|
\*--------------------------------------------------------*/
|
||||||
|
data->codestream.com->memory = calloc(size, sizeof(char));
|
||||||
|
if(!data->codestream.com->memory)
|
||||||
|
{
|
||||||
|
// memory allocation error
|
||||||
|
fprintf(stderr, MEMERROR);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(data->codestream.com->memory, com, size * sizeof(char));
|
||||||
|
data->codestream.com->access = data->codestream.com->memory;
|
||||||
|
data->codestream.com->size = size;
|
||||||
|
data->codestream.com->position = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------------------------------------*\
|
||||||
|
! FUNCTION NAME: !
|
||||||
|
! -------------- !
|
||||||
|
! !
|
||||||
|
! !
|
||||||
|
! DESCRIPTION: !
|
||||||
|
! ------------ !
|
||||||
|
! !
|
||||||
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
|
uchar
|
||||||
|
bwc_set_aux(bwc_data *const data, char const *const aux, uint32 size)
|
||||||
|
{
|
||||||
|
/*-----------------------*\
|
||||||
|
! DEFINE ASSERTIONS: !
|
||||||
|
\*-----------------------*/
|
||||||
|
assert(data);
|
||||||
|
assert(aux);
|
||||||
|
|
||||||
|
/*--------------------------------------------------------*\
|
||||||
|
! Save the global info structure to a temporary variable !
|
||||||
|
! to make the code more readable. !
|
||||||
|
\*--------------------------------------------------------*/
|
||||||
|
data->codestream.com->memory = calloc(size, sizeof(char));
|
||||||
|
if(!data->codestream.com->memory)
|
||||||
|
{
|
||||||
|
// memory allocation error
|
||||||
|
fprintf(stderr, MEMERROR);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(data->codestream.com->memory, aux, size * sizeof(char));
|
||||||
|
data->codestream.com->access = data->codestream.com->memory;
|
||||||
|
data->codestream.com->size = size;
|
||||||
|
data->codestream.com->position = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------------------------------*\
|
/*----------------------------------------------------------------------------------------------------------*\
|
||||||
! FUNCTION NAME: bwc_field *bwc_initialize_data(...) !
|
! FUNCTION NAME: bwc_field *bwc_initialize_data(...) !
|
||||||
! -------------- !
|
! -------------- !
|
||||||
|
@ -1762,9 +1705,6 @@ bwc_get_data(bwc_data* data, uchar* buffer, uint64 size)
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
bwc_gl_inf *info;
|
|
||||||
|
|
||||||
info = &data->info;
|
|
||||||
|
|
||||||
if(size != (uint64)(data->info.nX * data->info.nY * data->info.nZ * data->info.nTS * data->info.nPar))
|
if(size != (uint64)(data->info.nX * data->info.nY * data->info.nZ * data->info.nTS * data->info.nPar))
|
||||||
{
|
{
|
||||||
|
@ -2005,7 +1945,7 @@ create_field(bwc_field *const field)
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Initialize the tile header size. !
|
! Initialize the tile header size. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
tile_control->header_size = 14;
|
tile_control->header_size = 18;
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Initialize the convex hull slope threshold. !
|
! Initialize the convex hull slope threshold. !
|
||||||
|
@ -2409,7 +2349,6 @@ bwc_kill_compression(bwc_field *const field)
|
||||||
free(field->tile[i].parameter);
|
free(field->tile[i].parameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(control->header.memory);
|
|
||||||
free(control->bitrate);
|
free(control->bitrate);
|
||||||
free(field->tile);
|
free(field->tile);
|
||||||
free(field);
|
free(field);
|
||||||
|
@ -2709,7 +2648,7 @@ bwc_set_error_resilience(bwc_field *const field)
|
||||||
! !
|
! !
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
bwc_set_quant_style(bwc_field *const field, bwc_quant_st quantization_style)
|
set_quant_style(bwc_field *const field, bwc_quant_st quantization_style)
|
||||||
{
|
{
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
@ -2775,7 +2714,7 @@ bwc_set_quant_style(bwc_field *const field, bwc_quant_st quantization_style)
|
||||||
! !
|
! !
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
bwc_set_quant_step_size(bwc_field *const field, double delta)
|
set_quant_step_size(bwc_field *const field, double delta)
|
||||||
{
|
{
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
@ -2880,7 +2819,7 @@ bwc_set_quant_step_size(bwc_field *const field, double delta)
|
||||||
! !
|
! !
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
bwc_set_progression(bwc_field *const field, bwc_prog_ord progression)
|
set_progression(bwc_field *const field, bwc_prog_ord progression)
|
||||||
{
|
{
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
@ -2953,7 +2892,7 @@ bwc_set_progression(bwc_field *const field, bwc_prog_ord progression)
|
||||||
! !
|
! !
|
||||||
\*----------------------------------------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
bwc_set_kernels(bwc_field *const field, bwc_dwt_filter KernelX, bwc_dwt_filter KernelY,
|
set_kernels(bwc_field *const field, bwc_dwt_filter KernelX, bwc_dwt_filter KernelY,
|
||||||
bwc_dwt_filter KernelZ, bwc_dwt_filter KernelTS)
|
bwc_dwt_filter KernelZ, bwc_dwt_filter KernelTS)
|
||||||
{
|
{
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
|
@ -3728,6 +3667,7 @@ bwc_create_compression(bwc_field *field, char *rate_control)
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
|
bwc_gl_inf *info;
|
||||||
bwc_gl_ctrl *control;
|
bwc_gl_ctrl *control;
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
|
@ -3739,6 +3679,7 @@ bwc_create_compression(bwc_field *field, char *rate_control)
|
||||||
! Save the global control structure to a temporary varia- !
|
! Save the global control structure to a temporary varia- !
|
||||||
! ble to make the code more readable. !
|
! ble to make the code more readable. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
info = field->info;
|
||||||
control = &field->control;
|
control = &field->control;
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -3835,14 +3776,35 @@ bwc_create_compression(bwc_field *field, char *rate_control)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Create the main header for the compressed codestream and !
|
! Evaluate the size of the main header. !
|
||||||
! save the memory handle in the field structure. !
|
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
if(assemble_main_header(field))
|
/*control->headerSize = 108 + info->nPar * (25 + control->nTiles * 2 * PREC_BYTE)
|
||||||
|
+ control->nLayers * 4;
|
||||||
|
|
||||||
|
if(field->aux != NULL)
|
||||||
{
|
{
|
||||||
return 1;
|
control->headerSize += 6 + field->aux->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(field->com != NULL)
|
||||||
|
{
|
||||||
|
control->headerSize += 6 + field->com->size;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(control->headerSize >= 0xFFFFFFFF)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"o==========================================================o\n"\
|
||||||
|
"| ERROR: Main header exceeds maximum size limit |\n"\
|
||||||
|
"| |\n"\
|
||||||
|
"| Appending the auxiliary information to the main |\n"\
|
||||||
|
"| header would exceed its maximum size limit of |\n"\
|
||||||
|
"| 4294967295 bytes. |\n"\
|
||||||
|
"| |\n"\
|
||||||
|
"o==========================================================o\n");
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}*/
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3885,11 +3847,30 @@ bwc_compress(bwc_field *const field, bwc_data *const data)
|
||||||
uint64 i;
|
uint64 i;
|
||||||
uint16 p;
|
uint16 p;
|
||||||
|
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
|
uint64 css;
|
||||||
|
uint64 nfs;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE FLOAT VARIABLES: !
|
! DEFINE FLOAT VARIABLES: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
double start, end;
|
double start, end;
|
||||||
|
|
||||||
|
double bpd = 0;
|
||||||
|
double cpr = 0;
|
||||||
|
|
||||||
|
double ttl = 0;
|
||||||
|
|
||||||
|
double cpy = 0;
|
||||||
|
double nrm = 0;
|
||||||
|
|
||||||
|
double wav = 0;
|
||||||
|
double ent = 0;
|
||||||
|
double ass = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
|
@ -3908,10 +3889,12 @@ bwc_compress(bwc_field *const field, bwc_data *const data)
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Initialize the compression time measurement. !
|
! Initialize the compression time measurement. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
field->meter.time.ttl = omp_get_wtime();
|
ttl = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
field->meter.time.ttl = (double)clock();
|
ttl = (double)clock();
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -3922,20 +3905,34 @@ bwc_compress(bwc_field *const field, bwc_data *const data)
|
||||||
info = field->info;
|
info = field->info;
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Check if any auxiliary information has been supplied by !
|
! Evaluate the size of the main header. !
|
||||||
! the function caller and append the header accordingly. !
|
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
if(data->codestream.aux && header_append_aux(field, data->codestream.aux))
|
control->headerSize = 108 + info->nPar * (25 + control->nTiles * 2 * PREC_BYTE)
|
||||||
|
+ control->nLayers * 4;
|
||||||
|
|
||||||
|
if(data->codestream.aux != NULL)
|
||||||
{
|
{
|
||||||
return 1;
|
field->aux = data->codestream.aux;
|
||||||
|
control->headerSize += 6 + field->aux->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
if(data->codestream.com != NULL)
|
||||||
! Check if any commentary information has been supplied by !
|
|
||||||
! the function caller and append the header accordingly. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
if(data->codestream.com && header_append_com(field, data->codestream.com))
|
|
||||||
{
|
{
|
||||||
|
field->com = data->codestream.com;
|
||||||
|
control->headerSize += 6 + field->com->size;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(control->headerSize >= 0xFFFFFFFF)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"o==========================================================o\n"\
|
||||||
|
"| ERROR: Main header exceeds maximum size limit |\n"\
|
||||||
|
"| |\n"\
|
||||||
|
"| Appending the auxiliary information to the main |\n"\
|
||||||
|
"| header would exceed its maximum size limit of |\n"\
|
||||||
|
"| 4294967295 bytes. |\n"\
|
||||||
|
"| |\n"\
|
||||||
|
"o==========================================================o\n");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3978,18 +3975,22 @@ bwc_compress(bwc_field *const field, bwc_data *const data)
|
||||||
! Fill the working buffer with the flow field data for the !
|
! Fill the working buffer with the flow field data for the !
|
||||||
! current tile parameter. !
|
! current tile parameter. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
fill_buffer(field, tile, parameter, working_buffer, data, p);
|
fill_buffer(field, tile, parameter, working_buffer, data, p);
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.cpy += end - start;
|
cpy += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.cpy += (end - start)/CLOCKS_PER_SEC;
|
cpy += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -3997,60 +3998,72 @@ bwc_compress(bwc_field *const field, bwc_data *const data)
|
||||||
! scale it to the dynamic range specified by the Qm param- !
|
! scale it to the dynamic range specified by the Qm param- !
|
||||||
! eter. !
|
! eter. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
normalize_param(field, parameter);
|
normalize_param(field, parameter);
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.nrm += end - start;
|
nrm += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.nrm += (end - start)/CLOCKS_PER_SEC;
|
nrm += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Perform the forward discrete wavelet transform. !
|
! Perform the forward discrete wavelet transform. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
if(forward_wavelet_transform(field, parameter))
|
if(forward_wavelet_transform(field, parameter))
|
||||||
{
|
{
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.wav += end - start;
|
wav += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.wav += (end - start)/CLOCKS_PER_SEC;
|
wav += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Tier1 encode the current tile parameter. !
|
! Tier1 encode the current tile parameter. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
if(t1_encode(field, tile, parameter))
|
if(t1_encode(field, tile, parameter))
|
||||||
{
|
{
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.ent += end - start;
|
ent += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.ent += (end - start)/CLOCKS_PER_SEC;
|
ent += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -4062,44 +4075,52 @@ bwc_compress(bwc_field *const field, bwc_data *const data)
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Tier2 encode the current tile. !
|
! Tier2 encode the current tile. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
if(t2_encode(field, tile))
|
if(t2_encode(field, tile))
|
||||||
{
|
{
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.ent += end - start;
|
ent += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.ent += (end - start)/CLOCKS_PER_SEC;
|
ent += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Assemble compressed codestream. !
|
! Assemble compressed codestream. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
data->codestream.data = assemble_codestream(field);
|
data->codestream.data = assemble_codestream(field);
|
||||||
if(!data->codestream.data)
|
if(!data->codestream.data)
|
||||||
{
|
{
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.ass += end - start;
|
ass += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.ass += (end - start)/CLOCKS_PER_SEC;
|
ass += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -4108,12 +4129,33 @@ bwc_compress(bwc_field *const field, bwc_data *const data)
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Calculate the compression time. !
|
! Output the profiling information. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
field->meter.time.ttl = omp_get_wtime() - field->meter.time.ttl;
|
ttl = omp_get_wtime() - ttl;
|
||||||
#else
|
#else
|
||||||
field->meter.time.ttl = ((double)clock() - field->meter.time.ttl)/CLOCKS_PER_SEC;
|
ttl = ((double)clock() - ttl)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
nfs = (uint64)(info->nX * info->nY * info->nZ * info->nTS * info->nPar * info->precision);
|
||||||
|
css = (uint64)data->codestream.data->size;
|
||||||
|
|
||||||
|
|
||||||
|
cpr = (double)nfs/css;
|
||||||
|
bpd = (double)(css * 64.0f)/nfs;
|
||||||
|
|
||||||
|
printf("==============================================================\n");
|
||||||
|
printf(" Compression Time: %*.2f s\n", 25, ttl);
|
||||||
|
printf(" - Wavelet transformation: %*.2f s\n", 25, wav);
|
||||||
|
printf(" - Entropy encoding: %*.2f s\n", 25, ent);
|
||||||
|
printf(" - Codestream assembly: %*.2f s\n", 25, ass);
|
||||||
|
printf("\n");
|
||||||
|
printf(" Compression Ratio: %*.2f\n", 27, cpr);
|
||||||
|
printf(" - Codestream size: %*s\n", 25, get_size(css));
|
||||||
|
printf(" - Field size: %*s\n", 25, get_size(nfs));
|
||||||
|
printf(" - Average bpd: %*.2f\n", 27, bpd);
|
||||||
|
printf("==============================================================\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -4238,8 +4280,18 @@ bwc_decompress(bwc_field *const field, bwc_data *const data)
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE FLOAT VARIABLES: !
|
! DEFINE FLOAT VARIABLES: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
double start, end;
|
double start, end;
|
||||||
|
|
||||||
|
double ttl;
|
||||||
|
|
||||||
|
double cpy;
|
||||||
|
double nrm;
|
||||||
|
|
||||||
|
double wav;
|
||||||
|
double ent;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
|
@ -4259,10 +4311,12 @@ bwc_decompress(bwc_field *const field, bwc_data *const data)
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Initialize the decompression time measurement. !
|
! Initialize the decompression time measurement. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
field->meter.time.ttl = omp_get_wtime();
|
ttl = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
field->meter.time.ttl = (double)clock();
|
ttl = (double)clock();
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -4350,61 +4404,73 @@ bwc_decompress(bwc_field *const field, bwc_data *const data)
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Tier1 decode the current tile parameter. !
|
! Tier1 decode the current tile parameter. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
if(t1_decode(field, tile, parameter))
|
if(t1_decode(field, tile, parameter))
|
||||||
{
|
{
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.ent += end - start;
|
ent += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.ent += (end - start)/CLOCKS_PER_SEC;
|
ent += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Perform the inverse discrete wavelet transform. !
|
! Perform the inverse discrete wavelet transform. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
if(inverse_wavelet_transform(field, parameter))
|
if(inverse_wavelet_transform(field, parameter))
|
||||||
{
|
{
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.wav += end - start;
|
wav += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.wav += (end - start)/CLOCKS_PER_SEC;
|
wav += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Denormalize the working buffer scale it to the original !
|
! Denormalize the working buffer scale it to the original !
|
||||||
! dynamic range specified by the Qm parameter. !
|
! dynamic range specified by the Qm parameter. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
denormalize_param(field, parameter);
|
denormalize_param(field, parameter);
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.nrm += end - start;
|
nrm += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.nrm += (end - start)/CLOCKS_PER_SEC;
|
nrm += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -4412,18 +4478,22 @@ bwc_decompress(bwc_field *const field, bwc_data *const data)
|
||||||
! in the flow field data structure for the current tile pa-!
|
! in the flow field data structure for the current tile pa-!
|
||||||
! rameter. !
|
! rameter. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
start = omp_get_wtime();
|
start = omp_get_wtime();
|
||||||
#else
|
#else
|
||||||
start = (double)clock();
|
start = (double)clock();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
flush_buffer(field, tile, parameter, working_buffer, data, p);
|
flush_buffer(field, tile, parameter, working_buffer, data, p);
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
end = omp_get_wtime();
|
end = omp_get_wtime();
|
||||||
field->meter.time.cpy += end - start;
|
cpy += end - start;
|
||||||
#else
|
#else
|
||||||
end = (double)clock();
|
end = (double)clock();
|
||||||
field->meter.time.cpy += (end - start)/CLOCKS_PER_SEC;
|
cpy += (end - start)/CLOCKS_PER_SEC;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -4440,13 +4510,22 @@ bwc_decompress(bwc_field *const field, bwc_data *const data)
|
||||||
free(working_buffer);
|
free(working_buffer);
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Calculate the decompression time. !
|
! Output the profiling information. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
|
#ifdef BWC_PROFILE
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
field->meter.time.ttl = omp_get_wtime() - field->meter.time.ttl;
|
ttl = omp_get_wtime() - ttl;
|
||||||
#else
|
#else
|
||||||
field->meter.time.ttl = ((double)clock() - field->meter.time.ttl)/CLOCKS_PER_SEC;
|
ttl = ((double)clock() - ttl)/CLOCKS_PER_SEC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
printf("==============================================================\n");
|
||||||
|
printf(" Decompression Time: %*.2f s\n", 24, ttl);
|
||||||
|
printf(" - Wavelet transformation: %*.2f s\n", 24, wav);
|
||||||
|
printf(" - Entropy encoding: %*.2f s\n", 24, ent);
|
||||||
|
printf("==============================================================\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
|
@ -55,7 +55,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#if defined (_OPENMP)
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
|
@ -2834,12 +2836,14 @@ t1_encode(bwc_field *const field, bwc_tile *const tile, bwc_parameter *const par
|
||||||
uint64 c;
|
uint64 c;
|
||||||
uint64 cbSizeX, cbSizeY, cbSizeZ;
|
uint64 cbSizeX, cbSizeY, cbSizeZ;
|
||||||
uint64 width, height, depth;
|
uint64 width, height, depth;
|
||||||
|
|
||||||
int64 buff_size;
|
int64 buff_size;
|
||||||
int64 j;
|
int64 i, j;
|
||||||
|
int64 nThreads;
|
||||||
|
|
||||||
uint16 cbSizeTS;
|
uint16 cbSizeTS;
|
||||||
uint16 slope_max, slope_min;
|
uint16 slope_max, slope_min;
|
||||||
int16 i, z;
|
int16 z;
|
||||||
uint8 nThreads;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
@ -2919,7 +2923,7 @@ t1_encode(bwc_field *const field, bwc_tile *const tile, bwc_parameter *const par
|
||||||
! threads during a parallel run. For a serial run only one !
|
! threads during a parallel run. For a serial run only one !
|
||||||
! working buffer is allocated. !
|
! working buffer is allocated. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
for(i = 0; i < nThreads; ++i)
|
for(i = 0; i < (int64)nThreads; ++i)
|
||||||
{
|
{
|
||||||
memory[i] = calloc(buff_size, sizeof(bwc_coder_stripe));
|
memory[i] = calloc(buff_size, sizeof(bwc_coder_stripe));
|
||||||
if(!memory[i])
|
if(!memory[i])
|
||||||
|
@ -3135,11 +3139,12 @@ t1_decode(bwc_field *const field, bwc_tile *const tile, bwc_parameter *const par
|
||||||
uint64 c;
|
uint64 c;
|
||||||
uint64 cbSizeX, cbSizeY, cbSizeZ;
|
uint64 cbSizeX, cbSizeY, cbSizeZ;
|
||||||
uint64 width, height, depth;
|
uint64 width, height, depth;
|
||||||
|
|
||||||
int64 buff_size;
|
int64 buff_size;
|
||||||
int64 j;
|
int64 i, j;
|
||||||
|
int64 nThreads;
|
||||||
|
|
||||||
uint16 cbSizeTS;
|
uint16 cbSizeTS;
|
||||||
int16 i;
|
|
||||||
uint8 nThreads;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
|
@ -3212,7 +3217,7 @@ t1_decode(bwc_field *const field, bwc_tile *const tile, bwc_parameter *const par
|
||||||
! threads during a parallel run. For a serial run only one !
|
! threads during a parallel run. For a serial run only one !
|
||||||
! working buffer is allocated. !
|
! working buffer is allocated. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
for(i = 0; i < nThreads; ++i)
|
for(i = 0; i < (int64)nThreads; ++i)
|
||||||
{
|
{
|
||||||
memory[i] = calloc(buff_size, sizeof(bwc_coder_stripe));
|
memory[i] = calloc(buff_size, sizeof(bwc_coder_stripe));
|
||||||
if(!memory[i])
|
if(!memory[i])
|
||||||
|
|
|
@ -55,7 +55,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#if defined (_OPENMP)
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "codestream.h"
|
#include "codestream.h"
|
||||||
|
@ -1154,7 +1156,7 @@ create_quality_layers(bwc_field *const field, bwc_tile *const tile)
|
||||||
! Calculate the size of the main header, including the end !
|
! Calculate the size of the main header, including the end !
|
||||||
! of header marker segment. !
|
! of header marker segment. !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
main_header_size = control->header.size + 4 + (control->nTiles * info->nPar * 2 * PREC_BYTE);
|
main_header_size = control->headerSize;
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Calculate the size of the present tile and the overall !
|
! Calculate the size of the present tile and the overall !
|
||||||
|
|
|
@ -52,14 +52,14 @@ add_executable(bwccmd bwccmdl.c
|
||||||
# Set the target compile definition for the requested file #
|
# Set the target compile definition for the requested file #
|
||||||
# format support. #
|
# format support. #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
MESSAGE(STATUS "EAS3 file format support: ${BUILD_EAS3}")
|
|
||||||
|
|
||||||
if(${BUILD_EAS3})
|
if(${BUILD_EAS3})
|
||||||
target_compile_definitions(bwccmd PRIVATE -DBWC_EAS3)
|
target_compile_definitions(bwccmd PRIVATE -DBWC_EAS3)
|
||||||
|
MESSAGE(STATUS "EAS3 file format support: ${BUILD_EAS3}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${BUILD_NETCDF})
|
if(${BUILD_NETCDF})
|
||||||
target_compile_definitions(bwccmd PRIVATE -DBWC_NETCDF)
|
target_compile_definitions(bwccmd PRIVATE -DBWC_NETCDF)
|
||||||
|
MESSAGE(STATUS "NetCDF file format support: ${BUILD_NETCDF}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
|
@ -1503,7 +1503,6 @@ output_info(bwc_cmdl_arg_node *const args,
|
||||||
bwc_gl_ctrl *control;
|
bwc_gl_ctrl *control;
|
||||||
bwc_gl_inf *info;
|
bwc_gl_inf *info;
|
||||||
|
|
||||||
bwc_param_ctrl *param_ctrl;
|
|
||||||
bwc_param_inf *param_info;
|
bwc_param_inf *param_info;
|
||||||
|
|
||||||
bwc_cmdl_arg_node *temp;
|
bwc_cmdl_arg_node *temp;
|
||||||
|
@ -1801,7 +1800,6 @@ output_info(bwc_cmdl_arg_node *const args,
|
||||||
|
|
||||||
for(p = 0; p < info->nPar; ++p)
|
for(p = 0; p < info->nPar; ++p)
|
||||||
{
|
{
|
||||||
param_ctrl = &field->tile[0].parameter[p].control;
|
|
||||||
param_info = &field->tile[0].parameter[p].info;
|
param_info = &field->tile[0].parameter[p].info;
|
||||||
|
|
||||||
minVal = param_info->parameter_min;
|
minVal = param_info->parameter_min;
|
||||||
|
@ -2653,24 +2651,15 @@ main(int argc,
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE INT VARIABLES: !
|
! DEFINE INT VARIABLES: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
uint64_t size=0;
|
|
||||||
uint64_t i;
|
uint64_t i;
|
||||||
uint8_t error_handle;
|
uint8_t error_handle;
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE CHAR VARIABLES: !
|
! DEFINE CHAR VARIABLES: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
char *csSize = NULL;
|
|
||||||
char *fdSize = NULL;
|
|
||||||
char buff[200];
|
char buff[200];
|
||||||
char rate[10];
|
char rate[10];
|
||||||
|
|
||||||
/*-----------------------*\
|
|
||||||
! DEFINE FLOAT VARIABLES: !
|
|
||||||
\*-----------------------*/
|
|
||||||
double comp_ratio;
|
|
||||||
double bpd;
|
|
||||||
|
|
||||||
/*-----------------------*\
|
/*-----------------------*\
|
||||||
! DEFINE STRUCTS: !
|
! DEFINE STRUCTS: !
|
||||||
\*-----------------------*/
|
\*-----------------------*/
|
||||||
|
@ -2679,11 +2668,9 @@ main(int argc,
|
||||||
|
|
||||||
bwc_gl_ctrl *control;
|
bwc_gl_ctrl *control;
|
||||||
|
|
||||||
bwc_dwt_filter filter[4];
|
//bwc_dwt_filter filter[4];
|
||||||
bwc_cmdl_arg_node *args, *temp;
|
bwc_cmdl_arg_node *args, *temp;
|
||||||
|
|
||||||
bwc_cmd_opts_ll *param;
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! Initialize the field and args structures for proper er- !
|
! Initialize the field and args structures for proper er- !
|
||||||
! ror handling, as well as the error handle itself. !
|
! ror handling, as well as the error handle itself. !
|
||||||
|
@ -2751,38 +2738,38 @@ main(int argc,
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! !
|
! !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
temp = retrieve_arg(args, "wavelet_kernels");
|
// temp = retrieve_arg(args, "wavelet_kernels");
|
||||||
if((temp != NULL) && (temp->count == 4) && (temp->dim != 0x00))
|
// if((temp != NULL) && (temp->count == 4) && (temp->dim != 0x00))
|
||||||
{
|
// {
|
||||||
for(i = 0; i < temp->count; ++i)
|
// for(i = 0; i < temp->count; ++i)
|
||||||
{
|
// {
|
||||||
switch(hash(temp->lit_opt[i]))
|
// switch(hash(temp->lit_opt[i]))
|
||||||
{
|
// {
|
||||||
case 0x000000000B87CF64:
|
// case 0x000000000B87CF64:
|
||||||
{
|
// {
|
||||||
filter[i] = bwc_dwt_9_7;
|
// filter[i] = bwc_dwt_9_7;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
case 0x00000652AB15772A:
|
// case 0x00000652AB15772A:
|
||||||
{
|
// {
|
||||||
filter[i] = bwc_dwt_5_3;
|
// filter[i] = bwc_dwt_5_3;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
case 0x000000017C858EFF:
|
// case 0x000000017C858EFF:
|
||||||
{
|
// {
|
||||||
filter[i] = bwc_dwt_5_3;
|
// filter[i] = bwc_dwt_5_3;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
default:
|
// default:
|
||||||
{
|
// {
|
||||||
filter[i] = bwc_dwt_9_7;
|
// filter[i] = bwc_dwt_9_7;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
bwc_set_kernels(field, filter[0], filter[1],
|
// bwc_set_kernels(field, filter[0], filter[1],
|
||||||
filter[2], filter[3]);
|
// filter[2], filter[3]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! !
|
! !
|
||||||
|
@ -2827,23 +2814,23 @@ main(int argc,
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! !
|
! !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
temp = retrieve_arg(args, "quantisation_style");
|
// temp = retrieve_arg(args, "quantisation_style");
|
||||||
if((temp != NULL) && (temp->count == 1))
|
// if((temp != NULL) && (temp->count == 1))
|
||||||
{
|
// {
|
||||||
if(strcmp(temp->lit_opt[0], "NONE"))
|
// if(strcmp(temp->lit_opt[0], "NONE"))
|
||||||
bwc_set_quant_style(field, bwc_qt_none);
|
// bwc_set_quant_style(field, bwc_qt_none);
|
||||||
else
|
// else
|
||||||
bwc_set_quant_style(field, bwc_qt_derived);
|
// bwc_set_quant_style(field, bwc_qt_derived);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! !
|
! !
|
||||||
\*--------------------------------------------------------*/
|
\*--------------------------------------------------------*/
|
||||||
temp = retrieve_arg(args, "quantisation_step_size");
|
// temp = retrieve_arg(args, "quantisation_step_size");
|
||||||
if((temp != NULL) && (temp->count == 1))
|
// if((temp != NULL) && (temp->count == 1))
|
||||||
{
|
// {
|
||||||
bwc_set_quant_step_size(field, temp->num_opt[0]);
|
// bwc_set_quant_step_size(field, temp->num_opt[0]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! !
|
! !
|
||||||
|
@ -2951,11 +2938,11 @@ main(int argc,
|
||||||
printf("----------------- Compression Parameters -----------------\n\n");
|
printf("----------------- Compression Parameters -----------------\n\n");
|
||||||
if((control->CSsgc &0x200) != 0)
|
if((control->CSsgc &0x200) != 0)
|
||||||
{
|
{
|
||||||
printf(" Number of Tiles: %27d\n", control->nTiles);
|
printf(" Number of Tiles: %27ld\n", control->nTiles);
|
||||||
printf(" - Samples in 1.D: %27ld\n", control->tileSizeX);
|
printf(" - Samples in 1.D: %27ld\n", control->tileSizeX);
|
||||||
printf(" - Samples in 2.D: %27ld\n", control->tileSizeY);
|
printf(" - Samples in 2.D: %27ld\n", control->tileSizeY);
|
||||||
printf(" - Samples in 3.D: %27ld\n", control->tileSizeZ);
|
printf(" - Samples in 3.D: %27ld\n", control->tileSizeZ);
|
||||||
printf(" - Timesteps: %27d\n", control->tileSizeTS);
|
printf(" - Timesteps: %27ld\n", control->tileSizeTS);
|
||||||
printf(" ..........................................................\n");
|
printf(" ..........................................................\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
@ -3012,57 +2999,6 @@ main(int argc,
|
||||||
{
|
{
|
||||||
printf("==============================================================\n");
|
printf("==============================================================\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Calculate the original field size, compression ratio and !
|
|
||||||
! bits per datapoint and print the miscellaneous compres- !
|
|
||||||
! sion information to the standard output. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
if(file->info.parameter)
|
|
||||||
{
|
|
||||||
param = file->info.parameter->root;
|
|
||||||
|
|
||||||
while(param != NULL)
|
|
||||||
{
|
|
||||||
size += (param->size * param->precision);
|
|
||||||
param = param -> next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
comp_ratio = (double)size/(file->codestream.data->size);
|
|
||||||
bpd = (double)(file->codestream.data->size * 64)/size;
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Calculate the original field size, compression ratio and !
|
|
||||||
! bits per datapoint and print the miscellaneous compres- !
|
|
||||||
! sion information to the standard output. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
csSize = get_size(file->codestream.data->size);
|
|
||||||
fdSize = get_size(size);
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Calculate the original field size, compression ratio and !
|
|
||||||
! bits per datapoint and print the miscellaneous compres- !
|
|
||||||
! sion information to the standard output. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
printf(" Compression Time: %*.2f s\n", 25, field->meter.time.ttl);
|
|
||||||
printf(" - Wavelet transformation: %*.2f s\n", 25, field->meter.time.wav);
|
|
||||||
printf(" - Entropy encoding: %*.2f s\n", 25, field->meter.time.ent);
|
|
||||||
printf(" - Codestream assembly: %*.2f s\n", 25, field->meter.time.ass);
|
|
||||||
printf("\n");
|
|
||||||
printf(" Compression Ratio: %*.2f\n", 27, comp_ratio);
|
|
||||||
printf(" - Codestream size: %*s\n", 25, csSize);
|
|
||||||
printf(" - Field size: %*s\n", 25, fdSize);
|
|
||||||
printf(" - Average bpd: %*.2f\n", 27, bpd);
|
|
||||||
printf("==============================================================\n");
|
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! Calculate the original field size, compression ratio and !
|
|
||||||
! bits per datapoint and print the miscellaneous compres- !
|
|
||||||
! sion information to the standard output. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
free(csSize);
|
|
||||||
free(fdSize);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
|
@ -3152,21 +3088,6 @@ main(int argc,
|
||||||
goto OUT;
|
goto OUT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------*\
|
|
||||||
! If the verbose flag is set by the function caller, print !
|
|
||||||
! the miscellaneous decompression information to the stan- !
|
|
||||||
! dard output. !
|
|
||||||
\*--------------------------------------------------------*/
|
|
||||||
temp = retrieve_arg(args, "verbose");
|
|
||||||
if(temp != NULL)
|
|
||||||
{
|
|
||||||
printf("==============================================================\n");
|
|
||||||
printf(" Decompression Time: %*.2f s\n", 24, field->meter.time.ttl);
|
|
||||||
printf(" - Wavelet transformation: %*.2f s\n", 24, field->meter.time.wav);
|
|
||||||
printf(" - Entropy encoding: %*.2f s\n", 24, field->meter.time.ent);
|
|
||||||
printf("==============================================================\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/*--------------------------------------------------------*\
|
/*--------------------------------------------------------*\
|
||||||
! !
|
! !
|
||||||
|
|
Loading…
Reference in a new issue