Commit Graph

2058 Commits

Author SHA1 Message Date
Stefan Weil
82b70aa7a5 Add cache to Appveyor CI
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-06 08:43:49 +02:00
Stefan Weil
4b832612a2 Don't redirect build output to file for Appveyor CI
This is only used to find build problems, don't commit!

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-06 08:43:49 +02:00
Ray Smith
d18931e86e Fixed int types for imported tf networks 2017-05-05 16:42:44 -07:00
Ray Smith
4fa463cd71 Corrected SetEnableTraining for recovery from a recognize-only model. 2017-05-05 16:39:43 -07:00
Egor Pugin
006a56c55a Merge pull request #885 from stweil/ci
Update and improve configuration for Travis CI
2017-05-05 23:50:22 +03:00
Stefan Weil
f5494a7535 Update and improve configuration for Travis CI
* Use container based Ubuntu trusty. This provides a newer gcc version
  by default. CI jobs should now start faster.

* Add caching. Leptonica is now only built once for each platform.

* Get Leptonica tar instead of zip file. It's smaller,
  and there is no need to store it on disk.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-05 22:30:08 +02:00
zdenop
00d6d9466c Merge pull request #877 from stweil/opencl
opencl: Add 'static' attributes for local functions and variables
2017-05-05 08:58:18 +02:00
Stefan Weil
d53254e2f0 opencl: Add 'static' attributes for local functions and variables
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-04 19:32:36 +02:00
Ray Smith
8e79297dce Final part of endian improvement. Adds big-endian support to lstm and fixes issue 518 2017-05-03 16:09:44 -07:00
Ray Smith
6ac31dcbdd Fixed DetectOS so it doesn't crash with a big image 2017-05-03 15:50:31 -07:00
zdenop
926a066d77 Merge pull request #867 from stweil/fix
genericvector: Fix minimum size
2017-05-03 12:46:33 +02:00
Stefan Weil
46c887b77e genericvector: Fix minimum size
Commit 907de5995f tried to improve
GenericVector, but missed a case where vectors with less than
kDefaultVectorSize were allocated. This resulted in additional
alloc / free operations.

Commit a28b2a033d (before memory optimization)
oem 0: total heap usage: 739,238 allocs, 739,237 frees, 161,699,214 bytes allocated
oem 1: total heap usage: 690,182 allocs, 690,175 frees, 144,470,400 bytes allocated
oem 2: total heap usage: 728,213 allocs, 728,206 frees, 182,885,824 bytes allocated

Commit fd3f8f9b2d without genericvector change
oem 0: total heap usage: 738,980 allocs, 738,979 frees, 161,697,150 bytes allocated
oem 1: total heap usage: 690,182 allocs, 690,175 frees, 144,470,400 bytes allocated
oem 2: total heap usage: 728,213 allocs, 728,206 frees, 182,885,824 bytes allocated
=> Improvements for oem 0, no change for oem 1 and oem 2.

Commit fd3f8f9b2d
oem 0: total heap usage: 772,648 allocs, 772,647 frees, 160,083,901 bytes allocated
oem 1: total heap usage: 748,591 allocs, 748,584 frees, 143,581,672 bytes allocated
oem 2: total heap usage: 764,796 allocs, 764,789 frees, 181,212,197 bytes allocated
=> Less bytes allocated, but more allocs / frees = bad for performance.

Commit fd3f8f9b2d with this patch
oem 0: total heap usage: 677,537 allocs, 677,536 frees, 160,444,634 bytes allocated
oem 1: total heap usage: 653,812 allocs, 653,805 frees, 143,423,008 bytes allocated
oem 2: total heap usage: 670,029 allocs, 670,022 frees, 181,517,760 bytes allocated
=> Improvements for all three cases.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-03 09:49:23 +02:00
zdenop
b2454d2f2e Merge pull request #865 from stweil/posix
Replace Tesseract data types by POSIX data types
2017-05-03 08:42:07 +02:00
Stefan Weil
5cc8c058fa ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 18:21:51 +02:00
Stefan Weil
e7794c0c72 arch: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 18:21:44 +02:00
Stefan Weil
c1d649ebbc api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 18:21:44 +02:00
zdenop
b4d77057d6 Merge pull request #863 from stweil/warnings
Remove unused local variables
2017-05-02 14:46:02 +02:00
Stefan Weil
048cf9d06a Remove unused local variables
This fixes some compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 09:43:29 +02:00
zdenop
5eb9f0c392 Merge pull request #862 from stweil/doc
doc: Fix use of MAINTAINER_MODE
2017-05-02 08:39:26 +02:00
zdenop
b8137d810f Merge pull request #861 from stweil/malloc
Remove freelist,c and freelist.h
2017-05-02 08:37:00 +02:00
Stefan Weil
2f48d69bcd doc: Fix use of MAINTAINER_MODE
It must also include man_MANS – otherwise make tries to build the
man pages also in non maintainer mode without having a rule for that.

This fixes commit 2794410c9b.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 07:37:18 +02:00
Stefan Weil
6bfde5dcaf Remove undefined macro MAC_OR_DOS
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:17:33 +02:00
Stefan Weil
030d29a4d0 cutil: Remove unused freelist.c and freelist.h
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
Stefan Weil
e219ad195c classify: Replace memfree by free
free also accepts a nullptr argument, so the code can be simplified.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
Stefan Weil
1d6dd03bfc training: Replace memfree by free
free also accepts a nullptr argument, so the code can be simplified.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
Stefan Weil
ca89a11f28 cutil: Remove unused code using memfree
The case (destructor == NULL) never occurs in the current code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
Stefan Weil
80fdb634ba classify: Remove unused ContextsSeen
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
zdenop
b9dff1607f Merge pull request #860 from stweil/malloc
Replace memalloc / memfree by C++ new / delete
2017-05-01 18:09:17 +02:00
Stefan Weil
300841f9a7 Replace memalloc / memfree by C++ new / delete
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:26:23 +02:00
zdenop
ebea04e67a Merge pull request #859 from stweil/unused
Remove unused code
2017-05-01 17:18:16 +02:00
Stefan Weil
85afda65f5 blobs: Remove unused macro
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:12:43 +02:00
Stefan Weil
aebdcd8bce Remove unused global function memrealloc
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:12:43 +02:00
Stefan Weil
445befd3cb Remove unused include statements for freelist.h
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:12:43 +02:00
zdenop
857d920c9b Merge pull request #856 from stweil/doc
RFC – doc: Remove generated files and add rules to build manpages
2017-05-01 16:03:17 +02:00
zdenop
6e80812ac8 Merge pull request #857 from stweil/new_delete
Avoid unnecessary new / delete code
2017-05-01 16:02:49 +02:00
Stefan Weil
6d19e7c3c0 SVNetwork: Avoid unneeded new / delete operations
The class variable mutex_send_ does not require an indirection
by using a pointer.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:58:58 +02:00
Stefan Weil
83588bc7a1 Classify: Avoid unneeded new / delete operations
Both class variables BaselineCutoffs and CharNormCutoffs were pointers
to fixed size arrays which were allocated in the constructor and
deallocated in the destructor. These two extra allocations and two
extra deallocations can be avoided.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:45:50 +02:00
Stefan Weil
bb75793539 ccstruct: Remove unneeded NULL checks
It's also not necessary to nullify class variables in the destructor.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:23:24 +02:00
Stefan Weil
aea0d9a8d5 api: Remove unneeded NULL checks
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:23:24 +02:00
zdenop
fd3f8f9b2d Merge pull request #352 from pnordhus/reduce_mallocs
Avoid unnecessary memory allocations
2017-04-30 17:39:31 +02:00
zdenop
a28b2a033d Merge pull request #855 from stweil/lept
Use Leptonica struct names L_Compressed_Data, Pix
2017-04-30 17:38:02 +02:00
zdenop
eaf5629b46 Merge pull request #744 from stweil/malloc
Replace alloc_struct, free_struct
2017-04-30 17:35:17 +02:00
Stefan Weil
2794410c9b doc: Remove generated files and add rules to build manpages
Those files can be built by doc/generate_manpages.sh.

The manpages are needed for the installation,
so add Makefile rules for them.

Git must ignore the generated manpages.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 11:27:17 +02:00
Stefan Weil
1c59914b61 Use Leptonica struct names L_Compressed_Data, Pix
The Tesseract project prefers that names, so fix the remaining exceptions.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 10:50:12 +02:00
Stefan Weil
f8fba59804 Replace alloc_struct, free_struct
Both functions simply call malloc, free.

Remove also unneeded null pointer checks and use calloc where possible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 09:25:04 +02:00
Ray Smith
7a116ce8bb More formatting fixes from clang tidy 2017-04-28 13:38:32 -07:00
Ray Smith
77015526fa Jeff's fixes to pdf rendering 2017-04-28 13:38:13 -07:00
zdenop
13b7900ebf Merge pull request #778 from cjmayo/singleopts
tidy tesseract(1) adding missing options
2017-04-28 18:58:40 +02:00
zdenop
177ceff9dd Merge pull request #853 from stweil/doc
doc: Remove unsupported font name
2017-04-28 18:58:08 +02:00
zdenop
84f78f87c9 Merge pull request #851 from stweil/typo
Fix typo in comment
2017-04-28 18:56:47 +02:00