Skip to content

Commit

Permalink
Merge branch 'develop' into ejh_check_shared
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett authored Oct 3, 2023
2 parents 05d1d69 + d6db933 commit 7554590
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
11 changes: 6 additions & 5 deletions docs/user_guide.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
@mainpage

## Documentation for Previous Versions of NCEPLIBS-g2

* [NCEPLIBS-g2 Version 3.4.6](ver-3.4.6/index.html)
* [NCEPLIBS-g2 Version 3.4.5](ver-3.4.5/index.html)

# Introduction

This document briefly describes the routines available for encoding/decoding
Expand Down Expand Up @@ -155,3 +150,9 @@ and MSWord formats are available)
MDL has made an HTML version of the document available at
http://www.nws.noaa.gov/tdl/iwt/grib2/frameset_grib2.htm.

## Documentation for Previous Versions of NCEPLIBS-g2

* [NCEPLIBS-g2 Version 3.4.7](ver-3.4.7/index.html)
* [NCEPLIBS-g2 Version 3.4.6](ver-3.4.6/index.html)
* [NCEPLIBS-g2 Version 3.4.5](ver-3.4.5/index.html)

2 changes: 1 addition & 1 deletion src/dec_jpeg2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int_dec_jpeg2000(char *injpc, g2int bufsize, void *outfld, int out_is_g2int)
if (( g2jaspermaxmem = getenv("G2_JASPER_MAXMEM")) != NULL )
jas_conf_set_max_mem_usage(atoi(g2jaspermaxmem));
else
jas_conf_set_max_mem_usage(1073741824);
jas_conf_set_max_mem_usage(G2C_JASPER_MAX_MEMORY);
jas_conf_set_multithread(true);
if (jas_init_library())
return G2_JASPER_INIT;
Expand Down
2 changes: 1 addition & 1 deletion src/enc_jpeg2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ enc_jpeg2000(unsigned char *cin, g2int width, g2int height, g2int nbits,
if (( g2jaspermaxmem = getenv("G2_JASPER_MAXMEM")) != NULL )
jas_conf_set_max_mem_usage(atoi(g2jaspermaxmem));
else
jas_conf_set_max_mem_usage(1073741824);
jas_conf_set_max_mem_usage(G2C_JASPER_MAX_MEMORY);
jas_conf_set_multithread(true);
if (jas_init_library())
return G2_JASPER_INIT;
Expand Down
5 changes: 5 additions & 0 deletions src/jpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ typedef float g2float;

/** Name of JPEG codec in Jasper. */
#define G2C_JASPER_JPEG_FORMAT_NAME "jpc"

/** Max memory size setting for Jasper. This can be over-ridden at
* run-time by setting environment variable G2_JASPER_MAXMEM. */
#define G2C_JASPER_MAX_MEMORY 1073741824

4 changes: 4 additions & 0 deletions tests/test_getgb2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ program test_getgb2
call gf_finalize(iret)
if (iret .ne. 0) stop 5

! Call finalize again, should do nothing.
call gf_finalize(iret)
if (iret .ne. 0) stop 5

print *, 'OK!'
print *, 'SUCCESS!'
end program test_getgb2
Expand Down

0 comments on commit 7554590

Please sign in to comment.