From c1510793e39dc26ae55f243905ae562764d94842 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Tue, 11 Oct 2011 07:24:58 +0000 Subject: [PATCH] [1.5] backport r987:990 to branch 1.5 --- CHANGES | 1 + applications/codec/image_to_j2k.c | 2 +- applications/jpip/CHANGES | 7 +- applications/jpip/README | 11 ++- .../jpip/libopenjpip/cachemodel_manager.c | 15 +++- .../jpip/libopenjpip/cachemodel_manager.h | 8 +- applications/jpip/libopenjpip/index_manager.c | 8 ++ applications/jpip/libopenjpip/index_manager.h | 10 +++ .../jpip/libopenjpip/j2kheader_manager.c | 15 ++-- applications/jpip/libopenjpip/jp2k_encoder.c | 20 +++-- .../jpip/libopenjpip/msgqueue_manager.c | 16 ++-- .../jpip/libopenjpip/msgqueue_manager.h | 2 - .../jpip/libopenjpip/target_manager.c | 5 +- .../jpip/libopenjpip/target_manager.h | 3 + .../opj_viewer/dist/opj_viewer-20110930.jar | Bin 15592 -> 0 bytes .../opj_client/opj_viewer/dist/opj_viewer.jar | 2 +- .../opj_viewer/src/ImageManager.java | 13 +-- .../opj_viewer/src/ImageViewer.java | 4 +- .../opj_viewer/src/ImageWindow.java | 21 ++--- .../opj_viewer/src/JPIPHttpClient.java | 76 ++++++++++++------ ...930.jar => opj_viewer_xerces-20111010.jar} | Bin 20047 -> 20390 bytes .../dist/opj_viewer_xerces.jar | 2 +- .../opj_viewer_xerces/src/ImageViewer.java | 21 +++-- .../opj_viewer_xerces/src/ImageWindow.java | 22 +++-- applications/jpip/opj_server/opj_server.c | 46 ++++++----- applications/jpip/tools/Makefile.nix | 1 - applications/jpip/tools/jpip_to_j2k.c | 4 +- configure.ac | 1 - 28 files changed, 213 insertions(+), 123 deletions(-) delete mode 100644 applications/jpip/opj_client/opj_viewer/dist/opj_viewer-20110930.jar rename applications/jpip/opj_client/opj_viewer_xerces/dist/{opj_viewer_xerces-20110930.jar => opj_viewer_xerces-20111010.jar} (54%) diff --git a/CHANGES b/CHANGES index 5f417dfe..50534667 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ What's New for OpenJPEG October 10, 2011 * [vincent] fix 'distcheck' rule * [antonin] modified indexer for JPIP, JPP-stream +! [kaori] change -v option was reactivated for JPIP October 7, 2011 + [mickael] enhance non regression test suite generation (and some test names). It is based on a file as encoder previously. diff --git a/applications/codec/image_to_j2k.c b/applications/codec/image_to_j2k.c index 4ab7445b..93d0c6ff 100644 --- a/applications/codec/image_to_j2k.c +++ b/applications/codec/image_to_j2k.c @@ -591,7 +591,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, }; /* parse the command line */ - const char optlist[] = "i:o:r:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:" + const char optlist[] = "i:o:r:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:v:" #ifdef USE_JPWL "W:" #endif /* USE_JPWL */ diff --git a/applications/jpip/CHANGES b/applications/jpip/CHANGES index b86a3451..34fa3cfc 100644 --- a/applications/jpip/CHANGES +++ b/applications/jpip/CHANGES @@ -5,9 +5,12 @@ What's New for OpenJPIP ! : changed + : added +October 11, 2011 ++ [antonin] enable JPT-stream request from client viewer option (credit to kaori) + October 10, 2011 -- [antonin] removed obsolete indexer utility -+ [antonin] enabled JPP-stream +- [antonin] removed obsolete indexer utility (credit to kaori) ++ [antonin] enabled JPP-stream (credit to kaori) September 16, 2011 + [kaori] enabled stateless requests from the opj_viewers diff --git a/applications/jpip/README b/applications/jpip/README index 72796460..0bd22fda 100644 --- a/applications/jpip/README +++ b/applications/jpip/README @@ -103,11 +103,12 @@ Client: % ../opj_dec_server 2. Open image viewers (as many as needed) - % java -jar opj_viewer.jar http://hostname/myFCGI JP2_filename.jp2 [stateless] + % java -jar opj_viewer.jar http://hostname/myFCGI JP2_filename.jp2 [stateless/session] [jptstream/jppstream] ( The arguments - http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting) - JP2_filename.jp2 is the name of a JP2 file available on the server. - - stateless if stateless request is desired, otherwise session request is implemented + - request type stateless for no caching, session (default) for caching + - return media type, JPT-stream tile based stream, or JPP-stream (default) precinct based stream Image viewer GUI instructions: Scale up request: Enlarge the window ROI request: Select a region by mouse click and drag, then click inside the red frame of the selected region @@ -125,7 +126,11 @@ Client: ---------- An example to encode a TIF image "copenhague1.tif" at resolution 4780x4050, 8bit/pixel, grayscale. - % ./image_to_j2k -i copenhague1.tif -o copenhague1.jp2 -p RPCL -c [64,64] -t 640,480 -jpip + % ./image_to_j2k -i copenhague1.tif -o copenhague1.jp2 -p RPCL -c [64,64] -t 640,480 -jpip -v R + + options + -jpip : embed index table box into the output JP2 file (obligation for JPIP) + -v R : partition a tile into tile parts of different resolution levels (obligation for JPT-stream)