Skip to content

Commit

Permalink
* Build Leptonica with OpenJPEG for JPEG 2000 support
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Aug 5, 2022
1 parent f05cc72 commit b76a6db
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 42 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Build Leptonica with OpenJPEG for JPEG 2000 support
* Introduce `linux-arm64` to presets for libpostal ([pull #1199](https://github.com/bytedeco/javacpp-presets/pull/1199))
* Map missing factory functions in `torch::` namespace using `torch_` as prefix in presets for PyTorch ([issue #1197](https://github.com/bytedeco/javacpp-presets/issues/1197))
* Add presets for the nvJPEG module of CUDA ([issue #1193](https://github.com/bytedeco/javacpp-presets/issues/1193))
Expand Down
98 changes: 83 additions & 15 deletions leptonica/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ LIBJPEG=libjpeg-turbo-2.1.3
LIBPNG=libpng-1.6.37 # warning: libpng16 doesn't work on CentOS 6 for some reason
LIBTIFF=tiff-4.3.0
LIBWEBP=libwebp-1.2.2
OPENJPEG_VERSION=2.5.0
LEPTONICA_VERSION=1.82.0
download https://download.videolan.org/contrib/nasm/nasm-$NASM_VERSION.tar.gz nasm-$NASM_VERSION.tar.gz
download http://zlib.net/$ZLIB.tar.gz $ZLIB.tar.gz
Expand All @@ -22,6 +23,7 @@ download http://downloads.sourceforge.net/project/libjpeg-turbo/2.1.3/$LIBJPEG.t
download https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/$LIBPNG.tar.gz $LIBPNG.tar.gz
download http://download.osgeo.org/libtiff/$LIBTIFF.tar.gz $LIBTIFF.tar.gz
download http://downloads.webmproject.org/releases/webp/$LIBWEBP.tar.gz $LIBWEBP.tar.gz
download https://github.com/uclouvain/openjpeg/archive/refs/tags/v$OPENJPEG_VERSION.tar.gz openjpeg-$OPENJPEG_VERSION.tar.gz
download https://github.com/DanBloomberg/leptonica/releases/download/$LEPTONICA_VERSION/leptonica-$LEPTONICA_VERSION.tar.gz leptonica-$LEPTONICA_VERSION.tar.gz

mkdir -p $PLATFORM
Expand All @@ -35,6 +37,7 @@ tar --totals -xzf ../$LIBJPEG.tar.gz
tar --totals -xzf ../$LIBPNG.tar.gz
tar --totals -xzf ../$LIBTIFF.tar.gz
tar --totals -xzf ../$LIBWEBP.tar.gz
tar --totals -xzf ../openjpeg-$OPENJPEG_VERSION.tar.gz
tar --totals -xzf ../leptonica-$LEPTONICA_VERSION.tar.gz

# https://src.fedoraproject.org/rpms/giflib/blob/rawhide/f/CMakeLists.txt
Expand Down Expand Up @@ -100,8 +103,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -140,8 +148,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -180,8 +193,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -220,8 +238,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -257,8 +280,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -294,8 +322,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -334,8 +367,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -372,8 +410,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -410,8 +453,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -447,8 +495,13 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF -DCMAKE_MACOSX_RPATH=ON .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DCMAKE_MACOSX_RPATH=ON .
make -j $MAKEJ
make install/strip
;;
Expand Down Expand Up @@ -483,13 +536,18 @@ case $PLATFORM in
$CMAKE $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF -DCMAKE_MACOSX_RPATH=ON .
$CMAKE $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DCMAKE_MACOSX_RPATH=ON .
make -j $MAKEJ
make install/strip
;;
windows-x86)
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/ -DOPJ_STATIC"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand Down Expand Up @@ -519,13 +577,18 @@ case $PLATFORM in
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF -DSW_BUILD=OFF .
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DSW_BUILD=OFF .
make -j $MAKEJ
make install
;;
windows-x86_64)
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/ -DOPJ_STATIC"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand Down Expand Up @@ -555,8 +618,13 @@ case $PLATFORM in
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -Dlzma=OFF -Dzstd=OFF .
make -j $MAKEJ
make install
cd ../openjpeg-$OPENJPEG_VERSION
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -DBUILD_CODEC=OFF .
make -j $MAKEJ
make install
ln -sf openjpeg-2.5 ../include/openjpeg-2.4
cd ../leptonica-$LEPTONICA_VERSION
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DOPENJPEG_SUPPORT=OFF -DSW_BUILD=OFF .
$CMAKE -G "MSYS Makefiles" $CMAKE_CONFIG -DBUILD_SHARED_LIBS=ON -DSW_BUILD=OFF .
make -j $MAKEJ
make install
;;
Expand Down
4 changes: 2 additions & 2 deletions leptonica/src/gen/java/org/bytedeco/leptonica/L_HASHITEM.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public class L_HASHITEM extends Pointer {
}

/** key is hashed into index into hashtab */
public native @Cast("l_uint64") int key(); public native L_HASHITEM key(int setter);
public native @Cast("l_uint64") long key(); public native L_HASHITEM key(long setter);
/** number stored associated with the key */
public native @Cast("l_uint64") int val(); public native L_HASHITEM val(int setter);
public native @Cast("l_uint64") long val(); public native L_HASHITEM val(long setter);
/** number of elements seen with this key */
public native @Cast("l_int32") int count(); public native L_HASHITEM count(int setter);
/** ptr to the next in the list */
Expand Down
2 changes: 1 addition & 1 deletion leptonica/src/gen/java/org/bytedeco/leptonica/RB_TYPE.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class RB_TYPE extends Pointer {
}

public native @Cast("l_int64") long itype(); public native RB_TYPE itype(long setter);
public native @Cast("l_uint64") int utype(); public native RB_TYPE utype(int setter);
public native @Cast("l_uint64") long utype(); public native RB_TYPE utype(long setter);
public native @Cast("l_float64") double ftype(); public native RB_TYPE ftype(double setter);
public native Pointer ptype(); public native RB_TYPE ptype(Pointer setter);
}
48 changes: 24 additions & 24 deletions leptonica/src/gen/java/org/bytedeco/leptonica/global/leptonica.java
Original file line number Diff line number Diff line change
Expand Up @@ -5228,8 +5228,8 @@ public class leptonica extends org.bytedeco.leptonica.presets.leptonica {
public static native L_DNAHASH l_dnaHashCreate( @Cast("l_int32") int nbuckets, @Cast("l_int32") int initsize );
public static native void l_dnaHashDestroy( @Cast("L_DNAHASH**") PointerPointer pdahash );
public static native void l_dnaHashDestroy( @ByPtrPtr L_DNAHASH pdahash );
public static native L_DNA l_dnaHashGetDna( L_DNAHASH dahash, @Cast("l_uint64") int key, @Cast("l_int32") int copyflag );
public static native @Cast("l_ok") int l_dnaHashAdd( L_DNAHASH dahash, @Cast("l_uint64") int key, @Cast("l_float64") double value );
public static native L_DNA l_dnaHashGetDna( L_DNAHASH dahash, @Cast("l_uint64") long key, @Cast("l_int32") int copyflag );
public static native @Cast("l_ok") int l_dnaHashAdd( L_DNAHASH dahash, @Cast("l_uint64") long key, @Cast("l_float64") double value );
public static native PIX pixMorphDwa_2( PIX pixd, PIX pixs, @Cast("l_int32") int operation, @Cast("char*") BytePointer selname );
public static native PIX pixMorphDwa_2( PIX pixd, PIX pixs, @Cast("l_int32") int operation, @Cast("char*") ByteBuffer selname );
public static native PIX pixMorphDwa_2( PIX pixd, PIX pixs, @Cast("l_int32") int operation, @Cast("char*") byte[] selname );
Expand Down Expand Up @@ -5648,7 +5648,7 @@ public class leptonica extends org.bytedeco.leptonica.presets.leptonica {
public static native L_HASHMAP l_hmapCreate( @Cast("l_int32") int ninit, @Cast("l_int32") int maxocc );
public static native void l_hmapDestroy( @Cast("L_HASHMAP**") PointerPointer phmap );
public static native void l_hmapDestroy( @ByPtrPtr L_HASHMAP phmap );
public static native L_HASHITEM l_hmapLookup( L_HASHMAP hmap, @Cast("l_uint64") int key, @Cast("l_uint64") int val, @Cast("l_int32") int op );
public static native L_HASHITEM l_hmapLookup( L_HASHMAP hmap, @Cast("l_uint64") long key, @Cast("l_uint64") long val, @Cast("l_int32") int op );
public static native @Cast("l_ok") int l_hmapRehash( L_HASHMAP hmap );
public static native L_HEAP lheapCreate( @Cast("l_int32") int n, @Cast("l_int32") int direction );
public static native void lheapDestroy( @Cast("L_HEAP**") PointerPointer plh, @Cast("l_int32") int freeflag );
Expand Down Expand Up @@ -8537,30 +8537,30 @@ public class leptonica extends org.bytedeco.leptonica.presets.leptonica {
public static native @Cast("l_ok") int genRandomIntOnInterval( @Cast("l_int32") int start, @Cast("l_int32") int end, @Cast("l_int32") int seed, @Cast("l_int32*") IntBuffer pval );
public static native @Cast("l_ok") int genRandomIntOnInterval( @Cast("l_int32") int start, @Cast("l_int32") int end, @Cast("l_int32") int seed, @Cast("l_int32*") int[] pval );
public static native @Cast("l_int32") int lept_roundftoi( @Cast("l_float32") float fval );
public static native @Cast("l_ok") int l_hashStringToUint64( @Cast("const char*") BytePointer str, @Cast("l_uint64*") IntPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( String str, @Cast("l_uint64*") IntBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( @Cast("const char*") BytePointer str, @Cast("l_uint64*") int[] phash );
public static native @Cast("l_ok") int l_hashStringToUint64( String str, @Cast("l_uint64*") IntPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( @Cast("const char*") BytePointer str, @Cast("l_uint64*") IntBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( String str, @Cast("l_uint64*") int[] phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( @Cast("const char*") BytePointer str, @Cast("l_uint64*") IntPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( String str, @Cast("l_uint64*") IntBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( @Cast("const char*") BytePointer str, @Cast("l_uint64*") int[] phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( String str, @Cast("l_uint64*") IntPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( @Cast("const char*") BytePointer str, @Cast("l_uint64*") IntBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( String str, @Cast("l_uint64*") int[] phash );
public static native @Cast("l_ok") int l_hashPtToUint64( @Cast("l_int32") int x, @Cast("l_int32") int y, @Cast("l_uint64*") IntPointer phash );
public static native @Cast("l_ok") int l_hashPtToUint64( @Cast("l_int32") int x, @Cast("l_int32") int y, @Cast("l_uint64*") IntBuffer phash );
public static native @Cast("l_ok") int l_hashPtToUint64( @Cast("l_int32") int x, @Cast("l_int32") int y, @Cast("l_uint64*") int[] phash );
public static native @Cast("l_ok") int l_hashFloat64ToUint64( @Cast("l_float64") double val, @Cast("l_uint64*") IntPointer phash );
public static native @Cast("l_ok") int l_hashFloat64ToUint64( @Cast("l_float64") double val, @Cast("l_uint64*") IntBuffer phash );
public static native @Cast("l_ok") int l_hashFloat64ToUint64( @Cast("l_float64") double val, @Cast("l_uint64*") int[] phash );
public static native @Cast("l_ok") int l_hashStringToUint64( @Cast("const char*") BytePointer str, @Cast("l_uint64*") LongPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( String str, @Cast("l_uint64*") LongBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( @Cast("const char*") BytePointer str, @Cast("l_uint64*") long[] phash );
public static native @Cast("l_ok") int l_hashStringToUint64( String str, @Cast("l_uint64*") LongPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( @Cast("const char*") BytePointer str, @Cast("l_uint64*") LongBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64( String str, @Cast("l_uint64*") long[] phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( @Cast("const char*") BytePointer str, @Cast("l_uint64*") LongPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( String str, @Cast("l_uint64*") LongBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( @Cast("const char*") BytePointer str, @Cast("l_uint64*") long[] phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( String str, @Cast("l_uint64*") LongPointer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( @Cast("const char*") BytePointer str, @Cast("l_uint64*") LongBuffer phash );
public static native @Cast("l_ok") int l_hashStringToUint64Fast( String str, @Cast("l_uint64*") long[] phash );
public static native @Cast("l_ok") int l_hashPtToUint64( @Cast("l_int32") int x, @Cast("l_int32") int y, @Cast("l_uint64*") LongPointer phash );
public static native @Cast("l_ok") int l_hashPtToUint64( @Cast("l_int32") int x, @Cast("l_int32") int y, @Cast("l_uint64*") LongBuffer phash );
public static native @Cast("l_ok") int l_hashPtToUint64( @Cast("l_int32") int x, @Cast("l_int32") int y, @Cast("l_uint64*") long[] phash );
public static native @Cast("l_ok") int l_hashFloat64ToUint64( @Cast("l_float64") double val, @Cast("l_uint64*") LongPointer phash );
public static native @Cast("l_ok") int l_hashFloat64ToUint64( @Cast("l_float64") double val, @Cast("l_uint64*") LongBuffer phash );
public static native @Cast("l_ok") int l_hashFloat64ToUint64( @Cast("l_float64") double val, @Cast("l_uint64*") long[] phash );
public static native @Cast("l_ok") int findNextLargerPrime( @Cast("l_int32") int start, @Cast("l_uint32*") IntPointer pprime );
public static native @Cast("l_ok") int findNextLargerPrime( @Cast("l_int32") int start, @Cast("l_uint32*") IntBuffer pprime );
public static native @Cast("l_ok") int findNextLargerPrime( @Cast("l_int32") int start, @Cast("l_uint32*") int[] pprime );
public static native @Cast("l_ok") int lept_isPrime( @Cast("l_uint64") int n, @Cast("l_int32*") IntPointer pis_prime, @Cast("l_uint32*") IntPointer pfactor );
public static native @Cast("l_ok") int lept_isPrime( @Cast("l_uint64") int n, @Cast("l_int32*") IntBuffer pis_prime, @Cast("l_uint32*") IntBuffer pfactor );
public static native @Cast("l_ok") int lept_isPrime( @Cast("l_uint64") int n, @Cast("l_int32*") int[] pis_prime, @Cast("l_uint32*") int[] pfactor );
public static native @Cast("l_ok") int lept_isPrime( @Cast("l_uint64") long n, @Cast("l_int32*") IntPointer pis_prime, @Cast("l_uint32*") IntPointer pfactor );
public static native @Cast("l_ok") int lept_isPrime( @Cast("l_uint64") long n, @Cast("l_int32*") IntBuffer pis_prime, @Cast("l_uint32*") IntBuffer pfactor );
public static native @Cast("l_ok") int lept_isPrime( @Cast("l_uint64") long n, @Cast("l_int32*") int[] pis_prime, @Cast("l_uint32*") int[] pfactor );
public static native @Cast("l_uint32") int convertIntToGrayCode( @Cast("l_uint32") int val );
public static native @Cast("l_uint32") int convertGrayCodeToInt( @Cast("l_uint32") int val );
public static native @Cast("char*") BytePointer getLeptonicaVersion( );
Expand Down

0 comments on commit b76a6db

Please sign in to comment.