Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ endif()
## include library version/name
set_target_properties(openjph PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(openjph PUBLIC _FILE_OFFSET_BITS=64)
target_include_directories(openjph PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/common> $<INSTALL_INTERFACE:include/openjph>)
target_include_directories(openjph PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/common> $<INSTALL_INTERFACE:include>)

if (MSVC)
set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}")
Expand Down
3 changes: 2 additions & 1 deletion src/core/codestream/ojph_params_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,7 @@ namespace ojph {
avail = NULL;
d = d_store;
max_steps = sizeof(d_store) / sizeof(lifting_step);
this->top_atk = top_atk;
this->type = type;
init(this);
}
Expand Down Expand Up @@ -1162,7 +1163,7 @@ namespace ojph {
float Katk; // only for irreversible scaling factor K
ui8 Natk; // number of lifting steps
lifting_step* d; // pointer to data, initialized to d_store
int max_steps; // maximum number of steps without memory allocation
ui32 max_steps; // maximum number of steps without memory allocation
lifting_step d_store[6]; // lifting step coefficient
param_atk* next; // used for chaining if more than one atk segment
// exist in the codestream
Expand Down
15 changes: 15 additions & 0 deletions src/core/common/ojph_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,21 @@ namespace ojph {
*/
void write_to_file(const char *file_name) const;

/**
* @brief Call this function to get the used size of the memory file.
*
* @return the used size of the memory file in bytes.
*/
size_t get_used_size() const { return used_size; }

/**
* @brief Call this function to get the total buffer size of the memory
* file including unused space (this is the allocated memory).
*
* @return the full size of the memory file in bytes.
*/
size_t get_buf_size() const { return buf_size; }

private:
/**
* @brief This function expands storage by x1.5 needed space.
Expand Down
2 changes: 1 addition & 1 deletion src/core/common/ojph_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
//***************************************************************************/

#define OPENJPH_VERSION_MAJOR 0
#define OPENJPH_VERSION_MINOR 22
#define OPENJPH_VERSION_MINOR 23
#define OPENJPH_VERSION_PATCH 0
9 changes: 5 additions & 4 deletions src/openjph.pc.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@PKG_CONFIG_LIBDIR@
includedir=@PKG_CONFIG_INCLUDEDIR@

Name: @PROJECT_NAME@
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
Requires: @PKG_CONFIG_REQUIRES@
prefix=@CMAKE_INSTALL_PREFIX@
includedir=@PKG_CONFIG_INCLUDEDIR@
libdir=@PKG_CONFIG_LIBDIR@
Libs: -L${libdir} -lopenjph
Cflags: -I${includedir}
Cflags: -I${includedir} -D_FILE_OFFSET_BITS=64
Loading